@wordpress/block-library 9.47.0 → 9.48.1
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 +8 -0
- package/build/columns/transforms.cjs +65 -0
- package/build/columns/transforms.cjs.map +2 -2
- package/build/comments/edit/placeholder.cjs +1 -1
- package/build/comments/edit/placeholder.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs +16 -4
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/gallery/edit.cjs +212 -331
- package/build/gallery/edit.cjs.map +2 -2
- package/build/gallery/transforms.cjs +43 -0
- package/build/gallery/transforms.cjs.map +2 -2
- package/build/heading/edit.cjs +0 -1
- package/build/heading/edit.cjs.map +2 -2
- package/build/image/image.cjs +14 -3
- package/build/image/image.cjs.map +2 -2
- package/build/image/use-open-image-media-editor-modal.cjs +8 -2
- package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
- package/build/list/edit.cjs +1 -8
- package/build/list/edit.cjs.map +2 -2
- package/build/list/ordered-list-settings.cjs +1 -44
- package/build/list/ordered-list-settings.cjs.map +2 -2
- package/build/list-item/hooks/use-merge.cjs +47 -24
- package/build/list-item/hooks/use-merge.cjs.map +2 -2
- package/build/navigation/edit/index.cjs +15 -26
- package/build/navigation/edit/index.cjs.map +2 -2
- package/build/navigation-link/edit.cjs +0 -1
- package/build/navigation-link/edit.cjs.map +2 -2
- package/build/navigation-submenu/edit.cjs +2 -1
- package/build/navigation-submenu/edit.cjs.map +2 -2
- package/build/paragraph/deprecated.cjs +1 -0
- package/build/paragraph/deprecated.cjs.map +2 -2
- package/build/paragraph/edit.cjs +10 -1
- package/build/paragraph/edit.cjs.map +3 -3
- package/build/playlist/block.json +12 -0
- package/build/playlist/edit.cjs +27 -1
- package/build/playlist/edit.cjs.map +2 -2
- package/build/playlist/save.cjs +8 -1
- package/build/playlist/save.cjs.map +2 -2
- package/build/playlist/view.cjs +1 -0
- package/build/playlist/view.cjs.map +2 -2
- package/build/post-featured-image/edit.cjs +6 -4
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/post-time-to-read/index.cjs +1 -1
- package/build/post-time-to-read/index.cjs.map +2 -2
- package/build/post-time-to-read/variations.cjs +1 -1
- package/build/post-time-to-read/variations.cjs.map +2 -2
- package/build/pullquote/edit.cjs +2 -7
- package/build/pullquote/edit.cjs.map +2 -2
- package/build/quote/edit.cjs +4 -9
- package/build/quote/edit.cjs.map +2 -2
- package/build/shortcode/transforms.cjs +2 -2
- package/build/shortcode/transforms.cjs.map +2 -2
- package/build/site-logo/edit.cjs +4 -1
- package/build/site-logo/edit.cjs.map +2 -2
- package/build/utils/waveform-player.cjs +42 -9
- package/build/utils/waveform-player.cjs.map +2 -2
- package/build/utils/waveform-utils.cjs +6 -4
- package/build/utils/waveform-utils.cjs.map +2 -2
- package/build/video/edit-common-settings.cjs +3 -6
- package/build/video/edit-common-settings.cjs.map +2 -2
- package/build-module/columns/transforms.mjs +65 -0
- package/build-module/columns/transforms.mjs.map +2 -2
- package/build-module/comments/edit/placeholder.mjs +1 -1
- package/build-module/comments/edit/placeholder.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +16 -4
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/gallery/edit.mjs +214 -334
- package/build-module/gallery/edit.mjs.map +2 -2
- package/build-module/gallery/transforms.mjs +43 -0
- package/build-module/gallery/transforms.mjs.map +2 -2
- package/build-module/heading/edit.mjs +1 -2
- package/build-module/heading/edit.mjs.map +2 -2
- package/build-module/image/image.mjs +15 -3
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs +8 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
- package/build-module/list/edit.mjs +2 -9
- package/build-module/list/edit.mjs.map +2 -2
- package/build-module/list/ordered-list-settings.mjs +1 -45
- package/build-module/list/ordered-list-settings.mjs.map +2 -2
- package/build-module/list-item/hooks/use-merge.mjs +48 -25
- package/build-module/list-item/hooks/use-merge.mjs.map +2 -2
- package/build-module/navigation/edit/index.mjs +16 -33
- package/build-module/navigation/edit/index.mjs.map +2 -2
- package/build-module/navigation-link/edit.mjs +0 -1
- package/build-module/navigation-link/edit.mjs.map +2 -2
- package/build-module/navigation-submenu/edit.mjs +2 -1
- package/build-module/navigation-submenu/edit.mjs.map +2 -2
- package/build-module/paragraph/deprecated.mjs +1 -0
- package/build-module/paragraph/deprecated.mjs.map +2 -2
- package/build-module/paragraph/edit.mjs +12 -2
- package/build-module/paragraph/edit.mjs.map +2 -2
- package/build-module/playlist/block.json +12 -0
- package/build-module/playlist/edit.mjs +27 -1
- package/build-module/playlist/edit.mjs.map +2 -2
- package/build-module/playlist/save.mjs +8 -1
- package/build-module/playlist/save.mjs.map +2 -2
- package/build-module/playlist/view.mjs +1 -0
- package/build-module/playlist/view.mjs.map +2 -2
- package/build-module/post-featured-image/edit.mjs +6 -4
- package/build-module/post-featured-image/edit.mjs.map +2 -2
- package/build-module/post-time-to-read/index.mjs +1 -1
- package/build-module/post-time-to-read/index.mjs.map +2 -2
- package/build-module/post-time-to-read/variations.mjs +2 -2
- package/build-module/post-time-to-read/variations.mjs.map +2 -2
- package/build-module/pullquote/edit.mjs +2 -7
- package/build-module/pullquote/edit.mjs.map +2 -2
- package/build-module/quote/edit.mjs +5 -10
- package/build-module/quote/edit.mjs.map +2 -2
- package/build-module/shortcode/transforms.mjs +2 -2
- package/build-module/shortcode/transforms.mjs.map +2 -2
- package/build-module/site-logo/edit.mjs +5 -1
- package/build-module/site-logo/edit.mjs.map +2 -2
- package/build-module/utils/waveform-player.mjs +44 -11
- package/build-module/utils/waveform-player.mjs.map +2 -2
- package/build-module/utils/waveform-utils.mjs +6 -4
- package/build-module/utils/waveform-utils.mjs.map +2 -2
- package/build-module/video/edit-common-settings.mjs +4 -7
- package/build-module/video/edit-common-settings.mjs.map +2 -2
- package/build-style/comment-template/style-rtl.css +1 -0
- package/build-style/comment-template/style.css +1 -0
- package/build-style/common-rtl.css +30 -10
- package/build-style/common.css +30 -10
- package/build-style/cover/style-rtl.css +2 -1
- package/build-style/cover/style.css +2 -1
- package/build-style/editor-rtl.css +22 -11
- package/build-style/editor.css +22 -11
- package/build-style/form-input/style-rtl.css +2 -0
- package/build-style/form-input/style.css +2 -0
- package/build-style/gallery/style-rtl.css +4 -2
- package/build-style/gallery/style.css +4 -2
- package/build-style/media-text/style-rtl.css +2 -1
- package/build-style/media-text/style.css +2 -1
- package/build-style/playlist/style-rtl.css +3 -0
- package/build-style/playlist/style.css +3 -0
- package/build-style/query/editor-rtl.css +8 -4
- package/build-style/query/editor.css +8 -4
- package/build-style/read-more/style-rtl.css +1 -0
- package/build-style/read-more/style.css +1 -0
- package/build-style/reset-rtl.css +3 -1
- package/build-style/reset.css +3 -1
- package/build-style/search/style-rtl.css +3 -1
- package/build-style/search/style.css +3 -1
- package/build-style/site-logo/editor-rtl.css +2 -1
- package/build-style/site-logo/editor.css +2 -1
- package/build-style/style-rtl.css +53 -17
- package/build-style/style.css +53 -17
- package/build-style/tab/style-rtl.css +3 -1
- package/build-style/tab/style.css +3 -1
- package/build-style/template-part/editor-rtl.css +8 -4
- package/build-style/template-part/editor.css +8 -4
- package/build-style/video/style-rtl.css +2 -1
- package/build-style/video/style.css +2 -1
- package/package.json +51 -47
- package/src/accordion/README.md +97 -0
- package/src/accordion-heading/README.md +81 -0
- package/src/accordion-item/README.md +85 -0
- package/src/accordion-panel/README.md +74 -0
- package/src/archives/README.md +56 -0
- package/src/audio/README.md +55 -0
- package/src/avatar/README.md +74 -0
- package/src/block/README.md +56 -0
- package/src/breadcrumbs/README.md +67 -0
- package/src/button/README.md +93 -0
- package/src/buttons/README.md +80 -0
- package/src/calendar/README.md +51 -0
- package/src/categories/README.md +69 -0
- package/src/code/README.md +55 -0
- package/src/column/README.md +72 -0
- package/src/columns/README.md +90 -0
- package/src/columns/test/transforms.js +164 -0
- package/src/columns/transforms.js +74 -0
- package/src/comment-author-avatar/README.md +63 -0
- package/src/comment-author-name/README.md +67 -0
- package/src/comment-content/README.md +61 -0
- package/src/comment-date/README.md +67 -0
- package/src/comment-edit-link/README.md +67 -0
- package/src/comment-reply-link/README.md +63 -0
- package/src/comment-template/README.md +60 -0
- package/src/comments/README.md +88 -0
- package/src/comments/edit/placeholder.js +1 -1
- package/src/comments-pagination/README.md +77 -0
- package/src/comments-pagination-next/README.md +64 -0
- package/src/comments-pagination-numbers/README.md +64 -0
- package/src/comments-pagination-previous/README.md +64 -0
- package/src/comments-title/README.md +70 -0
- package/src/common.scss +63 -10
- package/src/cover/README.md +111 -0
- package/src/cover/edit/inspector-controls.js +61 -45
- package/src/cover/test/edit.js +38 -0
- package/src/details/README.md +65 -0
- package/src/embed/README.md +56 -0
- package/src/file/README.md +60 -0
- package/src/footnotes/README.md +64 -0
- package/src/form/README.md +90 -0
- package/src/form-input/README.md +74 -0
- package/src/form-submission-notification/README.md +50 -0
- package/src/form-submit-button/README.md +54 -0
- package/src/freeform/README.md +49 -0
- package/src/gallery/README.md +115 -0
- package/src/gallery/edit.js +213 -350
- package/src/gallery/test/transforms.js +155 -0
- package/src/gallery/transforms.js +47 -0
- package/src/group/README.md +80 -0
- package/src/heading/README.md +60 -0
- package/src/heading/edit.js +1 -2
- package/src/home-link/README.md +66 -0
- package/src/home-link/index.php +3 -15
- package/src/html/README.md +48 -0
- package/src/icon/README.md +63 -0
- package/src/image/README.md +102 -0
- package/src/image/image.js +50 -35
- package/src/image/index.php +4 -4
- package/src/image/test/use-open-image-media-editor-modal.js +41 -0
- package/src/image/use-open-image-media-editor-modal.js +7 -1
- package/src/latest-comments/README.md +57 -0
- package/src/latest-posts/README.md +71 -0
- package/src/list/README.md +70 -0
- package/src/list/edit.js +2 -9
- package/src/list/ordered-list-settings.js +46 -92
- package/src/list-item/README.md +71 -0
- package/src/list-item/hooks/use-merge.js +53 -46
- package/src/loginout/README.md +56 -0
- package/src/math/README.md +50 -0
- package/src/media-text/README.md +92 -0
- package/src/missing/README.md +55 -0
- package/src/more/README.md +49 -0
- package/src/navigation/README.md +115 -0
- package/src/navigation/edit/index.js +10 -30
- package/src/navigation-link/README.md +93 -0
- package/src/navigation-link/edit.js +0 -1
- package/src/navigation-link/index.php +1 -15
- package/src/navigation-link/test/__snapshots__/hooks.js.snap +45 -134
- package/src/navigation-overlay-close/README.md +48 -0
- package/src/navigation-submenu/README.md +84 -0
- package/src/navigation-submenu/edit.js +1 -0
- package/src/navigation-submenu/index.php +1 -17
- package/src/nextpage/README.md +50 -0
- package/src/page-list/README.md +84 -0
- package/src/page-list/index.php +3 -15
- package/src/page-list-item/README.md +77 -0
- package/src/paragraph/README.md +70 -0
- package/src/paragraph/deprecated.js +1 -0
- package/src/paragraph/edit.js +13 -1
- package/src/pattern/README.md +45 -0
- package/src/playlist/README.md +86 -0
- package/src/playlist/block.json +12 -0
- package/src/playlist/edit.js +27 -0
- package/src/playlist/index.php +10 -3
- package/src/playlist/save.js +9 -1
- package/src/playlist/style.scss +7 -0
- package/src/playlist/view.js +1 -0
- package/src/playlist-track/README.md +69 -0
- package/src/post-author/README.md +78 -0
- package/src/post-author-biography/README.md +59 -0
- package/src/post-author-name/README.md +63 -0
- package/src/post-author-name/index.php +1 -1
- package/src/post-comment/README.md +61 -0
- package/src/post-comments-count/README.md +58 -0
- package/src/post-comments-form/README.md +59 -0
- package/src/post-comments-link/README.md +60 -0
- package/src/post-content/README.md +71 -0
- package/src/post-date/README.md +65 -0
- package/src/post-date/index.php +1 -1
- package/src/post-excerpt/README.md +66 -0
- package/src/post-featured-image/README.md +85 -0
- package/src/post-featured-image/edit.js +15 -10
- package/src/post-featured-image/index.php +1 -1
- package/src/post-navigation-link/README.md +63 -0
- package/src/post-template/README.md +71 -0
- package/src/post-terms/README.md +65 -0
- package/src/post-time-to-read/README.md +63 -0
- package/src/post-time-to-read/index.js +1 -1
- package/src/post-time-to-read/variations.js +2 -2
- package/src/post-title/README.md +69 -0
- package/src/preformatted/README.md +50 -0
- package/src/pullquote/README.md +64 -0
- package/src/pullquote/edit.js +1 -7
- package/src/query/README.md +64 -0
- package/src/query-no-results/README.md +65 -0
- package/src/query-pagination/README.md +79 -0
- package/src/query-pagination-next/README.md +67 -0
- package/src/query-pagination-numbers/README.md +65 -0
- package/src/query-pagination-previous/README.md +67 -0
- package/src/query-title/README.md +65 -0
- package/src/query-total/README.md +66 -0
- package/src/quote/README.md +75 -0
- package/src/quote/edit.js +3 -9
- package/src/read-more/README.md +61 -0
- package/src/read-more/index.php +2 -2
- package/src/rss/README.md +62 -0
- package/src/search/README.md +66 -0
- package/src/separator/README.md +62 -0
- package/src/shortcode/README.md +44 -0
- package/src/shortcode/transforms.js +2 -2
- package/src/site-logo/README.md +72 -0
- package/src/site-logo/edit.js +5 -0
- package/src/site-tagline/README.md +56 -0
- package/src/site-title/README.md +57 -0
- package/src/social-link/README.md +64 -0
- package/src/social-links/README.md +98 -0
- package/src/spacer/README.md +53 -0
- package/src/tab/README.md +69 -0
- package/src/tab-list/README.md +79 -0
- package/src/tab-panel/README.md +75 -0
- package/src/tab-panels/README.md +75 -0
- package/src/table/README.md +71 -0
- package/src/table-of-contents/README.md +61 -0
- package/src/tabs/README.md +83 -0
- package/src/tag-cloud/README.md +62 -0
- package/src/template-part/README.md +48 -0
- package/src/term-count/README.md +59 -0
- package/src/term-description/README.md +60 -0
- package/src/term-name/README.md +65 -0
- package/src/term-template/README.md +65 -0
- package/src/terms-query/README.md +58 -0
- package/src/text-columns/README.md +51 -0
- package/src/utils/test/waveform-player.js +254 -0
- package/src/utils/waveform-player.js +90 -18
- package/src/utils/waveform-utils.js +15 -11
- package/src/verse/README.md +58 -0
- package/src/video/README.md +58 -0
- package/src/video/edit-common-settings.js +4 -7
- package/src/audio/edit.native.js +0 -250
- package/src/audio/style.native.scss +0 -13
- package/src/audio/test/__snapshots__/edit.native.js.snap +0 -546
- package/src/audio/test/__snapshots__/transforms.native.js.snap +0 -25
- package/src/audio/test/edit.native.js +0 -132
- package/src/audio/test/transforms.native.js +0 -43
- package/src/audio/transforms.native.js +0 -12
- package/src/block/edit-title.native.js +0 -67
- package/src/block/edit.native.js +0 -247
- package/src/block/editor.native.scss +0 -125
- package/src/block/test/__snapshots__/transforms.native.js.snap +0 -15
- package/src/block/test/edit.native.js +0 -262
- package/src/block/test/transforms.native.js +0 -40
- package/src/button/color-background.native.js +0 -41
- package/src/button/edit.native.js +0 -567
- package/src/button/editor.native.scss +0 -70
- package/src/button/rich-text.android.scss +0 -6
- package/src/button/rich-text.ios.scss +0 -6
- package/src/buttons/edit.native.js +0 -157
- package/src/buttons/editor.native.scss +0 -11
- package/src/buttons/test/__snapshots__/edit.native.js.snap +0 -99
- package/src/buttons/test/__snapshots__/transforms.native.js.snap +0 -31
- package/src/buttons/test/edit.native.js +0 -485
- package/src/buttons/test/transforms.native.js +0 -48
- package/src/buttons/transforms.native.js +0 -12
- package/src/code/edit.native.js +0 -70
- package/src/code/test/__snapshots__/edit.native.js.snap +0 -13
- package/src/code/test/edit.native.js +0 -65
- package/src/code/theme.native.scss +0 -22
- package/src/code/transforms.native.js +0 -12
- package/src/column/column-preview.native.js +0 -58
- package/src/column/edit.native.js +0 -273
- package/src/column/editor.native.scss +0 -75
- package/src/columns/columnCalculations.native.js +0 -178
- package/src/columns/edit.native.js +0 -507
- package/src/columns/editor.native.scss +0 -17
- package/src/columns/test/__snapshots__/edit.native.js.snap +0 -305
- package/src/columns/test/__snapshots__/transforms.native.js.snap +0 -61
- package/src/columns/test/edit.native.js +0 -496
- package/src/columns/test/transforms.native.js +0 -89
- package/src/columns/transforms.native.js +0 -12
- package/src/cover/controls.native.js +0 -307
- package/src/cover/edit.native.js +0 -708
- package/src/cover/focal-point-settings-button.native.js +0 -53
- package/src/cover/overlay-color-settings.native.js +0 -106
- package/src/cover/style.native.scss +0 -220
- package/src/cover/test/__snapshots__/edit.native.js.snap +0 -105
- package/src/cover/test/__snapshots__/transforms.native.js.snap +0 -73
- package/src/cover/test/edit.native.js +0 -701
- package/src/cover/test/transforms.native.js +0 -116
- package/src/cover/transforms.native.js +0 -12
- package/src/cover/use-cover-is-dark.native.js +0 -51
- package/src/embed/edit.native.js +0 -345
- package/src/embed/embed-controls.native.js +0 -65
- package/src/embed/embed-link-settings.native.js +0 -99
- package/src/embed/embed-loading.native.js +0 -29
- package/src/embed/embed-no-preview.native.js +0 -230
- package/src/embed/embed-placeholder.native.js +0 -178
- package/src/embed/embed-preview.native.js +0 -157
- package/src/embed/styles.native.scss +0 -196
- package/src/embed/test/__snapshots__/index.native.js.snap +0 -191
- package/src/embed/test/__snapshots__/transforms.native.js.snap +0 -23
- package/src/embed/test/index.native.js +0 -1125
- package/src/embed/test/transforms.native.js +0 -44
- package/src/embed/transforms.native.js +0 -12
- package/src/embed/wp-embed-preview.native.js +0 -80
- package/src/file/edit.native.js +0 -605
- package/src/file/style.native.scss +0 -79
- package/src/file/test/__snapshots__/edit.native.js.snap +0 -580
- package/src/file/test/__snapshots__/transforms.native.js.snap +0 -19
- package/src/file/test/edit.native.js +0 -93
- package/src/file/test/transforms.native.js +0 -43
- package/src/file/transforms.native.js +0 -12
- package/src/freeform/edit.native.js +0 -13
- package/src/freeform/test/__snapshots__/index.native.js.snap +0 -7
- package/src/freeform/test/__snapshots__/transforms.native.js.snap +0 -19
- package/src/freeform/test/index.native.js +0 -57
- package/src/freeform/test/transforms.native.js +0 -39
- package/src/gallery/gallery-styles.native.scss +0 -8
- package/src/gallery/gallery.native.js +0 -124
- package/src/gallery/styles.native.scss +0 -7
- package/src/gallery/test/__snapshots__/index.native.js.snap +0 -177
- package/src/gallery/test/__snapshots__/transforms.native.js.snap +0 -53
- package/src/gallery/test/helpers.native.js +0 -106
- package/src/gallery/test/index.native.js +0 -700
- package/src/gallery/test/transforms.native.js +0 -53
- package/src/gallery/test/use-get-media.native.js +0 -24
- package/src/gallery/transforms.native.js +0 -12
- package/src/gallery/use-get-media.native.js +0 -49
- package/src/group/edit.native.js +0 -137
- package/src/group/editor.native.scss +0 -56
- package/src/group/test/__snapshots__/edit.native.js.snap +0 -19
- package/src/group/test/__snapshots__/transforms.native.js.snap +0 -35
- package/src/group/test/edit.native.js +0 -100
- package/src/group/test/transforms.native.js +0 -73
- package/src/heading/edit.native.js +0 -159
- package/src/heading/test/__snapshots__/index.native.js.snap +0 -43
- package/src/heading/test/__snapshots__/transforms.native.js.snap +0 -47
- package/src/heading/test/index.native.js +0 -257
- package/src/heading/test/transforms.native.js +0 -46
- package/src/heading/transforms.native.js +0 -12
- package/src/html/transforms.native.js +0 -11
- package/src/image/edit.native.js +0 -959
- package/src/image/styles.native.scss +0 -70
- package/src/image/test/__snapshots__/transforms.native.js.snap +0 -49
- package/src/image/test/edit.native.js +0 -459
- package/src/image/test/transforms.native.js +0 -49
- package/src/image/transforms.native.js +0 -12
- package/src/index.native.js +0 -274
- package/src/latest-posts/edit.native.js +0 -294
- package/src/latest-posts/style.native.scss +0 -47
- package/src/latest-posts/test/__snapshots__/edit.native.js.snap +0 -3
- package/src/latest-posts/test/__snapshots__/transforms.native.js.snap +0 -15
- package/src/latest-posts/test/edit.native.js +0 -49
- package/src/latest-posts/test/transforms.native.js +0 -61
- package/src/list/tag-name.native.js +0 -12
- package/src/list/test/__snapshots__/edit.native.js.snap +0 -121
- package/src/list/test/__snapshots__/transforms.native.js.snap +0 -85
- package/src/list/test/edit.native.js +0 -602
- package/src/list/test/transforms.native.js +0 -56
- package/src/list/transforms.native.js +0 -12
- package/src/list-item/edit.native.js +0 -175
- package/src/list-item/hooks/use-enter.native.js +0 -81
- package/src/list-item/icons.native.js +0 -34
- package/src/list-item/list-style-type.native.js +0 -146
- package/src/list-item/style.native.scss +0 -57
- package/src/media-text/edit.native.js +0 -417
- package/src/media-text/icon-retry.native.js +0 -11
- package/src/media-text/media-container.native.js +0 -393
- package/src/media-text/style.native.scss +0 -191
- package/src/media-text/test/__snapshots__/transforms.native.js.snap +0 -73
- package/src/media-text/test/edit.native.js +0 -58
- package/src/media-text/test/transforms.native.js +0 -116
- package/src/media-text/transforms.native.js +0 -12
- package/src/missing/edit.native.js +0 -294
- package/src/missing/style.native.scss +0 -79
- package/src/missing/test/__snapshots__/edit.native.js.snap +0 -110
- package/src/missing/test/edit-integration.native.js +0 -168
- package/src/missing/test/edit.native.js +0 -81
- package/src/more/edit.native.js +0 -36
- package/src/more/editor.native.scss +0 -21
- package/src/more/test/__snapshots__/edit.native.js.snap +0 -7
- package/src/more/test/__snapshots__/transforms.native.js.snap +0 -19
- package/src/more/test/edit.native.js +0 -41
- package/src/more/test/transforms.native.js +0 -42
- package/src/more/transforms.native.js +0 -12
- package/src/navigation-link/shared/build-css-font-sizes.php +0 -43
- package/src/nextpage/edit.native.js +0 -58
- package/src/nextpage/editor.native.scss +0 -21
- package/src/nextpage/test/__snapshots__/transforms.native.js.snap +0 -19
- package/src/nextpage/test/transforms.native.js +0 -42
- package/src/nextpage/transforms.native.js +0 -12
- package/src/paragraph/edit.native.js +0 -116
- package/src/paragraph/test/__snapshots__/edit.native.js.snap +0 -88
- package/src/paragraph/test/__snapshots__/transforms.native.js.snap +0 -65
- package/src/paragraph/test/edit.native.js +0 -999
- package/src/paragraph/test/transforms.native.js +0 -51
- package/src/paragraph/transforms.native.js +0 -12
- package/src/preformatted/edit.native.js +0 -48
- package/src/preformatted/styles.native.scss +0 -30
- package/src/preformatted/test/__snapshots__/edit.native.js.snap +0 -95
- package/src/preformatted/test/__snapshots__/transforms.native.js.snap +0 -37
- package/src/preformatted/test/edit.native.js +0 -111
- package/src/preformatted/test/transforms.native.js +0 -47
- package/src/preformatted/transforms.native.js +0 -12
- package/src/pullquote/blockquote.native.js +0 -39
- package/src/pullquote/blockquote.native.scss +0 -8
- package/src/pullquote/edit.native.js +0 -128
- package/src/pullquote/figure.native.js +0 -33
- package/src/pullquote/figure.native.scss +0 -16
- package/src/pullquote/test/__snapshots__/transforms.native.js.snap +0 -47
- package/src/pullquote/test/edit.native.js +0 -73
- package/src/pullquote/test/transforms.native.js +0 -46
- package/src/pullquote/transforms.native.js +0 -12
- package/src/quote/test/__snapshots__/transforms.native.js.snap +0 -49
- package/src/quote/test/edit.native.js +0 -94
- package/src/quote/test/transforms.native.js +0 -69
- package/src/quote/transforms.native.js +0 -12
- package/src/search/edit.native.js +0 -486
- package/src/search/style.native.scss +0 -99
- package/src/search/test/__snapshots__/edit.native.js.snap +0 -827
- package/src/search/test/__snapshots__/transforms.native.js.snap +0 -15
- package/src/search/test/edit.native.js +0 -170
- package/src/search/test/transforms.native.js +0 -40
- package/src/separator/separator-settings.native.js +0 -3
- package/src/separator/test/__snapshots__/edit.native.js.snap +0 -7
- package/src/separator/test/__snapshots__/transforms.native.js.snap +0 -25
- package/src/separator/test/edit.native.js +0 -41
- package/src/separator/test/transforms.native.js +0 -42
- package/src/separator/transforms.native.js +0 -12
- package/src/shortcode/edit.native.js +0 -77
- package/src/shortcode/style.native.scss +0 -44
- package/src/shortcode/test/__snapshots__/edit.native.js.snap +0 -9
- package/src/shortcode/test/__snapshots__/transforms.native.js.snap +0 -19
- package/src/shortcode/test/edit.native.js +0 -70
- package/src/shortcode/test/transforms.native.js +0 -42
- package/src/shortcode/transforms.native.js +0 -12
- package/src/social-link/edit.native.js +0 -219
- package/src/social-link/editor.native.scss +0 -18
- package/src/social-links/edit.native.js +0 -147
- package/src/social-links/editor.native.scss +0 -25
- package/src/social-links/test/__snapshots__/edit.native.js.snap +0 -57
- package/src/social-links/test/__snapshots__/transforms.native.js.snap +0 -31
- package/src/social-links/test/edit.native.js +0 -266
- package/src/social-links/test/transforms.native.js +0 -53
- package/src/spacer/controls.native.js +0 -86
- package/src/spacer/edit.native.js +0 -110
- package/src/spacer/editor.native.scss +0 -18
- package/src/spacer/save.native.js +0 -18
- package/src/spacer/test/__snapshots__/index.native.js.snap +0 -43
- package/src/spacer/test/__snapshots__/transforms.native.js.snap +0 -25
- package/src/spacer/test/index.native.js +0 -257
- package/src/spacer/test/transforms.native.js +0 -42
- package/src/table/transforms.native.js +0 -11
- package/src/text-columns/transforms.native.js +0 -12
- package/src/utils/init-block.native.js +0 -40
- package/src/utils/transformation-categories.native.js +0 -47
- package/src/verse/test/__snapshots__/edit.native.js.snap +0 -13
- package/src/verse/test/__snapshots__/transforms.native.js.snap +0 -31
- package/src/verse/test/edit.native.js +0 -118
- package/src/verse/test/transforms.native.js +0 -46
- package/src/verse/transforms.native.js +0 -12
- package/src/video/edit.native.js +0 -406
- package/src/video/icon-retry.native.js +0 -11
- package/src/video/style.native.scss +0 -81
- package/src/video/test/__snapshots__/transforms.native.js.snap +0 -41
- package/src/video/test/edit.native.js +0 -53
- package/src/video/test/transforms.native.js +0 -49
- package/src/video/transforms.native.js +0 -12
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# More
|
|
2
|
+
|
|
3
|
+
<!-- START TOKEN(Autogenerated block API docs) -->
|
|
4
|
+
Content before this block will be shown in the excerpt on your archives page.
|
|
5
|
+
|
|
6
|
+
- **Name:** `core/more`
|
|
7
|
+
- **Category:** [design](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/)
|
|
8
|
+
- **API Version:** [3](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/)
|
|
9
|
+
- **Block Type:** [Static](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/) (saved in post content)
|
|
10
|
+
- **Keywords:** `read more`
|
|
11
|
+
|
|
12
|
+
## Attributes
|
|
13
|
+
|
|
14
|
+
_Defined via the [`attributes`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/) property in block.json._
|
|
15
|
+
|
|
16
|
+
| Attribute | [Type](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#type-validation) | [Default](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#default-value) | Description |
|
|
17
|
+
|-----------|------|---------|-------------|
|
|
18
|
+
| `customText` | `string` | `""` | [Role](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#role): `content` |
|
|
19
|
+
| `noTeaser` | `boolean` | `false` | — |
|
|
20
|
+
|
|
21
|
+
## Supports
|
|
22
|
+
|
|
23
|
+
_Defined via the [`supports`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/) property in block.json._
|
|
24
|
+
|
|
25
|
+
- [`customClassName`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#customclassname): `false`
|
|
26
|
+
- [`className`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#classname): `false`
|
|
27
|
+
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
28
|
+
- [`multiple`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#multiple): `false`
|
|
29
|
+
- [`visibility`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#visibility): `false`
|
|
30
|
+
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
|
31
|
+
- `clientNavigation`: `true`
|
|
32
|
+
- `customCSS`: `false`
|
|
33
|
+
|
|
34
|
+
## Block Markup
|
|
35
|
+
|
|
36
|
+
This is a [**static block**](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/). The markup is saved directly in the post content.
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<!-- wp:core/more -->
|
|
40
|
+
<!--more-->
|
|
41
|
+
<!-- /wp:core/more -->
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Source
|
|
45
|
+
|
|
46
|
+
- [block.json](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/more/block.json) ([reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/))
|
|
47
|
+
- [Source directory](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/more/) — browse `edit.js`, `save.js`, `index.php`, and more.
|
|
48
|
+
|
|
49
|
+
<!-- END TOKEN(Autogenerated block API docs) -->
|
package/src/navigation/README.md
CHANGED
|
@@ -12,3 +12,118 @@ The structural CSS for the navigation block targets generic classnames across me
|
|
|
12
12
|
- `.wp-block-navigation-item__label` is applied to the innermost container around the menu item text label.
|
|
13
13
|
- `.wp-block-navigation-item__description` is applied to the innermost container around the menu item description.
|
|
14
14
|
- `.wp-block-navigation__submenu-icon` is applied to the submenu indicator (chevron).
|
|
15
|
+
|
|
16
|
+
<!-- START TOKEN(Autogenerated block API docs) -->
|
|
17
|
+
A collection of blocks that allow visitors to get around your site.
|
|
18
|
+
|
|
19
|
+
- **Name:** `core/navigation`
|
|
20
|
+
- **Category:** [theme](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/)
|
|
21
|
+
- **API Version:** [3](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/)
|
|
22
|
+
- **Block Type:** [Hybrid](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/) (static save + server enhancements)
|
|
23
|
+
- **Keywords:** `menu`, `navigation`, `links`
|
|
24
|
+
|
|
25
|
+
## Block Relationships
|
|
26
|
+
|
|
27
|
+
**[Allowed](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#allowed-blocks) inner blocks:**
|
|
28
|
+
- [`core/navigation-link`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/core-block-navigation-link/)
|
|
29
|
+
- [`core/search`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-widgets/core-block-search/)
|
|
30
|
+
- [`core/social-links`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-widgets/core-block-social-links/)
|
|
31
|
+
- [`core/page-list`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-widgets/core-block-page-list/)
|
|
32
|
+
- [`core/spacer`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/core-block-spacer/)
|
|
33
|
+
- [`core/home-link`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/core-block-home-link/)
|
|
34
|
+
- [`core/icon`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-media/core-block-icon/)
|
|
35
|
+
- [`core/site-title`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-site-title/)
|
|
36
|
+
- [`core/site-logo`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-site-logo/)
|
|
37
|
+
- [`core/navigation-submenu`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/core-block-navigation-submenu/)
|
|
38
|
+
- [`core/loginout`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-loginout/)
|
|
39
|
+
- [`core/buttons`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/core-block-buttons/)
|
|
40
|
+
|
|
41
|
+
## Attributes
|
|
42
|
+
|
|
43
|
+
_Defined via the [`attributes`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/) property in block.json._
|
|
44
|
+
|
|
45
|
+
| Attribute | [Type](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#type-validation) | [Default](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#default-value) | Description |
|
|
46
|
+
|-----------|------|---------|-------------|
|
|
47
|
+
| `ref` | `number` | — | — |
|
|
48
|
+
| `textColor` | `string` | — | — |
|
|
49
|
+
| `customTextColor` | `string` | — | — |
|
|
50
|
+
| `rgbTextColor` | `string` | — | — |
|
|
51
|
+
| `backgroundColor` | `string` | — | — |
|
|
52
|
+
| `customBackgroundColor` | `string` | — | — |
|
|
53
|
+
| `rgbBackgroundColor` | `string` | — | — |
|
|
54
|
+
| `showSubmenuIcon` | `boolean` | `true` | — |
|
|
55
|
+
| `submenuVisibility` | `string` | `"hover"` | [Enum](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#enum-validation): `hover`, `click`, `always` |
|
|
56
|
+
| `overlayMenu` | `string` | `"mobile"` | — |
|
|
57
|
+
| `overlay` | `string` | — | — |
|
|
58
|
+
| `icon` | `string` | `"handle"` | — |
|
|
59
|
+
| `hasIcon` | `boolean` | `true` | — |
|
|
60
|
+
| `__unstableLocation` | `string` | — | — |
|
|
61
|
+
| `overlayBackgroundColor` | `string` | — | — |
|
|
62
|
+
| `customOverlayBackgroundColor` | `string` | — | — |
|
|
63
|
+
| `overlayTextColor` | `string` | — | — |
|
|
64
|
+
| `customOverlayTextColor` | `string` | — | — |
|
|
65
|
+
| `maxNestingLevel` | `number` | `5` | — |
|
|
66
|
+
| `templateLock` | `string \| boolean` | — | [Enum](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#enum-validation): `all`, `insert`, `contentOnly`, `false` |
|
|
67
|
+
|
|
68
|
+
## Supports
|
|
69
|
+
|
|
70
|
+
_Defined via the [`supports`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/) property in block.json._
|
|
71
|
+
|
|
72
|
+
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
73
|
+
- [`align`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#align): `"wide"`, `"full"`
|
|
74
|
+
- [`ariaLabel`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#arialabel): `true`
|
|
75
|
+
- [`contentRole`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#contentrole): `true`
|
|
76
|
+
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
77
|
+
- [`inserter`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#inserter): `true`
|
|
78
|
+
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
79
|
+
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
80
|
+
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
81
|
+
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
82
|
+
- `blockGap`: `true`
|
|
83
|
+
- `units`: `["px","em","rem","vh","vw"]`
|
|
84
|
+
- [`layout`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout):
|
|
85
|
+
- [`allowSwitching`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowswitching): `false`
|
|
86
|
+
- [`allowInheriting`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowinheriting): `false`
|
|
87
|
+
- [`allowVerticalAlignment`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowverticalalignment): `false`
|
|
88
|
+
- [`allowSizingOnChildren`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-allowsizingonchildren): `true`
|
|
89
|
+
- [`default`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#layout-default): `{"type":"flex"}`
|
|
90
|
+
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity): `true`
|
|
91
|
+
- [`renaming`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#renaming): `false`
|
|
92
|
+
|
|
93
|
+
## Context
|
|
94
|
+
|
|
95
|
+
_Defined via the [`usesContext` and `providesContext`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/) properties in block.json._
|
|
96
|
+
|
|
97
|
+
**Provides context:**
|
|
98
|
+
|
|
99
|
+
- `textColor` → attribute `textColor`
|
|
100
|
+
- `customTextColor` → attribute `customTextColor`
|
|
101
|
+
- `backgroundColor` → attribute `backgroundColor`
|
|
102
|
+
- `customBackgroundColor` → attribute `customBackgroundColor`
|
|
103
|
+
- `overlayTextColor` → attribute `overlayTextColor`
|
|
104
|
+
- `customOverlayTextColor` → attribute `customOverlayTextColor`
|
|
105
|
+
- `overlayBackgroundColor` → attribute `overlayBackgroundColor`
|
|
106
|
+
- `customOverlayBackgroundColor` → attribute `customOverlayBackgroundColor`
|
|
107
|
+
- `fontSize` → attribute `fontSize`
|
|
108
|
+
- `customFontSize` → attribute `customFontSize`
|
|
109
|
+
- `showSubmenuIcon` → attribute `showSubmenuIcon`
|
|
110
|
+
- `submenuVisibility` → attribute `submenuVisibility`
|
|
111
|
+
- `openSubmenusOnClick` → attribute `openSubmenusOnClick`
|
|
112
|
+
- `style` → attribute `style`
|
|
113
|
+
- `maxNestingLevel` → attribute `maxNestingLevel`
|
|
114
|
+
|
|
115
|
+
## Block Markup
|
|
116
|
+
|
|
117
|
+
This is a [**hybrid block**](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/). It saves static markup that the server may enhance during rendering.
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<!-- wp:navigation -->
|
|
121
|
+
<!-- /wp:navigation -->
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Source
|
|
125
|
+
|
|
126
|
+
- [block.json](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/navigation/block.json) ([reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/))
|
|
127
|
+
- [Source directory](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/navigation/) — browse `edit.js`, `save.js`, `index.php`, and more.
|
|
128
|
+
|
|
129
|
+
<!-- END TOKEN(Autogenerated block API docs) -->
|
|
@@ -6,13 +6,7 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
useCallback,
|
|
11
|
-
useState,
|
|
12
|
-
useEffect,
|
|
13
|
-
useRef,
|
|
14
|
-
Platform,
|
|
15
|
-
} from '@wordpress/element';
|
|
9
|
+
import { useCallback, useState, useEffect, useRef } from '@wordpress/element';
|
|
16
10
|
import {
|
|
17
11
|
InspectorControls,
|
|
18
12
|
useBlockProps,
|
|
@@ -152,12 +146,7 @@ function ColorTools( {
|
|
|
152
146
|
// Detect if we're editing inside an overlay template part.
|
|
153
147
|
const isWithinOverlay = useSelect( () => isWithinNavigationOverlay(), [] );
|
|
154
148
|
|
|
155
|
-
// Turn on contrast checker for web only since it's not supported on mobile yet.
|
|
156
|
-
const enableContrastChecking = Platform.OS === 'web';
|
|
157
149
|
useEffect( () => {
|
|
158
|
-
if ( ! enableContrastChecking ) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
150
|
detectColors(
|
|
162
151
|
navRef.current,
|
|
163
152
|
setDetectedColor,
|
|
@@ -182,12 +171,7 @@ function ColorTools( {
|
|
|
182
171
|
setDetectedOverlayBackgroundColor
|
|
183
172
|
);
|
|
184
173
|
}
|
|
185
|
-
}, [
|
|
186
|
-
enableContrastChecking,
|
|
187
|
-
overlayTextColor.color,
|
|
188
|
-
overlayBackgroundColor.color,
|
|
189
|
-
navRef,
|
|
190
|
-
] );
|
|
174
|
+
}, [ overlayTextColor.color, overlayBackgroundColor.color, navRef ] );
|
|
191
175
|
const colorGradientSettings = useMultipleOriginColorsAndGradients();
|
|
192
176
|
if ( ! colorGradientSettings.hasColorsOrGradients ) {
|
|
193
177
|
return null;
|
|
@@ -248,18 +232,14 @@ function ColorTools( {
|
|
|
248
232
|
gradients={ [] }
|
|
249
233
|
disableCustomGradients
|
|
250
234
|
/>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
textColor={ detectedOverlayColor }
|
|
260
|
-
/>
|
|
261
|
-
</>
|
|
262
|
-
) }
|
|
235
|
+
<ContrastChecker
|
|
236
|
+
backgroundColor={ detectedBackgroundColor }
|
|
237
|
+
textColor={ detectedColor }
|
|
238
|
+
/>
|
|
239
|
+
<ContrastChecker
|
|
240
|
+
backgroundColor={ detectedOverlayBackgroundColor }
|
|
241
|
+
textColor={ detectedOverlayColor }
|
|
242
|
+
/>
|
|
263
243
|
</>
|
|
264
244
|
);
|
|
265
245
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Custom Link
|
|
2
|
+
|
|
3
|
+
<!-- START TOKEN(Autogenerated block API docs) -->
|
|
4
|
+
Add a page, link, or another item to your navigation.
|
|
5
|
+
|
|
6
|
+
- **Name:** `core/navigation-link`
|
|
7
|
+
- **Category:** [design](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/)
|
|
8
|
+
- **API Version:** [3](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/)
|
|
9
|
+
- **Block Type:** [Hybrid](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/) (static save + server enhancements)
|
|
10
|
+
|
|
11
|
+
## Block Relationships
|
|
12
|
+
|
|
13
|
+
**[Parent](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#parent) blocks (direct):**
|
|
14
|
+
- [`core/navigation`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-navigation/)
|
|
15
|
+
|
|
16
|
+
**[Allowed](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#allowed-blocks) inner blocks:**
|
|
17
|
+
- [`core/navigation-link`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/core-block-navigation-link/)
|
|
18
|
+
- [`core/navigation-submenu`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/core-block-navigation-submenu/)
|
|
19
|
+
- [`core/page-list`](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-widgets/core-block-page-list/)
|
|
20
|
+
|
|
21
|
+
## Attributes
|
|
22
|
+
|
|
23
|
+
_Defined via the [`attributes`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/) property in block.json._
|
|
24
|
+
|
|
25
|
+
| Attribute | [Type](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#type-validation) | [Default](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#default-value) | Description |
|
|
26
|
+
|-----------|------|---------|-------------|
|
|
27
|
+
| `label` | `string` | — | [Role](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#role): `content` |
|
|
28
|
+
| `type` | `string` | — | — |
|
|
29
|
+
| `description` | `string` | — | — |
|
|
30
|
+
| `rel` | `string` | — | — |
|
|
31
|
+
| `id` | `number` | — | — |
|
|
32
|
+
| `opensInNewTab` | `boolean` | `false` | — |
|
|
33
|
+
| `url` | `string` | — | [Role](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#role): `content` |
|
|
34
|
+
| `title` | `string` | — | — |
|
|
35
|
+
| `kind` | `string` | — | — |
|
|
36
|
+
| `isTopLevelLink` | `boolean` | — | — |
|
|
37
|
+
|
|
38
|
+
## Supports
|
|
39
|
+
|
|
40
|
+
_Defined via the [`supports`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/) property in block.json._
|
|
41
|
+
|
|
42
|
+
- [`anchor`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#anchor): `true`
|
|
43
|
+
- [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
|
|
44
|
+
- [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
|
|
45
|
+
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
46
|
+
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
47
|
+
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
48
|
+
- [`renaming`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#renaming): `false`
|
|
49
|
+
- [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity):
|
|
50
|
+
- `clientNavigation`: `true`
|
|
51
|
+
|
|
52
|
+
## Context
|
|
53
|
+
|
|
54
|
+
_Defined via the [`usesContext` and `providesContext`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/) properties in block.json._
|
|
55
|
+
|
|
56
|
+
**Uses context:**
|
|
57
|
+
|
|
58
|
+
- `textColor`
|
|
59
|
+
- `customTextColor`
|
|
60
|
+
- `backgroundColor`
|
|
61
|
+
- `customBackgroundColor`
|
|
62
|
+
- `overlayTextColor`
|
|
63
|
+
- `customOverlayTextColor`
|
|
64
|
+
- `overlayBackgroundColor`
|
|
65
|
+
- `customOverlayBackgroundColor`
|
|
66
|
+
- `fontSize`
|
|
67
|
+
- `customFontSize`
|
|
68
|
+
- `showSubmenuIcon`
|
|
69
|
+
- `maxNestingLevel`
|
|
70
|
+
- `style`
|
|
71
|
+
|
|
72
|
+
## CSS Selectors
|
|
73
|
+
|
|
74
|
+
_Defined via the [`selectors`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-selectors/) property in block.json._
|
|
75
|
+
|
|
76
|
+
- **states**:
|
|
77
|
+
- @current: `.wp-block-navigation .current-menu-item`
|
|
78
|
+
|
|
79
|
+
## Block Markup
|
|
80
|
+
|
|
81
|
+
This is a [**hybrid block**](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/). It saves static markup that the server may enhance during rendering.
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<!-- wp:navigation-link {"label":"WordPress","url":"https://wordpress.org/"} -->
|
|
85
|
+
<!-- /wp:navigation-link -->
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Source
|
|
89
|
+
|
|
90
|
+
- [block.json](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/navigation-link/block.json) ([reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/))
|
|
91
|
+
- [Source directory](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/navigation-link/) — browse `edit.js`, `save.js`, `index.php`, and more.
|
|
92
|
+
|
|
93
|
+
<!-- END TOKEN(Autogenerated block API docs) -->
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
require_once __DIR__ . '/navigation-link/shared/item-should-render.php';
|
|
9
9
|
require_once __DIR__ . '/navigation-link/shared/render-submenu-icon.php';
|
|
10
|
-
require_once __DIR__ . '/navigation-link/shared/build-css-font-sizes.php';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Build an array with CSS classes and inline styles defining the colors
|
|
@@ -138,19 +137,7 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
|
|
|
138
137
|
return '';
|
|
139
138
|
}
|
|
140
139
|
|
|
141
|
-
|
|
142
|
-
// collisions with the core version. Until this function is backported to
|
|
143
|
-
// core, we need to guard its use and only call the prefixed name in
|
|
144
|
-
// the plugin.
|
|
145
|
-
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
|
146
|
-
$font_sizes = gutenberg_block_core_shared_navigation_build_css_font_sizes( $block->context );
|
|
147
|
-
} else {
|
|
148
|
-
$font_sizes = block_core_shared_navigation_build_css_font_sizes( $block->context );
|
|
149
|
-
}
|
|
150
|
-
$classes = array_merge(
|
|
151
|
-
$font_sizes['css_classes']
|
|
152
|
-
);
|
|
153
|
-
$style_attribute = $font_sizes['inline_styles'];
|
|
140
|
+
$classes = array();
|
|
154
141
|
|
|
155
142
|
// Render inner blocks first to check if any menu items will actually display.
|
|
156
143
|
$inner_blocks_html = '';
|
|
@@ -174,7 +161,6 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
|
|
|
174
161
|
array(
|
|
175
162
|
'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) .
|
|
176
163
|
( $is_active ? ' current-menu-item' : '' ),
|
|
177
|
-
'style' => $style_attribute,
|
|
178
164
|
)
|
|
179
165
|
);
|
|
180
166
|
$html = '<li ' . $wrapper_attributes . '>' .
|
|
@@ -8,30 +8,14 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
|
|
|
8
8
|
{
|
|
9
9
|
"attributes": {},
|
|
10
10
|
"description": "A link to a custom URL.",
|
|
11
|
-
"icon":
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"_owner": null,
|
|
20
|
-
"_store": {},
|
|
21
|
-
"key": null,
|
|
22
|
-
"props": {
|
|
23
|
-
"d": "M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z",
|
|
24
|
-
},
|
|
25
|
-
"type": [Function],
|
|
26
|
-
},
|
|
27
|
-
"viewBox": "0 0 24 24",
|
|
28
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
29
|
-
},
|
|
30
|
-
"type": {
|
|
31
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
32
|
-
"render": [Function],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
11
|
+
"icon": <SVG
|
|
12
|
+
viewBox="0 0 24 24"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
>
|
|
15
|
+
<Path
|
|
16
|
+
d="M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"
|
|
17
|
+
/>
|
|
18
|
+
</SVG>,
|
|
35
19
|
"isActive": [Function],
|
|
36
20
|
"name": "link",
|
|
37
21
|
"title": "Custom Link",
|
|
@@ -41,30 +25,14 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
|
|
|
41
25
|
"type": "post",
|
|
42
26
|
},
|
|
43
27
|
"description": "A link to a post.",
|
|
44
|
-
"icon":
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"_owner": null,
|
|
53
|
-
"_store": {},
|
|
54
|
-
"key": null,
|
|
55
|
-
"props": {
|
|
56
|
-
"d": "M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z",
|
|
57
|
-
},
|
|
58
|
-
"type": [Function],
|
|
59
|
-
},
|
|
60
|
-
"viewBox": "0 0 24 24",
|
|
61
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
62
|
-
},
|
|
63
|
-
"type": {
|
|
64
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
65
|
-
"render": [Function],
|
|
66
|
-
},
|
|
67
|
-
},
|
|
28
|
+
"icon": <SVG
|
|
29
|
+
viewBox="0 0 24 24"
|
|
30
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
+
>
|
|
32
|
+
<Path
|
|
33
|
+
d="M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"
|
|
34
|
+
/>
|
|
35
|
+
</SVG>,
|
|
68
36
|
"isActive": [Function],
|
|
69
37
|
"name": "post",
|
|
70
38
|
"title": "Post Link",
|
|
@@ -74,42 +42,17 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
|
|
|
74
42
|
"type": "page",
|
|
75
43
|
},
|
|
76
44
|
"description": "A link to a page.",
|
|
77
|
-
"icon":
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"key": null,
|
|
89
|
-
"props": {
|
|
90
|
-
"d": "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z",
|
|
91
|
-
},
|
|
92
|
-
"type": [Function],
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"$$typeof": Symbol(react.transitional.element),
|
|
96
|
-
"_owner": null,
|
|
97
|
-
"_store": {},
|
|
98
|
-
"key": null,
|
|
99
|
-
"props": {
|
|
100
|
-
"d": "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z",
|
|
101
|
-
},
|
|
102
|
-
"type": [Function],
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
"viewBox": "0 0 24 24",
|
|
106
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
107
|
-
},
|
|
108
|
-
"type": {
|
|
109
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
110
|
-
"render": [Function],
|
|
111
|
-
},
|
|
112
|
-
},
|
|
45
|
+
"icon": <SVG
|
|
46
|
+
viewBox="0 0 24 24"
|
|
47
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
48
|
+
>
|
|
49
|
+
<Path
|
|
50
|
+
d="M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"
|
|
51
|
+
/>
|
|
52
|
+
<Path
|
|
53
|
+
d="M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"
|
|
54
|
+
/>
|
|
55
|
+
</SVG>,
|
|
113
56
|
"isActive": [Function],
|
|
114
57
|
"name": "page",
|
|
115
58
|
"title": "Page Link",
|
|
@@ -119,32 +62,16 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
|
|
|
119
62
|
"type": "category",
|
|
120
63
|
},
|
|
121
64
|
"description": "A link to a category.",
|
|
122
|
-
"icon":
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"key": null,
|
|
133
|
-
"props": {
|
|
134
|
-
"clipRule": "evenodd",
|
|
135
|
-
"d": "M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",
|
|
136
|
-
"fillRule": "evenodd",
|
|
137
|
-
},
|
|
138
|
-
"type": [Function],
|
|
139
|
-
},
|
|
140
|
-
"viewBox": "0 0 24 24",
|
|
141
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
142
|
-
},
|
|
143
|
-
"type": {
|
|
144
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
145
|
-
"render": [Function],
|
|
146
|
-
},
|
|
147
|
-
},
|
|
65
|
+
"icon": <SVG
|
|
66
|
+
viewBox="0 0 24 24"
|
|
67
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
68
|
+
>
|
|
69
|
+
<Path
|
|
70
|
+
clipRule="evenodd"
|
|
71
|
+
d="M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z"
|
|
72
|
+
fillRule="evenodd"
|
|
73
|
+
/>
|
|
74
|
+
</SVG>,
|
|
148
75
|
"isActive": [Function],
|
|
149
76
|
"name": "category",
|
|
150
77
|
"title": "Category Link",
|
|
@@ -154,30 +81,14 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
|
|
|
154
81
|
"type": "tag",
|
|
155
82
|
},
|
|
156
83
|
"description": "A link to a tag.",
|
|
157
|
-
"icon":
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"_owner": null,
|
|
166
|
-
"_store": {},
|
|
167
|
-
"key": null,
|
|
168
|
-
"props": {
|
|
169
|
-
"d": "M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",
|
|
170
|
-
},
|
|
171
|
-
"type": [Function],
|
|
172
|
-
},
|
|
173
|
-
"viewBox": "0 0 24 24",
|
|
174
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
175
|
-
},
|
|
176
|
-
"type": {
|
|
177
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
178
|
-
"render": [Function],
|
|
179
|
-
},
|
|
180
|
-
},
|
|
84
|
+
"icon": <SVG
|
|
85
|
+
viewBox="0 0 24 24"
|
|
86
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
87
|
+
>
|
|
88
|
+
<Path
|
|
89
|
+
d="M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
|
|
90
|
+
/>
|
|
91
|
+
</SVG>,
|
|
181
92
|
"isActive": [Function],
|
|
182
93
|
"name": "tag",
|
|
183
94
|
"title": "Tag Link",
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Navigation Overlay Close
|
|
2
|
+
|
|
3
|
+
<!-- START TOKEN(Autogenerated block API docs) -->
|
|
4
|
+
A customizable button to close overlays.
|
|
5
|
+
|
|
6
|
+
- **Name:** `core/navigation-overlay-close`
|
|
7
|
+
- **Category:** [design](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-design/)
|
|
8
|
+
- **API Version:** [3](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/)
|
|
9
|
+
- **Block Type:** [Dynamic](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/) (server-rendered)
|
|
10
|
+
- **Keywords:** `close`, `overlay`, `navigation`, `menu`
|
|
11
|
+
|
|
12
|
+
## Attributes
|
|
13
|
+
|
|
14
|
+
_Defined via the [`attributes`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/) property in block.json._
|
|
15
|
+
|
|
16
|
+
| Attribute | [Type](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#type-validation) | [Default](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#default-value) | Description |
|
|
17
|
+
|-----------|------|---------|-------------|
|
|
18
|
+
| `displayMode` | `string` | `"icon"` | [Enum](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#enum-validation): `icon`, `text`, `both` |
|
|
19
|
+
| `text` | `string` | — | — |
|
|
20
|
+
|
|
21
|
+
## Supports
|
|
22
|
+
|
|
23
|
+
_Defined via the [`supports`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/) property in block.json._
|
|
24
|
+
|
|
25
|
+
- [`color`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color):
|
|
26
|
+
- [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `false`
|
|
27
|
+
- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
|
|
28
|
+
- `padding`: `true`
|
|
29
|
+
- [`typography`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography):
|
|
30
|
+
- [`fontSize`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-fontsize): `true`
|
|
31
|
+
- [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true`
|
|
32
|
+
|
|
33
|
+
## Block Markup
|
|
34
|
+
|
|
35
|
+
This is a [**dynamic block**](https://developer.wordpress.org/block-editor/getting-started/fundamentals/static-dynamic-rendering/). It is rendered on the server and does not save HTML in post content.
|
|
36
|
+
|
|
37
|
+
In post content, it is stored as a block comment:
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<!-- wp:navigation-overlay-close /-->
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Source
|
|
44
|
+
|
|
45
|
+
- [block.json](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/navigation-overlay-close/block.json) ([reference](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/))
|
|
46
|
+
- [Source directory](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/navigation-overlay-close/) — browse `edit.js`, `save.js`, `index.php`, and more.
|
|
47
|
+
|
|
48
|
+
<!-- END TOKEN(Autogenerated block API docs) -->
|