@wordpress/block-library 9.15.1 → 9.17.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/archives/edit.js +2 -2
- package/build/archives/edit.js.map +1 -1
- package/build/button/edit.js +2 -1
- package/build/button/edit.js.map +1 -1
- package/build/categories/edit.js +115 -37
- package/build/categories/edit.js.map +1 -1
- package/build/columns/edit.js +1 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +1 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/comment-template/edit.js +2 -2
- package/build/comment-template/edit.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +6 -5
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-pagination/index.js +5 -0
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +7 -6
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +7 -6
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/cover/deprecated.js +1 -1
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +2 -9
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/details/edit.js +27 -18
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +12 -0
- package/build/details/index.js.map +1 -1
- package/build/details/save.js +2 -0
- package/build/details/save.js.map +1 -1
- package/build/embed/transforms.js +5 -2
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +1 -1
- package/build/embed/util.js.map +1 -1
- package/build/file/edit.js +7 -4
- package/build/file/edit.js.map +1 -1
- package/build/file/transforms.js +1 -1
- package/build/file/transforms.js.map +1 -1
- package/build/file/utils/index.js +1 -1
- package/build/file/utils/index.js.map +1 -1
- package/build/form/variations.js +1 -1
- package/build/form/variations.js.map +1 -1
- package/build/form-input/edit.js +1 -1
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js +1 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/transforms.js +2 -2
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/use-get-new-images.js +1 -1
- package/build/gallery/use-get-new-images.js.map +1 -1
- package/build/group/edit.js +2 -9
- package/build/group/edit.js.map +1 -1
- package/build/home-link/edit.js +1 -2
- package/build/home-link/edit.js.map +1 -1
- package/build/latest-comments/edit.js +73 -26
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-posts/constants.js +2 -1
- package/build/latest-posts/constants.js.map +1 -1
- package/build/latest-posts/edit.js +91 -38
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list-item/edit.native.js +2 -2
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/index.js +1 -1
- package/build/media-text/edit.native.js +2 -2
- package/build/media-text/edit.native.js.map +1 -1
- package/build/media-text/media-container.native.js +4 -4
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/navigation/edit/index.js +8 -4
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/edit/use-generate-default-navigation-title.js +4 -4
- package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build/navigation/index.js +15 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation-link/edit.js +15 -20
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/link-ui.js +9 -18
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-submenu/edit.js +1 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +7 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/page-list/edit.js +1 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +11 -0
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +4 -14
- package/build/paragraph/edit.js.map +1 -1
- package/build/pattern/index.js +1 -1
- package/build/post-author-name/edit.js +41 -12
- package/build/post-author-name/edit.js.map +1 -1
- package/build/post-comments-link/index.js +7 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/index.js +1 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/edit.js +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +0 -6
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/overlay-controls.js +2 -1
- package/build/post-featured-image/overlay-controls.js.map +1 -1
- package/build/post-navigation-link/variations.js +2 -2
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-terms/edit.js +1 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-time-to-read/index.js +1 -1
- package/build/query/edit/inspector-controls/author-control.js +1 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +110 -61
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +2 -6
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/utils.js +1 -1
- package/build/query/utils.js.map +1 -1
- package/build/query-no-results/index.js +1 -1
- package/build/query-pagination-numbers/edit.js +1 -1
- package/build/query-pagination-numbers/edit.js.map +1 -1
- package/build/query-title/edit.js +40 -14
- package/build/query-title/edit.js.map +1 -1
- package/build/query-total/index.js +7 -1
- package/build/query-total/index.js.map +1 -1
- package/build/quote/transforms.js +1 -1
- package/build/quote/transforms.js.map +1 -1
- package/build/read-more/edit.js +25 -7
- package/build/read-more/edit.js.map +1 -1
- package/build/rss/edit.js +1 -0
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +6 -0
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +67 -48
- package/build/search/edit.js.map +1 -1
- package/build/separator/edit.js +2 -4
- package/build/separator/edit.js.map +1 -1
- package/build/site-logo/edit.js +26 -35
- package/build/site-logo/edit.js.map +1 -1
- package/build/social-links/edit.js +2 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/spacer/controls.js +13 -9
- package/build/spacer/controls.js.map +1 -1
- package/build/spacer/edit.js +23 -21
- package/build/spacer/edit.js.map +1 -1
- package/build/table-of-contents/edit.js +24 -8
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -9
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/utils/messages.js +22 -0
- package/build/utils/messages.js.map +1 -0
- package/build/video/edit-common-settings.js +1 -1
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.native.js +3 -3
- package/build/video/edit.native.js.map +1 -1
- package/build-module/archives/edit.js +2 -2
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/button/edit.js +3 -2
- package/build-module/button/edit.js.map +1 -1
- package/build-module/categories/edit.js +116 -38
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/columns/edit.js +1 -1
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +1 -1
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/comment-template/edit.js +2 -2
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +5 -4
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-pagination/index.js +5 -0
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +7 -6
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +7 -6
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/cover/deprecated.js +1 -1
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +1 -8
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/details/edit.js +29 -20
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +12 -0
- package/build-module/details/index.js.map +1 -1
- package/build-module/details/save.js +2 -0
- package/build-module/details/save.js.map +1 -1
- package/build-module/embed/transforms.js +5 -2
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +1 -1
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/edit.js +7 -4
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/transforms.js +1 -1
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/file/utils/index.js +1 -1
- package/build-module/file/utils/index.js.map +1 -1
- package/build-module/form/variations.js +1 -1
- package/build-module/form/variations.js.map +1 -1
- package/build-module/form-input/edit.js +1 -1
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js +1 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/transforms.js +2 -2
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/use-get-new-images.js +1 -1
- package/build-module/gallery/use-get-new-images.js.map +1 -1
- package/build-module/group/edit.js +1 -8
- package/build-module/group/edit.js.map +1 -1
- package/build-module/home-link/edit.js +1 -2
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/latest-comments/edit.js +74 -27
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/constants.js +1 -0
- package/build-module/latest-posts/constants.js.map +1 -1
- package/build-module/latest-posts/edit.js +93 -40
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +2 -2
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/index.js +1 -1
- package/build-module/media-text/edit.native.js +2 -2
- package/build-module/media-text/edit.native.js.map +1 -1
- package/build-module/media-text/media-container.native.js +4 -4
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/navigation/edit/index.js +8 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/edit/use-generate-default-navigation-title.js +4 -4
- package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
- package/build-module/navigation/index.js +15 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation-link/edit.js +16 -21
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +9 -18
- package/build-module/navigation-link/link-ui.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/navigation-submenu/index.js +7 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/page-list/edit.js +1 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +11 -0
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +5 -15
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/pattern/index.js +1 -1
- package/build-module/post-author-name/edit.js +42 -13
- package/build-module/post-author-name/edit.js.map +1 -1
- package/build-module/post-comments-link/index.js +7 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/index.js +1 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/edit.js +1 -1
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +0 -6
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/overlay-controls.js +2 -1
- package/build-module/post-featured-image/overlay-controls.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +2 -2
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-terms/edit.js +1 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-time-to-read/index.js +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +111 -62
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +1 -5
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/utils.js +1 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-no-results/index.js +1 -1
- package/build-module/query-pagination-numbers/edit.js +1 -1
- package/build-module/query-pagination-numbers/edit.js.map +1 -1
- package/build-module/query-title/edit.js +41 -15
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-total/index.js +7 -1
- package/build-module/query-total/index.js.map +1 -1
- package/build-module/quote/transforms.js +1 -1
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/read-more/edit.js +26 -8
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/rss/edit.js +1 -0
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +6 -0
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +69 -50
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/edit.js +1 -3
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +27 -36
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/social-links/edit.js +2 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/spacer/controls.js +13 -9
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/spacer/edit.js +24 -22
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/table-of-contents/edit.js +25 -9
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +1 -8
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/utils/messages.js +15 -0
- package/build-module/utils/messages.js.map +1 -0
- package/build-module/video/edit-common-settings.js +1 -1
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.native.js +3 -3
- package/build-module/video/edit.native.js.map +1 -1
- package/build-style/editor-rtl.css +12 -86
- package/build-style/editor.css +12 -86
- package/build-style/freeform/editor-rtl.css +2 -4
- package/build-style/freeform/editor.css +2 -4
- package/build-style/gallery/editor-rtl.css +0 -46
- package/build-style/gallery/editor.css +0 -46
- package/build-style/image/style-rtl.css +24 -10
- package/build-style/image/style.css +24 -10
- package/build-style/navigation/style-rtl.css +8 -6
- package/build-style/navigation/style.css +8 -6
- package/build-style/navigation-link/editor-rtl.css +3 -0
- package/build-style/navigation-link/editor.css +3 -0
- package/build-style/paragraph/editor-rtl.css +4 -0
- package/build-style/paragraph/editor.css +4 -0
- package/build-style/post-featured-image/editor-rtl.css +1 -1
- package/build-style/post-featured-image/editor.css +1 -1
- package/build-style/query/editor-rtl.css +0 -27
- package/build-style/query/editor.css +0 -27
- package/build-style/site-logo/editor-rtl.css +2 -8
- package/build-style/site-logo/editor.css +2 -8
- package/build-style/social-links/style-rtl.css +2 -5
- package/build-style/social-links/style.css +2 -5
- package/build-style/style-rtl.css +34 -21
- package/build-style/style.css +34 -21
- package/package.json +35 -35
- package/src/archives/edit.js +2 -2
- package/src/audio/test/transforms.native.js +4 -3
- package/src/button/edit.js +6 -2
- package/src/categories/edit.js +133 -45
- package/src/columns/edit.js +1 -1
- package/src/columns/edit.native.js +1 -1
- package/src/comment-template/edit.js +2 -2
- package/src/comments/edit/comments-inspector-controls.js +5 -8
- package/src/comments-pagination/block.json +5 -0
- package/src/comments-pagination-next/block.json +0 -5
- package/src/comments-pagination-next/index.js +6 -0
- package/src/comments-pagination-previous/block.json +0 -5
- package/src/comments-pagination-previous/index.js +6 -0
- package/src/cover/deprecated.js +1 -1
- package/src/cover/edit/inspector-controls.js +1 -21
- package/src/cover/test/__snapshots__/edit.native.js.snap +1 -1
- package/src/cover/test/edit.js +7 -7
- package/src/cover/test/edit.native.js +2 -2
- package/src/cover/test/transforms.native.js +9 -5
- package/src/details/block.json +12 -0
- package/src/details/edit.js +29 -24
- package/src/details/save.js +6 -2
- package/src/editor.scss +1 -1
- package/src/embed/test/index.js +1 -1
- package/src/embed/transforms.js +3 -1
- package/src/embed/util.js +1 -1
- package/src/file/edit.js +4 -3
- package/src/file/test/transforms.native.js +4 -3
- package/src/file/transforms.js +1 -1
- package/src/file/utils/index.js +1 -1
- package/src/form/variations.js +1 -1
- package/src/form-input/edit.js +1 -1
- package/src/freeform/editor.scss +4 -3
- package/src/gallery/edit.js +1 -1
- package/src/gallery/editor.scss +0 -54
- package/src/gallery/test/transforms.native.js +4 -3
- package/src/gallery/transforms.js +2 -2
- package/src/gallery/use-get-new-images.js +1 -1
- package/src/group/edit.js +1 -20
- package/src/home-link/edit.js +0 -6
- package/src/image/block.json +8 -1
- package/src/image/editor.scss +1 -1
- package/src/image/index.php +9 -13
- package/src/image/style.scss +17 -7
- package/src/image/test/edit.native.js +1 -1
- package/src/image/test/transforms.native.js +4 -3
- package/src/latest-comments/edit.js +93 -33
- package/src/latest-posts/constants.js +1 -0
- package/src/latest-posts/edit.js +119 -44
- package/src/list/test/edit.native.js +10 -10
- package/src/list-item/block.json +1 -1
- package/src/list-item/edit.native.js +2 -2
- package/src/media-text/edit.native.js +2 -2
- package/src/media-text/media-container.native.js +4 -4
- package/src/media-text/test/transforms.native.js +9 -5
- package/src/navigation/edit/index.js +4 -0
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
- package/src/navigation/edit/use-generate-default-navigation-title.js +4 -4
- package/src/navigation/index.js +20 -0
- package/src/navigation/style.scss +7 -4
- package/src/navigation-link/edit.js +26 -30
- package/src/navigation-link/editor.scss +27 -18
- package/src/navigation-link/link-ui.js +7 -13
- package/src/navigation-submenu/edit.js +1 -1
- package/src/navigation-submenu/index.js +7 -0
- package/src/navigation-submenu/index.php +21 -4
- package/src/page-list/block.json +11 -0
- package/src/page-list/edit.js +52 -50
- package/src/paragraph/edit.js +3 -18
- package/src/paragraph/editor.scss +7 -0
- package/src/paragraph/style.scss +1 -1
- package/src/pattern/block.json +1 -1
- package/src/post-author-name/edit.js +53 -15
- package/src/post-comments-link/block.json +7 -1
- package/src/post-content/block.json +2 -1
- package/src/post-date/edit.js +1 -3
- package/src/post-featured-image/edit.js +2 -15
- package/src/post-featured-image/editor.scss +2 -2
- package/src/post-featured-image/overlay-controls.js +1 -0
- package/src/post-navigation-link/variations.js +2 -2
- package/src/post-terms/edit.js +1 -0
- package/src/post-time-to-read/block.json +1 -1
- package/src/query/edit/inspector-controls/author-control.js +1 -1
- package/src/query/edit/inspector-controls/index.js +148 -88
- package/src/query/edit/query-content.js +1 -11
- package/src/query/editor.scss +0 -31
- package/src/query/utils.js +1 -1
- package/src/query-no-results/block.json +1 -1
- package/src/query-pagination-numbers/edit.js +1 -1
- package/src/query-title/edit.js +61 -19
- package/src/query-total/block.json +7 -1
- package/src/quote/transforms.js +1 -1
- package/src/read-more/edit.js +35 -11
- package/src/rss/block.json +6 -0
- package/src/rss/edit.js +1 -0
- package/src/search/edit.js +100 -71
- package/src/separator/deprecated.scss +1 -1
- package/src/separator/edit.js +1 -6
- package/src/site-logo/edit.js +34 -47
- package/src/site-logo/editor.scss +3 -6
- package/src/social-link/index.php +2 -2
- package/src/social-links/edit.js +1 -0
- package/src/social-links/style.scss +3 -3
- package/src/spacer/controls.js +10 -9
- package/src/spacer/edit.js +25 -23
- package/src/table-of-contents/edit.js +38 -19
- package/src/template-part/edit/advanced-controls.js +1 -21
- package/src/utils/messages.js +31 -0
- package/src/video/edit-common-settings.js +1 -1
- package/src/video/edit.native.js +3 -3
- package/src/video/test/transforms.native.js +4 -3
|
@@ -22,3 +22,10 @@
|
|
|
22
22
|
.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"] {
|
|
23
23
|
rotate: 180deg;
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
// Hide the placeholder when the editor is in zoomed out mode.
|
|
27
|
+
.is-zoomed-out .block-editor-block-list__block[data-empty="true"] {
|
|
28
|
+
[data-rich-text-placeholder] {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/paragraph/style.scss
CHANGED
|
@@ -44,7 +44,7 @@ p.has-drop-cap.has-background {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
// Use :where to contain the specificity of this rule
|
|
47
|
-
// so it's easily
|
|
47
|
+
// so it's easily overridable by any theme that targets
|
|
48
48
|
// links using the a element.
|
|
49
49
|
// For example, this is what global styles does.
|
|
50
50
|
:where(p.has-text-color:not(.has-link-color)) a {
|
package/src/pattern/block.json
CHANGED
|
@@ -15,7 +15,16 @@ import {
|
|
|
15
15
|
import { useSelect } from '@wordpress/data';
|
|
16
16
|
import { __, sprintf } from '@wordpress/i18n';
|
|
17
17
|
import { store as coreStore } from '@wordpress/core-data';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
ToggleControl,
|
|
20
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
21
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
22
|
+
} from '@wordpress/components';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Internal dependencies
|
|
26
|
+
*/
|
|
27
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
19
28
|
|
|
20
29
|
function PostAuthorNameEdit( {
|
|
21
30
|
context: { postType, postId },
|
|
@@ -61,6 +70,8 @@ function PostAuthorNameEdit( {
|
|
|
61
70
|
displayName
|
|
62
71
|
);
|
|
63
72
|
|
|
73
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
74
|
+
|
|
64
75
|
return (
|
|
65
76
|
<>
|
|
66
77
|
<BlockControls group="block">
|
|
@@ -72,26 +83,53 @@ function PostAuthorNameEdit( {
|
|
|
72
83
|
/>
|
|
73
84
|
</BlockControls>
|
|
74
85
|
<InspectorControls>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
<ToolsPanel
|
|
87
|
+
label={ __( 'Settings' ) }
|
|
88
|
+
resetAll={ () => {
|
|
89
|
+
setAttributes( {
|
|
90
|
+
isLink: false,
|
|
91
|
+
linkTarget: '_self',
|
|
92
|
+
} );
|
|
93
|
+
} }
|
|
94
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
95
|
+
>
|
|
96
|
+
<ToolsPanelItem
|
|
78
97
|
label={ __( 'Link to author archive' ) }
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
isShownByDefault
|
|
99
|
+
hasValue={ () => isLink }
|
|
100
|
+
onDeselect={ () => setAttributes( { isLink: false } ) }
|
|
101
|
+
>
|
|
83
102
|
<ToggleControl
|
|
84
103
|
__nextHasNoMarginBottom
|
|
85
|
-
label={ __( '
|
|
86
|
-
onChange={ (
|
|
87
|
-
setAttributes( {
|
|
88
|
-
linkTarget: value ? '_blank' : '_self',
|
|
89
|
-
} )
|
|
104
|
+
label={ __( 'Link to author archive' ) }
|
|
105
|
+
onChange={ () =>
|
|
106
|
+
setAttributes( { isLink: ! isLink } )
|
|
90
107
|
}
|
|
91
|
-
checked={
|
|
108
|
+
checked={ isLink }
|
|
92
109
|
/>
|
|
110
|
+
</ToolsPanelItem>
|
|
111
|
+
{ isLink && (
|
|
112
|
+
<ToolsPanelItem
|
|
113
|
+
label={ __( 'Open in new tab' ) }
|
|
114
|
+
isShownByDefault
|
|
115
|
+
hasValue={ () => linkTarget !== '_self' }
|
|
116
|
+
onDeselect={ () =>
|
|
117
|
+
setAttributes( { linkTarget: '_self' } )
|
|
118
|
+
}
|
|
119
|
+
>
|
|
120
|
+
<ToggleControl
|
|
121
|
+
__nextHasNoMarginBottom
|
|
122
|
+
label={ __( 'Open in new tab' ) }
|
|
123
|
+
onChange={ ( value ) =>
|
|
124
|
+
setAttributes( {
|
|
125
|
+
linkTarget: value ? '_blank' : '_self',
|
|
126
|
+
} )
|
|
127
|
+
}
|
|
128
|
+
checked={ linkTarget === '_blank' }
|
|
129
|
+
/>
|
|
130
|
+
</ToolsPanelItem>
|
|
93
131
|
) }
|
|
94
|
-
</
|
|
132
|
+
</ToolsPanel>
|
|
95
133
|
</InspectorControls>
|
|
96
134
|
<div { ...blockProps }>
|
|
97
135
|
{ supportsAuthor
|
|
@@ -47,7 +47,13 @@
|
|
|
47
47
|
"radius": true,
|
|
48
48
|
"color": true,
|
|
49
49
|
"width": true,
|
|
50
|
-
"style": true
|
|
50
|
+
"style": true,
|
|
51
|
+
"__experimentalDefaultControls": {
|
|
52
|
+
"radius": true,
|
|
53
|
+
"color": true,
|
|
54
|
+
"width": true,
|
|
55
|
+
"style": true
|
|
56
|
+
}
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
59
|
"style": "wp-block-post-comments-link"
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"color": {
|
|
37
37
|
"gradients": true,
|
|
38
|
+
"heading": true,
|
|
38
39
|
"link": true,
|
|
39
40
|
"__experimentalDefaultControls": {
|
|
40
41
|
"background": false,
|
|
@@ -69,4 +70,4 @@
|
|
|
69
70
|
},
|
|
70
71
|
"style": "wp-block-post-content",
|
|
71
72
|
"editorStyle": "wp-block-post-content-editor"
|
|
72
|
-
}
|
|
73
|
+
}
|
package/src/post-date/edit.js
CHANGED
|
@@ -179,9 +179,7 @@ export default function PostDateEdit( {
|
|
|
179
179
|
dropdownMenuProps={ dropdownMenuProps }
|
|
180
180
|
>
|
|
181
181
|
<ToolsPanelItem
|
|
182
|
-
hasValue={ () =>
|
|
183
|
-
format !== undefined && format !== siteFormat
|
|
184
|
-
}
|
|
182
|
+
hasValue={ () => !! format }
|
|
185
183
|
label={ __( 'Date Format' ) }
|
|
186
184
|
onDeselect={ () =>
|
|
187
185
|
setAttributes( { format: undefined } )
|
|
@@ -49,11 +49,6 @@ function getMediaSourceUrlBySizeSlug( media, slug ) {
|
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const disabledClickProps = {
|
|
53
|
-
onClick: ( event ) => event.preventDefault(),
|
|
54
|
-
'aria-disabled': true,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
52
|
export default function PostFeaturedImageEdit( {
|
|
58
53
|
clientId,
|
|
59
54
|
attributes,
|
|
@@ -318,11 +313,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
318
313
|
{ controls }
|
|
319
314
|
<div { ...blockProps }>
|
|
320
315
|
{ !! isLink ? (
|
|
321
|
-
<a
|
|
322
|
-
href={ postPermalink }
|
|
323
|
-
target={ linkTarget }
|
|
324
|
-
{ ...disabledClickProps }
|
|
325
|
-
>
|
|
316
|
+
<a href={ postPermalink } target={ linkTarget }>
|
|
326
317
|
{ placeholder() }
|
|
327
318
|
</a>
|
|
328
319
|
) : (
|
|
@@ -430,11 +421,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
430
421
|
<figure { ...blockProps }>
|
|
431
422
|
{ /* If the featured image is linked, wrap in an <a /> tag to trigger any inherited link element styles */ }
|
|
432
423
|
{ !! isLink ? (
|
|
433
|
-
<a
|
|
434
|
-
href={ postPermalink }
|
|
435
|
-
target={ linkTarget }
|
|
436
|
-
{ ...disabledClickProps }
|
|
437
|
-
>
|
|
424
|
+
<a href={ postPermalink } target={ linkTarget }>
|
|
438
425
|
{ image }
|
|
439
426
|
</a>
|
|
440
427
|
) : (
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
|
|
101
101
|
// When the Post Featured Image block is linked,
|
|
102
102
|
// it's wrapped with a disabled <a /> tag.
|
|
103
|
-
//
|
|
103
|
+
// Ensure that the link is not clickable.
|
|
104
104
|
> a {
|
|
105
|
-
|
|
105
|
+
pointer-events: none;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
// When the Post Featured Image block is linked,
|
|
@@ -8,7 +8,7 @@ const variations = [
|
|
|
8
8
|
{
|
|
9
9
|
isDefault: true,
|
|
10
10
|
name: 'post-next',
|
|
11
|
-
title: __( 'Next
|
|
11
|
+
title: __( 'Next Post' ),
|
|
12
12
|
description: __(
|
|
13
13
|
'Displays the post link that follows the current post.'
|
|
14
14
|
),
|
|
@@ -24,7 +24,7 @@ const variations = [
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
name: 'post-previous',
|
|
27
|
-
title: __( 'Previous
|
|
27
|
+
title: __( 'Previous Post' ),
|
|
28
28
|
description: __(
|
|
29
29
|
'Displays the post link that precedes the current post.'
|
|
30
30
|
),
|
package/src/post-terms/edit.js
CHANGED
|
@@ -30,7 +30,7 @@ function AuthorControl( { value, onChange } ) {
|
|
|
30
30
|
const authorsInfo = getEntitiesInfo( authorsList );
|
|
31
31
|
/**
|
|
32
32
|
* We need to normalize the value because the block operates on a
|
|
33
|
-
* comma(`,`) separated string value and `
|
|
33
|
+
* comma(`,`) separated string value and `FormTokenField` needs an
|
|
34
34
|
* array.
|
|
35
35
|
*/
|
|
36
36
|
const normalizedValue = ! value ? [] : value.toString().split( ',' );
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
|
-
PanelBody,
|
|
6
5
|
TextControl,
|
|
7
6
|
SelectControl,
|
|
8
7
|
RangeControl,
|
|
@@ -187,110 +186,171 @@ export default function QueryInspectorControls( props ) {
|
|
|
187
186
|
return (
|
|
188
187
|
<>
|
|
189
188
|
{ showSettingsPanel && (
|
|
190
|
-
<
|
|
189
|
+
<ToolsPanel
|
|
190
|
+
label={ __( 'Settings' ) }
|
|
191
|
+
resetAll={ () => {
|
|
192
|
+
setQuery( {
|
|
193
|
+
postType: 'post',
|
|
194
|
+
order: 'desc',
|
|
195
|
+
orderBy: 'date',
|
|
196
|
+
sticky: '',
|
|
197
|
+
inherit: true,
|
|
198
|
+
} );
|
|
199
|
+
} }
|
|
200
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
201
|
+
>
|
|
191
202
|
{ showInheritControl && (
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
__nextHasNoMarginBottom
|
|
203
|
+
<ToolsPanelItem
|
|
204
|
+
hasValue={ () => ! inherit }
|
|
195
205
|
label={ __( 'Query type' ) }
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
setQuery( { inherit: value === 'default' } );
|
|
199
|
-
} }
|
|
200
|
-
help={
|
|
201
|
-
inherit
|
|
202
|
-
? __(
|
|
203
|
-
'Display a list of posts or custom post types based on the current template.'
|
|
204
|
-
)
|
|
205
|
-
: __(
|
|
206
|
-
'Display a list of posts or custom post types based on specific criteria.'
|
|
207
|
-
)
|
|
208
|
-
}
|
|
209
|
-
value={ !! inherit ? 'default' : 'custom' }
|
|
206
|
+
onDeselect={ () => setQuery( { inherit: true } ) }
|
|
207
|
+
isShownByDefault
|
|
210
208
|
>
|
|
211
|
-
<ToggleGroupControlOption
|
|
212
|
-
value="default"
|
|
213
|
-
label={ __( 'Default' ) }
|
|
214
|
-
/>
|
|
215
|
-
<ToggleGroupControlOption
|
|
216
|
-
value="custom"
|
|
217
|
-
label={ __( 'Custom' ) }
|
|
218
|
-
/>
|
|
219
|
-
</ToggleGroupControl>
|
|
220
|
-
) }
|
|
221
|
-
{ showPostTypeControl &&
|
|
222
|
-
( postTypesSelectOptions.length > 2 ? (
|
|
223
|
-
<SelectControl
|
|
224
|
-
__nextHasNoMarginBottom
|
|
225
|
-
__next40pxDefaultSize
|
|
226
|
-
options={ postTypesSelectOptions }
|
|
227
|
-
value={ postType }
|
|
228
|
-
label={ postTypeControlLabel }
|
|
229
|
-
onChange={ onPostTypeChange }
|
|
230
|
-
help={ postTypeControlHelp }
|
|
231
|
-
/>
|
|
232
|
-
) : (
|
|
233
209
|
<ToggleGroupControl
|
|
234
|
-
__nextHasNoMarginBottom
|
|
235
210
|
__next40pxDefaultSize
|
|
211
|
+
__nextHasNoMarginBottom
|
|
212
|
+
label={ __( 'Query type' ) }
|
|
236
213
|
isBlock
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
214
|
+
onChange={ ( value ) => {
|
|
215
|
+
setQuery( {
|
|
216
|
+
inherit: value === 'default',
|
|
217
|
+
} );
|
|
218
|
+
} }
|
|
219
|
+
help={
|
|
220
|
+
inherit
|
|
221
|
+
? __(
|
|
222
|
+
'Display a list of posts or custom post types based on the current template.'
|
|
223
|
+
)
|
|
224
|
+
: __(
|
|
225
|
+
'Display a list of posts or custom post types based on specific criteria.'
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
value={ !! inherit ? 'default' : 'custom' }
|
|
241
229
|
>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
230
|
+
<ToggleGroupControlOption
|
|
231
|
+
value="default"
|
|
232
|
+
label={ __( 'Default' ) }
|
|
233
|
+
/>
|
|
234
|
+
<ToggleGroupControlOption
|
|
235
|
+
value="custom"
|
|
236
|
+
label={ __( 'Custom' ) }
|
|
237
|
+
/>
|
|
249
238
|
</ToggleGroupControl>
|
|
250
|
-
|
|
239
|
+
</ToolsPanelItem>
|
|
240
|
+
) }
|
|
251
241
|
|
|
252
|
-
{
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
242
|
+
{ showPostTypeControl && (
|
|
243
|
+
<ToolsPanelItem
|
|
244
|
+
hasValue={ () => postType !== 'post' }
|
|
245
|
+
label={ postTypeControlLabel }
|
|
246
|
+
onDeselect={ () => onPostTypeChange( 'post' ) }
|
|
247
|
+
isShownByDefault
|
|
248
|
+
>
|
|
249
|
+
{ postTypesSelectOptions.length > 2 ? (
|
|
250
|
+
<SelectControl
|
|
251
|
+
__nextHasNoMarginBottom
|
|
252
|
+
__next40pxDefaultSize
|
|
253
|
+
options={ postTypesSelectOptions }
|
|
254
|
+
value={ postType }
|
|
255
|
+
label={ postTypeControlLabel }
|
|
256
|
+
onChange={ onPostTypeChange }
|
|
257
|
+
help={ postTypeControlHelp }
|
|
258
|
+
/>
|
|
259
|
+
) : (
|
|
260
|
+
<ToggleGroupControl
|
|
261
|
+
__nextHasNoMarginBottom
|
|
262
|
+
__next40pxDefaultSize
|
|
263
|
+
isBlock
|
|
264
|
+
value={ postType }
|
|
265
|
+
label={ postTypeControlLabel }
|
|
266
|
+
onChange={ onPostTypeChange }
|
|
267
|
+
help={ postTypeControlHelp }
|
|
271
268
|
>
|
|
272
|
-
{
|
|
273
|
-
|
|
269
|
+
{ postTypesSelectOptions.map(
|
|
270
|
+
( option ) => (
|
|
271
|
+
<ToggleGroupControlOption
|
|
272
|
+
key={ option.value }
|
|
273
|
+
value={ option.value }
|
|
274
|
+
label={ option.label }
|
|
275
|
+
/>
|
|
276
|
+
)
|
|
274
277
|
) }
|
|
275
|
-
</
|
|
278
|
+
</ToggleGroupControl>
|
|
276
279
|
) }
|
|
277
|
-
|
|
280
|
+
</ToolsPanelItem>
|
|
278
281
|
) }
|
|
282
|
+
|
|
283
|
+
{ showColumnsControl && (
|
|
284
|
+
<ToolsPanelItem
|
|
285
|
+
hasValue={ () => displayLayout?.columns !== 2 }
|
|
286
|
+
label={ __( 'Columns' ) }
|
|
287
|
+
onDeselect={ () =>
|
|
288
|
+
setDisplayLayout( { columns: 2 } )
|
|
289
|
+
}
|
|
290
|
+
isShownByDefault
|
|
291
|
+
>
|
|
292
|
+
<>
|
|
293
|
+
<RangeControl
|
|
294
|
+
__nextHasNoMarginBottom
|
|
295
|
+
__next40pxDefaultSize
|
|
296
|
+
label={ __( 'Columns' ) }
|
|
297
|
+
value={ displayLayout.columns }
|
|
298
|
+
onChange={ ( value ) =>
|
|
299
|
+
setDisplayLayout( {
|
|
300
|
+
columns: value,
|
|
301
|
+
} )
|
|
302
|
+
}
|
|
303
|
+
min={ 2 }
|
|
304
|
+
max={ Math.max( 6, displayLayout.columns ) }
|
|
305
|
+
/>
|
|
306
|
+
{ displayLayout.columns > 6 && (
|
|
307
|
+
<Notice
|
|
308
|
+
status="warning"
|
|
309
|
+
isDismissible={ false }
|
|
310
|
+
>
|
|
311
|
+
{ __(
|
|
312
|
+
'This column count exceeds the recommended amount and may cause visual breakage.'
|
|
313
|
+
) }
|
|
314
|
+
</Notice>
|
|
315
|
+
) }
|
|
316
|
+
</>
|
|
317
|
+
</ToolsPanelItem>
|
|
318
|
+
) }
|
|
319
|
+
|
|
279
320
|
{ showOrderControl && (
|
|
280
|
-
<
|
|
281
|
-
{
|
|
282
|
-
|
|
283
|
-
|
|
321
|
+
<ToolsPanelItem
|
|
322
|
+
hasValue={ () =>
|
|
323
|
+
order !== 'desc' || orderBy !== 'date'
|
|
324
|
+
}
|
|
325
|
+
label={ __( 'Order by' ) }
|
|
326
|
+
onDeselect={ () =>
|
|
327
|
+
setQuery( { order: 'desc', orderBy: 'date' } )
|
|
328
|
+
}
|
|
329
|
+
isShownByDefault
|
|
330
|
+
>
|
|
331
|
+
<OrderControl
|
|
332
|
+
{ ...{ order, orderBy } }
|
|
333
|
+
onChange={ setQuery }
|
|
334
|
+
/>
|
|
335
|
+
</ToolsPanelItem>
|
|
284
336
|
) }
|
|
337
|
+
|
|
285
338
|
{ showStickyControl && (
|
|
286
|
-
<
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
339
|
+
<ToolsPanelItem
|
|
340
|
+
hasValue={ () => !! sticky }
|
|
341
|
+
label={ __( 'Sticky posts' ) }
|
|
342
|
+
onDeselect={ () => setQuery( { sticky: '' } ) }
|
|
343
|
+
isShownByDefault
|
|
344
|
+
>
|
|
345
|
+
<StickyControl
|
|
346
|
+
value={ sticky }
|
|
347
|
+
onChange={ ( value ) =>
|
|
348
|
+
setQuery( { sticky: value } )
|
|
349
|
+
}
|
|
350
|
+
/>
|
|
351
|
+
</ToolsPanelItem>
|
|
292
352
|
) }
|
|
293
|
-
</
|
|
353
|
+
</ToolsPanel>
|
|
294
354
|
) }
|
|
295
355
|
{ ! inherit && showDisplayPanel && (
|
|
296
356
|
<ToolsPanel
|
|
@@ -23,6 +23,7 @@ import QueryInspectorControls from './inspector-controls';
|
|
|
23
23
|
import EnhancedPaginationModal from './enhanced-pagination-modal';
|
|
24
24
|
import { getQueryContextFromTemplate } from '../utils';
|
|
25
25
|
import QueryToolbar from './query-toolbar';
|
|
26
|
+
import { htmlElementMessages } from '../../utils/messages';
|
|
26
27
|
|
|
27
28
|
const DEFAULTS_POSTS_PER_PAGE = 3;
|
|
28
29
|
|
|
@@ -132,17 +133,6 @@ export default function QueryContent( {
|
|
|
132
133
|
setAttributes( {
|
|
133
134
|
displayLayout: { ...displayLayout, ...newDisplayLayout },
|
|
134
135
|
} );
|
|
135
|
-
const htmlElementMessages = {
|
|
136
|
-
main: __(
|
|
137
|
-
'The <main> element should be used for the primary content of your document only.'
|
|
138
|
-
),
|
|
139
|
-
section: __(
|
|
140
|
-
"The <section> element should represent a standalone portion of the document that can't be better represented by another element."
|
|
141
|
-
),
|
|
142
|
-
aside: __(
|
|
143
|
-
"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."
|
|
144
|
-
),
|
|
145
|
-
};
|
|
146
136
|
|
|
147
137
|
return (
|
|
148
138
|
<>
|
package/src/query/editor.scss
CHANGED
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
.block-library-query-toolbar__popover .components-popover__content {
|
|
2
|
-
min-width: 230px;
|
|
3
|
-
|
|
4
|
-
.block-library-query-toolbar__popover-number-control {
|
|
5
|
-
margin-bottom: $grid-unit-10;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.block-library-query__pattern-selection-content .block-editor-block-patterns-list {
|
|
10
|
-
display: grid;
|
|
11
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
12
|
-
grid-gap: $grid-unit-10;
|
|
13
|
-
|
|
14
|
-
.block-editor-block-patterns-list__list-item {
|
|
15
|
-
margin-bottom: 0;
|
|
16
|
-
.block-editor-block-preview__container {
|
|
17
|
-
max-height: 250px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
1
|
.block-library-query-pattern__selection-modal {
|
|
23
2
|
|
|
24
3
|
.block-editor-block-patterns-list {
|
|
@@ -45,22 +24,12 @@
|
|
|
45
24
|
}
|
|
46
25
|
}
|
|
47
26
|
|
|
48
|
-
.block-library-query-toolspanel__design {
|
|
49
|
-
.block-library-query-pattern__selection-content {
|
|
50
|
-
margin-top: $grid-unit-10;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
27
|
.wp-block-query__enhanced-pagination-modal {
|
|
55
28
|
@include break-small() {
|
|
56
29
|
max-width: $break-mobile;
|
|
57
30
|
}
|
|
58
31
|
}
|
|
59
32
|
|
|
60
|
-
.wp-block-query__enhanced-pagination-notice {
|
|
61
|
-
margin: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
33
|
.block-editor-block-settings-menu__popover {
|
|
65
34
|
&.is-expanded {
|
|
66
35
|
overflow-y: scroll;
|
package/src/query/utils.js
CHANGED
|
@@ -81,7 +81,7 @@ export const getValueFromObjectPath = ( object, path ) => {
|
|
|
81
81
|
*
|
|
82
82
|
* @param {Object[]} entities The array of entities.
|
|
83
83
|
* @param {string} path The path to map a `name` property from the entity.
|
|
84
|
-
* @return {IHasNameAndId[]} An array of
|
|
84
|
+
* @return {IHasNameAndId[]} An array of entities that now implement the `IHasNameAndId` interface.
|
|
85
85
|
*/
|
|
86
86
|
export const mapToIHasNameAndId = ( entities, path ) => {
|
|
87
87
|
return ( entities || [] ).map( ( entity ) => ( {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
3
|
"apiVersion": 3,
|
|
4
4
|
"name": "core/query-no-results",
|
|
5
|
-
"title": "No
|
|
5
|
+
"title": "No Results",
|
|
6
6
|
"category": "theme",
|
|
7
7
|
"description": "Contains the block elements used to render content when no query results are found.",
|
|
8
8
|
"ancestor": [ "core/query" ],
|
|
@@ -67,7 +67,7 @@ export default function QueryPaginationNumbersEdit( {
|
|
|
67
67
|
>
|
|
68
68
|
<ToolsPanelItem
|
|
69
69
|
label={ __( 'Number of links' ) }
|
|
70
|
-
hasValue={ () => midSize !==
|
|
70
|
+
hasValue={ () => midSize !== 2 }
|
|
71
71
|
onDeselect={ () => setAttributes( { midSize: 2 } ) }
|
|
72
72
|
isShownByDefault
|
|
73
73
|
>
|