@wordpress/block-library 9.33.6 → 9.33.8
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/build/heading/index.js +3 -1
- package/build/heading/index.js.map +3 -3
- package/build/heading/variations.js +53 -0
- package/build/heading/variations.js.map +7 -0
- package/build/navigation-link/edit.js +31 -10
- package/build/navigation-link/edit.js.map +2 -2
- package/build/navigation-link/link-ui/index.js +8 -3
- package/build/navigation-link/link-ui/index.js.map +2 -2
- package/build/navigation-link/shared/controls.js +74 -23
- package/build/navigation-link/shared/controls.js.map +2 -2
- package/build/navigation-link/shared/index.js +4 -0
- package/build/navigation-link/shared/index.js.map +2 -2
- package/build/navigation-link/shared/use-entity-binding.js +32 -2
- package/build/navigation-link/shared/use-entity-binding.js.map +3 -3
- package/build/paragraph/index.js +3 -1
- package/build/paragraph/index.js.map +3 -3
- package/build/paragraph/variations.js +55 -0
- package/build/paragraph/variations.js.map +7 -0
- package/build/social-links/edit.js +1 -1
- package/build/social-links/edit.js.map +1 -1
- package/build-module/heading/index.js +3 -1
- package/build-module/heading/index.js.map +2 -2
- package/build-module/heading/variations.js +33 -0
- package/build-module/heading/variations.js.map +7 -0
- package/build-module/navigation-link/edit.js +45 -14
- package/build-module/navigation-link/edit.js.map +2 -2
- package/build-module/navigation-link/link-ui/index.js +8 -3
- package/build-module/navigation-link/link-ui/index.js.map +2 -2
- package/build-module/navigation-link/shared/controls.js +72 -23
- package/build-module/navigation-link/shared/controls.js.map +2 -2
- package/build-module/navigation-link/shared/index.js +3 -1
- package/build-module/navigation-link/shared/index.js.map +2 -2
- package/build-module/navigation-link/shared/use-entity-binding.js +36 -3
- package/build-module/navigation-link/shared/use-entity-binding.js.map +2 -2
- package/build-module/paragraph/index.js +3 -1
- package/build-module/paragraph/index.js.map +2 -2
- package/build-module/paragraph/variations.js +35 -0
- package/build-module/paragraph/variations.js.map +7 -0
- package/build-module/social-links/edit.js +1 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-style/accordion-heading/style-rtl.css +19 -3
- package/build-style/accordion-heading/style.css +19 -3
- package/build-style/accordion-panel/style-rtl.css +4 -1
- package/build-style/accordion-panel/style.css +4 -1
- package/build-style/editor-rtl.css +7 -0
- package/build-style/editor.css +7 -0
- package/build-style/navigation-link/editor-rtl.css +7 -0
- package/build-style/navigation-link/editor.css +7 -0
- package/build-style/style-rtl.css +23 -4
- package/build-style/style.css +23 -4
- package/package.json +11 -11
- package/src/accordion-heading/style.scss +40 -7
- package/src/accordion-panel/style.scss +6 -1
- package/src/heading/index.js +2 -0
- package/src/heading/variations.js +37 -0
- package/src/navigation-link/edit.js +71 -17
- package/src/navigation-link/editor.scss +7 -0
- package/src/navigation-link/link-ui/index.js +9 -8
- package/src/navigation-link/shared/controls.js +120 -26
- package/src/navigation-link/shared/index.js +1 -1
- package/src/navigation-link/shared/test/controls.js +19 -9
- package/src/navigation-link/shared/test/use-entity-binding.js +14 -1
- package/src/navigation-link/shared/use-entity-binding.js +60 -9
- package/src/paragraph/index.js +2 -0
- package/src/paragraph/variations.js +39 -0
- package/src/social-links/edit.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/navigation-link/shared/use-entity-binding.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport {
|
|
5
|
-
"mappings": "AAGA,SAAS,mBAAmB;AAC5B,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport {\n\tuseBlockBindingsUtils,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Builds entity binding configuration for navigation link URLs.\n * This function generates the structure used to bind navigation link URLs to their entity sources.\n *\n * Using a function instead of a constant allows for future enhancements where the binding\n * might need dynamic data (e.g., entity ID, context-specific arguments).\n *\n * @param {('post-type'|'taxonomy')} kind - The kind of entity. Only 'post-type' and 'taxonomy' are supported.\n * @return {Object} Entity binding configuration object\n * @throws {Error} If kind is not 'post-type' or 'taxonomy'\n */\nexport function buildNavigationLinkEntityBinding( kind ) {\n\t// Validate kind parameter exists.\n\tif ( kind === undefined ) {\n\t\tthrow new Error(\n\t\t\t'buildNavigationLinkEntityBinding requires a kind parameter. ' +\n\t\t\t\t'Only \"post-type\" and \"taxonomy\" are supported.'\n\t\t);\n\t}\n\n\t// Validate kind parameter value.\n\tif ( kind !== 'post-type' && kind !== 'taxonomy' ) {\n\t\tthrow new Error(\n\t\t\t`Invalid kind \"${ kind }\" provided to buildNavigationLinkEntityBinding. ` +\n\t\t\t\t`Only 'post-type' and 'taxonomy' are supported.`\n\t\t);\n\t}\n\n\tconst source = kind === 'taxonomy' ? 'core/term-data' : 'core/post-data';\n\n\treturn {\n\t\turl: {\n\t\t\tsource,\n\t\t\targs: {\n\t\t\t\tfield: 'link',\n\t\t\t},\n\t\t},\n\t};\n}\n\n/**\n * Shared hook for entity binding functionality in Navigation blocks.\n *\n * This hook provides common entity binding logic that can be used by both\n * Navigation Link and Navigation Submenu blocks to maintain feature parity.\n *\n * @param {Object} props - Hook parameters\n * @param {string} props.clientId - Block client ID\n * @param {Object} props.attributes - Block attributes\n * @return {Object} Hook return value\n */\nexport function useEntityBinding( { clientId, attributes } ) {\n\tconst { updateBlockBindings } = useBlockBindingsUtils( clientId );\n\tconst { metadata, id, kind, type } = attributes;\n\tconst blockEditingMode = useBlockEditingMode();\n\n\tconst hasUrlBinding = !! metadata?.bindings?.url && !! id;\n\tconst expectedSource =\n\t\tkind === 'post-type' ? 'core/post-data' : 'core/term-data';\n\tconst hasCorrectBinding =\n\t\thasUrlBinding && metadata?.bindings?.url?.source === expectedSource;\n\n\t// Check if the bound entity is available (not deleted).\n\tconst isBoundEntityAvailable = useSelect(\n\t\t( select ) => {\n\t\t\t// First check: metadata/binding must exist\n\t\t\tif ( ! hasCorrectBinding || ! id ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst isPostType = kind === 'post-type';\n\t\t\tconst isTaxonomy = kind === 'taxonomy';\n\n\t\t\t// Only check entity availability for post types and taxonomies.\n\t\t\tif ( ! isPostType && ! isTaxonomy ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Skip check in disabled contexts to avoid unnecessary requests.\n\t\t\tif ( blockEditingMode === 'disabled' ) {\n\t\t\t\treturn true; // Assume available in disabled contexts.\n\t\t\t}\n\n\t\t\t// Second check: entity must exist\n\t\t\tconst { getEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\n\t\t\t// Use the correct entity type based on kind.\n\t\t\tconst entityType = isTaxonomy ? 'taxonomy' : 'postType';\n\t\t\t// Convert 'tag' back to 'post_tag' for the API call\n\t\t\t// (it was converted from 'post_tag' to 'tag' for storage in updateAttributes)\n\t\t\tconst typeForAPI = type === 'tag' ? 'post_tag' : type;\n\t\t\tconst entityRecord = getEntityRecord( entityType, typeForAPI, id );\n\t\t\tconst hasResolved = hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\tentityType,\n\t\t\t\ttypeForAPI,\n\t\t\t\tid,\n\t\t\t] );\n\n\t\t\t// If resolution has finished and entityRecord is undefined, the entity was deleted.\n\t\t\t// Return true if entity exists, false if deleted.\n\t\t\treturn hasResolved ? entityRecord !== undefined : true;\n\t\t},\n\t\t[ kind, type, id, hasCorrectBinding, blockEditingMode ]\n\t);\n\n\tconst clearBinding = useCallback( () => {\n\t\tif ( hasUrlBinding ) {\n\t\t\tupdateBlockBindings( { url: undefined } );\n\t\t}\n\t}, [ updateBlockBindings, hasUrlBinding, metadata, id ] );\n\n\tconst createBinding = useCallback(\n\t\t( updatedAttributes ) => {\n\t\t\t// Use updated attributes if provided, otherwise fall back to closure attributes.\n\t\t\t// updatedAttributes needed to access the most up-to-date data when called synchronously.\n\t\t\tconst kindToUse = updatedAttributes?.kind ?? kind;\n\n\t\t\t// Avoid creating binding if no kind is provided.\n\t\t\tif ( ! kindToUse ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst binding = buildNavigationLinkEntityBinding( kindToUse );\n\t\t\t\tupdateBlockBindings( binding );\n\t\t\t} catch ( error ) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'Failed to create entity binding:',\n\t\t\t\t\terror.message\n\t\t\t\t);\n\t\t\t\t// Don't create binding if validation fails.\n\t\t\t}\n\t\t},\n\t\t[ updateBlockBindings, kind ]\n\t);\n\n\treturn {\n\t\thasUrlBinding: hasCorrectBinding,\n\t\tisBoundEntityAvailable,\n\t\tclearBinding,\n\t\tcreateBinding,\n\t};\n}\n"],
|
|
5
|
+
"mappings": "AAGA,SAAS,mBAAmB;AAC5B;AAAA,EACC;AAAA,EACA;AAAA,OACM;AACP,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAa5B,SAAS,iCAAkC,MAAO;AAExD,MAAK,SAAS,QAAY;AACzB,UAAM,IAAI;AAAA,MACT;AAAA,IAED;AAAA,EACD;AAGA,MAAK,SAAS,eAAe,SAAS,YAAa;AAClD,UAAM,IAAI;AAAA,MACT,iBAAkB,IAAK;AAAA,IAExB;AAAA,EACD;AAEA,QAAM,SAAS,SAAS,aAAa,mBAAmB;AAExD,SAAO;AAAA,IACN,KAAK;AAAA,MACJ;AAAA,MACA,MAAM;AAAA,QACL,OAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AACD;AAaO,SAAS,iBAAkB,EAAE,UAAU,WAAW,GAAI;AAC5D,QAAM,EAAE,oBAAoB,IAAI,sBAAuB,QAAS;AAChE,QAAM,EAAE,UAAU,IAAI,MAAM,KAAK,IAAI;AACrC,QAAM,mBAAmB,oBAAoB;AAE7C,QAAM,gBAAgB,CAAC,CAAE,UAAU,UAAU,OAAO,CAAC,CAAE;AACvD,QAA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;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -6,6 +6,7 @@ import edit from "./edit";
|
|
|
6
6
|
import metadata from "./block.json";
|
|
7
7
|
import save from "./save";
|
|
8
8
|
import transforms from "./transforms";
|
|
9
|
+
import variations from "./variations";
|
|
9
10
|
const { name } = metadata;
|
|
10
11
|
const settings = {
|
|
11
12
|
icon,
|
|
@@ -37,7 +38,8 @@ const settings = {
|
|
|
37
38
|
};
|
|
38
39
|
},
|
|
39
40
|
edit,
|
|
40
|
-
save
|
|
41
|
+
save,
|
|
42
|
+
variations
|
|
41
43
|
};
|
|
42
44
|
const init = () => initBlock({ name, metadata, settings });
|
|
43
45
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/paragraph/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { paragraph as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcontent: __(\n\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t),\n\t\t},\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst customName = attributes?.metadata?.name;\n\n\t\tif ( context === 'list-view' && customName ) {\n\t\t\treturn customName;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\tif ( customName ) {\n\t\t\t\treturn customName;\n\t\t\t}\n\n\t\t\tconst { content } = attributes;\n\t\t\treturn ! content || content.length === 0 ? __( 'Empty' ) : content;\n\t\t}\n\t},\n\ttransforms,\n\tdeprecated,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent:\n\t\t\t\t( attributes.content || '' ) +\n\t\t\t\t( attributesToMerge.content || '' ),\n\t\t};\n\t},\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
|
|
5
|
-
"mappings": "AAGA,SAAS,UAAU;AACnB,SAAS,aAAa,YAAY;AAKlC,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AAEvB,MAAM,EAAE,KAAK,IAAI;AAIV,MAAM,WAAW;AAAA,EACvB;AAAA,EACA,SAAS;AAAA,IACR,YAAY;AAAA,MACX,SAAS;AAAA,QACR;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EACA,oBAAqB,YAAY,EAAE,QAAQ,GAAI;AAC9C,UAAM,aAAa,YAAY,UAAU;AAEzC,QAAK,YAAY,eAAe,YAAa;AAC5C,aAAO;AAAA,IACR;AAEA,QAAK,YAAY,iBAAkB;AAClC,UAAK,YAAa;AACjB,eAAO;AAAA,MACR;AAEA,YAAM,EAAE,QAAQ,IAAI;AACpB,aAAO,CAAE,WAAW,QAAQ,WAAW,IAAI,GAAI,OAAQ,IAAI;AAAA,IAC5D;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAO,YAAY,mBAAoB;AACtC,WAAO;AAAA,MACN,UACG,WAAW,WAAW,OACtB,kBAAkB,WAAW;AAAA,IACjC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AACD;AAEO,MAAM,OAAO,MAAM,UAAW,EAAE,MAAM,UAAU,SAAS,CAAE;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { paragraph as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcontent: __(\n\t\t\t\t'In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.'\n\t\t\t),\n\t\t},\n\t},\n\t__experimentalLabel( attributes, { context } ) {\n\t\tconst customName = attributes?.metadata?.name;\n\n\t\tif ( context === 'list-view' && customName ) {\n\t\t\treturn customName;\n\t\t}\n\n\t\tif ( context === 'accessibility' ) {\n\t\t\tif ( customName ) {\n\t\t\t\treturn customName;\n\t\t\t}\n\n\t\t\tconst { content } = attributes;\n\t\t\treturn ! content || content.length === 0 ? __( 'Empty' ) : content;\n\t\t}\n\t},\n\ttransforms,\n\tdeprecated,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent:\n\t\t\t\t( attributes.content || '' ) +\n\t\t\t\t( attributesToMerge.content || '' ),\n\t\t};\n\t},\n\tedit,\n\tsave,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
|
|
5
|
+
"mappings": "AAGA,SAAS,UAAU;AACnB,SAAS,aAAa,YAAY;AAKlC,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AAEvB,MAAM,EAAE,KAAK,IAAI;AAIV,MAAM,WAAW;AAAA,EACvB;AAAA,EACA,SAAS;AAAA,IACR,YAAY;AAAA,MACX,SAAS;AAAA,QACR;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EACA,oBAAqB,YAAY,EAAE,QAAQ,GAAI;AAC9C,UAAM,aAAa,YAAY,UAAU;AAEzC,QAAK,YAAY,eAAe,YAAa;AAC5C,aAAO;AAAA,IACR;AAEA,QAAK,YAAY,iBAAkB;AAClC,UAAK,YAAa;AACjB,eAAO;AAAA,MACR;AAEA,YAAM,EAAE,QAAQ,IAAI;AACpB,aAAO,CAAE,WAAW,QAAQ,WAAW,IAAI,GAAI,OAAQ,IAAI;AAAA,IAC5D;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA,MAAO,YAAY,mBAAoB;AACtC,WAAO;AAAA,MACN,UACG,WAAW,WAAW,OACtB,kBAAkB,WAAW;AAAA,IACjC;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAEO,MAAM,OAAO,MAAM,UAAW,EAAE,MAAM,UAAU,SAAS,CAAE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
import { Path, SVG } from "@wordpress/primitives";
|
|
4
|
+
import { paragraph } from "@wordpress/icons";
|
|
5
|
+
const variations = [
|
|
6
|
+
{
|
|
7
|
+
name: "paragraph",
|
|
8
|
+
title: __("Paragraph"),
|
|
9
|
+
description: __(
|
|
10
|
+
"Start with the basic building block of all narrative."
|
|
11
|
+
),
|
|
12
|
+
isDefault: true,
|
|
13
|
+
scope: ["block", "inserter", "transform"],
|
|
14
|
+
attributes: { fitText: void 0 },
|
|
15
|
+
icon: paragraph
|
|
16
|
+
},
|
|
17
|
+
// There is a hardcoded workaround in packages/block-editor/src/store/selectors.js
|
|
18
|
+
// to make Stretchy variations appear as the last of their sections in the inserter.
|
|
19
|
+
{
|
|
20
|
+
name: "stretchy-paragraph",
|
|
21
|
+
title: __("Stretchy Paragraph"),
|
|
22
|
+
description: __("Paragraph that resizes to fit its container."),
|
|
23
|
+
icon: /* @__PURE__ */ jsx(SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx(Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm16.2-.2v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z" }) }),
|
|
24
|
+
attributes: {
|
|
25
|
+
fitText: true
|
|
26
|
+
},
|
|
27
|
+
scope: ["inserter", "transform"],
|
|
28
|
+
isActive: (blockAttributes) => blockAttributes.fitText === true
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
var variations_default = variations;
|
|
32
|
+
export {
|
|
33
|
+
variations_default as default
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=variations.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/paragraph/variations.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Path, SVG } from '@wordpress/primitives';\nimport { paragraph } from '@wordpress/icons';\n\nconst variations = [\n\t{\n\t\tname: 'paragraph',\n\t\ttitle: __( 'Paragraph' ),\n\t\tdescription: __(\n\t\t\t'Start with the basic building block of all narrative.'\n\t\t),\n\t\tisDefault: true,\n\t\tscope: [ 'block', 'inserter', 'transform' ],\n\t\tattributes: { fitText: undefined },\n\t\ticon: paragraph,\n\t},\n\t// There is a hardcoded workaround in packages/block-editor/src/store/selectors.js\n\t// to make Stretchy variations appear as the last of their sections in the inserter.\n\t{\n\t\tname: 'stretchy-paragraph',\n\t\ttitle: __( 'Stretchy Paragraph' ),\n\t\tdescription: __( 'Paragraph that resizes to fit its container.' ),\n\t\ticon: (\n\t\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t\t<Path d=\"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm16.2-.2v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z\" />\n\t\t\t</SVG>\n\t\t),\n\t\tattributes: {\n\t\t\tfitText: true,\n\t\t},\n\t\tscope: [ 'inserter', 'transform' ],\n\t\tisActive: ( blockAttributes ) => blockAttributes.fitText === true,\n\t},\n];\n\nexport default variations;\n"],
|
|
5
|
+
"mappings": "AA2BI;AAxBJ,SAAS,UAAU;AACnB,SAAS,MAAM,WAAW;AAC1B,SAAS,iBAAiB;AAE1B,MAAM,aAAa;AAAA,EAClB;AAAA,IACC,MAAM;AAAA,IACN,OAAO,GAAI,WAAY;AAAA,IACvB,aAAa;AAAA,MACZ;AAAA,IACD;AAAA,IACA,WAAW;AAAA,IACX,OAAO,CAAE,SAAS,YAAY,WAAY;AAAA,IAC1C,YAAY,EAAE,SAAS,OAAU;AAAA,IACjC,MAAM;AAAA,EACP;AAAA;AAAA;AAAA,EAGA;AAAA,IACC,MAAM;AAAA,IACN,OAAO,GAAI,oBAAqB;AAAA,IAChC,aAAa,GAAI,8CAA+C;AAAA,IAChE,MACC,oBAAC,OAAI,OAAM,8BAA6B,SAAQ,aAC/C,8BAAC,QAAK,GAAE,qIAAoI,GAC7I;AAAA,IAED,YAAY;AAAA,MACX,SAAS;AAAA,IACV;AAAA,IACA,OAAO,CAAE,YAAY,WAAY;AAAA,IACjC,UAAU,CAAE,oBAAqB,gBAAgB,YAAY;AAAA,EAC9D;AACD;AAEA,IAAO,qBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -150,7 +150,7 @@ function SocialLinksEdit(props) {
|
|
|
150
150
|
{
|
|
151
151
|
__next40pxDefaultSize: true,
|
|
152
152
|
__nextHasNoMarginBottom: true,
|
|
153
|
-
label: __("Icon
|
|
153
|
+
label: __("Icon size"),
|
|
154
154
|
onChange: (newSize) => {
|
|
155
155
|
setAttributes({
|
|
156
156
|
size: newSize === "" ? void 0 : newSize
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/social-links/edit.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseInnerBlocksProps,\n\tuseBlockProps,\n\tInspectorControls,\n\tContrastChecker,\n\twithColors,\n\tInnerBlocks,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tToggleControl,\n\tSelectControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst sizeOptions = [\n\t{ label: __( 'Default' ), value: '' },\n\t{ label: __( 'Small' ), value: 'has-small-icon-size' },\n\t{ label: __( 'Normal' ), value: 'has-normal-icon-size' },\n\t{ label: __( 'Large' ), value: 'has-large-icon-size' },\n\t{ label: __( 'Huge' ), value: 'has-huge-icon-size' },\n];\n\nexport function SocialLinksEdit( props ) {\n\tconst {\n\t\tclientId,\n\t\tattributes,\n\t\ticonBackgroundColor,\n\t\ticonColor,\n\t\tisSelected,\n\t\tsetAttributes,\n\t\tsetIconBackgroundColor,\n\t\tsetIconColor,\n\t} = props;\n\n\tconst {\n\t\ticonBackgroundColorValue,\n\t\ticonColorValue,\n\t\topenInNewTab,\n\t\tshowLabels,\n\t\tsize,\n\t} = attributes;\n\n\tconst { hasSocialIcons, hasSelectedChild } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockCount, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\thasSocialIcons: getBlockCount( clientId ) > 0,\n\t\t\t\thasSelectedChild: hasSelectedInnerBlock( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst hasAnySelected = isSelected || hasSelectedChild;\n\n\tconst logosOnly = attributes.className?.includes( 'is-style-logos-only' );\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\t// Remove icon background color when logos only style is selected or\n\t// restore it when any other style is selected.\n\tuseEffect( () => {\n\t\tif ( logosOnly ) {\n\t\t\tlet restore;\n\t\t\tsetAttributes( ( prev ) => {\n\t\t\t\trestore = {\n\t\t\t\t\ticonBackgroundColor: prev.iconBackgroundColor,\n\t\t\t\t\ticonBackgroundColorValue: prev.iconBackgroundColorValue,\n\t\t\t\t\tcustomIconBackgroundColor: prev.customIconBackgroundColor,\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\ticonBackgroundColor: undefined,\n\t\t\t\t\ticonBackgroundColorValue: undefined,\n\t\t\t\t\tcustomIconBackgroundColor: undefined,\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn () => setAttributes( { ...restore } );\n\t\t}\n\t}, [ logosOnly, setAttributes ] );\n\n\t// Fallback color values are used maintain selections in case switching\n\t// themes and named colors in palette do not match.\n\tconst className = clsx( size, {\n\t\t'has-visible-labels': showLabels,\n\t\t'has-icon-color': iconColor.color || iconColorValue,\n\t\t'has-icon-background-color':\n\t\t\ticonBackgroundColor.color || iconBackgroundColorValue,\n\t} );\n\n\tconst blockProps = useBlockProps( { className } );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplateLock: false,\n\t\torientation: attributes.layout?.orientation ?? 'horizontal',\n\t\t__experimentalAppenderTagName: 'li',\n\t\trenderAppender:\n\t\t\t! hasSocialIcons || hasAnySelected\n\t\t\t\t? InnerBlocks.ButtonBlockAppender\n\t\t\t\t: undefined,\n\t} );\n\n\tconst colorSettings = [\n\t\t{\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconColor.color || iconColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconColor( colorValue );\n\t\t\t\tsetAttributes( { iconColorValue: colorValue } );\n\t\t\t},\n\t\t\tlabel: __( 'Icon color' ),\n\t\t\tresetAllFilter: () => {\n\t\t\t\tsetIconColor( undefined );\n\t\t\t\tsetAttributes( { iconColorValue: undefined } );\n\t\t\t},\n\t\t},\n\t];\n\n\tif ( ! logosOnly ) {\n\t\tcolorSettings.push( {\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconBackgroundColor.color || iconBackgroundColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconBackgroundColor( colorValue );\n\t\t\t\tsetAttributes( {\n\t\t\t\t\ticonBackgroundColorValue: colorValue,\n\t\t\t\t} );\n\t\t\t},\n\t\t\tlabel: __( 'Icon background' ),\n\t\t\tresetAllFilter: () => {\n\t\t\t\tsetIconBackgroundColor( undefined );\n\t\t\t\tsetAttributes( { iconBackgroundColorValue: undefined } );\n\t\t\t},\n\t\t} );\n\t}\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\topenInNewTab: false,\n\t\t\t\t\t\t\tshowLabels: false,\n\t\t\t\t\t\t\tsize: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! size }\n\t\t\t\t\t\tlabel={ __( 'Icon size' ) }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { size: undefined } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\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={ __( 'Icon
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseInnerBlocksProps,\n\tuseBlockProps,\n\tInspectorControls,\n\tContrastChecker,\n\twithColors,\n\tInnerBlocks,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tToggleControl,\n\tSelectControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst sizeOptions = [\n\t{ label: __( 'Default' ), value: '' },\n\t{ label: __( 'Small' ), value: 'has-small-icon-size' },\n\t{ label: __( 'Normal' ), value: 'has-normal-icon-size' },\n\t{ label: __( 'Large' ), value: 'has-large-icon-size' },\n\t{ label: __( 'Huge' ), value: 'has-huge-icon-size' },\n];\n\nexport function SocialLinksEdit( props ) {\n\tconst {\n\t\tclientId,\n\t\tattributes,\n\t\ticonBackgroundColor,\n\t\ticonColor,\n\t\tisSelected,\n\t\tsetAttributes,\n\t\tsetIconBackgroundColor,\n\t\tsetIconColor,\n\t} = props;\n\n\tconst {\n\t\ticonBackgroundColorValue,\n\t\ticonColorValue,\n\t\topenInNewTab,\n\t\tshowLabels,\n\t\tsize,\n\t} = attributes;\n\n\tconst { hasSocialIcons, hasSelectedChild } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockCount, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\thasSocialIcons: getBlockCount( clientId ) > 0,\n\t\t\t\thasSelectedChild: hasSelectedInnerBlock( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst hasAnySelected = isSelected || hasSelectedChild;\n\n\tconst logosOnly = attributes.className?.includes( 'is-style-logos-only' );\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\t// Remove icon background color when logos only style is selected or\n\t// restore it when any other style is selected.\n\tuseEffect( () => {\n\t\tif ( logosOnly ) {\n\t\t\tlet restore;\n\t\t\tsetAttributes( ( prev ) => {\n\t\t\t\trestore = {\n\t\t\t\t\ticonBackgroundColor: prev.iconBackgroundColor,\n\t\t\t\t\ticonBackgroundColorValue: prev.iconBackgroundColorValue,\n\t\t\t\t\tcustomIconBackgroundColor: prev.customIconBackgroundColor,\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\ticonBackgroundColor: undefined,\n\t\t\t\t\ticonBackgroundColorValue: undefined,\n\t\t\t\t\tcustomIconBackgroundColor: undefined,\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn () => setAttributes( { ...restore } );\n\t\t}\n\t}, [ logosOnly, setAttributes ] );\n\n\t// Fallback color values are used maintain selections in case switching\n\t// themes and named colors in palette do not match.\n\tconst className = clsx( size, {\n\t\t'has-visible-labels': showLabels,\n\t\t'has-icon-color': iconColor.color || iconColorValue,\n\t\t'has-icon-background-color':\n\t\t\ticonBackgroundColor.color || iconBackgroundColorValue,\n\t} );\n\n\tconst blockProps = useBlockProps( { className } );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplateLock: false,\n\t\torientation: attributes.layout?.orientation ?? 'horizontal',\n\t\t__experimentalAppenderTagName: 'li',\n\t\trenderAppender:\n\t\t\t! hasSocialIcons || hasAnySelected\n\t\t\t\t? InnerBlocks.ButtonBlockAppender\n\t\t\t\t: undefined,\n\t} );\n\n\tconst colorSettings = [\n\t\t{\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconColor.color || iconColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconColor( colorValue );\n\t\t\t\tsetAttributes( { iconColorValue: colorValue } );\n\t\t\t},\n\t\t\tlabel: __( 'Icon color' ),\n\t\t\tresetAllFilter: () => {\n\t\t\t\tsetIconColor( undefined );\n\t\t\t\tsetAttributes( { iconColorValue: undefined } );\n\t\t\t},\n\t\t},\n\t];\n\n\tif ( ! logosOnly ) {\n\t\tcolorSettings.push( {\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconBackgroundColor.color || iconBackgroundColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconBackgroundColor( colorValue );\n\t\t\t\tsetAttributes( {\n\t\t\t\t\ticonBackgroundColorValue: colorValue,\n\t\t\t\t} );\n\t\t\t},\n\t\t\tlabel: __( 'Icon background' ),\n\t\t\tresetAllFilter: () => {\n\t\t\t\tsetIconBackgroundColor( undefined );\n\t\t\t\tsetAttributes( { iconBackgroundColorValue: undefined } );\n\t\t\t},\n\t\t} );\n\t}\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\topenInNewTab: false,\n\t\t\t\t\t\t\tshowLabels: false,\n\t\t\t\t\t\t\tsize: undefined,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! size }\n\t\t\t\t\t\tlabel={ __( 'Icon size' ) }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { size: undefined } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\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={ __( 'Icon size' ) }\n\t\t\t\t\t\t\tonChange={ ( newSize ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tsize: newSize === '' ? undefined : newSize,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tvalue={ size ?? '' }\n\t\t\t\t\t\t\toptions={ sizeOptions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tlabel={ __( 'Show text' ) }\n\t\t\t\t\t\thasValue={ () => !! showLabels }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { showLabels: false } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show text' ) }\n\t\t\t\t\t\t\tchecked={ showLabels }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( { showLabels: ! showLabels } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tlabel={ __( 'Open links in new tab' ) }\n\t\t\t\t\t\thasValue={ () => !! openInNewTab }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { openInNewTab: false } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Open links in new tab' ) }\n\t\t\t\t\t\t\tchecked={ openInNewTab }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\topenInNewTab: ! openInNewTab,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t{ colorSettings.map(\n\t\t\t\t\t\t( { onChange, label, value, resetAllFilter } ) => (\n\t\t\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t\t\tkey={ `social-links-color-${ label }` }\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcolorValue: value,\n\t\t\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\t\t\tonColorChange: onChange,\n\t\t\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\t\t\tresetAllFilter,\n\t\t\t\t\t\t\t\t\t\tenableAlpha: true,\n\t\t\t\t\t\t\t\t\t\tclearable: true,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t\t\t{ ...colorGradientSettings }\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\t{ ! logosOnly && (\n\t\t\t\t\t\t<ContrastChecker\n\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\ttextColor: iconColorValue,\n\t\t\t\t\t\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisLargeText={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<ul { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n\nconst iconColorAttributes = {\n\ticonColor: 'icon-color',\n\ticonBackgroundColor: 'icon-background-color',\n};\n\nexport default withColors( iconColorAttributes )( SocialLinksEdit );\n"],
|
|
5
5
|
"mappings": "AAiKE,mBAqBI,KAnBF,YAFF;AA9JF,OAAO,UAAU;AAKjB,SAAS,iBAAiB;AAC1B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,+CAA+C;AAAA,EAC/C,qDAAqD;AAAA,EACrD,SAAS;AAAA,OACH;AACP;AAAA,EACC;AAAA,EACA;AAAA,EACA,4BAA4B;AAAA,EAC5B,gCAAgC;AAAA,OAC1B;AACP,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAK1B,SAAS,sCAAsC;AAE/C,MAAM,cAAc;AAAA,EACnB,EAAE,OAAO,GAAI,SAAU,GAAG,OAAO,GAAG;AAAA,EACpC,EAAE,OAAO,GAAI,OAAQ,GAAG,OAAO,sBAAsB;AAAA,EACrD,EAAE,OAAO,GAAI,QAAS,GAAG,OAAO,uBAAuB;AAAA,EACvD,EAAE,OAAO,GAAI,OAAQ,GAAG,OAAO,sBAAsB;AAAA,EACrD,EAAE,OAAO,GAAI,MAAO,GAAG,OAAO,qBAAqB;AACpD;AAEO,SAAS,gBA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;AAAA,cACV;AAAA,gBACC,YAAY;AAAA,gBACZ;AAAA,gBACA,eAAe;AAAA,gBACf,kBAAkB;AAAA,gBAClB;AAAA,gBACA,aAAa;AAAA,gBACb,WAAW;AAAA,cACZ;AAAA,YACD;AAAA,YACA,SAAU;AAAA,YACR,GAAG;AAAA;AAAA,UAdC,sBAAuB,KAAM;AAAA,QAepC;AAAA,MAEF;AAAA,MACE,CAAE,aACH;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,YACJ,WAAW;AAAA,YACX,iBAAiB;AAAA,UAClB;AAAA,UACA,aAAc;AAAA;AAAA,MACf;AAAA,OAEF;AAAA,IAED,oBAAC,QAAK,GAAG,kBAAmB;AAAA,KAC7B;AAEF;AAEA,MAAM,sBAAsB;AAAA,EAC3B,WAAW;AAAA,EACX,qBAAqB;AACtB;AAEA,IAAO,eAAQ,WAAY,mBAAoB,EAAG,eAAgB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
.wp-block-accordion-heading.wp-block-accordion-heading {
|
|
2
|
+
min-width: 100%;
|
|
3
|
+
margin: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.wp-block-accordion-heading__toggle {
|
|
2
7
|
font-family: inherit;
|
|
3
8
|
font-size: inherit;
|
|
@@ -8,21 +13,32 @@
|
|
|
8
13
|
text-decoration: inherit;
|
|
9
14
|
word-spacing: inherit;
|
|
10
15
|
font-style: inherit;
|
|
11
|
-
background: none;
|
|
12
16
|
border: none;
|
|
13
|
-
color: inherit;
|
|
14
17
|
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
15
18
|
cursor: pointer;
|
|
16
19
|
overflow: hidden;
|
|
17
20
|
display: flex;
|
|
18
21
|
align-items: center;
|
|
19
22
|
text-align: inherit;
|
|
20
|
-
position: relative;
|
|
21
23
|
width: 100%;
|
|
24
|
+
background-color: inherit !important;
|
|
25
|
+
color: inherit !important;
|
|
22
26
|
}
|
|
23
27
|
.wp-block-accordion-heading__toggle:not(:focus-visible) {
|
|
24
28
|
outline: none;
|
|
25
29
|
}
|
|
30
|
+
.wp-block-accordion-heading__toggle:hover, .wp-block-accordion-heading__toggle:focus {
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
background-color: inherit !important;
|
|
33
|
+
box-shadow: none;
|
|
34
|
+
color: inherit;
|
|
35
|
+
border: none;
|
|
36
|
+
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
37
|
+
}
|
|
38
|
+
.wp-block-accordion-heading__toggle:focus-visible {
|
|
39
|
+
outline: auto;
|
|
40
|
+
outline-offset: 0;
|
|
41
|
+
}
|
|
26
42
|
.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
|
|
27
43
|
text-decoration: underline;
|
|
28
44
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
.wp-block-accordion-heading.wp-block-accordion-heading {
|
|
2
|
+
min-width: 100%;
|
|
3
|
+
margin: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.wp-block-accordion-heading__toggle {
|
|
2
7
|
font-family: inherit;
|
|
3
8
|
font-size: inherit;
|
|
@@ -8,21 +13,32 @@
|
|
|
8
13
|
text-decoration: inherit;
|
|
9
14
|
word-spacing: inherit;
|
|
10
15
|
font-style: inherit;
|
|
11
|
-
background: none;
|
|
12
16
|
border: none;
|
|
13
|
-
color: inherit;
|
|
14
17
|
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
15
18
|
cursor: pointer;
|
|
16
19
|
overflow: hidden;
|
|
17
20
|
display: flex;
|
|
18
21
|
align-items: center;
|
|
19
22
|
text-align: inherit;
|
|
20
|
-
position: relative;
|
|
21
23
|
width: 100%;
|
|
24
|
+
background-color: inherit !important;
|
|
25
|
+
color: inherit !important;
|
|
22
26
|
}
|
|
23
27
|
.wp-block-accordion-heading__toggle:not(:focus-visible) {
|
|
24
28
|
outline: none;
|
|
25
29
|
}
|
|
30
|
+
.wp-block-accordion-heading__toggle:hover, .wp-block-accordion-heading__toggle:focus {
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
background-color: inherit !important;
|
|
33
|
+
box-shadow: none;
|
|
34
|
+
color: inherit;
|
|
35
|
+
border: none;
|
|
36
|
+
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
37
|
+
}
|
|
38
|
+
.wp-block-accordion-heading__toggle:focus-visible {
|
|
39
|
+
outline: auto;
|
|
40
|
+
outline-offset: 0;
|
|
41
|
+
}
|
|
26
42
|
.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
|
|
27
43
|
text-decoration: underline;
|
|
28
44
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
.wp-block-accordion-panel
|
|
1
|
+
.wp-block-accordion-panel.wp-block-accordion-panel {
|
|
2
|
+
min-width: 100%;
|
|
3
|
+
}
|
|
4
|
+
.wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
|
|
2
5
|
display: none;
|
|
3
6
|
margin-block-start: 0;
|
|
4
7
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
.wp-block-accordion-panel
|
|
1
|
+
.wp-block-accordion-panel.wp-block-accordion-panel {
|
|
2
|
+
min-width: 100%;
|
|
3
|
+
}
|
|
4
|
+
.wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
|
|
2
5
|
display: none;
|
|
3
6
|
margin-block-start: 0;
|
|
4
7
|
}
|
|
@@ -1986,6 +1986,13 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1986
1986
|
text-transform: uppercase;
|
|
1987
1987
|
}
|
|
1988
1988
|
|
|
1989
|
+
/**
|
|
1990
|
+
* Error text styling for missing entity help text.
|
|
1991
|
+
*/
|
|
1992
|
+
.navigation-link-control__error-text {
|
|
1993
|
+
color: #cc1818;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1989
1996
|
.wp-block-navigation-submenu {
|
|
1990
1997
|
display: block;
|
|
1991
1998
|
}
|
package/build-style/editor.css
CHANGED
|
@@ -1994,6 +1994,13 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1994
1994
|
text-transform: uppercase;
|
|
1995
1995
|
}
|
|
1996
1996
|
|
|
1997
|
+
/**
|
|
1998
|
+
* Error text styling for missing entity help text.
|
|
1999
|
+
*/
|
|
2000
|
+
.navigation-link-control__error-text {
|
|
2001
|
+
color: #cc1818;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1997
2004
|
.wp-block-navigation-submenu {
|
|
1998
2005
|
display: block;
|
|
1999
2006
|
}
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.wp-block-accordion-heading.wp-block-accordion-heading {
|
|
25
|
+
min-width: 100%;
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
.wp-block-accordion-heading__toggle {
|
|
25
30
|
font-family: inherit;
|
|
26
31
|
font-size: inherit;
|
|
@@ -31,21 +36,32 @@
|
|
|
31
36
|
text-decoration: inherit;
|
|
32
37
|
word-spacing: inherit;
|
|
33
38
|
font-style: inherit;
|
|
34
|
-
background: none;
|
|
35
39
|
border: none;
|
|
36
|
-
color: inherit;
|
|
37
40
|
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
38
41
|
cursor: pointer;
|
|
39
42
|
overflow: hidden;
|
|
40
43
|
display: flex;
|
|
41
44
|
align-items: center;
|
|
42
45
|
text-align: inherit;
|
|
43
|
-
position: relative;
|
|
44
46
|
width: 100%;
|
|
47
|
+
background-color: inherit !important;
|
|
48
|
+
color: inherit !important;
|
|
45
49
|
}
|
|
46
50
|
.wp-block-accordion-heading__toggle:not(:focus-visible) {
|
|
47
51
|
outline: none;
|
|
48
52
|
}
|
|
53
|
+
.wp-block-accordion-heading__toggle:hover, .wp-block-accordion-heading__toggle:focus {
|
|
54
|
+
text-decoration: none;
|
|
55
|
+
background-color: inherit !important;
|
|
56
|
+
box-shadow: none;
|
|
57
|
+
color: inherit;
|
|
58
|
+
border: none;
|
|
59
|
+
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
60
|
+
}
|
|
61
|
+
.wp-block-accordion-heading__toggle:focus-visible {
|
|
62
|
+
outline: auto;
|
|
63
|
+
outline-offset: 0;
|
|
64
|
+
}
|
|
49
65
|
.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
|
|
50
66
|
text-decoration: underline;
|
|
51
67
|
}
|
|
@@ -62,7 +78,10 @@
|
|
|
62
78
|
justify-content: center;
|
|
63
79
|
}
|
|
64
80
|
|
|
65
|
-
.wp-block-accordion-panel
|
|
81
|
+
.wp-block-accordion-panel.wp-block-accordion-panel {
|
|
82
|
+
min-width: 100%;
|
|
83
|
+
}
|
|
84
|
+
.wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
|
|
66
85
|
display: none;
|
|
67
86
|
margin-block-start: 0;
|
|
68
87
|
}
|
package/build-style/style.css
CHANGED
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.wp-block-accordion-heading.wp-block-accordion-heading {
|
|
25
|
+
min-width: 100%;
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
.wp-block-accordion-heading__toggle {
|
|
25
30
|
font-family: inherit;
|
|
26
31
|
font-size: inherit;
|
|
@@ -31,21 +36,32 @@
|
|
|
31
36
|
text-decoration: inherit;
|
|
32
37
|
word-spacing: inherit;
|
|
33
38
|
font-style: inherit;
|
|
34
|
-
background: none;
|
|
35
39
|
border: none;
|
|
36
|
-
color: inherit;
|
|
37
40
|
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
38
41
|
cursor: pointer;
|
|
39
42
|
overflow: hidden;
|
|
40
43
|
display: flex;
|
|
41
44
|
align-items: center;
|
|
42
45
|
text-align: inherit;
|
|
43
|
-
position: relative;
|
|
44
46
|
width: 100%;
|
|
47
|
+
background-color: inherit !important;
|
|
48
|
+
color: inherit !important;
|
|
45
49
|
}
|
|
46
50
|
.wp-block-accordion-heading__toggle:not(:focus-visible) {
|
|
47
51
|
outline: none;
|
|
48
52
|
}
|
|
53
|
+
.wp-block-accordion-heading__toggle:hover, .wp-block-accordion-heading__toggle:focus {
|
|
54
|
+
text-decoration: none;
|
|
55
|
+
background-color: inherit !important;
|
|
56
|
+
box-shadow: none;
|
|
57
|
+
color: inherit;
|
|
58
|
+
border: none;
|
|
59
|
+
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
60
|
+
}
|
|
61
|
+
.wp-block-accordion-heading__toggle:focus-visible {
|
|
62
|
+
outline: auto;
|
|
63
|
+
outline-offset: 0;
|
|
64
|
+
}
|
|
49
65
|
.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
|
|
50
66
|
text-decoration: underline;
|
|
51
67
|
}
|
|
@@ -62,7 +78,10 @@
|
|
|
62
78
|
justify-content: center;
|
|
63
79
|
}
|
|
64
80
|
|
|
65
|
-
.wp-block-accordion-panel
|
|
81
|
+
.wp-block-accordion-panel.wp-block-accordion-panel {
|
|
82
|
+
min-width: 100%;
|
|
83
|
+
}
|
|
84
|
+
.wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
|
|
66
85
|
display: none;
|
|
67
86
|
margin-block-start: 0;
|
|
68
87
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.33.
|
|
3
|
+
"version": "9.33.8",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"@wordpress/autop": "^4.33.1",
|
|
87
87
|
"@wordpress/base-styles": "^6.9.1",
|
|
88
88
|
"@wordpress/blob": "^4.33.1",
|
|
89
|
-
"@wordpress/block-editor": "^15.6.
|
|
90
|
-
"@wordpress/blocks": "^15.6.
|
|
91
|
-
"@wordpress/components": "^30.6.
|
|
89
|
+
"@wordpress/block-editor": "^15.6.7",
|
|
90
|
+
"@wordpress/blocks": "^15.6.2",
|
|
91
|
+
"@wordpress/components": "^30.6.4",
|
|
92
92
|
"@wordpress/compose": "^7.33.1",
|
|
93
|
-
"@wordpress/core-data": "^7.33.
|
|
93
|
+
"@wordpress/core-data": "^7.33.7",
|
|
94
94
|
"@wordpress/data": "^10.33.1",
|
|
95
95
|
"@wordpress/date": "^5.33.1",
|
|
96
96
|
"@wordpress/deprecated": "^4.33.1",
|
|
@@ -105,14 +105,14 @@
|
|
|
105
105
|
"@wordpress/interactivity-router": "^2.33.1",
|
|
106
106
|
"@wordpress/keyboard-shortcuts": "^5.33.1",
|
|
107
107
|
"@wordpress/keycodes": "^4.33.1",
|
|
108
|
-
"@wordpress/latex-to-mathml": "^1.1.
|
|
108
|
+
"@wordpress/latex-to-mathml": "^1.1.2",
|
|
109
109
|
"@wordpress/notices": "^5.33.1",
|
|
110
|
-
"@wordpress/patterns": "^2.33.
|
|
110
|
+
"@wordpress/patterns": "^2.33.7",
|
|
111
111
|
"@wordpress/primitives": "^4.33.1",
|
|
112
112
|
"@wordpress/private-apis": "^1.33.1",
|
|
113
|
-
"@wordpress/reusable-blocks": "^5.33.
|
|
114
|
-
"@wordpress/rich-text": "^7.33.
|
|
115
|
-
"@wordpress/server-side-render": "^6.9.
|
|
113
|
+
"@wordpress/reusable-blocks": "^5.33.7",
|
|
114
|
+
"@wordpress/rich-text": "^7.33.2",
|
|
115
|
+
"@wordpress/server-side-render": "^6.9.4",
|
|
116
116
|
"@wordpress/url": "^4.33.1",
|
|
117
117
|
"@wordpress/viewport": "^6.33.1",
|
|
118
118
|
"@wordpress/wordcount": "^4.33.1",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"publishConfig": {
|
|
134
134
|
"access": "public"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "1c473d047a0b8f529f07cc1e23324a6be723bbc9"
|
|
137
137
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
// In many classic themes, selectors like `.entry-content h1` are used,
|
|
2
|
+
// potentially applying relatively high specificity (such as `0-1-1`) to
|
|
3
|
+
// heading elements. To properly override those styles, use a selector
|
|
4
|
+
// with a specificity of `0-2-0`.
|
|
5
|
+
.wp-block-accordion-heading.wp-block-accordion-heading {
|
|
6
|
+
// Some themes may have an explicit width. Since it's unpredictable
|
|
7
|
+
// what CSS specificity should be used to override them, ensure 100%
|
|
8
|
+
// width using min-width instead.
|
|
9
|
+
min-width: 100%;
|
|
10
|
+
// Some classic themes apply default margins to heading elements,
|
|
11
|
+
// so those styles need to be reset.
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
.wp-block-accordion-heading__toggle {
|
|
2
16
|
font-family: inherit;
|
|
3
17
|
font-size: inherit;
|
|
@@ -8,26 +22,45 @@
|
|
|
8
22
|
text-decoration: inherit;
|
|
9
23
|
word-spacing: inherit;
|
|
10
24
|
font-style: inherit;
|
|
11
|
-
background: none;
|
|
12
25
|
border: none;
|
|
13
|
-
color: inherit;
|
|
14
26
|
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
15
27
|
cursor: pointer;
|
|
16
28
|
overflow: hidden;
|
|
17
29
|
display: flex;
|
|
18
30
|
align-items: center;
|
|
19
31
|
text-align: inherit;
|
|
20
|
-
position: relative;
|
|
21
32
|
width: 100%;
|
|
22
33
|
|
|
34
|
+
// Some themes may apply colors to button elements with a particularly
|
|
35
|
+
// high CSS specificity. Since it's impossible to predict this specificity,
|
|
36
|
+
// we reset the colors using `!important`.
|
|
37
|
+
background-color: inherit !important;
|
|
38
|
+
color: inherit !important;
|
|
39
|
+
|
|
23
40
|
&:not(:focus-visible) {
|
|
24
41
|
outline: none;
|
|
25
42
|
}
|
|
26
43
|
|
|
27
|
-
&:hover
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
&:hover,
|
|
45
|
+
&:focus {
|
|
46
|
+
// Some themes may apply styles when a button element is hovered
|
|
47
|
+
// over or focused. This is not intended for accordion toggle
|
|
48
|
+
// buttons, so we reset it here.
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
background-color: inherit !important;
|
|
51
|
+
box-shadow: none;
|
|
52
|
+
color: inherit;
|
|
53
|
+
border: none;
|
|
54
|
+
padding: var(--wp--preset--spacing--20, 1em) 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:focus-visible {
|
|
58
|
+
outline: auto;
|
|
59
|
+
outline-offset: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:hover .wp-block-accordion-heading__toggle-title {
|
|
63
|
+
text-decoration: underline;
|
|
31
64
|
}
|
|
32
65
|
}
|
|
33
66
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
.wp-block
|
|
1
|
+
// Some classic themes may use selectors like `.wp-block .wp-block`
|
|
2
|
+
// and apply some kind of width to the blocks. To properly override
|
|
3
|
+
// those styles, use a selector with a specificity of `0-2-0`.
|
|
4
|
+
.wp-block-accordion-panel.wp-block-accordion-panel {
|
|
5
|
+
min-width: 100%;
|
|
6
|
+
|
|
2
7
|
// Prevent blockGap from Accordion Content block from adding extra margin between accordions.
|
|
3
8
|
&[inert],
|
|
4
9
|
&[aria-hidden="true"] {
|
package/src/heading/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import edit from './edit';
|
|
|
13
13
|
import metadata from './block.json';
|
|
14
14
|
import save from './save';
|
|
15
15
|
import transforms from './transforms';
|
|
16
|
+
import variations from './variations';
|
|
16
17
|
|
|
17
18
|
const { name } = metadata;
|
|
18
19
|
|
|
@@ -65,6 +66,7 @@ export const settings = {
|
|
|
65
66
|
},
|
|
66
67
|
edit,
|
|
67
68
|
save,
|
|
69
|
+
variations,
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
export const init = () => initBlock( { name, metadata, settings } );
|