@wordpress/block-library 6.0.1 → 6.0.5
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/build/block/edit.js +1 -1
- package/build/block/edit.js.map +1 -1
- package/build/button/deprecated.js +155 -10
- package/build/button/deprecated.js.map +1 -1
- package/build/button/edit.native.js +257 -330
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +4 -1
- package/build/button/index.js.map +1 -1
- package/build/buttons/deprecated.js +84 -2
- package/build/buttons/deprecated.js.map +1 -1
- package/build/buttons/edit.js +6 -42
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/index.js +16 -14
- package/build/buttons/index.js.map +1 -1
- package/build/buttons/save.js +4 -20
- package/build/buttons/save.js.map +1 -1
- package/build/buttons/transforms.js +15 -10
- package/build/buttons/transforms.js.map +1 -1
- package/build/categories/edit.js +16 -6
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +4 -0
- package/build/categories/index.js.map +1 -1
- package/build/code/edit.native.js +8 -5
- package/build/code/edit.native.js.map +1 -1
- package/build/code/index.js +24 -1
- package/build/code/index.js.map +1 -1
- package/build/column/edit.js +4 -2
- package/build/column/edit.js.map +1 -1
- package/build/column/index.js +4 -0
- package/build/column/index.js.map +1 -1
- package/build/column/save.js +7 -3
- package/build/column/save.js.map +1 -1
- package/build/columns/edit.js +1 -1
- package/build/columns/edit.js.map +1 -1
- package/build/columns/index.js +1 -0
- package/build/columns/index.js.map +1 -1
- package/build/columns/save.js +7 -2
- package/build/columns/save.js.map +1 -1
- package/build/comment-author-avatar/edit.js +83 -0
- package/build/comment-author-avatar/edit.js.map +1 -0
- package/build/{post-comment-date → comment-author-avatar}/index.js +25 -9
- package/build/comment-author-avatar/index.js.map +1 -0
- package/build/comment-author-name/deprecated.js +69 -0
- package/build/comment-author-name/deprecated.js.map +1 -0
- package/build/comment-author-name/edit.js +112 -0
- package/build/comment-author-name/edit.js.map +1 -0
- package/build/comment-author-name/index.js +77 -0
- package/build/comment-author-name/index.js.map +1 -0
- package/build/comment-content/edit.js +74 -0
- package/build/comment-content/edit.js.map +1 -0
- package/build/comment-content/index.js +68 -0
- package/build/comment-content/index.js.map +1 -0
- package/build/comment-date/deprecated.js +68 -0
- package/build/comment-date/deprecated.js.map +1 -0
- package/build/comment-date/edit.js +95 -0
- package/build/comment-date/edit.js.map +1 -0
- package/build/comment-date/index.js +72 -0
- package/build/comment-date/index.js.map +1 -0
- package/build/comment-edit-link/edit.js +61 -0
- package/build/comment-edit-link/edit.js.map +1 -0
- package/build/comment-edit-link/index.js +67 -0
- package/build/comment-edit-link/index.js.map +1 -0
- package/build/comment-reply-link/edit.js +63 -0
- package/build/comment-reply-link/edit.js.map +1 -0
- package/build/comment-reply-link/index.js +63 -0
- package/build/comment-reply-link/index.js.map +1 -0
- package/build/comment-template/edit.js +82 -0
- package/build/comment-template/edit.js.map +1 -0
- package/build/{post-comment-content → comment-template}/index.js +13 -8
- package/build/comment-template/index.js.map +1 -0
- package/build/comment-template/save.js +18 -0
- package/build/comment-template/save.js.map +1 -0
- package/build/comments-query-loop/edit.js +64 -0
- package/build/comments-query-loop/edit.js.map +1 -0
- package/build/comments-query-loop/index.js +67 -0
- package/build/comments-query-loop/index.js.map +1 -0
- package/build/comments-query-loop/save.js +22 -0
- package/build/comments-query-loop/save.js.map +1 -0
- package/build/comments-query-loop/toolbar.js +54 -0
- package/build/comments-query-loop/toolbar.js.map +1 -0
- package/build/cover/deprecated.js +180 -20
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit.js +62 -28
- package/build/cover/edit.js.map +1 -1
- package/build/cover/edit.native.js +6 -2
- package/build/cover/edit.native.js.map +1 -1
- package/build/cover/index.js +12 -1
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +17 -14
- package/build/cover/save.js.map +1 -1
- package/build/cover/shared.js +3 -2
- package/build/cover/shared.js.map +1 -1
- package/build/embed/edit.native.js +4 -8
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-bottom-sheet.native.js +4 -5
- package/build/embed/embed-bottom-sheet.native.js.map +1 -1
- package/build/embed/embed-no-preview.native.js +2 -1
- package/build/embed/embed-no-preview.native.js.map +1 -1
- package/build/embed/icons.js +16 -1
- package/build/embed/icons.js.map +1 -1
- package/build/embed/transforms.native.js +3 -1
- package/build/embed/transforms.native.js.map +1 -1
- package/build/embed/variations.js +20 -0
- package/build/embed/variations.js.map +1 -1
- package/build/freeform/edit.js +16 -4
- package/build/freeform/edit.js.map +1 -1
- package/build/gallery/edit.js +7 -0
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +1 -1
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js +6 -1
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/save.js +7 -2
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared.js +0 -7
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/use-get-media.js +4 -10
- package/build/gallery/use-get-media.js.map +1 -1
- package/build/gallery/use-mobile-warning.js +43 -0
- package/build/gallery/use-mobile-warning.js.map +1 -0
- package/build/group/edit.js +1 -1
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/group/save.js +4 -5
- package/build/group/save.js.map +1 -1
- package/build/group/variations.js +2 -1
- package/build/group/variations.js.map +1 -1
- package/build/heading/autogenerate-anchors.js +90 -0
- package/build/heading/autogenerate-anchors.js.map +1 -0
- package/build/heading/edit.js +42 -5
- package/build/heading/edit.js.map +1 -1
- package/build/heading/index.js +14 -2
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +14 -2
- package/build/heading/transforms.js.map +1 -1
- package/build/image/edit.native.js +126 -60
- package/build/image/edit.native.js.map +1 -1
- package/build/image/index.js +1 -1
- package/build/image/transforms.js +2 -1
- package/build/image/transforms.js.map +1 -1
- package/build/index.js +83 -70
- package/build/index.js.map +1 -1
- package/build/index.native.js +3 -1
- package/build/index.native.js.map +1 -1
- package/build/list/deprecated.js +111 -0
- package/build/list/deprecated.js.map +1 -0
- package/build/list/index.js +15 -3
- package/build/list/index.js.map +1 -1
- package/build/media-text/edit.js +1 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/save.js +3 -3
- package/build/media-text/save.js.map +1 -1
- package/build/navigation/deprecated.js +340 -23
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +372 -0
- package/build/navigation/edit/index.js.map +1 -0
- package/build/navigation/edit/inner-blocks.js +100 -0
- package/build/navigation/edit/inner-blocks.js.map +1 -0
- package/build/navigation/edit/navigation-menu-delete-control.js +60 -0
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -0
- package/build/navigation/edit/navigation-menu-name-control.js +27 -0
- package/build/navigation/edit/navigation-menu-name-control.js.map +1 -0
- package/build/navigation/edit/navigation-menu-name-modal.js +54 -0
- package/build/navigation/edit/navigation-menu-name-modal.js.map +1 -0
- package/build/navigation/edit/navigation-menu-publish-button.js +53 -0
- package/build/navigation/edit/navigation-menu-publish-button.js.map +1 -0
- package/build/navigation/edit/navigation-menu-selector.js +49 -0
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -0
- package/build/navigation/edit/placeholder/index.js +207 -0
- package/build/navigation/edit/placeholder/index.js.map +1 -0
- package/build/navigation/{placeholder-preview.js → edit/placeholder/placeholder-preview.js} +14 -2
- package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -0
- package/build/navigation/{responsive-wrapper.js → edit/responsive-wrapper.js} +9 -5
- package/build/navigation/edit/responsive-wrapper.js.map +1 -0
- package/build/navigation/edit/unsaved-inner-blocks.js +153 -0
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -0
- package/build/navigation/{block-navigation-list.js → edit/use-list-view-modal.js} +34 -3
- package/build/navigation/edit/use-list-view-modal.js.map +1 -0
- package/build/navigation/index.js +25 -13
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/save.js +10 -1
- package/build/navigation/save.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +40 -0
- package/build/navigation/use-navigation-menu.js.map +1 -0
- package/build/navigation/use-template-part-area-label.js +74 -0
- package/build/navigation/use-template-part-area-label.js.map +1 -0
- package/build/navigation/view.js +29 -26
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-area/edit.js +97 -0
- package/build/navigation-area/edit.js.map +1 -0
- package/build/navigation-area/index.js +61 -0
- package/build/navigation-area/index.js.map +1 -0
- package/build/navigation-area/inner-blocks.js +33 -0
- package/build/navigation-area/inner-blocks.js.map +1 -0
- package/build/navigation-area/save.js +18 -0
- package/build/navigation-area/save.js.map +1 -0
- package/build/navigation-link/edit.js +69 -7
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/transforms.js +5 -1
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -2
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +125 -84
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +1 -35
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.native.js +2 -1
- package/build/paragraph/edit.native.js.map +1 -1
- package/build/paragraph/index.js +8 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +8 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/pattern/edit.js +43 -0
- package/build/pattern/edit.js.map +1 -0
- package/build/{post-comment-author → pattern}/index.js +11 -10
- package/build/pattern/index.js.map +1 -0
- package/build/post-author/index.js +12 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-comment/edit.js +7 -8
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-comment/index.js +4 -3
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comment/save.js +5 -1
- package/build/post-comment/save.js.map +1 -1
- package/build/post-comments/index.js +8 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +7 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +9 -2
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +8 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +2 -2
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/deprecated.js +71 -0
- package/build/post-date/deprecated.js.map +1 -0
- package/build/post-date/edit.js +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +12 -2
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +12 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/index.js +5 -1
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +8 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +8 -4
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +2 -6
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +7 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-terms/use-post-terms.js +3 -1
- package/build/post-terms/use-post-terms.js.map +1 -1
- package/build/post-title/deprecated.js +84 -0
- package/build/post-title/deprecated.js.map +1 -0
- package/build/post-title/edit.js +1 -1
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +14 -2
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.js +5 -2
- package/build/preformatted/edit.js.map +1 -1
- package/build/preformatted/edit.native.js +16 -6
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/index.js +9 -1
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/blockquote.native.js +14 -2
- package/build/pullquote/blockquote.native.js.map +1 -1
- package/build/pullquote/edit.native.js +124 -0
- package/build/pullquote/edit.native.js.map +1 -0
- package/build/pullquote/figure.native.js +20 -8
- package/build/pullquote/figure.native.js.map +1 -1
- package/build/pullquote/index.js +12 -0
- package/build/pullquote/index.js.map +1 -1
- package/build/query/edit/index.js +1 -1
- package/build/query/edit/index.js.map +1 -1
- package/build/query/save.js +5 -1
- package/build/query/save.js.map +1 -1
- package/build/query-pagination/edit.js +1 -1
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination-next/index.js +8 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +8 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/deprecated.js +70 -0
- package/build/query-title/deprecated.js.map +1 -0
- package/build/query-title/index.js +17 -2
- package/build/query-title/index.js.map +1 -1
- package/build/quote/deprecated.js +9 -0
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/index.js +17 -1
- package/build/quote/index.js.map +1 -1
- package/build/search/edit.js +27 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +38 -7
- package/build/search/edit.native.js.map +1 -1
- package/build/separator/separator-settings.js +1 -0
- package/build/separator/separator-settings.js.map +1 -1
- package/build/site-logo/edit.js +46 -21
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +6 -0
- package/build/site-logo/index.js.map +1 -1
- package/build/site-tagline/deprecated.js +68 -0
- package/build/site-tagline/deprecated.js.map +1 -0
- package/build/site-tagline/index.js +11 -3
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/deprecated.js +81 -0
- package/build/site-title/deprecated.js.map +1 -0
- package/build/site-title/index.js +15 -2
- package/build/site-title/index.js.map +1 -1
- package/build/social-links/edit.js +2 -1
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +1 -0
- package/build/social-links/index.js.map +1 -1
- package/build/social-links/save.js +7 -2
- package/build/social-links/save.js.map +1 -1
- package/build/table/index.js +11 -0
- package/build/table/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +1 -1
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder/index.js +3 -3
- package/build/template-part/edit/placeholder/index.js.map +1 -1
- package/build/template-part/edit/placeholder/patterns-setup.js +3 -2
- package/build/template-part/edit/placeholder/patterns-setup.js.map +1 -1
- package/build/template-part/edit/selection/template-part-previews.js +1 -1
- package/build/template-part/edit/selection/template-part-previews.js.map +1 -1
- package/build/template-part/variations.js +1 -1
- package/build/template-part/variations.js.map +1 -1
- package/build/term-description/edit.js +1 -1
- package/build/term-description/edit.js.map +1 -1
- package/build/term-description/index.js +4 -1
- package/build/term-description/index.js.map +1 -1
- package/build/utils/clean-empty-object.js +31 -0
- package/build/utils/clean-empty-object.js.map +1 -0
- package/build/utils/migrate-font-family.js +49 -0
- package/build/utils/migrate-font-family.js.map +1 -0
- package/build/verse/deprecated.js +93 -14
- package/build/verse/deprecated.js.map +1 -1
- package/build/verse/index.js +10 -1
- package/build/verse/index.js.map +1 -1
- package/build-module/block/edit.js +1 -1
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/deprecated.js +155 -11
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/edit.native.js +259 -331
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +4 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/deprecated.js +82 -3
- package/build-module/buttons/deprecated.js.map +1 -1
- package/build-module/buttons/edit.js +6 -39
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/index.js +16 -13
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/buttons/save.js +4 -18
- package/build-module/buttons/save.js.map +1 -1
- package/build-module/buttons/transforms.js +15 -10
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/categories/edit.js +16 -6
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +4 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/edit.native.js +9 -5
- package/build-module/code/edit.native.js.map +1 -1
- package/build-module/code/index.js +24 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/edit.js +4 -2
- package/build-module/column/edit.js.map +1 -1
- package/build-module/column/index.js +4 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/column/save.js +6 -4
- package/build-module/column/save.js.map +1 -1
- package/build-module/columns/edit.js +1 -1
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/index.js +1 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/columns/save.js +5 -3
- package/build-module/columns/save.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +69 -0
- package/build-module/comment-author-avatar/edit.js.map +1 -0
- package/build-module/comment-author-avatar/index.js +52 -0
- package/build-module/comment-author-avatar/index.js.map +1 -0
- package/build-module/comment-author-name/deprecated.js +58 -0
- package/build-module/comment-author-name/deprecated.js.map +1 -0
- package/build-module/comment-author-name/edit.js +97 -0
- package/build-module/comment-author-name/edit.js.map +1 -0
- package/build-module/comment-author-name/index.js +63 -0
- package/build-module/comment-author-name/index.js.map +1 -0
- package/build-module/comment-content/edit.js +61 -0
- package/build-module/comment-content/edit.js.map +1 -0
- package/build-module/comment-content/index.js +55 -0
- package/build-module/comment-content/index.js.map +1 -0
- package/build-module/comment-date/deprecated.js +57 -0
- package/build-module/comment-date/deprecated.js.map +1 -0
- package/build-module/comment-date/edit.js +85 -0
- package/build-module/comment-date/edit.js.map +1 -0
- package/build-module/comment-date/index.js +58 -0
- package/build-module/comment-date/index.js.map +1 -0
- package/build-module/comment-edit-link/edit.js +48 -0
- package/build-module/comment-edit-link/edit.js.map +1 -0
- package/build-module/comment-edit-link/index.js +54 -0
- package/build-module/comment-edit-link/index.js.map +1 -0
- package/build-module/comment-reply-link/edit.js +50 -0
- package/build-module/comment-reply-link/edit.js.map +1 -0
- package/build-module/comment-reply-link/index.js +50 -0
- package/build-module/comment-reply-link/index.js.map +1 -0
- package/build-module/comment-template/edit.js +71 -0
- package/build-module/comment-template/edit.js.map +1 -0
- package/build-module/comment-template/index.js +35 -0
- package/build-module/comment-template/index.js.map +1 -0
- package/build-module/comment-template/save.js +10 -0
- package/build-module/comment-template/save.js.map +1 -0
- package/build-module/comments-query-loop/edit.js +50 -0
- package/build-module/comments-query-loop/edit.js.map +1 -0
- package/build-module/comments-query-loop/index.js +53 -0
- package/build-module/comments-query-loop/index.js.map +1 -0
- package/build-module/comments-query-loop/save.js +14 -0
- package/build-module/comments-query-loop/save.js.map +1 -0
- package/build-module/comments-query-loop/toolbar.js +44 -0
- package/build-module/comments-query-loop/toolbar.js.map +1 -0
- package/build-module/cover/deprecated.js +183 -21
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit.js +62 -28
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/edit.native.js +6 -2
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/cover/index.js +12 -1
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +18 -15
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/shared.js +3 -2
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/embed/edit.native.js +4 -8
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-bottom-sheet.native.js +4 -5
- package/build-module/embed/embed-bottom-sheet.native.js.map +1 -1
- package/build-module/embed/embed-no-preview.native.js +2 -1
- package/build-module/embed/embed-no-preview.native.js.map +1 -1
- package/build-module/embed/icons.js +13 -0
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/embed/transforms.native.js +2 -1
- package/build-module/embed/transforms.native.js.map +1 -1
- package/build-module/embed/variations.js +21 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/freeform/edit.js +16 -5
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/gallery/edit.js +6 -0
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +1 -1
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js +6 -1
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/save.js +5 -3
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared.js +0 -6
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/use-get-media.js +4 -10
- package/build-module/gallery/use-get-media.js.map +1 -1
- package/build-module/gallery/use-mobile-warning.js +32 -0
- package/build-module/gallery/use-mobile-warning.js.map +1 -0
- package/build-module/group/edit.js +1 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/save.js +5 -6
- package/build-module/group/save.js.map +1 -1
- package/build-module/group/variations.js +2 -1
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/autogenerate-anchors.js +77 -0
- package/build-module/heading/autogenerate-anchors.js.map +1 -0
- package/build-module/heading/edit.js +43 -7
- package/build-module/heading/edit.js.map +1 -1
- package/build-module/heading/index.js +14 -2
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +14 -2
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/image/edit.native.js +128 -63
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/index.js +1 -1
- package/build-module/image/transforms.js +2 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/index.js +59 -53
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -2
- package/build-module/index.native.js.map +1 -1
- package/build-module/list/deprecated.js +99 -0
- package/build-module/list/deprecated.js.map +1 -0
- package/build-module/list/index.js +14 -3
- package/build-module/list/index.js.map +1 -1
- package/build-module/media-text/edit.js +1 -1
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/save.js +4 -4
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/navigation/deprecated.js +336 -23
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +346 -0
- package/build-module/navigation/edit/index.js.map +1 -0
- package/build-module/navigation/edit/inner-blocks.js +87 -0
- package/build-module/navigation/edit/inner-blocks.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js +50 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js +17 -0
- package/build-module/navigation/edit/navigation-menu-name-control.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-name-modal.js +46 -0
- package/build-module/navigation/edit/navigation-menu-name-modal.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-publish-button.js +40 -0
- package/build-module/navigation/edit/navigation-menu-publish-button.js.map +1 -0
- package/build-module/navigation/edit/navigation-menu-selector.js +36 -0
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -0
- package/build-module/navigation/edit/placeholder/index.js +189 -0
- package/build-module/navigation/edit/placeholder/index.js.map +1 -0
- package/build-module/navigation/{placeholder-preview.js → edit/placeholder/placeholder-preview.js} +11 -2
- package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -0
- package/build-module/navigation/{responsive-wrapper.js → edit/responsive-wrapper.js} +9 -5
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -0
- package/build-module/navigation/edit/unsaved-inner-blocks.js +136 -0
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -0
- package/build-module/navigation/{block-navigation-list.js → edit/use-list-view-modal.js} +31 -2
- package/build-module/navigation/edit/use-list-view-modal.js.map +1 -0
- package/build-module/navigation/index.js +25 -12
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/save.js +10 -1
- package/build-module/navigation/save.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +31 -0
- package/build-module/navigation/use-navigation-menu.js.map +1 -0
- package/build-module/navigation/use-template-part-area-label.js +63 -0
- package/build-module/navigation/use-template-part-area-label.js.map +1 -0
- package/build-module/navigation/view.js +28 -26
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-area/edit.js +82 -0
- package/build-module/navigation-area/edit.js.map +1 -0
- package/build-module/navigation-area/index.js +47 -0
- package/build-module/navigation-area/index.js.map +1 -0
- package/build-module/navigation-area/inner-blocks.js +25 -0
- package/build-module/navigation-area/inner-blocks.js.map +1 -0
- package/build-module/navigation-area/save.js +10 -0
- package/build-module/navigation-area/save.js.map +1 -0
- package/build-module/navigation-link/edit.js +72 -10
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/transforms.js +5 -1
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -2
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +127 -86
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +1 -35
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.native.js +2 -1
- package/build-module/paragraph/edit.native.js.map +1 -1
- package/build-module/paragraph/index.js +8 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +8 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/pattern/edit.js +35 -0
- package/build-module/pattern/edit.js.map +1 -0
- package/build-module/pattern/index.js +29 -0
- package/build-module/pattern/index.js.map +1 -0
- package/build-module/post-author/index.js +12 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-comment/edit.js +8 -9
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comment/index.js +4 -3
- package/build-module/post-comment/index.js.map +1 -1
- package/build-module/post-comment/save.js +4 -2
- package/build-module/post-comment/save.js.map +1 -1
- package/build-module/post-comments/index.js +8 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +7 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +9 -2
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +8 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +2 -2
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/deprecated.js +60 -0
- package/build-module/post-date/deprecated.js.map +1 -0
- package/build-module/post-date/edit.js +1 -1
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +11 -2
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +12 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/index.js +5 -1
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +8 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +10 -5
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +2 -6
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +7 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-terms/use-post-terms.js +3 -1
- package/build-module/post-terms/use-post-terms.js.map +1 -1
- package/build-module/post-title/deprecated.js +73 -0
- package/build-module/post-title/deprecated.js.map +1 -0
- package/build-module/post-title/edit.js +1 -1
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +13 -2
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.js +5 -2
- package/build-module/preformatted/edit.js.map +1 -1
- package/build-module/preformatted/edit.native.js +17 -6
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/index.js +9 -1
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/blockquote.native.js +14 -2
- package/build-module/pullquote/blockquote.native.js.map +1 -1
- package/build-module/pullquote/edit.native.js +112 -0
- package/build-module/pullquote/edit.native.js.map +1 -0
- package/build-module/pullquote/figure.native.js +20 -9
- package/build-module/pullquote/figure.native.js.map +1 -1
- package/build-module/pullquote/index.js +12 -0
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/edit/index.js +1 -1
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/save.js +4 -2
- package/build-module/query/save.js.map +1 -1
- package/build-module/query-pagination/edit.js +1 -1
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination-next/index.js +8 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +8 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/deprecated.js +59 -0
- package/build-module/query-title/deprecated.js.map +1 -0
- package/build-module/query-title/index.js +16 -2
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/deprecated.js +9 -0
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/index.js +17 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/search/edit.js +28 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +38 -7
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/separator/separator-settings.js +1 -0
- package/build-module/separator/separator-settings.js.map +1 -1
- package/build-module/site-logo/edit.js +49 -26
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +6 -0
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-tagline/deprecated.js +57 -0
- package/build-module/site-tagline/deprecated.js.map +1 -0
- package/build-module/site-tagline/index.js +10 -3
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/deprecated.js +70 -0
- package/build-module/site-title/deprecated.js.map +1 -0
- package/build-module/site-title/index.js +14 -2
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-links/edit.js +2 -1
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +1 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/social-links/save.js +5 -3
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/table/index.js +11 -0
- package/build-module/table/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +1 -1
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/placeholder/index.js +3 -3
- package/build-module/template-part/edit/placeholder/index.js.map +1 -1
- package/build-module/template-part/edit/placeholder/patterns-setup.js +3 -2
- package/build-module/template-part/edit/placeholder/patterns-setup.js.map +1 -1
- package/build-module/template-part/edit/selection/template-part-previews.js +1 -1
- package/build-module/template-part/edit/selection/template-part-previews.js.map +1 -1
- package/build-module/template-part/variations.js +2 -2
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/term-description/edit.js +1 -1
- package/build-module/term-description/edit.js.map +1 -1
- package/build-module/term-description/index.js +4 -1
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/utils/clean-empty-object.js +22 -0
- package/build-module/utils/clean-empty-object.js.map +1 -0
- package/build-module/utils/migrate-font-family.js +38 -0
- package/build-module/utils/migrate-font-family.js.map +1 -0
- package/build-module/verse/deprecated.js +90 -15
- package/build-module/verse/deprecated.js.map +1 -1
- package/build-module/verse/index.js +10 -1
- package/build-module/verse/index.js.map +1 -1
- package/build-style/button/editor-rtl.css +0 -1
- package/build-style/button/editor.css +0 -1
- package/build-style/button/style-rtl.css +15 -27
- package/build-style/button/style.css +15 -27
- package/build-style/buttons/editor-rtl.css +4 -8
- package/build-style/buttons/editor.css +4 -8
- package/build-style/buttons/style-rtl.css +1 -35
- package/build-style/buttons/style.css +1 -48
- package/build-style/columns/style-rtl.css +1 -1
- package/build-style/columns/style.css +1 -1
- package/build-style/common-rtl.css +2 -16
- package/build-style/common.css +2 -16
- package/build-style/cover/editor-rtl.css +14 -32
- package/build-style/cover/editor.css +14 -32
- package/build-style/cover/style-rtl.css +28 -40
- package/build-style/cover/style.css +28 -40
- package/build-style/editor-rtl.css +198 -145
- package/build-style/editor.css +198 -145
- package/build-style/image/editor-rtl.css +1 -0
- package/build-style/image/editor.css +1 -0
- package/build-style/image/style-rtl.css +4 -0
- package/build-style/image/style.css +4 -0
- package/build-style/media-text/style-rtl.css +1 -0
- package/build-style/media-text/style.css +1 -0
- package/build-style/navigation/editor-rtl.css +58 -16
- package/build-style/navigation/editor.css +58 -16
- package/build-style/navigation/style-rtl.css +51 -112
- package/build-style/navigation/style.css +51 -112
- package/build-style/navigation-link/editor-rtl.css +31 -14
- package/build-style/navigation-link/editor.css +31 -14
- package/build-style/navigation-link/style-rtl.css +1 -1
- package/build-style/navigation-link/style.css +1 -1
- package/build-style/navigation-submenu/editor-rtl.css +1 -1
- package/build-style/navigation-submenu/editor.css +1 -1
- package/build-style/navigation-submenu/style-rtl.css +2 -0
- package/build-style/navigation-submenu/style.css +2 -0
- package/build-style/page-list/style-rtl.css +4 -16
- package/build-style/page-list/style.css +4 -16
- package/build-style/post-author/style-rtl.css +0 -1
- package/build-style/post-author/style.css +0 -1
- package/build-style/post-comments/style-rtl.css +21 -1
- package/build-style/post-comments/style.css +21 -1
- package/build-style/post-comments-form/style-rtl.css +29 -0
- package/build-style/post-comments-form/style.css +29 -0
- package/build-style/post-featured-image/editor-rtl.css +1 -1
- package/build-style/post-featured-image/editor.css +1 -1
- package/build-style/post-featured-image/style-rtl.css +1 -1
- package/build-style/post-featured-image/style.css +1 -1
- package/build-style/quote/theme-rtl.css +1 -1
- package/build-style/quote/theme.css +1 -1
- package/build-style/reset-rtl.css +0 -5
- package/build-style/reset.css +0 -5
- package/build-style/search/style-rtl.css +18 -6
- package/build-style/search/style.css +18 -6
- package/build-style/separator/style-rtl.css +0 -1
- package/build-style/separator/style.css +0 -1
- package/build-style/site-logo/editor-rtl.css +82 -14
- package/build-style/site-logo/editor.css +82 -14
- package/build-style/site-logo/style-rtl.css +6 -2
- package/build-style/site-logo/style.css +6 -2
- package/build-style/social-link/editor-rtl.css +4 -0
- package/build-style/social-link/editor.css +4 -0
- package/build-style/social-links/editor-rtl.css +4 -0
- package/build-style/social-links/editor.css +4 -0
- package/build-style/social-links/style-rtl.css +7 -1
- package/build-style/social-links/style.css +7 -1
- package/build-style/style-rtl.css +192 -261
- package/build-style/style.css +192 -274
- package/build-style/template-part/editor-rtl.css +0 -7
- package/build-style/template-part/editor.css +0 -7
- package/build-style/theme-rtl.css +1 -1
- package/build-style/theme.css +1 -1
- package/package.json +20 -19
- package/src/audio/test/edit.native.js +4 -0
- package/src/block/edit.js +1 -1
- package/src/button/block.json +4 -1
- package/src/button/deprecated.js +149 -4
- package/src/button/edit.native.js +319 -366
- package/src/button/editor.scss +0 -1
- package/src/button/style.scss +18 -41
- package/src/buttons/block.json +15 -10
- package/src/buttons/deprecated.js +76 -3
- package/src/buttons/edit.js +4 -49
- package/src/buttons/editor.scss +8 -9
- package/src/buttons/index.js +0 -2
- package/src/buttons/save.js +4 -21
- package/src/buttons/style.scss +1 -51
- package/src/categories/block.json +4 -0
- package/src/categories/edit.js +36 -18
- package/src/categories/index.php +3 -0
- package/src/code/block.json +24 -1
- package/src/code/edit.native.js +12 -14
- package/src/column/block.json +4 -0
- package/src/column/edit.js +8 -2
- package/src/column/save.js +9 -12
- package/src/columns/block.json +1 -0
- package/src/columns/edit.js +1 -1
- package/src/columns/save.js +5 -6
- package/src/columns/style.scss +1 -1
- package/src/comment-author-avatar/block.json +34 -0
- package/src/comment-author-avatar/edit.js +96 -0
- package/src/comment-author-avatar/index.js +18 -0
- package/src/comment-author-avatar/index.php +62 -0
- package/src/comment-author-name/block.json +43 -0
- package/src/comment-author-name/deprecated.js +50 -0
- package/src/comment-author-name/edit.js +124 -0
- package/src/comment-author-name/index.js +20 -0
- package/src/comment-author-name/index.php +57 -0
- package/src/comment-content/block.json +37 -0
- package/src/comment-content/edit.js +80 -0
- package/src/{post-comment-content → comment-content}/index.js +1 -1
- package/src/comment-content/index.php +56 -0
- package/src/comment-date/block.json +38 -0
- package/src/comment-date/deprecated.js +49 -0
- package/src/comment-date/edit.js +106 -0
- package/src/{post-comment-date → comment-date}/index.js +2 -0
- package/src/comment-date/index.php +56 -0
- package/src/comment-edit-link/block.json +36 -0
- package/src/comment-edit-link/edit.js +68 -0
- package/src/{post-comment-author → comment-edit-link}/index.js +5 -5
- package/src/comment-edit-link/index.php +58 -0
- package/src/comment-reply-link/block.json +32 -0
- package/src/comment-reply-link/edit.js +59 -0
- package/src/comment-reply-link/index.js +18 -0
- package/src/comment-reply-link/index.php +80 -0
- package/src/comment-template/block.json +15 -0
- package/src/comment-template/edit.js +100 -0
- package/src/comment-template/index.js +20 -0
- package/src/comment-template/index.php +65 -0
- package/src/comment-template/save.js +8 -0
- package/src/comments-query-loop/block.json +33 -0
- package/src/comments-query-loop/edit.js +53 -0
- package/src/comments-query-loop/index.js +20 -0
- package/src/comments-query-loop/save.js +14 -0
- package/src/comments-query-loop/toolbar.js +57 -0
- package/src/common.scss +3 -17
- package/src/cover/block.json +12 -1
- package/src/cover/deprecated.js +707 -510
- package/src/cover/edit.js +70 -42
- package/src/cover/edit.native.js +5 -1
- package/src/cover/editor.scss +20 -38
- package/src/cover/save.js +30 -26
- package/src/cover/shared.js +3 -2
- package/src/cover/style.scss +9 -7
- package/src/editor.scss +4 -20
- package/src/embed/edit.native.js +6 -9
- package/src/embed/embed-bottom-sheet.native.js +4 -5
- package/src/embed/embed-no-preview.native.js +1 -0
- package/src/embed/icons.js +11 -0
- package/src/embed/test/__snapshots__/index.native.js.snap +181 -0
- package/src/embed/test/index.native.js +991 -0
- package/src/embed/transforms.native.js +2 -0
- package/src/embed/variations.js +21 -0
- package/src/file/test/__snapshots__/edit.native.js.snap +6 -3
- package/src/file/test/edit.native.js +4 -0
- package/src/freeform/edit.js +14 -4
- package/src/gallery/block.json +6 -1
- package/src/gallery/edit.js +7 -0
- package/src/gallery/editor.scss +0 -1
- package/src/gallery/gallery.js +1 -4
- package/src/gallery/gallery.native.js +1 -4
- package/src/gallery/index.php +52 -0
- package/src/gallery/save.js +9 -3
- package/src/gallery/shared.js +0 -7
- package/src/gallery/use-get-media.js +6 -11
- package/src/gallery/use-mobile-warning.js +28 -0
- package/src/group/block.json +1 -0
- package/src/group/edit.js +1 -1
- package/src/group/save.js +3 -8
- package/src/group/variations.js +1 -1
- package/src/heading/autogenerate-anchors.js +81 -0
- package/src/heading/block.json +14 -2
- package/src/heading/edit.js +42 -4
- package/src/home-link/index.php +3 -1
- package/src/image/block.json +1 -1
- package/src/image/edit.native.js +120 -64
- package/src/image/editor.scss +1 -0
- package/src/image/index.php +42 -0
- package/src/image/style.scss +8 -2
- package/src/image/test/edit.native.js +225 -40
- package/src/image/transforms.js +4 -0
- package/src/index.js +96 -88
- package/src/index.native.js +1 -1
- package/src/list/block.json +11 -2
- package/src/list/deprecated.js +79 -0
- package/src/list/index.js +2 -0
- package/src/media-text/edit.js +1 -1
- package/src/media-text/save.js +6 -4
- package/src/media-text/style.scss +1 -0
- package/src/navigation/block.json +41 -13
- package/src/navigation/deprecated.js +336 -27
- package/src/navigation/edit/index.js +510 -0
- package/src/navigation/edit/inner-blocks.js +134 -0
- package/src/navigation/edit/navigation-menu-delete-control.js +81 -0
- package/src/navigation/edit/navigation-menu-name-control.js +22 -0
- package/src/navigation/edit/navigation-menu-name-modal.js +69 -0
- package/src/navigation/edit/navigation-menu-publish-button.js +57 -0
- package/src/navigation/edit/navigation-menu-selector.js +42 -0
- package/src/navigation/edit/placeholder/index.js +257 -0
- package/src/navigation/{placeholder-preview.js → edit/placeholder/placeholder-preview.js} +13 -2
- package/src/navigation/{responsive-wrapper.js → edit/responsive-wrapper.js} +8 -6
- package/src/navigation/edit/unsaved-inner-blocks.js +197 -0
- package/src/navigation/edit/use-list-view-modal.js +72 -0
- package/src/navigation/editor.scss +86 -31
- package/src/navigation/index.js +0 -2
- package/src/navigation/index.php +54 -107
- package/src/navigation/save.js +7 -1
- package/src/navigation/style.scss +81 -155
- package/src/navigation/use-navigation-menu.js +60 -0
- package/src/navigation/use-template-part-area-label.js +78 -0
- package/src/navigation/view.js +33 -32
- package/src/navigation-area/block.json +27 -0
- package/src/navigation-area/edit.js +105 -0
- package/src/navigation-area/index.js +26 -0
- package/src/navigation-area/index.php +21 -0
- package/src/navigation-area/inner-blocks.js +24 -0
- package/src/navigation-area/save.js +8 -0
- package/src/navigation-link/edit.js +97 -12
- package/src/navigation-link/editor.scss +30 -19
- package/src/navigation-link/index.php +8 -10
- package/src/navigation-link/style.scss +1 -1
- package/src/navigation-link/transforms.js +5 -1
- package/src/navigation-submenu/edit.js +2 -2
- package/src/navigation-submenu/editor.scss +1 -1
- package/src/navigation-submenu/index.php +10 -9
- package/src/navigation-submenu/style.scss +5 -0
- package/src/page-list/block.json +0 -33
- package/src/page-list/edit.js +168 -110
- package/src/page-list/index.php +27 -26
- package/src/page-list/style.scss +4 -23
- package/src/paragraph/block.json +8 -1
- package/src/paragraph/edit.native.js +1 -0
- package/src/pattern/block.json +17 -0
- package/src/pattern/edit.js +41 -0
- package/src/pattern/index.js +12 -0
- package/src/pattern/index.php +44 -0
- package/src/post-author/block.json +12 -1
- package/src/post-author/style.scss +0 -1
- package/src/post-comment/block.json +4 -3
- package/src/post-comment/edit.js +16 -13
- package/src/post-comment/save.js +4 -6
- package/src/post-comments/block.json +8 -1
- package/src/post-comments/index.php +12 -3
- package/src/post-comments/style.scss +27 -1
- package/src/post-comments-count/block.json +7 -1
- package/src/post-comments-form/block.json +9 -2
- package/src/post-comments-form/index.php +0 -14
- package/src/post-comments-form/style.scss +47 -7
- package/src/post-comments-link/block.json +8 -1
- package/src/post-content/edit.js +2 -2
- package/src/post-date/block.json +8 -1
- package/src/post-date/deprecated.js +52 -0
- package/src/post-date/edit.js +1 -1
- package/src/post-date/index.js +2 -0
- package/src/post-excerpt/block.json +12 -1
- package/src/post-excerpt/edit.js +1 -7
- package/src/post-excerpt/index.php +7 -1
- package/src/post-featured-image/block.json +5 -1
- package/src/post-featured-image/editor.scss +1 -1
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-navigation-link/block.json +8 -1
- package/src/post-navigation-link/index.php +1 -2
- package/src/post-template/edit.js +8 -3
- package/src/post-template/index.php +0 -11
- package/src/post-terms/block.json +7 -1
- package/src/post-terms/edit.js +2 -14
- package/src/post-terms/use-post-terms.js +1 -1
- package/src/post-title/block.json +10 -1
- package/src/post-title/deprecated.js +65 -0
- package/src/post-title/edit.js +1 -1
- package/src/post-title/index.js +2 -0
- package/src/post-title/index.php +7 -2
- package/src/preformatted/block.json +9 -1
- package/src/preformatted/edit.js +2 -1
- package/src/preformatted/edit.native.js +20 -6
- package/src/preformatted/styles.native.scss +5 -0
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +20 -2
- package/src/pullquote/block.json +12 -0
- package/src/pullquote/blockquote.native.js +12 -2
- package/src/pullquote/edit.native.js +129 -0
- package/src/pullquote/figure.native.js +17 -7
- package/src/query/edit/index.js +1 -1
- package/src/query/save.js +4 -6
- package/src/query-pagination/edit.js +1 -1
- package/src/query-pagination-next/block.json +8 -1
- package/src/query-pagination-previous/block.json +8 -1
- package/src/query-title/block.json +13 -1
- package/src/query-title/deprecated.js +51 -0
- package/src/query-title/index.js +2 -0
- package/src/quote/block.json +15 -1
- package/src/quote/deprecated.js +10 -0
- package/src/quote/theme.scss +1 -0
- package/src/reset.scss +0 -9
- package/src/search/edit.js +29 -0
- package/src/search/edit.native.js +46 -12
- package/src/search/style.scss +54 -52
- package/src/search/test/__snapshots__/edit.native.js.snap +33 -5
- package/src/search/test/edit.native.js +4 -0
- package/src/separator/separator-settings.js +1 -0
- package/src/separator/style.scss +0 -1
- package/src/site-logo/block.json +6 -0
- package/src/site-logo/edit.js +59 -34
- package/src/site-logo/editor.scss +101 -16
- package/src/site-logo/index.php +20 -19
- package/src/site-logo/style.scss +8 -2
- package/src/site-tagline/block.json +7 -2
- package/src/site-tagline/deprecated.js +49 -0
- package/src/site-tagline/index.js +2 -0
- package/src/site-title/block.json +11 -1
- package/src/site-title/deprecated.js +62 -0
- package/src/site-title/index.js +2 -0
- package/src/site-title/index.php +3 -0
- package/src/social-link/editor.scss +4 -0
- package/src/social-links/block.json +1 -0
- package/src/social-links/edit.js +2 -1
- package/src/social-links/editor.scss +4 -0
- package/src/social-links/save.js +4 -6
- package/src/social-links/style.scss +8 -1
- package/src/table/block.json +11 -0
- package/src/template-part/edit/inner-blocks.js +1 -1
- package/src/template-part/edit/placeholder/index.js +5 -3
- package/src/template-part/edit/placeholder/patterns-setup.js +3 -2
- package/src/template-part/edit/selection/template-part-previews.js +3 -1
- package/src/template-part/editor.scss +0 -16
- package/src/template-part/index.php +6 -3
- package/src/template-part/variations.js +2 -2
- package/src/term-description/block.json +4 -1
- package/src/term-description/edit.js +1 -1
- package/src/utils/clean-empty-object.js +23 -0
- package/src/utils/migrate-font-family.js +37 -0
- package/src/verse/block.json +10 -1
- package/src/verse/deprecated.js +86 -25
- package/build/buttons/variations.js +0 -33
- package/build/buttons/variations.js.map +0 -1
- package/build/navigation/block-navigation-list.js.map +0 -1
- package/build/navigation/edit.js +0 -304
- package/build/navigation/edit.js.map +0 -1
- package/build/navigation/placeholder-preview.js.map +0 -1
- package/build/navigation/placeholder.js +0 -129
- package/build/navigation/placeholder.js.map +0 -1
- package/build/navigation/responsive-wrapper.js.map +0 -1
- package/build/navigation/use-block-navigator.js +0 -51
- package/build/navigation/use-block-navigator.js.map +0 -1
- package/build/navigation/variations.js +0 -32
- package/build/navigation/variations.js.map +0 -1
- package/build/post-comment-author/edit.js +0 -51
- package/build/post-comment-author/edit.js.map +0 -1
- package/build/post-comment-author/index.js.map +0 -1
- package/build/post-comment-content/edit.js +0 -37
- package/build/post-comment-content/edit.js.map +0 -1
- package/build/post-comment-content/index.js.map +0 -1
- package/build/post-comment-date/edit.js +0 -62
- package/build/post-comment-date/edit.js.map +0 -1
- package/build/post-comment-date/index.js.map +0 -1
- package/build-module/buttons/variations.js +0 -24
- package/build-module/buttons/variations.js.map +0 -1
- package/build-module/navigation/block-navigation-list.js.map +0 -1
- package/build-module/navigation/edit.js +0 -284
- package/build-module/navigation/edit.js.map +0 -1
- package/build-module/navigation/placeholder-preview.js.map +0 -1
- package/build-module/navigation/placeholder.js +0 -113
- package/build-module/navigation/placeholder.js.map +0 -1
- package/build-module/navigation/responsive-wrapper.js.map +0 -1
- package/build-module/navigation/use-block-navigator.js +0 -39
- package/build-module/navigation/use-block-navigator.js.map +0 -1
- package/build-module/navigation/variations.js +0 -23
- package/build-module/navigation/variations.js.map +0 -1
- package/build-module/post-comment-author/edit.js +0 -40
- package/build-module/post-comment-author/edit.js.map +0 -1
- package/build-module/post-comment-author/index.js +0 -31
- package/build-module/post-comment-author/index.js.map +0 -1
- package/build-module/post-comment-content/edit.js +0 -27
- package/build-module/post-comment-content/edit.js.map +0 -1
- package/build-module/post-comment-content/index.js +0 -31
- package/build-module/post-comment-content/index.js.map +0 -1
- package/build-module/post-comment-date/edit.js +0 -52
- package/build-module/post-comment-date/edit.js.map +0 -1
- package/build-module/post-comment-date/index.js +0 -36
- package/build-module/post-comment-date/index.js.map +0 -1
- package/build-style/post-author/editor-rtl.css +0 -104
- package/build-style/post-author/editor.css +0 -104
- package/build-style/query-title/editor-rtl.css +0 -80
- package/build-style/query-title/editor.css +0 -80
- package/build-style/term-description/editor-rtl.css +0 -80
- package/build-style/term-description/editor.css +0 -80
- package/src/buttons/variations.js +0 -24
- package/src/navigation/block-navigation-list.js +0 -38
- package/src/navigation/edit.js +0 -411
- package/src/navigation/placeholder.js +0 -154
- package/src/navigation/use-block-navigator.js +0 -46
- package/src/navigation/variations.js +0 -23
- package/src/post-author/editor.scss +0 -35
- package/src/post-comment-author/block.json +0 -13
- package/src/post-comment-author/edit.js +0 -35
- package/src/post-comment-author/index.php +0 -41
- package/src/post-comment-content/block.json +0 -13
- package/src/post-comment-content/edit.js +0 -32
- package/src/post-comment-content/index.php +0 -42
- package/src/post-comment-date/block.json +0 -18
- package/src/post-comment-date/edit.js +0 -54
- package/src/post-comment-date/index.php +0 -44
- package/src/query-title/editor.scss +0 -4
- package/src/term-description/editor.scss +0 -4
|
@@ -10,13 +10,13 @@ import { View, AccessibilityInfo, Platform, Text } from 'react-native';
|
|
|
10
10
|
* WordPress dependencies
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { useCallback, useEffect, useState, useRef } from '@wordpress/element';
|
|
14
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
14
15
|
import { __, _x } from '@wordpress/i18n';
|
|
15
|
-
import { RichText, InspectorControls, BlockControls,
|
|
16
|
+
import { RichText, InspectorControls, BlockControls, store as blockEditorStore, getColorObjectByAttributeValues, getGradientValueBySlug, __experimentalGetColorClassesAndStyles as getColorClassesAndStyles, useSetting } from '@wordpress/block-editor';
|
|
16
17
|
import { PanelBody, ToolbarGroup, ToolbarButton, LinkSettingsNavigation, UnitControl, getValueAndUnit, BottomSheetSelectControl, CSS_UNITS, filterUnitsWithSettings } from '@wordpress/components';
|
|
17
|
-
import { Component } from '@wordpress/element';
|
|
18
|
-
import { withSelect, withDispatch } from '@wordpress/data';
|
|
19
18
|
import { link } from '@wordpress/icons';
|
|
19
|
+
import { store as editPostStore } from '@wordpress/edit-post';
|
|
20
20
|
/**
|
|
21
21
|
* Internal dependencies
|
|
22
22
|
*/
|
|
@@ -85,119 +85,113 @@ function WidthPanel({
|
|
|
85
85
|
}));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
var _props$attributes, _props$attributes$sty, _props$attributes$sty2;
|
|
91
|
-
|
|
92
|
-
super(props);
|
|
93
|
-
this.onChangeText = this.onChangeText.bind(this);
|
|
94
|
-
this.onChangeBorderRadius = this.onChangeBorderRadius.bind(this);
|
|
95
|
-
this.onChangeBorderRadiusUnit = this.onChangeBorderRadiusUnit.bind(this);
|
|
96
|
-
this.onClearSettings = this.onClearSettings.bind(this);
|
|
97
|
-
this.onLayout = this.onLayout.bind(this);
|
|
98
|
-
this.onSetMaxWidth = this.onSetMaxWidth.bind(this);
|
|
99
|
-
this.dismissSheet = this.dismissSheet.bind(this);
|
|
100
|
-
this.onShowLinkSettings = this.onShowLinkSettings.bind(this);
|
|
101
|
-
this.onHideLinkSettings = this.onHideLinkSettings.bind(this);
|
|
102
|
-
this.onToggleButtonFocus = this.onToggleButtonFocus.bind(this);
|
|
103
|
-
this.onPlaceholderTextWidth = this.onPlaceholderTextWidth.bind(this);
|
|
104
|
-
this.setRef = this.setRef.bind(this);
|
|
105
|
-
this.onRemove = this.onRemove.bind(this);
|
|
106
|
-
this.getPlaceholderWidth = this.getPlaceholderWidth.bind(this);
|
|
107
|
-
const borderRadius = props === null || props === void 0 ? void 0 : (_props$attributes = props.attributes) === null || _props$attributes === void 0 ? void 0 : (_props$attributes$sty = _props$attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : (_props$attributes$sty2 = _props$attributes$sty.border) === null || _props$attributes$sty2 === void 0 ? void 0 : _props$attributes$sty2.radius;
|
|
108
|
-
const {
|
|
109
|
-
valueUnit = 'px'
|
|
110
|
-
} = getValueAndUnit(borderRadius) || {};
|
|
111
|
-
this.state = {
|
|
112
|
-
maxWidth: INITIAL_MAX_WIDTH,
|
|
113
|
-
isLinkSheetVisible: false,
|
|
114
|
-
isButtonFocused: true,
|
|
115
|
-
placeholderTextWidth: 0,
|
|
116
|
-
borderRadiusUnit: valueUnit
|
|
117
|
-
};
|
|
118
|
-
this.linkSettingsActions = [{
|
|
119
|
-
label: __('Remove link'),
|
|
120
|
-
onPress: this.onClearSettings
|
|
121
|
-
}];
|
|
122
|
-
this.linkSettingsOptions = {
|
|
123
|
-
url: {
|
|
124
|
-
label: __('Button Link URL'),
|
|
125
|
-
placeholder: __('Add URL'),
|
|
126
|
-
autoFocus: true,
|
|
127
|
-
autoFill: true
|
|
128
|
-
},
|
|
129
|
-
openInNewTab: {
|
|
130
|
-
label: __('Open in new tab')
|
|
131
|
-
},
|
|
132
|
-
linkRel: {
|
|
133
|
-
label: __('Link Rel'),
|
|
134
|
-
placeholder: _x('None', 'Link rel attribute value placeholder')
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
this.noFocusLinkSettingOptions = { ...this.linkSettingsOptions,
|
|
138
|
-
url: { ...this.linkSettingsOptions.url,
|
|
139
|
-
autoFocus: false
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
}
|
|
88
|
+
function ButtonEdit(props) {
|
|
89
|
+
var _props$attributes, _props$attributes$sty, _props$attributes$sty2, _buttonStyle$border;
|
|
143
90
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
91
|
+
const {
|
|
92
|
+
isSelected,
|
|
93
|
+
parentWidth
|
|
94
|
+
} = props;
|
|
95
|
+
const initialBorderRadius = props === null || props === void 0 ? void 0 : (_props$attributes = props.attributes) === null || _props$attributes === void 0 ? void 0 : (_props$attributes$sty = _props$attributes.style) === null || _props$attributes$sty === void 0 ? void 0 : (_props$attributes$sty2 = _props$attributes$sty.border) === null || _props$attributes$sty2 === void 0 ? void 0 : _props$attributes$sty2.radius;
|
|
96
|
+
const {
|
|
97
|
+
valueUnit = 'px'
|
|
98
|
+
} = getValueAndUnit(initialBorderRadius) || {};
|
|
99
|
+
const {
|
|
100
|
+
editorSidebarOpened,
|
|
101
|
+
numOfButtons
|
|
102
|
+
} = useSelect(select => {
|
|
149
103
|
const {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
parentWidth
|
|
153
|
-
} = this.props;
|
|
104
|
+
isEditorSidebarOpened
|
|
105
|
+
} = select(editPostStore);
|
|
154
106
|
const {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
} =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
107
|
+
getBlockCount,
|
|
108
|
+
getBlockRootClientId
|
|
109
|
+
} = select(blockEditorStore);
|
|
110
|
+
const parentId = getBlockRootClientId(clientId);
|
|
111
|
+
const blockCount = getBlockCount(parentId);
|
|
112
|
+
const currentIsEditorSidebarOpened = isEditorSidebarOpened();
|
|
113
|
+
return {
|
|
114
|
+
editorSidebarOpened: isSelected && currentIsEditorSidebarOpened,
|
|
115
|
+
numOfButtons: blockCount
|
|
116
|
+
};
|
|
117
|
+
}, [clientId, isSelected]);
|
|
118
|
+
const {
|
|
119
|
+
closeGeneralSidebar
|
|
120
|
+
} = useDispatch(editPostStore);
|
|
121
|
+
const [maxWidth, setMaxWidth] = useState(INITIAL_MAX_WIDTH);
|
|
122
|
+
const [isLinkSheetVisible, setIsLinkSheetVisible] = useState(false);
|
|
123
|
+
const [isButtonFocused, setIsButtonFocused] = useState(true);
|
|
124
|
+
const [placeholderTextWidth, setPlaceholderTextWidth] = useState(0);
|
|
125
|
+
const [borderRadiusUnit, setBorderRadiusUnit] = useState(valueUnit);
|
|
126
|
+
const richTextRef = useRef();
|
|
127
|
+
const colors = useSetting('color.palette') || [];
|
|
128
|
+
const gradients = useSetting('color.gradients') || [];
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
if (isSelected) {
|
|
131
|
+
onToggleButtonFocus(true);
|
|
161
132
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
133
|
+
}, [isSelected]);
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
onSetMaxWidth(null, true);
|
|
136
|
+
}, [parentWidth]);
|
|
137
|
+
useEffect(() => {
|
|
138
|
+
// Blur `RichText` on Android when link settings sheet or button settings sheet is opened,
|
|
166
139
|
// to avoid flashing caret after closing one of them
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
this.richTextRef.blur();
|
|
172
|
-
this.onToggleButtonFocus(false);
|
|
140
|
+
if (editorSidebarOpened || isLinkSheetVisible) {
|
|
141
|
+
if (Platform.OS === 'android' && richTextRef !== null && richTextRef !== void 0 && richTextRef.current) {
|
|
142
|
+
richTextRef.current.blur();
|
|
143
|
+
onToggleButtonFocus(false);
|
|
173
144
|
}
|
|
174
145
|
}
|
|
175
|
-
|
|
176
|
-
|
|
146
|
+
}, [editorSidebarOpened, isLinkSheetVisible]);
|
|
147
|
+
useEffect(() => {
|
|
148
|
+
if (richTextRef !== null && richTextRef !== void 0 && richTextRef.current) {
|
|
177
149
|
if (!isSelected && isButtonFocused) {
|
|
178
|
-
|
|
150
|
+
onToggleButtonFocus(false);
|
|
179
151
|
}
|
|
180
152
|
|
|
181
153
|
if (isSelected && !isButtonFocused) {
|
|
182
154
|
AccessibilityInfo.isScreenReaderEnabled().then(enabled => {
|
|
183
155
|
if (enabled) {
|
|
184
|
-
|
|
185
|
-
|
|
156
|
+
onToggleButtonFocus(true);
|
|
157
|
+
richTextRef === null || richTextRef === void 0 ? void 0 : richTextRef.current.focus();
|
|
186
158
|
}
|
|
187
159
|
});
|
|
188
160
|
}
|
|
189
161
|
}
|
|
190
|
-
}
|
|
162
|
+
}, [isSelected, isButtonFocused]);
|
|
163
|
+
const linkSettingsActions = [{
|
|
164
|
+
label: __('Remove link'),
|
|
165
|
+
onPress: onClearSettings
|
|
166
|
+
}];
|
|
167
|
+
const linkSettingsOptions = {
|
|
168
|
+
url: {
|
|
169
|
+
label: __('Button Link URL'),
|
|
170
|
+
placeholder: __('Add URL'),
|
|
171
|
+
autoFocus: true,
|
|
172
|
+
autoFill: true
|
|
173
|
+
},
|
|
174
|
+
openInNewTab: {
|
|
175
|
+
label: __('Open in new tab')
|
|
176
|
+
},
|
|
177
|
+
linkRel: {
|
|
178
|
+
label: __('Link Rel'),
|
|
179
|
+
placeholder: _x('None', 'Link rel attribute value placeholder')
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
const noFocusLinkSettingOptions = { ...linkSettingsOptions,
|
|
183
|
+
url: { ...linkSettingsOptions.url,
|
|
184
|
+
autoFocus: false
|
|
185
|
+
}
|
|
186
|
+
};
|
|
191
187
|
|
|
192
|
-
getBackgroundColor() {
|
|
188
|
+
function getBackgroundColor() {
|
|
193
189
|
var _colorProps$style, _colorProps$style2;
|
|
194
190
|
|
|
195
191
|
const {
|
|
196
192
|
attributes,
|
|
197
|
-
colors,
|
|
198
|
-
gradients,
|
|
199
193
|
style
|
|
200
|
-
} =
|
|
194
|
+
} = props;
|
|
201
195
|
const {
|
|
202
196
|
backgroundColor,
|
|
203
197
|
gradient
|
|
@@ -216,14 +210,13 @@ class ButtonEdit extends Component {
|
|
|
216
210
|
return (colorObject === null || colorObject === void 0 ? void 0 : colorObject.color) || ((_colorProps$style = colorProps.style) === null || _colorProps$style === void 0 ? void 0 : _colorProps$style.backgroundColor) || ((_colorProps$style2 = colorProps.style) === null || _colorProps$style2 === void 0 ? void 0 : _colorProps$style2.background) || (style === null || style === void 0 ? void 0 : style.backgroundColor) || styles.defaultButton.backgroundColor;
|
|
217
211
|
}
|
|
218
212
|
|
|
219
|
-
getTextColor() {
|
|
213
|
+
function getTextColor() {
|
|
220
214
|
var _colorProps$style3;
|
|
221
215
|
|
|
222
216
|
const {
|
|
223
217
|
attributes,
|
|
224
|
-
colors,
|
|
225
218
|
style
|
|
226
|
-
} =
|
|
219
|
+
} = props;
|
|
227
220
|
const colorProps = getColorClassesAndStyles(attributes); // Retrieve named color object to force inline styles for themes that
|
|
228
221
|
// do not load their color stylesheets in the editor.
|
|
229
222
|
|
|
@@ -231,53 +224,48 @@ class ButtonEdit extends Component {
|
|
|
231
224
|
return (colorObject === null || colorObject === void 0 ? void 0 : colorObject.color) || ((_colorProps$style3 = colorProps.style) === null || _colorProps$style3 === void 0 ? void 0 : _colorProps$style3.color) || (style === null || style === void 0 ? void 0 : style.color) || styles.defaultButton.color;
|
|
232
225
|
}
|
|
233
226
|
|
|
234
|
-
onChangeText(value) {
|
|
227
|
+
function onChangeText(value) {
|
|
235
228
|
const {
|
|
236
229
|
setAttributes
|
|
237
|
-
} =
|
|
230
|
+
} = props;
|
|
238
231
|
setAttributes({
|
|
239
232
|
text: value
|
|
240
233
|
});
|
|
241
234
|
}
|
|
242
235
|
|
|
243
|
-
onChangeBorderRadius(newRadius) {
|
|
236
|
+
function onChangeBorderRadius(newRadius) {
|
|
244
237
|
const {
|
|
245
238
|
setAttributes,
|
|
246
239
|
attributes
|
|
247
|
-
} =
|
|
248
|
-
const {
|
|
249
|
-
borderRadiusUnit
|
|
250
|
-
} = this.state;
|
|
240
|
+
} = props;
|
|
251
241
|
const {
|
|
252
242
|
style
|
|
253
243
|
} = attributes;
|
|
254
|
-
const newStyle =
|
|
244
|
+
const newStyle = getNewStyle(style, newRadius, borderRadiusUnit);
|
|
255
245
|
setAttributes({
|
|
256
246
|
style: newStyle
|
|
257
247
|
});
|
|
258
248
|
}
|
|
259
249
|
|
|
260
|
-
onChangeBorderRadiusUnit(newRadiusUnit) {
|
|
250
|
+
function onChangeBorderRadiusUnit(newRadiusUnit) {
|
|
261
251
|
var _attributes$style, _attributes$style$bor;
|
|
262
252
|
|
|
263
253
|
const {
|
|
264
254
|
setAttributes,
|
|
265
255
|
attributes
|
|
266
|
-
} =
|
|
256
|
+
} = props;
|
|
267
257
|
const {
|
|
268
258
|
style
|
|
269
259
|
} = attributes;
|
|
270
|
-
const
|
|
271
|
-
const newStyle =
|
|
260
|
+
const newBorderRadius = getBorderRadiusValue(attributes === null || attributes === void 0 ? void 0 : (_attributes$style = attributes.style) === null || _attributes$style === void 0 ? void 0 : (_attributes$style$bor = _attributes$style.border) === null || _attributes$style$bor === void 0 ? void 0 : _attributes$style$bor.radius);
|
|
261
|
+
const newStyle = getNewStyle(style, newBorderRadius, newRadiusUnit);
|
|
272
262
|
setAttributes({
|
|
273
263
|
style: newStyle
|
|
274
264
|
});
|
|
275
|
-
|
|
276
|
-
borderRadiusUnit: newRadiusUnit
|
|
277
|
-
});
|
|
265
|
+
setBorderRadiusUnit(newRadiusUnit);
|
|
278
266
|
}
|
|
279
267
|
|
|
280
|
-
getNewStyle(style, radius, radiusUnit) {
|
|
268
|
+
function getNewStyle(style, radius, radiusUnit) {
|
|
281
269
|
return { ...style,
|
|
282
270
|
border: { ...(style === null || style === void 0 ? void 0 : style.border),
|
|
283
271
|
radius: `${radius}${radiusUnit}` // Store the value with the unit so that it works as expected.
|
|
@@ -286,54 +274,42 @@ class ButtonEdit extends Component {
|
|
|
286
274
|
};
|
|
287
275
|
}
|
|
288
276
|
|
|
289
|
-
onShowLinkSettings() {
|
|
290
|
-
|
|
291
|
-
isLinkSheetVisible: true
|
|
292
|
-
});
|
|
277
|
+
function onShowLinkSettings() {
|
|
278
|
+
setIsLinkSheetVisible(true);
|
|
293
279
|
}
|
|
294
280
|
|
|
295
|
-
onHideLinkSettings() {
|
|
296
|
-
|
|
297
|
-
isLinkSheetVisible: false
|
|
298
|
-
});
|
|
281
|
+
function onHideLinkSettings() {
|
|
282
|
+
setIsLinkSheetVisible(false);
|
|
299
283
|
}
|
|
300
284
|
|
|
301
|
-
onToggleButtonFocus(value) {
|
|
302
|
-
if (value !==
|
|
303
|
-
|
|
304
|
-
isButtonFocused: value
|
|
305
|
-
});
|
|
285
|
+
function onToggleButtonFocus(value) {
|
|
286
|
+
if (value !== isButtonFocused) {
|
|
287
|
+
setIsButtonFocused(value);
|
|
306
288
|
}
|
|
307
289
|
}
|
|
308
290
|
|
|
309
|
-
onClearSettings() {
|
|
291
|
+
function onClearSettings() {
|
|
310
292
|
const {
|
|
311
293
|
setAttributes
|
|
312
|
-
} =
|
|
294
|
+
} = props;
|
|
313
295
|
setAttributes({
|
|
314
296
|
url: '',
|
|
315
297
|
rel: '',
|
|
316
298
|
linkTarget: ''
|
|
317
299
|
});
|
|
318
|
-
|
|
300
|
+
onHideLinkSettings();
|
|
319
301
|
}
|
|
320
302
|
|
|
321
|
-
onLayout({
|
|
303
|
+
function onLayout({
|
|
322
304
|
nativeEvent
|
|
323
305
|
}) {
|
|
324
306
|
const {
|
|
325
307
|
width
|
|
326
308
|
} = nativeEvent.layout;
|
|
327
|
-
|
|
309
|
+
onSetMaxWidth(width);
|
|
328
310
|
}
|
|
329
311
|
|
|
330
|
-
onSetMaxWidth(width, isParentWidthDidChange = false) {
|
|
331
|
-
const {
|
|
332
|
-
maxWidth
|
|
333
|
-
} = this.state;
|
|
334
|
-
const {
|
|
335
|
-
parentWidth
|
|
336
|
-
} = this.props;
|
|
312
|
+
const onSetMaxWidth = useCallback((width, isParentWidthDidChange = false) => {
|
|
337
313
|
const {
|
|
338
314
|
marginRight: spacing
|
|
339
315
|
} = styles.defaultButton;
|
|
@@ -341,22 +317,17 @@ class ButtonEdit extends Component {
|
|
|
341
317
|
const isWidthChanged = maxWidth !== width;
|
|
342
318
|
|
|
343
319
|
if (parentWidth && !width && isParentWidthChanged) {
|
|
344
|
-
|
|
345
|
-
maxWidth: parentWidth - spacing
|
|
346
|
-
});
|
|
320
|
+
setMaxWidth(parentWidth - spacing);
|
|
347
321
|
} else if (!parentWidth && width && isWidthChanged) {
|
|
348
|
-
|
|
349
|
-
maxWidth: width - spacing
|
|
350
|
-
});
|
|
322
|
+
setMaxWidth(width - spacing);
|
|
351
323
|
}
|
|
352
|
-
}
|
|
324
|
+
}, [maxWidth, parentWidth]);
|
|
353
325
|
|
|
354
|
-
onRemove() {
|
|
326
|
+
function onRemove() {
|
|
355
327
|
const {
|
|
356
|
-
numOfButtons,
|
|
357
328
|
onDeleteBlock,
|
|
358
329
|
onReplace
|
|
359
|
-
} =
|
|
330
|
+
} = props;
|
|
360
331
|
|
|
361
332
|
if (numOfButtons === 1) {
|
|
362
333
|
onDeleteBlock();
|
|
@@ -365,65 +336,62 @@ class ButtonEdit extends Component {
|
|
|
365
336
|
}
|
|
366
337
|
}
|
|
367
338
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
339
|
+
function onPlaceholderTextWidth({
|
|
340
|
+
nativeEvent
|
|
341
|
+
}) {
|
|
342
|
+
const textWidth = nativeEvent.lines[0] && nativeEvent.lines[0].width;
|
|
343
|
+
|
|
344
|
+
if (textWidth && textWidth !== placeholderTextWidth) {
|
|
345
|
+
setPlaceholderTextWidth(Math.min(textWidth, maxWidth));
|
|
346
|
+
}
|
|
371
347
|
}
|
|
372
348
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
349
|
+
const onSetRef = useCallback(ref => {
|
|
350
|
+
richTextRef.current = ref;
|
|
351
|
+
}, [richTextRef]);
|
|
352
|
+
const onUnstableOnFocus = useCallback(() => {
|
|
353
|
+
onToggleButtonFocus(true);
|
|
354
|
+
}, []);
|
|
355
|
+
const onBlur = useCallback(() => {
|
|
356
|
+
onSetMaxWidth();
|
|
357
|
+
}, []);
|
|
358
|
+
|
|
359
|
+
function dismissSheet() {
|
|
360
|
+
onHideLinkSettings();
|
|
361
|
+
closeGeneralSidebar();
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
function getLinkSettings(isCompatibleWithSettings) {
|
|
377
365
|
const {
|
|
378
366
|
attributes,
|
|
379
367
|
setAttributes
|
|
380
|
-
} =
|
|
368
|
+
} = props;
|
|
381
369
|
return createElement(LinkSettingsNavigation, {
|
|
382
370
|
isVisible: isLinkSheetVisible,
|
|
383
371
|
url: attributes.url,
|
|
384
372
|
rel: attributes.rel,
|
|
385
373
|
linkTarget: attributes.linkTarget,
|
|
386
|
-
onClose:
|
|
374
|
+
onClose: dismissSheet,
|
|
387
375
|
setAttributes: setAttributes,
|
|
388
376
|
withBottomSheet: !isCompatibleWithSettings,
|
|
389
377
|
hasPicker: true,
|
|
390
|
-
actions:
|
|
391
|
-
options: isCompatibleWithSettings ?
|
|
378
|
+
actions: linkSettingsActions,
|
|
379
|
+
options: isCompatibleWithSettings ? linkSettingsOptions : noFocusLinkSettingOptions,
|
|
392
380
|
showIcon: !isCompatibleWithSettings
|
|
393
381
|
});
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
setRef(richText) {
|
|
397
|
-
this.richTextRef = richText;
|
|
398
382
|
} // Render `Text` with `placeholderText` styled as a placeholder
|
|
399
383
|
// to calculate its width which then is set as a `minWidth`
|
|
400
384
|
|
|
401
385
|
|
|
402
|
-
getPlaceholderWidth(placeholderText) {
|
|
386
|
+
function getPlaceholderWidth(placeholderText) {
|
|
403
387
|
return createElement(Text, {
|
|
404
388
|
style: styles.placeholder,
|
|
405
|
-
onTextLayout:
|
|
389
|
+
onTextLayout: onPlaceholderTextWidth
|
|
406
390
|
}, placeholderText);
|
|
407
391
|
}
|
|
408
392
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}) {
|
|
412
|
-
const {
|
|
413
|
-
maxWidth,
|
|
414
|
-
placeholderTextWidth
|
|
415
|
-
} = this.state;
|
|
416
|
-
const textWidth = nativeEvent.lines[0] && nativeEvent.lines[0].width;
|
|
417
|
-
|
|
418
|
-
if (textWidth && textWidth !== placeholderTextWidth) {
|
|
419
|
-
this.setState({
|
|
420
|
-
placeholderTextWidth: Math.min(textWidth, maxWidth)
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
getBorderRadiusValue(borderRadius, defaultBorderRadius) {
|
|
426
|
-
const valueAndUnit = getValueAndUnit(borderRadius);
|
|
393
|
+
function getBorderRadiusValue(currentBorderRadius, defaultBorderRadius) {
|
|
394
|
+
const valueAndUnit = getValueAndUnit(currentBorderRadius);
|
|
427
395
|
|
|
428
396
|
if (Number.isInteger(parseInt(valueAndUnit === null || valueAndUnit === void 0 ? void 0 : valueAndUnit.valueToConvert))) {
|
|
429
397
|
return parseFloat(valueAndUnit.valueToConvert);
|
|
@@ -432,159 +400,119 @@ class ButtonEdit extends Component {
|
|
|
432
400
|
return defaultBorderRadius;
|
|
433
401
|
}
|
|
434
402
|
|
|
435
|
-
|
|
436
|
-
|
|
403
|
+
const {
|
|
404
|
+
attributes,
|
|
405
|
+
clientId,
|
|
406
|
+
onReplace,
|
|
407
|
+
mergeBlocks,
|
|
408
|
+
setAttributes,
|
|
409
|
+
style
|
|
410
|
+
} = props;
|
|
411
|
+
const {
|
|
412
|
+
placeholder,
|
|
413
|
+
text,
|
|
414
|
+
style: buttonStyle,
|
|
415
|
+
url,
|
|
416
|
+
align = 'center',
|
|
417
|
+
width
|
|
418
|
+
} = attributes;
|
|
419
|
+
const {
|
|
420
|
+
paddingTop: spacing,
|
|
421
|
+
borderWidth
|
|
422
|
+
} = styles.defaultButton;
|
|
437
423
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
clientId,
|
|
442
|
-
onReplace,
|
|
443
|
-
mergeBlocks,
|
|
444
|
-
parentWidth,
|
|
445
|
-
setAttributes,
|
|
446
|
-
style
|
|
447
|
-
} = this.props;
|
|
448
|
-
const {
|
|
449
|
-
placeholder,
|
|
450
|
-
text,
|
|
451
|
-
style: buttonStyle,
|
|
452
|
-
url,
|
|
453
|
-
align = 'center',
|
|
454
|
-
width
|
|
455
|
-
} = attributes;
|
|
456
|
-
const {
|
|
457
|
-
maxWidth,
|
|
458
|
-
isButtonFocused,
|
|
459
|
-
placeholderTextWidth,
|
|
460
|
-
borderRadiusUnit
|
|
461
|
-
} = this.state;
|
|
462
|
-
const {
|
|
463
|
-
paddingTop: spacing,
|
|
464
|
-
borderWidth
|
|
465
|
-
} = styles.defaultButton;
|
|
424
|
+
if (parentWidth === 0) {
|
|
425
|
+
return null;
|
|
426
|
+
}
|
|
466
427
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
428
|
+
const currentBorderRadius = buttonStyle === null || buttonStyle === void 0 ? void 0 : (_buttonStyle$border = buttonStyle.border) === null || _buttonStyle$border === void 0 ? void 0 : _buttonStyle$border.radius;
|
|
429
|
+
const borderRadiusValue = getBorderRadiusValue(currentBorderRadius, styles.defaultButton.borderRadius);
|
|
430
|
+
const buttonBorderRadiusValue = borderRadiusUnit === 'px' || borderRadiusUnit === '%' ? borderRadiusValue : Math.floor(14 * borderRadiusValue); // lets assume that the font size is set to 14px; TO get a nicer preview.
|
|
470
431
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
const outlineBorderRadius = buttonBorderRadiusValue > 0 ? buttonBorderRadiusValue + spacing + borderWidth : 0; // To achieve proper expanding and shrinking `RichText` on iOS, there is a need to set a `minWidth`
|
|
476
|
-
// value at least on 1 when `RichText` is focused or when is not focused, but `RichText` value is
|
|
477
|
-
// different than empty string.
|
|
478
|
-
|
|
479
|
-
let minWidth = isButtonFocused || !isButtonFocused && text && text !== '' ? MIN_WIDTH : placeholderTextWidth;
|
|
480
|
-
|
|
481
|
-
if (width) {
|
|
482
|
-
// Set the width of the button.
|
|
483
|
-
minWidth = Math.floor(maxWidth * (width / 100) - MIN_WIDTH_MARGINS[width]);
|
|
484
|
-
} // To achieve proper expanding and shrinking `RichText` on Android, there is a need to set
|
|
485
|
-
// a `placeholder` as an empty string when `RichText` is focused,
|
|
486
|
-
// because `AztecView` is calculating a `minWidth` based on placeholder text.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
const placeholderText = isButtonFocused || !isButtonFocused && text && text !== '' ? '' : placeholder || __('Add text…');
|
|
490
|
-
const backgroundColor = this.getBackgroundColor();
|
|
491
|
-
const textColor = this.getTextColor();
|
|
492
|
-
const isFixedWidth = !!width;
|
|
493
|
-
return createElement(View, {
|
|
494
|
-
onLayout: this.onLayout
|
|
495
|
-
}, this.getPlaceholderWidth(placeholderText), createElement(ColorBackground, {
|
|
496
|
-
borderRadiusValue: buttonBorderRadiusValue,
|
|
497
|
-
backgroundColor: backgroundColor,
|
|
498
|
-
isSelected: isSelected
|
|
499
|
-
}, isSelected && createElement(View, {
|
|
500
|
-
pointerEvents: "none",
|
|
501
|
-
style: [styles.outline, {
|
|
502
|
-
borderRadius: outlineBorderRadius,
|
|
503
|
-
borderColor: backgroundColor
|
|
504
|
-
}]
|
|
505
|
-
}), createElement(RichText, {
|
|
506
|
-
setRef: this.setRef,
|
|
507
|
-
placeholder: placeholderText,
|
|
508
|
-
value: text,
|
|
509
|
-
onChange: this.onChangeText,
|
|
510
|
-
style: { ...richTextStyle.richText,
|
|
511
|
-
paddingLeft: isFixedWidth ? 0 : richTextStyle.richText.paddingLeft,
|
|
512
|
-
paddingRight: isFixedWidth ? 0 : richTextStyle.richText.paddingRight,
|
|
513
|
-
color: textColor
|
|
514
|
-
},
|
|
515
|
-
textAlign: align,
|
|
516
|
-
placeholderTextColor: (style === null || style === void 0 ? void 0 : style.color) || styles.placeholderTextColor.color,
|
|
517
|
-
identifier: "text",
|
|
518
|
-
tagName: "p",
|
|
519
|
-
minWidth: minWidth // The minimum Button size.
|
|
520
|
-
,
|
|
521
|
-
maxWidth: isFixedWidth ? minWidth : maxWidth // The width of the screen.
|
|
522
|
-
,
|
|
523
|
-
id: clientId,
|
|
524
|
-
isSelected: isButtonFocused,
|
|
525
|
-
withoutInteractiveFormatting: true,
|
|
526
|
-
unstableOnFocus: () => this.onToggleButtonFocus(true),
|
|
527
|
-
__unstableMobileNoFocusOnMount: !isSelected,
|
|
528
|
-
selectionColor: textColor,
|
|
529
|
-
onBlur: () => {
|
|
530
|
-
this.onSetMaxWidth();
|
|
531
|
-
},
|
|
532
|
-
onReplace: onReplace,
|
|
533
|
-
onRemove: this.onRemove,
|
|
534
|
-
onMerge: mergeBlocks
|
|
535
|
-
})), isSelected && createElement(Fragment, null, createElement(BlockControls, null, createElement(ToolbarGroup, null, createElement(ToolbarButton, {
|
|
536
|
-
title: __('Edit link'),
|
|
537
|
-
icon: link,
|
|
538
|
-
onClick: this.onShowLinkSettings,
|
|
539
|
-
isActive: url
|
|
540
|
-
}))), this.getLinkSettings(false), createElement(InspectorControls, null, createElement(PanelBody, {
|
|
541
|
-
title: __('Border Settings')
|
|
542
|
-
}, createElement(UnitControl, {
|
|
543
|
-
label: __('Border Radius'),
|
|
544
|
-
min: MIN_BORDER_RADIUS_VALUE,
|
|
545
|
-
max: MAX_BORDER_RADIUS_VALUE,
|
|
546
|
-
value: borderRadiusValue,
|
|
547
|
-
onChange: this.onChangeBorderRadius,
|
|
548
|
-
onUnitChange: this.onChangeBorderRadiusUnit,
|
|
549
|
-
unit: this.state.borderRadiusUnit,
|
|
550
|
-
units: filterUnitsWithSettings(['px', 'em', 'rem'], CSS_UNITS)
|
|
551
|
-
})), createElement(WidthPanel, {
|
|
552
|
-
selectedWidth: width,
|
|
553
|
-
setAttributes: setAttributes
|
|
554
|
-
}), createElement(PanelBody, {
|
|
555
|
-
title: __('Link Settings')
|
|
556
|
-
}, this.getLinkSettings(true)))));
|
|
557
|
-
}
|
|
432
|
+
const outlineBorderRadius = buttonBorderRadiusValue > 0 ? buttonBorderRadiusValue + spacing + borderWidth : 0; // To achieve proper expanding and shrinking `RichText` on iOS, there is a need to set a `minWidth`
|
|
433
|
+
// value at least on 1 when `RichText` is focused or when is not focused, but `RichText` value is
|
|
434
|
+
// different than empty string.
|
|
558
435
|
|
|
559
|
-
|
|
436
|
+
let minWidth = isButtonFocused || !isButtonFocused && text && text !== '' ? MIN_WIDTH : placeholderTextWidth;
|
|
560
437
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
} = select('core/edit-post');
|
|
568
|
-
const {
|
|
569
|
-
getBlockCount,
|
|
570
|
-
getBlockRootClientId,
|
|
571
|
-
getSettings
|
|
572
|
-
} = select(blockEditorStore);
|
|
573
|
-
const parentId = getBlockRootClientId(clientId);
|
|
574
|
-
const numOfButtons = getBlockCount(parentId);
|
|
575
|
-
const settings = getSettings();
|
|
576
|
-
return {
|
|
577
|
-
colors: (settings === null || settings === void 0 ? void 0 : settings.colors) || [],
|
|
578
|
-
gradients: (settings === null || settings === void 0 ? void 0 : settings.gradients) || [],
|
|
579
|
-
editorSidebarOpened: isSelected && isEditorSidebarOpened(),
|
|
580
|
-
numOfButtons
|
|
581
|
-
};
|
|
582
|
-
}), withDispatch(dispatch => {
|
|
583
|
-
return {
|
|
584
|
-
closeSettingsBottomSheet() {
|
|
585
|
-
dispatch('core/edit-post').closeGeneralSidebar();
|
|
586
|
-
}
|
|
438
|
+
if (width) {
|
|
439
|
+
// Set the width of the button.
|
|
440
|
+
minWidth = Math.floor(maxWidth * (width / 100) - MIN_WIDTH_MARGINS[width]);
|
|
441
|
+
} // To achieve proper expanding and shrinking `RichText` on Android, there is a need to set
|
|
442
|
+
// a `placeholder` as an empty string when `RichText` is focused,
|
|
443
|
+
// because `AztecView` is calculating a `minWidth` based on placeholder text.
|
|
587
444
|
|
|
445
|
+
|
|
446
|
+
const placeholderText = isButtonFocused || !isButtonFocused && text && text !== '' ? '' : placeholder || __('Add text…');
|
|
447
|
+
const backgroundColor = getBackgroundColor();
|
|
448
|
+
const textColor = getTextColor();
|
|
449
|
+
const isFixedWidth = !!width;
|
|
450
|
+
const outLineStyles = [styles.outline, {
|
|
451
|
+
borderRadius: outlineBorderRadius,
|
|
452
|
+
borderColor: backgroundColor
|
|
453
|
+
}];
|
|
454
|
+
const textStyles = { ...richTextStyle.richText,
|
|
455
|
+
paddingLeft: isFixedWidth ? 0 : richTextStyle.richText.paddingLeft,
|
|
456
|
+
paddingRight: isFixedWidth ? 0 : richTextStyle.richText.paddingRight,
|
|
457
|
+
color: textColor
|
|
588
458
|
};
|
|
589
|
-
|
|
459
|
+
return createElement(View, {
|
|
460
|
+
onLayout: onLayout
|
|
461
|
+
}, getPlaceholderWidth(placeholderText), createElement(ColorBackground, {
|
|
462
|
+
borderRadiusValue: buttonBorderRadiusValue,
|
|
463
|
+
backgroundColor: backgroundColor,
|
|
464
|
+
isSelected: isSelected
|
|
465
|
+
}, isSelected && createElement(View, {
|
|
466
|
+
pointerEvents: "none",
|
|
467
|
+
style: outLineStyles
|
|
468
|
+
}), createElement(RichText, {
|
|
469
|
+
setRef: onSetRef,
|
|
470
|
+
placeholder: placeholderText,
|
|
471
|
+
value: text,
|
|
472
|
+
onChange: onChangeText,
|
|
473
|
+
style: textStyles,
|
|
474
|
+
textAlign: align,
|
|
475
|
+
placeholderTextColor: (style === null || style === void 0 ? void 0 : style.color) || styles.placeholderTextColor.color,
|
|
476
|
+
identifier: "text",
|
|
477
|
+
tagName: "p",
|
|
478
|
+
minWidth: minWidth // The minimum Button size.
|
|
479
|
+
,
|
|
480
|
+
maxWidth: isFixedWidth ? minWidth : maxWidth // The width of the screen.
|
|
481
|
+
,
|
|
482
|
+
id: clientId,
|
|
483
|
+
isSelected: isButtonFocused,
|
|
484
|
+
withoutInteractiveFormatting: true,
|
|
485
|
+
unstableOnFocus: onUnstableOnFocus,
|
|
486
|
+
__unstableMobileNoFocusOnMount: !isSelected,
|
|
487
|
+
selectionColor: textColor,
|
|
488
|
+
onBlur: onBlur,
|
|
489
|
+
onReplace: onReplace,
|
|
490
|
+
onRemove: onRemove,
|
|
491
|
+
onMerge: mergeBlocks,
|
|
492
|
+
fontSize: style === null || style === void 0 ? void 0 : style.fontSize
|
|
493
|
+
})), isSelected && createElement(Fragment, null, createElement(BlockControls, null, createElement(ToolbarGroup, null, createElement(ToolbarButton, {
|
|
494
|
+
title: __('Edit link'),
|
|
495
|
+
icon: link,
|
|
496
|
+
onClick: onShowLinkSettings,
|
|
497
|
+
isActive: url
|
|
498
|
+
}))), getLinkSettings(false), createElement(InspectorControls, null, createElement(PanelBody, {
|
|
499
|
+
title: __('Border Settings')
|
|
500
|
+
}, createElement(UnitControl, {
|
|
501
|
+
label: __('Border Radius'),
|
|
502
|
+
min: MIN_BORDER_RADIUS_VALUE,
|
|
503
|
+
max: MAX_BORDER_RADIUS_VALUE,
|
|
504
|
+
value: borderRadiusValue,
|
|
505
|
+
onChange: onChangeBorderRadius,
|
|
506
|
+
onUnitChange: onChangeBorderRadiusUnit,
|
|
507
|
+
unit: borderRadiusUnit,
|
|
508
|
+
units: filterUnitsWithSettings(['px', 'em', 'rem'], CSS_UNITS)
|
|
509
|
+
})), createElement(WidthPanel, {
|
|
510
|
+
selectedWidth: width,
|
|
511
|
+
setAttributes: setAttributes
|
|
512
|
+
}), createElement(PanelBody, {
|
|
513
|
+
title: __('Link Settings')
|
|
514
|
+
}, getLinkSettings(true)))));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export default ButtonEdit;
|
|
590
518
|
//# sourceMappingURL=edit.native.js.map
|