@wordpress/block-library 9.28.1-next.0f6f9d12c.0 → 9.29.1-next.e256d081a.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/{accordions → accordion}/edit.js +1 -1
- package/build/accordion/edit.js.map +1 -0
- package/build/accordion/icon.js +33 -0
- package/build/accordion/icon.js.map +1 -0
- package/build/{accordions → accordion}/index.js +7 -10
- package/build/accordion/index.js.map +1 -0
- package/build/accordion/init.js.map +1 -0
- package/build/accordion/save.js.map +1 -0
- package/build/accordion/view.js.map +1 -0
- package/build/accordion-content/edit.js.map +1 -0
- package/build/accordion-content/icon.js +35 -0
- package/build/accordion-content/icon.js.map +1 -0
- package/build/accordion-content/icons.js.map +1 -0
- package/build/{accordion-item → accordion-content}/index.js +6 -9
- package/build/accordion-content/index.js.map +1 -0
- package/build/accordion-content/init.js.map +1 -0
- package/build/accordion-content/save.js.map +1 -0
- package/build/accordion-header/edit.js +4 -4
- package/build/accordion-header/edit.js.map +1 -1
- package/build/accordion-header/icon.js +25 -0
- package/build/accordion-header/icon.js.map +1 -0
- package/build/accordion-header/index.js +4 -7
- package/build/accordion-header/index.js.map +1 -1
- package/build/accordion-header/save.js +4 -4
- package/build/accordion-header/save.js.map +1 -1
- package/build/accordion-panel/icon.js +22 -0
- package/build/accordion-panel/icon.js.map +1 -0
- package/build/accordion-panel/index.js +4 -7
- package/build/accordion-panel/index.js.map +1 -1
- package/build/audio/edit.js +3 -1
- package/build/audio/edit.js.map +1 -1
- package/build/form/deprecated.js +97 -0
- package/build/form/deprecated.js.map +1 -0
- package/build/form/index.js +2 -1
- package/build/form/index.js.map +1 -1
- package/build/form/save.js +0 -1
- package/build/form/save.js.map +1 -1
- package/build/gallery/edit.js +9 -3
- package/build/gallery/edit.js.map +1 -1
- package/build/image/edit.js +0 -5
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +1 -1
- package/build/image/image.js.map +1 -1
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/build/post-comments-link/edit.js +6 -1
- package/build/post-comments-link/edit.js.map +1 -1
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/query-content.js +7 -6
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +30 -9
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +4 -2
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/template-part/edit/placeholder.js +2 -1
- package/build/template-part/edit/placeholder.js.map +1 -1
- package/build/video/edit-common-settings.js +6 -3
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +3 -1
- package/build/video/edit.js.map +1 -1
- package/build-module/{accordions → accordion}/edit.js +1 -1
- package/build-module/accordion/edit.js.map +1 -0
- package/build-module/accordion/icon.js +27 -0
- package/build-module/accordion/icon.js.map +1 -0
- package/build-module/{accordions → accordion}/index.js +7 -10
- package/build-module/accordion/index.js.map +1 -0
- package/build-module/accordion/init.js.map +1 -0
- package/build-module/accordion/save.js.map +1 -0
- package/build-module/accordion/view.js.map +1 -0
- package/build-module/accordion-content/edit.js.map +1 -0
- package/build-module/accordion-content/icon.js +29 -0
- package/build-module/accordion-content/icon.js.map +1 -0
- package/build-module/accordion-content/icons.js.map +1 -0
- package/build-module/{accordion-item → accordion-content}/index.js +6 -9
- package/build-module/accordion-content/index.js.map +1 -0
- package/build-module/accordion-content/init.js.map +1 -0
- package/build-module/accordion-content/save.js.map +1 -0
- package/build-module/accordion-header/edit.js +4 -4
- package/build-module/accordion-header/edit.js.map +1 -1
- package/build-module/accordion-header/icon.js +19 -0
- package/build-module/accordion-header/icon.js.map +1 -0
- package/build-module/accordion-header/index.js +4 -7
- package/build-module/accordion-header/index.js.map +1 -1
- package/build-module/accordion-header/save.js +4 -4
- package/build-module/accordion-header/save.js.map +1 -1
- package/build-module/accordion-panel/icon.js +16 -0
- package/build-module/accordion-panel/icon.js.map +1 -0
- package/build-module/accordion-panel/index.js +4 -7
- package/build-module/accordion-panel/index.js.map +1 -1
- package/build-module/audio/edit.js +4 -2
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/form/deprecated.js +90 -0
- package/build-module/form/deprecated.js.map +1 -0
- package/build-module/form/index.js +2 -1
- package/build-module/form/index.js.map +1 -1
- package/build-module/form/save.js +0 -1
- package/build-module/form/save.js.map +1 -1
- package/build-module/gallery/edit.js +9 -3
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/image/edit.js +0 -5
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +1 -1
- package/build-module/image/image.js.map +1 -1
- package/build-module/index.js +4 -4
- package/build-module/index.js.map +1 -1
- package/build-module/post-comments-link/edit.js +6 -1
- package/build-module/post-comments-link/edit.js.map +1 -1
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +8 -7
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +30 -10
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +4 -2
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +2 -1
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/video/edit-common-settings.js +6 -3
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +4 -2
- package/build-module/video/edit.js.map +1 -1
- package/build-style/{accordions → accordion}/style-rtl.css +13 -13
- package/build-style/{accordions → accordion}/style.css +13 -13
- package/build-style/editor-rtl.css +4 -0
- package/build-style/editor.css +4 -0
- package/build-style/query/editor-rtl.css +4 -0
- package/build-style/query/editor.css +4 -0
- package/build-style/style-rtl.css +13 -13
- package/build-style/style.css +13 -13
- package/package.json +36 -36
- package/src/{accordions → accordion}/block.json +5 -5
- package/src/{accordions → accordion}/edit.js +1 -1
- package/src/accordion/icon.js +23 -0
- package/src/{accordion-item → accordion}/index.js +2 -5
- package/src/{accordions → accordion}/index.php +12 -12
- package/src/{accordions → accordion}/style.scss +13 -13
- package/src/{accordion-item → accordion-content}/block.json +4 -4
- package/src/accordion-content/icon.js +28 -0
- package/src/{accordions → accordion-content}/index.js +2 -5
- package/src/{accordion-item → accordion-content}/index.php +10 -10
- package/src/accordion-header/block.json +2 -2
- package/src/accordion-header/edit.js +9 -6
- package/src/accordion-header/icon.js +16 -0
- package/src/accordion-header/index.js +2 -5
- package/src/accordion-header/save.js +4 -4
- package/src/accordion-panel/block.json +2 -2
- package/src/accordion-panel/icon.js +15 -0
- package/src/accordion-panel/index.js +2 -5
- package/src/audio/edit.js +6 -1
- package/src/form/block.json +0 -1
- package/src/form/deprecated.js +96 -0
- package/src/form/index.js +2 -0
- package/src/form/save.js +0 -1
- package/src/gallery/edit.js +9 -3
- package/src/image/edit.js +0 -6
- package/src/image/image.js +2 -1
- package/src/index.js +4 -4
- package/src/navigation/edit/test/navigation-menu-selector.js +2 -2
- package/src/post-comments-link/edit.js +7 -1
- package/src/query/edit/index.js +1 -0
- package/src/query/edit/query-content.js +8 -4
- package/src/query/edit/query-placeholder.js +47 -17
- package/src/query/edit/query-toolbar.js +10 -2
- package/src/query/editor.scss +6 -1
- package/src/social-link/README.md +4 -1
- package/src/style.scss +1 -1
- package/src/template-part/edit/placeholder.js +2 -1
- package/src/video/edit-common-settings.js +14 -5
- package/src/video/edit.js +6 -1
- package/build/accordion-item/edit.js.map +0 -1
- package/build/accordion-item/icons.js.map +0 -1
- package/build/accordion-item/index.js.map +0 -1
- package/build/accordion-item/init.js.map +0 -1
- package/build/accordion-item/save.js.map +0 -1
- package/build/accordions/edit.js.map +0 -1
- package/build/accordions/index.js.map +0 -1
- package/build/accordions/init.js.map +0 -1
- package/build/accordions/save.js.map +0 -1
- package/build/accordions/view.js.map +0 -1
- package/build-module/accordion-item/edit.js.map +0 -1
- package/build-module/accordion-item/icons.js.map +0 -1
- package/build-module/accordion-item/index.js.map +0 -1
- package/build-module/accordion-item/init.js.map +0 -1
- package/build-module/accordion-item/save.js.map +0 -1
- package/build-module/accordions/edit.js.map +0 -1
- package/build-module/accordions/index.js.map +0 -1
- package/build-module/accordions/init.js.map +0 -1
- package/build-module/accordions/save.js.map +0 -1
- package/build-module/accordions/view.js.map +0 -1
- /package/build/{accordions → accordion}/init.js +0 -0
- /package/build/{accordions → accordion}/save.js +0 -0
- /package/build/{accordions → accordion}/view.js +0 -0
- /package/build/{accordion-item → accordion-content}/edit.js +0 -0
- /package/build/{accordion-item → accordion-content}/icons.js +0 -0
- /package/build/{accordion-item → accordion-content}/init.js +0 -0
- /package/build/{accordion-item → accordion-content}/save.js +0 -0
- /package/build-module/{accordions → accordion}/init.js +0 -0
- /package/build-module/{accordions → accordion}/save.js +0 -0
- /package/build-module/{accordions → accordion}/view.js +0 -0
- /package/build-module/{accordion-item → accordion-content}/edit.js +0 -0
- /package/build-module/{accordion-item → accordion-content}/icons.js +0 -0
- /package/build-module/{accordion-item → accordion-content}/init.js +0 -0
- /package/build-module/{accordion-item → accordion-content}/save.js +0 -0
- /package/src/{accordions → accordion}/init.js +0 -0
- /package/src/{accordions → accordion}/save.js +0 -0
- /package/src/{accordions → accordion}/view.js +0 -0
- /package/src/{accordion-item → accordion-content}/edit.js +0 -0
- /package/src/{accordion-item → accordion-content}/icons.js +0 -0
- /package/src/{accordion-item → accordion-content}/init.js +0 -0
- /package/src/{accordion-item → accordion-content}/save.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -17,7 +17,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
* Internal dependencies
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
const ACCORDION_BLOCK_NAME = 'core/accordion-
|
|
20
|
+
const ACCORDION_BLOCK_NAME = 'core/accordion-content';
|
|
21
21
|
const ACCORDION_BLOCK = {
|
|
22
22
|
name: ACCORDION_BLOCK_NAME
|
|
23
23
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_i18n","_components","_hooks","_jsxRuntime","ACCORDION_BLOCK_NAME","ACCORDION_BLOCK","name","Edit","attributes","autoclose","iconPosition","showIcon","setAttributes","blockProps","useBlockProps","dropdownMenuProps","useToolsPanelDropdownMenuProps","innerBlocksProps","useInnerBlocksProps","template","defaultBlock","directInsert","templateInsertUpdatesSelection","jsxs","Fragment","children","jsx","InspectorControls","__experimentalToolsPanel","label","__","resetAll","__experimentalToolsPanelItem","isShownByDefault","hasValue","onDeselect","ToggleControl","isBlock","__nextHasNoMarginBottom","onChange","value","checked","help","__experimentalToggleGroupControl","__next40pxDefaultSize","__experimentalToggleGroupControlOption"],"sources":["@wordpress/block-library/src/accordion/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst ACCORDION_BLOCK_NAME = 'core/accordion-content';\nconst ACCORDION_BLOCK = {\n\tname: ACCORDION_BLOCK_NAME,\n};\n\nexport default function Edit( {\n\tattributes: { autoclose, iconPosition, showIcon },\n\tsetAttributes,\n} ) {\n\tconst blockProps = useBlockProps();\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: [ [ ACCORDION_BLOCK_NAME ], [ ACCORDION_BLOCK_NAME ] ],\n\t\tdefaultBlock: ACCORDION_BLOCK,\n\t\tdirectInsert: true,\n\t\ttemplateInsertUpdatesSelection: true,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls key=\"setting\">\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\tautoclose: false,\n\t\t\t\t\t\t\tshowIcon: true,\n\t\t\t\t\t\t\ticonPosition: 'right',\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\tlabel={ __( 'Auto-close' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! autoclose }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { autoclose: 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\tisBlock\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Auto-close' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tautoclose: value,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tchecked={ autoclose }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Automatically close accordions when a new one is opened.'\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\tlabel={ __( 'Show icon' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => ! showIcon }\n\t\t\t\t\t\tonDeselect={ () => setAttributes( { showIcon: true } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Show icon' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tshowIcon: value,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tchecked={ showIcon }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Display a plus icon next to the accordion header.'\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\tlabel={ __( 'Icon Position' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => iconPosition !== 'right' }\n\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\tsetAttributes( { iconPosition: 'right' } )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tlabel={ __( 'Icon Position' ) }\n\t\t\t\t\t\t\tvalue={ iconPosition }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { iconPosition: value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\tlabel={ __( 'Left' ) }\n\t\t\t\t\t\t\t\tvalue=\"left\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\tlabel={ __( 'Right' ) }\n\t\t\t\t\t\t\t\tvalue=\"right\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>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
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _primitives = require("@wordpress/primitives");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* WordPress dependencies
|
|
11
|
+
*/
|
|
12
|
+
var _default = exports.default = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SVG, {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
21
|
+
d: "M4.5 6L8.5 8.5L4.5 11L4.5 6Z",
|
|
22
|
+
fill: "currentColor"
|
|
23
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z",
|
|
27
|
+
fill: "currentColor"
|
|
28
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
29
|
+
d: "M4.5 13L8.5 15.5L4.5 18L4.5 13Z",
|
|
30
|
+
fill: "currentColor"
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_primitives","require","_jsxRuntime","_default","exports","default","jsxs","SVG","xmlns","viewBox","children","jsx","Path","fillRule","clipRule","d","fill"],"sources":["@wordpress/block-library/src/accordion/icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z\"\n\t\t\tfill=\"currentColor\"\n\t\t/>\n\t\t<Path d=\"M4.5 6L8.5 8.5L4.5 11L4.5 6Z\" fill=\"currentColor\" />\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z\"\n\t\t\tfill=\"currentColor\"\n\t\t/>\n\t\t<Path d=\"M4.5 13L8.5 15.5L4.5 18L4.5 13Z\" fill=\"currentColor\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAkD,IAAAC,WAAA,GAAAD,OAAA;AAHlD;AACA;AACA;AAFA,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,gBAMC,IAAAH,WAAA,CAAAI,IAAA,EAACN,WAAA,CAAAO,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,gBAC1D,IAAAR,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IACJC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,mDAAmD;IACrDC,IAAI,EAAC;EAAc,CACnB,CAAC,eACF,IAAAd,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IAACG,CAAC,EAAC,8BAA8B;IAACC,IAAI,EAAC;EAAc,CAAE,CAAC,eAC7D,IAAAd,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IACJC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,wDAAwD;IAC1DC,IAAI,EAAC;EAAc,CACnB,CAAC,eACF,IAAAd,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IAACG,CAAC,EAAC,iCAAiC;IAACC,IAAI,EAAC;EAAc,CAAE,CAAC;AAAA,CAC5D,CAAC","ignoreList":[]}
|
|
@@ -5,23 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.settings = exports.name = exports.metadata = exports.init = void 0;
|
|
8
|
-
var _icons = require("@wordpress/icons");
|
|
9
8
|
var _edit = _interopRequireDefault(require("./edit"));
|
|
10
9
|
var _save = _interopRequireDefault(require("./save"));
|
|
11
10
|
var _initBlock = _interopRequireDefault(require("../utils/init-block"));
|
|
12
|
-
|
|
13
|
-
* WordPress dependencies
|
|
14
|
-
*/
|
|
11
|
+
var _icon = _interopRequireDefault(require("./icon"));
|
|
15
12
|
/**
|
|
16
13
|
* Internal dependencies
|
|
17
14
|
*/
|
|
18
15
|
const metadata = exports.metadata = {
|
|
19
16
|
$schema: "https://schemas.wp.org/trunk/block.json",
|
|
20
17
|
apiVersion: 3,
|
|
21
|
-
name: "core/
|
|
22
|
-
title: "
|
|
18
|
+
name: "core/accordion",
|
|
19
|
+
title: "Accordion",
|
|
23
20
|
category: "design",
|
|
24
|
-
description: "
|
|
21
|
+
description: "Displays a group of accordion headers and associated expandable content.",
|
|
25
22
|
example: {},
|
|
26
23
|
__experimental: true,
|
|
27
24
|
supports: {
|
|
@@ -80,16 +77,16 @@ const metadata = exports.metadata = {
|
|
|
80
77
|
"core/accordion-icon-position": "iconPosition",
|
|
81
78
|
"core/accordion-show-icon": "showIcon"
|
|
82
79
|
},
|
|
83
|
-
allowedBlocks: ["core/accordion-
|
|
80
|
+
allowedBlocks: ["core/accordion-content"],
|
|
84
81
|
textdomain: "default",
|
|
85
|
-
style: "wp-block-
|
|
82
|
+
style: "wp-block-accordion"
|
|
86
83
|
};
|
|
87
84
|
const {
|
|
88
85
|
name
|
|
89
86
|
} = metadata;
|
|
90
87
|
exports.name = name;
|
|
91
88
|
const settings = exports.settings = {
|
|
92
|
-
icon:
|
|
89
|
+
icon: _icon.default,
|
|
93
90
|
example: {},
|
|
94
91
|
edit: _edit.default,
|
|
95
92
|
save: _save.default
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_edit","_interopRequireDefault","require","_save","_initBlock","_icon","metadata","exports","$schema","apiVersion","name","title","category","description","example","__experimental","supports","html","align","background","backgroundImage","backgroundSize","__experimentalDefaultControls","color","gradient","__experimentalBorder","radius","style","width","spacing","padding","margin","blockGap","shadow","layout","interactivity","attributes","iconPosition","type","showIcon","autoclose","allowedBlocks","providesContext","textdomain","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/accordion/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport save from './save';\nimport metadata from './block.json';\nimport initBlock from '../utils/init-block';\nimport icon from './icon';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAPA;AACA;AACA;AAFA,MAAAI,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,OAAA;EAAAC,cAAA;EAAAC,QAAA;IAAAC,IAAA;IAAAC,KAAA;IAAAC,UAAA;MAAAC,eAAA;MAAAC,cAAA;MAAAC,6BAAA;QAAAF,eAAA;MAAA;IAAA;IAAAG,KAAA;MAAAJ,UAAA;MAAAK,QAAA;IAAA;IAAAC,oBAAA;MAAAF,KAAA;MAAAG,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAN,6BAAA;QAAAC,KAAA;QAAAG,MAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,QAAA;IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,aAAA;EAAA;EAAAC,UAAA;IAAAC,YAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,QAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,SAAA;MAAAF,IAAA;MAAA;IAAA;IAAAG,aAAA;MAAAH,IAAA;IAAA;EAAA;EAAAI,eAAA;IAAA;IAAA;EAAA;EAAAD,aAAA;EAAAE,UAAA;EAAAhB,KAAA;AAAA;AASA,MAAM;EAAEjB;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAMkC,QAAQ,GAAArC,OAAA,CAAAqC,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJ/B,OAAO,EAAE,CAAC,CAAC;EACXgC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEvC,IAAI;EAAEJ,QAAQ;EAAEsC;AAAS,CAAE,CAAC;AAACrC,OAAA,CAAAyC,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_","require","_default","exports","default","init"],"sources":["@wordpress/block-library/src/accordion/init.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { init } from './';\n\nexport default init();\n"],"mappings":";;;;;;AAGA,IAAAA,CAAA,GAAAC,OAAA;AAHA;AACA;AACA;AAFA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKe,IAAAC,MAAI,EAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_jsxRuntime","save","attributes","iconPosition","blockProps","useBlockProps","className","clsx","jsx","useInnerBlocksProps"],"sources":["@wordpress/block-library/src/accordion/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { iconPosition } = attributes;\n\tconst blockProps = useBlockProps.save();\n\tconst className = clsx(\n\t\t{\n\t\t\t'icon-position-left': iconPosition === 'left',\n\t\t},\n\t\tblockProps.className\n\t);\n\n\treturn (\n\t\t<div { ...useInnerBlocksProps.save( { ...blockProps, className } ) } />\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,YAAA,GAAAD,OAAA;AAA6E,IAAAE,WAAA,GAAAF,OAAA;AAP7E;AACA;AACA;;AAEA;AACA;AACA;;AAGe,SAASG,IAAIA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC9C,MAAM;IAAEC;EAAa,CAAC,GAAGD,UAAU;EACnC,MAAME,UAAU,GAAGC,0BAAa,CAACJ,IAAI,CAAC,CAAC;EACvC,MAAMK,SAAS,GAAG,IAAAC,aAAI,EACrB;IACC,oBAAoB,EAAEJ,YAAY,KAAK;EACxC,CAAC,EACDC,UAAU,CAACE,SACZ,CAAC;EAED,oBACC,IAAAN,WAAA,CAAAQ,GAAA;IAAA,GAAUC,gCAAmB,CAACR,IAAI,CAAE;MAAE,GAAGG,UAAU;MAAEE;IAAU,CAAE;EAAC,CAAI,CAAC;AAEzE","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_interactivity","require","state","store","isOpen","id","getContext","includes","actions","toggle","context","autoclose","filter","item","push","callbacks","initIsOpen","openByDefault"],"sources":["@wordpress/block-library/src/accordion/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, getContext } from '@wordpress/interactivity';\n\nconst { state } = store( 'core/accordion', {\n\tstate: {\n\t\tget isOpen() {\n\t\t\tconst { isOpen, id } = getContext();\n\t\t\treturn isOpen.includes( id );\n\t\t},\n\t},\n\tactions: {\n\t\ttoggle: () => {\n\t\t\tconst context = getContext();\n\t\t\tconst { id, autoclose } = context;\n\n\t\t\tif ( autoclose ) {\n\t\t\t\tcontext.isOpen = state.isOpen ? [] : [ id ];\n\t\t\t} else if ( state.isOpen ) {\n\t\t\t\tcontext.isOpen = context.isOpen.filter(\n\t\t\t\t\t( item ) => item !== id\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tcontext.isOpen.push( id );\n\t\t\t}\n\t\t},\n\t},\n\tcallbacks: {\n\t\tinitIsOpen: () => {\n\t\t\tconst context = getContext();\n\t\t\tconst { id, openByDefault } = context;\n\t\t\tif ( openByDefault ) {\n\t\t\t\tcontext.isOpen.push( id );\n\t\t\t}\n\t\t},\n\t},\n} );\n"],"mappings":";;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAM;EAAEC;AAAM,CAAC,GAAG,IAAAC,oBAAK,EAAE,gBAAgB,EAAE;EAC1CD,KAAK,EAAE;IACN,IAAIE,MAAMA,CAAA,EAAG;MACZ,MAAM;QAAEA,MAAM;QAAEC;MAAG,CAAC,GAAG,IAAAC,yBAAU,EAAC,CAAC;MACnC,OAAOF,MAAM,CAACG,QAAQ,CAAEF,EAAG,CAAC;IAC7B;EACD,CAAC;EACDG,OAAO,EAAE;IACRC,MAAM,EAAEA,CAAA,KAAM;MACb,MAAMC,OAAO,GAAG,IAAAJ,yBAAU,EAAC,CAAC;MAC5B,MAAM;QAAED,EAAE;QAAEM;MAAU,CAAC,GAAGD,OAAO;MAEjC,IAAKC,SAAS,EAAG;QAChBD,OAAO,CAACN,MAAM,GAAGF,KAAK,CAACE,MAAM,GAAG,EAAE,GAAG,CAAEC,EAAE,CAAE;MAC5C,CAAC,MAAM,IAAKH,KAAK,CAACE,MAAM,EAAG;QAC1BM,OAAO,CAACN,MAAM,GAAGM,OAAO,CAACN,MAAM,CAACQ,MAAM,CACnCC,IAAI,IAAMA,IAAI,KAAKR,EACtB,CAAC;MACF,CAAC,MAAM;QACNK,OAAO,CAACN,MAAM,CAACU,IAAI,CAAET,EAAG,CAAC;MAC1B;IACD;EACD,CAAC;EACDU,SAAS,EAAE;IACVC,UAAU,EAAEA,CAAA,KAAM;MACjB,MAAMN,OAAO,GAAG,IAAAJ,yBAAU,EAAC,CAAC;MAC5B,MAAM;QAAED,EAAE;QAAEY;MAAc,CAAC,GAAGP,OAAO;MACrC,IAAKO,aAAa,EAAG;QACpBP,OAAO,CAACN,MAAM,CAACU,IAAI,CAAET,EAAG,CAAC;MAC1B;IACD;EACD;AACD,CAAE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blockEditor","_data","_element","_components","_clsx","_interopRequireDefault","_hooks","_jsxRuntime","Edit","attributes","openByDefault","clientId","setAttributes","dropdownMenuProps","useToolsPanelDropdownMenuProps","isSelected","getBlockOrder","useSelect","select","isBlockSelected","hasSelectedInnerBlock","getBlockOrderSelector","blockEditorStore","contentBlockClientId","updateBlockAttributes","__unstableMarkNextChangeAsNotPersistent","useDispatch","useEffect","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps","className","clsx","template","templateLock","directInsert","templateInsertUpdatesSelection","jsxs","Fragment","children","jsx","InspectorControls","__experimentalToolsPanel","label","__","resetAll","__experimentalToolsPanelItem","isShownByDefault","hasValue","onDeselect","ToggleControl","__nextHasNoMarginBottom","onChange","value","checked","help"],"sources":["@wordpress/block-library/src/accordion-content/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport {\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nexport default function Edit( {\n\tattributes: { openByDefault },\n\tclientId,\n\tsetAttributes,\n} ) {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst { isSelected, getBlockOrder } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisBlockSelected,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tgetBlockOrder: getBlockOrderSelector,\n\t\t\t} = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tisSelected:\n\t\t\t\t\tisBlockSelected( clientId ) ||\n\t\t\t\t\thasSelectedInnerBlock( clientId, true ),\n\t\t\t\tgetBlockOrder: getBlockOrderSelector,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst contentBlockClientId = getBlockOrder( clientId )[ 1 ];\n\tconst { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( contentBlockClientId ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tupdateBlockAttributes( contentBlockClientId, {\n\t\t\t\tisSelected,\n\t\t\t} );\n\t\t}\n\t}, [\n\t\tisSelected,\n\t\tcontentBlockClientId,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\tupdateBlockAttributes,\n\t] );\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\t...blockProps,\n\t\t\tclassName: clsx( blockProps.className, {\n\t\t\t\t'is-open': openByDefault || isSelected,\n\t\t\t} ),\n\t\t},\n\t\t{\n\t\t\ttemplate: [\n\t\t\t\t[ 'core/accordion-header', {} ],\n\t\t\t\t[\n\t\t\t\t\t'core/accordion-panel',\n\t\t\t\t\t{\n\t\t\t\t\t\topenByDefault,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t],\n\t\t\ttemplateLock: 'all',\n\t\t\tdirectInsert: true,\n\t\t\ttemplateInsertUpdatesSelection: true,\n\t\t}\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls key=\"setting\">\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( { openByDefault: false } );\n\t\t\t\t\t\tif ( contentBlockClientId ) {\n\t\t\t\t\t\t\tupdateBlockAttributes( contentBlockClientId, {\n\t\t\t\t\t\t\t\topenByDefault: false,\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\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\thasValue={ () => !! openByDefault }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( { openByDefault: false } );\n\t\t\t\t\t\t\tif ( contentBlockClientId ) {\n\t\t\t\t\t\t\t\tupdateBlockAttributes( contentBlockClientId, {\n\t\t\t\t\t\t\t\t\topenByDefault: false,\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>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\topenByDefault: value,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tif ( contentBlockClientId ) {\n\t\t\t\t\t\t\t\t\tupdateBlockAttributes(\n\t\t\t\t\t\t\t\t\t\tcontentBlockClientId,\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\topenByDefault: value,\n\t\t\t\t\t\t\t\t\t\t}\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} }\n\t\t\t\t\t\t\tchecked={ openByDefault }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Accordion content will be displayed by default.'\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<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAQA,IAAAK,KAAA,GAAAC,sBAAA,CAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AAAgE,IAAAQ,WAAA,GAAAR,OAAA;AAzBhE;AACA;AACA;;AAeA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASS,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IAAEC;EAAc,CAAC;EAC7BC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,iBAAiB,GAAG,IAAAC,qCAA8B,EAAC,CAAC;EAE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;kBACCb,aAAa,EAAE4C;gBAChB,CACD,CAAC;cACF;YACD,CAAG;YACHC,OAAO,EAAG7C,aAAe;YACzB8C,IAAI,EAAG,IAAAX,QAAE,EACR,iDACD;UAAG,CACH;QAAC,CACa;MAAC,CACN;IAAC,GAhDS,SAiDJ,CAAC,eACpB,IAAAtC,WAAA,CAAAkC,GAAA;MAAA,GAAUX;IAAgB,CAAI,CAAC;EAAA,CAC9B,CAAC;AAEL","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _primitives = require("@wordpress/primitives");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* WordPress dependencies
|
|
11
|
+
*/
|
|
12
|
+
var _default = exports.default = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SVG, {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
21
|
+
fillRule: "evenodd",
|
|
22
|
+
clipRule: "evenodd",
|
|
23
|
+
d: "M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z",
|
|
24
|
+
fill: "currentColor"
|
|
25
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
26
|
+
fillRule: "evenodd",
|
|
27
|
+
clipRule: "evenodd",
|
|
28
|
+
d: "M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z",
|
|
29
|
+
fill: "currentColor"
|
|
30
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
31
|
+
d: "M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z",
|
|
32
|
+
fill: "currentColor"
|
|
33
|
+
})]
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_primitives","require","_jsxRuntime","_default","exports","default","jsxs","SVG","xmlns","viewBox","children","jsx","Path","fillRule","clipRule","d","fill"],"sources":["@wordpress/block-library/src/accordion-content/icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z\"\n\t\t\tfill=\"currentColor\"\n\t\t/>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z\"\n\t\t\tfill=\"currentColor\"\n\t\t/>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z\"\n\t\t\tfill=\"currentColor\"\n\t\t/>\n\t\t<Path d=\"M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z\" fill=\"currentColor\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAkD,IAAAC,WAAA,GAAAD,OAAA;AAHlD;AACA;AACA;AAFA,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,gBAMC,IAAAH,WAAA,CAAAI,IAAA,EAACN,WAAA,CAAAO,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,gBAC1D,IAAAR,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IACJC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,0CAA0C;IAC5CC,IAAI,EAAC;EAAc,CACnB,CAAC,eACF,IAAAd,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IACJC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,6CAA6C;IAC/CC,IAAI,EAAC;EAAc,CACnB,CAAC,eACF,IAAAd,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IACJC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,kEAAkE;IACpEC,IAAI,EAAC;EAAc,CACnB,CAAC,eACF,IAAAd,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IAACG,CAAC,EAAC,wCAAwC;IAACC,IAAI,EAAC;EAAc,CAAE,CAAC;AAAA,CACnE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_element","require","plus","width","height","createElement","style","display","lineHeight","textAlign","fontSize","fontWeight","color","exports"],"sources":["@wordpress/block-library/src/accordion-content/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createElement } from '@wordpress/element';\n\nexport const plus = ( { width, height } ) => {\n\treturn createElement(\n\t\t'span',\n\t\t{\n\t\t\tstyle: {\n\t\t\t\tdisplay: 'inline-block',\n\t\t\t\twidth: width || 24,\n\t\t\t\theight: height || 24,\n\t\t\t\tlineHeight: `${ height || 24 }px`,\n\t\t\t\ttextAlign: 'center',\n\t\t\t\tfontSize: `${ ( height || 24 ) * 0.6 }px`,\n\t\t\t\tfontWeight: 'bold',\n\t\t\t\tcolor: 'currentColor',\n\t\t\t},\n\t\t},\n\t\t'+'\n\t);\n};\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,IAAI,GAAGA,CAAE;EAAEC,KAAK;EAAEC;AAAO,CAAC,KAAM;EAC5C,OAAO,IAAAC,sBAAa,EACnB,MAAM,EACN;IACCC,KAAK,EAAE;MACNC,OAAO,EAAE,cAAc;MACvBJ,KAAK,EAAEA,KAAK,IAAI,EAAE;MAClBC,MAAM,EAAEA,MAAM,IAAI,EAAE;MACpBI,UAAU,EAAE,GAAIJ,MAAM,IAAI,EAAE,IAAK;MACjCK,SAAS,EAAE,QAAQ;MACnBC,QAAQ,EAAE,GAAI,CAAEN,MAAM,IAAI,EAAE,IAAK,GAAG,IAAK;MACzCO,UAAU,EAAE,MAAM;MAClBC,KAAK,EAAE;IACR;EACD,CAAC,EACD,GACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAX,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -5,27 +5,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.settings = exports.name = exports.metadata = exports.init = void 0;
|
|
8
|
-
var _icons = require("@wordpress/icons");
|
|
9
8
|
var _edit = _interopRequireDefault(require("./edit"));
|
|
10
9
|
var _save = _interopRequireDefault(require("./save"));
|
|
11
10
|
var _initBlock = _interopRequireDefault(require("../utils/init-block"));
|
|
12
|
-
|
|
13
|
-
* WordPress dependencies
|
|
14
|
-
*/
|
|
11
|
+
var _icon = _interopRequireDefault(require("./icon"));
|
|
15
12
|
/**
|
|
16
13
|
* Internal dependencies
|
|
17
14
|
*/
|
|
18
15
|
const metadata = exports.metadata = {
|
|
19
16
|
$schema: "https://schemas.wp.org/trunk/block.json",
|
|
20
17
|
apiVersion: 3,
|
|
21
|
-
name: "core/accordion-
|
|
18
|
+
name: "core/accordion-content",
|
|
22
19
|
version: "0.1.0",
|
|
23
|
-
title: "Accordion",
|
|
20
|
+
title: "Accordion Content",
|
|
24
21
|
category: "design",
|
|
25
|
-
description: "
|
|
22
|
+
description: "Displays a section of content in an accordion, including a header and expandable content.",
|
|
26
23
|
example: {},
|
|
27
24
|
__experimental: true,
|
|
28
|
-
parent: ["core/
|
|
25
|
+
parent: ["core/accordion"],
|
|
29
26
|
allowedBlocks: ["core/accordion-header", "core/accordion-panel"],
|
|
30
27
|
supports: {
|
|
31
28
|
align: ["wide", "full"],
|
|
@@ -65,7 +62,7 @@ const {
|
|
|
65
62
|
} = metadata;
|
|
66
63
|
exports.name = name;
|
|
67
64
|
const settings = exports.settings = {
|
|
68
|
-
icon:
|
|
65
|
+
icon: _icon.default,
|
|
69
66
|
example: {},
|
|
70
67
|
edit: _edit.default,
|
|
71
68
|
save: _save.default
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_edit","_interopRequireDefault","require","_save","_initBlock","_icon","metadata","exports","$schema","apiVersion","name","version","title","category","description","example","__experimental","parent","allowedBlocks","supports","align","color","background","gradient","interactivity","spacing","margin","blockGap","__experimentalBorder","radius","style","width","__experimentalDefaultControls","shadow","attributes","openByDefault","type","textdomain","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/accordion-content/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport save from './save';\nimport metadata from './block.json';\nimport initBlock from '../utils/init-block';\nimport icon from './icon';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAPA;AACA;AACA;AAFA,MAAAI,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,OAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,OAAA;EAAAC,cAAA;EAAAC,MAAA;EAAAC,aAAA;EAAAC,QAAA;IAAAC,KAAA;IAAAC,KAAA;MAAAC,UAAA;MAAAC,QAAA;IAAA;IAAAC,aAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,QAAA;IAAA;IAAAC,oBAAA;MAAAP,KAAA;MAAAQ,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAC,6BAAA;QAAAX,KAAA;QAAAQ,MAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAE,MAAA;EAAA;EAAAC,UAAA;IAAAC,aAAA;MAAAC,IAAA;MAAA;IAAA;EAAA;EAAAC,UAAA;AAAA;AASA,MAAM;EAAE3B;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAM4B,QAAQ,GAAA/B,OAAA,CAAA+B,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJxB,OAAO,EAAE,CAAC,CAAC;EACXyB,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEjC,IAAI;EAAEJ,QAAQ;EAAEgC;AAAS,CAAE,CAAC;AAAC/B,OAAA,CAAAmC,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_","require","_default","exports","default","init"],"sources":["@wordpress/block-library/src/accordion-content/init.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { init } from './';\n\nexport default init();\n"],"mappings":";;;;;;AAGA,IAAAA,CAAA,GAAAC,OAAA;AAHA;AACA;AACA;AAFA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKe,IAAAC,MAAI,EAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_clsx","_interopRequireDefault","_jsxRuntime","save","attributes","openByDefault","blockProps","useBlockProps","className","clsx","innerBlocksProps","useInnerBlocksProps","jsx"],"sources":["@wordpress/block-library/src/accordion-content/save.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nexport default function save( { attributes } ) {\n\tconst { openByDefault } = attributes;\n\tconst blockProps = useBlockProps.save();\n\tconst className = clsx(\n\t\t{\n\t\t\t'is-open': openByDefault,\n\t\t},\n\t\tblockProps.className\n\t);\n\tconst innerBlocksProps = useInnerBlocksProps.save( {\n\t\t...blockProps,\n\t\tclassName,\n\t} );\n\n\treturn <div { ...innerBlocksProps } />;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAwB,IAAAG,WAAA,GAAAH,OAAA;AAPxB;AACA;AACA;;AAEA;AACA;AACA;;AAGe,SAASI,IAAIA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC9C,MAAM;IAAEC;EAAc,CAAC,GAAGD,UAAU;EACpC,MAAME,UAAU,GAAGC,0BAAa,CAACJ,IAAI,CAAC,CAAC;EACvC,MAAMK,SAAS,GAAG,IAAAC,aAAI,EACrB;IACC,SAAS,EAAEJ;EACZ,CAAC,EACDC,UAAU,CAACE,SACZ,CAAC;EACD,MAAME,gBAAgB,GAAGC,gCAAmB,CAACR,IAAI,CAAE;IAClD,GAAGG,UAAU;IACbE;EACD,CAAE,CAAC;EAEH,oBAAO,IAAAN,WAAA,CAAAU,GAAA;IAAA,GAAUF;EAAgB,CAAI,CAAC;AACvC","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ var _i18n = require("@wordpress/i18n");
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
var _blockEditor = require("@wordpress/block-editor");
|
|
12
12
|
var _components = require("@wordpress/components");
|
|
13
|
-
var _icons = require("../accordion-
|
|
13
|
+
var _icons = require("../accordion-content/icons");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
/**
|
|
16
16
|
* External dependencies
|
|
@@ -73,7 +73,7 @@ function Edit({
|
|
|
73
73
|
})
|
|
74
74
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(TagName, {
|
|
75
75
|
...blockProps,
|
|
76
|
-
className: (0, _clsx.default)(blockProps.className, colorProps.className, borderProps.className, 'accordion-
|
|
76
|
+
className: (0, _clsx.default)(blockProps.className, colorProps.className, borderProps.className, 'accordion-content__heading', {
|
|
77
77
|
[`has-custom-font-size`]: blockProps.style.fontSize,
|
|
78
78
|
[`icon-position-left`]: iconPosition === 'left',
|
|
79
79
|
[`has-text-align-${textAlign}`]: textAlign
|
|
@@ -84,7 +84,7 @@ function Edit({
|
|
|
84
84
|
...shadowProps.style
|
|
85
85
|
},
|
|
86
86
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
87
|
-
className: (0, _clsx.default)('accordion-
|
|
87
|
+
className: (0, _clsx.default)('accordion-content__toggle'),
|
|
88
88
|
style: {
|
|
89
89
|
...spacingProps.style
|
|
90
90
|
},
|
|
@@ -98,7 +98,7 @@ function Edit({
|
|
|
98
98
|
}),
|
|
99
99
|
placeholder: (0, _i18n.__)('Accordion title')
|
|
100
100
|
}), shouldShowIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
101
|
-
className: (0, _clsx.default)(`accordion-
|
|
101
|
+
className: (0, _clsx.default)(`accordion-content__toggle-icon`, {
|
|
102
102
|
'has-icon-plus': true
|
|
103
103
|
}),
|
|
104
104
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_blockEditor","_components","_icons","_jsxRuntime","ICONS","plus","Edit","attributes","setAttributes","context","level","title","textAlign","levelOptions","iconPosition","showIcon","TagName","useEffect","undefined","blockProps","useBlockProps","borderProps","useBorderProps","colorProps","useColorProps","spacingProps","useSpacingProps","shadowProps","useShadowProps","Icon","shouldShowIcon","jsxs","Fragment","children","jsx","BlockControls","ToolbarGroup","HeadingLevelDropdown","value","options","onChange","newLevel","className","clsx","style","fontSize","RichText","allowedFormats","disableLineBreaks","tagName","newTitle","placeholder","__","width","height"],"sources":["@wordpress/block-library/src/accordion-header/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\t__experimentalGetSpacingClassesAndStyles as useSpacingProps,\n\t__experimentalGetShadowClassesAndStyles as useShadowProps,\n\tBlockControls,\n\tHeadingLevelDropdown,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { ToolbarGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport { plus } from '../accordion-
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_blockEditor","_components","_icons","_jsxRuntime","ICONS","plus","Edit","attributes","setAttributes","context","level","title","textAlign","levelOptions","iconPosition","showIcon","TagName","useEffect","undefined","blockProps","useBlockProps","borderProps","useBorderProps","colorProps","useColorProps","spacingProps","useSpacingProps","shadowProps","useShadowProps","Icon","shouldShowIcon","jsxs","Fragment","children","jsx","BlockControls","ToolbarGroup","HeadingLevelDropdown","value","options","onChange","newLevel","className","clsx","style","fontSize","RichText","allowedFormats","disableLineBreaks","tagName","newTitle","placeholder","__","width","height"],"sources":["@wordpress/block-library/src/accordion-header/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport {\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\t__experimentalGetSpacingClassesAndStyles as useSpacingProps,\n\t__experimentalGetShadowClassesAndStyles as useShadowProps,\n\tBlockControls,\n\tHeadingLevelDropdown,\n\tRichText,\n} from '@wordpress/block-editor';\nimport { ToolbarGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport { plus } from '../accordion-content/icons';\n\nconst ICONS = {\n\tplus,\n};\n\nexport default function Edit( { attributes, setAttributes, context } ) {\n\tconst { level, title, textAlign, levelOptions } = attributes;\n\tconst {\n\t\t'core/accordion-icon-position': iconPosition,\n\t\t'core/accordion-show-icon': showIcon,\n\t} = context;\n\tconst TagName = 'h' + level;\n\n\t// Set icon attributes.\n\tuseEffect( () => {\n\t\tif ( iconPosition !== undefined && showIcon !== undefined ) {\n\t\t\tsetAttributes( {\n\t\t\t\ticonPosition,\n\t\t\t\tshowIcon,\n\t\t\t} );\n\t\t}\n\t}, [ iconPosition, showIcon, setAttributes ] );\n\n\tconst blockProps = useBlockProps();\n\tconst borderProps = useBorderProps( attributes );\n\tconst colorProps = useColorProps( attributes );\n\tconst spacingProps = useSpacingProps( attributes );\n\tconst shadowProps = useShadowProps( attributes );\n\n\tconst Icon = ICONS.plus;\n\tconst shouldShowIcon = showIcon && Icon;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<HeadingLevelDropdown\n\t\t\t\t\t\tvalue={ level }\n\t\t\t\t\t\toptions={ levelOptions }\n\t\t\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tblockProps.className,\n\t\t\t\t\tcolorProps.className,\n\t\t\t\t\tborderProps.className,\n\t\t\t\t\t'accordion-content__heading',\n\t\t\t\t\t{\n\t\t\t\t\t\t[ `has-custom-font-size` ]: blockProps.style.fontSize,\n\t\t\t\t\t\t[ `icon-position-left` ]: iconPosition === 'left',\n\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t...colorProps.style,\n\t\t\t\t\t...shadowProps.style,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<button\n\t\t\t\t\tclassName={ clsx( 'accordion-content__toggle' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...spacingProps.style,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tallowedFormats={ [\n\t\t\t\t\t\t\t'core/bold',\n\t\t\t\t\t\t\t'core/italic',\n\t\t\t\t\t\t\t'core/image',\n\t\t\t\t\t\t\t'core/strikethrough',\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tdisableLineBreaks\n\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\tonChange={ ( newTitle ) =>\n\t\t\t\t\t\t\tsetAttributes( { title: newTitle } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Accordion title' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{ shouldShowIcon && (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t`accordion-content__toggle-icon`,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'has-icon-plus': true,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t// TO-DO: make this configurable\n\t\t\t\t\t\t\t\twidth: `1.2em`,\n\t\t\t\t\t\t\t\theight: `1.2em`,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ Icon && <Icon width=\"1.2em\" height=\"1.2em\" /> }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</button>\n\t\t\t</TagName>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAUA,IAAAI,WAAA,GAAAJ,OAAA;AAIA,IAAAK,MAAA,GAAAL,OAAA;AAAkD,IAAAM,WAAA,GAAAN,OAAA;AAvBlD;AACA;AACA;;AAEA;AACA;AACA;;AAcA;AACA;AACA;;AAGA,MAAMO,KAAK,GAAG;EACbC,IAAI,EAAJA;AACD,CAAC;AAEc,SAASC,IAAIA,CAAE;EAAEC,UAAU;EAAEC,aAAa;EAAEC;AAAQ,CAAC,EAAG;EACtE,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAAa,CAAC,GAAGN,UAAU;EAC5D,MAAM;IACL,8BAA8B,EAAEO,YAAY;IAC5C,0BAA0B,EAAEC;EAC7B,CAAC,GAAGN,OAAO;EACX,MAAMO,OAAO,GAAG,GAAG,GAAGN,KAAK;;EAE3B;EACA,IAAAO,kBAAS,EAAE,MAAM;IAChB,IAAKH,YAAY,KAAKI,SAAS,IAAIH,QAAQ,KAAKG,SAAS,EAAG;MAC3DV,aAAa,CAAE;QACdM,YAAY;QACZC;MACD,CAA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object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _primitives = require("@wordpress/primitives");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* WordPress dependencies
|
|
11
|
+
*/
|
|
12
|
+
var _default = exports.default = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SVG, {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
21
|
+
d: "M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z",
|
|
22
|
+
fill: "currentColor"
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_primitives","require","_jsxRuntime","_default","exports","default","jsxs","SVG","xmlns","viewBox","children","jsx","Path","fillRule","clipRule","d","fill"],"sources":["@wordpress/block-library/src/accordion-header/icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z\"\n\t\t\tfill=\"currentColor\"\n\t\t/>\n\t\t<Path d=\"M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z\" fill=\"currentColor\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAkD,IAAAC,WAAA,GAAAD,OAAA;AAHlD;AACA;AACA;AAFA,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,gBAMC,IAAAH,WAAA,CAAAI,IAAA,EAACN,WAAA,CAAAO,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,gBAC1D,IAAAR,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IACJC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,wDAAwD;IAC1DC,IAAI,EAAC;EAAc,CACnB,CAAC,eACF,IAAAd,WAAA,CAAAS,GAAA,EAACX,WAAA,CAAAY,IAAI;IAACG,CAAC,EAAC,mCAAmC;IAACC,IAAI,EAAC;EAAc,CAAE,CAAC;AAAA,CAC9D,CAAC","ignoreList":[]}
|
|
@@ -5,13 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.settings = exports.name = exports.metadata = exports.init = void 0;
|
|
8
|
-
var _icons = require("@wordpress/icons");
|
|
9
8
|
var _edit = _interopRequireDefault(require("./edit"));
|
|
10
9
|
var _save = _interopRequireDefault(require("./save"));
|
|
11
10
|
var _initBlock = _interopRequireDefault(require("../utils/init-block"));
|
|
12
|
-
|
|
13
|
-
* WordPress dependencies
|
|
14
|
-
*/
|
|
11
|
+
var _icon = _interopRequireDefault(require("./icon"));
|
|
15
12
|
/**
|
|
16
13
|
* Internal dependencies
|
|
17
14
|
*/
|
|
@@ -22,10 +19,10 @@ const metadata = exports.metadata = {
|
|
|
22
19
|
version: "0.1.0",
|
|
23
20
|
title: "Accordion Header",
|
|
24
21
|
category: "design",
|
|
25
|
-
description: "
|
|
22
|
+
description: "Displays an accordion header.",
|
|
26
23
|
example: {},
|
|
27
24
|
__experimental: true,
|
|
28
|
-
parent: ["core/accordion-
|
|
25
|
+
parent: ["core/accordion-content"],
|
|
29
26
|
usesContext: ["core/accordion-icon-position", "core/accordion-show-icon"],
|
|
30
27
|
supports: {
|
|
31
28
|
anchor: true,
|
|
@@ -110,7 +107,7 @@ const {
|
|
|
110
107
|
} = metadata;
|
|
111
108
|
exports.name = name;
|
|
112
109
|
const settings = exports.settings = {
|
|
113
|
-
icon:
|
|
110
|
+
icon: _icon.default,
|
|
114
111
|
example: {},
|
|
115
112
|
edit: _edit.default,
|
|
116
113
|
save: _save.default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_edit","_interopRequireDefault","require","_save","_initBlock","_icon","metadata","exports","$schema","apiVersion","name","version","title","category","description","example","__experimental","parent","usesContext","supports","anchor","color","background","gradient","align","border","interactivity","spacing","padding","margin","__experimentalDefaultControls","__experimentalBorder","radius","style","width","typography","textAlign","fontSize","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","fontFamily","shadow","attributes","openByDefault","type","source","selector","level","levelOptions","textAlignment","iconPosition","showIcon","textdomain","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/accordion-header/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport save from './save';\nimport metadata from './block.json';\nimport initBlock from '../utils/init-block';\nimport icon from './icon';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA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AM+C,QAAQ,GAAAlD,OAAA,CAAAkD,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJ3C,OAAO,EAAE,CAAC,CAAC;EACX4C,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEpD,IAAI;EAAEJ,QAAQ;EAAEmD;AAAS,CAAE,CAAC;AAAClD,OAAA,CAAAsD,IAAA,GAAAA,IAAA","ignoreList":[]}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = save;
|
|
8
8
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
9
|
var _blockEditor = require("@wordpress/block-editor");
|
|
10
|
-
var _icons = require("../accordion-
|
|
10
|
+
var _icons = require("../accordion-content/icons");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
/**
|
|
13
13
|
* External dependencies
|
|
@@ -43,7 +43,7 @@ function save({
|
|
|
43
43
|
const Icon = ICONS.plus;
|
|
44
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TagName, {
|
|
45
45
|
...blockProps,
|
|
46
|
-
className: (0, _clsx.default)(blockProps.className, colorProps.className, borderProps.className, 'accordion-
|
|
46
|
+
className: (0, _clsx.default)(blockProps.className, colorProps.className, borderProps.className, 'accordion-content__heading', {
|
|
47
47
|
[`has-custom-font-size`]: blockProps?.style?.fontSize,
|
|
48
48
|
[`icon-position-left`]: iconPosition === 'left',
|
|
49
49
|
[`has-text-align-${textAlign}`]: textAlign
|
|
@@ -54,7 +54,7 @@ function save({
|
|
|
54
54
|
...shadowProps.style
|
|
55
55
|
},
|
|
56
56
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
57
|
-
className: (0, _clsx.default)('accordion-
|
|
57
|
+
className: (0, _clsx.default)('accordion-content__toggle'),
|
|
58
58
|
style: {
|
|
59
59
|
...spacingProps.style
|
|
60
60
|
},
|
|
@@ -62,7 +62,7 @@ function save({
|
|
|
62
62
|
tagName: "span",
|
|
63
63
|
value: title
|
|
64
64
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
65
|
-
className: (0, _clsx.default)(`accordion-
|
|
65
|
+
className: (0, _clsx.default)(`accordion-content__toggle-icon`, {
|
|
66
66
|
'has-icon-plus': showIcon
|
|
67
67
|
}),
|
|
68
68
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_icons","_jsxRuntime","ICONS","plus","save","attributes","level","title","iconPosition","textAlign","showIcon","TagName","blockProps","useBlockProps","borderProps","getBorderClassesAndStyles","colorProps","getColorClassesAndStyles","spacingProps","getSpacingClassesAndStyles","shadowProps","getShadowClassesAndStyles","Icon","jsx","className","clsx","style","fontSize","children","jsxs","RichText","Content","tagName","value","width","height"],"sources":["@wordpress/block-library/src/accordion-header/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\t__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n\t__experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tRichText,\n} from '@wordpress/block-editor';\n/**\n * Internal dependencies\n */\nimport { plus } from '../accordion-
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_icons","_jsxRuntime","ICONS","plus","save","attributes","level","title","iconPosition","textAlign","showIcon","TagName","blockProps","useBlockProps","borderProps","getBorderClassesAndStyles","colorProps","getColorClassesAndStyles","spacingProps","getSpacingClassesAndStyles","shadowProps","getShadowClassesAndStyles","Icon","jsx","className","clsx","style","fontSize","children","jsxs","RichText","Content","tagName","value","width","height"],"sources":["@wordpress/block-library/src/accordion-header/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\t__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n\t__experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,\n\t__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,\n\tRichText,\n} from '@wordpress/block-editor';\n/**\n * Internal dependencies\n */\nimport { plus } from '../accordion-content/icons';\n\nconst ICONS = {\n\tplus,\n};\n\nexport default function save( { attributes } ) {\n\tconst { level, title, iconPosition, textAlign, showIcon } = attributes;\n\tconst TagName = 'h' + level;\n\n\tconst blockProps = useBlockProps.save();\n\tconst borderProps = getBorderClassesAndStyles( attributes );\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\tconst spacingProps = getSpacingClassesAndStyles( attributes );\n\tconst shadowProps = getShadowClassesAndStyles( attributes );\n\n\tconst Icon = ICONS.plus;\n\n\treturn (\n\t\t<TagName\n\t\t\t{ ...blockProps }\n\t\t\tclassName={ clsx(\n\t\t\t\tblockProps.className,\n\t\t\t\tcolorProps.className,\n\t\t\t\tborderProps.className,\n\t\t\t\t'accordion-content__heading',\n\t\t\t\t{\n\t\t\t\t\t[ `has-custom-font-size` ]: blockProps?.style?.fontSize,\n\t\t\t\t\t[ `icon-position-left` ]: iconPosition === 'left',\n\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t}\n\t\t\t) }\n\t\t\tstyle={ {\n\t\t\t\t...borderProps.style,\n\t\t\t\t...colorProps.style,\n\t\t\t\t...shadowProps.style,\n\t\t\t} }\n\t\t>\n\t\t\t<button\n\t\t\t\tclassName={ clsx( 'accordion-content__toggle' ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\t...spacingProps.style,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<RichText.Content tagName=\"span\" value={ title } />\n\t\t\t\t<span\n\t\t\t\t\tclassName={ clsx( `accordion-content__toggle-icon`, {\n\t\t\t\t\t\t'has-icon-plus': showIcon,\n\t\t\t\t\t} ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t// TO-DO: make this configurable\n\t\t\t\t\t\twidth: `1.2em`,\n\t\t\t\t\t\theight: `1.2em`,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ showIcon && <Icon width=\"1.2em\" height=\"1.2em\" /> }\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t</TagName>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,YAAA,GAAAD,OAAA;AAWA,IAAAE,MAAA,GAAAF,OAAA;AAAkD,IAAAG,WAAA,GAAAH,OAAA;AAlBlD;AACA;AACA;;AAEA;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAMI,KAAK,GAAG;EACbC,IAAI,EAAJA;AACD,CAAC;AAEc,SAASC,IAAIA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAC9C,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,YAAY;IAAEC,SAAS;IAAEC;EAAS,CAAC,GAAGL,UAAU;EACtE,MAAMM,OAAO,GAAG,GAAG,GAAGL,KAAK;EAE3B,MAAMM,UAAU,GAAGC,0BAAa,CAACT,IAAI,CAAC,CAAC;EACvC,MAAMU,WAAW,GAAG,IAAAC,oDAAyB,EAAEV,UAAW,CAAC;EAC3D,MAAMW,UAAU,GAAG,IAAAC,mDAAwB,EAAEZ,UAAW,CAAC;EACzD,MAAMa,YAAY,GAAG,IAAAC,qDAA0B,EAAEd,UAAW,CAAC;EAC7D,MAAMe,WAAW,GAAG,IAAAC,oDAAyB,EAAEhB,UAAW,CAAC;EAE3D,MAAMiB,IAAI,GAAGpB,KAAK,CAACC,IAAI;EAEvB,oBACC,IAAAF,WAAA,CAAAsB,GAAA,EAACZ,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ule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _primitives = require("@wordpress/primitives");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* WordPress dependencies
|
|
11
|
+
*/
|
|
12
|
+
var _default = exports.default = /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SVG, {
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Path, {
|
|
16
|
+
fillRule: "evenodd",
|
|
17
|
+
clipRule: "evenodd",
|
|
18
|
+
d: "M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_primitives","require","_jsxRuntime","_default","exports","default","jsx","SVG","xmlns","viewBox","children","Path","fillRule","clipRule","d","fill"],"sources":["@wordpress/block-library/src/accordion-panel/icon.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z\"\n\t\t\tfill=\"currentColor\"\n\t\t/>\n\t</SVG>\n);\n"],"mappings":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAAkD,IAAAC,WAAA,GAAAD,OAAA;AAHlD;AACA;AACA;AAFA,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,gBAMC,IAAAH,WAAA,CAAAI,GAAA,EAACN,WAAA,CAAAO,GAAG;EAACC,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC,WAAW;EAAAC,QAAA,eAC1D,IAAAR,WAAA,CAAAI,GAAA,EAACN,WAAA,CAAAW,IAAI;IACJC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClBC,CAAC,EAAC,2nBAA2nB;IAC7nBC,IAAI,EAAC;EAAc,CACnB;AAAC,CACE,CAAC","ignoreList":[]}
|
|
@@ -5,13 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.settings = exports.name = exports.metadata = exports.init = void 0;
|
|
8
|
-
var _icons = require("@wordpress/icons");
|
|
9
8
|
var _edit = _interopRequireDefault(require("./edit"));
|
|
10
9
|
var _save = _interopRequireDefault(require("./save"));
|
|
11
10
|
var _initBlock = _interopRequireDefault(require("../utils/init-block"));
|
|
12
|
-
|
|
13
|
-
* WordPress dependencies
|
|
14
|
-
*/
|
|
11
|
+
var _icon = _interopRequireDefault(require("./icon"));
|
|
15
12
|
/**
|
|
16
13
|
* Internal dependencies
|
|
17
14
|
*/
|
|
@@ -22,10 +19,10 @@ const metadata = exports.metadata = {
|
|
|
22
19
|
version: "0.1.0",
|
|
23
20
|
title: "Accordion Panel",
|
|
24
21
|
category: "design",
|
|
25
|
-
description: "
|
|
22
|
+
description: "Displays an accordion panel.",
|
|
26
23
|
example: {},
|
|
27
24
|
__experimental: true,
|
|
28
|
-
parent: ["core/accordion-
|
|
25
|
+
parent: ["core/accordion-content"],
|
|
29
26
|
supports: {
|
|
30
27
|
color: {
|
|
31
28
|
background: true,
|
|
@@ -94,7 +91,7 @@ const {
|
|
|
94
91
|
} = metadata;
|
|
95
92
|
exports.name = name;
|
|
96
93
|
const settings = exports.settings = {
|
|
97
|
-
icon:
|
|
94
|
+
icon: _icon.default,
|
|
98
95
|
example: {},
|
|
99
96
|
edit: _edit.default,
|
|
100
97
|
save: _save.default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_edit","_interopRequireDefault","require","_save","_initBlock","_icon","metadata","exports","$schema","apiVersion","name","version","title","category","description","example","__experimental","parent","supports","color","background","gradient","border","interactivity","spacing","padding","margin","blockGap","__experimentalDefaultControls","__experimentalBorder","radius","style","width","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","shadow","attributes","allowedBlocks","type","templateLock","openByDefault","isSelected","textdomain","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/accordion-panel/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport save from './save';\nimport metadata from './block.json';\nimport initBlock from '../utils/init-block';\nimport icon from './icon';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAPA;AACA;AACA;AAFA,MAAAI,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,OAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,OAAA;EAAAC,cAAA;EAAAC,MAAA;EAAAC,QAAA;IAAAC,KAAA;MAAAC,UAAA;MAAAC,QAAA;IAAA;IAAAC,MAAA;IAAAC,aAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAC,6BAAA;QAAAH,OAAA;QAAAE,QAAA;MAAA;IAAA;IAAAE,oBAAA;MAAAV,KAAA;MAAAW,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAJ,6BAAA;QAAAT,KAAA;QAAAW,MAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAb,6BAAA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