@wordpress/block-library 9.4.0 → 9.5.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 +6 -0
- package/build/avatar/edit.js +1 -0
- package/build/avatar/edit.js.map +1 -1
- package/build/categories/index.js +12 -0
- package/build/categories/index.js.map +1 -1
- package/build/column/edit.js +2 -2
- package/build/column/edit.js.map +1 -1
- package/build/column/index.js +2 -0
- package/build/column/index.js.map +1 -1
- package/build/comment-template/index.js +12 -0
- package/build/comment-template/index.js.map +1 -1
- package/build/comments-title/deprecated.js +3 -0
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/comments-title/edit.js +3 -1
- package/build/comments-title/edit.js.map +1 -1
- package/build/comments-title/index.js +3 -0
- package/build/comments-title/index.js.map +1 -1
- package/build/details/edit.js +1 -0
- package/build/details/edit.js.map +1 -1
- package/build/form/edit.js +4 -4
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +1 -0
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js +42 -8
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gap-styles.js +1 -9
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/use-image-sizes.js +2 -2
- package/build/gallery/use-image-sizes.js.map +1 -1
- package/build/group/index.js +27 -30
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +51 -3
- package/build/group/variations.js.map +1 -1
- package/build/heading/edit.js +2 -0
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +3 -0
- package/build/heading/index.js.map +1 -1
- package/build/image/view.js +1 -1
- package/build/image/view.js.map +1 -1
- package/build/latest-posts/edit.js +1 -0
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/index.js +1 -1
- package/build/list/ordered-list-settings.js +19 -17
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/list-item/index.js +3 -2
- package/build/list-item/index.js.map +1 -1
- package/build/loginout/index.js +14 -1
- package/build/loginout/index.js.map +1 -1
- package/build/navigation/edit/index.js +5 -4
- package/build/navigation/edit/index.js.map +1 -1
- package/build/post-comments-form/index.js +12 -0
- package/build/post-comments-form/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/index.js +12 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/index.js +12 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +2 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/index.js +12 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/post-time-to-read/index.js +6 -0
- package/build/post-time-to-read/index.js.map +1 -1
- package/build/post-title/edit.js +4 -2
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +15 -0
- package/build/post-title/index.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +69 -9
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/offset-controls.js +37 -0
- package/build/query/edit/inspector-controls/offset-controls.js.map +1 -0
- package/build/query/edit/inspector-controls/pages-control.js +36 -0
- package/build/query/edit/inspector-controls/pages-control.js.map +1 -0
- package/build/query/edit/inspector-controls/per-page-control.js +40 -0
- package/build/query/edit/inspector-controls/per-page-control.js.map +1 -0
- package/build/query/edit/inspector-controls/sticky-control.js +1 -1
- package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build/query/edit/query-toolbar.js +3 -76
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/utils.js +10 -5
- package/build/query/utils.js.map +1 -1
- package/build/query-title/edit.js +2 -0
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +3 -0
- package/build/query-title/index.js.map +1 -1
- package/build/site-logo/edit.js +15 -8
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +3 -3
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +12 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/edit.js +2 -2
- package/build/site-title/edit.js.map +1 -1
- package/build/site-title/index.js +10 -0
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +0 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/spacer/controls.js +8 -13
- package/build/spacer/controls.js.map +1 -1
- package/build/table-of-contents/index.js +14 -1
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/edit.js +38 -32
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +1 -1
- package/build/template-part/edit/index.js +7 -6
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +6 -4
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/avatar/edit.js +1 -0
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/categories/index.js +12 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/column/edit.js +2 -2
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/index.js +2 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/comment-template/index.js +12 -0
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments-title/deprecated.js +3 -0
- package/build-module/comments-title/deprecated.js.map +1 -1
- package/build-module/comments-title/edit.js +3 -1
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/comments-title/index.js +3 -0
- package/build-module/comments-title/index.js.map +1 -1
- package/build-module/details/edit.js +1 -0
- package/build-module/details/edit.js.map +1 -1
- package/build-module/form/edit.js +4 -4
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +1 -0
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js +43 -9
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gap-styles.js +1 -9
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/gallery/use-image-sizes.js +2 -2
- package/build-module/gallery/use-image-sizes.js.map +1 -1
- package/build-module/group/index.js +27 -30
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +51 -3
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/edit.js +2 -0
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +3 -0
- package/build-module/heading/index.js.map +1 -1
- package/build-module/image/view.js +1 -1
- package/build-module/image/view.js.map +1 -1
- package/build-module/latest-posts/edit.js +1 -0
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/index.js +1 -1
- package/build-module/list/ordered-list-settings.js +19 -17
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list-item/index.js +3 -2
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/loginout/index.js +14 -1
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +5 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +12 -0
- package/build-module/post-comments-form/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/index.js +12 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/index.js +12 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +2 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/index.js +12 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-time-to-read/index.js +6 -0
- package/build-module/post-time-to-read/index.js.map +1 -1
- package/build-module/post-title/edit.js +4 -2
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +15 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +71 -11
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/offset-controls.js +29 -0
- package/build-module/query/edit/inspector-controls/offset-controls.js.map +1 -0
- package/build-module/query/edit/inspector-controls/pages-control.js +28 -0
- package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/per-page-control.js +33 -0
- package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -0
- package/build-module/query/edit/inspector-controls/sticky-control.js +1 -1
- package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +4 -78
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/utils.js +10 -5
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-title/edit.js +2 -0
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +3 -0
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/site-logo/edit.js +15 -8
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +3 -3
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +12 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/edit.js +2 -2
- package/build-module/site-title/edit.js.map +1 -1
- package/build-module/site-title/index.js +10 -0
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +0 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/spacer/controls.js +9 -14
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/table-of-contents/index.js +14 -1
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/edit.js +39 -33
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +1 -1
- package/build-module/template-part/edit/index.js +7 -6
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +6 -4
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-style/archives/editor-rtl.css +3 -0
- package/build-style/archives/editor.css +3 -0
- package/build-style/archives/style-rtl.css +3 -0
- package/build-style/archives/style.css +3 -0
- package/build-style/audio/editor-rtl.css +3 -0
- package/build-style/audio/editor.css +3 -0
- package/build-style/audio/style-rtl.css +3 -0
- package/build-style/audio/style.css +3 -0
- package/build-style/audio/theme-rtl.css +3 -0
- package/build-style/audio/theme.css +3 -0
- package/build-style/avatar/editor-rtl.css +3 -0
- package/build-style/avatar/editor.css +3 -0
- package/build-style/avatar/style-rtl.css +3 -0
- package/build-style/avatar/style.css +3 -0
- package/build-style/button/editor-rtl.css +3 -0
- package/build-style/button/editor.css +3 -0
- package/build-style/button/style-rtl.css +3 -0
- package/build-style/button/style.css +3 -0
- package/build-style/buttons/editor-rtl.css +3 -0
- package/build-style/buttons/editor.css +3 -0
- package/build-style/buttons/style-rtl.css +3 -0
- package/build-style/buttons/style.css +3 -0
- package/build-style/calendar/style-rtl.css +3 -0
- package/build-style/calendar/style.css +3 -0
- package/build-style/categories/editor-rtl.css +3 -0
- package/build-style/categories/editor.css +3 -0
- package/build-style/categories/style-rtl.css +3 -0
- package/build-style/categories/style.css +3 -0
- package/build-style/classic-rtl.css +3 -0
- package/build-style/classic.css +3 -0
- package/build-style/code/editor-rtl.css +3 -0
- package/build-style/code/editor.css +3 -0
- package/build-style/code/style-rtl.css +3 -0
- package/build-style/code/style.css +3 -0
- package/build-style/code/theme-rtl.css +3 -0
- package/build-style/code/theme.css +3 -0
- package/build-style/columns/editor-rtl.css +3 -0
- package/build-style/columns/editor.css +3 -0
- package/build-style/columns/style-rtl.css +3 -0
- package/build-style/columns/style.css +3 -0
- package/build-style/comment-author-avatar/editor-rtl.css +3 -0
- package/build-style/comment-author-avatar/editor.css +3 -0
- package/build-style/comment-content/style-rtl.css +3 -0
- package/build-style/comment-content/style.css +3 -0
- package/build-style/comment-template/style-rtl.css +3 -0
- package/build-style/comment-template/style.css +3 -0
- package/build-style/comments/editor-rtl.css +3 -0
- package/build-style/comments/editor.css +3 -0
- package/build-style/comments/style-rtl.css +3 -0
- package/build-style/comments/style.css +3 -0
- package/build-style/comments-pagination/editor-rtl.css +3 -0
- package/build-style/comments-pagination/editor.css +3 -0
- package/build-style/comments-pagination/style-rtl.css +3 -0
- package/build-style/comments-pagination/style.css +3 -0
- package/build-style/comments-pagination-numbers/editor-rtl.css +3 -0
- package/build-style/comments-pagination-numbers/editor.css +3 -0
- package/build-style/comments-title/editor-rtl.css +3 -0
- package/build-style/comments-title/editor.css +3 -0
- package/build-style/common-rtl.css +3 -0
- package/build-style/common.css +3 -0
- package/build-style/cover/editor-rtl.css +3 -0
- package/build-style/cover/editor.css +3 -0
- package/build-style/cover/style-rtl.css +3 -0
- package/build-style/cover/style.css +3 -0
- package/build-style/details/editor-rtl.css +3 -0
- package/build-style/details/editor.css +3 -0
- package/build-style/details/style-rtl.css +3 -0
- package/build-style/details/style.css +3 -0
- package/build-style/editor-elements-rtl.css +3 -0
- package/build-style/editor-elements.css +3 -0
- package/build-style/editor-rtl.css +16 -30
- package/build-style/editor.css +16 -30
- package/build-style/elements-rtl.css +3 -0
- package/build-style/elements.css +3 -0
- package/build-style/embed/editor-rtl.css +3 -0
- package/build-style/embed/editor.css +3 -0
- package/build-style/embed/style-rtl.css +3 -0
- package/build-style/embed/style.css +3 -0
- package/build-style/embed/theme-rtl.css +3 -0
- package/build-style/embed/theme.css +3 -0
- package/build-style/file/editor-rtl.css +3 -0
- package/build-style/file/editor.css +3 -0
- package/build-style/file/style-rtl.css +3 -0
- package/build-style/file/style.css +3 -0
- package/build-style/footnotes/style-rtl.css +3 -0
- package/build-style/footnotes/style.css +3 -0
- package/build-style/form-input/editor-rtl.css +3 -0
- package/build-style/form-input/editor.css +3 -0
- package/build-style/form-input/style-rtl.css +4 -0
- package/build-style/form-input/style.css +4 -0
- package/build-style/form-submission-notification/editor-rtl.css +3 -0
- package/build-style/form-submission-notification/editor.css +3 -0
- package/build-style/form-submit-button/style-rtl.css +3 -0
- package/build-style/form-submit-button/style.css +3 -0
- package/build-style/freeform/editor-rtl.css +3 -0
- package/build-style/freeform/editor.css +3 -0
- package/build-style/gallery/editor-rtl.css +3 -1
- package/build-style/gallery/editor.css +3 -1
- package/build-style/gallery/style-rtl.css +3 -0
- package/build-style/gallery/style.css +3 -0
- package/build-style/gallery/theme-rtl.css +3 -0
- package/build-style/gallery/theme.css +3 -0
- package/build-style/group/editor-rtl.css +3 -11
- package/build-style/group/editor.css +3 -11
- package/build-style/group/style-rtl.css +3 -0
- package/build-style/group/style.css +3 -0
- package/build-style/group/theme-rtl.css +3 -0
- package/build-style/group/theme.css +3 -0
- package/build-style/heading/style-rtl.css +3 -0
- package/build-style/heading/style.css +3 -0
- package/build-style/html/editor-rtl.css +3 -0
- package/build-style/html/editor.css +3 -0
- package/build-style/image/editor-rtl.css +11 -0
- package/build-style/image/editor.css +11 -0
- package/build-style/image/style-rtl.css +3 -0
- package/build-style/image/style.css +3 -0
- package/build-style/image/theme-rtl.css +3 -0
- package/build-style/image/theme.css +3 -0
- package/build-style/latest-comments/style-rtl.css +3 -0
- package/build-style/latest-comments/style.css +3 -0
- package/build-style/latest-posts/editor-rtl.css +3 -3
- package/build-style/latest-posts/editor.css +3 -3
- package/build-style/latest-posts/style-rtl.css +3 -0
- package/build-style/latest-posts/style.css +3 -0
- package/build-style/list/style-rtl.css +3 -0
- package/build-style/list/style.css +3 -0
- package/build-style/loginout/style-rtl.css +94 -0
- package/build-style/loginout/style.css +94 -0
- package/build-style/media-text/editor-rtl.css +3 -0
- package/build-style/media-text/editor.css +3 -0
- package/build-style/media-text/style-rtl.css +3 -0
- package/build-style/media-text/style.css +3 -0
- package/build-style/more/editor-rtl.css +3 -0
- package/build-style/more/editor.css +3 -0
- package/build-style/navigation/editor-rtl.css +3 -12
- package/build-style/navigation/editor.css +3 -12
- package/build-style/navigation/style-rtl.css +3 -0
- package/build-style/navigation/style.css +3 -0
- package/build-style/navigation-link/editor-rtl.css +3 -0
- package/build-style/navigation-link/editor.css +3 -0
- package/build-style/navigation-link/style-rtl.css +3 -0
- package/build-style/navigation-link/style.css +3 -0
- package/build-style/navigation-submenu/editor-rtl.css +3 -0
- package/build-style/navigation-submenu/editor.css +3 -0
- package/build-style/nextpage/editor-rtl.css +3 -0
- package/build-style/nextpage/editor.css +3 -0
- package/build-style/page-list/editor-rtl.css +3 -0
- package/build-style/page-list/editor.css +3 -0
- package/build-style/page-list/style-rtl.css +3 -0
- package/build-style/page-list/style.css +3 -0
- package/build-style/paragraph/editor-rtl.css +3 -0
- package/build-style/paragraph/editor.css +3 -0
- package/build-style/paragraph/style-rtl.css +3 -0
- package/build-style/paragraph/style.css +3 -0
- package/build-style/post-author/style-rtl.css +3 -0
- package/build-style/post-author/style.css +3 -0
- 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-comments-form/style-rtl.css +3 -0
- package/build-style/post-comments-form/style.css +3 -0
- package/build-style/post-content/editor-rtl.css +3 -0
- package/build-style/post-content/editor.css +3 -0
- package/build-style/post-content/style-rtl.css +96 -0
- package/build-style/post-content/style.css +96 -0
- package/build-style/post-date/style-rtl.css +3 -0
- package/build-style/post-date/style.css +3 -0
- package/build-style/post-excerpt/editor-rtl.css +3 -0
- package/build-style/post-excerpt/editor.css +3 -0
- package/build-style/post-excerpt/style-rtl.css +4 -0
- package/build-style/post-excerpt/style.css +4 -0
- package/build-style/post-featured-image/editor-rtl.css +3 -0
- package/build-style/post-featured-image/editor.css +3 -0
- package/build-style/post-featured-image/style-rtl.css +3 -0
- package/build-style/post-featured-image/style.css +3 -0
- package/build-style/post-navigation-link/style-rtl.css +3 -0
- package/build-style/post-navigation-link/style.css +3 -0
- package/build-style/post-template/editor-rtl.css +3 -0
- package/build-style/post-template/editor.css +3 -0
- package/build-style/post-template/style-rtl.css +3 -0
- package/build-style/post-template/style.css +3 -0
- package/build-style/post-terms/style-rtl.css +3 -0
- package/build-style/post-terms/style.css +3 -0
- package/build-style/post-time-to-read/style-rtl.css +3 -0
- package/build-style/post-time-to-read/style.css +3 -0
- package/build-style/post-title/style-rtl.css +3 -0
- package/build-style/post-title/style.css +3 -0
- package/build-style/preformatted/style-rtl.css +3 -0
- package/build-style/preformatted/style.css +3 -0
- package/build-style/pullquote/editor-rtl.css +3 -0
- package/build-style/pullquote/editor.css +3 -0
- package/build-style/pullquote/style-rtl.css +3 -0
- package/build-style/pullquote/style.css +3 -0
- package/build-style/pullquote/theme-rtl.css +3 -0
- package/build-style/pullquote/theme.css +3 -0
- package/build-style/query/editor-rtl.css +3 -0
- package/build-style/query/editor.css +3 -0
- package/build-style/query-pagination/editor-rtl.css +3 -0
- package/build-style/query-pagination/editor.css +3 -0
- package/build-style/query-pagination/style-rtl.css +3 -0
- package/build-style/query-pagination/style.css +3 -0
- package/build-style/query-pagination-numbers/editor-rtl.css +3 -0
- package/build-style/query-pagination-numbers/editor.css +3 -0
- package/build-style/query-title/style-rtl.css +3 -0
- package/build-style/query-title/style.css +3 -0
- package/build-style/quote/style-rtl.css +3 -0
- package/build-style/quote/style.css +3 -0
- package/build-style/quote/theme-rtl.css +6 -3
- package/build-style/quote/theme.css +6 -3
- package/build-style/read-more/style-rtl.css +3 -0
- package/build-style/read-more/style.css +3 -0
- package/build-style/reset-rtl.css +3 -0
- package/build-style/reset.css +3 -0
- package/build-style/rss/editor-rtl.css +3 -0
- package/build-style/rss/editor.css +3 -0
- package/build-style/rss/style-rtl.css +3 -0
- package/build-style/rss/style.css +3 -0
- package/build-style/search/editor-rtl.css +3 -0
- package/build-style/search/editor.css +3 -0
- package/build-style/search/style-rtl.css +3 -0
- package/build-style/search/style.css +3 -0
- package/build-style/search/theme-rtl.css +3 -0
- package/build-style/search/theme.css +3 -0
- package/build-style/separator/editor-rtl.css +3 -0
- package/build-style/separator/editor.css +3 -0
- package/build-style/separator/style-rtl.css +3 -0
- package/build-style/separator/style.css +3 -0
- package/build-style/separator/theme-rtl.css +3 -0
- package/build-style/separator/theme.css +3 -0
- package/build-style/shortcode/editor-rtl.css +3 -0
- package/build-style/shortcode/editor.css +3 -0
- package/build-style/site-logo/editor-rtl.css +3 -0
- package/build-style/site-logo/editor.css +3 -0
- package/build-style/site-logo/style-rtl.css +3 -0
- package/build-style/site-logo/style.css +3 -0
- package/build-style/site-tagline/editor-rtl.css +3 -0
- package/build-style/site-tagline/editor.css +3 -0
- package/build-style/site-tagline/style-rtl.css +94 -0
- package/build-style/site-tagline/style.css +94 -0
- package/build-style/site-title/editor-rtl.css +3 -0
- package/build-style/site-title/editor.css +3 -0
- package/build-style/site-title/style-rtl.css +7 -1
- package/build-style/site-title/style.css +7 -1
- package/build-style/social-link/editor-rtl.css +3 -0
- package/build-style/social-link/editor.css +3 -0
- package/build-style/social-links/editor-rtl.css +3 -0
- package/build-style/social-links/editor.css +3 -0
- package/build-style/social-links/style-rtl.css +3 -0
- package/build-style/social-links/style.css +3 -0
- package/build-style/spacer/editor-rtl.css +3 -0
- package/build-style/spacer/editor.css +3 -0
- package/build-style/spacer/style-rtl.css +3 -0
- package/build-style/spacer/style.css +3 -0
- package/build-style/style-rtl.css +27 -1
- package/build-style/style.css +27 -1
- package/build-style/table/editor-rtl.css +3 -0
- package/build-style/table/editor.css +3 -0
- package/build-style/table/style-rtl.css +3 -0
- package/build-style/table/style.css +3 -0
- package/build-style/table/theme-rtl.css +3 -0
- package/build-style/table/theme.css +3 -0
- package/build-style/table-of-contents/style-rtl.css +94 -0
- package/build-style/table-of-contents/style.css +94 -0
- package/build-style/tag-cloud/editor-rtl.css +95 -0
- package/build-style/tag-cloud/editor.css +95 -0
- package/build-style/tag-cloud/style-rtl.css +3 -0
- package/build-style/tag-cloud/style.css +3 -0
- package/build-style/template-part/editor-rtl.css +3 -0
- package/build-style/template-part/editor.css +3 -0
- package/build-style/template-part/theme-rtl.css +3 -0
- package/build-style/template-part/theme.css +3 -0
- package/build-style/term-description/style-rtl.css +3 -0
- package/build-style/term-description/style.css +3 -0
- package/build-style/text-columns/editor-rtl.css +3 -0
- package/build-style/text-columns/editor.css +3 -0
- package/build-style/text-columns/style-rtl.css +3 -0
- package/build-style/text-columns/style.css +3 -0
- package/build-style/theme-rtl.css +6 -3
- package/build-style/theme.css +6 -3
- package/build-style/verse/style-rtl.css +3 -0
- package/build-style/verse/style.css +3 -0
- package/build-style/video/editor-rtl.css +3 -3
- package/build-style/video/editor.css +3 -3
- package/build-style/video/style-rtl.css +3 -0
- package/build-style/video/style.css +3 -0
- package/build-style/video/theme-rtl.css +3 -0
- package/build-style/video/theme.css +3 -0
- package/package.json +35 -35
- package/src/avatar/edit.js +1 -0
- package/src/button/index.php +1 -14
- package/src/categories/block.json +12 -0
- package/src/column/block.json +2 -0
- package/src/column/edit.js +2 -2
- package/src/comment-template/block.json +12 -0
- package/src/comments-title/block.json +3 -0
- package/src/comments-title/edit.js +8 -1
- package/src/details/edit.js +1 -0
- package/src/editor.scss +1 -0
- package/src/form/edit.js +3 -2
- package/src/form-input/edit.js +1 -0
- package/src/form-input/style.scss +1 -0
- package/src/gallery/edit.js +75 -13
- package/src/gallery/editor.scss +0 -1
- package/src/gallery/gap-styles.js +1 -8
- package/src/gallery/test/__snapshots__/index.native.js.snap +1 -1
- package/src/gallery/test/index.native.js +5 -5
- package/src/gallery/use-image-sizes.js +2 -2
- package/src/group/editor.scss +1 -1
- package/src/group/index.js +26 -29
- package/src/group/variations.js +56 -0
- package/src/heading/block.json +3 -0
- package/src/heading/edit.js +3 -1
- package/src/image/editor.scss +12 -0
- package/src/image/view.js +1 -1
- package/src/latest-posts/edit.js +1 -0
- package/src/latest-posts/editor.scss +0 -4
- package/src/list/block.json +1 -1
- package/src/list/ordered-list-settings.js +20 -18
- package/src/list/test/edit.native.js +1 -3
- package/src/list-item/block.json +3 -2
- package/src/loginout/block.json +14 -1
- package/src/loginout/style.scss +4 -0
- package/src/media-text/style.native.scss +2 -0
- package/src/navigation/edit/index.js +5 -5
- package/src/navigation/editor.scss +0 -1
- package/src/post-comments-form/block.json +12 -0
- package/src/post-content/block.json +1 -0
- package/src/post-content/style.scss +5 -0
- package/src/post-date/block.json +12 -0
- package/src/post-excerpt/block.json +12 -0
- package/src/post-excerpt/style.scss +3 -0
- package/src/post-navigation-link/edit.js +2 -0
- package/src/post-terms/block.json +12 -0
- package/src/post-time-to-read/block.json +6 -0
- package/src/post-title/block.json +15 -0
- package/src/post-title/edit.js +4 -3
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
- package/src/query/edit/inspector-controls/index.js +85 -12
- package/src/query/edit/inspector-controls/offset-controls.js +31 -0
- package/src/query/edit/inspector-controls/pages-control.js +27 -0
- package/src/query/edit/inspector-controls/per-page-control.js +33 -0
- package/src/query/edit/inspector-controls/sticky-control.js +1 -1
- package/src/query/edit/query-toolbar.js +1 -90
- package/src/query/utils.js +9 -5
- package/src/query-title/block.json +3 -0
- package/src/query-title/edit.js +9 -1
- package/src/quote/theme.scss +5 -3
- package/src/site-logo/edit.js +23 -9
- package/src/site-tagline/block.json +12 -1
- package/src/site-tagline/edit.js +2 -4
- package/src/site-tagline/style.scss +4 -0
- package/src/site-title/block.json +10 -0
- package/src/site-title/edit.js +2 -4
- package/src/site-title/style.scss +7 -2
- package/src/social-link/edit.js +0 -1
- package/src/spacer/controls.js +10 -13
- package/src/style.scss +4 -0
- package/src/table-of-contents/block.json +14 -1
- package/src/table-of-contents/style.scss +4 -0
- package/src/tag-cloud/block.json +1 -1
- package/src/tag-cloud/edit.js +46 -34
- package/src/tag-cloud/editor.scss +9 -0
- package/src/template-part/edit/index.js +10 -7
- package/src/template-part/edit/inner-blocks.js +6 -4
- package/src/video/editor.scss +0 -4
package/src/loginout/block.json
CHANGED
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"supports": {
|
|
24
24
|
"className": true,
|
|
25
|
+
"color": {
|
|
26
|
+
"background": true,
|
|
27
|
+
"text": false,
|
|
28
|
+
"gradients": true,
|
|
29
|
+
"link": true
|
|
30
|
+
},
|
|
25
31
|
"spacing": {
|
|
26
32
|
"margin": true,
|
|
27
33
|
"padding": true,
|
|
@@ -43,8 +49,15 @@
|
|
|
43
49
|
"fontSize": true
|
|
44
50
|
}
|
|
45
51
|
},
|
|
52
|
+
"__experimentalBorder": {
|
|
53
|
+
"radius": true,
|
|
54
|
+
"color": true,
|
|
55
|
+
"width": true,
|
|
56
|
+
"style": true
|
|
57
|
+
},
|
|
46
58
|
"interactivity": {
|
|
47
59
|
"clientNavigation": true
|
|
48
60
|
}
|
|
49
|
-
}
|
|
61
|
+
},
|
|
62
|
+
"style": "wp-block-loginout"
|
|
50
63
|
}
|
|
@@ -7,6 +7,7 @@ $media-to-text: 12px;
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.has-media-on-the-right {
|
|
10
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list -- This should be refactored to not use the row-reverse value. */
|
|
10
11
|
flex-direction: row-reverse;
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -14,6 +15,7 @@ $media-to-text: 12px;
|
|
|
14
15
|
flex-direction: column;
|
|
15
16
|
|
|
16
17
|
&.has-media-on-the-right {
|
|
18
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list -- This should be refactored to not use the column-reverse value. */
|
|
17
19
|
flex-direction: column-reverse;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -721,7 +721,7 @@ function Navigation( {
|
|
|
721
721
|
);
|
|
722
722
|
|
|
723
723
|
const accessibleDescriptionId = `${ clientId }-desc`;
|
|
724
|
-
|
|
724
|
+
const isHiddenByDefault = 'always' === overlayMenu;
|
|
725
725
|
const isManageMenusButtonDisabled =
|
|
726
726
|
! hasManagePermissions || ! hasResolvedNavigationMenus;
|
|
727
727
|
|
|
@@ -760,7 +760,7 @@ function Navigation( {
|
|
|
760
760
|
hasIcon={ hasIcon }
|
|
761
761
|
icon={ icon }
|
|
762
762
|
isResponsive={ isResponsive }
|
|
763
|
-
isHiddenByDefault={
|
|
763
|
+
isHiddenByDefault={ isHiddenByDefault }
|
|
764
764
|
overlayBackgroundColor={ overlayBackgroundColor }
|
|
765
765
|
overlayTextColor={ overlayTextColor }
|
|
766
766
|
>
|
|
@@ -899,13 +899,13 @@ function Navigation( {
|
|
|
899
899
|
: undefined
|
|
900
900
|
}
|
|
901
901
|
>
|
|
902
|
-
{ isLoading && (
|
|
902
|
+
{ isLoading && ! isHiddenByDefault && (
|
|
903
903
|
<div className="wp-block-navigation__loading-indicator-container">
|
|
904
904
|
<Spinner className="wp-block-navigation__loading-indicator" />
|
|
905
905
|
</div>
|
|
906
906
|
) }
|
|
907
907
|
|
|
908
|
-
{ ! isLoading && (
|
|
908
|
+
{ ( ! isLoading || isHiddenByDefault ) && (
|
|
909
909
|
<>
|
|
910
910
|
<AccessibleMenuDescription
|
|
911
911
|
id={ accessibleDescriptionId }
|
|
@@ -917,7 +917,7 @@ function Navigation( {
|
|
|
917
917
|
icon={ icon }
|
|
918
918
|
isOpen={ isResponsiveMenuOpen }
|
|
919
919
|
isResponsive={ isResponsive }
|
|
920
|
-
isHiddenByDefault={
|
|
920
|
+
isHiddenByDefault={ isHiddenByDefault }
|
|
921
921
|
overlayBackgroundColor={
|
|
922
922
|
overlayBackgroundColor
|
|
923
923
|
}
|
|
@@ -37,6 +37,18 @@
|
|
|
37
37
|
"__experimentalDefaultControls": {
|
|
38
38
|
"fontSize": true
|
|
39
39
|
}
|
|
40
|
+
},
|
|
41
|
+
"__experimentalBorder": {
|
|
42
|
+
"radius": true,
|
|
43
|
+
"color": true,
|
|
44
|
+
"width": true,
|
|
45
|
+
"style": true,
|
|
46
|
+
"__experimentalDefaultControls": {
|
|
47
|
+
"radius": true,
|
|
48
|
+
"color": true,
|
|
49
|
+
"width": true,
|
|
50
|
+
"style": true
|
|
51
|
+
}
|
|
40
52
|
}
|
|
41
53
|
},
|
|
42
54
|
"editorStyle": "wp-block-post-comments-form-editor",
|
package/src/post-date/block.json
CHANGED
|
@@ -56,6 +56,18 @@
|
|
|
56
56
|
},
|
|
57
57
|
"interactivity": {
|
|
58
58
|
"clientNavigation": true
|
|
59
|
+
},
|
|
60
|
+
"__experimentalBorder": {
|
|
61
|
+
"radius": true,
|
|
62
|
+
"color": true,
|
|
63
|
+
"width": true,
|
|
64
|
+
"style": true,
|
|
65
|
+
"__experimentalDefaultControls": {
|
|
66
|
+
"radius": true,
|
|
67
|
+
"color": true,
|
|
68
|
+
"width": true,
|
|
69
|
+
"style": true
|
|
70
|
+
}
|
|
59
71
|
}
|
|
60
72
|
}
|
|
61
73
|
}
|
|
@@ -56,6 +56,18 @@
|
|
|
56
56
|
},
|
|
57
57
|
"interactivity": {
|
|
58
58
|
"clientNavigation": true
|
|
59
|
+
},
|
|
60
|
+
"__experimentalBorder": {
|
|
61
|
+
"radius": true,
|
|
62
|
+
"color": true,
|
|
63
|
+
"width": true,
|
|
64
|
+
"style": true,
|
|
65
|
+
"__experimentalDefaultControls": {
|
|
66
|
+
"radius": true,
|
|
67
|
+
"color": true,
|
|
68
|
+
"width": true,
|
|
69
|
+
"style": true
|
|
70
|
+
}
|
|
59
71
|
}
|
|
60
72
|
},
|
|
61
73
|
"editorStyle": "wp-block-post-excerpt-editor",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Lowest specificity on wrapper margins to avoid overriding layout styles.
|
|
2
2
|
:where(.wp-block-post-excerpt) {
|
|
3
|
+
// This block has customizable padding, border-box makes that more predictable.
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
|
|
3
6
|
margin-top: var(--wp--style--block-gap);
|
|
4
7
|
margin-bottom: var(--wp--style--block-gap);
|
|
5
8
|
}
|
|
@@ -157,6 +157,8 @@ export default function PostNavigationLinkEdit( {
|
|
|
157
157
|
</InspectorControls>
|
|
158
158
|
<InspectorControls group="advanced">
|
|
159
159
|
<SelectControl
|
|
160
|
+
__next40pxDefaultSize
|
|
161
|
+
__nextHasNoMarginBottom
|
|
160
162
|
label={ __( 'Filter by taxonomy' ) }
|
|
161
163
|
value={ taxonomy }
|
|
162
164
|
options={ getTaxonomyOptions() }
|
|
@@ -60,6 +60,18 @@
|
|
|
60
60
|
},
|
|
61
61
|
"interactivity": {
|
|
62
62
|
"clientNavigation": true
|
|
63
|
+
},
|
|
64
|
+
"__experimentalBorder": {
|
|
65
|
+
"radius": true,
|
|
66
|
+
"color": true,
|
|
67
|
+
"width": true,
|
|
68
|
+
"style": true,
|
|
69
|
+
"__experimentalDefaultControls": {
|
|
70
|
+
"radius": true,
|
|
71
|
+
"color": true,
|
|
72
|
+
"width": true,
|
|
73
|
+
"style": true
|
|
74
|
+
}
|
|
63
75
|
}
|
|
64
76
|
},
|
|
65
77
|
"style": "wp-block-post-terms"
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"type": "number",
|
|
16
16
|
"default": 2
|
|
17
17
|
},
|
|
18
|
+
"levelOptions": {
|
|
19
|
+
"type": "array"
|
|
20
|
+
},
|
|
18
21
|
"isLink": {
|
|
19
22
|
"type": "boolean",
|
|
20
23
|
"default": false
|
|
@@ -63,6 +66,18 @@
|
|
|
63
66
|
},
|
|
64
67
|
"interactivity": {
|
|
65
68
|
"clientNavigation": true
|
|
69
|
+
},
|
|
70
|
+
"__experimentalBorder": {
|
|
71
|
+
"radius": true,
|
|
72
|
+
"color": true,
|
|
73
|
+
"width": true,
|
|
74
|
+
"style": true,
|
|
75
|
+
"__experimentalDefaultControls": {
|
|
76
|
+
"radius": true,
|
|
77
|
+
"color": true,
|
|
78
|
+
"width": true,
|
|
79
|
+
"style": true
|
|
80
|
+
}
|
|
66
81
|
}
|
|
67
82
|
},
|
|
68
83
|
"style": "wp-block-post-title"
|
package/src/post-title/edit.js
CHANGED
|
@@ -22,7 +22,7 @@ import { useEntityProp, store as coreStore } from '@wordpress/core-data';
|
|
|
22
22
|
import { useSelect } from '@wordpress/data';
|
|
23
23
|
|
|
24
24
|
export default function PostTitleEdit( {
|
|
25
|
-
attributes: { level, textAlign, isLink, rel, linkTarget },
|
|
25
|
+
attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
|
|
26
26
|
setAttributes,
|
|
27
27
|
context: { postType, postId, queryId },
|
|
28
28
|
insertBlocksAfter,
|
|
@@ -73,7 +73,7 @@ export default function PostTitleEdit( {
|
|
|
73
73
|
titleElement = userCanEdit ? (
|
|
74
74
|
<PlainText
|
|
75
75
|
tagName={ TagName }
|
|
76
|
-
placeholder={ __( 'No
|
|
76
|
+
placeholder={ __( 'No title' ) }
|
|
77
77
|
value={ rawTitle }
|
|
78
78
|
onChange={ setTitle }
|
|
79
79
|
__experimentalVersion={ 2 }
|
|
@@ -96,7 +96,7 @@ export default function PostTitleEdit( {
|
|
|
96
96
|
href={ link }
|
|
97
97
|
target={ linkTarget }
|
|
98
98
|
rel={ rel }
|
|
99
|
-
placeholder={ ! rawTitle.length ? __( 'No
|
|
99
|
+
placeholder={ ! rawTitle.length ? __( 'No title' ) : null }
|
|
100
100
|
value={ rawTitle }
|
|
101
101
|
onChange={ setTitle }
|
|
102
102
|
__experimentalVersion={ 2 }
|
|
@@ -125,6 +125,7 @@ export default function PostTitleEdit( {
|
|
|
125
125
|
<BlockControls group="block">
|
|
126
126
|
<HeadingLevelDropdown
|
|
127
127
|
value={ level }
|
|
128
|
+
options={ levelOptions }
|
|
128
129
|
onChange={ ( newLevel ) =>
|
|
129
130
|
setAttributes( { level: newLevel } )
|
|
130
131
|
}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
TextControl,
|
|
7
7
|
SelectControl,
|
|
8
8
|
RangeControl,
|
|
9
|
-
ToggleControl,
|
|
10
9
|
__experimentalToggleGroupControl as ToggleGroupControl,
|
|
11
10
|
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
|
12
11
|
Notice,
|
|
@@ -28,6 +27,9 @@ import { TaxonomyControls } from './taxonomy-controls';
|
|
|
28
27
|
import StickyControl from './sticky-control';
|
|
29
28
|
import EnhancedPaginationControl from './enhanced-pagination-control';
|
|
30
29
|
import CreateNewPostLink from './create-new-post-link';
|
|
30
|
+
import PerPageControl from './per-page-control';
|
|
31
|
+
import OffsetControl from './offset-controls';
|
|
32
|
+
import PagesControl from './pages-control';
|
|
31
33
|
import { unlock } from '../../../lock-unlock';
|
|
32
34
|
import {
|
|
33
35
|
usePostTypes,
|
|
@@ -48,7 +50,10 @@ export default function QueryInspectorControls( props ) {
|
|
|
48
50
|
order,
|
|
49
51
|
orderBy,
|
|
50
52
|
author: authorIds,
|
|
53
|
+
pages,
|
|
51
54
|
postType,
|
|
55
|
+
perPage,
|
|
56
|
+
offset,
|
|
52
57
|
sticky,
|
|
53
58
|
inherit,
|
|
54
59
|
taxQuery,
|
|
@@ -103,9 +108,9 @@ export default function QueryInspectorControls( props ) {
|
|
|
103
108
|
const showInheritControl = isControlAllowed( allowedControls, 'inherit' );
|
|
104
109
|
const showPostTypeControl =
|
|
105
110
|
! inherit && isControlAllowed( allowedControls, 'postType' );
|
|
106
|
-
const postTypeControlLabel = __( '
|
|
111
|
+
const postTypeControlLabel = __( 'Post type' );
|
|
107
112
|
const postTypeControlHelp = __(
|
|
108
|
-
'
|
|
113
|
+
'Select the type of content to display: posts, pages, or custom post types.'
|
|
109
114
|
);
|
|
110
115
|
const showColumnsControl = false;
|
|
111
116
|
const showOrderControl =
|
|
@@ -136,6 +141,16 @@ export default function QueryInspectorControls( props ) {
|
|
|
136
141
|
showParentControl;
|
|
137
142
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
138
143
|
|
|
144
|
+
const showPostCountControl = isControlAllowed(
|
|
145
|
+
allowedControls,
|
|
146
|
+
'postCount'
|
|
147
|
+
);
|
|
148
|
+
const showOffSetControl = isControlAllowed( allowedControls, 'offset' );
|
|
149
|
+
const showPagesControl = isControlAllowed( allowedControls, 'pages' );
|
|
150
|
+
|
|
151
|
+
const showDisplayPanel =
|
|
152
|
+
showPostCountControl || showOffSetControl || showPagesControl;
|
|
153
|
+
|
|
139
154
|
return (
|
|
140
155
|
<>
|
|
141
156
|
{ !! postType && (
|
|
@@ -146,17 +161,34 @@ export default function QueryInspectorControls( props ) {
|
|
|
146
161
|
{ showSettingsPanel && (
|
|
147
162
|
<PanelBody title={ __( 'Settings' ) }>
|
|
148
163
|
{ showInheritControl && (
|
|
149
|
-
<
|
|
164
|
+
<ToggleGroupControl
|
|
165
|
+
__next40pxDefaultSize
|
|
150
166
|
__nextHasNoMarginBottom
|
|
151
|
-
label={ __( '
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
167
|
+
label={ __( 'Query type' ) }
|
|
168
|
+
isBlock
|
|
169
|
+
onChange={ ( value ) => {
|
|
170
|
+
setQuery( { inherit: !! value } );
|
|
171
|
+
} }
|
|
172
|
+
help={
|
|
173
|
+
inherit
|
|
174
|
+
? __(
|
|
175
|
+
'Display a list of posts or custom post types based on the current template.'
|
|
176
|
+
)
|
|
177
|
+
: __(
|
|
178
|
+
'Display a list of posts or custom post types based on specific criteria.'
|
|
179
|
+
)
|
|
158
180
|
}
|
|
159
|
-
|
|
181
|
+
value={ !! inherit }
|
|
182
|
+
>
|
|
183
|
+
<ToggleGroupControlOption
|
|
184
|
+
value
|
|
185
|
+
label={ __( 'Default' ) }
|
|
186
|
+
/>
|
|
187
|
+
<ToggleGroupControlOption
|
|
188
|
+
value={ false }
|
|
189
|
+
label={ __( 'Custom' ) }
|
|
190
|
+
/>
|
|
191
|
+
</ToggleGroupControl>
|
|
160
192
|
) }
|
|
161
193
|
{ showPostTypeControl &&
|
|
162
194
|
( postTypesSelectOptions.length > 2 ? (
|
|
@@ -237,6 +269,47 @@ export default function QueryInspectorControls( props ) {
|
|
|
237
269
|
/>
|
|
238
270
|
</PanelBody>
|
|
239
271
|
) }
|
|
272
|
+
{ ! inherit && showDisplayPanel && (
|
|
273
|
+
<ToolsPanel
|
|
274
|
+
className="block-library-query-toolspanel__display"
|
|
275
|
+
label={ __( 'Display' ) }
|
|
276
|
+
resetAll={ () => {
|
|
277
|
+
setQuery( {
|
|
278
|
+
offset: 0,
|
|
279
|
+
pages: 0,
|
|
280
|
+
} );
|
|
281
|
+
} }
|
|
282
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
283
|
+
>
|
|
284
|
+
<ToolsPanelItem
|
|
285
|
+
label={ __( 'Items' ) }
|
|
286
|
+
hasValue={ () => perPage > 0 }
|
|
287
|
+
>
|
|
288
|
+
<PerPageControl
|
|
289
|
+
perPage={ perPage }
|
|
290
|
+
offset={ offset }
|
|
291
|
+
onChange={ setQuery }
|
|
292
|
+
/>
|
|
293
|
+
</ToolsPanelItem>
|
|
294
|
+
<ToolsPanelItem
|
|
295
|
+
label={ __( 'Offset' ) }
|
|
296
|
+
hasValue={ () => offset > 0 }
|
|
297
|
+
onDeselect={ () => setQuery( { offset: 0 } ) }
|
|
298
|
+
>
|
|
299
|
+
<OffsetControl
|
|
300
|
+
offset={ offset }
|
|
301
|
+
onChange={ setQuery }
|
|
302
|
+
/>
|
|
303
|
+
</ToolsPanelItem>
|
|
304
|
+
<ToolsPanelItem
|
|
305
|
+
label={ __( 'Max Pages to Show' ) }
|
|
306
|
+
hasValue={ () => pages > 0 }
|
|
307
|
+
onDeselect={ () => setQuery( { pages: 0 } ) }
|
|
308
|
+
>
|
|
309
|
+
<PagesControl pages={ pages } onChange={ setQuery } />
|
|
310
|
+
</ToolsPanelItem>
|
|
311
|
+
</ToolsPanel>
|
|
312
|
+
) }
|
|
240
313
|
{ ! inherit && showFiltersPanel && (
|
|
241
314
|
<ToolsPanel
|
|
242
315
|
className="block-library-query-toolspanel__filters" // unused but kept for backward compatibility
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __experimentalNumberControl as NumberControl } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
7
|
+
const MIN_OFFSET = 0;
|
|
8
|
+
const MAX_OFFSET = 100;
|
|
9
|
+
|
|
10
|
+
export const OffsetControl = ( { offset = 0, onChange } ) => {
|
|
11
|
+
return (
|
|
12
|
+
<NumberControl
|
|
13
|
+
__next40pxDefaultSize
|
|
14
|
+
label={ __( 'Offset' ) }
|
|
15
|
+
value={ offset }
|
|
16
|
+
min={ MIN_OFFSET }
|
|
17
|
+
onChange={ ( newOffset ) => {
|
|
18
|
+
if (
|
|
19
|
+
isNaN( newOffset ) ||
|
|
20
|
+
newOffset < MIN_OFFSET ||
|
|
21
|
+
newOffset > MAX_OFFSET
|
|
22
|
+
) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
onChange( { offset: newOffset } );
|
|
26
|
+
} }
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default OffsetControl;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __experimentalNumberControl as NumberControl } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
7
|
+
export const PagesControl = ( { pages, onChange } ) => {
|
|
8
|
+
return (
|
|
9
|
+
<NumberControl
|
|
10
|
+
__next40pxDefaultSize
|
|
11
|
+
label={ __( 'Max pages' ) }
|
|
12
|
+
value={ pages }
|
|
13
|
+
min={ 0 }
|
|
14
|
+
onChange={ ( newPages ) => {
|
|
15
|
+
if ( isNaN( newPages ) || newPages < 0 ) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
onChange( { pages: newPages } );
|
|
19
|
+
} }
|
|
20
|
+
help={ __(
|
|
21
|
+
'Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).'
|
|
22
|
+
) }
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default PagesControl;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { RangeControl } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
7
|
+
const MIN_POSTS_PER_PAGE = 1;
|
|
8
|
+
const MAX_POSTS_PER_PAGE = 100;
|
|
9
|
+
|
|
10
|
+
const PerPageControl = ( { perPage, offset = 0, onChange } ) => {
|
|
11
|
+
return (
|
|
12
|
+
<RangeControl
|
|
13
|
+
__next40pxDefaultSize
|
|
14
|
+
__nextHasNoMarginBottom
|
|
15
|
+
label={ __( 'Posts per page' ) }
|
|
16
|
+
min={ MIN_POSTS_PER_PAGE }
|
|
17
|
+
max={ MAX_POSTS_PER_PAGE }
|
|
18
|
+
onChange={ ( newPerPage ) => {
|
|
19
|
+
if (
|
|
20
|
+
isNaN( newPerPage ) ||
|
|
21
|
+
newPerPage < MIN_POSTS_PER_PAGE ||
|
|
22
|
+
newPerPage > MAX_POSTS_PER_PAGE
|
|
23
|
+
) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
onChange( { perPage: newPerPage, offset } );
|
|
27
|
+
} }
|
|
28
|
+
value={ parseInt( perPage, 10 ) }
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default PerPageControl;
|
|
@@ -20,7 +20,7 @@ export default function StickyControl( { value, onChange } ) {
|
|
|
20
20
|
value={ value }
|
|
21
21
|
onChange={ onChange }
|
|
22
22
|
help={ __(
|
|
23
|
-
'
|
|
23
|
+
'Sticky posts always appear first, regardless of their publish date.'
|
|
24
24
|
) }
|
|
25
25
|
/>
|
|
26
26
|
);
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
ToolbarGroup,
|
|
6
|
-
Dropdown,
|
|
7
|
-
ToolbarButton,
|
|
8
|
-
__experimentalNumberControl as NumberControl,
|
|
9
|
-
} from '@wordpress/components';
|
|
4
|
+
import { ToolbarGroup, ToolbarButton } from '@wordpress/components';
|
|
10
5
|
import { __ } from '@wordpress/i18n';
|
|
11
|
-
import { settings } from '@wordpress/icons';
|
|
12
6
|
|
|
13
7
|
/**
|
|
14
8
|
* Internal dependencies
|
|
@@ -16,8 +10,6 @@ import { settings } from '@wordpress/icons';
|
|
|
16
10
|
import { usePatterns } from '../utils';
|
|
17
11
|
|
|
18
12
|
export default function QueryToolbar( {
|
|
19
|
-
attributes: { query },
|
|
20
|
-
setQuery,
|
|
21
13
|
openPatternSelectionModal,
|
|
22
14
|
name,
|
|
23
15
|
clientId,
|
|
@@ -26,87 +18,6 @@ export default function QueryToolbar( {
|
|
|
26
18
|
|
|
27
19
|
return (
|
|
28
20
|
<>
|
|
29
|
-
{ ! query.inherit && (
|
|
30
|
-
<ToolbarGroup>
|
|
31
|
-
<Dropdown
|
|
32
|
-
contentClassName="block-library-query-toolbar__popover"
|
|
33
|
-
renderToggle={ ( { onToggle } ) => (
|
|
34
|
-
<ToolbarButton
|
|
35
|
-
icon={ settings }
|
|
36
|
-
label={ __( 'Display settings' ) }
|
|
37
|
-
onClick={ onToggle }
|
|
38
|
-
/>
|
|
39
|
-
) }
|
|
40
|
-
renderContent={ () => (
|
|
41
|
-
<>
|
|
42
|
-
<NumberControl
|
|
43
|
-
__unstableInputWidth="60px"
|
|
44
|
-
className="block-library-query-toolbar__popover-number-control"
|
|
45
|
-
label={ __( 'Items per Page' ) }
|
|
46
|
-
labelPosition="edge"
|
|
47
|
-
min={ 1 }
|
|
48
|
-
max={ 100 }
|
|
49
|
-
onChange={ ( value ) => {
|
|
50
|
-
if (
|
|
51
|
-
isNaN( value ) ||
|
|
52
|
-
value < 1 ||
|
|
53
|
-
value > 100
|
|
54
|
-
) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
setQuery( {
|
|
58
|
-
perPage: value,
|
|
59
|
-
} );
|
|
60
|
-
} }
|
|
61
|
-
step="1"
|
|
62
|
-
value={ query.perPage }
|
|
63
|
-
isDragEnabled={ false }
|
|
64
|
-
/>
|
|
65
|
-
<NumberControl
|
|
66
|
-
__unstableInputWidth="60px"
|
|
67
|
-
className="block-library-query-toolbar__popover-number-control"
|
|
68
|
-
label={ __( 'Offset' ) }
|
|
69
|
-
labelPosition="edge"
|
|
70
|
-
min={ 0 }
|
|
71
|
-
max={ 100 }
|
|
72
|
-
onChange={ ( value ) => {
|
|
73
|
-
if (
|
|
74
|
-
isNaN( value ) ||
|
|
75
|
-
value < 0 ||
|
|
76
|
-
value > 100
|
|
77
|
-
) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
setQuery( { offset: value } );
|
|
81
|
-
} }
|
|
82
|
-
step="1"
|
|
83
|
-
value={ query.offset }
|
|
84
|
-
isDragEnabled={ false }
|
|
85
|
-
/>
|
|
86
|
-
<NumberControl
|
|
87
|
-
__unstableInputWidth="60px"
|
|
88
|
-
className="block-library-query-toolbar__popover-number-control"
|
|
89
|
-
label={ __( 'Max pages to show' ) }
|
|
90
|
-
labelPosition="edge"
|
|
91
|
-
min={ 0 }
|
|
92
|
-
onChange={ ( value ) => {
|
|
93
|
-
if ( isNaN( value ) || value < 0 ) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
setQuery( { pages: value } );
|
|
97
|
-
} }
|
|
98
|
-
step="1"
|
|
99
|
-
value={ query.pages }
|
|
100
|
-
isDragEnabled={ false }
|
|
101
|
-
help={ __(
|
|
102
|
-
'Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).'
|
|
103
|
-
) }
|
|
104
|
-
/>
|
|
105
|
-
</>
|
|
106
|
-
) }
|
|
107
|
-
/>
|
|
108
|
-
</ToolbarGroup>
|
|
109
|
-
) }
|
|
110
21
|
{ hasPatterns && (
|
|
111
22
|
<ToolbarGroup className="wp-block-template-part__block-control-group">
|
|
112
23
|
<ToolbarButton onClick={ openPatternSelectionModal }>
|