@wordpress/block-library 8.30.0 → 8.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/block/edit.js +22 -16
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.native.js +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/code/save.js +3 -1
- package/build/code/save.js.map +1 -1
- package/build/cover/edit/index.js +2 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/details/edit.js +1 -0
- package/build/details/edit.js.map +1 -1
- package/build/file/edit.js +2 -0
- package/build/file/edit.js.map +1 -1
- package/build/heading/index.js +4 -3
- package/build/heading/index.js.map +1 -1
- package/build/image/edit.js +10 -39
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +27 -6
- package/build/image/image.js.map +1 -1
- package/build/media-text/edit.js +33 -9
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/index.js +5 -0
- package/build/media-text/index.js.map +1 -1
- package/build/media-text/media-container.js +30 -11
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/save.js +2 -2
- package/build/media-text/save.js.map +1 -1
- package/build/navigation/edit/index.js +23 -29
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +12 -20
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +24 -23
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +4 -4
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +15 -12
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation/view.js +12 -2
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +52 -27
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +31 -9
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/pattern/edit.js +3 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +1 -0
- package/build/post-author/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +16 -4
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +13 -2
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-featured-image/overlay-controls.js +82 -0
- package/build/post-featured-image/overlay-controls.js.map +1 -0
- package/build/post-featured-image/overlay.js +5 -54
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-navigation-link/edit.js +1 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/edit.js +2 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/quote/edit.js +18 -23
- package/build/quote/edit.js.map +1 -1
- package/build/read-more/edit.js +1 -0
- package/build/read-more/edit.js.map +1 -1
- package/build/search/edit.js +2 -0
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/site-tagline/edit.js +13 -4
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +4 -0
- package/build/site-tagline/index.js.map +1 -1
- package/build/social-link/edit.js +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/icons/medium.js +1 -1
- package/build/social-link/icons/medium.js.map +1 -1
- package/build/social-link/icons/reddit.js +1 -1
- package/build/social-link/icons/reddit.js.map +1 -1
- package/build/table/deprecated.js +285 -175
- package/build/table/deprecated.js.map +1 -1
- package/build/table/index.js +1 -1
- package/build/template-part/edit/index.js +55 -47
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +106 -10
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +1 -9
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/utils/caption.js +19 -13
- package/build/utils/caption.js.map +1 -1
- package/build/utils/hooks.js +1 -0
- package/build/utils/hooks.js.map +1 -1
- package/build/video/edit.native.js +1 -1
- package/build/video/edit.native.js.map +1 -1
- package/build-module/block/edit.js +23 -17
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.native.js +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/code/save.js +3 -1
- package/build-module/code/save.js.map +1 -1
- package/build-module/cover/edit/index.js +2 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/details/edit.js +1 -0
- package/build-module/details/edit.js.map +1 -1
- package/build-module/file/edit.js +2 -0
- package/build-module/file/edit.js.map +1 -1
- package/build-module/heading/index.js +4 -3
- package/build-module/heading/index.js.map +1 -1
- package/build-module/image/edit.js +11 -40
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +27 -6
- package/build-module/image/image.js.map +1 -1
- package/build-module/media-text/edit.js +34 -10
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/index.js +5 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/media-text/media-container.js +31 -12
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/save.js +2 -2
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/navigation/edit/index.js +24 -30
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +15 -23
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +24 -23
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +4 -4
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +15 -12
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation/view.js +12 -2
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +55 -30
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +31 -9
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/pattern/edit.js +3 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +1 -0
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +17 -5
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +13 -2
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-featured-image/overlay-controls.js +75 -0
- package/build-module/post-featured-image/overlay-controls.js.map +1 -0
- package/build-module/post-featured-image/overlay.js +7 -56
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +2 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/quote/edit.js +20 -25
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/read-more/edit.js +1 -0
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/search/edit.js +2 -0
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/site-tagline/edit.js +14 -5
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +4 -0
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/social-link/edit.js +1 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/icons/medium.js +1 -1
- package/build-module/social-link/icons/medium.js.map +1 -1
- package/build-module/social-link/icons/reddit.js +1 -1
- package/build-module/social-link/icons/reddit.js.map +1 -1
- package/build-module/table/deprecated.js +286 -176
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/index.js +1 -1
- package/build-module/template-part/edit/index.js +58 -50
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +108 -12
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +2 -10
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/utils/caption.js +19 -13
- package/build-module/utils/caption.js.map +1 -1
- package/build-module/utils/hooks.js +1 -0
- package/build-module/utils/hooks.js.map +1 -1
- package/build-module/video/edit.native.js +1 -1
- package/build-module/video/edit.native.js.map +1 -1
- package/build-style/audio/theme-rtl.css +1 -1
- package/build-style/audio/theme.css +1 -1
- package/build-style/cover/style-rtl.css +5 -2
- package/build-style/cover/style.css +5 -2
- package/build-style/editor-rtl.css +22 -12
- package/build-style/editor.css +22 -12
- package/build-style/embed/theme-rtl.css +1 -1
- package/build-style/embed/theme.css +1 -1
- package/build-style/file/editor-rtl.css +3 -0
- package/build-style/file/editor.css +3 -0
- package/build-style/image/editor-rtl.css +0 -3
- package/build-style/image/editor.css +0 -3
- package/build-style/image/theme-rtl.css +1 -1
- package/build-style/image/theme.css +1 -1
- package/build-style/media-text/editor-rtl.css +7 -1
- package/build-style/media-text/editor.css +7 -1
- package/build-style/pullquote/theme-rtl.css +2 -1
- package/build-style/pullquote/theme.css +2 -1
- package/build-style/quote/theme-rtl.css +6 -6
- package/build-style/quote/theme.css +6 -6
- package/build-style/search/style-rtl.css +10 -0
- package/build-style/search/style.css +10 -0
- package/build-style/social-links/editor-rtl.css +0 -4
- package/build-style/social-links/editor.css +0 -4
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/style-rtl.css +17 -4
- package/build-style/style.css +17 -4
- package/build-style/table/theme-rtl.css +4 -3
- package/build-style/table/theme.css +4 -3
- package/build-style/template-part/editor-rtl.css +12 -4
- package/build-style/template-part/editor.css +12 -4
- package/build-style/template-part/theme-rtl.css +1 -1
- package/build-style/template-part/theme.css +1 -1
- package/build-style/theme-rtl.css +17 -15
- package/build-style/theme.css +17 -15
- package/build-style/video/theme-rtl.css +1 -1
- package/build-style/video/theme.css +1 -1
- package/package.json +34 -34
- package/src/archives/index.php +4 -0
- package/src/audio/theme.scss +1 -1
- package/src/avatar/index.php +6 -0
- package/src/block/edit.js +43 -32
- package/src/block/index.php +4 -0
- package/src/block/test/edit.native.js +67 -0
- package/src/button/edit.native.js +1 -1
- package/src/calendar/index.php +12 -0
- package/src/categories/index.php +6 -0
- package/src/code/save.js +7 -1
- package/src/comment-author-name/index.php +4 -0
- package/src/comment-content/index.php +4 -0
- package/src/comment-date/index.php +4 -0
- package/src/comment-edit-link/index.php +4 -0
- package/src/comment-reply-link/index.php +4 -0
- package/src/comment-template/index.php +4 -0
- package/src/comments/index.php +10 -0
- package/src/comments-pagination/index.php +4 -0
- package/src/comments-pagination-next/index.php +4 -0
- package/src/comments-pagination-numbers/index.php +4 -0
- package/src/comments-pagination-previous/index.php +4 -0
- package/src/comments-title/index.php +4 -0
- package/src/cover/edit/index.js +4 -1
- package/src/cover/index.php +4 -0
- package/src/cover/style.scss +6 -2
- package/src/details/edit.js +1 -0
- package/src/embed/theme.scss +1 -1
- package/src/file/edit.js +2 -0
- package/src/file/editor.scss +3 -0
- package/src/file/index.php +4 -0
- package/src/gallery/editor.scss +1 -1
- package/src/gallery/index.php +7 -1
- package/src/heading/index.js +4 -3
- package/src/heading/index.php +4 -0
- package/src/home-link/index.php +10 -0
- package/src/image/edit.js +11 -40
- package/src/image/editor.scss +2 -7
- package/src/image/image.js +25 -7
- package/src/image/index.php +12 -1
- package/src/image/theme.scss +1 -1
- package/src/latest-comments/index.php +4 -0
- package/src/latest-posts/index.php +8 -0
- package/src/loginout/index.php +4 -0
- package/src/media-text/block.json +5 -0
- package/src/media-text/edit.js +70 -19
- package/src/media-text/editor.scss +7 -1
- package/src/media-text/index.php +70 -0
- package/src/media-text/media-container.js +49 -9
- package/src/media-text/save.js +2 -2
- package/src/navigation/edit/index.js +67 -71
- package/src/navigation/edit/navigation-menu-delete-control.js +22 -49
- package/src/navigation/edit/navigation-menu-selector.js +39 -21
- package/src/navigation/edit/placeholder/index.js +4 -4
- package/src/navigation/edit/test/navigation-menu-selector.js +75 -53
- package/src/navigation/index.php +109 -26
- package/src/navigation/test/use-navigation-menu.js +21 -21
- package/src/navigation/use-navigation-menu.js +23 -9
- package/src/navigation/view.js +11 -2
- package/src/navigation-link/edit.js +64 -39
- package/src/navigation-link/index.php +14 -0
- package/src/navigation-submenu/edit.js +34 -10
- package/src/navigation-submenu/index.php +8 -0
- package/src/page-list/index.php +12 -0
- package/src/page-list-item/index.php +2 -0
- package/src/pattern/edit.js +4 -0
- package/src/pattern/index.php +2 -0
- package/src/post-author/edit.js +1 -0
- package/src/post-author/index.php +4 -0
- package/src/post-author-biography/index.php +4 -0
- package/src/post-author-name/index.php +4 -0
- package/src/post-comments-form/index.php +6 -0
- package/src/post-content/index.php +4 -0
- package/src/post-date/index.php +4 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/index.php +4 -0
- package/src/post-featured-image/block.json +13 -2
- package/src/post-featured-image/edit.js +16 -1
- package/src/post-featured-image/editor.scss +1 -1
- package/src/post-featured-image/index.php +15 -0
- package/src/post-featured-image/overlay-controls.js +88 -0
- package/src/post-featured-image/overlay.js +17 -84
- package/src/post-navigation-link/edit.js +1 -0
- package/src/post-navigation-link/index.php +4 -0
- package/src/post-template/index.php +4 -0
- package/src/post-terms/edit.js +2 -0
- package/src/post-terms/index.php +6 -0
- package/src/post-title/index.php +2 -0
- package/src/pullquote/theme.scss +3 -1
- package/src/query/index.php +2 -0
- package/src/query-no-results/index.php +6 -0
- package/src/query-pagination/index.php +4 -0
- package/src/query-pagination-next/index.php +6 -0
- package/src/query-pagination-numbers/index.php +6 -0
- package/src/query-pagination-previous/index.php +4 -0
- package/src/query-title/index.php +4 -0
- package/src/quote/edit.js +27 -37
- package/src/quote/test/edit.native.js +4 -6
- package/src/quote/theme.scss +1 -2
- package/src/read-more/edit.js +1 -0
- package/src/read-more/index.php +4 -0
- package/src/rss/index.php +4 -0
- package/src/search/edit.js +2 -0
- package/src/search/edit.native.js +2 -2
- package/src/search/index.php +19 -1
- package/src/search/style.scss +11 -0
- package/src/shortcode/index.php +4 -0
- package/src/site-logo/editor.scss +2 -2
- package/src/site-logo/index.php +20 -0
- package/src/site-tagline/block.json +4 -0
- package/src/site-tagline/edit.js +16 -3
- package/src/site-tagline/index.php +13 -1
- package/src/site-title/index.php +4 -0
- package/src/social-link/edit.js +1 -1
- package/src/social-link/icons/medium.js +1 -1
- package/src/social-link/icons/reddit.js +1 -1
- package/src/social-link/index.php +22 -9
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/editor.scss +1 -9
- package/src/table/block.json +1 -1
- package/src/table/deprecated.js +308 -175
- package/src/table/theme.scss +4 -2
- package/src/tag-cloud/index.php +4 -0
- package/src/template-part/edit/index.js +87 -79
- package/src/template-part/edit/inner-blocks.js +126 -13
- package/src/template-part/edit/selection-modal.js +1 -22
- package/src/template-part/editor.scss +11 -3
- package/src/template-part/index.php +12 -0
- package/src/template-part/theme.scss +1 -1
- package/src/term-description/index.php +4 -0
- package/src/utils/caption.js +19 -16
- package/src/utils/hooks.js +1 -0
- package/src/video/edit.native.js +2 -0
- package/src/video/editor.scss +2 -2
- package/src/video/theme.scss +1 -1
- package/tsconfig.json +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","_react","createElement","URLPopover","anchor","onClose","className","onSubmit","event","preventDefault","URLInput","__nextHasNoMarginBottom","value","onChange","nextURL","placeholder","__","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","label","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","classNames","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkLabel","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","sprintf","initialOpen","PanelRow","TextControl","help","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\tonClose={ () => setPopover( false ) }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label, rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = classNames( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\tconst socialLinkLabel = label ?? socialLinkName;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ sprintf(\n\t\t\t\t\t\t/* translators: %s: name of the social service. */\n\t\t\t\t\t\t__( '%s label' ),\n\t\t\t\t\t\tsocialLinkName\n\t\t\t\t\t) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Link label' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Briefly describe the link to help screen reader users.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classNames( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkLabel }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AA/BA;AACA;AACA;;AAGA;AACA;AACA;;AAqBA;AACA;AACA;;AAGA,MAAMS,oBAAoB,GAAGA,CAAE;EAC9BC,GAAG;EACHC,aAAa;EACbC,UAAU;EACVC,aAAa;EACbC;AACD,CAAC,KAAM;EACN,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACvD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAiB,UAAU;IACVC,MAAM,EAAGR,aAAe;IACxBS,OAAO,EAAGA,CAAA,KAAMV,UAAU,CAAE,KAAM;EAAG,GAErC,IAAAM,MAAA,CAAAC,aAAA;IACCI,SAAS,EAAC,uCAAuC;IACjDC,QAAQ,EAAKC,KAAK,IAAM;MACvBA,KAAK,CAACC,cAAc,CAAC,CAAC;MACtBd,UAAU,CAAE,KAAM,CAAC;IACpB;EAA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","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","_react","createElement","URLPopover","anchor","onClose","className","onSubmit","event","preventDefault","URLInput","__nextHasNoMarginBottom","value","onChange","nextURL","placeholder","__","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","label","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","classNames","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkLabel","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","sprintf","initialOpen","PanelRow","TextControl","help","undefined","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\tonClose={ () => setPopover( false ) }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label, rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = classNames( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\tconst socialLinkLabel = label ?? socialLinkName;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ sprintf(\n\t\t\t\t\t\t/* translators: %s: name of the social service. */\n\t\t\t\t\t\t__( '%s label' ),\n\t\t\t\t\t\tsocialLinkName\n\t\t\t\t\t) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Link label' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Briefly describe the link to help screen reader users.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value || undefined } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classNames( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkLabel }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AA/BA;AACA;AACA;;AAGA;AACA;AACA;;AAqBA;AACA;AACA;;AAGA,MAAMS,oBAAoB,GAAGA,CAAE;EAC9BC,GAAG;EACHC,aAAa;EACbC,UAAU;EACVC,aAAa;EACbC;AACD,CAAC,KAA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B,EAAE,CAAER;IACzB,CAAE;EAAG,GAEHc,eACG,CAAC,EACLjB,UAAU,IAAIQ,cAAc,IAC7B,IAAAvC,MAAA,CAAAC,aAAA,EAACV,oBAAoB;IACpBC,GAAG,EAAGA,GAAK;IACXC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA,UAAY;IACzBC,aAAa,EAAGA,aAAe;IAC/BC,QAAQ,EAAGA;EAAU,CACrB,CAEK,CACL,CACH,CAAC;AAEL,CAAC;AAAC,IAAAuE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEazC,cAAc"}
|
|
@@ -16,7 +16,7 @@ const MediumIcon = () => (0, _react.createElement)(_primitives.SVG, {
|
|
|
16
16
|
viewBox: "0 0 24 24",
|
|
17
17
|
version: "1.1"
|
|
18
18
|
}, (0, _react.createElement)(_primitives.Path, {
|
|
19
|
-
d: "
|
|
19
|
+
d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12"
|
|
20
20
|
}));
|
|
21
21
|
exports.MediumIcon = MediumIcon;
|
|
22
22
|
//# sourceMappingURL=medium.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_primitives","require","MediumIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/medium.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const MediumIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"
|
|
1
|
+
{"version":3,"names":["_primitives","require","MediumIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/medium.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const MediumIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAAqP,CAAE,CAC3P,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
|
|
@@ -16,7 +16,7 @@ const RedditIcon = () => (0, _react.createElement)(_primitives.SVG, {
|
|
|
16
16
|
viewBox: "0 0 24 24",
|
|
17
17
|
version: "1.1"
|
|
18
18
|
}, (0, _react.createElement)(_primitives.Path, {
|
|
19
|
-
d: "
|
|
19
|
+
d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z"
|
|
20
20
|
}));
|
|
21
21
|
exports.RedditIcon = RedditIcon;
|
|
22
22
|
//# sourceMappingURL=reddit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_primitives","require","RedditIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/reddit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const RedditIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"
|
|
1
|
+
{"version":3,"names":["_primitives","require","RedditIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/reddit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const RedditIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAA+lC,CAAE,CACrmC,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
|
|
@@ -26,8 +26,246 @@ const oldColors = {
|
|
|
26
26
|
'subtle-pale-pink': '#fcf0ef'
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
// Fixed width table cells on by default.
|
|
30
|
+
const v4Query = {
|
|
31
|
+
content: {
|
|
32
|
+
type: 'rich-text',
|
|
33
|
+
source: 'rich-text'
|
|
34
|
+
},
|
|
35
|
+
tag: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: 'td',
|
|
38
|
+
source: 'tag'
|
|
39
|
+
},
|
|
40
|
+
scope: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
source: 'attribute',
|
|
43
|
+
attribute: 'scope'
|
|
44
|
+
},
|
|
45
|
+
align: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
source: 'attribute',
|
|
48
|
+
attribute: 'data-align'
|
|
49
|
+
},
|
|
50
|
+
colspan: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
source: 'attribute',
|
|
53
|
+
attribute: 'colspan'
|
|
54
|
+
},
|
|
55
|
+
rowspan: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
source: 'attribute',
|
|
58
|
+
attribute: 'rowspan'
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const v4 = {
|
|
62
|
+
attributes: {
|
|
63
|
+
hasFixedLayout: {
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
caption: {
|
|
68
|
+
type: 'rich-text',
|
|
69
|
+
source: 'rich-text',
|
|
70
|
+
selector: 'figcaption'
|
|
71
|
+
},
|
|
72
|
+
head: {
|
|
73
|
+
type: 'array',
|
|
74
|
+
default: [],
|
|
75
|
+
source: 'query',
|
|
76
|
+
selector: 'thead tr',
|
|
77
|
+
query: {
|
|
78
|
+
cells: {
|
|
79
|
+
type: 'array',
|
|
80
|
+
default: [],
|
|
81
|
+
source: 'query',
|
|
82
|
+
selector: 'td,th',
|
|
83
|
+
query: v4Query
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
body: {
|
|
88
|
+
type: 'array',
|
|
89
|
+
default: [],
|
|
90
|
+
source: 'query',
|
|
91
|
+
selector: 'tbody tr',
|
|
92
|
+
query: {
|
|
93
|
+
cells: {
|
|
94
|
+
type: 'array',
|
|
95
|
+
default: [],
|
|
96
|
+
source: 'query',
|
|
97
|
+
selector: 'td,th',
|
|
98
|
+
query: v4Query
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
foot: {
|
|
103
|
+
type: 'array',
|
|
104
|
+
default: [],
|
|
105
|
+
source: 'query',
|
|
106
|
+
selector: 'tfoot tr',
|
|
107
|
+
query: {
|
|
108
|
+
cells: {
|
|
109
|
+
type: 'array',
|
|
110
|
+
default: [],
|
|
111
|
+
source: 'query',
|
|
112
|
+
selector: 'td,th',
|
|
113
|
+
query: v4Query
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
supports: {
|
|
119
|
+
anchor: true,
|
|
120
|
+
align: true,
|
|
121
|
+
color: {
|
|
122
|
+
__experimentalSkipSerialization: true,
|
|
123
|
+
gradients: true,
|
|
124
|
+
__experimentalDefaultControls: {
|
|
125
|
+
background: true,
|
|
126
|
+
text: true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
spacing: {
|
|
130
|
+
margin: true,
|
|
131
|
+
padding: true,
|
|
132
|
+
__experimentalDefaultControls: {
|
|
133
|
+
margin: false,
|
|
134
|
+
padding: false
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
typography: {
|
|
138
|
+
fontSize: true,
|
|
139
|
+
lineHeight: true,
|
|
140
|
+
__experimentalFontFamily: true,
|
|
141
|
+
__experimentalFontStyle: true,
|
|
142
|
+
__experimentalFontWeight: true,
|
|
143
|
+
__experimentalLetterSpacing: true,
|
|
144
|
+
__experimentalTextTransform: true,
|
|
145
|
+
__experimentalTextDecoration: true,
|
|
146
|
+
__experimentalDefaultControls: {
|
|
147
|
+
fontSize: true
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
__experimentalBorder: {
|
|
151
|
+
__experimentalSkipSerialization: true,
|
|
152
|
+
color: true,
|
|
153
|
+
style: true,
|
|
154
|
+
width: true,
|
|
155
|
+
__experimentalDefaultControls: {
|
|
156
|
+
color: true,
|
|
157
|
+
style: true,
|
|
158
|
+
width: true
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
__experimentalSelector: '.wp-block-table > table',
|
|
162
|
+
interactivity: {
|
|
163
|
+
clientNavigation: true
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
save({
|
|
167
|
+
attributes
|
|
168
|
+
}) {
|
|
169
|
+
const {
|
|
170
|
+
hasFixedLayout,
|
|
171
|
+
head,
|
|
172
|
+
body,
|
|
173
|
+
foot,
|
|
174
|
+
caption
|
|
175
|
+
} = attributes;
|
|
176
|
+
const isEmpty = !head.length && !body.length && !foot.length;
|
|
177
|
+
if (isEmpty) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
const colorProps = (0, _blockEditor.__experimentalGetColorClassesAndStyles)(attributes);
|
|
181
|
+
const borderProps = (0, _blockEditor.__experimentalGetBorderClassesAndStyles)(attributes);
|
|
182
|
+
const classes = (0, _classnames.default)(colorProps.className, borderProps.className, {
|
|
183
|
+
'has-fixed-layout': hasFixedLayout
|
|
184
|
+
});
|
|
185
|
+
const hasCaption = !_blockEditor.RichText.isEmpty(caption);
|
|
186
|
+
const Section = ({
|
|
187
|
+
type,
|
|
188
|
+
rows
|
|
189
|
+
}) => {
|
|
190
|
+
if (!rows.length) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
const Tag = `t${type}`;
|
|
194
|
+
return (0, _react.createElement)(Tag, null, rows.map(({
|
|
195
|
+
cells
|
|
196
|
+
}, rowIndex) => (0, _react.createElement)("tr", {
|
|
197
|
+
key: rowIndex
|
|
198
|
+
}, cells.map(({
|
|
199
|
+
content,
|
|
200
|
+
tag,
|
|
201
|
+
scope,
|
|
202
|
+
align,
|
|
203
|
+
colspan,
|
|
204
|
+
rowspan
|
|
205
|
+
}, cellIndex) => {
|
|
206
|
+
const cellClasses = (0, _classnames.default)({
|
|
207
|
+
[`has-text-align-${align}`]: align
|
|
208
|
+
});
|
|
209
|
+
return (0, _react.createElement)(_blockEditor.RichText.Content, {
|
|
210
|
+
className: cellClasses ? cellClasses : undefined,
|
|
211
|
+
"data-align": align,
|
|
212
|
+
tagName: tag,
|
|
213
|
+
value: content,
|
|
214
|
+
key: cellIndex,
|
|
215
|
+
scope: tag === 'th' ? scope : undefined,
|
|
216
|
+
colSpan: colspan,
|
|
217
|
+
rowSpan: rowspan
|
|
218
|
+
});
|
|
219
|
+
}))));
|
|
220
|
+
};
|
|
221
|
+
return (0, _react.createElement)("figure", {
|
|
222
|
+
..._blockEditor.useBlockProps.save()
|
|
223
|
+
}, (0, _react.createElement)("table", {
|
|
224
|
+
className: classes === '' ? undefined : classes,
|
|
225
|
+
style: {
|
|
226
|
+
...colorProps.style,
|
|
227
|
+
...borderProps.style
|
|
228
|
+
}
|
|
229
|
+
}, (0, _react.createElement)(Section, {
|
|
230
|
+
type: "head",
|
|
231
|
+
rows: head
|
|
232
|
+
}), (0, _react.createElement)(Section, {
|
|
233
|
+
type: "body",
|
|
234
|
+
rows: body
|
|
235
|
+
}), (0, _react.createElement)(Section, {
|
|
236
|
+
type: "foot",
|
|
237
|
+
rows: foot
|
|
238
|
+
})), hasCaption && (0, _react.createElement)(_blockEditor.RichText.Content, {
|
|
239
|
+
tagName: "figcaption",
|
|
240
|
+
value: caption,
|
|
241
|
+
className: (0, _blockEditor.__experimentalGetElementClassName)('caption')
|
|
242
|
+
}));
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
|
|
29
246
|
// In #41140 support was added to global styles for caption elements which
|
|
30
247
|
// added a `wp-element-caption` classname to the embed figcaption element.
|
|
248
|
+
const v3Query = {
|
|
249
|
+
content: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
source: 'html'
|
|
252
|
+
},
|
|
253
|
+
tag: {
|
|
254
|
+
type: 'string',
|
|
255
|
+
default: 'td',
|
|
256
|
+
source: 'tag'
|
|
257
|
+
},
|
|
258
|
+
scope: {
|
|
259
|
+
type: 'string',
|
|
260
|
+
source: 'attribute',
|
|
261
|
+
attribute: 'scope'
|
|
262
|
+
},
|
|
263
|
+
align: {
|
|
264
|
+
type: 'string',
|
|
265
|
+
source: 'attribute',
|
|
266
|
+
attribute: 'data-align'
|
|
267
|
+
}
|
|
268
|
+
};
|
|
31
269
|
const v3 = {
|
|
32
270
|
attributes: {
|
|
33
271
|
hasFixedLayout: {
|
|
@@ -51,27 +289,7 @@ const v3 = {
|
|
|
51
289
|
default: [],
|
|
52
290
|
source: 'query',
|
|
53
291
|
selector: 'td,th',
|
|
54
|
-
query:
|
|
55
|
-
content: {
|
|
56
|
-
type: 'string',
|
|
57
|
-
source: 'html'
|
|
58
|
-
},
|
|
59
|
-
tag: {
|
|
60
|
-
type: 'string',
|
|
61
|
-
default: 'td',
|
|
62
|
-
source: 'tag'
|
|
63
|
-
},
|
|
64
|
-
scope: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
source: 'attribute',
|
|
67
|
-
attribute: 'scope'
|
|
68
|
-
},
|
|
69
|
-
align: {
|
|
70
|
-
type: 'string',
|
|
71
|
-
source: 'attribute',
|
|
72
|
-
attribute: 'data-align'
|
|
73
|
-
}
|
|
74
|
-
}
|
|
292
|
+
query: v3Query
|
|
75
293
|
}
|
|
76
294
|
}
|
|
77
295
|
},
|
|
@@ -86,27 +304,7 @@ const v3 = {
|
|
|
86
304
|
default: [],
|
|
87
305
|
source: 'query',
|
|
88
306
|
selector: 'td,th',
|
|
89
|
-
query:
|
|
90
|
-
content: {
|
|
91
|
-
type: 'string',
|
|
92
|
-
source: 'html'
|
|
93
|
-
},
|
|
94
|
-
tag: {
|
|
95
|
-
type: 'string',
|
|
96
|
-
default: 'td',
|
|
97
|
-
source: 'tag'
|
|
98
|
-
},
|
|
99
|
-
scope: {
|
|
100
|
-
type: 'string',
|
|
101
|
-
source: 'attribute',
|
|
102
|
-
attribute: 'scope'
|
|
103
|
-
},
|
|
104
|
-
align: {
|
|
105
|
-
type: 'string',
|
|
106
|
-
source: 'attribute',
|
|
107
|
-
attribute: 'data-align'
|
|
108
|
-
}
|
|
109
|
-
}
|
|
307
|
+
query: v3Query
|
|
110
308
|
}
|
|
111
309
|
}
|
|
112
310
|
},
|
|
@@ -121,27 +319,7 @@ const v3 = {
|
|
|
121
319
|
default: [],
|
|
122
320
|
source: 'query',
|
|
123
321
|
selector: 'td,th',
|
|
124
|
-
query:
|
|
125
|
-
content: {
|
|
126
|
-
type: 'string',
|
|
127
|
-
source: 'html'
|
|
128
|
-
},
|
|
129
|
-
tag: {
|
|
130
|
-
type: 'string',
|
|
131
|
-
default: 'td',
|
|
132
|
-
source: 'tag'
|
|
133
|
-
},
|
|
134
|
-
scope: {
|
|
135
|
-
type: 'string',
|
|
136
|
-
source: 'attribute',
|
|
137
|
-
attribute: 'scope'
|
|
138
|
-
},
|
|
139
|
-
align: {
|
|
140
|
-
type: 'string',
|
|
141
|
-
source: 'attribute',
|
|
142
|
-
attribute: 'data-align'
|
|
143
|
-
}
|
|
144
|
-
}
|
|
322
|
+
query: v3Query
|
|
145
323
|
}
|
|
146
324
|
}
|
|
147
325
|
}
|
|
@@ -263,6 +441,27 @@ const v3 = {
|
|
|
263
441
|
};
|
|
264
442
|
|
|
265
443
|
// Deprecation migrating table block to use colors block support feature.
|
|
444
|
+
const v2Query = {
|
|
445
|
+
content: {
|
|
446
|
+
type: 'string',
|
|
447
|
+
source: 'html'
|
|
448
|
+
},
|
|
449
|
+
tag: {
|
|
450
|
+
type: 'string',
|
|
451
|
+
default: 'td',
|
|
452
|
+
source: 'tag'
|
|
453
|
+
},
|
|
454
|
+
scope: {
|
|
455
|
+
type: 'string',
|
|
456
|
+
source: 'attribute',
|
|
457
|
+
attribute: 'scope'
|
|
458
|
+
},
|
|
459
|
+
align: {
|
|
460
|
+
type: 'string',
|
|
461
|
+
source: 'attribute',
|
|
462
|
+
attribute: 'data-align'
|
|
463
|
+
}
|
|
464
|
+
};
|
|
266
465
|
const v2 = {
|
|
267
466
|
attributes: {
|
|
268
467
|
hasFixedLayout: {
|
|
@@ -289,27 +488,7 @@ const v2 = {
|
|
|
289
488
|
default: [],
|
|
290
489
|
source: 'query',
|
|
291
490
|
selector: 'td,th',
|
|
292
|
-
query:
|
|
293
|
-
content: {
|
|
294
|
-
type: 'string',
|
|
295
|
-
source: 'html'
|
|
296
|
-
},
|
|
297
|
-
tag: {
|
|
298
|
-
type: 'string',
|
|
299
|
-
default: 'td',
|
|
300
|
-
source: 'tag'
|
|
301
|
-
},
|
|
302
|
-
scope: {
|
|
303
|
-
type: 'string',
|
|
304
|
-
source: 'attribute',
|
|
305
|
-
attribute: 'scope'
|
|
306
|
-
},
|
|
307
|
-
align: {
|
|
308
|
-
type: 'string',
|
|
309
|
-
source: 'attribute',
|
|
310
|
-
attribute: 'data-align'
|
|
311
|
-
}
|
|
312
|
-
}
|
|
491
|
+
query: v2Query
|
|
313
492
|
}
|
|
314
493
|
}
|
|
315
494
|
},
|
|
@@ -324,27 +503,7 @@ const v2 = {
|
|
|
324
503
|
default: [],
|
|
325
504
|
source: 'query',
|
|
326
505
|
selector: 'td,th',
|
|
327
|
-
query:
|
|
328
|
-
content: {
|
|
329
|
-
type: 'string',
|
|
330
|
-
source: 'html'
|
|
331
|
-
},
|
|
332
|
-
tag: {
|
|
333
|
-
type: 'string',
|
|
334
|
-
default: 'td',
|
|
335
|
-
source: 'tag'
|
|
336
|
-
},
|
|
337
|
-
scope: {
|
|
338
|
-
type: 'string',
|
|
339
|
-
source: 'attribute',
|
|
340
|
-
attribute: 'scope'
|
|
341
|
-
},
|
|
342
|
-
align: {
|
|
343
|
-
type: 'string',
|
|
344
|
-
source: 'attribute',
|
|
345
|
-
attribute: 'data-align'
|
|
346
|
-
}
|
|
347
|
-
}
|
|
506
|
+
query: v2Query
|
|
348
507
|
}
|
|
349
508
|
}
|
|
350
509
|
},
|
|
@@ -359,27 +518,7 @@ const v2 = {
|
|
|
359
518
|
default: [],
|
|
360
519
|
source: 'query',
|
|
361
520
|
selector: 'td,th',
|
|
362
|
-
query:
|
|
363
|
-
content: {
|
|
364
|
-
type: 'string',
|
|
365
|
-
source: 'html'
|
|
366
|
-
},
|
|
367
|
-
tag: {
|
|
368
|
-
type: 'string',
|
|
369
|
-
default: 'td',
|
|
370
|
-
source: 'tag'
|
|
371
|
-
},
|
|
372
|
-
scope: {
|
|
373
|
-
type: 'string',
|
|
374
|
-
source: 'attribute',
|
|
375
|
-
attribute: 'scope'
|
|
376
|
-
},
|
|
377
|
-
align: {
|
|
378
|
-
type: 'string',
|
|
379
|
-
source: 'attribute',
|
|
380
|
-
attribute: 'data-align'
|
|
381
|
-
}
|
|
382
|
-
}
|
|
521
|
+
query: v2Query
|
|
383
522
|
}
|
|
384
523
|
}
|
|
385
524
|
}
|
|
@@ -476,6 +615,22 @@ const v2 = {
|
|
|
476
615
|
};
|
|
477
616
|
}
|
|
478
617
|
};
|
|
618
|
+
const v1Query = {
|
|
619
|
+
content: {
|
|
620
|
+
type: 'string',
|
|
621
|
+
source: 'html'
|
|
622
|
+
},
|
|
623
|
+
tag: {
|
|
624
|
+
type: 'string',
|
|
625
|
+
default: 'td',
|
|
626
|
+
source: 'tag'
|
|
627
|
+
},
|
|
628
|
+
scope: {
|
|
629
|
+
type: 'string',
|
|
630
|
+
source: 'attribute',
|
|
631
|
+
attribute: 'scope'
|
|
632
|
+
}
|
|
633
|
+
};
|
|
479
634
|
const v1 = {
|
|
480
635
|
attributes: {
|
|
481
636
|
hasFixedLayout: {
|
|
@@ -496,22 +651,7 @@ const v1 = {
|
|
|
496
651
|
default: [],
|
|
497
652
|
source: 'query',
|
|
498
653
|
selector: 'td,th',
|
|
499
|
-
query:
|
|
500
|
-
content: {
|
|
501
|
-
type: 'string',
|
|
502
|
-
source: 'html'
|
|
503
|
-
},
|
|
504
|
-
tag: {
|
|
505
|
-
type: 'string',
|
|
506
|
-
default: 'td',
|
|
507
|
-
source: 'tag'
|
|
508
|
-
},
|
|
509
|
-
scope: {
|
|
510
|
-
type: 'string',
|
|
511
|
-
source: 'attribute',
|
|
512
|
-
attribute: 'scope'
|
|
513
|
-
}
|
|
514
|
-
}
|
|
654
|
+
query: v1Query
|
|
515
655
|
}
|
|
516
656
|
}
|
|
517
657
|
},
|
|
@@ -526,22 +666,7 @@ const v1 = {
|
|
|
526
666
|
default: [],
|
|
527
667
|
source: 'query',
|
|
528
668
|
selector: 'td,th',
|
|
529
|
-
query:
|
|
530
|
-
content: {
|
|
531
|
-
type: 'string',
|
|
532
|
-
source: 'html'
|
|
533
|
-
},
|
|
534
|
-
tag: {
|
|
535
|
-
type: 'string',
|
|
536
|
-
default: 'td',
|
|
537
|
-
source: 'tag'
|
|
538
|
-
},
|
|
539
|
-
scope: {
|
|
540
|
-
type: 'string',
|
|
541
|
-
source: 'attribute',
|
|
542
|
-
attribute: 'scope'
|
|
543
|
-
}
|
|
544
|
-
}
|
|
669
|
+
query: v1Query
|
|
545
670
|
}
|
|
546
671
|
}
|
|
547
672
|
},
|
|
@@ -556,22 +681,7 @@ const v1 = {
|
|
|
556
681
|
default: [],
|
|
557
682
|
source: 'query',
|
|
558
683
|
selector: 'td,th',
|
|
559
|
-
query:
|
|
560
|
-
content: {
|
|
561
|
-
type: 'string',
|
|
562
|
-
source: 'html'
|
|
563
|
-
},
|
|
564
|
-
tag: {
|
|
565
|
-
type: 'string',
|
|
566
|
-
default: 'td',
|
|
567
|
-
source: 'tag'
|
|
568
|
-
},
|
|
569
|
-
scope: {
|
|
570
|
-
type: 'string',
|
|
571
|
-
source: 'attribute',
|
|
572
|
-
attribute: 'scope'
|
|
573
|
-
}
|
|
574
|
-
}
|
|
684
|
+
query: v1Query
|
|
575
685
|
}
|
|
576
686
|
}
|
|
577
687
|
}
|
|
@@ -644,5 +754,5 @@ const v1 = {
|
|
|
644
754
|
*
|
|
645
755
|
* See block-deprecation.md
|
|
646
756
|
*/
|
|
647
|
-
var _default = exports.default = [v3, v2, v1];
|
|
757
|
+
var _default = exports.default = [v4, v3, v2, v1];
|
|
648
758
|
//# sourceMappingURL=deprecated.js.map
|