@wordpress/block-editor 14.3.3 → 14.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +42 -0
  2. package/build/components/block-variation-picker/index.js +2 -4
  3. package/build/components/block-variation-picker/index.js.map +1 -1
  4. package/build/components/block-variation-transforms/index.js +3 -4
  5. package/build/components/block-variation-transforms/index.js.map +1 -1
  6. package/build/components/button-block-appender/index.js +2 -4
  7. package/build/components/button-block-appender/index.js.map +1 -1
  8. package/build/components/colors-gradients/dropdown.js +2 -4
  9. package/build/components/colors-gradients/dropdown.js.map +1 -1
  10. package/build/components/global-styles/color-panel.js +2 -4
  11. package/build/components/global-styles/color-panel.js.map +1 -1
  12. package/build/components/global-styles/filters-panel.js +2 -4
  13. package/build/components/global-styles/filters-panel.js.map +1 -1
  14. package/build/components/global-styles/shadow-panel-components.js +24 -29
  15. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  16. package/build/components/inspector-controls-tabs/index.js +11 -8
  17. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  18. package/build/components/inspector-popover-header/index.js +4 -8
  19. package/build/components/inspector-popover-header/index.js.map +1 -1
  20. package/build/components/link-control/index.js +4 -8
  21. package/build/components/link-control/index.js.map +1 -1
  22. package/build/components/link-control/settings-drawer.js +2 -4
  23. package/build/components/link-control/settings-drawer.js.map +1 -1
  24. package/build/components/list-view/block-select-button.js +1 -4
  25. package/build/components/list-view/block-select-button.js.map +1 -1
  26. package/build/components/media-placeholder/index.js +29 -43
  27. package/build/components/media-placeholder/index.js.map +1 -1
  28. package/build/components/rich-text/index.js +4 -8
  29. package/build/components/rich-text/index.js.map +1 -1
  30. package/build/components/skip-to-selected-block/index.js +2 -4
  31. package/build/components/skip-to-selected-block/index.js.map +1 -1
  32. package/build/components/tool-selector/index.js +2 -4
  33. package/build/components/tool-selector/index.js.map +1 -1
  34. package/build/components/url-input/button.js +14 -16
  35. package/build/components/url-input/button.js.map +1 -1
  36. package/build/components/url-input/index.js +2 -4
  37. package/build/components/url-input/index.js.map +1 -1
  38. package/build/hooks/block-bindings.js +6 -13
  39. package/build/hooks/block-bindings.js.map +1 -1
  40. package/build/hooks/use-bindings-attributes.js +5 -4
  41. package/build/hooks/use-bindings-attributes.js.map +1 -1
  42. package/build/layouts/flex.js +6 -38
  43. package/build/layouts/flex.js.map +1 -1
  44. package/build/private-apis.js +0 -2
  45. package/build/private-apis.js.map +1 -1
  46. package/build/utils/block-bindings.js +48 -0
  47. package/build/utils/block-bindings.js.map +1 -1
  48. package/build/utils/index.js +7 -0
  49. package/build/utils/index.js.map +1 -1
  50. package/build-module/components/block-variation-picker/index.js +2 -4
  51. package/build-module/components/block-variation-picker/index.js.map +1 -1
  52. package/build-module/components/block-variation-transforms/index.js +3 -4
  53. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  54. package/build-module/components/button-block-appender/index.js +2 -4
  55. package/build-module/components/button-block-appender/index.js.map +1 -1
  56. package/build-module/components/colors-gradients/dropdown.js +2 -4
  57. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  58. package/build-module/components/global-styles/color-panel.js +2 -4
  59. package/build-module/components/global-styles/color-panel.js.map +1 -1
  60. package/build-module/components/global-styles/filters-panel.js +2 -4
  61. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  62. package/build-module/components/global-styles/shadow-panel-components.js +25 -30
  63. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  64. package/build-module/components/inspector-controls-tabs/index.js +12 -9
  65. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  66. package/build-module/components/inspector-popover-header/index.js +4 -8
  67. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  68. package/build-module/components/link-control/index.js +4 -8
  69. package/build-module/components/link-control/index.js.map +1 -1
  70. package/build-module/components/link-control/settings-drawer.js +2 -4
  71. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  72. package/build-module/components/list-view/block-select-button.js +2 -5
  73. package/build-module/components/list-view/block-select-button.js.map +1 -1
  74. package/build-module/components/media-placeholder/index.js +30 -44
  75. package/build-module/components/media-placeholder/index.js.map +1 -1
  76. package/build-module/components/rich-text/index.js +4 -8
  77. package/build-module/components/rich-text/index.js.map +1 -1
  78. package/build-module/components/skip-to-selected-block/index.js +2 -4
  79. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  80. package/build-module/components/tool-selector/index.js +2 -4
  81. package/build-module/components/tool-selector/index.js.map +1 -1
  82. package/build-module/components/url-input/button.js +15 -17
  83. package/build-module/components/url-input/button.js.map +1 -1
  84. package/build-module/components/url-input/index.js +2 -4
  85. package/build-module/components/url-input/index.js.map +1 -1
  86. package/build-module/hooks/block-bindings.js +6 -13
  87. package/build-module/hooks/block-bindings.js.map +1 -1
  88. package/build-module/hooks/use-bindings-attributes.js +5 -4
  89. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  90. package/build-module/layouts/flex.js +7 -39
  91. package/build-module/layouts/flex.js.map +1 -1
  92. package/build-module/private-apis.js +0 -2
  93. package/build-module/private-apis.js.map +1 -1
  94. package/build-module/utils/block-bindings.js +48 -0
  95. package/build-module/utils/block-bindings.js.map +1 -1
  96. package/build-module/utils/index.js +1 -0
  97. package/build-module/utils/index.js.map +1 -1
  98. package/build-style/content-rtl.css +2 -17
  99. package/build-style/content.css +2 -17
  100. package/build-style/style-rtl.css +18 -25
  101. package/build-style/style.css +18 -25
  102. package/package.json +6 -6
  103. package/src/components/block-inspector/style.scss +2 -0
  104. package/src/components/block-tools/style.scss +5 -0
  105. package/src/components/block-variation-picker/index.js +1 -2
  106. package/src/components/block-variation-transforms/index.js +2 -2
  107. package/src/components/button-block-appender/content.scss +0 -5
  108. package/src/components/button-block-appender/index.js +1 -2
  109. package/src/components/colors-gradients/dropdown.js +1 -5
  110. package/src/components/global-styles/color-panel.js +1 -5
  111. package/src/components/global-styles/filters-panel.js +1 -2
  112. package/src/components/global-styles/shadow-panel-components.js +28 -33
  113. package/src/components/global-styles/style.scss +5 -0
  114. package/src/components/inspector-controls-tabs/index.js +21 -20
  115. package/src/components/inspector-popover-header/index.js +2 -4
  116. package/src/components/inspector-popover-header/style.scss +0 -13
  117. package/src/components/link-control/index.js +2 -4
  118. package/src/components/link-control/settings-drawer.js +1 -2
  119. package/src/components/list-view/block-select-button.js +2 -5
  120. package/src/components/list-view/style.scss +9 -0
  121. package/src/components/media-placeholder/content.scss +3 -19
  122. package/src/components/media-placeholder/index.js +23 -29
  123. package/src/components/rich-text/index.js +4 -13
  124. package/src/components/skip-to-selected-block/index.js +1 -2
  125. package/src/components/skip-to-selected-block/style.scss +0 -9
  126. package/src/components/tool-selector/index.js +1 -2
  127. package/src/components/url-input/button.js +16 -12
  128. package/src/components/url-input/index.js +1 -2
  129. package/src/components/url-input/style.scss +0 -6
  130. package/src/hooks/block-bindings.js +9 -10
  131. package/src/hooks/use-bindings-attributes.js +66 -63
  132. package/src/layouts/flex.js +10 -53
  133. package/src/private-apis.js +0 -2
  134. package/src/utils/block-bindings.js +47 -0
  135. package/src/utils/index.js +1 -0
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\nexport function useBlockBindingsUtils() {\n\tconst { clientId } = useBlockEditContext();\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( clientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( clientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( clientId );\n\t\tupdateBlockAttributes( clientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;;AAE1D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,SAASC,aAAaA,CAAEC,MAAM,EAAG;EAChC,OAAO,CAAEA,MAAM,IAAIC,MAAM,CAACC,IAAI,CAAEF,MAAO,CAAC,CAACG,MAAM,KAAK,CAAC;AACtD;AAEA,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACvC,MAAM;IAAEC;EAAS,CAAC,GAAGP,mBAAmB,CAAC,CAAC;EAC1C,MAAM;IAAEQ;EAAsB,CAAC,GAAGZ,WAAW,CAAEG,gBAAiB,CAAC;EACjE,MAAM;IAAEU;EAAmB,CAAC,GAAGZ,WAAW,CAAC,CAAC,CAACa,MAAM,CAAEX,gBAAiB,CAAC;;EAEvE;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAMY,mBAAmB,GAAKC,QAAQ,IAAM;IAC3C,MAAM;MAAEC,QAAQ,EAAE;QAAED,QAAQ,EAAEE,eAAe;QAAE,GAAGD;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GAClEJ,kBAAkB,CAAEF,QAAS,CAAC;IAC/B,MAAMQ,WAAW,GAAG;MAAE,GAAGD;IAAgB,CAAC;IAE1CX,MAAM,CAACa,OAAO,CAAEJ,QAAS,CAAC,CAACK,OAAO,CAAE,CAAE,CAAEC,SAAS,EAAEC,OAAO,CAAE,KAAM;MACjE,IAAK,CAAEA,OAAO,IAAIJ,WAAW,CAAEG,SAAS,CAAE,EAAG;QAC5C,OAAOH,WAAW,CAAEG,SAAS,CAAE;QAC/B;MACD;MACAH,WAAW,CAAEG,SAAS,CAAE,GAAGC,OAAO;IACnC,CAAE,CAAC;IAEH,MAAMC,WAAW,GAAG;MACnB,GAAGP,QAAQ;MACXD,QAAQ,EAAEG;IACX,CAAC;IAED,IAAKd,aAAa,CAAEmB,WAAW,CAACR,QAAS,CAAC,EAAG;MAC5C,OAAOQ,WAAW,CAACR,QAAQ;IAC5B;IAEAJ,qBAAqB,CAAED,QAAQ,EAAE;MAChCM,QAAQ,EAAEZ,aAAa,CAAEmB,WAAY,CAAC,GAAGC,SAAS,GAAGD;IACtD,CAAE,CAAC;EACJ,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC,MAAM;MAAET,QAAQ,EAAE;QAAED,QAAQ;QAAE,GAAGC;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GACjDJ,kBAAkB,CAAEF,QAAS,CAAC;IAC/BC,qBAAqB,CAAED,QAAQ,EAAE;MAChCM,QAAQ,EAAEZ,aAAa,CAAEY,QAAS,CAAC,GAAGQ,SAAS,GAAGR;IACnD,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAEF,mBAAmB;IAAEW;EAAuB,CAAC;AACvD","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","useRegistry","store","blockEditorStore","useBlockEditContext","isObjectEmpty","object","Object","keys","length","useBlockBindingsUtils","clientId","updateBlockAttributes","getBlockAttributes","select","updateBlockBindings","bindings","metadata","currentBindings","newBindings","entries","forEach","attribute","binding","newMetadata","undefined","removeAllBlockBindings"],"sources":["@wordpress/block-editor/src/utils/block-bindings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { useBlockEditContext } from '../components/block-edit';\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Contains utils to update the block `bindings` metadata.\n *\n * @typedef {Object} WPBlockBindingsUtils\n *\n * @property {Function} updateBlockBindings Updates the value of the bindings connected to block attributes.\n * @property {Function} removeAllBlockBindings Removes the bindings property of the `metadata` attribute.\n */\n\n/**\n * Retrieves the existing utils needed to update the block `bindings` metadata.\n * They can be used to create, modify, or remove connections from the existing block attributes.\n *\n * It contains the following utils:\n * - `updateBlockBindings`: Updates the value of the bindings connected to block attributes. It can be used to remove a specific binding by setting the value to `undefined`.\n * - `removeAllBlockBindings`: Removes the bindings property of the `metadata` attribute.\n *\n * @return {?WPBlockBindingsUtils} Object containing the block bindings utils.\n *\n * @example\n * ```js\n * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n * const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();\n *\n * // Update url and alt attributes.\n * updateBlockBindings( {\n * url: {\n * source: 'core/post-meta',\n * args: {\n * key: 'url_custom_field',\n * },\n * },\n * alt: {\n * source: 'core/post-meta',\n * args: {\n * key: 'text_custom_field',\n * },\n * },\n * } );\n *\n * // Remove binding from url attribute.\n * updateBlockBindings( { url: undefined } );\n *\n * // Remove bindings from all attributes.\n * removeAllBlockBindings();\n * ```\n */\nexport function useBlockBindingsUtils() {\n\tconst { clientId } = useBlockEditContext();\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { getBlockAttributes } = useRegistry().select( blockEditorStore );\n\n\t/**\n\t * Updates the value of the bindings connected to block attributes.\n\t * It removes the binding when the new value is `undefined`.\n\t *\n\t * @param {Object} bindings Bindings including the attributes to update and the new object.\n\t * @param {string} bindings.source The source name to connect to.\n\t * @param {Object} [bindings.args] Object containing the arguments needed by the source.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { updateBlockBindings } = useBlockBindingsUtils();\n\t * updateBlockBindings( {\n\t * url: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'url_custom_field',\n\t * },\n\t * \t },\n\t * alt: {\n\t * source: 'core/post-meta',\n\t * args: {\n\t * key: 'text_custom_field',\n\t * },\n\t * \t }\n\t * } );\n\t * ```\n\t */\n\tconst updateBlockBindings = ( bindings ) => {\n\t\tconst { metadata: { bindings: currentBindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( clientId );\n\t\tconst newBindings = { ...currentBindings };\n\n\t\tObject.entries( bindings ).forEach( ( [ attribute, binding ] ) => {\n\t\t\tif ( ! binding && newBindings[ attribute ] ) {\n\t\t\t\tdelete newBindings[ attribute ];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnewBindings[ attribute ] = binding;\n\t\t} );\n\n\t\tconst newMetadata = {\n\t\t\t...metadata,\n\t\t\tbindings: newBindings,\n\t\t};\n\n\t\tif ( isObjectEmpty( newMetadata.bindings ) ) {\n\t\t\tdelete newMetadata.bindings;\n\t\t}\n\n\t\tupdateBlockAttributes( clientId, {\n\t\t\tmetadata: isObjectEmpty( newMetadata ) ? undefined : newMetadata,\n\t\t} );\n\t};\n\n\t/**\n\t * Removes the bindings property of the `metadata` attribute.\n\t *\n\t * @example\n\t * ```js\n\t * import { useBlockBindingsUtils } from '@wordpress/block-editor'\n\t *\n\t * const { removeAllBlockBindings } = useBlockBindingsUtils();\n\t * removeAllBlockBindings();\n\t * ```\n\t */\n\tconst removeAllBlockBindings = () => {\n\t\tconst { metadata: { bindings, ...metadata } = {} } =\n\t\t\tgetBlockAttributes( clientId );\n\t\tupdateBlockAttributes( clientId, {\n\t\t\tmetadata: isObjectEmpty( metadata ) ? undefined : metadata,\n\t\t} );\n\t};\n\n\treturn { updateBlockBindings, removeAllBlockBindings };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,WAAW,QAAQ,iBAAiB;;AAE1D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,UAAU;AACpD,SAASC,mBAAmB,QAAQ,0BAA0B;AAE9D,SAASC,aAAaA,CAAEC,MAAM,EAAG;EAChC,OAAO,CAAEA,MAAM,IAAIC,MAAM,CAACC,IAAI,CAAEF,MAAO,CAAC,CAACG,MAAM,KAAK,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACvC,MAAM;IAAEC;EAAS,CAAC,GAAGP,mBAAmB,CAAC,CAAC;EAC1C,MAAM;IAAEQ;EAAsB,CAAC,GAAGZ,WAAW,CAAEG,gBAAiB,CAAC;EACjE,MAAM;IAAEU;EAAmB,CAAC,GAAGZ,WAAW,CAAC,CAAC,CAACa,MAAM,CAAEX,gBAAiB,CAAC;;EAEvE;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAMY,mBAAmB,GAAKC,QAAQ,IAAM;IAC3C,MAAM;MAAEC,QAAQ,EAAE;QAAED,QAAQ,EAAEE,eAAe;QAAE,GAAGD;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GAClEJ,kBAAkB,CAAEF,QAAS,CAAC;IAC/B,MAAMQ,WAAW,GAAG;MAAE,GAAGD;IAAgB,CAAC;IAE1CX,MAAM,CAACa,OAAO,CAAEJ,QAAS,CAAC,CAACK,OAAO,CAAE,CAAE,CAAEC,SAAS,EAAEC,OAAO,CAAE,KAAM;MACjE,IAAK,CAAEA,OAAO,IAAIJ,WAAW,CAAEG,SAAS,CAAE,EAAG;QAC5C,OAAOH,WAAW,CAAEG,SAAS,CAAE;QAC/B;MACD;MACAH,WAAW,CAAEG,SAAS,CAAE,GAAGC,OAAO;IACnC,CAAE,CAAC;IAEH,MAAMC,WAAW,GAAG;MACnB,GAAGP,QAAQ;MACXD,QAAQ,EAAEG;IACX,CAAC;IAED,IAAKd,aAAa,CAAEmB,WAAW,CAACR,QAAS,CAAC,EAAG;MAC5C,OAAOQ,WAAW,CAACR,QAAQ;IAC5B;IAEAJ,qBAAqB,CAAED,QAAQ,EAAE;MAChCM,QAAQ,EAAEZ,aAAa,CAAEmB,WAAY,CAAC,GAAGC,SAAS,GAAGD;IACtD,CAAE,CAAC;EACJ,CAAC;;EAED;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAME,sBAAsB,GAAGA,CAAA,KAAM;IACpC,MAAM;MAAET,QAAQ,EAAE;QAAED,QAAQ;QAAE,GAAGC;MAAS,CAAC,GAAG,CAAC;IAAE,CAAC,GACjDJ,kBAAkB,CAAEF,QAAS,CAAC;IAC/BC,qBAAqB,CAAED,QAAQ,EAAE;MAChCM,QAAQ,EAAEZ,aAAa,CAAEY,QAAS,CAAC,GAAGQ,SAAS,GAAGR;IACnD,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAEF,mBAAmB;IAAEW;EAAuB,CAAC;AACvD","ignoreList":[]}
@@ -1,3 +1,4 @@
1
1
  export { default as transformStyles } from './transform-styles';
2
2
  export { default as getPxFromCssUnit } from './get-px-from-css-unit';
3
+ export { useBlockBindingsUtils } from './block-bindings';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["default","transformStyles","getPxFromCssUnit"],"sources":["@wordpress/block-editor/src/utils/index.js"],"sourcesContent":["export { default as transformStyles } from './transform-styles';\nexport { default as getPxFromCssUnit } from './get-px-from-css-unit';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,eAAe,QAAQ,oBAAoB;AAC/D,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,wBAAwB","ignoreList":[]}
1
+ {"version":3,"names":["default","transformStyles","getPxFromCssUnit","useBlockBindingsUtils"],"sources":["@wordpress/block-editor/src/utils/index.js"],"sourcesContent":["export { default as transformStyles } from './transform-styles';\nexport { default as getPxFromCssUnit } from './get-px-from-css-unit';\nexport { useBlockBindingsUtils } from './block-bindings';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,eAAe,QAAQ,oBAAoB;AAC/D,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,wBAAwB;AACpE,SAASC,qBAAqB,QAAQ,kBAAkB","ignoreList":[]}
@@ -631,9 +631,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
631
631
  color: #1e1e1e;
632
632
  box-shadow: inset 0 0 0 1px #1e1e1e;
633
633
  }
634
- .block-editor-button-block-appender.components-button.components-button {
635
- padding: 12px;
636
- }
637
634
  .is-dark-theme .block-editor-button-block-appender {
638
635
  color: rgba(255, 255, 255, 0.65);
639
636
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
@@ -866,26 +863,14 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
866
863
  }
867
864
 
868
865
  .block-editor-media-placeholder__url-input-form {
869
- display: flex;
870
- }
871
- .block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field {
872
- width: 100%;
873
- min-width: 200px;
874
- flex-grow: 1;
875
- border: none;
876
- border-radius: 0;
877
- margin: 2px;
866
+ min-width: 260px;
878
867
  }
879
868
  @media (min-width: 600px) {
880
- .block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field {
869
+ .block-editor-media-placeholder__url-input-form {
881
870
  width: 300px;
882
871
  }
883
872
  }
884
873
 
885
- .block-editor-media-placeholder__url-input-submit-button {
886
- flex-shrink: 1;
887
- }
888
-
889
874
  .block-editor-media-placeholder__cancel-button.is-link {
890
875
  margin: 1em;
891
876
  display: block;
@@ -631,9 +631,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
631
631
  color: #1e1e1e;
632
632
  box-shadow: inset 0 0 0 1px #1e1e1e;
633
633
  }
634
- .block-editor-button-block-appender.components-button.components-button {
635
- padding: 12px;
636
- }
637
634
  .is-dark-theme .block-editor-button-block-appender {
638
635
  color: rgba(255, 255, 255, 0.65);
639
636
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
@@ -866,26 +863,14 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
866
863
  }
867
864
 
868
865
  .block-editor-media-placeholder__url-input-form {
869
- display: flex;
870
- }
871
- .block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field {
872
- width: 100%;
873
- min-width: 200px;
874
- flex-grow: 1;
875
- border: none;
876
- border-radius: 0;
877
- margin: 2px;
866
+ min-width: 260px;
878
867
  }
879
868
  @media (min-width: 600px) {
880
- .block-editor-media-placeholder__url-input-form input[type=url].block-editor-media-placeholder__url-input-field {
869
+ .block-editor-media-placeholder__url-input-form {
881
870
  width: 300px;
882
871
  }
883
872
  }
884
873
 
885
- .block-editor-media-placeholder__url-input-submit-button {
886
- flex-shrink: 1;
887
- }
888
-
889
874
  .block-editor-media-placeholder__cancel-button.is-link {
890
875
  margin: 1em;
891
876
  display: block;
@@ -339,6 +339,8 @@ iframe[name=editor-canvas] {
339
339
 
340
340
  .block-editor-block-inspector__tab-item {
341
341
  flex: 1 1 0px;
342
+ display: flex;
343
+ justify-content: center;
342
344
  }
343
345
 
344
346
  /**
@@ -562,6 +564,9 @@ iframe[name=editor-canvas] {
562
564
  background: none;
563
565
  border: none;
564
566
  }
567
+ .zoom-out-toolbar .zoom-out-toolbar-button {
568
+ height: 40px;
569
+ }
565
570
 
566
571
  .block-editor-block-tools__zoom-out-mode-inserter-button {
567
572
  visibility: hidden;
@@ -1668,10 +1673,14 @@ iframe[name=editor-canvas] {
1668
1673
  }
1669
1674
 
1670
1675
  .block-editor-global-styles__shadow-indicator {
1676
+ appearance: none;
1677
+ background: none;
1671
1678
  color: #2f2f2f;
1672
1679
  border: #e0e0e0 1px solid;
1673
1680
  border-radius: 2px;
1674
1681
  cursor: pointer;
1682
+ display: inline-flex;
1683
+ align-items: center;
1675
1684
  padding: 0;
1676
1685
  height: 26px;
1677
1686
  width: 26px;
@@ -2036,17 +2045,6 @@ iframe[name=editor-canvas] {
2036
2045
  margin-bottom: 16px;
2037
2046
  }
2038
2047
 
2039
- [class].block-editor-inspector-popover-header__action {
2040
- height: 24px;
2041
- }
2042
- [class].block-editor-inspector-popover-header__action.has-icon {
2043
- min-width: 24px;
2044
- padding: 0;
2045
- }
2046
- [class].block-editor-inspector-popover-header__action:not(.has-icon) {
2047
- text-decoration: underline;
2048
- }
2049
-
2050
2048
  .items-justified-left {
2051
2049
  justify-content: flex-start;
2052
2050
  }
@@ -2574,6 +2572,15 @@ iframe[name=editor-canvas] {
2574
2572
  text-align: right;
2575
2573
  position: relative;
2576
2574
  white-space: nowrap;
2575
+ border-radius: 2px;
2576
+ box-sizing: border-box;
2577
+ color: inherit;
2578
+ font-family: inherit;
2579
+ font-size: 13px;
2580
+ font-weight: 400;
2581
+ margin: 0;
2582
+ text-decoration: none;
2583
+ transition: box-shadow 0.1s linear;
2577
2584
  }
2578
2585
  .block-editor-list-view-leaf .block-editor-list-view-block-contents.is-dropping-before::before {
2579
2586
  content: "";
@@ -3077,18 +3084,9 @@ iframe[name=editor-canvas] {
3077
3084
  top: -9999em;
3078
3085
  }
3079
3086
  .block-editor-skip-to-selected-block:focus {
3080
- height: auto;
3081
- width: auto;
3082
- display: block;
3083
3087
  font-size: 14px;
3084
3088
  font-weight: 600;
3085
- padding: 15px 23px 14px;
3086
3089
  background: #f1f1f1;
3087
- color: var(--wp-admin-theme-color);
3088
- line-height: normal;
3089
- box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
3090
- text-decoration: none;
3091
- outline: none;
3092
3090
  z-index: 100000;
3093
3091
  }
3094
3092
 
@@ -3252,11 +3250,6 @@ iframe[name=editor-canvas] {
3252
3250
  min-width: 0;
3253
3251
  align-items: flex-start;
3254
3252
  }
3255
- .block-editor-url-input__button-modal-line .components-button {
3256
- flex-shrink: 0;
3257
- width: 36px;
3258
- height: 36px;
3259
- }
3260
3253
 
3261
3254
  .block-editor-url-popover__additional-controls {
3262
3255
  border-top: 1px solid #1e1e1e;
@@ -339,6 +339,8 @@ iframe[name=editor-canvas] {
339
339
 
340
340
  .block-editor-block-inspector__tab-item {
341
341
  flex: 1 1 0px;
342
+ display: flex;
343
+ justify-content: center;
342
344
  }
343
345
 
344
346
  /**
@@ -562,6 +564,9 @@ iframe[name=editor-canvas] {
562
564
  background: none;
563
565
  border: none;
564
566
  }
567
+ .zoom-out-toolbar .zoom-out-toolbar-button {
568
+ height: 40px;
569
+ }
565
570
 
566
571
  .block-editor-block-tools__zoom-out-mode-inserter-button {
567
572
  visibility: hidden;
@@ -1668,10 +1673,14 @@ iframe[name=editor-canvas] {
1668
1673
  }
1669
1674
 
1670
1675
  .block-editor-global-styles__shadow-indicator {
1676
+ appearance: none;
1677
+ background: none;
1671
1678
  color: #2f2f2f;
1672
1679
  border: #e0e0e0 1px solid;
1673
1680
  border-radius: 2px;
1674
1681
  cursor: pointer;
1682
+ display: inline-flex;
1683
+ align-items: center;
1675
1684
  padding: 0;
1676
1685
  height: 26px;
1677
1686
  width: 26px;
@@ -2037,17 +2046,6 @@ iframe[name=editor-canvas] {
2037
2046
  margin-bottom: 16px;
2038
2047
  }
2039
2048
 
2040
- [class].block-editor-inspector-popover-header__action {
2041
- height: 24px;
2042
- }
2043
- [class].block-editor-inspector-popover-header__action.has-icon {
2044
- min-width: 24px;
2045
- padding: 0;
2046
- }
2047
- [class].block-editor-inspector-popover-header__action:not(.has-icon) {
2048
- text-decoration: underline;
2049
- }
2050
-
2051
2049
  .items-justified-left {
2052
2050
  justify-content: flex-start;
2053
2051
  }
@@ -2575,6 +2573,15 @@ iframe[name=editor-canvas] {
2575
2573
  text-align: left;
2576
2574
  position: relative;
2577
2575
  white-space: nowrap;
2576
+ border-radius: 2px;
2577
+ box-sizing: border-box;
2578
+ color: inherit;
2579
+ font-family: inherit;
2580
+ font-size: 13px;
2581
+ font-weight: 400;
2582
+ margin: 0;
2583
+ text-decoration: none;
2584
+ transition: box-shadow 0.1s linear;
2578
2585
  }
2579
2586
  .block-editor-list-view-leaf .block-editor-list-view-block-contents.is-dropping-before::before {
2580
2587
  content: "";
@@ -3078,18 +3085,9 @@ iframe[name=editor-canvas] {
3078
3085
  top: -9999em;
3079
3086
  }
3080
3087
  .block-editor-skip-to-selected-block:focus {
3081
- height: auto;
3082
- width: auto;
3083
- display: block;
3084
3088
  font-size: 14px;
3085
3089
  font-weight: 600;
3086
- padding: 15px 23px 14px;
3087
3090
  background: #f1f1f1;
3088
- color: var(--wp-admin-theme-color);
3089
- line-height: normal;
3090
- box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
3091
- text-decoration: none;
3092
- outline: none;
3093
3091
  z-index: 100000;
3094
3092
  }
3095
3093
 
@@ -3253,11 +3251,6 @@ iframe[name=editor-canvas] {
3253
3251
  min-width: 0;
3254
3252
  align-items: flex-start;
3255
3253
  }
3256
- .block-editor-url-input__button-modal-line .components-button {
3257
- flex-shrink: 0;
3258
- width: 36px;
3259
- height: 36px;
3260
- }
3261
3254
 
3262
3255
  .block-editor-url-popover__additional-controls {
3263
3256
  border-top: 1px solid #1e1e1e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "14.3.3",
3
+ "version": "14.3.5",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -40,9 +40,9 @@
40
40
  "@wordpress/api-fetch": "^7.8.2",
41
41
  "@wordpress/blob": "^4.8.1",
42
42
  "@wordpress/block-serialization-default-parser": "^5.8.1",
43
- "@wordpress/blocks": "^13.8.3",
44
- "@wordpress/commands": "^1.8.3",
45
- "@wordpress/components": "^28.8.3",
43
+ "@wordpress/blocks": "^13.8.4",
44
+ "@wordpress/commands": "^1.8.5",
45
+ "@wordpress/components": "^28.8.5",
46
46
  "@wordpress/compose": "^7.8.3",
47
47
  "@wordpress/data": "^10.8.3",
48
48
  "@wordpress/date": "^5.8.2",
@@ -58,7 +58,7 @@
58
58
  "@wordpress/keyboard-shortcuts": "^5.8.3",
59
59
  "@wordpress/keycodes": "^4.8.2",
60
60
  "@wordpress/notices": "^5.8.3",
61
- "@wordpress/preferences": "^4.8.3",
61
+ "@wordpress/preferences": "^4.8.5",
62
62
  "@wordpress/private-apis": "^1.8.1",
63
63
  "@wordpress/rich-text": "^7.8.3",
64
64
  "@wordpress/style-engine": "^2.8.1",
@@ -88,5 +88,5 @@
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  },
91
- "gitHead": "6187079697e13c3292eb098d6338523a6676c6e8"
91
+ "gitHead": "21b3c2e9abda74edab42455041edc6e82fccc388"
92
92
  }
@@ -49,4 +49,6 @@
49
49
 
50
50
  .block-editor-block-inspector__tab-item {
51
51
  flex: 1 1 0px;
52
+ display: flex;
53
+ justify-content: center;
52
54
  }
@@ -283,6 +283,11 @@
283
283
  background: none;
284
284
  border: none;
285
285
  }
286
+
287
+ // Make the spacing consistent between controls.
288
+ .zoom-out-toolbar-button {
289
+ height: $button-size-next-default-40px;
290
+ }
286
291
  }
287
292
 
288
293
  .block-editor-block-tools__zoom-out-mode-inserter-button {
@@ -64,8 +64,7 @@ function BlockVariationPicker( {
64
64
  { allowSkip && (
65
65
  <div className="block-editor-block-variation-picker__skip">
66
66
  <Button
67
- // TODO: Switch to `true` (40px size) if possible
68
- __next40pxDefaultSize={ false }
67
+ __next40pxDefaultSize
69
68
  variant="link"
70
69
  onClick={ () => onSelect() }
71
70
  >
@@ -36,8 +36,8 @@ function VariationsButtons( {
36
36
  </VisuallyHidden>
37
37
  { variations.map( ( variation ) => (
38
38
  <Button
39
- // TODO: Switch to `true` (40px size) if possible
40
- __next40pxDefaultSize={ false }
39
+ __next40pxDefaultSize
40
+ size="compact"
41
41
  key={ variation.name }
42
42
  icon={ <BlockIcon icon={ variation.icon } showColors /> }
43
43
  isPressed={ selectedValue === variation.name }
@@ -8,11 +8,6 @@
8
8
  color: $gray-900;
9
9
  box-shadow: inset 0 0 0 $border-width $gray-900;
10
10
 
11
- // Needs specificity to override button styles.
12
- &.components-button.components-button {
13
- padding: $grid-unit-15;
14
- }
15
-
16
11
  .is-dark-theme & {
17
12
  color: $light-gray-placeholder;
18
13
  box-shadow: inset 0 0 0 $border-width $light-gray-placeholder;
@@ -60,8 +60,7 @@ function ButtonBlockAppender(
60
60
 
61
61
  return (
62
62
  <Button
63
- // TODO: Switch to `true` (40px size) if possible
64
- __next40pxDefaultSize={ false }
63
+ __next40pxDefaultSize
65
64
  ref={ mergedInserterButtonRef }
66
65
  onFocus={ onFocus }
67
66
  tabIndex={ tabIndex }
@@ -88,11 +88,7 @@ const renderToggle =
88
88
  };
89
89
 
90
90
  return (
91
- <Button
92
- // TODO: Switch to `true` (40px size) if possible
93
- __next40pxDefaultSize={ false }
94
- { ...toggleProps }
95
- >
91
+ <Button __next40pxDefaultSize { ...toggleProps }>
96
92
  <LabeledColorIndicator
97
93
  colorValue={ colorValue }
98
94
  label={ label }
@@ -239,11 +239,7 @@ function ColorPanelDropdown( {
239
239
  };
240
240
 
241
241
  return (
242
- <Button
243
- // TODO: Switch to `true` (40px size) if possible
244
- __next40pxDefaultSize={ false }
245
- { ...toggleProps }
246
- >
242
+ <Button __next40pxDefaultSize { ...toggleProps }>
247
243
  <LabeledColorIndicators
248
244
  indicators={ indicators }
249
245
  label={ label }
@@ -190,8 +190,7 @@ export default function FiltersPanel( {
190
190
  return (
191
191
  <ItemGroup isBordered isSeparated>
192
192
  <Button
193
- // TODO: Switch to `true` (40px size) if possible
194
- __next40pxDefaultSize={ false }
193
+ __next40pxDefaultSize
195
194
  { ...toggleProps }
196
195
  >
197
196
  <LabeledColorIndicator
@@ -11,6 +11,7 @@ import {
11
11
  FlexItem,
12
12
  Dropdown,
13
13
  Composite,
14
+ Tooltip,
14
15
  } from '@wordpress/components';
15
16
  import { useMemo } from '@wordpress/element';
16
17
  import { shadow as shadowIcon, Icon, check } from '@wordpress/icons';
@@ -42,8 +43,7 @@ export function ShadowPopoverContainer( { shadow, onShadowChange, settings } ) {
42
43
  />
43
44
  <div className="block-editor-global-styles__clear-shadow">
44
45
  <Button
45
- // TODO: Switch to `true` (40px size) if possible
46
- __next40pxDefaultSize={ false }
46
+ __next40pxDefaultSize
47
47
  variant="tertiary"
48
48
  onClick={ () => onShadowChange( undefined ) }
49
49
  >
@@ -80,32 +80,31 @@ export function ShadowPresets( { presets, activeShadow, onSelect } ) {
80
80
 
81
81
  export function ShadowIndicator( { type, label, isActive, onSelect, shadow } ) {
82
82
  return (
83
- <Composite.Item
84
- role="option"
85
- aria-label={ label }
86
- aria-selected={ isActive }
87
- className={ clsx( 'block-editor-global-styles__shadow__item', {
88
- 'is-active': isActive,
89
- } ) }
90
- render={
91
- <Button
92
- // TODO: Switch to `true` (40px size) if possible
93
- __next40pxDefaultSize={ false }
94
- className={ clsx(
95
- 'block-editor-global-styles__shadow-indicator',
96
- {
97
- unset: type === 'unset',
98
- }
99
- ) }
100
- onClick={ onSelect }
101
- label={ label }
102
- style={ { boxShadow: shadow } }
103
- showTooltip
104
- >
105
- { isActive && <Icon icon={ check } /> }
106
- </Button>
107
- }
108
- />
83
+ <Tooltip text={ label }>
84
+ <Composite.Item
85
+ role="option"
86
+ aria-label={ label }
87
+ aria-selected={ isActive }
88
+ className={ clsx( 'block-editor-global-styles__shadow__item', {
89
+ 'is-active': isActive,
90
+ } ) }
91
+ render={
92
+ <button
93
+ className={ clsx(
94
+ 'block-editor-global-styles__shadow-indicator',
95
+ {
96
+ unset: type === 'unset',
97
+ }
98
+ ) }
99
+ onClick={ onSelect }
100
+ style={ { boxShadow: shadow } }
101
+ aria-label={ label }
102
+ >
103
+ { isActive && <Icon icon={ check } /> }
104
+ </button>
105
+ }
106
+ />
107
+ </Tooltip>
109
108
  );
110
109
  }
111
110
 
@@ -143,11 +142,7 @@ function renderShadowToggle() {
143
142
  };
144
143
 
145
144
  return (
146
- <Button
147
- // TODO: Switch to `true` (40px size) if possible
148
- __next40pxDefaultSize={ false }
149
- { ...toggleProps }
150
- >
145
+ <Button __next40pxDefaultSize { ...toggleProps }>
151
146
  <HStack justify="flex-start">
152
147
  <Icon
153
148
  className="block-editor-global-styles__toggle-icon"
@@ -37,10 +37,15 @@
37
37
 
38
38
  // These styles are similar to the color palette.
39
39
  .block-editor-global-styles__shadow-indicator {
40
+ appearance: none;
41
+ background: none;
40
42
  color: $gray-800;
41
43
  border: $gray-200 $border-width solid;
42
44
  border-radius: $radius-small;
43
45
  cursor: pointer;
46
+ display: inline-flex;
47
+ align-items: center;
48
+
44
49
  padding: 0;
45
50
 
46
51
  height: $button-size-small + 2 * $border-width;
@@ -2,7 +2,8 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import {
5
- Button,
5
+ Icon,
6
+ Tooltip,
6
7
  privateApis as componentsPrivateApis,
7
8
  } from '@wordpress/components';
8
9
  import { store as preferencesStore } from '@wordpress/preferences';
@@ -43,27 +44,27 @@ export default function InspectorControlsTabs( {
43
44
  <div className="block-editor-block-inspector__tabs">
44
45
  <Tabs defaultTabId={ initialTabName } key={ clientId }>
45
46
  <Tabs.TabList>
46
- { tabs.map( ( tab ) => (
47
- <Tabs.Tab
48
- key={ tab.name }
49
- tabId={ tab.name }
50
- render={
51
- <Button
52
- // TODO: Switch to `true` (40px size) if possible
53
- __next40pxDefaultSize={ false }
54
- icon={
55
- ! showIconLabels ? tab.icon : undefined
56
- }
57
- label={
58
- ! showIconLabels ? tab.title : undefined
59
- }
47
+ { tabs.map( ( tab ) =>
48
+ showIconLabels ? (
49
+ <Tabs.Tab
50
+ key={ tab.name }
51
+ tabId={ tab.name }
52
+ className={ tab.className }
53
+ >
54
+ { tab.title }
55
+ </Tabs.Tab>
56
+ ) : (
57
+ <Tooltip text={ tab.title } key={ tab.name }>
58
+ <Tabs.Tab
59
+ tabId={ tab.name }
60
60
  className={ tab.className }
61
+ aria-label={ tab.title }
61
62
  >
62
- { showIconLabels && tab.title }
63
- </Button>
64
- }
65
- />
66
- ) ) }
63
+ <Icon icon={ tab.icon } />
64
+ </Tabs.Tab>
65
+ </Tooltip>
66
+ )
67
+ ) }
67
68
  </Tabs.TabList>
68
69
  <Tabs.TabPanel tabId={ TAB_SETTINGS.name } focusable={ false }>
69
70
  <SettingsTab showAdvancedControls={ !! blockName } />
@@ -31,8 +31,7 @@ export default function InspectorPopoverHeader( {
31
31
  <Spacer />
32
32
  { actions.map( ( { label, icon, onClick } ) => (
33
33
  <Button
34
- // TODO: Switch to `true` (40px size) if possible
35
- __next40pxDefaultSize={ false }
34
+ size="small"
36
35
  key={ label }
37
36
  className="block-editor-inspector-popover-header__action"
38
37
  label={ label }
@@ -45,8 +44,7 @@ export default function InspectorPopoverHeader( {
45
44
  ) ) }
46
45
  { onClose && (
47
46
  <Button
48
- // TODO: Switch to `true` (40px size) if possible
49
- __next40pxDefaultSize={ false }
47
+ size="small"
50
48
  className="block-editor-inspector-popover-header__action"
51
49
  label={ __( 'Close' ) }
52
50
  icon={ closeSmall }
@@ -1,16 +1,3 @@
1
1
  .block-editor-inspector-popover-header {
2
2
  margin-bottom: $grid-unit-20;
3
3
  }
4
-
5
- [class].block-editor-inspector-popover-header__action {
6
- height: $icon-size;
7
-
8
- &.has-icon {
9
- min-width: $icon-size;
10
- padding: 0;
11
- }
12
-
13
- &:not(.has-icon) {
14
- text-decoration: underline;
15
- }
16
- }