@wordpress/block-library 7.8.0 → 7.9.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/audio/edit.js +1 -0
- package/build/audio/edit.js.map +1 -1
- package/build/audio/save.js +2 -1
- package/build/audio/save.js.map +1 -1
- package/build/avatar/hooks.js +2 -2
- package/build/avatar/hooks.js.map +1 -1
- package/build/button/edit.js +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/button/index.js +1 -24
- package/build/button/index.js.map +1 -1
- package/build/button/save.js +1 -1
- package/build/button/save.js.map +1 -1
- package/build/columns/variations.js +2 -2
- package/build/columns/variations.js.map +1 -1
- package/build/comment-author-name/edit.js +3 -5
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-author-name/index.js +0 -4
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-date/edit.js +4 -4
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-date/index.js +0 -4
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +0 -4
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +0 -4
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comments/edit.js +10 -2
- package/build/comments/edit.js.map +1 -1
- package/build/comments-title/deprecated.js +0 -3
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/cover/index.js +1 -0
- package/build/cover/index.js.map +1 -1
- package/build/embed/embed-preview.js +1 -0
- package/build/embed/embed-preview.js.map +1 -1
- package/build/embed/icons.js +21 -1
- package/build/embed/icons.js.map +1 -1
- package/build/embed/save.js +1 -0
- package/build/embed/save.js.map +1 -1
- package/build/embed/variations.js +11 -0
- package/build/embed/variations.js.map +1 -1
- package/build/file/edit.js +1 -1
- package/build/file/edit.js.map +1 -1
- package/build/file/save.js +1 -1
- package/build/file/save.js.map +1 -1
- package/build/gallery/gallery.js +1 -1
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/save.js +1 -1
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/transforms.js +2 -2
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/v1/edit.js +3 -3
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/gallery/v1/gallery-image.js +1 -0
- package/build/gallery/v1/gallery-image.js.map +1 -1
- package/build/gallery/v1/gallery.js +1 -1
- package/build/gallery/v1/gallery.js.map +1 -1
- package/build/gallery/v1/save.js +10 -2
- package/build/gallery/v1/save.js.map +1 -1
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/html/edit.js +11 -20
- package/build/html/edit.js.map +1 -1
- package/build/html/preview.js +48 -0
- package/build/html/preview.js.map +1 -0
- package/build/image/edit.native.js +2 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +1 -0
- package/build/image/image.js.map +1 -1
- package/build/image/save.js +1 -0
- package/build/image/save.js.map +1 -1
- package/build/list/v2/transforms.js +33 -17
- package/build/list/v2/transforms.js.map +1 -1
- package/build/list-item/hooks/use-enter.js +7 -4
- package/build/list-item/hooks/use-enter.js.map +1 -1
- package/build/list-item/hooks/use-outdent-list-item.js +36 -15
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/navigation/edit/index.js +1 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/index.js +9 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +16 -74
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation/view.js +5 -3
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-submenu/view.js +5 -3
- package/build/navigation-submenu/view.js.map +1 -1
- package/build/post-comments-form/edit.js +12 -2
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +1 -1
- package/build/post-comments-form/form.js.map +1 -1
- package/build/search/edit.js +1 -1
- package/build/search/edit.js.map +1 -1
- package/build/table/edit.js +1 -0
- package/build/table/edit.js.map +1 -1
- package/build/table/save.js +2 -1
- package/build/table/save.js.map +1 -1
- package/build/video/edit.js +1 -0
- package/build/video/edit.js.map +1 -1
- package/build/video/save.js +1 -0
- package/build/video/save.js.map +1 -1
- package/build-module/audio/edit.js +2 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/save.js +3 -2
- package/build-module/audio/save.js.map +1 -1
- package/build-module/avatar/hooks.js +2 -2
- package/build-module/avatar/hooks.js.map +1 -1
- package/build-module/button/edit.js +2 -2
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/index.js +1 -24
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/save.js +2 -2
- package/build-module/button/save.js.map +1 -1
- package/build-module/columns/variations.js +2 -2
- package/build-module/columns/variations.js.map +1 -1
- package/build-module/comment-author-name/edit.js +3 -5
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-author-name/index.js +0 -4
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-date/edit.js +4 -4
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-date/index.js +0 -4
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +0 -4
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +0 -4
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comments/edit.js +10 -2
- package/build-module/comments/edit.js.map +1 -1
- package/build-module/comments-title/deprecated.js +0 -3
- package/build-module/comments-title/deprecated.js.map +1 -1
- package/build-module/cover/index.js +1 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/embed/embed-preview.js +2 -1
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/embed/icons.js +19 -0
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/embed/save.js +2 -1
- package/build-module/embed/save.js.map +1 -1
- package/build-module/embed/variations.js +12 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/file/edit.js +2 -2
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/save.js +2 -2
- package/build-module/file/save.js.map +1 -1
- package/build-module/gallery/gallery.js +2 -2
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/save.js +2 -2
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/transforms.js +3 -3
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/v1/edit.js +4 -4
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/gallery/v1/gallery-image.js +2 -1
- package/build-module/gallery/v1/gallery-image.js.map +1 -1
- package/build-module/gallery/v1/gallery.js +2 -2
- package/build-module/gallery/v1/gallery.js.map +1 -1
- package/build-module/gallery/v1/save.js +8 -3
- package/build-module/gallery/v1/save.js.map +1 -1
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/html/edit.js +12 -23
- package/build-module/html/edit.js.map +1 -1
- package/build-module/html/preview.js +38 -0
- package/build-module/html/preview.js.map +1 -0
- package/build-module/image/edit.native.js +2 -1
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +2 -1
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/save.js +2 -1
- package/build-module/image/save.js.map +1 -1
- package/build-module/list/v2/transforms.js +32 -17
- package/build-module/list/v2/transforms.js.map +1 -1
- package/build-module/list-item/hooks/use-enter.js +7 -4
- package/build-module/list-item/hooks/use-enter.js.map +1 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js +34 -15
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/navigation/edit/index.js +1 -1
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/index.js +9 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +17 -75
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation/view.js +5 -3
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-submenu/view.js +5 -3
- package/build-module/navigation-submenu/view.js.map +1 -1
- package/build-module/post-comments-form/edit.js +12 -3
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +2 -2
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/search/edit.js +2 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/table/edit.js +2 -1
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/save.js +3 -2
- package/build-module/table/save.js.map +1 -1
- package/build-module/video/edit.js +2 -1
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/save.js +2 -1
- package/build-module/video/save.js.map +1 -1
- package/build-style/button/style-rtl.css +5 -0
- package/build-style/button/style.css +5 -0
- package/build-style/editor-rtl.css +3 -0
- package/build-style/editor.css +3 -0
- package/build-style/file/style-rtl.css +5 -8
- package/build-style/file/style.css +5 -8
- package/build-style/navigation/style-rtl.css +9 -1
- package/build-style/navigation/style.css +9 -1
- package/build-style/post-comments/style-rtl.css +2 -1
- package/build-style/post-comments/style.css +2 -1
- package/build-style/post-comments-form/editor-rtl.css +3 -0
- package/build-style/post-comments-form/editor.css +3 -0
- package/build-style/post-template/style-rtl.css +9 -18
- package/build-style/post-template/style.css +9 -18
- package/build-style/search/style-rtl.css +6 -8
- package/build-style/search/style.css +6 -8
- package/build-style/style-rtl.css +36 -36
- package/build-style/style.css +36 -36
- package/package.json +28 -28
- package/src/audio/edit.js +4 -0
- package/src/audio/save.js +12 -2
- package/src/avatar/hooks.js +6 -9
- package/src/button/block.json +1 -24
- package/src/button/edit.js +2 -2
- package/src/button/save.js +2 -2
- package/src/button/style.scss +10 -0
- package/src/columns/variations.js +2 -2
- package/src/comment-author-name/block.json +0 -4
- package/src/comment-author-name/edit.js +3 -12
- package/src/comment-date/block.json +0 -4
- package/src/comment-date/edit.js +10 -14
- package/src/comment-date/index.php +0 -3
- package/src/comment-edit-link/block.json +0 -4
- package/src/comment-reply-link/block.json +0 -4
- package/src/comments/edit.js +24 -4
- package/src/comments-title/deprecated.js +0 -2
- package/src/cover/block.json +1 -0
- package/src/cover/index.php +21 -8
- package/src/embed/embed-preview.js +8 -1
- package/src/embed/icons.js +25 -0
- package/src/embed/save.js +10 -2
- package/src/embed/test/__snapshots__/index.native.js.snap +1 -1
- package/src/embed/variations.js +10 -0
- package/src/file/edit.js +4 -2
- package/src/file/save.js +2 -2
- package/src/file/style.scss +5 -5
- package/src/freeform/editor.scss +0 -2
- package/src/gallery/gallery.js +9 -2
- package/src/gallery/index.php +4 -0
- package/src/gallery/save.js +5 -1
- package/src/gallery/test/__snapshots__/index.native.js.snap +2 -2
- package/src/gallery/test/helpers.native.js +11 -198
- package/src/gallery/test/index.native.js +19 -29
- package/src/gallery/transforms.js +3 -3
- package/src/gallery/v1/edit.js +3 -4
- package/src/gallery/v1/gallery-image.js +4 -0
- package/src/gallery/v1/gallery.js +8 -2
- package/src/gallery/v1/save.js +20 -3
- package/src/group/block.json +1 -0
- package/src/html/edit.js +10 -40
- package/src/html/preview.js +46 -0
- package/src/image/edit.native.js +1 -0
- package/src/image/image.js +2 -0
- package/src/image/save.js +10 -2
- package/src/image/test/edit.native.js +51 -19
- package/src/list/v2/transforms.js +22 -7
- package/src/list-item/hooks/use-enter.js +9 -6
- package/src/list-item/hooks/use-outdent-list-item.js +48 -21
- package/src/navigation/block.json +9 -0
- package/src/navigation/edit/index.js +1 -0
- package/src/navigation/style.scss +10 -1
- package/src/navigation/test/use-navigation-menu.js +16 -11
- package/src/navigation/use-navigation-menu.js +26 -83
- package/src/navigation/view.js +7 -2
- package/src/navigation-submenu/view.js +7 -2
- package/src/post-comments/index.php +1 -1
- package/src/post-comments/style.scss +7 -3
- package/src/post-comments-form/edit.js +20 -3
- package/src/post-comments-form/editor.scss +4 -0
- package/src/post-comments-form/form.js +2 -2
- package/src/post-comments-form/index.php +1 -1
- package/src/post-featured-image/index.php +4 -2
- package/src/post-template/index.php +15 -3
- package/src/post-template/style.scss +1 -7
- package/src/search/edit.js +2 -2
- package/src/search/index.php +12 -10
- package/src/search/style.scss +9 -8
- package/src/table/edit.js +2 -0
- package/src/table/save.js +6 -1
- package/src/video/edit.js +4 -0
- package/src/video/save.js +10 -2
package/build-style/style.css
CHANGED
|
@@ -112,6 +112,11 @@
|
|
|
112
112
|
text-align: right;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
:where(.wp-block-button__link) {
|
|
116
|
+
border-radius: 9999px;
|
|
117
|
+
padding: calc(0.667em + 2px) calc(1.333em + 2px);
|
|
118
|
+
}
|
|
119
|
+
|
|
115
120
|
.wp-block-buttons > .wp-block-button.has-custom-width {
|
|
116
121
|
max-width: none;
|
|
117
122
|
}
|
|
@@ -872,6 +877,9 @@ section.wp-block-cover-image > h2,
|
|
|
872
877
|
.wp-block-file {
|
|
873
878
|
margin-bottom: 1.5em;
|
|
874
879
|
}
|
|
880
|
+
.wp-block-file:not(.wp-element-button) {
|
|
881
|
+
font-size: 0.8em;
|
|
882
|
+
}
|
|
875
883
|
.wp-block-file.aligncenter {
|
|
876
884
|
text-align: center;
|
|
877
885
|
}
|
|
@@ -887,17 +895,11 @@ section.wp-block-cover-image > h2,
|
|
|
887
895
|
margin-bottom: 1em;
|
|
888
896
|
}
|
|
889
897
|
|
|
890
|
-
.wp-block-file__button {
|
|
891
|
-
background: #32373c;
|
|
898
|
+
:where(.wp-block-file__button) {
|
|
892
899
|
border-radius: 2em;
|
|
893
|
-
color: #fff;
|
|
894
|
-
font-size: 0.8em;
|
|
895
900
|
padding: 0.5em 1em;
|
|
896
901
|
}
|
|
897
|
-
.wp-block-file__button:is(a) {
|
|
898
|
-
text-decoration: none;
|
|
899
|
-
}
|
|
900
|
-
.wp-block-file__button:is(a):hover, .wp-block-file__button:is(a):visited, .wp-block-file__button:is(a):focus, .wp-block-file__button:is(a):active {
|
|
902
|
+
:where(.wp-block-file__button):is(a):hover, :where(.wp-block-file__button):is(a):visited, :where(.wp-block-file__button):is(a):focus, :where(.wp-block-file__button):is(a):active {
|
|
901
903
|
box-shadow: none;
|
|
902
904
|
color: #fff;
|
|
903
905
|
opacity: 0.85;
|
|
@@ -1602,7 +1604,6 @@ ul.has-background {
|
|
|
1602
1604
|
display: none;
|
|
1603
1605
|
}
|
|
1604
1606
|
.wp-block-navigation .wp-block-navigation-item__content {
|
|
1605
|
-
color: inherit;
|
|
1606
1607
|
display: block;
|
|
1607
1608
|
padding: 0;
|
|
1608
1609
|
}
|
|
@@ -2035,6 +2036,15 @@ button.wp-block-navigation-item__content {
|
|
|
2035
2036
|
position: relative;
|
|
2036
2037
|
}
|
|
2037
2038
|
|
|
2039
|
+
.has-modal-open .admin-bar .wp-block-navigation__responsive-dialog {
|
|
2040
|
+
margin-top: 46px;
|
|
2041
|
+
}
|
|
2042
|
+
@media (min-width: 782px) {
|
|
2043
|
+
.has-modal-open .admin-bar .wp-block-navigation__responsive-dialog {
|
|
2044
|
+
margin-top: 32px;
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2038
2048
|
html.has-modal-open {
|
|
2039
2049
|
overflow: hidden;
|
|
2040
2050
|
}
|
|
@@ -2228,7 +2238,8 @@ p.has-background {
|
|
|
2228
2238
|
.wp-block-post-comments input:not([type=submit]):not([type=checkbox]) {
|
|
2229
2239
|
padding: calc(0.667em + 2px);
|
|
2230
2240
|
}
|
|
2231
|
-
|
|
2241
|
+
|
|
2242
|
+
:where(.wp-block-post-comments input[type="submit"]) {
|
|
2232
2243
|
border: none;
|
|
2233
2244
|
}
|
|
2234
2245
|
|
|
@@ -2395,49 +2406,40 @@ p.has-background {
|
|
|
2395
2406
|
color: inherit;
|
|
2396
2407
|
}
|
|
2397
2408
|
|
|
2398
|
-
.wp-block-post-template
|
|
2399
|
-
.wp-block-query-loop {
|
|
2409
|
+
.wp-block-post-template {
|
|
2400
2410
|
margin-top: 0;
|
|
2401
2411
|
margin-bottom: 0;
|
|
2402
2412
|
max-width: 100%;
|
|
2403
2413
|
list-style: none;
|
|
2404
2414
|
padding: 0;
|
|
2405
2415
|
}
|
|
2406
|
-
.wp-block-post-template.wp-block-post-template
|
|
2407
|
-
.wp-block-query-loop.wp-block-post-template {
|
|
2416
|
+
.wp-block-post-template.wp-block-post-template {
|
|
2408
2417
|
background: none;
|
|
2409
2418
|
}
|
|
2410
|
-
.wp-block-post-template.is-flex-container
|
|
2411
|
-
.wp-block-query-loop.is-flex-container {
|
|
2419
|
+
.wp-block-post-template.is-flex-container {
|
|
2412
2420
|
flex-direction: row;
|
|
2413
2421
|
display: flex;
|
|
2414
2422
|
flex-wrap: wrap;
|
|
2415
2423
|
gap: 1.25em;
|
|
2416
2424
|
}
|
|
2417
|
-
.wp-block-post-template.is-flex-container li
|
|
2418
|
-
.wp-block-query-loop.is-flex-container li {
|
|
2425
|
+
.wp-block-post-template.is-flex-container li {
|
|
2419
2426
|
margin: 0;
|
|
2420
2427
|
width: 100%;
|
|
2421
2428
|
}
|
|
2422
2429
|
@media (min-width: 600px) {
|
|
2423
|
-
.wp-block-post-template.is-flex-container.is-flex-container.columns-2 > li
|
|
2424
|
-
.wp-block-query-loop.is-flex-container.is-flex-container.columns-2 > li {
|
|
2430
|
+
.wp-block-post-template.is-flex-container.is-flex-container.columns-2 > li {
|
|
2425
2431
|
width: calc((100% / 2) - 1.25em + (1.25em / 2));
|
|
2426
2432
|
}
|
|
2427
|
-
.wp-block-post-template.is-flex-container.is-flex-container.columns-3 > li
|
|
2428
|
-
.wp-block-query-loop.is-flex-container.is-flex-container.columns-3 > li {
|
|
2433
|
+
.wp-block-post-template.is-flex-container.is-flex-container.columns-3 > li {
|
|
2429
2434
|
width: calc((100% / 3) - 1.25em + (1.25em / 3));
|
|
2430
2435
|
}
|
|
2431
|
-
.wp-block-post-template.is-flex-container.is-flex-container.columns-4 > li
|
|
2432
|
-
.wp-block-query-loop.is-flex-container.is-flex-container.columns-4 > li {
|
|
2436
|
+
.wp-block-post-template.is-flex-container.is-flex-container.columns-4 > li {
|
|
2433
2437
|
width: calc((100% / 4) - 1.25em + (1.25em / 4));
|
|
2434
2438
|
}
|
|
2435
|
-
.wp-block-post-template.is-flex-container.is-flex-container.columns-5 > li
|
|
2436
|
-
.wp-block-query-loop.is-flex-container.is-flex-container.columns-5 > li {
|
|
2439
|
+
.wp-block-post-template.is-flex-container.is-flex-container.columns-5 > li {
|
|
2437
2440
|
width: calc((100% / 5) - 1.25em + (1.25em / 5));
|
|
2438
2441
|
}
|
|
2439
|
-
.wp-block-post-template.is-flex-container.is-flex-container.columns-6 > li
|
|
2440
|
-
.wp-block-query-loop.is-flex-container.is-flex-container.columns-6 > li {
|
|
2442
|
+
.wp-block-post-template.is-flex-container.is-flex-container.columns-6 > li {
|
|
2441
2443
|
width: calc((100% / 6) - 1.25em + (1.25em / 6));
|
|
2442
2444
|
}
|
|
2443
2445
|
}
|
|
@@ -2555,15 +2557,8 @@ ul.wp-block-rss.is-grid li {
|
|
|
2555
2557
|
}
|
|
2556
2558
|
|
|
2557
2559
|
.wp-block-search__button {
|
|
2558
|
-
background: #f7f7f7;
|
|
2559
|
-
border: 1px solid #ccc;
|
|
2560
|
-
padding: 0.375em 0.625em;
|
|
2561
|
-
color: #32373c;
|
|
2562
2560
|
margin-left: 0.625em;
|
|
2563
2561
|
word-break: normal;
|
|
2564
|
-
font-size: inherit;
|
|
2565
|
-
font-family: inherit;
|
|
2566
|
-
line-height: inherit;
|
|
2567
2562
|
}
|
|
2568
2563
|
.wp-block-search__button.has-icon {
|
|
2569
2564
|
line-height: 0;
|
|
@@ -2574,6 +2569,11 @@ ul.wp-block-rss.is-grid li {
|
|
|
2574
2569
|
fill: currentColor;
|
|
2575
2570
|
}
|
|
2576
2571
|
|
|
2572
|
+
:where(.wp-block-search__button) {
|
|
2573
|
+
border: 1px solid #ccc;
|
|
2574
|
+
padding: 0.375em 0.625em;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
2577
|
.wp-block-search__inside-wrapper {
|
|
2578
2578
|
display: flex;
|
|
2579
2579
|
flex: auto;
|
|
@@ -2611,7 +2611,7 @@ ul.wp-block-rss.is-grid li {
|
|
|
2611
2611
|
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus {
|
|
2612
2612
|
outline: none;
|
|
2613
2613
|
}
|
|
2614
|
-
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__button {
|
|
2614
|
+
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button) {
|
|
2615
2615
|
padding: 0.125em 0.5em;
|
|
2616
2616
|
}
|
|
2617
2617
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -34,32 +34,32 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/runtime": "^7.16.0",
|
|
37
|
-
"@wordpress/a11y": "^3.
|
|
38
|
-
"@wordpress/api-fetch": "^6.
|
|
39
|
-
"@wordpress/autop": "^3.
|
|
40
|
-
"@wordpress/blob": "^3.
|
|
41
|
-
"@wordpress/block-editor": "^9.
|
|
42
|
-
"@wordpress/blocks": "^11.
|
|
43
|
-
"@wordpress/components": "^19.
|
|
44
|
-
"@wordpress/compose": "^5.
|
|
45
|
-
"@wordpress/core-data": "^4.
|
|
46
|
-
"@wordpress/data": "^6.
|
|
47
|
-
"@wordpress/date": "^4.
|
|
48
|
-
"@wordpress/deprecated": "^3.
|
|
49
|
-
"@wordpress/dom": "^3.
|
|
50
|
-
"@wordpress/element": "^4.
|
|
51
|
-
"@wordpress/hooks": "^3.
|
|
52
|
-
"@wordpress/html-entities": "^3.
|
|
53
|
-
"@wordpress/i18n": "^4.
|
|
54
|
-
"@wordpress/icons": "^9.
|
|
55
|
-
"@wordpress/keycodes": "^3.
|
|
56
|
-
"@wordpress/notices": "^3.
|
|
57
|
-
"@wordpress/primitives": "^3.
|
|
58
|
-
"@wordpress/reusable-blocks": "^3.
|
|
59
|
-
"@wordpress/rich-text": "^5.
|
|
60
|
-
"@wordpress/server-side-render": "^3.
|
|
61
|
-
"@wordpress/url": "^3.
|
|
62
|
-
"@wordpress/viewport": "^4.
|
|
37
|
+
"@wordpress/a11y": "^3.12.0",
|
|
38
|
+
"@wordpress/api-fetch": "^6.9.0",
|
|
39
|
+
"@wordpress/autop": "^3.12.0",
|
|
40
|
+
"@wordpress/blob": "^3.12.0",
|
|
41
|
+
"@wordpress/block-editor": "^9.4.0",
|
|
42
|
+
"@wordpress/blocks": "^11.11.0",
|
|
43
|
+
"@wordpress/components": "^19.14.0",
|
|
44
|
+
"@wordpress/compose": "^5.10.0",
|
|
45
|
+
"@wordpress/core-data": "^4.10.0",
|
|
46
|
+
"@wordpress/data": "^6.12.0",
|
|
47
|
+
"@wordpress/date": "^4.12.0",
|
|
48
|
+
"@wordpress/deprecated": "^3.12.0",
|
|
49
|
+
"@wordpress/dom": "^3.12.0",
|
|
50
|
+
"@wordpress/element": "^4.10.0",
|
|
51
|
+
"@wordpress/hooks": "^3.12.0",
|
|
52
|
+
"@wordpress/html-entities": "^3.12.0",
|
|
53
|
+
"@wordpress/i18n": "^4.12.0",
|
|
54
|
+
"@wordpress/icons": "^9.3.0",
|
|
55
|
+
"@wordpress/keycodes": "^3.12.0",
|
|
56
|
+
"@wordpress/notices": "^3.12.0",
|
|
57
|
+
"@wordpress/primitives": "^3.10.0",
|
|
58
|
+
"@wordpress/reusable-blocks": "^3.10.0",
|
|
59
|
+
"@wordpress/rich-text": "^5.10.0",
|
|
60
|
+
"@wordpress/server-side-render": "^3.10.0",
|
|
61
|
+
"@wordpress/url": "^3.13.0",
|
|
62
|
+
"@wordpress/viewport": "^4.10.0",
|
|
63
63
|
"classnames": "^2.3.1",
|
|
64
64
|
"colord": "^2.7.0",
|
|
65
65
|
"fast-average-color": "4.3.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "a80eeb62ec7cb1418b9915c277e084a29d6665e3"
|
|
80
80
|
}
|
package/src/audio/edit.js
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
RichText,
|
|
25
25
|
useBlockProps,
|
|
26
26
|
store as blockEditorStore,
|
|
27
|
+
__experimentalGetElementClassName,
|
|
27
28
|
} from '@wordpress/block-editor';
|
|
28
29
|
import { useEffect } from '@wordpress/element';
|
|
29
30
|
import { __, _x } from '@wordpress/i18n';
|
|
@@ -200,6 +201,9 @@ function AudioEdit( {
|
|
|
200
201
|
{ ( ! RichText.isEmpty( caption ) || isSelected ) && (
|
|
201
202
|
<RichText
|
|
202
203
|
tagName="figcaption"
|
|
204
|
+
className={ __experimentalGetElementClassName(
|
|
205
|
+
'caption'
|
|
206
|
+
) }
|
|
203
207
|
aria-label={ __( 'Audio caption text' ) }
|
|
204
208
|
placeholder={ __( 'Add caption' ) }
|
|
205
209
|
value={ caption }
|
package/src/audio/save.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
RichText,
|
|
6
|
+
useBlockProps,
|
|
7
|
+
__experimentalGetElementClassName,
|
|
8
|
+
} from '@wordpress/block-editor';
|
|
5
9
|
|
|
6
10
|
export default function save( { attributes } ) {
|
|
7
11
|
const { autoplay, caption, loop, preload, src } = attributes;
|
|
@@ -17,7 +21,13 @@ export default function save( { attributes } ) {
|
|
|
17
21
|
preload={ preload }
|
|
18
22
|
/>
|
|
19
23
|
{ ! RichText.isEmpty( caption ) && (
|
|
20
|
-
<RichText.Content
|
|
24
|
+
<RichText.Content
|
|
25
|
+
tagName="figcaption"
|
|
26
|
+
value={ caption }
|
|
27
|
+
className={ __experimentalGetElementClassName(
|
|
28
|
+
'caption'
|
|
29
|
+
) }
|
|
30
|
+
/>
|
|
21
31
|
) }
|
|
22
32
|
</figure>
|
|
23
33
|
)
|
package/src/avatar/hooks.js
CHANGED
|
@@ -76,15 +76,12 @@ export function useUserAvatar( { userId, postId, postType } ) {
|
|
|
76
76
|
},
|
|
77
77
|
[ postType, postId, userId ]
|
|
78
78
|
);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
authorDetails && authorDetails?.avatar_urls
|
|
86
|
-
? Object.keys( authorDetails.avatar_urls )
|
|
87
|
-
: null;
|
|
79
|
+
const avatarUrls = authorDetails?.avatar_urls
|
|
80
|
+
? Object.values( authorDetails.avatar_urls )
|
|
81
|
+
: null;
|
|
82
|
+
const sizes = authorDetails?.avatar_urls
|
|
83
|
+
? Object.keys( authorDetails.avatar_urls )
|
|
84
|
+
: null;
|
|
88
85
|
const { minSize, maxSize } = getAvatarSizes( sizes );
|
|
89
86
|
const defaultAvatar = useDefaultAvatar();
|
|
90
87
|
return {
|
package/src/button/block.json
CHANGED
|
@@ -89,30 +89,7 @@
|
|
|
89
89
|
"radius": true
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
|
-
"__experimentalSelector": ".wp-block-button__link"
|
|
93
|
-
"__experimentalStyle": {
|
|
94
|
-
"border": {
|
|
95
|
-
"//": "100% causes an oval, but any explicit but really high value retains the pill shape.",
|
|
96
|
-
"radius": "9999px"
|
|
97
|
-
},
|
|
98
|
-
"color": {
|
|
99
|
-
"text": "#fff",
|
|
100
|
-
"background": "#32373c"
|
|
101
|
-
},
|
|
102
|
-
"typography": {
|
|
103
|
-
"fontSize": "1.125em",
|
|
104
|
-
"textDecoration": "none"
|
|
105
|
-
},
|
|
106
|
-
"spacing": {
|
|
107
|
-
"padding": {
|
|
108
|
-
"//": "The extra 2px are added to size solids the same as the outline versions.",
|
|
109
|
-
"top": "calc(0.667em + 2px)",
|
|
110
|
-
"right": "calc(1.333em + 2px)",
|
|
111
|
-
"bottom": "calc(0.667em + 2px)",
|
|
112
|
-
"left": "calc(1.333em + 2px)"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
92
|
+
"__experimentalSelector": ".wp-block-button__link"
|
|
116
93
|
},
|
|
117
94
|
"styles": [
|
|
118
95
|
{ "name": "fill", "label": "Fill", "isDefault": true },
|
package/src/button/edit.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
__experimentalUseColorProps as useColorProps,
|
|
26
26
|
__experimentalGetSpacingClassesAndStyles as useSpacingProps,
|
|
27
27
|
__experimentalLinkControl as LinkControl,
|
|
28
|
-
|
|
28
|
+
__experimentalGetElementClassName,
|
|
29
29
|
} from '@wordpress/block-editor';
|
|
30
30
|
import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
|
|
31
31
|
import { link, linkOff } from '@wordpress/icons';
|
|
@@ -172,7 +172,7 @@ function ButtonEdit( props ) {
|
|
|
172
172
|
// provided via block support.
|
|
173
173
|
'no-border-radius': style?.border?.radius === 0,
|
|
174
174
|
},
|
|
175
|
-
|
|
175
|
+
__experimentalGetElementClassName( 'button' )
|
|
176
176
|
) }
|
|
177
177
|
style={ {
|
|
178
178
|
...borderProps.style,
|
package/src/button/save.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
|
|
13
13
|
__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
|
|
14
14
|
__experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,
|
|
15
|
-
|
|
15
|
+
__experimentalGetElementClassName,
|
|
16
16
|
} from '@wordpress/block-editor';
|
|
17
17
|
|
|
18
18
|
export default function save( { attributes, className } ) {
|
|
@@ -35,7 +35,7 @@ export default function save( { attributes, className } ) {
|
|
|
35
35
|
// block support.
|
|
36
36
|
'no-border-radius': style?.border?.radius === 0,
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
__experimentalGetElementClassName( 'button' )
|
|
39
39
|
);
|
|
40
40
|
const buttonStyle = {
|
|
41
41
|
...borderProps.style,
|
package/src/button/style.scss
CHANGED
|
@@ -29,6 +29,16 @@ $blocks-block__margin: 0.5em;
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
// These rules are set to zero specificity to keep the default styles for buttons.
|
|
33
|
+
// They are needed for backwards compatibility.
|
|
34
|
+
:where(.wp-block-button__link) {
|
|
35
|
+
// 100% causes an oval, but any explicit but really high value retains the pill shape.
|
|
36
|
+
border-radius: 9999px;
|
|
37
|
+
|
|
38
|
+
// The extra 2px are added to size solids the same as the outline versions.
|
|
39
|
+
padding: calc(0.667em + 2px) calc(1.333em + 2px);
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
// Increased specificity needed to override margins.
|
|
33
43
|
.wp-block-buttons > .wp-block-button {
|
|
34
44
|
&.has-custom-width {
|
|
@@ -57,7 +57,7 @@ const variations = [
|
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
name: 'two-columns-one-third-two-thirds',
|
|
60
|
-
title: __( '
|
|
60
|
+
title: __( '33 / 66' ),
|
|
61
61
|
description: __( 'Two columns; one-third, two-thirds split' ),
|
|
62
62
|
icon: (
|
|
63
63
|
<SVG
|
|
@@ -81,7 +81,7 @@ const variations = [
|
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
name: 'two-columns-two-thirds-one-third',
|
|
84
|
-
title: __( '
|
|
84
|
+
title: __( '66 / 33' ),
|
|
85
85
|
description: __( 'Two columns; two-thirds, one-third split' ),
|
|
86
86
|
icon: (
|
|
87
87
|
<SVG
|
|
@@ -41,7 +41,7 @@ export default function Edit( {
|
|
|
41
41
|
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
42
42
|
} ),
|
|
43
43
|
} );
|
|
44
|
-
|
|
44
|
+
let displayName = useSelect(
|
|
45
45
|
( select ) => {
|
|
46
46
|
const { getEntityRecord } = select( coreStore );
|
|
47
47
|
|
|
@@ -92,15 +92,7 @@ export default function Edit( {
|
|
|
92
92
|
);
|
|
93
93
|
|
|
94
94
|
if ( ! commentId || ! displayName ) {
|
|
95
|
-
|
|
96
|
-
<>
|
|
97
|
-
{ inspectorControls }
|
|
98
|
-
{ blockControls }
|
|
99
|
-
<div { ...blockProps }>
|
|
100
|
-
{ _x( 'Comment Author', 'block title' ) }
|
|
101
|
-
</div>
|
|
102
|
-
</>
|
|
103
|
-
);
|
|
95
|
+
displayName = _x( 'Comment Author', 'block title' );
|
|
104
96
|
}
|
|
105
97
|
|
|
106
98
|
const displayAuthor = isLink ? (
|
|
@@ -111,9 +103,8 @@ export default function Edit( {
|
|
|
111
103
|
{ displayName }
|
|
112
104
|
</a>
|
|
113
105
|
) : (
|
|
114
|
-
|
|
106
|
+
displayName
|
|
115
107
|
);
|
|
116
|
-
|
|
117
108
|
return (
|
|
118
109
|
<>
|
|
119
110
|
{ inspectorControls }
|
package/src/comment-date/edit.js
CHANGED
|
@@ -33,7 +33,7 @@ export default function Edit( {
|
|
|
33
33
|
setAttributes,
|
|
34
34
|
} ) {
|
|
35
35
|
const blockProps = useBlockProps();
|
|
36
|
-
|
|
36
|
+
let [ date ] = useEntityProp( 'root', 'comment', 'date', commentId );
|
|
37
37
|
const [ siteFormat = getDateSettings().formats.date ] = useEntityProp(
|
|
38
38
|
'root',
|
|
39
39
|
'site',
|
|
@@ -60,21 +60,17 @@ export default function Edit( {
|
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
if ( ! commentId || ! date ) {
|
|
63
|
-
|
|
64
|
-
<>
|
|
65
|
-
{ inspectorControls }
|
|
66
|
-
<div { ...blockProps }>
|
|
67
|
-
<time>{ _x( 'Comment Date', 'block title' ) }</time>
|
|
68
|
-
</div>
|
|
69
|
-
</>
|
|
70
|
-
);
|
|
63
|
+
date = _x( 'Comment Date', 'block title' );
|
|
71
64
|
}
|
|
72
65
|
|
|
73
|
-
let commentDate =
|
|
74
|
-
|
|
75
|
-
{ dateI18n(
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
let commentDate =
|
|
67
|
+
date instanceof Date ? (
|
|
68
|
+
<time dateTime={ dateI18n( 'c', date ) }>
|
|
69
|
+
{ dateI18n( format || siteFormat, date ) }
|
|
70
|
+
</time>
|
|
71
|
+
) : (
|
|
72
|
+
<time>{ date }</time>
|
|
73
|
+
);
|
|
78
74
|
|
|
79
75
|
if ( isLink ) {
|
|
80
76
|
commentDate = (
|
|
@@ -24,9 +24,6 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
$classes = '';
|
|
27
|
-
if ( isset( $attributes['fontSize'] ) ) {
|
|
28
|
-
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
|
|
29
|
-
}
|
|
30
27
|
|
|
31
28
|
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
|
32
29
|
$formatted_date = get_comment_date(
|
package/src/comments/edit.js
CHANGED
|
@@ -37,7 +37,12 @@ const TEMPLATE = [
|
|
|
37
37
|
'core/column',
|
|
38
38
|
{},
|
|
39
39
|
[
|
|
40
|
-
[
|
|
40
|
+
[
|
|
41
|
+
'core/comment-author-name',
|
|
42
|
+
{
|
|
43
|
+
fontSize: 'small',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
41
46
|
[
|
|
42
47
|
'core/group',
|
|
43
48
|
{
|
|
@@ -52,12 +57,27 @@ const TEMPLATE = [
|
|
|
52
57
|
},
|
|
53
58
|
},
|
|
54
59
|
[
|
|
55
|
-
[
|
|
56
|
-
|
|
60
|
+
[
|
|
61
|
+
'core/comment-date',
|
|
62
|
+
{
|
|
63
|
+
fontSize: 'small',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
'core/comment-edit-link',
|
|
68
|
+
{
|
|
69
|
+
fontSize: 'small',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
57
72
|
],
|
|
58
73
|
],
|
|
59
74
|
[ 'core/comment-content' ],
|
|
60
|
-
[
|
|
75
|
+
[
|
|
76
|
+
'core/comment-reply-link',
|
|
77
|
+
{
|
|
78
|
+
fontSize: 'small',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
61
81
|
],
|
|
62
82
|
],
|
|
63
83
|
],
|
|
@@ -18,13 +18,11 @@ export default [
|
|
|
18
18
|
},
|
|
19
19
|
supports,
|
|
20
20
|
migrate: ( oldAttributes ) => {
|
|
21
|
-
/* eslint-disable no-unused-vars */
|
|
22
21
|
const {
|
|
23
22
|
singleCommentLabel,
|
|
24
23
|
multipleCommentsLabel,
|
|
25
24
|
...newAttributes
|
|
26
25
|
} = oldAttributes;
|
|
27
|
-
/* eslint-enable no-unused-vars */
|
|
28
26
|
return newAttributes;
|
|
29
27
|
},
|
|
30
28
|
isEligible: ( { multipleCommentsLabel, singleCommentLabel } ) =>
|
package/src/cover/block.json
CHANGED
package/src/cover/index.php
CHANGED
|
@@ -32,20 +32,33 @@ function render_block_core_cover( $attributes, $content ) {
|
|
|
32
32
|
|
|
33
33
|
$image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
/*
|
|
36
|
+
* Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
|
|
37
|
+
* and removes eventual withespace characters between the two (typically introduced at template level)
|
|
38
|
+
*/
|
|
39
|
+
$inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
|
|
40
|
+
if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
|
|
41
|
+
$offset = $matches[0][1];
|
|
42
|
+
$content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
|
|
43
|
+
}
|
|
41
44
|
} else {
|
|
42
45
|
if ( in_the_loop() ) {
|
|
43
46
|
update_post_thumbnail_cache();
|
|
44
47
|
}
|
|
45
48
|
$current_featured_image = get_the_post_thumbnail_url();
|
|
46
|
-
|
|
49
|
+
|
|
50
|
+
$styles = 'background-image:url(' . esc_url( $current_featured_image ) . '); ';
|
|
51
|
+
|
|
52
|
+
if ( isset( $attributes['minHeight'] ) ) {
|
|
53
|
+
$height_unit = empty( $attributes['minHeightUnit'] ) ? 'px' : $attributes['minHeightUnit'];
|
|
54
|
+
$height = " min-height:{$attributes['minHeight']}{$height_unit}";
|
|
55
|
+
|
|
56
|
+
$styles .= $height;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$content = preg_replace(
|
|
47
60
|
'/class=\".*?\"/',
|
|
48
|
-
'${0} style="
|
|
61
|
+
'${0} style="' . $styles . '"',
|
|
49
62
|
$content,
|
|
50
63
|
1
|
|
51
64
|
);
|