@wordpress/block-library 8.9.0 → 8.10.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/comment-author-name/edit.js +1 -1
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +1 -1
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +1 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/index.js +1 -1
- package/build/cover/variations.js +1 -1
- package/build/cover/variations.js.map +1 -1
- package/build/details/edit.js +19 -5
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +14 -10
- package/build/details/index.js.map +1 -1
- package/build/details/save.js +4 -1
- package/build/details/save.js.map +1 -1
- package/build/embed/variations.js +2 -2
- package/build/embed/variations.js.map +1 -1
- package/build/file/view.js +1 -1
- package/build/file/view.js.map +1 -1
- package/build/gallery/edit.js +2 -8
- package/build/gallery/edit.js.map +1 -1
- package/build/index.js +0 -6
- package/build/index.js.map +1 -1
- package/build/index.native.js +1 -1
- package/build/index.native.js.map +1 -1
- package/build/list-item/utils.js +5 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/loginout/index.js +11 -1
- package/build/loginout/index.js.map +1 -1
- package/build/navigation/constants.js +13 -0
- package/build/navigation/constants.js.map +1 -0
- package/build/navigation/edit/index.js +16 -26
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +4 -7
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +4 -6
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/interactivity.js +139 -0
- package/build/navigation/interactivity.js.map +1 -0
- package/build/navigation-link/edit.js +1 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +1 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/paragraph/index.js +5 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +5 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author-name/edit.js +1 -1
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +1 -2
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/overlay.js +5 -0
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-title/edit.js +14 -4
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/edit.native.js +3 -2
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/quote/transforms.js +16 -27
- package/build/quote/transforms.js.map +1 -1
- package/build/read-more/edit.js +1 -1
- package/build/read-more/edit.js.map +1 -1
- package/build/search/edit.js +9 -1
- package/build/search/edit.js.map +1 -1
- package/build/site-title/edit/index.js +1 -1
- package/build/site-title/edit/index.js.map +1 -1
- package/build/social-links/edit.js +2 -2
- package/build/social-links/edit.js.map +1 -1
- package/build/utils/interactivity/constants.js +9 -0
- package/build/utils/interactivity/constants.js.map +1 -0
- package/build/utils/interactivity/directives.js +208 -0
- package/build/utils/interactivity/directives.js.map +1 -0
- package/build/utils/interactivity/hooks.js +112 -0
- package/build/utils/interactivity/hooks.js.map +1 -0
- package/build/utils/interactivity/hydration.js +34 -0
- package/build/utils/interactivity/hydration.js.map +1 -0
- package/build/utils/interactivity/index.js +34 -0
- package/build/utils/interactivity/index.js.map +1 -0
- package/build/utils/interactivity/store.js +67 -0
- package/build/utils/interactivity/store.js.map +1 -0
- package/build/utils/interactivity/utils.js +87 -0
- package/build/utils/interactivity/utils.js.map +1 -0
- package/build/utils/interactivity/vdom.js +109 -0
- package/build/utils/interactivity/vdom.js.map +1 -0
- package/build-module/comment-author-name/edit.js +1 -1
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +1 -1
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +1 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/index.js +1 -1
- package/build-module/cover/variations.js +1 -1
- package/build-module/cover/variations.js.map +1 -1
- package/build-module/details/edit.js +20 -6
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +14 -10
- package/build-module/details/index.js.map +1 -1
- package/build-module/details/save.js +5 -2
- package/build-module/details/save.js.map +1 -1
- package/build-module/embed/variations.js +2 -2
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/file/view.js +1 -1
- package/build-module/file/view.js.map +1 -1
- package/build-module/gallery/edit.js +2 -8
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/index.js +0 -4
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/list-item/utils.js +5 -1
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/loginout/index.js +11 -1
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/navigation/constants.js +5 -0
- package/build-module/navigation/constants.js.map +1 -0
- package/build-module/navigation/edit/index.js +18 -27
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +1 -4
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +1 -4
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/interactivity.js +136 -0
- package/build-module/navigation/interactivity.js.map +1 -0
- package/build-module/navigation-link/edit.js +1 -1
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +1 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/paragraph/index.js +5 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +5 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author-name/edit.js +1 -1
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +1 -2
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/overlay.js +5 -0
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-title/edit.js +13 -4
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/preformatted/edit.native.js +3 -2
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/quote/transforms.js +16 -27
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/read-more/edit.js +1 -1
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/search/edit.js +9 -1
- package/build-module/search/edit.js.map +1 -1
- package/build-module/site-title/edit/index.js +1 -1
- package/build-module/site-title/edit/index.js.map +1 -1
- package/build-module/social-links/edit.js +2 -2
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/utils/interactivity/constants.js +2 -0
- package/build-module/utils/interactivity/constants.js.map +1 -0
- package/build-module/utils/interactivity/directives.js +193 -0
- package/build-module/utils/interactivity/directives.js.map +1 -0
- package/build-module/utils/interactivity/hooks.js +98 -0
- package/build-module/utils/interactivity/hooks.js.map +1 -0
- package/build-module/utils/interactivity/hydration.js +21 -0
- package/build-module/utils/interactivity/hydration.js.map +1 -0
- package/build-module/utils/interactivity/index.js +17 -0
- package/build-module/utils/interactivity/index.js.map +1 -0
- package/build-module/utils/interactivity/store.js +56 -0
- package/build-module/utils/interactivity/store.js.map +1 -0
- package/build-module/utils/interactivity/utils.js +75 -0
- package/build-module/utils/interactivity/utils.js.map +1 -0
- package/build-module/utils/interactivity/vdom.js +97 -0
- package/build-module/utils/interactivity/vdom.js.map +1 -0
- package/build-style/cover/style-rtl.css +2 -0
- package/build-style/cover/style.css +2 -0
- package/build-style/{details-summary → details}/editor-rtl.css +1 -1
- package/build-style/{details-summary → details}/editor.css +1 -1
- package/build-style/details/style-rtl.css +14 -0
- package/build-style/details/style.css +14 -0
- package/build-style/editor-rtl.css +3 -5
- package/build-style/editor.css +3 -5
- package/build-style/gallery/editor-rtl.css +0 -4
- package/build-style/gallery/editor.css +0 -4
- package/build-style/search/editor-rtl.css +1 -0
- package/build-style/search/editor.css +1 -0
- package/build-style/site-logo/editor-rtl.css +1 -0
- package/build-style/site-logo/editor.css +1 -0
- package/build-style/style-rtl.css +13 -1
- package/build-style/style.css +13 -1
- package/package.json +36 -32
- package/src/comment-author-name/edit.js +1 -1
- package/src/comment-edit-link/edit.js +1 -1
- package/src/comment-template/index.php +8 -7
- package/src/cover/block.json +1 -1
- package/src/cover/edit/inspector-controls.js +56 -54
- package/src/cover/style.scss +5 -0
- package/src/cover/test/edit.js +56 -2
- package/src/cover/variations.js +1 -3
- package/src/details/block.json +8 -6
- package/src/details/edit.js +27 -5
- package/src/details/editor.scss +3 -0
- package/src/details/index.js +10 -5
- package/src/details/save.js +5 -1
- package/src/details/style.scss +16 -0
- package/src/editor.scss +1 -1
- package/src/embed/variations.js +2 -2
- package/src/file/view.js +4 -1
- package/src/gallery/edit.js +5 -8
- package/src/gallery/editor.scss +0 -6
- package/src/gallery/test/index.native.js +48 -3
- package/src/image/test/edit.native.js +38 -16
- package/src/index.js +0 -4
- package/src/index.native.js +1 -0
- package/src/loginout/block.json +11 -1
- package/src/navigation/constants.js +16 -0
- package/src/navigation/edit/index.js +71 -83
- package/src/navigation/edit/inner-blocks.js +1 -16
- package/src/navigation/edit/unsaved-inner-blocks.js +1 -16
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
- package/src/navigation/index.php +209 -203
- package/src/navigation/interactivity.js +144 -0
- package/src/navigation-link/edit.js +1 -1
- package/src/navigation-submenu/edit.js +1 -1
- package/src/paragraph/block.json +5 -1
- package/src/post-author-name/edit.js +1 -1
- package/src/post-featured-image/edit.js +1 -1
- package/src/post-featured-image/index.php +1 -1
- package/src/post-featured-image/overlay.js +4 -0
- package/src/post-terms/index.php +2 -2
- package/src/post-title/edit.js +8 -1
- package/src/preformatted/edit.native.js +1 -3
- package/src/quote/transforms.js +0 -6
- package/src/read-more/edit.js +1 -1
- package/src/search/edit.js +9 -4
- package/src/search/editor.scss +1 -0
- package/src/site-logo/editor.scss +2 -1
- package/src/site-title/edit/index.js +1 -1
- package/src/social-links/edit.js +33 -31
- package/src/style.scss +0 -1
- package/src/template-part/index.php +20 -5
- package/src/utils/interactivity/constants.js +1 -0
- package/src/utils/interactivity/directives.js +179 -0
- package/src/utils/interactivity/hooks.js +76 -0
- package/src/utils/interactivity/hydration.js +22 -0
- package/src/utils/interactivity/index.js +17 -0
- package/src/utils/interactivity/store.js +45 -0
- package/src/utils/interactivity/utils.js +66 -0
- package/src/utils/interactivity/vdom.js +94 -0
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/details-content/edit.js +0 -34
- package/build/details-content/edit.js.map +0 -1
- package/build/details-content/index.js +0 -94
- package/build/details-content/index.js.map +0 -1
- package/build/details-content/save.js +0 -20
- package/build/details-content/save.js.map +0 -1
- package/build/details-summary/edit.js +0 -42
- package/build/details-summary/edit.js.map +0 -1
- package/build/details-summary/index.js +0 -97
- package/build/details-summary/index.js.map +0 -1
- package/build/details-summary/save.js +0 -24
- package/build/details-summary/save.js.map +0 -1
- package/build-module/details-content/edit.js +0 -23
- package/build-module/details-content/edit.js.map +0 -1
- package/build-module/details-content/index.js +0 -76
- package/build-module/details-content/index.js.map +0 -1
- package/build-module/details-content/save.js +0 -11
- package/build-module/details-content/save.js.map +0 -1
- package/build-module/details-summary/edit.js +0 -30
- package/build-module/details-summary/edit.js.map +0 -1
- package/build-module/details-summary/index.js +0 -79
- package/build-module/details-summary/index.js.map +0 -1
- package/build-module/details-summary/save.js +0 -16
- package/build-module/details-summary/save.js.map +0 -1
- package/build-style/details-summary/style-rtl.css +0 -91
- package/build-style/details-summary/style.css +0 -91
- package/src/details-content/block.json +0 -50
- package/src/details-content/edit.js +0 -29
- package/src/details-content/index.js +0 -23
- package/src/details-content/save.js +0 -12
- package/src/details-summary/block.json +0 -53
- package/src/details-summary/edit.js +0 -27
- package/src/details-summary/editor.scss +0 -3
- package/src/details-summary/index.js +0 -23
- package/src/details-summary/save.js +0 -13
- package/src/details-summary/style.scss +0 -3
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { postContent as icon } from '@wordpress/icons';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import initBlock from '../utils/init-block';
|
|
10
|
-
const metadata = {
|
|
11
|
-
$schema: "https://schemas.wp.org/trunk/block.json",
|
|
12
|
-
apiVersion: 2,
|
|
13
|
-
__experimental: true,
|
|
14
|
-
name: "core/details-content",
|
|
15
|
-
title: "Details Content",
|
|
16
|
-
category: "text",
|
|
17
|
-
parent: ["core/details"],
|
|
18
|
-
description: "Add content that may be shown or hidden via a Details block.",
|
|
19
|
-
textdomain: "default",
|
|
20
|
-
supports: {
|
|
21
|
-
align: false,
|
|
22
|
-
color: {
|
|
23
|
-
gradients: true,
|
|
24
|
-
link: true,
|
|
25
|
-
__experimentalDefaultControls: {
|
|
26
|
-
background: true,
|
|
27
|
-
text: true,
|
|
28
|
-
link: true
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
__experimentalBorder: {
|
|
32
|
-
radius: true,
|
|
33
|
-
color: true,
|
|
34
|
-
width: true,
|
|
35
|
-
style: true
|
|
36
|
-
},
|
|
37
|
-
html: false,
|
|
38
|
-
lock: false,
|
|
39
|
-
multiple: false,
|
|
40
|
-
reusable: false,
|
|
41
|
-
spacing: {
|
|
42
|
-
margin: true,
|
|
43
|
-
padding: true
|
|
44
|
-
},
|
|
45
|
-
typography: {
|
|
46
|
-
fontSize: true,
|
|
47
|
-
lineHeight: true,
|
|
48
|
-
__experimentalFontFamily: true,
|
|
49
|
-
__experimentalFontWeight: true,
|
|
50
|
-
__experimentalFontStyle: true,
|
|
51
|
-
__experimentalTextTransform: true,
|
|
52
|
-
__experimentalTextDecoration: true,
|
|
53
|
-
__experimentalLetterSpacing: true,
|
|
54
|
-
__experimentalDefaultControls: {
|
|
55
|
-
fontSize: true
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
import edit from './edit';
|
|
61
|
-
import save from './save';
|
|
62
|
-
const {
|
|
63
|
-
name
|
|
64
|
-
} = metadata;
|
|
65
|
-
export { metadata, name };
|
|
66
|
-
export const settings = {
|
|
67
|
-
icon,
|
|
68
|
-
save,
|
|
69
|
-
edit
|
|
70
|
-
};
|
|
71
|
-
export const init = () => initBlock({
|
|
72
|
-
name,
|
|
73
|
-
metadata,
|
|
74
|
-
settings
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/details-content/index.js"],"names":["postContent","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,IAAxB,QAAoC,kBAApC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBG,EAAAA,IAFuB;AAGvBD,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMK,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tsave,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* WordPress dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';
|
|
7
|
-
export default function save() {
|
|
8
|
-
const blockProps = useBlockProps.save();
|
|
9
|
-
return createElement("div", blockProps, createElement(InnerBlocks.Content, null));
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=save.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/details-content/save.js"],"names":["useBlockProps","InnerBlocks","save","blockProps"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,WAAxB,QAA2C,yBAA3C;AACA,eAAe,SAASC,IAAT,GAAgB;AAC9B,QAAMC,UAAU,GAAGH,aAAa,CAACE,IAAd,EAAnB;AACA,SACC,qBAAUC,UAAV,EACC,cAAC,WAAD,CAAa,OAAb,OADD,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, InnerBlocks } from '@wordpress/block-editor';\nexport default function save() {\n\tconst blockProps = useBlockProps.save();\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<InnerBlocks.Content />\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { createElement } from "@wordpress/element";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* WordPress dependencies
|
|
6
|
-
*/
|
|
7
|
-
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
8
|
-
import { __ } from '@wordpress/i18n';
|
|
9
|
-
|
|
10
|
-
function DetailsSummaryEdit(_ref) {
|
|
11
|
-
let {
|
|
12
|
-
attributes,
|
|
13
|
-
setAttributes
|
|
14
|
-
} = _ref;
|
|
15
|
-
const summary = attributes.summary ? attributes.summary : __('Details');
|
|
16
|
-
return createElement("summary", _extends({}, useBlockProps(), {
|
|
17
|
-
onClick: event => event.preventDefault()
|
|
18
|
-
}), createElement(RichText, {
|
|
19
|
-
"aria-label": __('Add summary'),
|
|
20
|
-
allowedFormats: [],
|
|
21
|
-
withoutInteractiveFormatting: true,
|
|
22
|
-
value: summary,
|
|
23
|
-
onChange: newSummary => setAttributes({
|
|
24
|
-
summary: newSummary
|
|
25
|
-
})
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default DetailsSummaryEdit;
|
|
30
|
-
//# sourceMappingURL=edit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/details-summary/edit.js"],"names":["RichText","useBlockProps","__","DetailsSummaryEdit","attributes","setAttributes","summary","event","preventDefault","newSummary"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,aAAnB,QAAwC,yBAAxC;AACA,SAASC,EAAT,QAAmB,iBAAnB;;AAEA,SAASC,kBAAT,OAA6D;AAAA,MAAhC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,GAAgC;AAC5D,QAAMC,OAAO,GAAGF,UAAU,CAACE,OAAX,GAAqBF,UAAU,CAACE,OAAhC,GAA0CJ,EAAE,CAAE,SAAF,CAA5D;AACA,SACC,sCACMD,aAAa,EADnB;AAEC,IAAA,OAAO,EAAKM,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,MAIC,cAAC,QAAD;AACC,kBAAaN,EAAE,CAAE,aAAF,CADhB;AAEC,IAAA,cAAc,EAAG,EAFlB;AAGC,IAAA,4BAA4B,MAH7B;AAIC,IAAA,KAAK,EAAGI,OAJT;AAKC,IAAA,QAAQ,EAAKG,UAAF,IACVJ,aAAa,CAAE;AAAEC,MAAAA,OAAO,EAAEG;AAAX,KAAF;AANf,IAJD,CADD;AAgBA;;AAED,eAAeN,kBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\nfunction DetailsSummaryEdit( { attributes, setAttributes } ) {\n\tconst summary = attributes.summary ? attributes.summary : __( 'Details' );\n\treturn (\n\t\t<summary\n\t\t\t{ ...useBlockProps() }\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t>\n\t\t\t<RichText\n\t\t\t\taria-label={ __( 'Add summary' ) }\n\t\t\t\tallowedFormats={ [] }\n\t\t\t\twithoutInteractiveFormatting\n\t\t\t\tvalue={ summary }\n\t\t\t\tonChange={ ( newSummary ) =>\n\t\t\t\t\tsetAttributes( { summary: newSummary } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</summary>\n\t);\n}\n\nexport default DetailsSummaryEdit;\n"]}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { heading as icon } from '@wordpress/icons';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import initBlock from '../utils/init-block';
|
|
10
|
-
const metadata = {
|
|
11
|
-
$schema: "https://schemas.wp.org/trunk/block.json",
|
|
12
|
-
apiVersion: 2,
|
|
13
|
-
__experimental: true,
|
|
14
|
-
name: "core/details-summary",
|
|
15
|
-
title: "Details Summary",
|
|
16
|
-
category: "text",
|
|
17
|
-
parent: ["core/details"],
|
|
18
|
-
description: "Provide summary text used to toggle the display of content inside a Details block.",
|
|
19
|
-
textdomain: "default",
|
|
20
|
-
attributes: {
|
|
21
|
-
summary: {
|
|
22
|
-
type: "string"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
supports: {
|
|
26
|
-
align: false,
|
|
27
|
-
color: {
|
|
28
|
-
gradients: true,
|
|
29
|
-
__experimentalDefaultControls: {
|
|
30
|
-
background: true,
|
|
31
|
-
text: true
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
__experimentalBorder: {
|
|
35
|
-
radius: true,
|
|
36
|
-
color: true,
|
|
37
|
-
width: true,
|
|
38
|
-
style: true
|
|
39
|
-
},
|
|
40
|
-
html: false,
|
|
41
|
-
lock: false,
|
|
42
|
-
multiple: false,
|
|
43
|
-
reusable: false,
|
|
44
|
-
spacing: {
|
|
45
|
-
margin: true,
|
|
46
|
-
padding: true
|
|
47
|
-
},
|
|
48
|
-
typography: {
|
|
49
|
-
fontSize: true,
|
|
50
|
-
lineHeight: true,
|
|
51
|
-
__experimentalFontFamily: true,
|
|
52
|
-
__experimentalFontWeight: true,
|
|
53
|
-
__experimentalFontStyle: true,
|
|
54
|
-
__experimentalTextTransform: true,
|
|
55
|
-
__experimentalTextDecoration: true,
|
|
56
|
-
__experimentalLetterSpacing: true,
|
|
57
|
-
__experimentalDefaultControls: {
|
|
58
|
-
fontSize: true
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
import edit from './edit';
|
|
64
|
-
import save from './save';
|
|
65
|
-
const {
|
|
66
|
-
name
|
|
67
|
-
} = metadata;
|
|
68
|
-
export { metadata, name };
|
|
69
|
-
export const settings = {
|
|
70
|
-
icon,
|
|
71
|
-
save,
|
|
72
|
-
edit
|
|
73
|
-
};
|
|
74
|
-
export const init = () => initBlock({
|
|
75
|
-
name,
|
|
76
|
-
metadata,
|
|
77
|
-
settings
|
|
78
|
-
});
|
|
79
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/details-summary/index.js"],"names":["heading","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAApB,QAAgC,kBAAhC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBG,EAAAA,IAFuB;AAGvBD,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMK,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { heading as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tsave,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* WordPress dependencies
|
|
5
|
-
*/
|
|
6
|
-
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
7
|
-
export default function save(_ref) {
|
|
8
|
-
let {
|
|
9
|
-
attributes
|
|
10
|
-
} = _ref;
|
|
11
|
-
const summary = attributes.summary ? attributes.summary : 'Details';
|
|
12
|
-
return createElement("summary", useBlockProps.save(), createElement(RichText.Content, {
|
|
13
|
-
value: summary
|
|
14
|
-
}));
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=save.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/details-summary/save.js"],"names":["RichText","useBlockProps","save","attributes","summary"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,aAAnB,QAAwC,yBAAxC;AAEA,eAAe,SAASC,IAAT,OAAgC;AAAA,MAAjB;AAAEC,IAAAA;AAAF,GAAiB;AAC9C,QAAMC,OAAO,GAAGD,UAAU,CAACC,OAAX,GAAqBD,UAAU,CAACC,OAAhC,GAA0C,SAA1D;AACA,SACC,yBAAcH,aAAa,CAACC,IAAd,EAAd,EACC,cAAC,QAAD,CAAU,OAAV;AAAkB,IAAA,KAAK,EAAGE;AAA1B,IADD,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst summary = attributes.summary ? attributes.summary : 'Details';\n\treturn (\n\t\t<summary { ...useBlockProps.save() }>\n\t\t\t<RichText.Content value={ summary } />\n\t\t</summary>\n\t);\n}\n"]}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a hex value into the rgb equivalent.
|
|
3
|
-
*
|
|
4
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
5
|
-
* @return {string} comma separated rgb values
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Colors
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Breakpoints & Media Queries
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* SCSS Variables.
|
|
15
|
-
*
|
|
16
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
17
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
18
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Converts a hex value into the rgb equivalent.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
24
|
-
* @return {string} comma separated rgb values
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Colors
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* Fonts & basic variables.
|
|
31
|
-
*/
|
|
32
|
-
/**
|
|
33
|
-
* Grid System.
|
|
34
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Dimensions.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Shadows.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Editor widths.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* Block & Editor UI.
|
|
47
|
-
*/
|
|
48
|
-
/**
|
|
49
|
-
* Block paddings.
|
|
50
|
-
*/
|
|
51
|
-
/**
|
|
52
|
-
* React Native specific.
|
|
53
|
-
* These variables do not appear to be used anywhere else.
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* Converts a hex value into the rgb equivalent.
|
|
57
|
-
*
|
|
58
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
59
|
-
* @return {string} comma separated rgb values
|
|
60
|
-
*/
|
|
61
|
-
/**
|
|
62
|
-
* Long content fade mixin
|
|
63
|
-
*
|
|
64
|
-
* Creates a fading overlay to signify that the content is longer
|
|
65
|
-
* than the space allows.
|
|
66
|
-
*/
|
|
67
|
-
/**
|
|
68
|
-
* Breakpoint mixins
|
|
69
|
-
*/
|
|
70
|
-
/**
|
|
71
|
-
* Focus styles.
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
|
-
* Applies editor left position to the selector passed as argument
|
|
75
|
-
*/
|
|
76
|
-
/**
|
|
77
|
-
* Styles that are reused verbatim in a few places
|
|
78
|
-
*/
|
|
79
|
-
/**
|
|
80
|
-
* Allows users to opt-out of animations via OS-level preferences.
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* Reset default styles for JavaScript UI based pages.
|
|
84
|
-
* This is a WP-admin agnostic reset
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
|
-
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
88
|
-
*/
|
|
89
|
-
.wp-block-details-summary {
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a hex value into the rgb equivalent.
|
|
3
|
-
*
|
|
4
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
5
|
-
* @return {string} comma separated rgb values
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Colors
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Breakpoints & Media Queries
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* SCSS Variables.
|
|
15
|
-
*
|
|
16
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
17
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
18
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
|
-
* Converts a hex value into the rgb equivalent.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
24
|
-
* @return {string} comma separated rgb values
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Colors
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* Fonts & basic variables.
|
|
31
|
-
*/
|
|
32
|
-
/**
|
|
33
|
-
* Grid System.
|
|
34
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Dimensions.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Shadows.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Editor widths.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* Block & Editor UI.
|
|
47
|
-
*/
|
|
48
|
-
/**
|
|
49
|
-
* Block paddings.
|
|
50
|
-
*/
|
|
51
|
-
/**
|
|
52
|
-
* React Native specific.
|
|
53
|
-
* These variables do not appear to be used anywhere else.
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* Converts a hex value into the rgb equivalent.
|
|
57
|
-
*
|
|
58
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
59
|
-
* @return {string} comma separated rgb values
|
|
60
|
-
*/
|
|
61
|
-
/**
|
|
62
|
-
* Long content fade mixin
|
|
63
|
-
*
|
|
64
|
-
* Creates a fading overlay to signify that the content is longer
|
|
65
|
-
* than the space allows.
|
|
66
|
-
*/
|
|
67
|
-
/**
|
|
68
|
-
* Breakpoint mixins
|
|
69
|
-
*/
|
|
70
|
-
/**
|
|
71
|
-
* Focus styles.
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
|
-
* Applies editor left position to the selector passed as argument
|
|
75
|
-
*/
|
|
76
|
-
/**
|
|
77
|
-
* Styles that are reused verbatim in a few places
|
|
78
|
-
*/
|
|
79
|
-
/**
|
|
80
|
-
* Allows users to opt-out of animations via OS-level preferences.
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* Reset default styles for JavaScript UI based pages.
|
|
84
|
-
* This is a WP-admin agnostic reset
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
|
-
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
88
|
-
*/
|
|
89
|
-
.wp-block-details-summary {
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
|
-
"apiVersion": 2,
|
|
4
|
-
"__experimental": true,
|
|
5
|
-
"name": "core/details-content",
|
|
6
|
-
"title": "Details Content",
|
|
7
|
-
"category": "text",
|
|
8
|
-
"parent": [ "core/details" ],
|
|
9
|
-
"description": "Add content that may be shown or hidden via a Details block.",
|
|
10
|
-
"textdomain": "default",
|
|
11
|
-
"supports": {
|
|
12
|
-
"align": false,
|
|
13
|
-
"color": {
|
|
14
|
-
"gradients": true,
|
|
15
|
-
"link": true,
|
|
16
|
-
"__experimentalDefaultControls": {
|
|
17
|
-
"background": true,
|
|
18
|
-
"text": true,
|
|
19
|
-
"link": true
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"__experimentalBorder": {
|
|
23
|
-
"radius": true,
|
|
24
|
-
"color": true,
|
|
25
|
-
"width": true,
|
|
26
|
-
"style": true
|
|
27
|
-
},
|
|
28
|
-
"html": false,
|
|
29
|
-
"lock": false,
|
|
30
|
-
"multiple": false,
|
|
31
|
-
"reusable": false,
|
|
32
|
-
"spacing": {
|
|
33
|
-
"margin": true,
|
|
34
|
-
"padding": true
|
|
35
|
-
},
|
|
36
|
-
"typography": {
|
|
37
|
-
"fontSize": true,
|
|
38
|
-
"lineHeight": true,
|
|
39
|
-
"__experimentalFontFamily": true,
|
|
40
|
-
"__experimentalFontWeight": true,
|
|
41
|
-
"__experimentalFontStyle": true,
|
|
42
|
-
"__experimentalTextTransform": true,
|
|
43
|
-
"__experimentalTextDecoration": true,
|
|
44
|
-
"__experimentalLetterSpacing": true,
|
|
45
|
-
"__experimentalDefaultControls": {
|
|
46
|
-
"fontSize": true
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
|
|
5
|
-
import { __ } from '@wordpress/i18n';
|
|
6
|
-
import { View } from '@wordpress/primitives';
|
|
7
|
-
|
|
8
|
-
const TEMPLATE = [
|
|
9
|
-
[
|
|
10
|
-
'core/paragraph',
|
|
11
|
-
{
|
|
12
|
-
placeholder: __(
|
|
13
|
-
'Add text or blocks that will display when the details block is opened.'
|
|
14
|
-
),
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
function DetailsContentEdit() {
|
|
20
|
-
const blockProps = useBlockProps();
|
|
21
|
-
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
22
|
-
template: TEMPLATE,
|
|
23
|
-
templateLock: false,
|
|
24
|
-
} );
|
|
25
|
-
|
|
26
|
-
return <View { ...innerBlocksProps }></View>;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default DetailsContentEdit;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { postContent as icon } from '@wordpress/icons';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import initBlock from '../utils/init-block';
|
|
10
|
-
import metadata from './block.json';
|
|
11
|
-
import edit from './edit';
|
|
12
|
-
import save from './save';
|
|
13
|
-
|
|
14
|
-
const { name } = metadata;
|
|
15
|
-
export { metadata, name };
|
|
16
|
-
|
|
17
|
-
export const settings = {
|
|
18
|
-
icon,
|
|
19
|
-
save,
|
|
20
|
-
edit,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const init = () => initBlock( { name, metadata, settings } );
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';
|
|
5
|
-
export default function save() {
|
|
6
|
-
const blockProps = useBlockProps.save();
|
|
7
|
-
return (
|
|
8
|
-
<div { ...blockProps }>
|
|
9
|
-
<InnerBlocks.Content />
|
|
10
|
-
</div>
|
|
11
|
-
);
|
|
12
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
|
-
"apiVersion": 2,
|
|
4
|
-
"__experimental": true,
|
|
5
|
-
"name": "core/details-summary",
|
|
6
|
-
"title": "Details Summary",
|
|
7
|
-
"category": "text",
|
|
8
|
-
"parent": [ "core/details" ],
|
|
9
|
-
"description": "Provide summary text used to toggle the display of content inside a Details block.",
|
|
10
|
-
"textdomain": "default",
|
|
11
|
-
"attributes": {
|
|
12
|
-
"summary": {
|
|
13
|
-
"type": "string"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"supports": {
|
|
17
|
-
"align": false,
|
|
18
|
-
"color": {
|
|
19
|
-
"gradients": true,
|
|
20
|
-
"__experimentalDefaultControls": {
|
|
21
|
-
"background": true,
|
|
22
|
-
"text": true
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"__experimentalBorder": {
|
|
26
|
-
"radius": true,
|
|
27
|
-
"color": true,
|
|
28
|
-
"width": true,
|
|
29
|
-
"style": true
|
|
30
|
-
},
|
|
31
|
-
"html": false,
|
|
32
|
-
"lock": false,
|
|
33
|
-
"multiple": false,
|
|
34
|
-
"reusable": false,
|
|
35
|
-
"spacing": {
|
|
36
|
-
"margin": true,
|
|
37
|
-
"padding": true
|
|
38
|
-
},
|
|
39
|
-
"typography": {
|
|
40
|
-
"fontSize": true,
|
|
41
|
-
"lineHeight": true,
|
|
42
|
-
"__experimentalFontFamily": true,
|
|
43
|
-
"__experimentalFontWeight": true,
|
|
44
|
-
"__experimentalFontStyle": true,
|
|
45
|
-
"__experimentalTextTransform": true,
|
|
46
|
-
"__experimentalTextDecoration": true,
|
|
47
|
-
"__experimentalLetterSpacing": true,
|
|
48
|
-
"__experimentalDefaultControls": {
|
|
49
|
-
"fontSize": true
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
5
|
-
import { __ } from '@wordpress/i18n';
|
|
6
|
-
|
|
7
|
-
function DetailsSummaryEdit( { attributes, setAttributes } ) {
|
|
8
|
-
const summary = attributes.summary ? attributes.summary : __( 'Details' );
|
|
9
|
-
return (
|
|
10
|
-
<summary
|
|
11
|
-
{ ...useBlockProps() }
|
|
12
|
-
onClick={ ( event ) => event.preventDefault() }
|
|
13
|
-
>
|
|
14
|
-
<RichText
|
|
15
|
-
aria-label={ __( 'Add summary' ) }
|
|
16
|
-
allowedFormats={ [] }
|
|
17
|
-
withoutInteractiveFormatting
|
|
18
|
-
value={ summary }
|
|
19
|
-
onChange={ ( newSummary ) =>
|
|
20
|
-
setAttributes( { summary: newSummary } )
|
|
21
|
-
}
|
|
22
|
-
/>
|
|
23
|
-
</summary>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default DetailsSummaryEdit;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { heading as icon } from '@wordpress/icons';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import initBlock from '../utils/init-block';
|
|
10
|
-
import metadata from './block.json';
|
|
11
|
-
import edit from './edit';
|
|
12
|
-
import save from './save';
|
|
13
|
-
|
|
14
|
-
const { name } = metadata;
|
|
15
|
-
export { metadata, name };
|
|
16
|
-
|
|
17
|
-
export const settings = {
|
|
18
|
-
icon,
|
|
19
|
-
save,
|
|
20
|
-
edit,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const init = () => initBlock( { name, metadata, settings } );
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
5
|
-
|
|
6
|
-
export default function save( { attributes } ) {
|
|
7
|
-
const summary = attributes.summary ? attributes.summary : 'Details';
|
|
8
|
-
return (
|
|
9
|
-
<summary { ...useBlockProps.save() }>
|
|
10
|
-
<RichText.Content value={ summary } />
|
|
11
|
-
</summary>
|
|
12
|
-
);
|
|
13
|
-
}
|