@wordpress/block-library 9.36.1-next.738bb1424.0 → 9.36.2-next.8fd3f8831.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 +4 -0
- package/build/accordion-heading/deprecated.cjs +120 -1
- package/build/accordion-heading/deprecated.cjs.map +2 -2
- package/build/accordion-heading/edit.cjs +9 -1
- package/build/accordion-heading/edit.cjs.map +3 -3
- package/build/accordion-heading/save.cjs +1 -0
- package/build/accordion-heading/save.cjs.map +2 -2
- package/build/accordion-item/block.json +3 -0
- package/build/accordion-item/edit.cjs +3 -37
- package/build/accordion-item/edit.cjs.map +2 -2
- package/build/accordion-panel/block.json +1 -4
- package/build/accordion-panel/edit.cjs +3 -2
- package/build/accordion-panel/edit.cjs.map +2 -2
- package/build/breadcrumbs/block.json +1 -2
- package/build/breadcrumbs/edit.cjs +2 -1
- package/build/breadcrumbs/edit.cjs.map +2 -2
- package/build/button/index.cjs +9 -1
- package/build/button/index.cjs.map +2 -2
- package/build/buttons/block.json +1 -0
- package/build/comment-author-name/block.json +1 -3
- package/build/comment-author-name/deprecated.cjs +57 -1
- package/build/comment-author-name/deprecated.cjs.map +3 -3
- package/build/comment-author-name/edit.cjs +9 -19
- package/build/comment-author-name/edit.cjs.map +3 -3
- package/build/freeform/edit.cjs +48 -174
- package/build/freeform/edit.cjs.map +2 -2
- package/build/freeform/modal.cjs +51 -67
- package/build/freeform/modal.cjs.map +2 -2
- package/build/index.cjs +2 -2
- package/build/index.cjs.map +2 -2
- package/build/list/block.json +2 -1
- package/build/query/edit/query-content.cjs +4 -3
- package/build/query/edit/query-content.cjs.map +2 -2
- package/build/query/edit/query-placeholder.cjs +4 -3
- package/build/query/edit/query-placeholder.cjs.map +2 -2
- package/build/query/edit/query-toolbar.cjs +19 -7
- package/build/query/edit/query-toolbar.cjs.map +3 -3
- package/build/social-links/block.json +2 -1
- package/build-module/accordion-heading/deprecated.js +122 -2
- package/build-module/accordion-heading/deprecated.js.map +2 -2
- package/build-module/accordion-heading/edit.js +11 -2
- package/build-module/accordion-heading/edit.js.map +2 -2
- package/build-module/accordion-heading/save.js +1 -0
- package/build-module/accordion-heading/save.js.map +2 -2
- package/build-module/accordion-item/block.json +3 -0
- package/build-module/accordion-item/edit.js +3 -37
- package/build-module/accordion-item/edit.js.map +2 -2
- package/build-module/accordion-panel/block.json +1 -4
- package/build-module/accordion-panel/edit.js +3 -2
- package/build-module/accordion-panel/edit.js.map +2 -2
- package/build-module/breadcrumbs/block.json +1 -2
- package/build-module/breadcrumbs/edit.js +2 -1
- package/build-module/breadcrumbs/edit.js.map +2 -2
- package/build-module/button/index.js +9 -1
- package/build-module/button/index.js.map +2 -2
- package/build-module/buttons/block.json +1 -0
- package/build-module/comment-author-name/block.json +1 -3
- package/build-module/comment-author-name/deprecated.js +57 -1
- package/build-module/comment-author-name/deprecated.js.map +2 -2
- package/build-module/comment-author-name/edit.js +10 -25
- package/build-module/comment-author-name/edit.js.map +2 -2
- package/build-module/freeform/edit.js +56 -176
- package/build-module/freeform/edit.js.map +2 -2
- package/build-module/freeform/modal.js +55 -78
- package/build-module/freeform/modal.js.map +2 -2
- package/build-module/index.js +2 -2
- package/build-module/index.js.map +2 -2
- package/build-module/list/block.json +2 -1
- package/build-module/query/edit/query-content.js +5 -5
- package/build-module/query/edit/query-content.js.map +2 -2
- package/build-module/query/edit/query-placeholder.js +4 -4
- package/build-module/query/edit/query-placeholder.js.map +2 -2
- package/build-module/query/edit/query-toolbar.js +22 -7
- package/build-module/query/edit/query-toolbar.js.map +2 -2
- package/build-module/social-links/block.json +2 -1
- package/build-style/audio/style-rtl.css +4 -0
- package/build-style/audio/style.css +4 -0
- package/build-style/audio/theme-rtl.css +4 -0
- package/build-style/audio/theme.css +4 -0
- package/build-style/columns/style-rtl.css +4 -0
- package/build-style/columns/style.css +4 -0
- package/build-style/common-rtl.css +4 -0
- package/build-style/common.css +4 -0
- package/build-style/editor-rtl.css +9 -324
- package/build-style/editor.css +9 -328
- package/build-style/embed/style-rtl.css +4 -0
- package/build-style/embed/style.css +4 -0
- package/build-style/embed/theme-rtl.css +4 -0
- package/build-style/embed/theme.css +4 -0
- package/build-style/freeform/editor-rtl.css +10 -330
- package/build-style/freeform/editor.css +10 -334
- package/build-style/gallery/editor-rtl.css +4 -0
- package/build-style/gallery/editor.css +4 -0
- package/build-style/gallery/style-rtl.css +4 -0
- package/build-style/gallery/style.css +4 -0
- package/build-style/gallery/theme-rtl.css +4 -0
- package/build-style/gallery/theme.css +4 -0
- package/build-style/html/editor-rtl.css +4 -0
- package/build-style/html/editor.css +4 -0
- package/build-style/image/editor-rtl.css +4 -0
- package/build-style/image/editor.css +4 -0
- package/build-style/image/style-rtl.css +4 -0
- package/build-style/image/style.css +4 -0
- package/build-style/image/theme-rtl.css +4 -0
- package/build-style/image/theme.css +4 -0
- package/build-style/latest-posts/style-rtl.css +4 -0
- package/build-style/latest-posts/style.css +4 -0
- package/build-style/navigation/editor-rtl.css +4 -0
- package/build-style/navigation/editor.css +4 -0
- package/build-style/navigation/style-rtl.css +4 -0
- package/build-style/navigation/style.css +4 -0
- package/build-style/navigation-submenu/editor-rtl.css +4 -0
- package/build-style/navigation-submenu/editor.css +4 -0
- package/build-style/page-list/editor-rtl.css +4 -0
- package/build-style/page-list/editor.css +4 -0
- package/build-style/paragraph/editor-rtl.css +5 -0
- package/build-style/paragraph/editor.css +5 -0
- package/build-style/post-template/style-rtl.css +4 -0
- package/build-style/post-template/style.css +4 -0
- package/build-style/query/editor-rtl.css +4 -0
- package/build-style/query/editor.css +4 -0
- package/build-style/rss/style-rtl.css +4 -0
- package/build-style/rss/style.css +4 -0
- package/build-style/shortcode/editor-rtl.css +4 -0
- package/build-style/shortcode/editor.css +4 -0
- package/build-style/style-rtl.css +4 -0
- package/build-style/style.css +4 -0
- package/build-style/table/editor-rtl.css +4 -0
- package/build-style/table/editor.css +4 -0
- package/build-style/table/theme-rtl.css +4 -0
- package/build-style/table/theme.css +4 -0
- package/build-style/template-part/editor-rtl.css +4 -0
- package/build-style/template-part/editor.css +4 -0
- package/build-style/theme-rtl.css +4 -0
- package/build-style/theme.css +4 -0
- package/build-style/video/style-rtl.css +4 -0
- package/build-style/video/style.css +4 -0
- package/build-style/video/theme-rtl.css +4 -0
- package/build-style/video/theme.css +4 -0
- package/package.json +37 -37
- package/src/accordion-heading/deprecated.js +122 -1
- package/src/accordion-heading/edit.js +11 -1
- package/src/accordion-heading/save.js +1 -0
- package/src/accordion-item/block.json +3 -0
- package/src/accordion-item/edit.js +4 -38
- package/src/accordion-panel/block.json +1 -4
- package/src/accordion-panel/edit.js +3 -4
- package/src/breadcrumbs/block.json +1 -2
- package/src/breadcrumbs/edit.js +2 -1
- package/src/breadcrumbs/index.php +23 -1
- package/src/button/index.js +12 -0
- package/src/button/test/get-experimental-label.js +50 -0
- package/src/buttons/block.json +1 -0
- package/src/comment-author-name/block.json +1 -3
- package/src/comment-author-name/deprecated.js +61 -1
- package/src/comment-author-name/edit.js +10 -34
- package/src/freeform/edit.js +60 -245
- package/src/freeform/editor.scss +1 -382
- package/src/freeform/modal.js +47 -80
- package/src/index.js +1 -1
- package/src/list/block.json +2 -1
- package/src/paragraph/editor.scss +8 -0
- package/src/post-date/index.php +4 -7
- package/src/query/edit/query-content.js +3 -3
- package/src/query/edit/query-placeholder.js +3 -3
- package/src/query/edit/query-toolbar.js +47 -31
- package/src/social-links/block.json +2 -1
- package/src/term-template/index.php +1 -1
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-post-template {
|
|
87
91
|
margin-top: 0;
|
|
88
92
|
margin-bottom: 0;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-post-template {
|
|
87
91
|
margin-top: 0;
|
|
88
92
|
margin-bottom: 0;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.block-library-query-pattern__selection-modal .block-editor-block-patterns-list {
|
|
87
91
|
column-count: 2;
|
|
88
92
|
column-gap: 24px;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.block-library-query-pattern__selection-modal .block-editor-block-patterns-list {
|
|
87
91
|
column-count: 2;
|
|
88
92
|
column-gap: 24px;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
ul.wp-block-rss.alignleft {
|
|
87
91
|
margin-right: 2em;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
ul.wp-block-rss.alignleft {
|
|
87
91
|
/*rtl:ignore*/
|
|
88
92
|
margin-right: 2em;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.blocks-shortcode__textarea {
|
|
87
91
|
box-sizing: border-box;
|
|
88
92
|
max-height: 250px;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.blocks-shortcode__textarea {
|
|
87
91
|
box-sizing: border-box;
|
|
88
92
|
max-height: 250px;
|
|
@@ -167,6 +167,10 @@
|
|
|
167
167
|
/**
|
|
168
168
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
169
169
|
*/
|
|
170
|
+
/**
|
|
171
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
172
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
173
|
+
*/
|
|
170
174
|
.wp-block-audio {
|
|
171
175
|
box-sizing: border-box;
|
|
172
176
|
}
|
package/build-style/style.css
CHANGED
|
@@ -167,6 +167,10 @@
|
|
|
167
167
|
/**
|
|
168
168
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
169
169
|
*/
|
|
170
|
+
/**
|
|
171
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
172
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
173
|
+
*/
|
|
170
174
|
.wp-block-audio {
|
|
171
175
|
box-sizing: border-box;
|
|
172
176
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block[data-align=left] > .wp-block-table, .wp-block[data-align=right] > .wp-block-table, .wp-block[data-align=center] > .wp-block-table {
|
|
87
91
|
height: auto;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block[data-align=left] > .wp-block-table, .wp-block[data-align=right] > .wp-block-table, .wp-block[data-align=center] > .wp-block-table {
|
|
87
91
|
height: auto;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-table {
|
|
87
91
|
margin: 0 0 1em 0;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-table {
|
|
87
91
|
margin: 0 0 1em 0;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.block-editor-template-part__selection-modal {
|
|
87
91
|
z-index: 1000001;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.block-editor-template-part__selection-modal {
|
|
87
91
|
z-index: 1000001;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-audio :where(figcaption) {
|
|
87
91
|
color: #555;
|
|
88
92
|
font-size: 13px;
|
package/build-style/theme.css
CHANGED
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-audio :where(figcaption) {
|
|
87
91
|
color: #555;
|
|
88
92
|
font-size: 13px;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-video {
|
|
87
91
|
box-sizing: border-box;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-video {
|
|
87
91
|
box-sizing: border-box;
|
|
88
92
|
}
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-video :where(figcaption) {
|
|
87
91
|
color: #555;
|
|
88
92
|
font-size: 13px;
|
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
/**
|
|
84
84
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
85
85
|
*/
|
|
86
|
+
/**
|
|
87
|
+
* Creates a checkerboard pattern background to indicate transparency.
|
|
88
|
+
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
|
|
89
|
+
*/
|
|
86
90
|
.wp-block-video :where(figcaption) {
|
|
87
91
|
color: #555;
|
|
88
92
|
font-size: 13px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.36.
|
|
3
|
+
"version": "9.36.2-next.8fd3f8831.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -94,41 +94,41 @@
|
|
|
94
94
|
"build-module/*/init.js"
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@wordpress/a11y": "^4.36.1-next.
|
|
98
|
-
"@wordpress/api-fetch": "^7.36.1-next.
|
|
99
|
-
"@wordpress/autop": "^4.36.1-next.
|
|
100
|
-
"@wordpress/base-styles": "^6.12.1-next.
|
|
101
|
-
"@wordpress/blob": "^4.36.1-next.
|
|
102
|
-
"@wordpress/block-editor": "^15.9.1-next.
|
|
103
|
-
"@wordpress/blocks": "^15.9.1-next.
|
|
104
|
-
"@wordpress/components": "^31.0.1-next.
|
|
105
|
-
"@wordpress/compose": "^7.36.1-next.
|
|
106
|
-
"@wordpress/core-data": "^7.36.1-next.
|
|
107
|
-
"@wordpress/data": "^10.36.1-next.
|
|
108
|
-
"@wordpress/date": "^5.36.1-next.
|
|
109
|
-
"@wordpress/deprecated": "^4.36.1-next.
|
|
110
|
-
"@wordpress/dom": "^4.36.1-next.
|
|
111
|
-
"@wordpress/element": "^6.36.1-next.
|
|
112
|
-
"@wordpress/escape-html": "^3.36.1-next.
|
|
113
|
-
"@wordpress/hooks": "^4.36.1-next.
|
|
114
|
-
"@wordpress/html-entities": "^4.36.1-next.
|
|
115
|
-
"@wordpress/i18n": "^6.9.1-next.
|
|
116
|
-
"@wordpress/icons": "^11.3.1-next.
|
|
117
|
-
"@wordpress/interactivity": "^6.36.1-next.
|
|
118
|
-
"@wordpress/interactivity-router": "^2.36.1-next.
|
|
119
|
-
"@wordpress/keyboard-shortcuts": "^5.36.1-next.
|
|
120
|
-
"@wordpress/keycodes": "^4.36.1-next.
|
|
121
|
-
"@wordpress/latex-to-mathml": "^1.4.1-next.
|
|
122
|
-
"@wordpress/notices": "^5.36.1-next.
|
|
123
|
-
"@wordpress/patterns": "^2.36.1-next.
|
|
124
|
-
"@wordpress/primitives": "^4.36.1-next.
|
|
125
|
-
"@wordpress/private-apis": "^1.36.1-next.
|
|
126
|
-
"@wordpress/reusable-blocks": "^5.36.1-next.
|
|
127
|
-
"@wordpress/rich-text": "^7.36.1-next.
|
|
128
|
-
"@wordpress/server-side-render": "^6.12.1-next.
|
|
129
|
-
"@wordpress/url": "^4.36.1-next.
|
|
130
|
-
"@wordpress/viewport": "^6.36.1-next.
|
|
131
|
-
"@wordpress/wordcount": "^4.36.1-next.
|
|
97
|
+
"@wordpress/a11y": "^4.36.1-next.8fd3f8831.0",
|
|
98
|
+
"@wordpress/api-fetch": "^7.36.1-next.8fd3f8831.0",
|
|
99
|
+
"@wordpress/autop": "^4.36.1-next.8fd3f8831.0",
|
|
100
|
+
"@wordpress/base-styles": "^6.12.1-next.8fd3f8831.0",
|
|
101
|
+
"@wordpress/blob": "^4.36.1-next.8fd3f8831.0",
|
|
102
|
+
"@wordpress/block-editor": "^15.9.1-next.8fd3f8831.0",
|
|
103
|
+
"@wordpress/blocks": "^15.9.1-next.8fd3f8831.0",
|
|
104
|
+
"@wordpress/components": "^31.0.1-next.8fd3f8831.0",
|
|
105
|
+
"@wordpress/compose": "^7.36.1-next.8fd3f8831.0",
|
|
106
|
+
"@wordpress/core-data": "^7.36.1-next.8fd3f8831.0",
|
|
107
|
+
"@wordpress/data": "^10.36.1-next.8fd3f8831.0",
|
|
108
|
+
"@wordpress/date": "^5.36.1-next.8fd3f8831.0",
|
|
109
|
+
"@wordpress/deprecated": "^4.36.1-next.8fd3f8831.0",
|
|
110
|
+
"@wordpress/dom": "^4.36.1-next.8fd3f8831.0",
|
|
111
|
+
"@wordpress/element": "^6.36.1-next.8fd3f8831.0",
|
|
112
|
+
"@wordpress/escape-html": "^3.36.1-next.8fd3f8831.0",
|
|
113
|
+
"@wordpress/hooks": "^4.36.1-next.8fd3f8831.0",
|
|
114
|
+
"@wordpress/html-entities": "^4.36.1-next.8fd3f8831.0",
|
|
115
|
+
"@wordpress/i18n": "^6.9.1-next.8fd3f8831.0",
|
|
116
|
+
"@wordpress/icons": "^11.3.1-next.8fd3f8831.0",
|
|
117
|
+
"@wordpress/interactivity": "^6.36.1-next.8fd3f8831.0",
|
|
118
|
+
"@wordpress/interactivity-router": "^2.36.1-next.8fd3f8831.0",
|
|
119
|
+
"@wordpress/keyboard-shortcuts": "^5.36.1-next.8fd3f8831.0",
|
|
120
|
+
"@wordpress/keycodes": "^4.36.1-next.8fd3f8831.0",
|
|
121
|
+
"@wordpress/latex-to-mathml": "^1.4.1-next.8fd3f8831.0",
|
|
122
|
+
"@wordpress/notices": "^5.36.1-next.8fd3f8831.0",
|
|
123
|
+
"@wordpress/patterns": "^2.36.1-next.8fd3f8831.0",
|
|
124
|
+
"@wordpress/primitives": "^4.36.1-next.8fd3f8831.0",
|
|
125
|
+
"@wordpress/private-apis": "^1.36.1-next.8fd3f8831.0",
|
|
126
|
+
"@wordpress/reusable-blocks": "^5.36.1-next.8fd3f8831.0",
|
|
127
|
+
"@wordpress/rich-text": "^7.36.1-next.8fd3f8831.0",
|
|
128
|
+
"@wordpress/server-side-render": "^6.12.1-next.8fd3f8831.0",
|
|
129
|
+
"@wordpress/url": "^4.36.1-next.8fd3f8831.0",
|
|
130
|
+
"@wordpress/viewport": "^6.36.1-next.8fd3f8831.0",
|
|
131
|
+
"@wordpress/wordcount": "^4.36.1-next.8fd3f8831.0",
|
|
132
132
|
"change-case": "^4.1.2",
|
|
133
133
|
"clsx": "^2.1.1",
|
|
134
134
|
"colord": "^2.7.0",
|
|
@@ -146,5 +146,5 @@
|
|
|
146
146
|
"publishConfig": {
|
|
147
147
|
"access": "public"
|
|
148
148
|
},
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "e582b351bc4c4b8734bb087f63a3beec9875c3c7"
|
|
150
150
|
}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
useBlockProps,
|
|
6
6
|
__experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,
|
|
7
7
|
RichText,
|
|
8
|
+
getTypographyClassesAndStyles,
|
|
8
9
|
} from '@wordpress/block-editor';
|
|
9
10
|
|
|
10
11
|
const v1 = {
|
|
@@ -116,4 +117,124 @@ const v1 = {
|
|
|
116
117
|
},
|
|
117
118
|
};
|
|
118
119
|
|
|
119
|
-
|
|
120
|
+
const v2 = {
|
|
121
|
+
attributes: {
|
|
122
|
+
openByDefault: {
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
default: false,
|
|
125
|
+
},
|
|
126
|
+
title: {
|
|
127
|
+
type: 'rich-text',
|
|
128
|
+
source: 'rich-text',
|
|
129
|
+
selector: '.wp-block-accordion-heading__toggle-title',
|
|
130
|
+
role: 'content',
|
|
131
|
+
},
|
|
132
|
+
level: {
|
|
133
|
+
type: 'number',
|
|
134
|
+
},
|
|
135
|
+
iconPosition: {
|
|
136
|
+
type: 'string',
|
|
137
|
+
enum: [ 'left', 'right' ],
|
|
138
|
+
default: 'right',
|
|
139
|
+
},
|
|
140
|
+
showIcon: {
|
|
141
|
+
type: 'boolean',
|
|
142
|
+
default: true,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
supports: {
|
|
146
|
+
anchor: true,
|
|
147
|
+
color: {
|
|
148
|
+
background: true,
|
|
149
|
+
gradients: true,
|
|
150
|
+
},
|
|
151
|
+
align: false,
|
|
152
|
+
interactivity: true,
|
|
153
|
+
spacing: {
|
|
154
|
+
padding: true,
|
|
155
|
+
__experimentalDefaultControls: {
|
|
156
|
+
padding: true,
|
|
157
|
+
},
|
|
158
|
+
__experimentalSkipSerialization: true,
|
|
159
|
+
__experimentalSelector: '.wp-block-accordion-heading__toggle',
|
|
160
|
+
},
|
|
161
|
+
__experimentalBorder: {
|
|
162
|
+
color: true,
|
|
163
|
+
radius: true,
|
|
164
|
+
style: true,
|
|
165
|
+
width: true,
|
|
166
|
+
__experimentalDefaultControls: {
|
|
167
|
+
color: true,
|
|
168
|
+
radius: true,
|
|
169
|
+
style: true,
|
|
170
|
+
width: true,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
typography: {
|
|
174
|
+
__experimentalSkipSerialization: [
|
|
175
|
+
'textDecoration',
|
|
176
|
+
'letterSpacing',
|
|
177
|
+
],
|
|
178
|
+
fontSize: true,
|
|
179
|
+
__experimentalFontFamily: true,
|
|
180
|
+
__experimentalFontWeight: true,
|
|
181
|
+
__experimentalFontStyle: true,
|
|
182
|
+
__experimentalTextTransform: true,
|
|
183
|
+
__experimentalTextDecoration: true,
|
|
184
|
+
__experimentalLetterSpacing: true,
|
|
185
|
+
__experimentalDefaultControls: {
|
|
186
|
+
fontSize: true,
|
|
187
|
+
fontFamily: true,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
shadow: true,
|
|
191
|
+
visibility: false,
|
|
192
|
+
lock: false,
|
|
193
|
+
},
|
|
194
|
+
save( { attributes } ) {
|
|
195
|
+
const { level, title, iconPosition, showIcon } = attributes;
|
|
196
|
+
const TagName = 'h' + ( level || 3 );
|
|
197
|
+
const typographyProps = getTypographyClassesAndStyles( attributes );
|
|
198
|
+
|
|
199
|
+
const blockProps = useBlockProps.save();
|
|
200
|
+
const spacingProps = getSpacingClassesAndStyles( attributes );
|
|
201
|
+
|
|
202
|
+
return (
|
|
203
|
+
<TagName { ...blockProps }>
|
|
204
|
+
<button
|
|
205
|
+
className="wp-block-accordion-heading__toggle"
|
|
206
|
+
style={ spacingProps.style }
|
|
207
|
+
>
|
|
208
|
+
{ showIcon && iconPosition === 'left' && (
|
|
209
|
+
<span
|
|
210
|
+
className="wp-block-accordion-heading__toggle-icon"
|
|
211
|
+
aria-hidden="true"
|
|
212
|
+
>
|
|
213
|
+
+
|
|
214
|
+
</span>
|
|
215
|
+
) }
|
|
216
|
+
<RichText.Content
|
|
217
|
+
className="wp-block-accordion-heading__toggle-title"
|
|
218
|
+
tagName="span"
|
|
219
|
+
value={ title }
|
|
220
|
+
style={ {
|
|
221
|
+
letterSpacing: typographyProps.style.letterSpacing,
|
|
222
|
+
textDecoration:
|
|
223
|
+
typographyProps.style.textDecoration,
|
|
224
|
+
} }
|
|
225
|
+
/>
|
|
226
|
+
{ showIcon && iconPosition === 'right' && (
|
|
227
|
+
<span
|
|
228
|
+
className="wp-block-accordion-heading__toggle-icon"
|
|
229
|
+
aria-hidden="true"
|
|
230
|
+
>
|
|
231
|
+
+
|
|
232
|
+
</span>
|
|
233
|
+
) }
|
|
234
|
+
</button>
|
|
235
|
+
</TagName>
|
|
236
|
+
);
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export default [ v1, v2 ];
|
|
@@ -9,7 +9,9 @@ import {
|
|
|
9
9
|
RichText,
|
|
10
10
|
getTypographyClassesAndStyles as useTypographyProps,
|
|
11
11
|
useSettings,
|
|
12
|
+
store as blockEditorStore,
|
|
12
13
|
} from '@wordpress/block-editor';
|
|
14
|
+
import { useDispatch } from '@wordpress/data';
|
|
13
15
|
|
|
14
16
|
export default function Edit( { attributes, setAttributes, context } ) {
|
|
15
17
|
const { title } = attributes;
|
|
@@ -19,16 +21,24 @@ export default function Edit( { attributes, setAttributes, context } ) {
|
|
|
19
21
|
'core/accordion-heading-level': headingLevel,
|
|
20
22
|
} = context;
|
|
21
23
|
const TagName = 'h' + headingLevel;
|
|
24
|
+
const { __unstableMarkNextChangeAsNotPersistent } =
|
|
25
|
+
useDispatch( blockEditorStore );
|
|
22
26
|
|
|
23
27
|
// Set icon attributes.
|
|
24
28
|
useEffect( () => {
|
|
25
29
|
if ( iconPosition !== undefined && showIcon !== undefined ) {
|
|
30
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
26
31
|
setAttributes( {
|
|
27
32
|
iconPosition,
|
|
28
33
|
showIcon,
|
|
29
34
|
} );
|
|
30
35
|
}
|
|
31
|
-
}, [
|
|
36
|
+
}, [
|
|
37
|
+
iconPosition,
|
|
38
|
+
showIcon,
|
|
39
|
+
setAttributes,
|
|
40
|
+
__unstableMarkNextChangeAsNotPersistent,
|
|
41
|
+
] );
|
|
32
42
|
|
|
33
43
|
const [ fluidTypographySettings, layout ] = useSettings(
|
|
34
44
|
'typography.fluid',
|
|
@@ -25,12 +25,9 @@ import clsx from 'clsx';
|
|
|
25
25
|
*/
|
|
26
26
|
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
setAttributes,
|
|
32
|
-
context,
|
|
33
|
-
} ) {
|
|
28
|
+
const TEMPLATE = [ [ 'core/accordion-heading' ], [ 'core/accordion-panel' ] ];
|
|
29
|
+
|
|
30
|
+
export default function Edit( { attributes, clientId, setAttributes } ) {
|
|
34
31
|
const { openByDefault } = attributes;
|
|
35
32
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
36
33
|
|
|
@@ -75,21 +72,8 @@ export default function Edit( {
|
|
|
75
72
|
} ),
|
|
76
73
|
} );
|
|
77
74
|
|
|
78
|
-
// Get heading level from context.
|
|
79
|
-
const headingLevel = context && context[ 'core/accordion-heading-level' ];
|
|
80
75
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
81
|
-
template:
|
|
82
|
-
[
|
|
83
|
-
'core/accordion-heading',
|
|
84
|
-
headingLevel ? { level: headingLevel } : {},
|
|
85
|
-
],
|
|
86
|
-
[
|
|
87
|
-
'core/accordion-panel',
|
|
88
|
-
{
|
|
89
|
-
openByDefault,
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
],
|
|
76
|
+
template: TEMPLATE,
|
|
93
77
|
templateLock: 'all',
|
|
94
78
|
directInsert: true,
|
|
95
79
|
templateInsertUpdatesSelection: true,
|
|
@@ -102,11 +86,6 @@ export default function Edit( {
|
|
|
102
86
|
label={ __( 'Settings' ) }
|
|
103
87
|
resetAll={ () => {
|
|
104
88
|
setAttributes( { openByDefault: false } );
|
|
105
|
-
if ( contentBlockClientId ) {
|
|
106
|
-
updateBlockAttributes( contentBlockClientId, {
|
|
107
|
-
openByDefault: false,
|
|
108
|
-
} );
|
|
109
|
-
}
|
|
110
89
|
} }
|
|
111
90
|
dropdownMenuProps={ dropdownMenuProps }
|
|
112
91
|
>
|
|
@@ -116,11 +95,6 @@ export default function Edit( {
|
|
|
116
95
|
hasValue={ () => !! openByDefault }
|
|
117
96
|
onDeselect={ () => {
|
|
118
97
|
setAttributes( { openByDefault: false } );
|
|
119
|
-
if ( contentBlockClientId ) {
|
|
120
|
-
updateBlockAttributes( contentBlockClientId, {
|
|
121
|
-
openByDefault: false,
|
|
122
|
-
} );
|
|
123
|
-
}
|
|
124
98
|
} }
|
|
125
99
|
>
|
|
126
100
|
<ToggleControl
|
|
@@ -129,14 +103,6 @@ export default function Edit( {
|
|
|
129
103
|
setAttributes( {
|
|
130
104
|
openByDefault: value,
|
|
131
105
|
} );
|
|
132
|
-
if ( contentBlockClientId ) {
|
|
133
|
-
updateBlockAttributes(
|
|
134
|
-
contentBlockClientId,
|
|
135
|
-
{
|
|
136
|
-
openByDefault: value,
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
106
|
} }
|
|
141
107
|
checked={ openByDefault }
|
|
142
108
|
help={ __(
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"category": "design",
|
|
7
7
|
"description": "Contains the hidden or revealed content beneath the heading.",
|
|
8
8
|
"parent": [ "core/accordion-item" ],
|
|
9
|
+
"usesContext": [ "core/accordion-open-by-default" ],
|
|
9
10
|
"supports": {
|
|
10
11
|
"html": false,
|
|
11
12
|
"color": {
|
|
@@ -61,10 +62,6 @@
|
|
|
61
62
|
"enum": [ "all", "insert", "contentOnly", false ],
|
|
62
63
|
"default": false
|
|
63
64
|
},
|
|
64
|
-
"openByDefault": {
|
|
65
|
-
"type": "boolean",
|
|
66
|
-
"default": false
|
|
67
|
-
},
|
|
68
65
|
"isSelected": {
|
|
69
66
|
"type": "boolean",
|
|
70
67
|
"default": false
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
|
|
5
5
|
|
|
6
|
-
export default function Edit( { attributes } ) {
|
|
7
|
-
const { allowedBlocks, templateLock,
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export default function Edit( { attributes, context } ) {
|
|
7
|
+
const { allowedBlocks, templateLock, isSelected } = attributes;
|
|
8
|
+
const openByDefault = context[ 'core/accordion-open-by-default' ];
|
|
10
9
|
const blockProps = useBlockProps( {
|
|
11
10
|
'aria-hidden': ! isSelected && ! openByDefault,
|
|
12
11
|
role: 'region',
|