@wordpress/block-library 9.23.0 → 9.25.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/button/edit.js +29 -17
- package/build/button/edit.js.map +1 -1
- package/build/code/index.js +2 -1
- package/build/code/index.js.map +1 -1
- package/build/columns/edit.js +18 -22
- package/build/columns/edit.js.map +1 -1
- package/build/comment-author-name/edit.js +41 -12
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-date/edit.js +41 -12
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +27 -7
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -3
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +23 -9
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-title/edit.js +41 -12
- package/build/comments-title/edit.js.map +1 -1
- package/build/details/edit.js +27 -3
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +2 -1
- package/build/details/index.js.map +1 -1
- package/build/embed/edit.js +2 -4
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-controls.js +41 -22
- package/build/embed/embed-controls.js.map +1 -1
- package/build/file/inspector.js +73 -30
- package/build/file/inspector.js.map +1 -1
- package/build/form/edit.js +67 -37
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +47 -18
- package/build/form-input/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 -1
- 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 +154 -82
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +131 -52
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/more/index.js +2 -1
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +93 -51
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +43 -27
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation-link/index.js +3 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/transforms.js +2 -0
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-link/update-attributes.js +1 -0
- package/build/navigation-link/update-attributes.js.map +1 -1
- package/build/navigation-submenu/index.js +3 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/post-comments-count/index.js +3 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-count/transforms.js +26 -0
- package/build/post-comments-count/transforms.js.map +1 -0
- package/build/post-comments-link/index.js +3 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-comments-link/transforms.js +26 -0
- package/build/post-comments-link/transforms.js.map +1 -0
- 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/post-title/edit.js +56 -18
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/transforms.js +5 -1
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +1 -1
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/read-more/index.js +2 -1
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +120 -46
- package/build/rss/edit.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 +52 -20
- package/build/separator/edit.js.map +1 -1
- package/build/shortcode/index.js +2 -1
- package/build/shortcode/index.js.map +1 -1
- package/build/social-link/variations.js +53 -48
- package/build/social-link/variations.js.map +1 -1
- package/build/social-links/edit.js +35 -45
- package/build/social-links/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/video/tracks-editor.js +40 -12
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/button/edit.js +30 -18
- package/build-module/button/edit.js.map +1 -1
- package/build-module/code/index.js +2 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/columns/edit.js +18 -22
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/comment-author-name/edit.js +42 -13
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +42 -13
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +28 -8
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -3
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +24 -10
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +42 -13
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/details/edit.js +29 -5
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +2 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/embed/edit.js +2 -4
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-controls.js +42 -23
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/file/inspector.js +74 -31
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/form/edit.js +68 -38
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +48 -19
- package/build-module/form-input/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 -2
- 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 +155 -83
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +132 -53
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/more/index.js +2 -1
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +94 -52
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +44 -28
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation-link/index.js +3 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-link/transforms.js +2 -0
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-link/update-attributes.js +1 -0
- package/build-module/navigation-link/update-attributes.js.map +1 -1
- package/build-module/navigation-submenu/index.js +3 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +3 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-count/transforms.js +19 -0
- package/build-module/post-comments-count/transforms.js.map +1 -0
- package/build-module/post-comments-link/index.js +3 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-comments-link/transforms.js +19 -0
- package/build-module/post-comments-link/transforms.js.map +1 -0
- 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/post-title/edit.js +57 -19
- package/build-module/post-title/edit.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/enhanced-pagination-modal.js +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.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/edit.js +121 -47
- package/build-module/rss/edit.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 +54 -22
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/shortcode/index.js +2 -1
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/social-link/variations.js +53 -48
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/social-links/edit.js +37 -47
- package/build-module/social-links/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/video/tracks-editor.js +41 -13
- package/build-module/video/tracks-editor.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 +57 -15
- package/build-style/editor.css +57 -15
- 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 +48 -11
- package/build-style/gallery/style.css +48 -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 +55 -14
- package/build-style/navigation/editor.css +55 -14
- 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 +48 -12
- package/build-style/pullquote/editor.css +48 -12
- package/build-style/pullquote/style-rtl.css +49 -14
- package/build-style/pullquote/style.css +49 -14
- package/build-style/pullquote/theme-rtl.css +49 -13
- package/build-style/pullquote/theme.css +49 -13
- 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 +53 -18
- package/build-style/style.css +53 -18
- 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 +49 -13
- package/build-style/theme.css +49 -13
- 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/edit.js +44 -29
- package/src/button/style.scss +0 -1
- package/src/buttons/style.scss +5 -0
- package/src/code/block.json +2 -1
- package/src/columns/edit.js +20 -31
- package/src/comment-author-name/edit.js +54 -13
- package/src/comment-date/edit.js +50 -15
- package/src/comment-edit-link/edit.js +39 -11
- package/src/comments/edit/comments-inspector-controls.js +0 -2
- package/src/comments-pagination/edit.js +29 -9
- package/src/comments-title/edit.js +53 -15
- package/src/details/block.json +2 -1
- package/src/details/edit.js +36 -4
- package/src/embed/edit.js +3 -5
- package/src/embed/embed-controls.js +55 -33
- package/src/file/inspector.js +99 -45
- package/src/form/edit.js +91 -46
- package/src/form-input/edit.js +56 -18
- package/src/gallery/style.scss +1 -0
- 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 -1
- package/src/image/image.js +7 -5
- package/src/latest-posts/edit.js +206 -98
- package/src/list/ordered-list-settings.js +172 -62
- package/src/more/block.json +2 -1
- package/src/navigation/edit/index.js +127 -64
- package/src/navigation/edit/overlay-menu-preview.js +43 -26
- package/src/navigation/editor.scss +8 -4
- package/src/navigation-link/block.json +3 -0
- package/src/navigation-link/index.php +4 -0
- package/src/navigation-link/transforms.js +2 -1
- package/src/navigation-link/update-attributes.js +1 -0
- package/src/navigation-submenu/block.json +3 -0
- package/src/navigation-submenu/index.php +4 -0
- package/src/post-comments-count/index.js +2 -0
- package/src/post-comments-count/transforms.js +20 -0
- package/src/post-comments-form/style.scss +0 -5
- package/src/post-comments-link/index.js +2 -0
- package/src/post-comments-link/transforms.js +20 -0
- 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/post-title/edit.js +76 -24
- 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/pullquote/editor.scss +1 -1
- package/src/pullquote/style.scss +2 -3
- package/src/pullquote/theme.scss +2 -2
- package/src/query/edit/enhanced-pagination-modal.js +1 -5
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -13
- package/src/read-more/block.json +2 -1
- package/src/rss/block.json +2 -1
- package/src/rss/edit.js +141 -55
- package/src/search/edit.js +84 -99
- package/src/separator/edit.js +66 -21
- package/src/shortcode/block.json +2 -1
- package/src/site-title/index.php +1 -1
- package/src/social-link/index.php +49 -49
- package/src/social-link/variations.js +53 -48
- package/src/social-links/edit.js +39 -60
- package/src/table/block.json +8 -4
- package/src/table/edit.js +6 -2
- package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/verse/test/transforms.native.js +5 -1
- package/src/video/tracks-editor.js +57 -16
- package/build/search/icons.js +0 -121
- package/build/search/icons.js.map +0 -1
- package/build-module/search/icons.js +0 -114
- package/build-module/search/icons.js.map +0 -1
- package/src/search/icons.js +0 -89
|
@@ -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
|
package/src/post-title/edit.js
CHANGED
|
@@ -15,12 +15,22 @@ import {
|
|
|
15
15
|
HeadingLevelDropdown,
|
|
16
16
|
useBlockEditingMode,
|
|
17
17
|
} from '@wordpress/block-editor';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
ToggleControl,
|
|
20
|
+
TextControl,
|
|
21
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
22
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
23
|
+
} from '@wordpress/components';
|
|
19
24
|
import { __ } from '@wordpress/i18n';
|
|
20
25
|
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
21
26
|
import { useEntityProp, store as coreStore } from '@wordpress/core-data';
|
|
22
27
|
import { useSelect } from '@wordpress/data';
|
|
23
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Internal dependencies
|
|
31
|
+
*/
|
|
32
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
33
|
+
|
|
24
34
|
export default function PostTitleEdit( {
|
|
25
35
|
attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
|
|
26
36
|
setAttributes,
|
|
@@ -66,6 +76,7 @@ export default function PostTitleEdit( {
|
|
|
66
76
|
} ),
|
|
67
77
|
} );
|
|
68
78
|
const blockEditingMode = useBlockEditingMode();
|
|
79
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
69
80
|
|
|
70
81
|
let titleElement = <TagName { ...blockProps }>{ __( 'Title' ) }</TagName>;
|
|
71
82
|
|
|
@@ -138,41 +149,82 @@ export default function PostTitleEdit( {
|
|
|
138
149
|
/>
|
|
139
150
|
</BlockControls>
|
|
140
151
|
<InspectorControls>
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
152
|
+
<ToolsPanel
|
|
153
|
+
label={ __( 'Settings' ) }
|
|
154
|
+
resetAll={ () => {
|
|
155
|
+
setAttributes( {
|
|
156
|
+
rel: '',
|
|
157
|
+
linkTarget: '_self',
|
|
158
|
+
isLink: false,
|
|
159
|
+
} );
|
|
160
|
+
} }
|
|
161
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
162
|
+
>
|
|
163
|
+
<ToolsPanelItem
|
|
144
164
|
label={ __( 'Make title a link' ) }
|
|
145
|
-
|
|
146
|
-
|
|
165
|
+
isShownByDefault
|
|
166
|
+
hasValue={ () => isLink }
|
|
167
|
+
onDeselect={ () =>
|
|
168
|
+
setAttributes( { isLink: false } )
|
|
147
169
|
}
|
|
148
|
-
|
|
149
|
-
|
|
170
|
+
>
|
|
171
|
+
<ToggleControl
|
|
172
|
+
__nextHasNoMarginBottom
|
|
173
|
+
label={ __( 'Make title a link' ) }
|
|
174
|
+
onChange={ () =>
|
|
175
|
+
setAttributes( { isLink: ! isLink } )
|
|
176
|
+
}
|
|
177
|
+
checked={ isLink }
|
|
178
|
+
/>
|
|
179
|
+
</ToolsPanelItem>
|
|
150
180
|
{ isLink && (
|
|
151
181
|
<>
|
|
152
|
-
<
|
|
153
|
-
__nextHasNoMarginBottom
|
|
182
|
+
<ToolsPanelItem
|
|
154
183
|
label={ __( 'Open in new tab' ) }
|
|
155
|
-
|
|
184
|
+
isShownByDefault
|
|
185
|
+
hasValue={ () =>
|
|
186
|
+
linkTarget === '_blank'
|
|
187
|
+
}
|
|
188
|
+
onDeselect={ () =>
|
|
156
189
|
setAttributes( {
|
|
157
|
-
linkTarget:
|
|
158
|
-
? '_blank'
|
|
159
|
-
: '_self',
|
|
190
|
+
linkTarget: '_self',
|
|
160
191
|
} )
|
|
161
192
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
193
|
+
>
|
|
194
|
+
<ToggleControl
|
|
195
|
+
__nextHasNoMarginBottom
|
|
196
|
+
label={ __( 'Open in new tab' ) }
|
|
197
|
+
onChange={ ( value ) =>
|
|
198
|
+
setAttributes( {
|
|
199
|
+
linkTarget: value
|
|
200
|
+
? '_blank'
|
|
201
|
+
: '_self',
|
|
202
|
+
} )
|
|
203
|
+
}
|
|
204
|
+
checked={ linkTarget === '_blank' }
|
|
205
|
+
/>
|
|
206
|
+
</ToolsPanelItem>
|
|
207
|
+
<ToolsPanelItem
|
|
167
208
|
label={ __( 'Link rel' ) }
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
209
|
+
isShownByDefault
|
|
210
|
+
hasValue={ () => !! rel }
|
|
211
|
+
onDeselect={ () =>
|
|
212
|
+
setAttributes( { rel: '' } )
|
|
171
213
|
}
|
|
172
|
-
|
|
214
|
+
>
|
|
215
|
+
<TextControl
|
|
216
|
+
__next40pxDefaultSize
|
|
217
|
+
__nextHasNoMarginBottom
|
|
218
|
+
label={ __( 'Link rel' ) }
|
|
219
|
+
value={ rel }
|
|
220
|
+
onChange={ ( newRel ) =>
|
|
221
|
+
setAttributes( { rel: newRel } )
|
|
222
|
+
}
|
|
223
|
+
/>
|
|
224
|
+
</ToolsPanelItem>
|
|
173
225
|
</>
|
|
174
226
|
) }
|
|
175
|
-
</
|
|
227
|
+
</ToolsPanel>
|
|
176
228
|
</InspectorControls>
|
|
177
229
|
</>
|
|
178
230
|
) }
|
|
@@ -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
|
|
package/src/pullquote/style.scss
CHANGED
package/src/pullquote/theme.scss
CHANGED
|
@@ -27,11 +27,7 @@ export default function EnhancedPaginationModal( {
|
|
|
27
27
|
useUnsupportedBlocks( clientId );
|
|
28
28
|
|
|
29
29
|
useEffect( () => {
|
|
30
|
-
if (
|
|
31
|
-
enhancedPagination &&
|
|
32
|
-
hasUnsupportedBlocks &&
|
|
33
|
-
! window.__experimentalFullPageClientSideNavigation
|
|
34
|
-
) {
|
|
30
|
+
if ( enhancedPagination && hasUnsupportedBlocks ) {
|
|
35
31
|
setAttributes( { enhancedPagination: false } );
|
|
36
32
|
setOpen( true );
|
|
37
33
|
}
|
|
@@ -15,17 +15,11 @@ export default function EnhancedPaginationControl( {
|
|
|
15
15
|
clientId,
|
|
16
16
|
} ) {
|
|
17
17
|
const { hasUnsupportedBlocks } = useUnsupportedBlocks( clientId );
|
|
18
|
-
const fullPageClientSideNavigation =
|
|
19
|
-
window.__experimentalFullPageClientSideNavigation;
|
|
20
18
|
|
|
21
19
|
let help = __(
|
|
22
20
|
'Reload the full page—instead of just the posts list—when visitors navigate between pages.'
|
|
23
21
|
);
|
|
24
|
-
if (
|
|
25
|
-
help = __(
|
|
26
|
-
'Experimental full-page client-side navigation setting enabled.'
|
|
27
|
-
);
|
|
28
|
-
} else if ( hasUnsupportedBlocks ) {
|
|
22
|
+
if ( hasUnsupportedBlocks ) {
|
|
29
23
|
help = __(
|
|
30
24
|
'Enhancement disabled because there are non-compatible blocks inside the Query block.'
|
|
31
25
|
);
|
|
@@ -37,12 +31,8 @@ export default function EnhancedPaginationControl( {
|
|
|
37
31
|
__nextHasNoMarginBottom
|
|
38
32
|
label={ __( 'Reload full page' ) }
|
|
39
33
|
help={ help }
|
|
40
|
-
checked={
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
disabled={
|
|
44
|
-
hasUnsupportedBlocks || fullPageClientSideNavigation
|
|
45
|
-
}
|
|
34
|
+
checked={ ! enhancedPagination }
|
|
35
|
+
disabled={ hasUnsupportedBlocks }
|
|
46
36
|
onChange={ ( value ) => {
|
|
47
37
|
setAttributes( {
|
|
48
38
|
enhancedPagination: ! value,
|
package/src/read-more/block.json
CHANGED
package/src/rss/block.json
CHANGED
package/src/rss/edit.js
CHANGED
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
Button,
|
|
11
11
|
Disabled,
|
|
12
|
-
PanelBody,
|
|
13
12
|
Placeholder,
|
|
14
13
|
RangeControl,
|
|
15
14
|
ToggleControl,
|
|
16
15
|
ToolbarGroup,
|
|
17
16
|
TextControl,
|
|
18
17
|
__experimentalInputControl as InputControl,
|
|
18
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
19
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
19
20
|
} from '@wordpress/components';
|
|
20
21
|
import { useState } from '@wordpress/element';
|
|
21
22
|
import { grid, list, edit, rss } from '@wordpress/icons';
|
|
@@ -23,6 +24,11 @@ import { __, _x } from '@wordpress/i18n';
|
|
|
23
24
|
import { prependHTTP } from '@wordpress/url';
|
|
24
25
|
import ServerSideRender from '@wordpress/server-side-render';
|
|
25
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Internal dependencies
|
|
29
|
+
*/
|
|
30
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
31
|
+
|
|
26
32
|
const DEFAULT_MIN_ITEMS = 1;
|
|
27
33
|
const DEFAULT_MAX_ITEMS = 20;
|
|
28
34
|
|
|
@@ -42,6 +48,8 @@ export default function RSSEdit( { attributes, setAttributes } ) {
|
|
|
42
48
|
rel,
|
|
43
49
|
} = attributes;
|
|
44
50
|
|
|
51
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
52
|
+
|
|
45
53
|
function toggleAttribute( propName ) {
|
|
46
54
|
return () => {
|
|
47
55
|
const value = attributes[ propName ];
|
|
@@ -141,75 +149,153 @@ export default function RSSEdit( { attributes, setAttributes } ) {
|
|
|
141
149
|
<ToolbarGroup controls={ toolbarControls } />
|
|
142
150
|
</BlockControls>
|
|
143
151
|
<InspectorControls>
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
152
|
+
<ToolsPanel
|
|
153
|
+
label={ __( 'Settings' ) }
|
|
154
|
+
resetAll={ () => {
|
|
155
|
+
setAttributes( {
|
|
156
|
+
itemsToShow: 5,
|
|
157
|
+
displayAuthor: false,
|
|
158
|
+
displayDate: false,
|
|
159
|
+
displayExcerpt: false,
|
|
160
|
+
excerptLength: 55,
|
|
161
|
+
columns: 2,
|
|
162
|
+
openInNewTab: false,
|
|
163
|
+
} );
|
|
164
|
+
} }
|
|
165
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
166
|
+
>
|
|
167
|
+
<ToolsPanelItem
|
|
148
168
|
label={ __( 'Number of items' ) }
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
min={ DEFAULT_MIN_ITEMS }
|
|
154
|
-
max={ DEFAULT_MAX_ITEMS }
|
|
155
|
-
required
|
|
156
|
-
/>
|
|
157
|
-
<ToggleControl
|
|
158
|
-
__nextHasNoMarginBottom
|
|
159
|
-
label={ __( 'Display author' ) }
|
|
160
|
-
checked={ displayAuthor }
|
|
161
|
-
onChange={ toggleAttribute( 'displayAuthor' ) }
|
|
162
|
-
/>
|
|
163
|
-
<ToggleControl
|
|
164
|
-
__nextHasNoMarginBottom
|
|
165
|
-
label={ __( 'Display date' ) }
|
|
166
|
-
checked={ displayDate }
|
|
167
|
-
onChange={ toggleAttribute( 'displayDate' ) }
|
|
168
|
-
/>
|
|
169
|
-
<ToggleControl
|
|
170
|
-
__nextHasNoMarginBottom
|
|
171
|
-
label={ __( 'Display excerpt' ) }
|
|
172
|
-
checked={ displayExcerpt }
|
|
173
|
-
onChange={ toggleAttribute( 'displayExcerpt' ) }
|
|
174
|
-
/>
|
|
175
|
-
{ displayExcerpt && (
|
|
169
|
+
hasValue={ () => itemsToShow !== 5 }
|
|
170
|
+
onDeselect={ () => setAttributes( { itemsToShow: 5 } ) }
|
|
171
|
+
isShownByDefault
|
|
172
|
+
>
|
|
176
173
|
<RangeControl
|
|
177
174
|
__nextHasNoMarginBottom
|
|
178
175
|
__next40pxDefaultSize
|
|
179
|
-
label={ __( '
|
|
180
|
-
value={
|
|
176
|
+
label={ __( 'Number of items' ) }
|
|
177
|
+
value={ itemsToShow }
|
|
181
178
|
onChange={ ( value ) =>
|
|
182
|
-
setAttributes( {
|
|
179
|
+
setAttributes( { itemsToShow: value } )
|
|
183
180
|
}
|
|
184
|
-
min={
|
|
185
|
-
max={
|
|
181
|
+
min={ DEFAULT_MIN_ITEMS }
|
|
182
|
+
max={ DEFAULT_MAX_ITEMS }
|
|
186
183
|
required
|
|
187
184
|
/>
|
|
185
|
+
</ToolsPanelItem>
|
|
186
|
+
|
|
187
|
+
<ToolsPanelItem
|
|
188
|
+
label={ __( 'Display author' ) }
|
|
189
|
+
hasValue={ () => !! displayAuthor }
|
|
190
|
+
onDeselect={ () =>
|
|
191
|
+
setAttributes( { displayAuthor: false } )
|
|
192
|
+
}
|
|
193
|
+
isShownByDefault
|
|
194
|
+
>
|
|
195
|
+
<ToggleControl
|
|
196
|
+
__nextHasNoMarginBottom
|
|
197
|
+
label={ __( 'Display author' ) }
|
|
198
|
+
checked={ displayAuthor }
|
|
199
|
+
onChange={ toggleAttribute( 'displayAuthor' ) }
|
|
200
|
+
/>
|
|
201
|
+
</ToolsPanelItem>
|
|
202
|
+
|
|
203
|
+
<ToolsPanelItem
|
|
204
|
+
label={ __( 'Display date' ) }
|
|
205
|
+
hasValue={ () => !! displayDate }
|
|
206
|
+
onDeselect={ () =>
|
|
207
|
+
setAttributes( { displayDate: false } )
|
|
208
|
+
}
|
|
209
|
+
isShownByDefault
|
|
210
|
+
>
|
|
211
|
+
<ToggleControl
|
|
212
|
+
__nextHasNoMarginBottom
|
|
213
|
+
label={ __( 'Display date' ) }
|
|
214
|
+
checked={ displayDate }
|
|
215
|
+
onChange={ toggleAttribute( 'displayDate' ) }
|
|
216
|
+
/>
|
|
217
|
+
</ToolsPanelItem>
|
|
218
|
+
|
|
219
|
+
<ToolsPanelItem
|
|
220
|
+
label={ __( 'Display excerpt' ) }
|
|
221
|
+
hasValue={ () => !! displayExcerpt }
|
|
222
|
+
onDeselect={ () =>
|
|
223
|
+
setAttributes( { displayExcerpt: false } )
|
|
224
|
+
}
|
|
225
|
+
isShownByDefault
|
|
226
|
+
>
|
|
227
|
+
<ToggleControl
|
|
228
|
+
__nextHasNoMarginBottom
|
|
229
|
+
label={ __( 'Display excerpt' ) }
|
|
230
|
+
checked={ displayExcerpt }
|
|
231
|
+
onChange={ toggleAttribute( 'displayExcerpt' ) }
|
|
232
|
+
/>
|
|
233
|
+
</ToolsPanelItem>
|
|
234
|
+
|
|
235
|
+
{ displayExcerpt && (
|
|
236
|
+
<ToolsPanelItem
|
|
237
|
+
label={ __( 'Max number of words in excerpt' ) }
|
|
238
|
+
hasValue={ () => excerptLength !== 55 }
|
|
239
|
+
onDeselect={ () =>
|
|
240
|
+
setAttributes( { excerptLength: 55 } )
|
|
241
|
+
}
|
|
242
|
+
isShownByDefault
|
|
243
|
+
>
|
|
244
|
+
<RangeControl
|
|
245
|
+
__nextHasNoMarginBottom
|
|
246
|
+
__next40pxDefaultSize
|
|
247
|
+
label={ __( 'Max number of words in excerpt' ) }
|
|
248
|
+
value={ excerptLength }
|
|
249
|
+
onChange={ ( value ) =>
|
|
250
|
+
setAttributes( { excerptLength: value } )
|
|
251
|
+
}
|
|
252
|
+
min={ 10 }
|
|
253
|
+
max={ 100 }
|
|
254
|
+
required
|
|
255
|
+
/>
|
|
256
|
+
</ToolsPanelItem>
|
|
188
257
|
) }
|
|
258
|
+
|
|
189
259
|
{ blockLayout === 'grid' && (
|
|
190
|
-
<
|
|
191
|
-
__nextHasNoMarginBottom
|
|
192
|
-
__next40pxDefaultSize
|
|
260
|
+
<ToolsPanelItem
|
|
193
261
|
label={ __( 'Columns' ) }
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
262
|
+
hasValue={ () => columns !== 2 }
|
|
263
|
+
onDeselect={ () => setAttributes( { columns: 2 } ) }
|
|
264
|
+
isShownByDefault
|
|
265
|
+
>
|
|
266
|
+
<RangeControl
|
|
267
|
+
__nextHasNoMarginBottom
|
|
268
|
+
__next40pxDefaultSize
|
|
269
|
+
label={ __( 'Columns' ) }
|
|
270
|
+
value={ columns }
|
|
271
|
+
onChange={ ( value ) =>
|
|
272
|
+
setAttributes( { columns: value } )
|
|
273
|
+
}
|
|
274
|
+
min={ 2 }
|
|
275
|
+
max={ 6 }
|
|
276
|
+
required
|
|
277
|
+
/>
|
|
278
|
+
</ToolsPanelItem>
|
|
202
279
|
) }
|
|
203
280
|
|
|
204
|
-
<
|
|
205
|
-
__nextHasNoMarginBottom
|
|
281
|
+
<ToolsPanelItem
|
|
206
282
|
label={ __( 'Open links in new tab' ) }
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
setAttributes( { openInNewTab:
|
|
283
|
+
hasValue={ () => !! openInNewTab }
|
|
284
|
+
onDeselect={ () =>
|
|
285
|
+
setAttributes( { openInNewTab: false } )
|
|
210
286
|
}
|
|
211
|
-
|
|
212
|
-
|
|
287
|
+
isShownByDefault
|
|
288
|
+
>
|
|
289
|
+
<ToggleControl
|
|
290
|
+
__nextHasNoMarginBottom
|
|
291
|
+
label={ __( 'Open links in new tab' ) }
|
|
292
|
+
checked={ openInNewTab }
|
|
293
|
+
onChange={ ( value ) =>
|
|
294
|
+
setAttributes( { openInNewTab: value } )
|
|
295
|
+
}
|
|
296
|
+
/>
|
|
297
|
+
</ToolsPanelItem>
|
|
298
|
+
</ToolsPanel>
|
|
213
299
|
</InspectorControls>
|
|
214
300
|
<InspectorControls group="advanced">
|
|
215
301
|
<TextControl
|