@wordpress/block-library 9.22.0 → 9.24.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/calendar/index.js +1 -0
- package/build/calendar/index.js.map +1 -1
- package/build/code/index.js +2 -1
- package/build/code/index.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +13 -13
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments/edit/index.js +4 -2
- package/build/comments/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +9 -12
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/details/index.js +2 -1
- package/build/details/index.js.map +1 -1
- package/build/group/edit.js +17 -13
- package/build/group/edit.js.map +1 -1
- package/build/html/index.js +2 -1
- package/build/html/index.js.map +1 -1
- package/build/image/constants.js +2 -1
- package/build/image/constants.js.map +1 -1
- package/build/image/edit.js +1 -7
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +1 -4
- package/build/image/image.js.map +1 -1
- package/build/latest-posts/edit.js +100 -54
- package/build/latest-posts/edit.js.map +1 -1
- package/build/more/index.js +2 -1
- package/build/more/index.js.map +1 -1
- package/build/post-excerpt/edit.js +3 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +2 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +3 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +2 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-navigation-link/variations.js +13 -13
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-template/edit.js +5 -3
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +3 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +4 -2
- package/build/post-terms/index.js.map +1 -1
- package/build/preformatted/transforms.js +5 -1
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/query-content.js +11 -12
- package/build/query/edit/query-content.js.map +1 -1
- package/build/read-more/index.js +2 -1
- package/build/read-more/index.js.map +1 -1
- package/build/rss/index.js +2 -1
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +76 -86
- package/build/search/edit.js.map +1 -1
- package/build/separator/edit.js +13 -12
- package/build/separator/edit.js.map +1 -1
- package/build/table/edit.js +3 -2
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +8 -4
- package/build/table/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +14 -12
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +2 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build-module/calendar/index.js +1 -0
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/code/index.js +2 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +14 -14
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments/edit/index.js +4 -2
- package/build-module/comments/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +10 -13
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/details/index.js +2 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/group/edit.js +16 -14
- package/build-module/group/edit.js.map +1 -1
- package/build-module/html/index.js +2 -1
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/constants.js +1 -0
- package/build-module/image/constants.js.map +1 -1
- package/build-module/image/edit.js +2 -8
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +2 -5
- package/build-module/image/image.js.map +1 -1
- package/build-module/latest-posts/edit.js +100 -54
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/more/index.js +2 -1
- package/build-module/more/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +4 -2
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +2 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +4 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +2 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +13 -13
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-template/edit.js +5 -3
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +4 -2
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/preformatted/transforms.js +5 -1
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/edit/query-content.js +12 -13
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/read-more/index.js +2 -1
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/index.js +2 -1
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +78 -88
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/edit.js +15 -14
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/table/edit.js +4 -3
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +8 -4
- package/build-module/table/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +14 -12
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +2 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-style/archives/editor-rtl.css +47 -11
- package/build-style/archives/editor.css +47 -11
- package/build-style/archives/style-rtl.css +47 -11
- package/build-style/archives/style.css +47 -11
- package/build-style/audio/editor-rtl.css +47 -11
- package/build-style/audio/editor.css +47 -11
- package/build-style/audio/style-rtl.css +47 -11
- package/build-style/audio/style.css +47 -11
- package/build-style/audio/theme-rtl.css +47 -11
- package/build-style/audio/theme.css +47 -11
- package/build-style/avatar/editor-rtl.css +47 -11
- package/build-style/avatar/editor.css +47 -11
- package/build-style/avatar/style-rtl.css +47 -11
- package/build-style/avatar/style.css +47 -11
- package/build-style/button/editor-rtl.css +47 -11
- package/build-style/button/editor.css +47 -11
- package/build-style/button/style-rtl.css +47 -12
- package/build-style/button/style.css +47 -12
- package/build-style/buttons/editor-rtl.css +47 -11
- package/build-style/buttons/editor.css +47 -11
- package/build-style/buttons/style-rtl.css +50 -11
- package/build-style/buttons/style.css +50 -11
- package/build-style/calendar/style-rtl.css +47 -11
- package/build-style/calendar/style.css +47 -11
- package/build-style/categories/editor-rtl.css +47 -11
- package/build-style/categories/editor.css +47 -11
- package/build-style/categories/style-rtl.css +47 -11
- package/build-style/categories/style.css +47 -11
- package/build-style/classic-rtl.css +47 -11
- package/build-style/classic.css +47 -11
- package/build-style/code/editor-rtl.css +47 -11
- package/build-style/code/editor.css +47 -11
- package/build-style/code/style-rtl.css +47 -11
- package/build-style/code/style.css +47 -11
- package/build-style/code/theme-rtl.css +47 -11
- package/build-style/code/theme.css +47 -11
- package/build-style/columns/editor-rtl.css +47 -11
- package/build-style/columns/editor.css +47 -11
- package/build-style/columns/style-rtl.css +47 -11
- package/build-style/columns/style.css +47 -11
- package/build-style/comment-author-avatar/editor-rtl.css +47 -11
- package/build-style/comment-author-avatar/editor.css +47 -11
- package/build-style/comment-author-name/style-rtl.css +47 -11
- package/build-style/comment-author-name/style.css +47 -11
- package/build-style/comment-content/style-rtl.css +47 -11
- package/build-style/comment-content/style.css +47 -11
- package/build-style/comment-date/style-rtl.css +47 -11
- package/build-style/comment-date/style.css +47 -11
- package/build-style/comment-edit-link/style-rtl.css +47 -11
- package/build-style/comment-edit-link/style.css +47 -11
- package/build-style/comment-reply-link/style-rtl.css +47 -11
- package/build-style/comment-reply-link/style.css +47 -11
- package/build-style/comment-template/style-rtl.css +47 -11
- package/build-style/comment-template/style.css +47 -11
- package/build-style/comments/editor-rtl.css +47 -11
- package/build-style/comments/editor.css +47 -11
- package/build-style/comments/style-rtl.css +47 -11
- package/build-style/comments/style.css +47 -11
- package/build-style/comments-pagination/editor-rtl.css +47 -11
- package/build-style/comments-pagination/editor.css +47 -11
- package/build-style/comments-pagination/style-rtl.css +47 -11
- package/build-style/comments-pagination/style.css +47 -11
- package/build-style/comments-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/comments-pagination-numbers/editor.css +47 -11
- package/build-style/comments-title/editor-rtl.css +47 -11
- package/build-style/comments-title/editor.css +47 -11
- package/build-style/common-rtl.css +130 -9
- package/build-style/common.css +130 -9
- package/build-style/cover/editor-rtl.css +47 -11
- package/build-style/cover/editor.css +47 -11
- package/build-style/cover/style-rtl.css +47 -11
- package/build-style/cover/style.css +47 -11
- package/build-style/details/editor-rtl.css +47 -11
- package/build-style/details/editor.css +47 -11
- package/build-style/details/style-rtl.css +47 -11
- package/build-style/details/style.css +47 -11
- package/build-style/editor-elements-rtl.css +47 -11
- package/build-style/editor-elements.css +47 -11
- package/build-style/editor-rtl.css +48 -11
- package/build-style/editor.css +48 -11
- package/build-style/elements-rtl.css +47 -11
- package/build-style/elements.css +47 -11
- package/build-style/embed/editor-rtl.css +47 -11
- package/build-style/embed/editor.css +47 -11
- package/build-style/embed/style-rtl.css +47 -11
- package/build-style/embed/style.css +47 -11
- package/build-style/embed/theme-rtl.css +47 -11
- package/build-style/embed/theme.css +47 -11
- package/build-style/file/editor-rtl.css +47 -11
- package/build-style/file/editor.css +47 -11
- package/build-style/file/style-rtl.css +47 -11
- package/build-style/file/style.css +47 -11
- package/build-style/footnotes/style-rtl.css +47 -11
- package/build-style/footnotes/style.css +47 -11
- package/build-style/form-input/editor-rtl.css +47 -11
- package/build-style/form-input/editor.css +47 -11
- package/build-style/form-input/style-rtl.css +47 -11
- package/build-style/form-input/style.css +47 -11
- package/build-style/form-submission-notification/editor-rtl.css +47 -11
- package/build-style/form-submission-notification/editor.css +47 -11
- package/build-style/form-submit-button/style-rtl.css +47 -11
- package/build-style/form-submit-button/style.css +47 -11
- package/build-style/freeform/editor-rtl.css +47 -11
- package/build-style/freeform/editor.css +47 -11
- package/build-style/gallery/editor-rtl.css +47 -11
- package/build-style/gallery/editor.css +47 -11
- package/build-style/gallery/style-rtl.css +47 -11
- package/build-style/gallery/style.css +47 -11
- package/build-style/gallery/theme-rtl.css +47 -11
- package/build-style/gallery/theme.css +47 -11
- package/build-style/group/editor-rtl.css +47 -11
- package/build-style/group/editor.css +47 -11
- package/build-style/group/style-rtl.css +47 -11
- package/build-style/group/style.css +47 -11
- package/build-style/group/theme-rtl.css +47 -11
- package/build-style/group/theme.css +47 -11
- package/build-style/heading/style-rtl.css +47 -11
- package/build-style/heading/style.css +47 -11
- package/build-style/html/editor-rtl.css +48 -11
- package/build-style/html/editor.css +48 -11
- package/build-style/image/editor-rtl.css +47 -11
- package/build-style/image/editor.css +47 -11
- package/build-style/image/style-rtl.css +47 -11
- package/build-style/image/style.css +47 -11
- package/build-style/image/theme-rtl.css +47 -11
- package/build-style/image/theme.css +47 -11
- package/build-style/latest-comments/style-rtl.css +47 -11
- package/build-style/latest-comments/style.css +47 -11
- package/build-style/latest-posts/editor-rtl.css +47 -11
- package/build-style/latest-posts/editor.css +47 -11
- package/build-style/latest-posts/style-rtl.css +47 -11
- package/build-style/latest-posts/style.css +47 -11
- package/build-style/list/style-rtl.css +47 -11
- package/build-style/list/style.css +47 -11
- package/build-style/loginout/style-rtl.css +47 -11
- package/build-style/loginout/style.css +47 -11
- package/build-style/media-text/editor-rtl.css +47 -11
- package/build-style/media-text/editor.css +47 -11
- package/build-style/media-text/style-rtl.css +47 -11
- package/build-style/media-text/style.css +47 -11
- package/build-style/more/editor-rtl.css +47 -11
- package/build-style/more/editor.css +47 -11
- package/build-style/navigation/editor-rtl.css +47 -11
- package/build-style/navigation/editor.css +47 -11
- package/build-style/navigation/style-rtl.css +47 -11
- package/build-style/navigation/style.css +47 -11
- package/build-style/navigation-link/editor-rtl.css +47 -11
- package/build-style/navigation-link/editor.css +47 -11
- package/build-style/navigation-link/style-rtl.css +47 -11
- package/build-style/navigation-link/style.css +47 -11
- package/build-style/navigation-submenu/editor-rtl.css +47 -11
- package/build-style/navigation-submenu/editor.css +47 -11
- package/build-style/nextpage/editor-rtl.css +47 -11
- package/build-style/nextpage/editor.css +47 -11
- package/build-style/page-list/editor-rtl.css +47 -11
- package/build-style/page-list/editor.css +47 -11
- package/build-style/page-list/style-rtl.css +47 -11
- package/build-style/page-list/style.css +47 -11
- package/build-style/paragraph/editor-rtl.css +47 -11
- package/build-style/paragraph/editor.css +47 -11
- package/build-style/paragraph/style-rtl.css +47 -11
- package/build-style/paragraph/style.css +47 -11
- package/build-style/post-author/editor-rtl.css +47 -11
- package/build-style/post-author/editor.css +47 -11
- package/build-style/post-author/style-rtl.css +47 -11
- package/build-style/post-author/style.css +47 -11
- package/build-style/post-author-biography/style-rtl.css +47 -11
- package/build-style/post-author-biography/style.css +47 -11
- package/build-style/post-author-name/style-rtl.css +47 -11
- package/build-style/post-author-name/style.css +47 -11
- package/build-style/post-comments-count/style-rtl.css +47 -11
- package/build-style/post-comments-count/style.css +47 -11
- package/build-style/post-comments-form/editor-rtl.css +47 -11
- package/build-style/post-comments-form/editor.css +47 -11
- package/build-style/post-comments-form/style-rtl.css +47 -14
- package/build-style/post-comments-form/style.css +47 -14
- package/build-style/post-comments-link/style-rtl.css +47 -11
- package/build-style/post-comments-link/style.css +47 -11
- package/build-style/post-content/style-rtl.css +47 -11
- package/build-style/post-content/style.css +47 -11
- package/build-style/post-date/style-rtl.css +47 -11
- package/build-style/post-date/style.css +47 -11
- package/build-style/post-excerpt/editor-rtl.css +47 -11
- package/build-style/post-excerpt/editor.css +47 -11
- package/build-style/post-excerpt/style-rtl.css +47 -11
- package/build-style/post-excerpt/style.css +47 -11
- package/build-style/post-featured-image/editor-rtl.css +47 -11
- package/build-style/post-featured-image/editor.css +47 -11
- package/build-style/post-featured-image/style-rtl.css +47 -11
- package/build-style/post-featured-image/style.css +47 -11
- package/build-style/post-navigation-link/style-rtl.css +47 -11
- package/build-style/post-navigation-link/style.css +47 -11
- package/build-style/post-template/style-rtl.css +47 -11
- package/build-style/post-template/style.css +47 -11
- package/build-style/post-terms/style-rtl.css +47 -11
- package/build-style/post-terms/style.css +47 -11
- package/build-style/post-time-to-read/style-rtl.css +47 -11
- package/build-style/post-time-to-read/style.css +47 -11
- package/build-style/post-title/style-rtl.css +47 -11
- package/build-style/post-title/style.css +47 -11
- package/build-style/preformatted/style-rtl.css +47 -11
- package/build-style/preformatted/style.css +47 -11
- package/build-style/pullquote/editor-rtl.css +47 -11
- package/build-style/pullquote/editor.css +47 -11
- package/build-style/pullquote/style-rtl.css +47 -11
- package/build-style/pullquote/style.css +47 -11
- package/build-style/pullquote/theme-rtl.css +47 -11
- package/build-style/pullquote/theme.css +47 -11
- package/build-style/query/editor-rtl.css +47 -11
- package/build-style/query/editor.css +47 -11
- package/build-style/query-pagination/editor-rtl.css +47 -11
- package/build-style/query-pagination/editor.css +47 -11
- package/build-style/query-pagination/style-rtl.css +47 -11
- package/build-style/query-pagination/style.css +47 -11
- package/build-style/query-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/query-pagination-numbers/editor.css +47 -11
- package/build-style/query-title/style-rtl.css +47 -11
- package/build-style/query-title/style.css +47 -11
- package/build-style/query-total/style-rtl.css +47 -11
- package/build-style/query-total/style.css +47 -11
- package/build-style/quote/style-rtl.css +47 -11
- package/build-style/quote/style.css +47 -11
- package/build-style/quote/theme-rtl.css +47 -11
- package/build-style/quote/theme.css +47 -11
- package/build-style/read-more/style-rtl.css +47 -11
- package/build-style/read-more/style.css +47 -11
- package/build-style/reset-rtl.css +47 -11
- package/build-style/reset.css +47 -11
- package/build-style/rss/editor-rtl.css +47 -11
- package/build-style/rss/editor.css +47 -11
- package/build-style/rss/style-rtl.css +47 -11
- package/build-style/rss/style.css +47 -11
- package/build-style/search/editor-rtl.css +47 -11
- package/build-style/search/editor.css +47 -11
- package/build-style/search/style-rtl.css +47 -11
- package/build-style/search/style.css +47 -11
- package/build-style/search/theme-rtl.css +47 -11
- package/build-style/search/theme.css +47 -11
- package/build-style/separator/editor-rtl.css +47 -11
- package/build-style/separator/editor.css +47 -11
- package/build-style/separator/style-rtl.css +47 -11
- package/build-style/separator/style.css +47 -11
- package/build-style/separator/theme-rtl.css +47 -11
- package/build-style/separator/theme.css +47 -11
- package/build-style/shortcode/editor-rtl.css +47 -11
- package/build-style/shortcode/editor.css +47 -11
- package/build-style/site-logo/editor-rtl.css +47 -11
- package/build-style/site-logo/editor.css +47 -11
- package/build-style/site-logo/style-rtl.css +47 -11
- package/build-style/site-logo/style.css +47 -11
- package/build-style/site-tagline/editor-rtl.css +47 -11
- package/build-style/site-tagline/editor.css +47 -11
- package/build-style/site-tagline/style-rtl.css +47 -11
- package/build-style/site-tagline/style.css +47 -11
- package/build-style/site-title/editor-rtl.css +47 -11
- package/build-style/site-title/editor.css +47 -11
- package/build-style/site-title/style-rtl.css +47 -11
- package/build-style/site-title/style.css +47 -11
- package/build-style/social-link/editor-rtl.css +47 -11
- package/build-style/social-link/editor.css +47 -11
- package/build-style/social-links/editor-rtl.css +47 -11
- package/build-style/social-links/editor.css +47 -11
- package/build-style/social-links/style-rtl.css +47 -11
- package/build-style/social-links/style.css +47 -11
- package/build-style/spacer/editor-rtl.css +47 -11
- package/build-style/spacer/editor.css +47 -11
- package/build-style/spacer/style-rtl.css +47 -11
- package/build-style/spacer/style.css +47 -11
- package/build-style/style-rtl.css +50 -15
- package/build-style/style.css +50 -15
- package/build-style/table/editor-rtl.css +47 -11
- package/build-style/table/editor.css +47 -11
- package/build-style/table/style-rtl.css +47 -11
- package/build-style/table/style.css +47 -11
- package/build-style/table/theme-rtl.css +47 -11
- package/build-style/table/theme.css +47 -11
- package/build-style/table-of-contents/style-rtl.css +47 -11
- package/build-style/table-of-contents/style.css +47 -11
- package/build-style/tag-cloud/editor-rtl.css +47 -11
- package/build-style/tag-cloud/editor.css +47 -11
- package/build-style/tag-cloud/style-rtl.css +47 -11
- package/build-style/tag-cloud/style.css +47 -11
- package/build-style/template-part/editor-rtl.css +47 -11
- package/build-style/template-part/editor.css +47 -11
- package/build-style/template-part/theme-rtl.css +47 -11
- package/build-style/template-part/theme.css +47 -11
- package/build-style/term-description/style-rtl.css +47 -11
- package/build-style/term-description/style.css +47 -11
- package/build-style/text-columns/editor-rtl.css +47 -11
- package/build-style/text-columns/editor.css +47 -11
- package/build-style/text-columns/style-rtl.css +47 -11
- package/build-style/text-columns/style.css +47 -11
- package/build-style/theme-rtl.css +47 -11
- package/build-style/theme.css +47 -11
- package/build-style/verse/style-rtl.css +47 -11
- package/build-style/verse/style.css +47 -11
- package/build-style/video/editor-rtl.css +47 -11
- package/build-style/video/editor.css +47 -11
- package/build-style/video/style-rtl.css +47 -11
- package/build-style/video/style.css +47 -11
- package/build-style/video/theme-rtl.css +47 -11
- package/build-style/video/theme.css +47 -11
- package/package.json +35 -35
- package/src/button/style.scss +0 -1
- package/src/buttons/style.scss +5 -0
- package/src/calendar/block.json +1 -0
- package/src/code/block.json +2 -1
- package/src/comments/edit/comments-inspector-controls.js +14 -12
- package/src/comments/edit/index.js +2 -1
- package/src/cover/edit/inspector-controls.js +9 -12
- package/src/details/block.json +2 -1
- package/src/group/edit.js +11 -10
- package/src/html/block.json +2 -1
- package/src/html/editor.scss +1 -0
- package/src/image/constants.js +1 -0
- package/src/image/edit.js +2 -5
- package/src/image/image.js +7 -5
- package/src/latest-posts/edit.js +113 -81
- package/src/loginout/index.php +5 -1
- package/src/more/block.json +2 -1
- package/src/navigation/index.php +0 -1
- package/src/navigation-link/index.php +1 -1
- package/src/navigation-submenu/index.php +1 -1
- package/src/post-author/index.php +1 -1
- package/src/post-author-name/index.php +1 -1
- package/src/post-comments-form/style.scss +0 -5
- package/src/post-excerpt/block.json +2 -1
- package/src/post-excerpt/edit.js +13 -8
- package/src/post-navigation-link/block.json +2 -1
- package/src/post-navigation-link/edit.js +13 -8
- package/src/post-navigation-link/variations.js +13 -13
- package/src/post-template/edit.js +4 -3
- package/src/post-terms/block.json +4 -2
- package/src/post-terms/edit.js +13 -8
- package/src/preformatted/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/preformatted/test/transforms.native.js +6 -1
- package/src/preformatted/transforms.js +7 -1
- package/src/query/edit/query-content.js +10 -11
- package/src/read-more/block.json +2 -1
- package/src/rss/block.json +2 -1
- package/src/search/edit.js +84 -99
- package/src/separator/edit.js +16 -12
- package/src/table/block.json +8 -4
- package/src/table/edit.js +6 -2
- package/src/template-part/edit/advanced-controls.js +9 -8
- package/src/template-part/edit/index.js +1 -0
- package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/verse/test/transforms.native.js +5 -1
- package/build/search/icons.js +0 -121
- package/build/search/icons.js.map +0 -1
- package/build/utils/messages.js +0 -22
- package/build/utils/messages.js.map +0 -1
- package/build-module/search/icons.js +0 -114
- package/build-module/search/icons.js.map +0 -1
- package/build-module/utils/messages.js +0 -15
- package/build-module/utils/messages.js.map +0 -1
- package/src/search/icons.js +0 -89
- package/src/utils/messages.js +0 -31
package/src/post-excerpt/edit.js
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
RichText,
|
|
16
16
|
Warning,
|
|
17
17
|
useBlockProps,
|
|
18
|
+
useBlockEditingMode,
|
|
18
19
|
} from '@wordpress/block-editor';
|
|
19
20
|
import {
|
|
20
21
|
ToggleControl,
|
|
@@ -41,6 +42,8 @@ export default function PostExcerptEditor( {
|
|
|
41
42
|
isSelected,
|
|
42
43
|
context: { postId, postType, queryId },
|
|
43
44
|
} ) {
|
|
45
|
+
const blockEditingMode = useBlockEditingMode();
|
|
46
|
+
const showControls = blockEditingMode === 'default';
|
|
44
47
|
const isDescendentOfQueryLoop = Number.isFinite( queryId );
|
|
45
48
|
const userCanEdit = useCanEditEntity( 'postType', postType, postId );
|
|
46
49
|
const [
|
|
@@ -220,14 +223,16 @@ export default function PostExcerptEditor( {
|
|
|
220
223
|
);
|
|
221
224
|
return (
|
|
222
225
|
<>
|
|
223
|
-
|
|
224
|
-
<
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
{ showControls && (
|
|
227
|
+
<BlockControls>
|
|
228
|
+
<AlignmentToolbar
|
|
229
|
+
value={ textAlign }
|
|
230
|
+
onChange={ ( newAlign ) =>
|
|
231
|
+
setAttributes( { textAlign: newAlign } )
|
|
232
|
+
}
|
|
233
|
+
/>
|
|
234
|
+
</BlockControls>
|
|
235
|
+
) }
|
|
231
236
|
<InspectorControls>
|
|
232
237
|
<ToolsPanel
|
|
233
238
|
label={ __( 'Settings' ) }
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
BlockControls,
|
|
20
20
|
AlignmentToolbar,
|
|
21
21
|
useBlockProps,
|
|
22
|
+
useBlockEditingMode,
|
|
22
23
|
} from '@wordpress/block-editor';
|
|
23
24
|
import { __, _x } from '@wordpress/i18n';
|
|
24
25
|
import { useSelect } from '@wordpress/data';
|
|
@@ -37,6 +38,8 @@ export default function PostNavigationLinkEdit( {
|
|
|
37
38
|
},
|
|
38
39
|
setAttributes,
|
|
39
40
|
} ) {
|
|
41
|
+
const blockEditingMode = useBlockEditingMode();
|
|
42
|
+
const showControls = blockEditingMode === 'default';
|
|
40
43
|
const isNext = type === 'next';
|
|
41
44
|
let placeholder = isNext ? __( 'Next' ) : __( 'Previous' );
|
|
42
45
|
|
|
@@ -176,14 +179,16 @@ export default function PostNavigationLinkEdit( {
|
|
|
176
179
|
) }
|
|
177
180
|
/>
|
|
178
181
|
</InspectorControls>
|
|
179
|
-
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
{ showControls && (
|
|
183
|
+
<BlockControls>
|
|
184
|
+
<AlignmentToolbar
|
|
185
|
+
value={ textAlign }
|
|
186
|
+
onChange={ ( nextAlign ) => {
|
|
187
|
+
setAttributes( { textAlign: nextAlign } );
|
|
188
|
+
} }
|
|
189
|
+
/>
|
|
190
|
+
</BlockControls>
|
|
191
|
+
) }
|
|
187
192
|
<div { ...blockProps }>
|
|
188
193
|
{ ! isNext && displayArrow && (
|
|
189
194
|
<span
|
|
@@ -6,34 +6,34 @@ import { next, previous } from '@wordpress/icons';
|
|
|
6
6
|
|
|
7
7
|
const variations = [
|
|
8
8
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
title: __( 'Next Post' ),
|
|
9
|
+
name: 'post-previous',
|
|
10
|
+
title: __( 'Previous Post' ),
|
|
12
11
|
description: __(
|
|
13
|
-
'Displays the post link that
|
|
12
|
+
'Displays the post link that precedes the current post.'
|
|
14
13
|
),
|
|
15
|
-
icon:
|
|
16
|
-
attributes: { type: '
|
|
14
|
+
icon: previous,
|
|
15
|
+
attributes: { type: 'previous' },
|
|
17
16
|
scope: [ 'inserter', 'transform' ],
|
|
18
17
|
example: {
|
|
19
18
|
attributes: {
|
|
20
|
-
label: __( '
|
|
19
|
+
label: __( 'Previous post' ),
|
|
21
20
|
arrow: 'arrow',
|
|
22
21
|
},
|
|
23
22
|
},
|
|
24
23
|
},
|
|
25
24
|
{
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
isDefault: true,
|
|
26
|
+
name: 'post-next',
|
|
27
|
+
title: __( 'Next Post' ),
|
|
28
28
|
description: __(
|
|
29
|
-
'Displays the post link that
|
|
29
|
+
'Displays the post link that follows the current post.'
|
|
30
30
|
),
|
|
31
|
-
icon:
|
|
32
|
-
attributes: { type: '
|
|
31
|
+
icon: next,
|
|
32
|
+
attributes: { type: 'next' },
|
|
33
33
|
scope: [ 'inserter', 'transform' ],
|
|
34
34
|
example: {
|
|
35
35
|
attributes: {
|
|
36
|
-
label: __( '
|
|
36
|
+
label: __( 'Next post' ),
|
|
37
37
|
arrow: 'arrow',
|
|
38
38
|
},
|
|
39
39
|
},
|
|
@@ -181,14 +181,15 @@ export default function PostTemplateEdit( {
|
|
|
181
181
|
* Handle cases where sticky is set to `exclude` or `only`.
|
|
182
182
|
* Which works as a `post__in/post__not_in` query for sticky posts.
|
|
183
183
|
*/
|
|
184
|
-
if (
|
|
184
|
+
if ( [ 'exclude', 'only' ].includes( sticky ) ) {
|
|
185
185
|
query.sticky = sticky === 'only';
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
// Empty string represents the default behavior of including sticky posts.
|
|
189
|
+
if ( [ '', 'ignore' ].includes( sticky ) ) {
|
|
189
190
|
// Remove any leftover sticky query parameter.
|
|
190
191
|
delete query.sticky;
|
|
191
|
-
query.ignore_sticky =
|
|
192
|
+
query.ignore_sticky = sticky === 'ignore';
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
// If `inherit` is truthy, adjust conditionally the query to create a better preview.
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
},
|
|
20
20
|
"prefix": {
|
|
21
21
|
"type": "string",
|
|
22
|
-
"default": ""
|
|
22
|
+
"default": "",
|
|
23
|
+
"role": "content"
|
|
23
24
|
},
|
|
24
25
|
"suffix": {
|
|
25
26
|
"type": "string",
|
|
26
|
-
"default": ""
|
|
27
|
+
"default": "",
|
|
28
|
+
"role": "content"
|
|
27
29
|
}
|
|
28
30
|
},
|
|
29
31
|
"usesContext": [ "postId", "postType" ],
|
package/src/post-terms/edit.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
useBlockProps,
|
|
14
14
|
useBlockDisplayInformation,
|
|
15
15
|
RichText,
|
|
16
|
+
useBlockEditingMode,
|
|
16
17
|
} from '@wordpress/block-editor';
|
|
17
18
|
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
18
19
|
import { Spinner, TextControl } from '@wordpress/components';
|
|
@@ -46,6 +47,8 @@ export default function PostTermsEdit( {
|
|
|
46
47
|
} ) {
|
|
47
48
|
const { term, textAlign, separator, prefix, suffix } = attributes;
|
|
48
49
|
const { postId, postType } = context;
|
|
50
|
+
const blockEditingMode = useBlockEditingMode();
|
|
51
|
+
const showControls = blockEditingMode === 'default';
|
|
49
52
|
|
|
50
53
|
const selectedTerm = useSelect(
|
|
51
54
|
( select ) => {
|
|
@@ -73,14 +76,16 @@ export default function PostTermsEdit( {
|
|
|
73
76
|
|
|
74
77
|
return (
|
|
75
78
|
<>
|
|
76
|
-
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
{ showControls && (
|
|
80
|
+
<BlockControls>
|
|
81
|
+
<AlignmentToolbar
|
|
82
|
+
value={ textAlign }
|
|
83
|
+
onChange={ ( nextAlign ) => {
|
|
84
|
+
setAttributes( { textAlign: nextAlign } );
|
|
85
|
+
} }
|
|
86
|
+
/>
|
|
87
|
+
</BlockControls>
|
|
88
|
+
) }
|
|
84
89
|
<InspectorControls group="advanced">
|
|
85
90
|
<TextControl
|
|
86
91
|
__next40pxDefaultSize
|
|
@@ -29,3 +29,9 @@ exports[`Preformatted block transforms to Paragraph block 1`] = `
|
|
|
29
29
|
<p>Some <em>preformatted</em> text...<br />And more!</p>
|
|
30
30
|
<!-- /wp:paragraph -->"
|
|
31
31
|
`;
|
|
32
|
+
|
|
33
|
+
exports[`Preformatted block transforms to Verse block 1`] = `
|
|
34
|
+
"<!-- wp:verse -->
|
|
35
|
+
<pre class="wp-block-verse">Some <em>preformatted</em> text...<br />And more!</pre>
|
|
36
|
+
<!-- /wp:verse -->"
|
|
37
|
+
`;
|
|
@@ -16,7 +16,12 @@ const initialHtml = `
|
|
|
16
16
|
<!-- /wp:preformatted -->`;
|
|
17
17
|
|
|
18
18
|
const transformsWithInnerBlocks = [ 'Columns', 'Group' ];
|
|
19
|
-
const blockTransforms = [
|
|
19
|
+
const blockTransforms = [
|
|
20
|
+
'Paragraph',
|
|
21
|
+
'Code',
|
|
22
|
+
'Verse',
|
|
23
|
+
...transformsWithInnerBlocks,
|
|
24
|
+
];
|
|
20
25
|
|
|
21
26
|
setupCoreBlocks();
|
|
22
27
|
|
|
@@ -7,7 +7,7 @@ const transforms = {
|
|
|
7
7
|
from: [
|
|
8
8
|
{
|
|
9
9
|
type: 'block',
|
|
10
|
-
blocks: [ 'core/code', 'core/paragraph' ],
|
|
10
|
+
blocks: [ 'core/code', 'core/paragraph', 'core/verse' ],
|
|
11
11
|
transform: ( { content, anchor } ) =>
|
|
12
12
|
createBlock( 'core/preformatted', {
|
|
13
13
|
content,
|
|
@@ -41,6 +41,12 @@ const transforms = {
|
|
|
41
41
|
blocks: [ 'core/code' ],
|
|
42
42
|
transform: ( attributes ) => createBlock( 'core/code', attributes ),
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
type: 'block',
|
|
46
|
+
blocks: [ 'core/verse' ],
|
|
47
|
+
transform: ( attributes ) =>
|
|
48
|
+
createBlock( 'core/verse', attributes ),
|
|
49
|
+
},
|
|
44
50
|
],
|
|
45
51
|
};
|
|
46
52
|
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
useBlockProps,
|
|
11
11
|
store as blockEditorStore,
|
|
12
12
|
useInnerBlocksProps,
|
|
13
|
+
privateApis as blockEditorPrivateApis,
|
|
13
14
|
} from '@wordpress/block-editor';
|
|
14
|
-
import { SelectControl } from '@wordpress/components';
|
|
15
15
|
import { __ } from '@wordpress/i18n';
|
|
16
16
|
import { store as coreStore } from '@wordpress/core-data';
|
|
17
17
|
|
|
@@ -19,11 +19,13 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
19
19
|
* Internal dependencies
|
|
20
20
|
*/
|
|
21
21
|
import EnhancedPaginationControl from './inspector-controls/enhanced-pagination-control';
|
|
22
|
+
import { unlock } from '../../lock-unlock';
|
|
22
23
|
import QueryInspectorControls from './inspector-controls';
|
|
23
24
|
import EnhancedPaginationModal from './enhanced-pagination-modal';
|
|
24
25
|
import { getQueryContextFromTemplate } from '../utils';
|
|
25
26
|
import QueryToolbar from './query-toolbar';
|
|
26
|
-
|
|
27
|
+
|
|
28
|
+
const { HTMLElementControl } = unlock( blockEditorPrivateApis );
|
|
27
29
|
|
|
28
30
|
const DEFAULTS_POSTS_PER_PAGE = 3;
|
|
29
31
|
|
|
@@ -147,21 +149,18 @@ export default function QueryContent( {
|
|
|
147
149
|
<QueryToolbar attributes={ attributes } clientId={ clientId } />
|
|
148
150
|
</BlockControls>
|
|
149
151
|
<InspectorControls group="advanced">
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
<HTMLElementControl
|
|
153
|
+
tagName={ TagName }
|
|
154
|
+
onChange={ ( value ) =>
|
|
155
|
+
setAttributes( { tagName: value } )
|
|
156
|
+
}
|
|
157
|
+
clientId={ clientId }
|
|
154
158
|
options={ [
|
|
155
159
|
{ label: __( 'Default (<div>)' ), value: 'div' },
|
|
156
160
|
{ label: '<main>', value: 'main' },
|
|
157
161
|
{ label: '<section>', value: 'section' },
|
|
158
162
|
{ label: '<aside>', value: 'aside' },
|
|
159
163
|
] }
|
|
160
|
-
value={ TagName }
|
|
161
|
-
onChange={ ( value ) =>
|
|
162
|
-
setAttributes( { tagName: value } )
|
|
163
|
-
}
|
|
164
|
-
help={ htmlElementMessages[ TagName ] }
|
|
165
164
|
/>
|
|
166
165
|
<EnhancedPaginationControl
|
|
167
166
|
enhancedPagination={ enhancedPagination }
|
package/src/read-more/block.json
CHANGED
package/src/rss/block.json
CHANGED
package/src/search/edit.js
CHANGED
|
@@ -8,7 +8,6 @@ import clsx from 'clsx';
|
|
|
8
8
|
*/
|
|
9
9
|
import {
|
|
10
10
|
useBlockProps,
|
|
11
|
-
BlockControls,
|
|
12
11
|
InspectorControls,
|
|
13
12
|
RichText,
|
|
14
13
|
__experimentalUseBorderProps as useBorderProps,
|
|
@@ -21,9 +20,8 @@ import {
|
|
|
21
20
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
22
21
|
import { useEffect, useRef } from '@wordpress/element';
|
|
23
22
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
ToolbarButton,
|
|
23
|
+
SelectControl,
|
|
24
|
+
ToggleControl,
|
|
27
25
|
ResizableBox,
|
|
28
26
|
__experimentalUseCustomUnits as useCustomUnits,
|
|
29
27
|
__experimentalUnitControl as UnitControl,
|
|
@@ -41,14 +39,6 @@ import { __unstableStripHTML as stripHTML } from '@wordpress/dom';
|
|
|
41
39
|
/**
|
|
42
40
|
* Internal dependencies
|
|
43
41
|
*/
|
|
44
|
-
import {
|
|
45
|
-
buttonOnly,
|
|
46
|
-
buttonOutside,
|
|
47
|
-
buttonInside,
|
|
48
|
-
noButton,
|
|
49
|
-
buttonWithIcon,
|
|
50
|
-
toggleLabel,
|
|
51
|
-
} from './icons';
|
|
52
42
|
import {
|
|
53
43
|
PC_WIDTH_DEFAULT,
|
|
54
44
|
PX_WIDTH_DEFAULT,
|
|
@@ -201,68 +191,23 @@ export default function SearchEdit( {
|
|
|
201
191
|
|
|
202
192
|
const buttonPositionControls = [
|
|
203
193
|
{
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
isActive: buttonPosition === 'button-outside',
|
|
207
|
-
icon: buttonOutside,
|
|
208
|
-
onClick: () => {
|
|
209
|
-
setAttributes( {
|
|
210
|
-
buttonPosition: 'button-outside',
|
|
211
|
-
isSearchFieldHidden: false,
|
|
212
|
-
} );
|
|
213
|
-
},
|
|
194
|
+
label: __( 'Button outside' ),
|
|
195
|
+
value: 'button-outside',
|
|
214
196
|
},
|
|
215
197
|
{
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
isActive: buttonPosition === 'button-inside',
|
|
219
|
-
icon: buttonInside,
|
|
220
|
-
onClick: () => {
|
|
221
|
-
setAttributes( {
|
|
222
|
-
buttonPosition: 'button-inside',
|
|
223
|
-
isSearchFieldHidden: false,
|
|
224
|
-
} );
|
|
225
|
-
},
|
|
198
|
+
label: __( 'Button inside' ),
|
|
199
|
+
value: 'button-inside',
|
|
226
200
|
},
|
|
227
201
|
{
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
isActive: buttonPosition === 'no-button',
|
|
231
|
-
icon: noButton,
|
|
232
|
-
onClick: () => {
|
|
233
|
-
setAttributes( {
|
|
234
|
-
buttonPosition: 'no-button',
|
|
235
|
-
isSearchFieldHidden: false,
|
|
236
|
-
} );
|
|
237
|
-
},
|
|
202
|
+
label: __( 'No button' ),
|
|
203
|
+
value: 'no-button',
|
|
238
204
|
},
|
|
239
205
|
{
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
isActive: buttonPosition === 'button-only',
|
|
243
|
-
icon: buttonOnly,
|
|
244
|
-
onClick: () => {
|
|
245
|
-
setAttributes( {
|
|
246
|
-
buttonPosition: 'button-only',
|
|
247
|
-
isSearchFieldHidden: true,
|
|
248
|
-
} );
|
|
249
|
-
},
|
|
206
|
+
label: __( 'Button only' ),
|
|
207
|
+
value: 'button-only',
|
|
250
208
|
},
|
|
251
209
|
];
|
|
252
210
|
|
|
253
|
-
const getButtonPositionIcon = () => {
|
|
254
|
-
switch ( buttonPosition ) {
|
|
255
|
-
case 'button-inside':
|
|
256
|
-
return buttonInside;
|
|
257
|
-
case 'button-outside':
|
|
258
|
-
return buttonOutside;
|
|
259
|
-
case 'no-button':
|
|
260
|
-
return noButton;
|
|
261
|
-
case 'button-only':
|
|
262
|
-
return buttonOnly;
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
|
|
266
211
|
const getResizableSides = () => {
|
|
267
212
|
if ( hasOnlyButton ) {
|
|
268
213
|
return {};
|
|
@@ -376,40 +321,6 @@ export default function SearchEdit( {
|
|
|
376
321
|
|
|
377
322
|
const controls = (
|
|
378
323
|
<>
|
|
379
|
-
<BlockControls>
|
|
380
|
-
<ToolbarGroup>
|
|
381
|
-
<ToolbarButton
|
|
382
|
-
title={ __( 'Show search label' ) }
|
|
383
|
-
icon={ toggleLabel }
|
|
384
|
-
onClick={ () => {
|
|
385
|
-
setAttributes( {
|
|
386
|
-
showLabel: ! showLabel,
|
|
387
|
-
} );
|
|
388
|
-
} }
|
|
389
|
-
className={ showLabel ? 'is-pressed' : undefined }
|
|
390
|
-
/>
|
|
391
|
-
<ToolbarDropdownMenu
|
|
392
|
-
icon={ getButtonPositionIcon() }
|
|
393
|
-
label={ __( 'Change button position' ) }
|
|
394
|
-
controls={ buttonPositionControls }
|
|
395
|
-
/>
|
|
396
|
-
{ ! hasNoButton && (
|
|
397
|
-
<ToolbarButton
|
|
398
|
-
title={ __( 'Use button with icon' ) }
|
|
399
|
-
icon={ buttonWithIcon }
|
|
400
|
-
onClick={ () => {
|
|
401
|
-
setAttributes( {
|
|
402
|
-
buttonUseIcon: ! buttonUseIcon,
|
|
403
|
-
} );
|
|
404
|
-
} }
|
|
405
|
-
className={
|
|
406
|
-
buttonUseIcon ? 'is-pressed' : undefined
|
|
407
|
-
}
|
|
408
|
-
/>
|
|
409
|
-
) }
|
|
410
|
-
</ToolbarGroup>
|
|
411
|
-
</BlockControls>
|
|
412
|
-
|
|
413
324
|
<InspectorControls>
|
|
414
325
|
<ToolsPanel
|
|
415
326
|
label={ __( 'Settings' ) }
|
|
@@ -417,10 +328,84 @@ export default function SearchEdit( {
|
|
|
417
328
|
setAttributes( {
|
|
418
329
|
width: undefined,
|
|
419
330
|
widthUnit: undefined,
|
|
331
|
+
showLabel: true,
|
|
332
|
+
buttonUseIcon: false,
|
|
333
|
+
buttonPosition: 'button-outside',
|
|
334
|
+
isSearchFieldHidden: false,
|
|
420
335
|
} );
|
|
421
336
|
} }
|
|
422
337
|
dropdownMenuProps={ dropdownMenuProps }
|
|
423
338
|
>
|
|
339
|
+
<ToolsPanelItem
|
|
340
|
+
hasValue={ () => ! showLabel }
|
|
341
|
+
label={ __( 'Show label' ) }
|
|
342
|
+
onDeselect={ () => {
|
|
343
|
+
setAttributes( {
|
|
344
|
+
showLabel: true,
|
|
345
|
+
} );
|
|
346
|
+
} }
|
|
347
|
+
isShownByDefault
|
|
348
|
+
>
|
|
349
|
+
<ToggleControl
|
|
350
|
+
__nextHasNoMarginBottom
|
|
351
|
+
checked={ showLabel }
|
|
352
|
+
label={ __( 'Show label' ) }
|
|
353
|
+
onChange={ ( value ) =>
|
|
354
|
+
setAttributes( {
|
|
355
|
+
showLabel: value,
|
|
356
|
+
} )
|
|
357
|
+
}
|
|
358
|
+
/>
|
|
359
|
+
</ToolsPanelItem>
|
|
360
|
+
<ToolsPanelItem
|
|
361
|
+
hasValue={ () => buttonPosition !== 'button-outside' }
|
|
362
|
+
label={ __( 'Button position' ) }
|
|
363
|
+
onDeselect={ () => {
|
|
364
|
+
setAttributes( {
|
|
365
|
+
buttonPosition: 'button-outside',
|
|
366
|
+
isSearchFieldHidden: false,
|
|
367
|
+
} );
|
|
368
|
+
} }
|
|
369
|
+
isShownByDefault
|
|
370
|
+
>
|
|
371
|
+
<SelectControl
|
|
372
|
+
value={ buttonPosition }
|
|
373
|
+
__next40pxDefaultSize
|
|
374
|
+
__nextHasNoMarginBottom
|
|
375
|
+
label={ __( 'Button position' ) }
|
|
376
|
+
onChange={ ( value ) => {
|
|
377
|
+
setAttributes( {
|
|
378
|
+
buttonPosition: value,
|
|
379
|
+
isSearchFieldHidden:
|
|
380
|
+
value === 'button-only',
|
|
381
|
+
} );
|
|
382
|
+
} }
|
|
383
|
+
options={ buttonPositionControls }
|
|
384
|
+
/>
|
|
385
|
+
</ToolsPanelItem>
|
|
386
|
+
{ buttonPosition !== 'no-button' && (
|
|
387
|
+
<ToolsPanelItem
|
|
388
|
+
hasValue={ () => !! buttonUseIcon }
|
|
389
|
+
label={ __( 'Use button with icon' ) }
|
|
390
|
+
onDeselect={ () => {
|
|
391
|
+
setAttributes( {
|
|
392
|
+
buttonUseIcon: false,
|
|
393
|
+
} );
|
|
394
|
+
} }
|
|
395
|
+
isShownByDefault
|
|
396
|
+
>
|
|
397
|
+
<ToggleControl
|
|
398
|
+
__nextHasNoMarginBottom
|
|
399
|
+
checked={ buttonUseIcon }
|
|
400
|
+
label={ __( 'Use button with icon' ) }
|
|
401
|
+
onChange={ ( value ) =>
|
|
402
|
+
setAttributes( {
|
|
403
|
+
buttonUseIcon: value,
|
|
404
|
+
} )
|
|
405
|
+
}
|
|
406
|
+
/>
|
|
407
|
+
</ToolsPanelItem>
|
|
408
|
+
) }
|
|
424
409
|
<ToolsPanelItem
|
|
425
410
|
hasValue={ () => !! width }
|
|
426
411
|
label={ __( 'Width' ) }
|
package/src/separator/edit.js
CHANGED
|
@@ -6,12 +6,13 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { HorizontalRule
|
|
9
|
+
import { HorizontalRule } from '@wordpress/components';
|
|
10
10
|
import {
|
|
11
11
|
useBlockProps,
|
|
12
12
|
getColorClassName,
|
|
13
13
|
__experimentalUseColorProps as useColorProps,
|
|
14
14
|
InspectorControls,
|
|
15
|
+
privateApis as blockEditorPrivateApis,
|
|
15
16
|
} from '@wordpress/block-editor';
|
|
16
17
|
import { __ } from '@wordpress/i18n';
|
|
17
18
|
|
|
@@ -19,9 +20,15 @@ import { __ } from '@wordpress/i18n';
|
|
|
19
20
|
* Internal dependencies
|
|
20
21
|
*/
|
|
21
22
|
import useDeprecatedOpacity from './use-deprecated-opacity';
|
|
22
|
-
import {
|
|
23
|
+
import { unlock } from '../lock-unlock';
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
const { HTMLElementControl } = unlock( blockEditorPrivateApis );
|
|
26
|
+
|
|
27
|
+
export default function SeparatorEdit( {
|
|
28
|
+
attributes,
|
|
29
|
+
setAttributes,
|
|
30
|
+
clientId,
|
|
31
|
+
} ) {
|
|
25
32
|
const { backgroundColor, opacity, style, tagName } = attributes;
|
|
26
33
|
const colorProps = useColorProps( attributes );
|
|
27
34
|
const currentColor = colorProps?.style?.backgroundColor;
|
|
@@ -52,19 +59,16 @@ export default function SeparatorEdit( { attributes, setAttributes } ) {
|
|
|
52
59
|
return (
|
|
53
60
|
<>
|
|
54
61
|
<InspectorControls group="advanced">
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
<HTMLElementControl
|
|
63
|
+
tagName={ tagName }
|
|
64
|
+
onChange={ ( value ) =>
|
|
65
|
+
setAttributes( { tagName: value } )
|
|
66
|
+
}
|
|
67
|
+
clientId={ clientId }
|
|
59
68
|
options={ [
|
|
60
69
|
{ label: __( 'Default (<hr>)' ), value: 'hr' },
|
|
61
70
|
{ label: '<div>', value: 'div' },
|
|
62
71
|
] }
|
|
63
|
-
value={ tagName }
|
|
64
|
-
onChange={ ( value ) =>
|
|
65
|
-
setAttributes( { tagName: value } )
|
|
66
|
-
}
|
|
67
|
-
help={ htmlElementMessages[ tagName ] }
|
|
68
72
|
/>
|
|
69
73
|
</InspectorControls>
|
|
70
74
|
<Wrapper
|