@wordpress/block-library 9.12.1-next.082ed6819.0 → 9.13.1-next.cd6172eb0.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/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-submenu/edit.js +3 -0
- 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/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-submenu/edit.js +3 -0
- 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/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/editor-rtl.css +35 -0
- package/build-style/editor.css +35 -0
- package/build-style/image/style-rtl.css +3 -2
- package/build-style/image/style.css +3 -2
- 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/social-link/editor-rtl.css +4 -0
- package/build-style/social-link/editor.css +4 -0
- package/build-style/style-rtl.css +5 -2
- package/build-style/style.css +5 -2
- package/build-types/lock-unlock.d.ts +1 -1
- package/build-types/lock-unlock.d.ts.map +1 -1
- package/package.json +34 -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/image/style.scss +4 -3
- 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-submenu/edit.js +5 -0
- 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":["clsx","HorizontalRule","useBlockProps","getColorClassName","__experimentalUseColorProps","useColorProps","useDeprecatedOpacity","jsx","_jsx","Fragment","_Fragment","SeparatorEdit","attributes","setAttributes","backgroundColor","opacity","style","colorProps","currentColor","hasCustomColor","color","background","colorClass","className","styles","children","undefined"],"sources":["@wordpress/block-library/src/separator/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { HorizontalRule } from '@wordpress/components';\nimport {\n\tuseBlockProps,\n\tgetColorClassName,\n\t__experimentalUseColorProps as useColorProps,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport useDeprecatedOpacity from './use-deprecated-opacity';\n\nexport default function SeparatorEdit( { attributes, setAttributes } ) {\n\tconst { backgroundColor, opacity, style } = attributes;\n\tconst colorProps = useColorProps( attributes );\n\tconst currentColor = colorProps?.style?.backgroundColor;\n\tconst hasCustomColor = !! style?.color?.background;\n\n\tuseDeprecatedOpacity( opacity, currentColor, setAttributes );\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 || currentColor,\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\tcolor: currentColor,\n\t\tbackgroundColor: currentColor,\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<
|
|
1
|
+
{"version":3,"names":["clsx","HorizontalRule","SelectControl","useBlockProps","getColorClassName","__experimentalUseColorProps","useColorProps","InspectorControls","__","useDeprecatedOpacity","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","htmlElementMessages","div","SeparatorEdit","attributes","setAttributes","backgroundColor","opacity","style","tagName","colorProps","currentColor","hasCustomColor","color","background","colorClass","className","styles","Wrapper","children","group","__nextHasNoMarginBottom","__next40pxDefaultSize","label","options","value","onChange","help","undefined"],"sources":["@wordpress/block-library/src/separator/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { HorizontalRule, SelectControl } from '@wordpress/components';\nimport {\n\tuseBlockProps,\n\tgetColorClassName,\n\t__experimentalUseColorProps as useColorProps,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useDeprecatedOpacity from './use-deprecated-opacity';\n\nconst htmlElementMessages = {\n\tdiv: __(\n\t\t'The <div> element should only be used if the separator is a design element that should not be announced.'\n\t),\n};\n\nexport default function SeparatorEdit( { attributes, setAttributes } ) {\n\tconst { backgroundColor, opacity, style, tagName } = attributes;\n\tconst colorProps = useColorProps( attributes );\n\tconst currentColor = colorProps?.style?.backgroundColor;\n\tconst hasCustomColor = !! style?.color?.background;\n\n\tuseDeprecatedOpacity( opacity, currentColor, setAttributes );\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 || currentColor,\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\tcolor: currentColor,\n\t\tbackgroundColor: currentColor,\n\t};\n\tconst Wrapper = tagName === 'hr' ? HorizontalRule : tagName;\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<hr>)' ), value: 'hr' },\n\t\t\t\t\t\t{ label: '<div>', value: 'div' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<Wrapper\n\t\t\t\t{ ...useBlockProps( {\n\t\t\t\t\tclassName,\n\t\t\t\t\tstyle: hasCustomColor ? styles : undefined,\n\t\t\t\t} ) }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,cAAc,EAAEC,aAAa,QAAQ,uBAAuB;AACrE,SACCC,aAAa,EACbC,iBAAiB,EACjBC,2BAA2B,IAAIC,aAAa,EAC5CC,iBAAiB,QACX,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,0BAA0B;AAAC,SAAAC,G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e,CAAG;QAC9B+B,OAAO,EAAG,CACT;UAAED,KAAK,EAAE9B,EAAE,CAAE,gBAAiB,CAAC;UAAEgC,KAAK,EAAE;QAAK,CAAC,EAC9C;UAAEF,KAAK,EAAE,OAAO;UAAEE,KAAK,EAAE;QAAM,CAAC,CAC9B;QACHA,KAAK,EAAGhB,OAAS;QACjBiB,QAAQ,EAAKD,KAAK,IACjBpB,aAAa,CAAE;UAAEI,OAAO,EAAEgB;QAAM,CAAE,CAClC;QACDE,IAAI,EAAG1B,mBAAmB,CAAEQ,OAAO;MAAI,CACvC;IAAC,CACgB,CAAC,eACpBb,IAAA,CAACsB,OAAO;MAAA,GACF9B,aAAa,CAAE;QACnB4B,SAAS;QACTR,KAAK,EAAEI,cAAc,GAAGK,MAAM,GAAGW;MAClC,CAAE;IAAC,CACH,CAAC;EAAA,CACD,CAAC;AAEL","ignoreList":[]}
|
|
@@ -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;\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C7B/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":[]}
|
|
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;A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;MAAA3C,QAAA,eAClCf,IAAA,CAACV,WAAW;QACX2E,qBAAqB;QACrBC,uBAAuB;QACvB1C,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\"\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":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;AACtD,SAASC,WAAW,EAAEC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACrE,SACCC,MAAM,EACNC,SAAS,EACTC,QAAQ,EACRC,aAAa,EACbC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASD,KAAK,IAAIE,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SAASC,+BAA+B,QAAQ,eAAe;AAC/D,SAASC,sBAAsB,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9D,MAAMC,cAAc,GAAG;EACtBC,QAAQ,EAAE,CAAC,CAAC;EACZC,OAAO,EAAE;AACV,CAAC;AAED,OAAO,SAASC,0BAA0BA,CAAE;EAAEC,IAAI;EAAEC;AAAc,CAAC,EAAG;EACrE,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAG5B,QAAQ,CAAE,EAAG,CAAC;EAC9D,MAAM,CAAE6B,MAAM,EAAEC,SAAS,CAAE,GAAG9B,QAAQ,CAAE,KAAM,CAAC;EAE/C,MAAM+B,QAAQ,GAAG5B,WAAW,C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CAAC;IACF;IAEAzC,SAAS,CAAE,KAAM,CAAC;EACnB;EAEA,oBACCZ,IAAA,CAACP,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":[]}
|
|
@@ -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,
|
|
@@ -391,6 +391,7 @@ html :where(.wp-block-column) {
|
|
|
391
391
|
margin-top: 0.5em;
|
|
392
392
|
margin-right: 0.5em;
|
|
393
393
|
margin-bottom: 0.5em;
|
|
394
|
+
font-size: inherit;
|
|
394
395
|
}
|
|
395
396
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
396
397
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
@@ -2420,6 +2421,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2420
2421
|
padding: 0;
|
|
2421
2422
|
}
|
|
2422
2423
|
|
|
2424
|
+
.wp-block-social-link__toolbar_content_text {
|
|
2425
|
+
width: 250px;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2423
2428
|
.wp-block-social-links div.block-editor-url-input {
|
|
2424
2429
|
display: inline-block;
|
|
2425
2430
|
margin-right: 8px;
|
|
@@ -2770,6 +2775,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2770
2775
|
z-index: 2;
|
|
2771
2776
|
}
|
|
2772
2777
|
|
|
2778
|
+
.block-library-query-toolspanel__design .block-library-query-pattern__selection-content {
|
|
2779
|
+
margin-top: 8px;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2773
2782
|
@media (min-width: 600px) {
|
|
2774
2783
|
.wp-block-query__enhanced-pagination-modal {
|
|
2775
2784
|
max-width: 480px;
|
|
@@ -2780,6 +2789,32 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2780
2789
|
margin: 0;
|
|
2781
2790
|
}
|
|
2782
2791
|
|
|
2792
|
+
.block-editor-block-settings-menu__popover.is-expanded {
|
|
2793
|
+
overflow-y: scroll;
|
|
2794
|
+
}
|
|
2795
|
+
.block-editor-block-settings-menu__popover .block-library-query-pattern__selection-content {
|
|
2796
|
+
height: 100%;
|
|
2797
|
+
}
|
|
2798
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
2799
|
+
display: grid;
|
|
2800
|
+
grid-template-columns: 1fr;
|
|
2801
|
+
grid-gap: 12px;
|
|
2802
|
+
min-width: 280px;
|
|
2803
|
+
}
|
|
2804
|
+
@media (min-width: 600px) {
|
|
2805
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
2806
|
+
grid-template-columns: 1fr 1fr;
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
@media (min-width: 600px) {
|
|
2810
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
2811
|
+
min-width: 480px;
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list__list-item {
|
|
2815
|
+
margin-bottom: 0;
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2783
2818
|
.wp-block[data-align=center] > .wp-block-query-pagination {
|
|
2784
2819
|
justify-content: center;
|
|
2785
2820
|
}
|
package/build-style/editor.css
CHANGED
|
@@ -393,6 +393,7 @@ html :where(.wp-block-column) {
|
|
|
393
393
|
/*rtl:ignore*/
|
|
394
394
|
margin-right: 0.5em;
|
|
395
395
|
margin-bottom: 0.5em;
|
|
396
|
+
font-size: inherit;
|
|
396
397
|
}
|
|
397
398
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
398
399
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
@@ -2429,6 +2430,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2429
2430
|
padding: 0;
|
|
2430
2431
|
}
|
|
2431
2432
|
|
|
2433
|
+
.wp-block-social-link__toolbar_content_text {
|
|
2434
|
+
width: 250px;
|
|
2435
|
+
}
|
|
2436
|
+
|
|
2432
2437
|
.wp-block-social-links div.block-editor-url-input {
|
|
2433
2438
|
display: inline-block;
|
|
2434
2439
|
margin-left: 8px;
|
|
@@ -2779,6 +2784,10 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2779
2784
|
z-index: 2;
|
|
2780
2785
|
}
|
|
2781
2786
|
|
|
2787
|
+
.block-library-query-toolspanel__design .block-library-query-pattern__selection-content {
|
|
2788
|
+
margin-top: 8px;
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2782
2791
|
@media (min-width: 600px) {
|
|
2783
2792
|
.wp-block-query__enhanced-pagination-modal {
|
|
2784
2793
|
max-width: 480px;
|
|
@@ -2789,6 +2798,32 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2789
2798
|
margin: 0;
|
|
2790
2799
|
}
|
|
2791
2800
|
|
|
2801
|
+
.block-editor-block-settings-menu__popover.is-expanded {
|
|
2802
|
+
overflow-y: scroll;
|
|
2803
|
+
}
|
|
2804
|
+
.block-editor-block-settings-menu__popover .block-library-query-pattern__selection-content {
|
|
2805
|
+
height: 100%;
|
|
2806
|
+
}
|
|
2807
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
2808
|
+
display: grid;
|
|
2809
|
+
grid-template-columns: 1fr;
|
|
2810
|
+
grid-gap: 12px;
|
|
2811
|
+
min-width: 280px;
|
|
2812
|
+
}
|
|
2813
|
+
@media (min-width: 600px) {
|
|
2814
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
2815
|
+
grid-template-columns: 1fr 1fr;
|
|
2816
|
+
}
|
|
2817
|
+
}
|
|
2818
|
+
@media (min-width: 600px) {
|
|
2819
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
2820
|
+
min-width: 480px;
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list__list-item {
|
|
2824
|
+
margin-bottom: 0;
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2792
2827
|
.wp-block[data-align=center] > .wp-block-query-pagination {
|
|
2793
2828
|
justify-content: center;
|
|
2794
2829
|
}
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
/**
|
|
99
99
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
100
100
|
*/
|
|
101
|
-
.wp-block-image a
|
|
101
|
+
.wp-block-image > a,
|
|
102
|
+
.wp-block-image > figure > a {
|
|
102
103
|
display: inline-block;
|
|
103
104
|
}
|
|
104
105
|
.wp-block-image img {
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
.wp-block-image.aligncenter {
|
|
126
127
|
text-align: center;
|
|
127
128
|
}
|
|
128
|
-
.wp-block-image.alignfull a, .wp-block-image.alignwide a {
|
|
129
|
+
.wp-block-image.alignfull > a, .wp-block-image.alignwide > a {
|
|
129
130
|
width: 100%;
|
|
130
131
|
}
|
|
131
132
|
.wp-block-image.alignfull img, .wp-block-image.alignwide img {
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
/**
|
|
99
99
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
100
100
|
*/
|
|
101
|
-
.wp-block-image a
|
|
101
|
+
.wp-block-image > a,
|
|
102
|
+
.wp-block-image > figure > a {
|
|
102
103
|
display: inline-block;
|
|
103
104
|
}
|
|
104
105
|
.wp-block-image img {
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
.wp-block-image.aligncenter {
|
|
126
127
|
text-align: center;
|
|
127
128
|
}
|
|
128
|
-
.wp-block-image.alignfull a, .wp-block-image.alignwide a {
|
|
129
|
+
.wp-block-image.alignfull > a, .wp-block-image.alignwide > a {
|
|
129
130
|
width: 100%;
|
|
130
131
|
}
|
|
131
132
|
.wp-block-image.alignfull img, .wp-block-image.alignwide img {
|
|
@@ -139,6 +139,10 @@
|
|
|
139
139
|
z-index: 2;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
.block-library-query-toolspanel__design .block-library-query-pattern__selection-content {
|
|
143
|
+
margin-top: 8px;
|
|
144
|
+
}
|
|
145
|
+
|
|
142
146
|
@media (min-width: 600px) {
|
|
143
147
|
.wp-block-query__enhanced-pagination-modal {
|
|
144
148
|
max-width: 480px;
|
|
@@ -147,4 +151,30 @@
|
|
|
147
151
|
|
|
148
152
|
.wp-block-query__enhanced-pagination-notice {
|
|
149
153
|
margin: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.block-editor-block-settings-menu__popover.is-expanded {
|
|
157
|
+
overflow-y: scroll;
|
|
158
|
+
}
|
|
159
|
+
.block-editor-block-settings-menu__popover .block-library-query-pattern__selection-content {
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
163
|
+
display: grid;
|
|
164
|
+
grid-template-columns: 1fr;
|
|
165
|
+
grid-gap: 12px;
|
|
166
|
+
min-width: 280px;
|
|
167
|
+
}
|
|
168
|
+
@media (min-width: 600px) {
|
|
169
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
170
|
+
grid-template-columns: 1fr 1fr;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
@media (min-width: 600px) {
|
|
174
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
175
|
+
min-width: 480px;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list__list-item {
|
|
179
|
+
margin-bottom: 0;
|
|
150
180
|
}
|
|
@@ -139,6 +139,10 @@
|
|
|
139
139
|
z-index: 2;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
.block-library-query-toolspanel__design .block-library-query-pattern__selection-content {
|
|
143
|
+
margin-top: 8px;
|
|
144
|
+
}
|
|
145
|
+
|
|
142
146
|
@media (min-width: 600px) {
|
|
143
147
|
.wp-block-query__enhanced-pagination-modal {
|
|
144
148
|
max-width: 480px;
|
|
@@ -147,4 +151,30 @@
|
|
|
147
151
|
|
|
148
152
|
.wp-block-query__enhanced-pagination-notice {
|
|
149
153
|
margin: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.block-editor-block-settings-menu__popover.is-expanded {
|
|
157
|
+
overflow-y: scroll;
|
|
158
|
+
}
|
|
159
|
+
.block-editor-block-settings-menu__popover .block-library-query-pattern__selection-content {
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
163
|
+
display: grid;
|
|
164
|
+
grid-template-columns: 1fr;
|
|
165
|
+
grid-gap: 12px;
|
|
166
|
+
min-width: 280px;
|
|
167
|
+
}
|
|
168
|
+
@media (min-width: 600px) {
|
|
169
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
170
|
+
grid-template-columns: 1fr 1fr;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
@media (min-width: 600px) {
|
|
174
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list {
|
|
175
|
+
min-width: 480px;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
.block-editor-block-settings-menu__popover .block-editor-block-patterns-list__list-item {
|
|
179
|
+
margin-bottom: 0;
|
|
150
180
|
}
|