@wordpress/block-library 9.28.0 → 9.29.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/accordion/edit.js +123 -0
- 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/accordion/index.js +100 -0
- package/build/accordion/index.js.map +1 -0
- package/build/accordion/init.js +12 -0
- package/build/accordion/init.js.map +1 -0
- package/build/accordion/save.js +36 -0
- package/build/accordion/save.js.map +1 -0
- package/build/accordion/view.js +49 -0
- package/build/accordion/view.js.map +1 -0
- package/build/accordion-content/edit.js +129 -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 +30 -0
- package/build/accordion-content/icons.js.map +1 -0
- package/build/accordion-content/index.js +76 -0
- package/build/accordion-content/index.js.map +1 -0
- package/build/accordion-content/init.js +12 -0
- package/build/accordion-content/init.js.map +1 -0
- package/build/accordion-content/save.js +37 -0
- package/build/accordion-content/save.js.map +1 -0
- package/build/accordion-header/edit.js +118 -0
- package/build/accordion-header/edit.js.map +1 -0
- package/build/accordion-header/icon.js +25 -0
- package/build/accordion-header/icon.js.map +1 -0
- package/build/accordion-header/index.js +121 -0
- package/build/accordion-header/index.js.map +1 -0
- package/build/accordion-header/init.js +12 -0
- package/build/accordion-header/init.js.map +1 -0
- package/build/accordion-header/save.js +81 -0
- package/build/accordion-header/save.js.map +1 -0
- package/build/accordion-panel/edit.js +59 -0
- package/build/accordion-panel/edit.js.map +1 -0
- package/build/accordion-panel/icon.js +22 -0
- package/build/accordion-panel/icon.js.map +1 -0
- package/build/accordion-panel/index.js +105 -0
- package/build/accordion-panel/index.js.map +1 -0
- package/build/accordion-panel/init.js +12 -0
- package/build/accordion-panel/init.js.map +1 -0
- package/build/accordion-panel/save.js +46 -0
- package/build/accordion-panel/save.js.map +1 -0
- package/build/cover/index.js +2 -1
- package/build/cover/index.js.map +1 -1
- package/build/freeform/edit.js +6 -0
- package/build/freeform/edit.js.map +1 -1
- package/build/index.js +10 -0
- package/build/index.js.map +1 -1
- package/build/media-text/media-container.js +2 -1
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/transforms.js +7 -3
- package/build/media-text/transforms.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-title/edit.js +52 -2
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +1 -0
- package/build/query-title/index.js.map +1 -1
- package/build/query-title/use-post-type-label.js +42 -0
- package/build/query-title/use-post-type-label.js.map +1 -0
- package/build/query-title/variations.js +10 -0
- package/build/query-title/variations.js.map +1 -1
- package/build/site-logo/edit.js +56 -41
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-title/edit.js +9 -3
- package/build/site-title/edit.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-module/accordion/edit.js +116 -0
- 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/accordion/index.js +92 -0
- package/build-module/accordion/index.js.map +1 -0
- package/build-module/accordion/init.js +6 -0
- package/build-module/accordion/init.js.map +1 -0
- package/build-module/accordion/save.js +27 -0
- package/build-module/accordion/save.js.map +1 -0
- package/build-module/accordion/view.js +46 -0
- package/build-module/accordion/view.js.map +1 -0
- package/build-module/accordion-content/edit.js +120 -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 +22 -0
- package/build-module/accordion-content/icons.js.map +1 -0
- package/build-module/accordion-content/index.js +68 -0
- package/build-module/accordion-content/index.js.map +1 -0
- package/build-module/accordion-content/init.js +6 -0
- package/build-module/accordion-content/init.js.map +1 -0
- package/build-module/accordion-content/save.js +28 -0
- package/build-module/accordion-content/save.js.map +1 -0
- package/build-module/accordion-header/edit.js +108 -0
- package/build-module/accordion-header/edit.js.map +1 -0
- 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 +113 -0
- package/build-module/accordion-header/index.js.map +1 -0
- package/build-module/accordion-header/init.js +6 -0
- package/build-module/accordion-header/init.js.map +1 -0
- package/build-module/accordion-header/save.js +71 -0
- package/build-module/accordion-header/save.js.map +1 -0
- package/build-module/accordion-panel/edit.js +50 -0
- package/build-module/accordion-panel/edit.js.map +1 -0
- 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 +97 -0
- package/build-module/accordion-panel/index.js.map +1 -0
- package/build-module/accordion-panel/init.js +6 -0
- package/build-module/accordion-panel/init.js.map +1 -0
- package/build-module/accordion-panel/save.js +37 -0
- package/build-module/accordion-panel/save.js.map +1 -0
- package/build-module/cover/index.js +2 -1
- package/build-module/cover/index.js.map +1 -1
- package/build-module/freeform/edit.js +6 -0
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/index.js +10 -0
- package/build-module/index.js.map +1 -1
- package/build-module/media-text/media-container.js +2 -1
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/transforms.js +7 -3
- package/build-module/media-text/transforms.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-title/edit.js +52 -2
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +1 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/query-title/use-post-type-label.js +36 -0
- package/build-module/query-title/use-post-type-label.js.map +1 -0
- package/build-module/query-title/variations.js +10 -0
- package/build-module/query-title/variations.js.map +1 -1
- package/build-module/site-logo/edit.js +57 -42
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-title/edit.js +10 -4
- package/build-module/site-title/edit.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-style/accordion/style-rtl.css +223 -0
- package/build-style/accordion/style.css +223 -0
- package/build-style/style-rtl.css +88 -0
- package/build-style/style.css +88 -0
- package/package.json +36 -35
- package/src/accordion/block.json +69 -0
- package/src/accordion/edit.js +133 -0
- package/src/accordion/icon.js +23 -0
- package/src/accordion/index.js +21 -0
- package/src/accordion/index.php +61 -0
- package/src/accordion/init.js +6 -0
- package/src/accordion/save.js +23 -0
- package/src/accordion/style.scss +91 -0
- package/src/accordion/view.js +38 -0
- package/src/accordion-content/block.json +45 -0
- package/src/accordion-content/edit.js +149 -0
- package/src/accordion-content/icon.js +28 -0
- package/src/accordion-content/icons.js +23 -0
- package/src/accordion-content/index.js +21 -0
- package/src/accordion-content/index.php +73 -0
- package/src/accordion-content/init.js +6 -0
- package/src/accordion-content/save.js +25 -0
- package/src/accordion-header/block.json +93 -0
- package/src/accordion-header/edit.js +131 -0
- package/src/accordion-header/icon.js +16 -0
- package/src/accordion-header/index.js +21 -0
- package/src/accordion-header/init.js +6 -0
- package/src/accordion-header/save.js +79 -0
- package/src/accordion-panel/block.json +74 -0
- package/src/accordion-panel/edit.js +61 -0
- package/src/accordion-panel/icon.js +15 -0
- package/src/accordion-panel/index.js +21 -0
- package/src/accordion-panel/init.js +6 -0
- package/src/accordion-panel/save.js +51 -0
- package/src/block/index.php +16 -14
- package/src/cover/block.json +2 -1
- package/src/file/index.php +28 -22
- package/src/freeform/edit.js +7 -0
- package/src/index.js +12 -0
- package/src/media-text/media-container.js +1 -0
- package/src/media-text/transforms.js +5 -1
- package/src/navigation/edit/test/navigation-menu-selector.js +2 -2
- package/src/post-comments-link/edit.js +7 -1
- package/src/post-excerpt/index.php +16 -12
- package/src/query-title/block.json +1 -0
- package/src/query-title/edit.js +58 -1
- package/src/query-title/index.php +30 -5
- package/src/query-title/use-post-type-label.js +34 -0
- package/src/query-title/variations.js +13 -0
- package/src/site-logo/edit.js +33 -12
- package/src/site-title/edit.js +24 -16
- package/src/social-link/README.md +4 -1
- package/src/social-link/index.php +1 -1
- package/src/style.scss +1 -0
- package/src/video/edit-common-settings.js +14 -5
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Edit;
|
|
7
|
+
var _blockEditor = require("@wordpress/block-editor");
|
|
8
|
+
var _i18n = require("@wordpress/i18n");
|
|
9
|
+
var _components = require("@wordpress/components");
|
|
10
|
+
var _hooks = require("../utils/hooks");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
/**
|
|
13
|
+
* WordPress dependencies
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Internal dependencies
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const ACCORDION_BLOCK_NAME = 'core/accordion-content';
|
|
21
|
+
const ACCORDION_BLOCK = {
|
|
22
|
+
name: ACCORDION_BLOCK_NAME
|
|
23
|
+
};
|
|
24
|
+
function Edit({
|
|
25
|
+
attributes: {
|
|
26
|
+
autoclose,
|
|
27
|
+
iconPosition,
|
|
28
|
+
showIcon
|
|
29
|
+
},
|
|
30
|
+
setAttributes
|
|
31
|
+
}) {
|
|
32
|
+
const blockProps = (0, _blockEditor.useBlockProps)();
|
|
33
|
+
const dropdownMenuProps = (0, _hooks.useToolsPanelDropdownMenuProps)();
|
|
34
|
+
const innerBlocksProps = (0, _blockEditor.useInnerBlocksProps)(blockProps, {
|
|
35
|
+
template: [[ACCORDION_BLOCK_NAME], [ACCORDION_BLOCK_NAME]],
|
|
36
|
+
defaultBlock: ACCORDION_BLOCK,
|
|
37
|
+
directInsert: true,
|
|
38
|
+
templateInsertUpdatesSelection: true
|
|
39
|
+
});
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InspectorControls, {
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalToolsPanel, {
|
|
43
|
+
label: (0, _i18n.__)('Settings'),
|
|
44
|
+
resetAll: () => {
|
|
45
|
+
setAttributes({
|
|
46
|
+
autoclose: false,
|
|
47
|
+
showIcon: true,
|
|
48
|
+
iconPosition: 'right'
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
52
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
53
|
+
label: (0, _i18n.__)('Auto-close'),
|
|
54
|
+
isShownByDefault: true,
|
|
55
|
+
hasValue: () => !!autoclose,
|
|
56
|
+
onDeselect: () => setAttributes({
|
|
57
|
+
autoclose: false
|
|
58
|
+
}),
|
|
59
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
|
|
60
|
+
isBlock: true,
|
|
61
|
+
__nextHasNoMarginBottom: true,
|
|
62
|
+
label: (0, _i18n.__)('Auto-close'),
|
|
63
|
+
onChange: value => {
|
|
64
|
+
setAttributes({
|
|
65
|
+
autoclose: value
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
checked: autoclose,
|
|
69
|
+
help: (0, _i18n.__)('Automatically close accordions when a new one is opened.')
|
|
70
|
+
})
|
|
71
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
72
|
+
label: (0, _i18n.__)('Show icon'),
|
|
73
|
+
isShownByDefault: true,
|
|
74
|
+
hasValue: () => !showIcon,
|
|
75
|
+
onDeselect: () => setAttributes({
|
|
76
|
+
showIcon: true
|
|
77
|
+
}),
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
|
|
79
|
+
isBlock: true,
|
|
80
|
+
__nextHasNoMarginBottom: true,
|
|
81
|
+
label: (0, _i18n.__)('Show icon'),
|
|
82
|
+
onChange: value => {
|
|
83
|
+
setAttributes({
|
|
84
|
+
showIcon: value
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
checked: showIcon,
|
|
88
|
+
help: (0, _i18n.__)('Display a plus icon next to the accordion header.')
|
|
89
|
+
})
|
|
90
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
91
|
+
label: (0, _i18n.__)('Icon Position'),
|
|
92
|
+
isShownByDefault: true,
|
|
93
|
+
hasValue: () => iconPosition !== 'right',
|
|
94
|
+
onDeselect: () => setAttributes({
|
|
95
|
+
iconPosition: 'right'
|
|
96
|
+
}),
|
|
97
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalToggleGroupControl, {
|
|
98
|
+
__nextHasNoMarginBottom: true,
|
|
99
|
+
__next40pxDefaultSize: true,
|
|
100
|
+
isBlock: true,
|
|
101
|
+
label: (0, _i18n.__)('Icon Position'),
|
|
102
|
+
value: iconPosition,
|
|
103
|
+
onChange: value => {
|
|
104
|
+
setAttributes({
|
|
105
|
+
iconPosition: value
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToggleGroupControlOption, {
|
|
109
|
+
label: (0, _i18n.__)('Left'),
|
|
110
|
+
value: "left"
|
|
111
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToggleGroupControlOption, {
|
|
112
|
+
label: (0, _i18n.__)('Right'),
|
|
113
|
+
value: "right"
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
116
|
+
})]
|
|
117
|
+
})
|
|
118
|
+
}, "setting"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
119
|
+
...innerBlocksProps
|
|
120
|
+
})]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=edit.js.map
|
|
@@ -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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AAC,eACpB,IAAArC,WAAA,CAAAuB,GAAA;MAAA,GAAUT;IAAgB,CAAI,CAAC;EAAA,CAC9B,CAAC;AAEL","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.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":[]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.settings = exports.name = exports.metadata = exports.init = void 0;
|
|
8
|
+
var _edit = _interopRequireDefault(require("./edit"));
|
|
9
|
+
var _save = _interopRequireDefault(require("./save"));
|
|
10
|
+
var _initBlock = _interopRequireDefault(require("../utils/init-block"));
|
|
11
|
+
var _icon = _interopRequireDefault(require("./icon"));
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
const metadata = exports.metadata = {
|
|
16
|
+
$schema: "https://schemas.wp.org/trunk/block.json",
|
|
17
|
+
apiVersion: 3,
|
|
18
|
+
name: "core/accordion",
|
|
19
|
+
title: "Accordion",
|
|
20
|
+
category: "design",
|
|
21
|
+
description: "Displays a group of accordion headers and associated expandable content.",
|
|
22
|
+
example: {},
|
|
23
|
+
__experimental: true,
|
|
24
|
+
supports: {
|
|
25
|
+
html: false,
|
|
26
|
+
align: ["wide", "full"],
|
|
27
|
+
background: {
|
|
28
|
+
backgroundImage: true,
|
|
29
|
+
backgroundSize: true,
|
|
30
|
+
__experimentalDefaultControls: {
|
|
31
|
+
backgroundImage: true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
color: {
|
|
35
|
+
background: true,
|
|
36
|
+
gradient: true
|
|
37
|
+
},
|
|
38
|
+
__experimentalBorder: {
|
|
39
|
+
color: true,
|
|
40
|
+
radius: true,
|
|
41
|
+
style: true,
|
|
42
|
+
width: true,
|
|
43
|
+
__experimentalDefaultControls: {
|
|
44
|
+
color: true,
|
|
45
|
+
radius: true,
|
|
46
|
+
style: true,
|
|
47
|
+
width: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
spacing: {
|
|
51
|
+
padding: true,
|
|
52
|
+
margin: ["top", "bottom"],
|
|
53
|
+
blockGap: true
|
|
54
|
+
},
|
|
55
|
+
shadow: true,
|
|
56
|
+
layout: true,
|
|
57
|
+
interactivity: true
|
|
58
|
+
},
|
|
59
|
+
attributes: {
|
|
60
|
+
iconPosition: {
|
|
61
|
+
type: "string",
|
|
62
|
+
"default": "right"
|
|
63
|
+
},
|
|
64
|
+
showIcon: {
|
|
65
|
+
type: "boolean",
|
|
66
|
+
"default": true
|
|
67
|
+
},
|
|
68
|
+
autoclose: {
|
|
69
|
+
type: "boolean",
|
|
70
|
+
"default": false
|
|
71
|
+
},
|
|
72
|
+
allowedBlocks: {
|
|
73
|
+
type: "array"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
providesContext: {
|
|
77
|
+
"core/accordion-icon-position": "iconPosition",
|
|
78
|
+
"core/accordion-show-icon": "showIcon"
|
|
79
|
+
},
|
|
80
|
+
allowedBlocks: ["core/accordion-content"],
|
|
81
|
+
textdomain: "default",
|
|
82
|
+
style: "wp-block-accordion"
|
|
83
|
+
};
|
|
84
|
+
const {
|
|
85
|
+
name
|
|
86
|
+
} = metadata;
|
|
87
|
+
exports.name = name;
|
|
88
|
+
const settings = exports.settings = {
|
|
89
|
+
icon: _icon.default,
|
|
90
|
+
example: {},
|
|
91
|
+
edit: _edit.default,
|
|
92
|
+
save: _save.default
|
|
93
|
+
};
|
|
94
|
+
const init = () => (0, _initBlock.default)({
|
|
95
|
+
name,
|
|
96
|
+
metadata,
|
|
97
|
+
settings
|
|
98
|
+
});
|
|
99
|
+
exports.init = init;
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -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,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _ = require("./");
|
|
8
|
+
/**
|
|
9
|
+
* Internal dependencies
|
|
10
|
+
*/
|
|
11
|
+
var _default = exports.default = (0, _.init)();
|
|
12
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -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,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = save;
|
|
8
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
9
|
+
var _blockEditor = require("@wordpress/block-editor");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* External dependencies
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* WordPress dependencies
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
function save({
|
|
20
|
+
attributes
|
|
21
|
+
}) {
|
|
22
|
+
const {
|
|
23
|
+
iconPosition
|
|
24
|
+
} = attributes;
|
|
25
|
+
const blockProps = _blockEditor.useBlockProps.save();
|
|
26
|
+
const className = (0, _clsx.default)({
|
|
27
|
+
'icon-position-left': iconPosition === 'left'
|
|
28
|
+
}, blockProps.className);
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
|
+
..._blockEditor.useInnerBlocksProps.save({
|
|
31
|
+
...blockProps,
|
|
32
|
+
className
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=save.js.map
|
|
@@ -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,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interactivity = require("@wordpress/interactivity");
|
|
4
|
+
/**
|
|
5
|
+
* WordPress dependencies
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
state
|
|
10
|
+
} = (0, _interactivity.store)('core/accordion', {
|
|
11
|
+
state: {
|
|
12
|
+
get isOpen() {
|
|
13
|
+
const {
|
|
14
|
+
isOpen,
|
|
15
|
+
id
|
|
16
|
+
} = (0, _interactivity.getContext)();
|
|
17
|
+
return isOpen.includes(id);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
actions: {
|
|
21
|
+
toggle: () => {
|
|
22
|
+
const context = (0, _interactivity.getContext)();
|
|
23
|
+
const {
|
|
24
|
+
id,
|
|
25
|
+
autoclose
|
|
26
|
+
} = context;
|
|
27
|
+
if (autoclose) {
|
|
28
|
+
context.isOpen = state.isOpen ? [] : [id];
|
|
29
|
+
} else if (state.isOpen) {
|
|
30
|
+
context.isOpen = context.isOpen.filter(item => item !== id);
|
|
31
|
+
} else {
|
|
32
|
+
context.isOpen.push(id);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
callbacks: {
|
|
37
|
+
initIsOpen: () => {
|
|
38
|
+
const context = (0, _interactivity.getContext)();
|
|
39
|
+
const {
|
|
40
|
+
id,
|
|
41
|
+
openByDefault
|
|
42
|
+
} = context;
|
|
43
|
+
if (openByDefault) {
|
|
44
|
+
context.isOpen.push(id);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -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,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = Edit;
|
|
8
|
+
var _i18n = require("@wordpress/i18n");
|
|
9
|
+
var _blockEditor = require("@wordpress/block-editor");
|
|
10
|
+
var _data = require("@wordpress/data");
|
|
11
|
+
var _element = require("@wordpress/element");
|
|
12
|
+
var _components = require("@wordpress/components");
|
|
13
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
+
var _hooks = require("../utils/hooks");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
/**
|
|
17
|
+
* WordPress dependencies
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* External dependencies
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Internal dependencies
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
function Edit({
|
|
29
|
+
attributes: {
|
|
30
|
+
openByDefault
|
|
31
|
+
},
|
|
32
|
+
clientId,
|
|
33
|
+
setAttributes
|
|
34
|
+
}) {
|
|
35
|
+
const dropdownMenuProps = (0, _hooks.useToolsPanelDropdownMenuProps)();
|
|
36
|
+
const {
|
|
37
|
+
isSelected,
|
|
38
|
+
getBlockOrder
|
|
39
|
+
} = (0, _data.useSelect)(select => {
|
|
40
|
+
const {
|
|
41
|
+
isBlockSelected,
|
|
42
|
+
hasSelectedInnerBlock,
|
|
43
|
+
getBlockOrder: getBlockOrderSelector
|
|
44
|
+
} = select(_blockEditor.store);
|
|
45
|
+
return {
|
|
46
|
+
isSelected: isBlockSelected(clientId) || hasSelectedInnerBlock(clientId, true),
|
|
47
|
+
getBlockOrder: getBlockOrderSelector
|
|
48
|
+
};
|
|
49
|
+
}, [clientId]);
|
|
50
|
+
const contentBlockClientId = getBlockOrder(clientId)[1];
|
|
51
|
+
const {
|
|
52
|
+
updateBlockAttributes,
|
|
53
|
+
__unstableMarkNextChangeAsNotPersistent
|
|
54
|
+
} = (0, _data.useDispatch)(_blockEditor.store);
|
|
55
|
+
(0, _element.useEffect)(() => {
|
|
56
|
+
if (contentBlockClientId) {
|
|
57
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
58
|
+
updateBlockAttributes(contentBlockClientId, {
|
|
59
|
+
isSelected
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}, [isSelected, contentBlockClientId, __unstableMarkNextChangeAsNotPersistent, updateBlockAttributes]);
|
|
63
|
+
const blockProps = (0, _blockEditor.useBlockProps)();
|
|
64
|
+
const innerBlocksProps = (0, _blockEditor.useInnerBlocksProps)({
|
|
65
|
+
...blockProps,
|
|
66
|
+
className: (0, _clsx.default)(blockProps.className, {
|
|
67
|
+
'is-open': openByDefault || isSelected
|
|
68
|
+
})
|
|
69
|
+
}, {
|
|
70
|
+
template: [['core/accordion-header', {}], ['core/accordion-panel', {
|
|
71
|
+
openByDefault
|
|
72
|
+
}]],
|
|
73
|
+
templateLock: 'all',
|
|
74
|
+
directInsert: true,
|
|
75
|
+
templateInsertUpdatesSelection: true
|
|
76
|
+
});
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
78
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InspectorControls, {
|
|
79
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanel, {
|
|
80
|
+
label: (0, _i18n.__)('Settings'),
|
|
81
|
+
resetAll: () => {
|
|
82
|
+
setAttributes({
|
|
83
|
+
openByDefault: false
|
|
84
|
+
});
|
|
85
|
+
if (contentBlockClientId) {
|
|
86
|
+
updateBlockAttributes(contentBlockClientId, {
|
|
87
|
+
openByDefault: false
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
dropdownMenuProps: dropdownMenuProps,
|
|
92
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalToolsPanelItem, {
|
|
93
|
+
label: (0, _i18n.__)('Open by default'),
|
|
94
|
+
isShownByDefault: true,
|
|
95
|
+
hasValue: () => !!openByDefault,
|
|
96
|
+
onDeselect: () => {
|
|
97
|
+
setAttributes({
|
|
98
|
+
openByDefault: false
|
|
99
|
+
});
|
|
100
|
+
if (contentBlockClientId) {
|
|
101
|
+
updateBlockAttributes(contentBlockClientId, {
|
|
102
|
+
openByDefault: false
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
|
|
107
|
+
label: (0, _i18n.__)('Open by default'),
|
|
108
|
+
__nextHasNoMarginBottom: true,
|
|
109
|
+
onChange: value => {
|
|
110
|
+
setAttributes({
|
|
111
|
+
openByDefault: value
|
|
112
|
+
});
|
|
113
|
+
if (contentBlockClientId) {
|
|
114
|
+
updateBlockAttributes(contentBlockClientId, {
|
|
115
|
+
openByDefault: value
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
checked: openByDefault,
|
|
120
|
+
help: (0, _i18n.__)('Accordion content will be displayed by default.')
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
}, "setting"), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
125
|
+
...innerBlocksProps
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=edit.js.map
|
|
@@ -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;EAE1D,MAAM;IAAEC,UAAU;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EAC5CC,MAAM,IAAM;IACb,MAAM;MACLC,eAAe;MACfC,qBAAqB;MACrBJ,aAAa,EAAEK;IAChB,CAAC,GAAGH,MAAM,CAAEI,kBAAiB,CAAC;IAC9B,OAAO;MACNP,UAAU,EACTI,eAAe,CAAER,QAAS,CAAC,IAC3BS,qBAAqB,CAAET,QAAQ,EAAE,IAAK,CAAC;MACxCK,aAAa,EAAEK;IAChB,CAAC;EACF,CAAC,EACD,CAAEV,QAAQ,CACX,CAAC;EAED,MAAMY,oBAAoB,GAAGP,aAAa,CAAEL,QAAS,CAAC,CAAE,CAAC,CAAE;EAC3D,MAAM;IAAEa,qBAAqB;IAAEC;EAAwC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AAG;QACHG,iBAAiB,EAAGA,iBAAmB;QAAA2B,QAAA,eAEvC,IAAAjC,WAAA,CAAAkC,GAAA,EAACtC,WAAA,CAAA4C,4BAAc;UACdH,KAAK,EAAG,IAAAC,QAAE,EAAE,iBAAkB,CAAG;UACjCG,gBAAgB;UAChBC,QAAQ,EAAGA,CAAA,KAAM,CAAC,CAAEvC,aAAe;UACnCwC,UAAU,EAAGA,CAAA,KAAM;YAClBtC,aAAa,CAAE;cAAEF,aAAa,EAAE;YAAM,CAAE,CAAC;YACzC,IAAKa,oBAAoB,EAAG;cAC3BC,qBAAqB,CAAED,oBAAoB,EAAE;gBAC5Cb,aAAa,EAAE;cAChB,CAAE,CAAC;YACJ;UACD,CAAG;UAAA8B,QAAA,eAEH,IAAAjC,WAAA,CAAAkC,GAAA,EAACtC,WAAA,CAAAgD,aAAa;YACbP,KAAK,EAAG,IAAAC,QAAE,EAAE,iBAAkB,CAAG;YACjCO,uBAAuB;YACvBC,QAAQ,EAAKC,KAAK,IAAM;cACvB1C,aAAa,CAAE;gBACdF,aAAa,EAAE4C;cAChB,CAAE,CAAC;cACH,IAAK/B,oBAAoB,EAAG;gBAC3BC,qBAAqB,CACpBD,oBAAoB,EACpB;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,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.plus = void 0;
|
|
7
|
+
var _element = require("@wordpress/element");
|
|
8
|
+
/**
|
|
9
|
+
* WordPress dependencies
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const plus = ({
|
|
13
|
+
width,
|
|
14
|
+
height
|
|
15
|
+
}) => {
|
|
16
|
+
return (0, _element.createElement)('span', {
|
|
17
|
+
style: {
|
|
18
|
+
display: 'inline-block',
|
|
19
|
+
width: width || 24,
|
|
20
|
+
height: height || 24,
|
|
21
|
+
lineHeight: `${height || 24}px`,
|
|
22
|
+
textAlign: 'center',
|
|
23
|
+
fontSize: `${(height || 24) * 0.6}px`,
|
|
24
|
+
fontWeight: 'bold',
|
|
25
|
+
color: 'currentColor'
|
|
26
|
+
}
|
|
27
|
+
}, '+');
|
|
28
|
+
};
|
|
29
|
+
exports.plus = plus;
|
|
30
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -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":[]}
|