@wordpress/block-library 9.12.1-next.082ed6819.0 → 9.13.1-next.a9f418477.0
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/CHANGELOG.md +2 -0
- package/build/block/edit.js +2 -29
- package/build/block/edit.js.map +1 -1
- package/build/cover/edit/index.js +4 -2
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +6 -4
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/form/index.js +1 -2
- package/build/form/index.js.map +1 -1
- package/build/form/view.js +10 -5
- package/build/form/view.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +2 -2
- package/build/list-item/hooks/use-merge.js.map +1 -1
- package/build/navigation/edit/deleted-navigation-warning.js +9 -2
- package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build/navigation-link/edit.js +1 -2
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +3 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/pattern/recursion-detector.js +0 -1
- package/build/pattern/recursion-detector.js.map +1 -1
- package/build/query/edit/index.js +2 -2
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +0 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +0 -1
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +0 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/{pattern-selection-modal.js → pattern-selection.js} +55 -36
- package/build/query/edit/pattern-selection.js.map +1 -0
- package/build/query/edit/query-content.js +5 -8
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +5 -11
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +31 -11
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/separator/deprecated.js +2 -1
- package/build/separator/deprecated.js.map +1 -1
- package/build/separator/edit.js +29 -4
- package/build/separator/edit.js.map +1 -1
- package/build/separator/index.js +5 -0
- package/build/separator/index.js.map +1 -1
- package/build/separator/save.js +3 -2
- package/build/separator/save.js.map +1 -1
- package/build/social-link/edit.js +35 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +4 -2
- package/build/social-link/index.js.map +1 -1
- package/build/template-part/edit/import-controls.js +0 -1
- package/build/template-part/edit/import-controls.js.map +1 -1
- package/build-module/block/edit.js +3 -30
- package/build-module/block/edit.js.map +1 -1
- package/build-module/cover/edit/index.js +4 -2
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +6 -4
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/form/index.js +1 -2
- package/build-module/form/index.js.map +1 -1
- package/build-module/form/view.js +10 -5
- package/build-module/form/view.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +2 -2
- package/build-module/list-item/hooks/use-merge.js.map +1 -1
- package/build-module/navigation/edit/deleted-navigation-warning.js +10 -3
- package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build-module/navigation-link/edit.js +1 -2
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +3 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/pattern/recursion-detector.js +0 -1
- package/build-module/pattern/recursion-detector.js.map +1 -1
- package/build-module/query/edit/index.js +1 -1
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +0 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +0 -1
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +0 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/{pattern-selection-modal.js → pattern-selection.js} +53 -36
- package/build-module/query/edit/pattern-selection.js.map +1 -0
- package/build-module/query/edit/query-content.js +5 -8
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +6 -12
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +31 -13
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/separator/deprecated.js +2 -1
- package/build-module/separator/deprecated.js.map +1 -1
- package/build-module/separator/edit.js +32 -7
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/separator/index.js +5 -0
- package/build-module/separator/index.js.map +1 -1
- package/build-module/separator/save.js +3 -2
- package/build-module/separator/save.js.map +1 -1
- package/build-module/social-link/edit.js +37 -3
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +4 -2
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/template-part/edit/import-controls.js +0 -1
- package/build-module/template-part/edit/import-controls.js.map +1 -1
- package/build-style/button/style-rtl.css +3 -3
- package/build-style/button/style.css +3 -3
- package/build-style/comments/editor-rtl.css +1 -1
- package/build-style/comments/editor.css +1 -1
- package/build-style/comments/style-rtl.css +1 -1
- package/build-style/comments/style.css +1 -1
- package/build-style/comments-pagination/editor-rtl.css +1 -0
- package/build-style/comments-pagination/editor.css +1 -0
- package/build-style/comments-pagination/style-rtl.css +1 -0
- package/build-style/comments-pagination/style.css +1 -0
- package/build-style/common-rtl.css +17 -17
- package/build-style/common.css +17 -17
- package/build-style/editor-rtl.css +76 -41
- package/build-style/editor.css +76 -41
- package/build-style/gallery/style-rtl.css +2 -2
- package/build-style/gallery/style.css +2 -2
- package/build-style/heading/style-rtl.css +11 -11
- package/build-style/heading/style.css +11 -11
- package/build-style/image/style-rtl.css +4 -3
- package/build-style/image/style.css +4 -3
- package/build-style/latest-comments/style-rtl.css +4 -4
- package/build-style/latest-comments/style.css +4 -4
- package/build-style/latest-posts/style-rtl.css +2 -1
- package/build-style/latest-posts/style.css +2 -1
- package/build-style/more/editor-rtl.css +1 -1
- package/build-style/more/editor.css +1 -1
- package/build-style/nextpage/editor-rtl.css +1 -1
- package/build-style/nextpage/editor.css +1 -1
- package/build-style/post-comments-form/style-rtl.css +2 -2
- package/build-style/post-comments-form/style.css +2 -2
- package/build-style/post-featured-image/editor-rtl.css +27 -27
- package/build-style/post-featured-image/editor.css +27 -27
- package/build-style/pullquote/style-rtl.css +1 -0
- package/build-style/pullquote/style.css +1 -0
- package/build-style/query/editor-rtl.css +30 -0
- package/build-style/query/editor.css +30 -0
- package/build-style/read-more/style-rtl.css +2 -2
- package/build-style/read-more/style.css +2 -2
- package/build-style/social-link/editor-rtl.css +6 -2
- package/build-style/social-link/editor.css +6 -2
- package/build-style/social-links/editor-rtl.css +2 -2
- package/build-style/social-links/editor.css +2 -2
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/style-rtl.css +55 -51
- package/build-style/style.css +55 -51
- package/build-style/text-columns/style-rtl.css +3 -3
- package/build-style/text-columns/style.css +3 -3
- package/build-types/lock-unlock.d.ts +1 -1
- package/build-types/lock-unlock.d.ts.map +1 -1
- package/package.json +35 -34
- package/src/block/edit.js +6 -51
- package/src/comments-pagination/editor.scss +1 -0
- package/src/comments-pagination/style.scss +1 -0
- package/src/cover/edit/index.js +4 -1
- package/src/cover/edit/inspector-controls.js +10 -3
- package/src/cover/index.php +2 -2
- package/src/form/block.json +1 -2
- package/src/form/index.php +1 -20
- package/src/form/view.js +18 -5
- package/src/image/style.scss +4 -3
- package/src/latest-posts/style.scss +2 -1
- package/src/list-item/hooks/use-merge.js +2 -2
- package/src/missing/test/edit.native.js +0 -1
- package/src/navigation/README.md +1 -0
- package/src/navigation/edit/deleted-navigation-warning.js +11 -2
- package/src/navigation/index.php +9 -35
- package/src/navigation-link/edit.js +0 -6
- package/src/navigation-submenu/edit.js +5 -6
- package/src/navigation-submenu/index.php +17 -1
- package/src/pullquote/style.scss +1 -0
- package/src/query/edit/index.js +1 -1
- package/src/query/edit/{pattern-selection-modal.js → pattern-selection.js} +53 -33
- package/src/query/edit/query-content.js +4 -10
- package/src/query/edit/query-placeholder.js +5 -14
- package/src/query/edit/query-toolbar.js +38 -17
- package/src/query/editor.scss +30 -0
- package/src/search/index.php +3 -3
- package/src/separator/block.json +5 -0
- package/src/separator/deprecated.js +1 -0
- package/src/separator/edit.js +28 -3
- package/src/separator/save.js +2 -2
- package/src/separator/test/edit.js +1 -0
- package/src/social-link/block.json +4 -2
- package/src/social-link/edit.js +40 -0
- package/src/social-link/editor.scss +5 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/query/edit/pattern-selection-modal.js.map +0 -1
- package/build-module/query/edit/pattern-selection-modal.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["separator","icon","initBlock","edit","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","opacity","type","supports","anchor","align","color","enableContrastChecker","__experimentalSkipSerialization","gradients","background","text","__experimentalDefaultControls","spacing","margin","interactivity","clientNavigation","styles","label","isDefault","editorStyle","style","save","transforms","deprecated","settings","example","customColor","className","init"],"sources":["@wordpress/block-library/src/separator/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { separator as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomColor: '#065174',\n\t\t\tclassName: 'is-style-wide',\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,IAAI,QAAQ,kBAAkB;;AAEpD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAA;IAAA;EAAA;
|
|
1
|
+
{"version":3,"names":["separator","icon","initBlock","edit","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","opacity","type","tagName","supports","anchor","align","color","enableContrastChecker","__experimentalSkipSerialization","gradients","background","text","__experimentalDefaultControls","spacing","margin","interactivity","clientNavigation","styles","label","isDefault","editorStyle","style","save","transforms","deprecated","settings","example","customColor","className","init"],"sources":["@wordpress/block-library/src/separator/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { separator as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomColor: '#065174',\n\t\t\tclassName: 'is-style-wide',\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,IAAI,QAAQ,kBAAkB;;AAEpD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAD,IAAA;MAAA;MAAA;IAAA;EAAA;EAAAE,QAAA;IAAAC,MAAA;IAAAC,KAAA;IAAAC,KAAA;MAAAC,qBAAA;MAAAC,+BAAA;MAAAC,SAAA;MAAAC,UAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAF,UAAA;MAAA;IAAA;IAAAG,OAAA;MAAAC,MAAA;IAAA;IAAAC,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,MAAA;IAAAxB,IAAA;IAAAyB,KAAA;IAAAC,SAAA;EAAA;IAAA1B,IAAA;IAAAyB,KAAA;EAAA;IAAAzB,IAAA;IAAAyB,KAAA;EAAA;EAAAE,WAAA;EAAAC,KAAA;AAAA;AAE1B,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;EAAE/B;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMgC,QAAQ,GAAG;EACvBtC,IAAI;EACJuC,OAAO,EAAE;IACR3B,UAAU,EAAE;MACX4B,WAAW,EAAE,SAAS;MACtBC,SAAS,EAAE;IACZ;EACD,CAAC;EACDL,UAAU;EACVlC,IAAI;EACJiC,IAAI;EACJE;AACD,CAAC;AAED,OAAO,MAAMK,IAAI,GAAGA,CAAA,KAAMzC,SAAS,CAAE;EAAEK,IAAI;EAAEH,QAAQ;EAAEmC;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -14,7 +14,8 @@ export default function separatorSave({
|
|
|
14
14
|
const {
|
|
15
15
|
backgroundColor,
|
|
16
16
|
style,
|
|
17
|
-
opacity
|
|
17
|
+
opacity,
|
|
18
|
+
tagName: Tag
|
|
18
19
|
} = attributes;
|
|
19
20
|
const customColor = style?.color?.background;
|
|
20
21
|
const colorProps = getColorClassesAndStyles(attributes);
|
|
@@ -34,7 +35,7 @@ export default function separatorSave({
|
|
|
34
35
|
backgroundColor: colorProps?.style?.backgroundColor,
|
|
35
36
|
color: colorClass ? undefined : customColor
|
|
36
37
|
};
|
|
37
|
-
return /*#__PURE__*/_jsx(
|
|
38
|
+
return /*#__PURE__*/_jsx(Tag, {
|
|
38
39
|
...useBlockProps.save({
|
|
39
40
|
className,
|
|
40
41
|
style: styles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","getColorClassName","useBlockProps","__experimentalGetColorClassesAndStyles","getColorClassesAndStyles","jsx","_jsx","separatorSave","attributes","backgroundColor","style","opacity","customColor","color","background","colorProps","colorClass","className","styles","undefined","save"],"sources":["@wordpress/block-library/src/separator/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tuseBlockProps,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n} from '@wordpress/block-editor';\n\nexport default function separatorSave( { attributes } ) {\n\tconst { backgroundColor, style, opacity } = attributes;\n\tconst customColor = style?.color?.background;\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\t// The hr support changing color using border-color, since border-color\n\t// is not yet supported in the color palette, we use background-color.\n\n\t// The dots styles uses text for the dots, to change those dots color is\n\t// using color, not backgroundColor.\n\tconst colorClass = getColorClassName( 'color', backgroundColor );\n\n\tconst className = clsx(\n\t\t{\n\t\t\t'has-text-color': backgroundColor || customColor,\n\t\t\t[ colorClass ]: colorClass,\n\t\t\t'has-css-opacity': opacity === 'css',\n\t\t\t'has-alpha-channel-opacity': opacity === 'alpha-channel',\n\t\t},\n\t\tcolorProps.className\n\t);\n\n\tconst styles = {\n\t\tbackgroundColor: colorProps?.style?.backgroundColor,\n\t\tcolor: colorClass ? undefined : customColor,\n\t};\n\treturn <
|
|
1
|
+
{"version":3,"names":["clsx","getColorClassName","useBlockProps","__experimentalGetColorClassesAndStyles","getColorClassesAndStyles","jsx","_jsx","separatorSave","attributes","backgroundColor","style","opacity","tagName","Tag","customColor","color","background","colorProps","colorClass","className","styles","undefined","save"],"sources":["@wordpress/block-library/src/separator/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tuseBlockProps,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n} from '@wordpress/block-editor';\n\nexport default function separatorSave( { attributes } ) {\n\tconst { backgroundColor, style, opacity, tagName: Tag } = attributes;\n\tconst customColor = style?.color?.background;\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\t// The hr support changing color using border-color, since border-color\n\t// is not yet supported in the color palette, we use background-color.\n\n\t// The dots styles uses text for the dots, to change those dots color is\n\t// using color, not backgroundColor.\n\tconst colorClass = getColorClassName( 'color', backgroundColor );\n\n\tconst className = clsx(\n\t\t{\n\t\t\t'has-text-color': backgroundColor || customColor,\n\t\t\t[ colorClass ]: colorClass,\n\t\t\t'has-css-opacity': opacity === 'css',\n\t\t\t'has-alpha-channel-opacity': opacity === 'alpha-channel',\n\t\t},\n\t\tcolorProps.className\n\t);\n\n\tconst styles = {\n\t\tbackgroundColor: colorProps?.style?.backgroundColor,\n\t\tcolor: colorClass ? undefined : customColor,\n\t};\n\treturn <Tag { ...useBlockProps.save( { className, style: styles } ) } />;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,iBAAiB,EACjBC,aAAa,EACbC,sCAAsC,IAAIC,wBAAwB,QAC5D,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjC,eAAe,SAASC,aAAaA,CAAE;EAAEC;AAAW,CAAC,EAAG;EACvD,MAAM;IAAEC,eAAe;IAAEC,KAAK;IAAEC,OAAO;IAAEC,OAAO,EAAEC;EAAI,CAAC,GAAGL,UAAU;EACpE,MAAMM,WAAW,GAAGJ,KAAK,EAAEK,KAAK,EAAEC,UAAU;EAC5C,MAAMC,UAAU,GAAGb,wBAAwB,CAAEI,UAAW,CAAC;EACzD;EACA;;EAEA;EACA;EACA,MAAMU,UAAU,GAAGjB,iBAAiB,CAAE,OAAO,EAAEQ,eAAgB,CAAC;EAEhE,MAAMU,SAAS,GAAGnB,IAAI,CACrB;IACC,gBAAgB,EAAES,eAAe,IAAIK,WAAW;IAChD,CAAEI,UAAU,GAAIA,UAAU;IAC1B,iBAAiB,EAAEP,OAAO,KAAK,KAAK;IACpC,2BAA2B,EAAEA,OAAO,KAAK;EAC1C,CAAC,EACDM,UAAU,CAACE,SACZ,CAAC;EAED,MAAMC,MAAM,GAAG;IACdX,eAAe,EAAEQ,UAAU,EAAEP,KAAK,EAAED,eAAe;IACnDM,KAAK,EAAEG,UAAU,GAAGG,SAAS,GAAGP;EACjC,CAAC;EACD,oBAAOR,IAAA,CAACO,GAAG;IAAA,GAAMX,aAAa,CAACoB,IAAI,CAAE;MAAEH,SAAS;MAAET,KAAK,EAAEU;IAAO,CAAE;EAAC,CAAI,CAAC;AACzE","ignoreList":[]}
|
|
@@ -8,9 +8,9 @@ import clsx from 'clsx';
|
|
|
8
8
|
*/
|
|
9
9
|
import { DELETE, BACKSPACE, ENTER } from '@wordpress/keycodes';
|
|
10
10
|
import { useDispatch } from '@wordpress/data';
|
|
11
|
-
import { InspectorControls, URLPopover, URLInput, useBlockProps, store as blockEditorStore } from '@wordpress/block-editor';
|
|
11
|
+
import { BlockControls, InspectorControls, URLPopover, URLInput, useBlockEditingMode, useBlockProps, store as blockEditorStore } from '@wordpress/block-editor';
|
|
12
12
|
import { useState, useRef } from '@wordpress/element';
|
|
13
|
-
import { Button, PanelBody, PanelRow, TextControl, __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper } from '@wordpress/components';
|
|
13
|
+
import { Button, Dropdown, PanelBody, PanelRow, TextControl, ToolbarButton, __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper } from '@wordpress/components';
|
|
14
14
|
import { useMergeRefs } from '@wordpress/compose';
|
|
15
15
|
import { __ } from '@wordpress/i18n';
|
|
16
16
|
import { keyboardReturn } from '@wordpress/icons';
|
|
@@ -108,6 +108,7 @@ const SocialLinkEdit = ({
|
|
|
108
108
|
// Use internal state instead of a ref to make sure that the component
|
|
109
109
|
// re-renders when the popover's anchor updates.
|
|
110
110
|
const [popoverAnchor, setPopoverAnchor] = useState(null);
|
|
111
|
+
const isContentOnlyMode = useBlockEditingMode() === 'contentOnly';
|
|
111
112
|
const IconComponent = getIconBySite(service);
|
|
112
113
|
const socialLinkName = getNameBySite(service);
|
|
113
114
|
// The initial label (ie. the link text) is an empty string.
|
|
@@ -128,7 +129,40 @@ const SocialLinkEdit = ({
|
|
|
128
129
|
}
|
|
129
130
|
});
|
|
130
131
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
131
|
-
children: [
|
|
132
|
+
children: [isContentOnlyMode && showLabels &&
|
|
133
|
+
/*#__PURE__*/
|
|
134
|
+
// Add an extra control to modify the label attribute when content only mode is active.
|
|
135
|
+
// With content only mode active, the inspector is hidden, so users need another way
|
|
136
|
+
// to edit this attribute.
|
|
137
|
+
_jsx(BlockControls, {
|
|
138
|
+
group: "other",
|
|
139
|
+
children: /*#__PURE__*/_jsx(Dropdown, {
|
|
140
|
+
popoverProps: {
|
|
141
|
+
position: 'bottom right'
|
|
142
|
+
},
|
|
143
|
+
renderToggle: ({
|
|
144
|
+
isOpen,
|
|
145
|
+
onToggle
|
|
146
|
+
}) => /*#__PURE__*/_jsx(ToolbarButton, {
|
|
147
|
+
onClick: onToggle,
|
|
148
|
+
"aria-haspopup": "true",
|
|
149
|
+
"aria-expanded": isOpen,
|
|
150
|
+
children: __('Text')
|
|
151
|
+
}),
|
|
152
|
+
renderContent: () => /*#__PURE__*/_jsx(TextControl, {
|
|
153
|
+
__next40pxDefaultSize: true,
|
|
154
|
+
__nextHasNoMarginBottom: true,
|
|
155
|
+
className: "wp-block-social-link__toolbar_content_text",
|
|
156
|
+
label: __('Text'),
|
|
157
|
+
help: __('Provide a text label or use the default.'),
|
|
158
|
+
value: label,
|
|
159
|
+
onChange: value => setAttributes({
|
|
160
|
+
label: value
|
|
161
|
+
}),
|
|
162
|
+
placeholder: socialLinkName
|
|
163
|
+
})
|
|
164
|
+
})
|
|
165
|
+
}), /*#__PURE__*/_jsx(InspectorControls, {
|
|
132
166
|
children: /*#__PURE__*/_jsx(PanelBody, {
|
|
133
167
|
title: __('Settings'),
|
|
134
168
|
children: /*#__PURE__*/_jsx(PanelRow, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","DELETE","BACKSPACE","ENTER","useDispatch","InspectorControls","URLPopover","URLInput","useBlockProps","store","blockEditorStore","useState","useRef","Button","PanelBody","PanelRow","TextControl","__experimentalInputControlSuffixWrapper","InputControlSuffixWrapper","useMergeRefs","__","keyboardReturn","getIconBySite","getNameBySite","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","anchor","onClose","focus","children","className","onSubmit","event","preventDefault","value","onChange","nextURL","placeholder","label","hideLabelFromVision","disableSuggestions","onKeyDown","defaultPrevented","includes","keyCode","suffix","variant","icon","type","size","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","wrapperClasses","setPopoverAnchor","IconComponent","socialLinkName","socialLinkText","trim","ref","blockProps","onClick","title","__next40pxDefaultSize","__nextHasNoMarginBottom","help","group","role","style","color","backgroundColor"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE, ENTER } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n} from '@wordpress/components';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\taria-label={ __( 'Edit social link' ) }\n\t\t\tonClose={ () => {\n\t\t\t\tsetPopover( false );\n\t\t\t\tpopoverAnchor?.focus();\n\t\t\t} }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t\tpopoverAnchor?.focus();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter social link' ) }\n\t\t\t\t\t\tlabel={ __( 'Enter social link' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label = '', rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst wrapperClasses = clsx(\n\t\t'wp-social-link',\n\t\t// Manually adding this class for backwards compatibility of CSS when moving the\n\t\t// blockProps from the li to the button: https://github.com/WordPress/gutenberg/pull/64883\n\t\t'wp-block-social-link',\n\t\t'wp-social-link-' + service,\n\t\t{\n\t\t\t'wp-social-link__is-incomplete': ! url,\n\t\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\t\ticonBackgroundColor,\n\t\t}\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\t// The initial label (ie. the link text) is an empty string.\n\t// We want to prevent empty links so that the link text always fallbacks to\n\t// the social name, even when users enter and save an empty string or only\n\t// spaces. The PHP render callback fallbacks to the social name as well.\n\tconst socialLinkText = label.trim() === '' ? socialLinkName : label;\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( {\n\t\tclassName: 'wp-block-social-link-anchor',\n\t\tref: useMergeRefs( [ setPopoverAnchor, ref ] ),\n\t\tonClick: () => setPopover( true ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.keyCode === ENTER ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetPopover( true );\n\t\t\t}\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'The text is visible when enabled from the parent Social Icons block.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder={ socialLinkName }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t{ /*\n\t\t\t * Because the `<ul>` element has a role=document, the `<li>` is\n\t\t\t * not semantically correct, so adding role=presentation is cleaner.\n\t\t\t * https://github.com/WordPress/gutenberg/pull/64883#issuecomment-2472874551\n\t\t\t */ }\n\t\t\t<li\n\t\t\t\trole=\"presentation\"\n\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: iconColorValue,\n\t\t\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ /*\n\t\t\t\t * Disable reason: The `button` ARIA role is redundant but\n\t\t\t\t * blockProps has a role of `document` automatically applied\n\t\t\t\t * which breaks the semantics of this button since it removes\n\t\t\t\t * the information about the popover.\n\t\t\t\t */\n\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t<button aria-haspopup=\"dialog\" { ...blockProps } role=\"button\">\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ clsx( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkText }\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</li>\n\t\t</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;A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Ae;QAC/BC,UAAU,EAAGA,UAAY;QACzBC,aAAa,EAAGA,aAAe;QAC/BC,QAAQ,EAAGA;MAAU,CACrB,CACD;IAAA,CACE,CAAC;EAAA,CACJ,CAAC;AAEL,CAAC;AAED,eAAe0B,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","DELETE","BACKSPACE","ENTER","useDispatch","BlockControls","InspectorControls","URLPopover","URLInput","useBlockEditingMode","useBlockProps","store","blockEditorStore","useState","useRef","Button","Dropdown","PanelBody","PanelRow","TextControl","ToolbarButton","__experimentalInputControlSuffixWrapper","InputControlSuffixWrapper","useMergeRefs","__","keyboardReturn","getIconBySite","getNameBySite","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","anchor","onClose","focus","children","className","onSubmit","event","preventDefault","value","onChange","nextURL","placeholder","label","hideLabelFromVision","disableSuggestions","onKeyDown","defaultPrevented","includes","keyCode","suffix","variant","icon","type","size","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","wrapperClasses","setPopoverAnchor","isContentOnlyMode","IconComponent","socialLinkName","socialLinkText","trim","ref","blockProps","onClick","group","popoverProps","position","renderToggle","isOpen","onToggle","renderContent","__next40pxDefaultSize","__nextHasNoMarginBottom","help","title","role","style","color","backgroundColor"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE, ENTER } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockEditingMode,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tButton,\n\tDropdown,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n\tToolbarButton,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n} from '@wordpress/components';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\taria-label={ __( 'Edit social link' ) }\n\t\t\tonClose={ () => {\n\t\t\t\tsetPopover( false );\n\t\t\t\tpopoverAnchor?.focus();\n\t\t\t} }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t\tpopoverAnchor?.focus();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter social link' ) }\n\t\t\t\t\t\tlabel={ __( 'Enter social link' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label = '', rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst wrapperClasses = clsx(\n\t\t'wp-social-link',\n\t\t// Manually adding this class for backwards compatibility of CSS when moving the\n\t\t// blockProps from the li to the button: https://github.com/WordPress/gutenberg/pull/64883\n\t\t'wp-block-social-link',\n\t\t'wp-social-link-' + service,\n\t\t{\n\t\t\t'wp-social-link__is-incomplete': ! url,\n\t\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\t\ticonBackgroundColor,\n\t\t}\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst isContentOnlyMode = useBlockEditingMode() === 'contentOnly';\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\t// The initial label (ie. the link text) is an empty string.\n\t// We want to prevent empty links so that the link text always fallbacks to\n\t// the social name, even when users enter and save an empty string or only\n\t// spaces. The PHP render callback fallbacks to the social name as well.\n\tconst socialLinkText = label.trim() === '' ? socialLinkName : label;\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( {\n\t\tclassName: 'wp-block-social-link-anchor',\n\t\tref: useMergeRefs( [ setPopoverAnchor, ref ] ),\n\t\tonClick: () => setPopover( true ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.keyCode === ENTER ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetPopover( true );\n\t\t\t}\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t{ isContentOnlyMode && showLabels && (\n\t\t\t\t// Add an extra control to modify the label attribute when content only mode is active.\n\t\t\t\t// With content only mode active, the inspector is hidden, so users need another way\n\t\t\t\t// to edit this attribute.\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ { position: 'bottom right' } }\n\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Text' ) }\n\t\t\t\t\t\t\t</ToolbarButton>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tclassName=\"wp-block-social-link__toolbar_content_text\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Provide a text label or use the default.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tplaceholder={ socialLinkName }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'The text is visible when enabled from the parent Social Icons block.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder={ socialLinkName }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t{ /*\n\t\t\t * Because the `<ul>` element has a role=document, the `<li>` is\n\t\t\t * not semantically correct, so adding role=presentation is cleaner.\n\t\t\t * https://github.com/WordPress/gutenberg/pull/64883#issuecomment-2472874551\n\t\t\t */ }\n\t\t\t<li\n\t\t\t\trole=\"presentation\"\n\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: iconColorValue,\n\t\t\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ /*\n\t\t\t\t * Disable reason: The `button` ARIA role is redundant but\n\t\t\t\t * blockProps has a role of `document` automatically applied\n\t\t\t\t * which breaks the semantics of this button since it removes\n\t\t\t\t * the information about the popover.\n\t\t\t\t */\n\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t<button aria-haspopup=\"dialog\" { ...blockProps } role=\"button\">\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ clsx( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkText }\n\t\t\t\t\t</span>\n\t\t\t\t</button>\n\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</li>\n\t\t</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,MAAM,EAAEC,SAAS,EAAEC,KAAK,QAAQ,qBAAqB;AAC9D,SAASC,WAAW,QAAQ,iBAAiB;AAE7C,SACCC,aAAa,EACbC,iBAAiB,EACjBC,U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B1C,KAAK,EAAG7B,EAAE,CAAE,UAAW,CAAG;QAC1ByB,KAAK,EAAGqB,GAAG,IAAI,EAAI;QACnBpB,QAAQ,EAAKD,KAAK,IAAMb,aAAa,CAAE;UAAEkC,GAAG,EAAErB;QAAM,CAAE;MAAG,CACzD;IAAC,CACgB,CAAC,eAMpBlB,KAAA;MACCmE,IAAI,EAAC,cAAc;MACnBrD,SAAS,EAAGgC,cAAgB;MAC5BsB,KAAK,EAAG;QACPC,KAAK,EAAE3B,cAAc;QACrB4B,eAAe,EAAE1B;MAClB,CAAG;MAAA/B,QAAA,gBASHb,KAAA;QAAQ,iBAAc,QAAQ;QAAA,GAAMsD,UAAU;QAAGa,IAAI,EAAC,QAAQ;QAAAtD,QAAA,gBAC7Df,IAAA,CAACmD,aAAa,IAAE,CAAC,eACjBnD,IAAA;UACCgB,SAAS,EAAG7C,IAAI,CAAE,4BAA4B,EAAE;YAC/C,oBAAoB,EAAE,CAAEuE;UACzB,CAAE,CAAG;UAAA3B,QAAA,EAEHsC;QAAc,CACX,CAAC;MAAA,CACA,CAAC,EAEPd,UAAU,IAAIQ,cAAc,iBAC7B/C,IAAA,CAACK,oBAAoB;QACpBC,GAAG,EAAGA,GAAK;QACXC,aAAa,EAAGA,aAAe;QAC/BC,UAAU,EAAGA,UAAY;QACzBC,aAAa,EAAGA,aAAe;QAC/BC,QAAQ,EAAGA;MAAU,CACrB,CACD;IAAA,CACE,CAAC;EAAA,CACJ,CAAC;AAEL,CAAC;AAED,eAAe0B,cAAc","ignoreList":[]}
|
|
@@ -19,13 +19,15 @@ const metadata = {
|
|
|
19
19
|
textdomain: "default",
|
|
20
20
|
attributes: {
|
|
21
21
|
url: {
|
|
22
|
-
type: "string"
|
|
22
|
+
type: "string",
|
|
23
|
+
role: "content"
|
|
23
24
|
},
|
|
24
25
|
service: {
|
|
25
26
|
type: "string"
|
|
26
27
|
},
|
|
27
28
|
label: {
|
|
28
|
-
type: "string"
|
|
29
|
+
type: "string",
|
|
30
|
+
role: "content"
|
|
29
31
|
},
|
|
30
32
|
rel: {
|
|
31
33
|
type: "string"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["share","icon","initBlock","edit","metadata","$schema","apiVersion","name","title","category","parent","description","textdomain","attributes","url","type","service","label","rel","usesContext","supports","reusable","html","interactivity","clientNavigation","editorStyle","variations","settings","init"],"sources":["@wordpress/block-library/src/social-link/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { share as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAI,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,GAAA;MAAAC,IAAA;IAAA;IAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["share","icon","initBlock","edit","metadata","$schema","apiVersion","name","title","category","parent","description","textdomain","attributes","url","type","role","service","label","rel","usesContext","supports","reusable","html","interactivity","clientNavigation","editorStyle","variations","settings","init"],"sources":["@wordpress/block-library/src/social-link/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { share as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAI,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,GAAA;MAAAC,IAAA;MAAAC,IAAA;IAAA;IAAAC,OAAA;MAAAF,IAAA;IAAA;IAAAG,KAAA;MAAAH,IAAA;MAAAC,IAAA;IAAA;IAAAG,GAAA;MAAAJ,IAAA;IAAA;EAAA;EAAAK,WAAA;EAAAC,QAAA;IAAAC,QAAA;IAAAC,IAAA;IAAAC,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,WAAA;AAAA;AAE1B,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;EAAEpB;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMqB,QAAQ,GAAG;EACvB3B,IAAI;EACJE,IAAI;EACJwB;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAM3B,SAAS,CAAE;EAAEK,IAAI;EAAEH,QAAQ;EAAEwB;AAAS,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","_x","sprintf","useMemo","useState","useDispatch","useSelect","useRegistry","Button","FlexBlock","FlexItem","SelectControl","__experimentalHStack","HStack","__experimentalSpacer","Spacer","store","coreStore","noticesStore","useCreateTemplatePartFromBlocks","transformWidgetToBlock","jsx","_jsx","jsxs","_jsxs","SIDEBARS_QUERY","per_page","_fields","TemplatePartImportControls","area","setAttributes","selectedSidebar","setSelectedSidebar","isBusy","setIsBusy","registry","sidebars","hasResolved","select","getSidebars","hasFinishedResolution","createErrorNotice","createFromBlocks","options","sidebarOptions","filter","widgetArea","id","widgets","length","map","value","label","name","marginBottom","createFromWidgets","event","preventDefault","sidebar","find","getWidgets","resolveSelect","_embed","skippedWidgets","Set","blocks","flatMap","widget","block","add","id_base","size","Array","from","join","type","children","as","onSubmit","onChange","disabled","__next40pxDefaultSize","__nextHasNoMarginBottom","style","marginTop","variant"],"sources":["@wordpress/block-library/src/template-part/edit/import-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport {\n\tButton,\n\tFlexBlock,\n\tFlexItem,\n\tSelectControl,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { useCreateTemplatePartFromBlocks } from './utils/hooks';\nimport { transformWidgetToBlock } from './utils/transformers';\n\nconst SIDEBARS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,description,status,widgets',\n};\n\nexport function TemplatePartImportControls( { area, setAttributes } ) {\n\tconst [ selectedSidebar, setSelectedSidebar ] = useState( '' );\n\tconst [ isBusy, setIsBusy ] = useState( false );\n\n\tconst registry = useRegistry();\n\tconst { sidebars, hasResolved } = useSelect( ( select ) => {\n\t\tconst { getSidebars, hasFinishedResolution } = select( coreStore );\n\n\t\treturn {\n\t\t\tsidebars: getSidebars( SIDEBARS_QUERY ),\n\t\t\thasResolved: hasFinishedResolution( 'getSidebars', [\n\t\t\t\tSIDEBARS_QUERY,\n\t\t\t] ),\n\t\t};\n\t}, [] );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tconst createFromBlocks = useCreateTemplatePartFromBlocks(\n\t\tarea,\n\t\tsetAttributes\n\t);\n\n\tconst options = useMemo( () => {\n\t\tconst sidebarOptions = ( sidebars ?? [] )\n\t\t\t.filter(\n\t\t\t\t( widgetArea ) =>\n\t\t\t\t\twidgetArea.id !== 'wp_inactive_widgets' &&\n\t\t\t\t\twidgetArea.widgets.length > 0\n\t\t\t)\n\t\t\t.map( ( widgetArea ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: widgetArea.id,\n\t\t\t\t\tlabel: widgetArea.name,\n\t\t\t\t};\n\t\t\t} );\n\n\t\tif ( ! sidebarOptions.length ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{ value: '', label: __( 'Select widget area' ) },\n\t\t\t...sidebarOptions,\n\t\t];\n\t}, [ sidebars ] );\n\n\t// Render an empty node while data is loading to avoid SlotFill re-positioning bug.\n\t// See: https://github.com/WordPress/gutenberg/issues/15641.\n\tif ( ! hasResolved ) {\n\t\treturn <Spacer marginBottom=\"0\" />;\n\t}\n\n\tif ( hasResolved && ! options.length ) {\n\t\treturn null;\n\t}\n\n\tasync function createFromWidgets( event ) {\n\t\tevent.preventDefault();\n\n\t\tif ( isBusy || ! selectedSidebar ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsBusy( true );\n\n\t\tconst sidebar = options.find(\n\t\t\t( { value } ) => value === selectedSidebar\n\t\t);\n\t\tconst { getWidgets } = registry.resolveSelect( coreStore );\n\n\t\t// The widgets API always returns a successful response.\n\t\tconst widgets = await getWidgets( {\n\t\t\tsidebar: sidebar.value,\n\t\t\t_embed: 'about',\n\t\t} );\n\n\t\tconst skippedWidgets = new Set();\n\t\tconst blocks = widgets.flatMap( ( widget ) => {\n\t\t\tconst block = transformWidgetToBlock( widget );\n\n\t\t\t// Skip the block if we have no matching transformations.\n\t\t\tif ( ! block ) {\n\t\t\t\tskippedWidgets.add( widget.id_base );\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn block;\n\t\t} );\n\n\t\tawait createFromBlocks(\n\t\t\tblocks,\n\t\t\t/* translators: %s: name of the widget area */\n\t\t\tsprintf( __( 'Widget area: %s' ), sidebar.label )\n\t\t);\n\n\t\tif ( skippedWidgets.size ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: the list of widgets */\n\t\t\t\t\t__( 'Unable to import the following widgets: %s.' ),\n\t\t\t\t\tArray.from( skippedWidgets ).join( ', ' )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tsetIsBusy( false );\n\t}\n\n\treturn (\n\t\t<Spacer marginBottom=\"4\">\n\t\t\t<HStack as=\"form\" onSubmit={ createFromWidgets }>\n\t\t\t\t<FlexBlock>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Import widget area' ) }\n\t\t\t\t\t\tvalue={ selectedSidebar }\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tonChange={ ( value ) => setSelectedSidebar( value ) }\n\t\t\t\t\t\tdisabled={ ! options.length }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t</FlexBlock>\n\t\t\t\t<FlexItem\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tmarginBottom: '8px',\n\t\t\t\t\t\tmarginTop: 'auto',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\taria-disabled={ isBusy || ! selectedSidebar }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ _x( 'Import', 'button label' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</Spacer>\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["__","_x","sprintf","useMemo","useState","useDispatch","useSelect","useRegistry","Button","FlexBlock","FlexItem","SelectControl","__experimentalHStack","HStack","__experimentalSpacer","Spacer","store","coreStore","noticesStore","useCreateTemplatePartFromBlocks","transformWidgetToBlock","jsx","_jsx","jsxs","_jsxs","SIDEBARS_QUERY","per_page","_fields","TemplatePartImportControls","area","setAttributes","selectedSidebar","setSelectedSidebar","isBusy","setIsBusy","registry","sidebars","hasResolved","select","getSidebars","hasFinishedResolution","createErrorNotice","createFromBlocks","options","sidebarOptions","filter","widgetArea","id","widgets","length","map","value","label","name","marginBottom","createFromWidgets","event","preventDefault","sidebar","find","getWidgets","resolveSelect","_embed","skippedWidgets","Set","blocks","flatMap","widget","block","add","id_base","size","Array","from","join","type","children","as","onSubmit","onChange","disabled","__next40pxDefaultSize","__nextHasNoMarginBottom","style","marginTop","variant"],"sources":["@wordpress/block-library/src/template-part/edit/import-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport {\n\tButton,\n\tFlexBlock,\n\tFlexItem,\n\tSelectControl,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { useCreateTemplatePartFromBlocks } from './utils/hooks';\nimport { transformWidgetToBlock } from './utils/transformers';\n\nconst SIDEBARS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,description,status,widgets',\n};\n\nexport function TemplatePartImportControls( { area, setAttributes } ) {\n\tconst [ selectedSidebar, setSelectedSidebar ] = useState( '' );\n\tconst [ isBusy, setIsBusy ] = useState( false );\n\n\tconst registry = useRegistry();\n\tconst { sidebars, hasResolved } = useSelect( ( select ) => {\n\t\tconst { getSidebars, hasFinishedResolution } = select( coreStore );\n\n\t\treturn {\n\t\t\tsidebars: getSidebars( SIDEBARS_QUERY ),\n\t\t\thasResolved: hasFinishedResolution( 'getSidebars', [\n\t\t\t\tSIDEBARS_QUERY,\n\t\t\t] ),\n\t\t};\n\t}, [] );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tconst createFromBlocks = useCreateTemplatePartFromBlocks(\n\t\tarea,\n\t\tsetAttributes\n\t);\n\n\tconst options = useMemo( () => {\n\t\tconst sidebarOptions = ( sidebars ?? [] )\n\t\t\t.filter(\n\t\t\t\t( widgetArea ) =>\n\t\t\t\t\twidgetArea.id !== 'wp_inactive_widgets' &&\n\t\t\t\t\twidgetArea.widgets.length > 0\n\t\t\t)\n\t\t\t.map( ( widgetArea ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: widgetArea.id,\n\t\t\t\t\tlabel: widgetArea.name,\n\t\t\t\t};\n\t\t\t} );\n\n\t\tif ( ! sidebarOptions.length ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{ value: '', label: __( 'Select widget area' ) },\n\t\t\t...sidebarOptions,\n\t\t];\n\t}, [ sidebars ] );\n\n\t// Render an empty node while data is loading to avoid SlotFill re-positioning bug.\n\t// See: https://github.com/WordPress/gutenberg/issues/15641.\n\tif ( ! hasResolved ) {\n\t\treturn <Spacer marginBottom=\"0\" />;\n\t}\n\n\tif ( hasResolved && ! options.length ) {\n\t\treturn null;\n\t}\n\n\tasync function createFromWidgets( event ) {\n\t\tevent.preventDefault();\n\n\t\tif ( isBusy || ! selectedSidebar ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsBusy( true );\n\n\t\tconst sidebar = options.find(\n\t\t\t( { value } ) => value === selectedSidebar\n\t\t);\n\t\tconst { getWidgets } = registry.resolveSelect( coreStore );\n\n\t\t// The widgets API always returns a successful response.\n\t\tconst widgets = await getWidgets( {\n\t\t\tsidebar: sidebar.value,\n\t\t\t_embed: 'about',\n\t\t} );\n\n\t\tconst skippedWidgets = new Set();\n\t\tconst blocks = widgets.flatMap( ( widget ) => {\n\t\t\tconst block = transformWidgetToBlock( widget );\n\n\t\t\t// Skip the block if we have no matching transformations.\n\t\t\tif ( ! block ) {\n\t\t\t\tskippedWidgets.add( widget.id_base );\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn block;\n\t\t} );\n\n\t\tawait createFromBlocks(\n\t\t\tblocks,\n\t\t\t/* translators: %s: name of the widget area */\n\t\t\tsprintf( __( 'Widget area: %s' ), sidebar.label )\n\t\t);\n\n\t\tif ( skippedWidgets.size ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: the list of widgets */\n\t\t\t\t\t__( 'Unable to import the following widgets: %s.' ),\n\t\t\t\t\tArray.from( skippedWidgets ).join( ', ' )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tsetIsBusy( false );\n\t}\n\n\treturn (\n\t\t<Spacer marginBottom=\"4\">\n\t\t\t<HStack as=\"form\" onSubmit={ createFromWidgets }>\n\t\t\t\t<FlexBlock>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Import widget area' ) }\n\t\t\t\t\t\tvalue={ selectedSidebar }\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tonChange={ ( value ) => setSelectedSidebar( value ) }\n\t\t\t\t\t\tdisabled={ ! options.length }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/>\n\t\t\t\t</FlexBlock>\n\t\t\t\t<FlexItem\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tmarginBottom: '8px',\n\t\t\t\t\t\tmarginTop: 'auto',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\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MAAM;IAACuC,YAAY,EAAC,GAAG;IAAAsB,QAAA,eACvBpD,KAAA,CAACX,MAAM;MAACgE,EAAE,EAAC,MAAM;MAACC,QAAQ,EAAGvB,iBAAmB;MAAAqB,QAAA,gBAC/CtD,IAAA,CAACb,SAAS;QAAAmE,QAAA,eACTtD,IAAA,CAACX,aAAa;UACbyC,KAAK,EAAGpD,EAAE,CAAE,oBAAqB,CAAG;UACpCmD,KAAK,EAAGpB,eAAiB;UACzBY,OAAO,EAAGA,OAAS;UACnBoC,QAAQ,EAAK5B,KAAK,IAAMnB,kBAAkB,CAAEmB,KAAM,CAAG;UACrD6B,QAAQ,EAAG,CAAErC,OAAO,CAACM,MAAQ;UAC7BgC,qBAAqB;UACrBC,uBAAuB;QAAA,CACvB;MAAC,CACQ,CAAC,eACZ5D,IAAA,CAACZ,QAAQ;QACRyE,KAAK,EAAG;UACP7B,YAAY,EAAE,KAAK;UACnB8B,SAAS,EAAE;QACZ,CAAG;QAAAR,QAAA,eAEHtD,IAAA,CAACd,MAAM;UACNyE,qBAAqB;UACrBI,OAAO,EAAC,SAAS;UACjBV,IAAI,EAAC,QAAQ;UACb1C,MAAM,EAAGA,MAAQ;UACjB,iBAAgBA,MAAM,IAAI,CAAEF,eAAiB;UAAA6C,QAAA,EAE3C3E,EAAE,CAAE,QAAQ,EAAE,cAAe;QAAC,CACzB;MAAC,CACA,CAAC;IAAA,CACJ;EAAC,CACF,CAAC;AAEX","ignoreList":[]}
|
|
@@ -136,13 +136,13 @@
|
|
|
136
136
|
font-size: inherit;
|
|
137
137
|
}
|
|
138
138
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-25 {
|
|
139
|
-
width: calc(25% -
|
|
139
|
+
width: calc(25% - var(--wp--style--block-gap, 0.5em) * 0.75);
|
|
140
140
|
}
|
|
141
141
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-50 {
|
|
142
|
-
width: calc(50% -
|
|
142
|
+
width: calc(50% - var(--wp--style--block-gap, 0.5em) * 0.5);
|
|
143
143
|
}
|
|
144
144
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-75 {
|
|
145
|
-
width: calc(75% -
|
|
145
|
+
width: calc(75% - var(--wp--style--block-gap, 0.5em) * 0.25);
|
|
146
146
|
}
|
|
147
147
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-100 {
|
|
148
148
|
width: 100%;
|
|
@@ -137,13 +137,13 @@
|
|
|
137
137
|
font-size: inherit;
|
|
138
138
|
}
|
|
139
139
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-25 {
|
|
140
|
-
width: calc(25% -
|
|
140
|
+
width: calc(25% - var(--wp--style--block-gap, 0.5em) * 0.75);
|
|
141
141
|
}
|
|
142
142
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-50 {
|
|
143
|
-
width: calc(50% -
|
|
143
|
+
width: calc(50% - var(--wp--style--block-gap, 0.5em) * 0.5);
|
|
144
144
|
}
|
|
145
145
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-75 {
|
|
146
|
-
width: calc(75% -
|
|
146
|
+
width: calc(75% - var(--wp--style--block-gap, 0.5em) * 0.25);
|
|
147
147
|
}
|
|
148
148
|
.wp-block-buttons > .wp-block-button.wp-block-button__width-100 {
|
|
149
149
|
width: 100%;
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
margin-top: 0.5em;
|
|
117
117
|
margin-right: 0.5em;
|
|
118
118
|
margin-bottom: 0.5em;
|
|
119
|
+
font-size: inherit;
|
|
119
120
|
}
|
|
120
121
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
121
122
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
/*rtl:ignore*/
|
|
118
118
|
margin-right: 0.5em;
|
|
119
119
|
margin-bottom: 0.5em;
|
|
120
|
+
font-size: inherit;
|
|
120
121
|
}
|
|
121
122
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
122
123
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
|
104
104
|
margin-right: 0.5em;
|
|
105
105
|
margin-bottom: 0.5em;
|
|
106
|
+
font-size: inherit;
|
|
106
107
|
}
|
|
107
108
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
108
109
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
/*rtl:ignore*/
|
|
105
105
|
margin-right: 0.5em;
|
|
106
106
|
margin-bottom: 0.5em;
|
|
107
|
+
font-size: inherit;
|
|
107
108
|
}
|
|
108
109
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
109
110
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
@@ -142,25 +142,25 @@
|
|
|
142
142
|
color: #313131;
|
|
143
143
|
}
|
|
144
144
|
:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background {
|
|
145
|
-
background: linear-gradient(-135deg,
|
|
145
|
+
background: linear-gradient(-135deg, rgb(0, 208, 132) 0%, rgb(6, 147, 227) 100%);
|
|
146
146
|
}
|
|
147
147
|
:root .has-purple-crush-gradient-background {
|
|
148
|
-
background: linear-gradient(-135deg,
|
|
148
|
+
background: linear-gradient(-135deg, rgb(52, 226, 228) 0%, rgb(71, 33, 251) 50%, rgb(171, 29, 254) 100%);
|
|
149
149
|
}
|
|
150
150
|
:root .has-hazy-dawn-gradient-background {
|
|
151
|
-
background: linear-gradient(-135deg,
|
|
151
|
+
background: linear-gradient(-135deg, rgb(250, 172, 168) 0%, rgb(218, 208, 236) 100%);
|
|
152
152
|
}
|
|
153
153
|
:root .has-subdued-olive-gradient-background {
|
|
154
|
-
background: linear-gradient(-135deg,
|
|
154
|
+
background: linear-gradient(-135deg, rgb(250, 250, 225) 0%, rgb(103, 166, 113) 100%);
|
|
155
155
|
}
|
|
156
156
|
:root .has-atomic-cream-gradient-background {
|
|
157
|
-
background: linear-gradient(-135deg,
|
|
157
|
+
background: linear-gradient(-135deg, rgb(253, 215, 154) 0%, rgb(0, 74, 89) 100%);
|
|
158
158
|
}
|
|
159
159
|
:root .has-nightshade-gradient-background {
|
|
160
|
-
background: linear-gradient(-135deg,
|
|
160
|
+
background: linear-gradient(-135deg, rgb(51, 9, 104) 0%, rgb(49, 205, 207) 100%);
|
|
161
161
|
}
|
|
162
162
|
:root .has-midnight-gradient-background {
|
|
163
|
-
background: linear-gradient(-135deg,
|
|
163
|
+
background: linear-gradient(-135deg, rgb(2, 3, 129) 0%, rgb(40, 116, 252) 100%);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
.has-regular-font-size {
|
|
@@ -258,46 +258,46 @@ html :where(.has-border-color) {
|
|
|
258
258
|
border-style: solid;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
html :where([style*=
|
|
261
|
+
html :where([style*=border-top-color]) {
|
|
262
262
|
border-top-style: solid;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
html :where([style*=
|
|
265
|
+
html :where([style*=border-right-color]) {
|
|
266
266
|
border-left-style: solid;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
html :where([style*=
|
|
269
|
+
html :where([style*=border-bottom-color]) {
|
|
270
270
|
border-bottom-style: solid;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
html :where([style*=
|
|
273
|
+
html :where([style*=border-left-color]) {
|
|
274
274
|
border-right-style: solid;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
html :where([style*=
|
|
277
|
+
html :where([style*=border-width]) {
|
|
278
278
|
border-style: solid;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
html :where([style*=
|
|
281
|
+
html :where([style*=border-top-width]) {
|
|
282
282
|
border-top-style: solid;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
html :where([style*=
|
|
285
|
+
html :where([style*=border-right-width]) {
|
|
286
286
|
border-left-style: solid;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
html :where([style*=
|
|
289
|
+
html :where([style*=border-bottom-width]) {
|
|
290
290
|
border-bottom-style: solid;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
html :where([style*=
|
|
293
|
+
html :where([style*=border-left-width]) {
|
|
294
294
|
border-right-style: solid;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
/**
|
|
298
298
|
* Provide baseline responsiveness for images.
|
|
299
299
|
*/
|
|
300
|
-
html :where(img[class*=
|
|
300
|
+
html :where(img[class*=wp-image-]) {
|
|
301
301
|
height: auto;
|
|
302
302
|
max-width: 100%;
|
|
303
303
|
}
|
package/build-style/common.css
CHANGED
|
@@ -142,25 +142,25 @@
|
|
|
142
142
|
color: #313131;
|
|
143
143
|
}
|
|
144
144
|
:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background {
|
|
145
|
-
background: linear-gradient(135deg,
|
|
145
|
+
background: linear-gradient(135deg, rgb(0, 208, 132) 0%, rgb(6, 147, 227) 100%);
|
|
146
146
|
}
|
|
147
147
|
:root .has-purple-crush-gradient-background {
|
|
148
|
-
background: linear-gradient(135deg,
|
|
148
|
+
background: linear-gradient(135deg, rgb(52, 226, 228) 0%, rgb(71, 33, 251) 50%, rgb(171, 29, 254) 100%);
|
|
149
149
|
}
|
|
150
150
|
:root .has-hazy-dawn-gradient-background {
|
|
151
|
-
background: linear-gradient(135deg,
|
|
151
|
+
background: linear-gradient(135deg, rgb(250, 172, 168) 0%, rgb(218, 208, 236) 100%);
|
|
152
152
|
}
|
|
153
153
|
:root .has-subdued-olive-gradient-background {
|
|
154
|
-
background: linear-gradient(135deg,
|
|
154
|
+
background: linear-gradient(135deg, rgb(250, 250, 225) 0%, rgb(103, 166, 113) 100%);
|
|
155
155
|
}
|
|
156
156
|
:root .has-atomic-cream-gradient-background {
|
|
157
|
-
background: linear-gradient(135deg,
|
|
157
|
+
background: linear-gradient(135deg, rgb(253, 215, 154) 0%, rgb(0, 74, 89) 100%);
|
|
158
158
|
}
|
|
159
159
|
:root .has-nightshade-gradient-background {
|
|
160
|
-
background: linear-gradient(135deg,
|
|
160
|
+
background: linear-gradient(135deg, rgb(51, 9, 104) 0%, rgb(49, 205, 207) 100%);
|
|
161
161
|
}
|
|
162
162
|
:root .has-midnight-gradient-background {
|
|
163
|
-
background: linear-gradient(135deg,
|
|
163
|
+
background: linear-gradient(135deg, rgb(2, 3, 129) 0%, rgb(40, 116, 252) 100%);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
.has-regular-font-size {
|
|
@@ -260,46 +260,46 @@ html :where(.has-border-color) {
|
|
|
260
260
|
border-style: solid;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
html :where([style*=
|
|
263
|
+
html :where([style*=border-top-color]) {
|
|
264
264
|
border-top-style: solid;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
html :where([style*=
|
|
267
|
+
html :where([style*=border-right-color]) {
|
|
268
268
|
border-right-style: solid;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
html :where([style*=
|
|
271
|
+
html :where([style*=border-bottom-color]) {
|
|
272
272
|
border-bottom-style: solid;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
html :where([style*=
|
|
275
|
+
html :where([style*=border-left-color]) {
|
|
276
276
|
border-left-style: solid;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
html :where([style*=
|
|
279
|
+
html :where([style*=border-width]) {
|
|
280
280
|
border-style: solid;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
html :where([style*=
|
|
283
|
+
html :where([style*=border-top-width]) {
|
|
284
284
|
border-top-style: solid;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
html :where([style*=
|
|
287
|
+
html :where([style*=border-right-width]) {
|
|
288
288
|
border-right-style: solid;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
html :where([style*=
|
|
291
|
+
html :where([style*=border-bottom-width]) {
|
|
292
292
|
border-bottom-style: solid;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
html :where([style*=
|
|
295
|
+
html :where([style*=border-left-width]) {
|
|
296
296
|
border-left-style: solid;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
/**
|
|
300
300
|
* Provide baseline responsiveness for images.
|
|
301
301
|
*/
|
|
302
|
-
html :where(img[class*=
|
|
302
|
+
html :where(img[class*=wp-image-]) {
|
|
303
303
|
height: auto;
|
|
304
304
|
max-width: 100%;
|
|
305
305
|
}
|