@wordpress/block-editor 14.21.0 → 15.0.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.
Files changed (101) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/background-image-control/index.js +0 -4
  3. package/build/components/background-image-control/index.js.map +1 -1
  4. package/build/components/block-list/block-invalid-warning.native.js +1 -1
  5. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  6. package/build/components/block-list/use-block-props/index.js +1 -3
  7. package/build/components/block-list/use-block-props/index.js.map +1 -1
  8. package/build/components/block-list/use-block-props/use-is-hovered.js +8 -25
  9. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  10. package/build/components/block-lock/modal.js +1 -0
  11. package/build/components/block-lock/modal.js.map +1 -1
  12. package/build/components/block-settings-menu/block-settings-dropdown.js +7 -4
  13. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  14. package/build/components/child-layout-control/index.js +53 -34
  15. package/build/components/child-layout-control/index.js.map +1 -1
  16. package/build/components/image-size-control/index.js +1 -1
  17. package/build/components/image-size-control/index.js.map +1 -1
  18. package/build/components/link-control/search-input.js +4 -2
  19. package/build/components/link-control/search-input.js.map +1 -1
  20. package/build/components/list-view/block.js +5 -4
  21. package/build/components/list-view/block.js.map +1 -1
  22. package/build/components/list-view/use-list-view-images.js +62 -30
  23. package/build/components/list-view/use-list-view-images.js.map +1 -1
  24. package/build/components/use-paste-styles/index.js +2 -2
  25. package/build/components/use-paste-styles/index.js.map +1 -1
  26. package/build/layouts/grid.js +2 -0
  27. package/build/layouts/grid.js.map +1 -1
  28. package/build/store/actions.js +7 -6
  29. package/build/store/actions.js.map +1 -1
  30. package/build/store/reducer.js +0 -18
  31. package/build/store/reducer.js.map +1 -1
  32. package/build/store/selectors.js +13 -9
  33. package/build/store/selectors.js.map +1 -1
  34. package/build/utils/use-notify-copy.js +2 -2
  35. package/build/utils/use-notify-copy.js.map +1 -1
  36. package/build-module/components/background-image-control/index.js +0 -4
  37. package/build-module/components/background-image-control/index.js.map +1 -1
  38. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  39. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  40. package/build-module/components/block-list/use-block-props/index.js +1 -3
  41. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  42. package/build-module/components/block-list/use-block-props/use-is-hovered.js +8 -26
  43. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  44. package/build-module/components/block-lock/modal.js +1 -0
  45. package/build-module/components/block-lock/modal.js.map +1 -1
  46. package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -4
  47. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  48. package/build-module/components/child-layout-control/index.js +54 -35
  49. package/build-module/components/child-layout-control/index.js.map +1 -1
  50. package/build-module/components/image-size-control/index.js +1 -1
  51. package/build-module/components/image-size-control/index.js.map +1 -1
  52. package/build-module/components/link-control/search-input.js +4 -2
  53. package/build-module/components/link-control/search-input.js.map +1 -1
  54. package/build-module/components/list-view/block.js +6 -5
  55. package/build-module/components/list-view/block.js.map +1 -1
  56. package/build-module/components/list-view/use-list-view-images.js +62 -30
  57. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  58. package/build-module/components/use-paste-styles/index.js +2 -2
  59. package/build-module/components/use-paste-styles/index.js.map +1 -1
  60. package/build-module/layouts/grid.js +2 -0
  61. package/build-module/layouts/grid.js.map +1 -1
  62. package/build-module/store/actions.js +7 -6
  63. package/build-module/store/actions.js.map +1 -1
  64. package/build-module/store/reducer.js +0 -17
  65. package/build-module/store/reducer.js.map +1 -1
  66. package/build-module/store/selectors.js +12 -9
  67. package/build-module/store/selectors.js.map +1 -1
  68. package/build-module/utils/use-notify-copy.js +2 -2
  69. package/build-module/utils/use-notify-copy.js.map +1 -1
  70. package/build-style/style-rtl.css +48 -19
  71. package/build-style/style.css +48 -19
  72. package/package.json +34 -34
  73. package/src/components/background-image-control/index.js +1 -8
  74. package/src/components/background-image-control/style.scss +3 -7
  75. package/src/components/block-list/block-invalid-warning.native.js +1 -1
  76. package/src/components/block-list/use-block-props/index.js +1 -1
  77. package/src/components/block-list/use-block-props/use-is-hovered.js +12 -26
  78. package/src/components/block-lock/modal.js +1 -0
  79. package/src/components/block-lock/style.scss +9 -5
  80. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -1
  81. package/src/components/block-variation-transforms/style.scss +7 -0
  82. package/src/components/border-radius-control/style.scss +5 -0
  83. package/src/components/child-layout-control/index.js +66 -42
  84. package/src/components/colors-gradients/style.scss +5 -0
  85. package/src/components/image-size-control/index.js +1 -1
  86. package/src/components/inserter-list-item/style.scss +9 -6
  87. package/src/components/link-control/search-input.js +9 -2
  88. package/src/components/link-control/style.scss +7 -0
  89. package/src/components/link-control/test/index.js +44 -44
  90. package/src/components/list-view/block.js +9 -5
  91. package/src/components/list-view/use-list-view-images.js +57 -36
  92. package/src/components/media-replace-flow/test/index.js +1 -1
  93. package/src/components/spacing-sizes-control/style.scss +5 -0
  94. package/src/components/use-paste-styles/index.js +2 -2
  95. package/src/hooks/layout.scss +8 -0
  96. package/src/layouts/grid.js +2 -2
  97. package/src/store/actions.js +7 -6
  98. package/src/store/reducer.js +0 -18
  99. package/src/store/selectors.js +29 -31
  100. package/src/utils/use-notify-copy.js +2 -2
  101. package/tsconfig.tsbuildinfo +1 -1
@@ -30,11 +30,11 @@ export function useNotifyCopy() {
30
30
  const title = getBlockType(getBlockName(clientId))?.title;
31
31
  if (eventType === 'copy') {
32
32
  notice = sprintf(
33
- // Translators: Name of the block being copied, e.g. "Paragraph".
33
+ // Translators: %s: Name of the block being copied, e.g. "Paragraph".
34
34
  __('Copied "%s" to clipboard.'), title);
35
35
  } else {
36
36
  notice = sprintf(
37
- // Translators: Name of the block being cut, e.g. "Paragraph".
37
+ // Translators: %s: Name of the block being cut, e.g. "Paragraph".
38
38
  __('Moved "%s" to clipboard.'), title);
39
39
  }
40
40
  } else if (eventType === 'copy') {
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","store","blocksStore","useDispatch","useSelect","__","_n","sprintf","noticesStore","blockEditorStore","useNotifyCopy","getBlockName","getBlockType","createSuccessNotice","eventType","selectedBlockClientIds","notice","length","clientId","title","type"],"sources":["@wordpress/block-editor/src/utils/use-notify-copy.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\n\nexport function useNotifyCopy() {\n\tconst { getBlockName } = useSelect( blockEditorStore );\n\tconst { getBlockType } = useSelect( blocksStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\treturn useCallback(\n\t\t( eventType, selectedBlockClientIds ) => {\n\t\t\tlet notice = '';\n\n\t\t\tif ( eventType === 'copyStyles' ) {\n\t\t\t\tnotice = __( 'Styles copied to clipboard.' );\n\t\t\t} else if ( selectedBlockClientIds.length === 1 ) {\n\t\t\t\tconst clientId = selectedBlockClientIds[ 0 ];\n\t\t\t\tconst title = getBlockType( getBlockName( clientId ) )?.title;\n\n\t\t\t\tif ( eventType === 'copy' ) {\n\t\t\t\t\tnotice = sprintf(\n\t\t\t\t\t\t// Translators: Name of the block being copied, e.g. \"Paragraph\".\n\t\t\t\t\t\t__( 'Copied \"%s\" to clipboard.' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tnotice = sprintf(\n\t\t\t\t\t\t// Translators: Name of the block being cut, e.g. \"Paragraph\".\n\t\t\t\t\t\t__( 'Moved \"%s\" to clipboard.' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if ( eventType === 'copy' ) {\n\t\t\t\tnotice = sprintf(\n\t\t\t\t\t// Translators: %d: Number of blocks being copied.\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'Copied %d block to clipboard.',\n\t\t\t\t\t\t'Copied %d blocks to clipboard.',\n\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t),\n\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tnotice = sprintf(\n\t\t\t\t\t// Translators: %d: Number of blocks being moved.\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'Moved %d block to clipboard.',\n\t\t\t\t\t\t'Moved %d blocks to clipboard.',\n\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t),\n\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcreateSuccessNotice( notice, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t},\n\t\t[ createSuccessNotice, getBlockName, getBlockType ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,oBAAoB;AAChD,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASN,KAAK,IAAIO,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,UAAU;AAEpD,OAAO,SAASC,aAAaA,CAAA,EAAG;EAC/B,MAAM;IAAEC;EAAa,CAAC,GAAGP,SAAS,CAAEK,gBAAiB,CAAC;EACtD,MAAM;IAAEG;EAAa,CAAC,GAAGR,SAAS,CAAEF,WAAY,CAAC;EACjD,MAAM;IAAEW;EAAoB,CAAC,GAAGV,WAAW,CAAEK,YAAa,CAAC;EAE3D,OAAOR,WAAW,CACjB,CAAEc,SAAS,EAAEC,sBAAsB,KAAM;IACxC,IAAIC,MAAM,GAAG,EAAE;IAEf,IAAKF,SAAS,KAAK,YAAY,EAAG;MACjCE,MAAM,GAAGX,EAAE,CAAE,6BAA8B,CAAC;IAC7C,CAAC,MAAM,IAAKU,sBAAsB,CAACE,MAAM,KAAK,CAAC,EAAG;MACjD,MAAMC,QAAQ,GAAGH,sBAAsB,CAAE,CAAC,CAAE;MAC5C,MAAMI,KAAK,GAAGP,YAAY,CAAED,YAAY,CAAEO,QAAS,CAAE,CAAC,EAAEC,KAAK;MAE7D,IAAKL,SAAS,KAAK,MAAM,EAAG;QAC3BE,MAAM,GAAGT,OAAO;QACf;QACAF,EAAE,CAAE,2BAA4B,CAAC,EACjCc,KACD,CAAC;MACF,CAAC,MAAM;QACNH,MAAM,GAAGT,OAAO;QACf;QACAF,EAAE,CAAE,0BAA2B,CAAC,EAChCc,KACD,CAAC;MACF;IACD,CAAC,MAAM,IAAKL,SAAS,KAAK,MAAM,EAAG;MAClCE,MAAM,GAAGT,OAAO;MACf;MACAD,EAAE,CACD,+BAA+B,EAC/B,gCAAgC,EAChCS,sBAAsB,CAACE,MACxB,CAAC,EACDF,sBAAsB,CAACE,MACxB,CAAC;IACF,CAAC,MAAM;MACND,MAAM,GAAGT,OAAO;MACf;MACAD,EAAE,CACD,8BAA8B,EAC9B,+BAA+B,EAC/BS,sBAAsB,CAACE,MACxB,CAAC,EACDF,sBAAsB,CAACE,MACxB,CAAC;IACF;IAEAJ,mBAAmB,CAAEG,MAAM,EAAE;MAC5BI,IAAI,EAAE;IACP,CAAE,CAAC;EACJ,CAAC,EACD,CAAEP,mBAAmB,EAAEF,YAAY,EAAEC,YAAY,CAClD,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","store","blocksStore","useDispatch","useSelect","__","_n","sprintf","noticesStore","blockEditorStore","useNotifyCopy","getBlockName","getBlockType","createSuccessNotice","eventType","selectedBlockClientIds","notice","length","clientId","title","type"],"sources":["@wordpress/block-editor/src/utils/use-notify-copy.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\n\nexport function useNotifyCopy() {\n\tconst { getBlockName } = useSelect( blockEditorStore );\n\tconst { getBlockType } = useSelect( blocksStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\treturn useCallback(\n\t\t( eventType, selectedBlockClientIds ) => {\n\t\t\tlet notice = '';\n\n\t\t\tif ( eventType === 'copyStyles' ) {\n\t\t\t\tnotice = __( 'Styles copied to clipboard.' );\n\t\t\t} else if ( selectedBlockClientIds.length === 1 ) {\n\t\t\t\tconst clientId = selectedBlockClientIds[ 0 ];\n\t\t\t\tconst title = getBlockType( getBlockName( clientId ) )?.title;\n\n\t\t\t\tif ( eventType === 'copy' ) {\n\t\t\t\t\tnotice = sprintf(\n\t\t\t\t\t\t// Translators: %s: Name of the block being copied, e.g. \"Paragraph\".\n\t\t\t\t\t\t__( 'Copied \"%s\" to clipboard.' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tnotice = sprintf(\n\t\t\t\t\t\t// Translators: %s: Name of the block being cut, e.g. \"Paragraph\".\n\t\t\t\t\t\t__( 'Moved \"%s\" to clipboard.' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if ( eventType === 'copy' ) {\n\t\t\t\tnotice = sprintf(\n\t\t\t\t\t// Translators: %d: Number of blocks being copied.\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'Copied %d block to clipboard.',\n\t\t\t\t\t\t'Copied %d blocks to clipboard.',\n\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t),\n\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tnotice = sprintf(\n\t\t\t\t\t// Translators: %d: Number of blocks being moved.\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'Moved %d block to clipboard.',\n\t\t\t\t\t\t'Moved %d blocks to clipboard.',\n\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t),\n\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcreateSuccessNotice( notice, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t},\n\t\t[ createSuccessNotice, getBlockName, getBlockType ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,oBAAoB;AAChD,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASN,KAAK,IAAIO,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,UAAU;AAEpD,OAAO,SAASC,aAAaA,CAAA,EAAG;EAC/B,MAAM;IAAEC;EAAa,CAAC,GAAGP,SAAS,CAAEK,gBAAiB,CAAC;EACtD,MAAM;IAAEG;EAAa,CAAC,GAAGR,SAAS,CAAEF,WAAY,CAAC;EACjD,MAAM;IAAEW;EAAoB,CAAC,GAAGV,WAAW,CAAEK,YAAa,CAAC;EAE3D,OAAOR,WAAW,CACjB,CAAEc,SAAS,EAAEC,sBAAsB,KAAM;IACxC,IAAIC,MAAM,GAAG,EAAE;IAEf,IAAKF,SAAS,KAAK,YAAY,EAAG;MACjCE,MAAM,GAAGX,EAAE,CAAE,6BAA8B,CAAC;IAC7C,CAAC,MAAM,IAAKU,sBAAsB,CAACE,MAAM,KAAK,CAAC,EAAG;MACjD,MAAMC,QAAQ,GAAGH,sBAAsB,CAAE,CAAC,CAAE;MAC5C,MAAMI,KAAK,GAAGP,YAAY,CAAED,YAAY,CAAEO,QAAS,CAAE,CAAC,EAAEC,KAAK;MAE7D,IAAKL,SAAS,KAAK,MAAM,EAAG;QAC3BE,MAAM,GAAGT,OAAO;QACf;QACAF,EAAE,CAAE,2BAA4B,CAAC,EACjCc,KACD,CAAC;MACF,CAAC,MAAM;QACNH,MAAM,GAAGT,OAAO;QACf;QACAF,EAAE,CAAE,0BAA2B,CAAC,EAChCc,KACD,CAAC;MACF;IACD,CAAC,MAAM,IAAKL,SAAS,KAAK,MAAM,EAAG;MAClCE,MAAM,GAAGT,OAAO;MACf;MACAD,EAAE,CACD,+BAA+B,EAC/B,gCAAgC,EAChCS,sBAAsB,CAACE,MACxB,CAAC,EACDF,sBAAsB,CAACE,MACxB,CAAC;IACF,CAAC,MAAM;MACND,MAAM,GAAGT,OAAO;MACf;MACAD,EAAE,CACD,8BAA8B,EAC9B,+BAA+B,EAC/BS,sBAAsB,CAACE,MACxB,CAAC,EACDF,sBAAsB,CAACE,MACxB,CAAC;IACF;IAEAJ,mBAAmB,CAAEG,MAAM,EAAE;MAC5BI,IAAI,EAAE;IACP,CAAE,CAAC;EACJ,CAAC,EACD,CAAEP,mBAAmB,EAAEF,YAAY,EAAEC,YAAY,CAClD,CAAC;AACF","ignoreList":[]}
@@ -312,17 +312,13 @@
312
312
  margin: 0;
313
313
  }
314
314
 
315
- .block-editor-global-styles-background-panel__image-preview-content,
316
- .block-editor-global-styles-background-panel__dropdown-toggle {
317
- height: 100%;
318
- width: 100%;
319
- padding-right: 12px;
320
- }
321
-
322
315
  .block-editor-global-styles-background-panel__dropdown-toggle {
323
316
  cursor: pointer;
324
317
  background: transparent;
325
318
  border: none;
319
+ height: 100%;
320
+ width: 100%;
321
+ padding-right: 12px;
326
322
  }
327
323
 
328
324
  .block-editor-global-styles-background-panel__inspector-media-replace-title {
@@ -669,10 +665,11 @@ iframe[name=editor-canvas] {
669
665
  .block-editor-block-lock-modal {
670
666
  z-index: 1000001;
671
667
  }
672
- @media (min-width: 600px) {
673
- .block-editor-block-lock-modal .components-modal__frame {
674
- max-width: 480px;
675
- }
668
+
669
+ .block-editor-block-lock-modal__options {
670
+ border: 0;
671
+ padding: 0;
672
+ margin: 0;
676
673
  }
677
674
 
678
675
  .block-editor-block-lock-modal__options legend {
@@ -681,6 +678,8 @@ iframe[name=editor-canvas] {
681
678
  }
682
679
 
683
680
  .block-editor-block-lock-modal__checklist {
681
+ list-style: none;
682
+ padding: 0;
684
683
  margin: 0;
685
684
  }
686
685
 
@@ -1621,6 +1620,12 @@ iframe[name=editor-canvas] {
1621
1620
  width: 100%;
1622
1621
  }
1623
1622
 
1623
+ .block-editor-block-variation-transforms:where(fieldset) {
1624
+ border: 0;
1625
+ padding: 0;
1626
+ margin: 0;
1627
+ }
1628
+
1624
1629
  .block-editor-block-variation-transforms {
1625
1630
  padding: 0 52px 16px 16px;
1626
1631
  width: 100%;
@@ -1655,6 +1660,9 @@ iframe[name=editor-canvas] {
1655
1660
  }
1656
1661
 
1657
1662
  .components-border-radius-control {
1663
+ border: 0;
1664
+ padding: 0;
1665
+ margin: 0;
1658
1666
  margin-bottom: 12px;
1659
1667
  }
1660
1668
  .components-border-radius-control legend {
@@ -1695,6 +1703,9 @@ iframe[name=editor-canvas] {
1695
1703
  }
1696
1704
 
1697
1705
  .block-editor-color-gradient-control__fieldset {
1706
+ border: 0;
1707
+ padding: 0;
1708
+ margin: 0;
1698
1709
  min-width: 0;
1699
1710
  }
1700
1711
 
@@ -2225,18 +2236,18 @@ iframe[name=editor-canvas] {
2225
2236
  transition: all 0.05s ease-in-out;
2226
2237
  }
2227
2238
  }
2228
- .components-button.block-editor-block-types-list__item:disabled {
2239
+ .components-button.block-editor-block-types-list__item:disabled, .components-button.block-editor-block-types-list__item[aria-disabled=true] {
2229
2240
  opacity: 0.6;
2230
2241
  cursor: default;
2231
2242
  }
2232
- .components-button.block-editor-block-types-list__item:not(:disabled):hover .block-editor-block-types-list__item-title {
2243
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover .block-editor-block-types-list__item-title {
2233
2244
  color: var(--wp-admin-theme-color) !important;
2234
2245
  filter: brightness(0.95);
2235
2246
  }
2236
- .components-button.block-editor-block-types-list__item:not(:disabled):hover svg {
2247
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover svg {
2237
2248
  color: var(--wp-admin-theme-color) !important;
2238
2249
  }
2239
- .components-button.block-editor-block-types-list__item:not(:disabled):hover::after {
2250
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover::after {
2240
2251
  content: "";
2241
2252
  position: absolute;
2242
2253
  top: 0;
@@ -2248,15 +2259,15 @@ iframe[name=editor-canvas] {
2248
2259
  background: var(--wp-admin-theme-color);
2249
2260
  pointer-events: none;
2250
2261
  }
2251
- .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2252
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2253
- }
2254
- .components-button.block-editor-block-types-list__item:not(:disabled).is-active {
2262
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]).is-active {
2255
2263
  color: #fff;
2256
2264
  background: #1e1e1e;
2257
2265
  outline: 2px solid transparent;
2258
2266
  outline-offset: -2px;
2259
2267
  }
2268
+ .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2269
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2270
+ }
2260
2271
 
2261
2272
  .block-editor-block-types-list__item-icon {
2262
2273
  padding: 12px 20px;
@@ -2588,6 +2599,12 @@ iframe[name=editor-canvas] {
2588
2599
  position: relative;
2589
2600
  }
2590
2601
 
2602
+ .block-editor-link-control__settings {
2603
+ border: 0;
2604
+ padding: 0;
2605
+ margin: 0;
2606
+ }
2607
+
2591
2608
  .block-editor-link-control__setting {
2592
2609
  margin-bottom: 0;
2593
2610
  flex: 1;
@@ -3641,6 +3658,13 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
3641
3658
  margin-bottom: 8px;
3642
3659
  }
3643
3660
 
3661
+ .block-editor-hooks__grid-layout-columns-and-rows-controls,
3662
+ .block-editor-hooks__grid-layout-minimum-width-control {
3663
+ border: 0;
3664
+ padding: 0;
3665
+ margin: 0;
3666
+ }
3667
+
3644
3668
  .block-editor__spacing-visualizer {
3645
3669
  position: absolute;
3646
3670
  top: 0;
@@ -4484,6 +4508,11 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4484
4508
  }
4485
4509
  }
4486
4510
 
4511
+ .spacing-sizes-control {
4512
+ border: 0;
4513
+ padding: 0;
4514
+ margin: 0;
4515
+ }
4487
4516
  .spacing-sizes-control .spacing-sizes-control__custom-value-input,
4488
4517
  .spacing-sizes-control .spacing-sizes-control__label {
4489
4518
  margin-bottom: 0;
@@ -312,17 +312,13 @@
312
312
  margin: 0;
313
313
  }
314
314
 
315
- .block-editor-global-styles-background-panel__image-preview-content,
316
- .block-editor-global-styles-background-panel__dropdown-toggle {
317
- height: 100%;
318
- width: 100%;
319
- padding-left: 12px;
320
- }
321
-
322
315
  .block-editor-global-styles-background-panel__dropdown-toggle {
323
316
  cursor: pointer;
324
317
  background: transparent;
325
318
  border: none;
319
+ height: 100%;
320
+ width: 100%;
321
+ padding-left: 12px;
326
322
  }
327
323
 
328
324
  .block-editor-global-styles-background-panel__inspector-media-replace-title {
@@ -669,10 +665,11 @@ iframe[name=editor-canvas] {
669
665
  .block-editor-block-lock-modal {
670
666
  z-index: 1000001;
671
667
  }
672
- @media (min-width: 600px) {
673
- .block-editor-block-lock-modal .components-modal__frame {
674
- max-width: 480px;
675
- }
668
+
669
+ .block-editor-block-lock-modal__options {
670
+ border: 0;
671
+ padding: 0;
672
+ margin: 0;
676
673
  }
677
674
 
678
675
  .block-editor-block-lock-modal__options legend {
@@ -681,6 +678,8 @@ iframe[name=editor-canvas] {
681
678
  }
682
679
 
683
680
  .block-editor-block-lock-modal__checklist {
681
+ list-style: none;
682
+ padding: 0;
684
683
  margin: 0;
685
684
  }
686
685
 
@@ -1621,6 +1620,12 @@ iframe[name=editor-canvas] {
1621
1620
  width: 100%;
1622
1621
  }
1623
1622
 
1623
+ .block-editor-block-variation-transforms:where(fieldset) {
1624
+ border: 0;
1625
+ padding: 0;
1626
+ margin: 0;
1627
+ }
1628
+
1624
1629
  .block-editor-block-variation-transforms {
1625
1630
  padding: 0 16px 16px 52px;
1626
1631
  width: 100%;
@@ -1655,6 +1660,9 @@ iframe[name=editor-canvas] {
1655
1660
  }
1656
1661
 
1657
1662
  .components-border-radius-control {
1663
+ border: 0;
1664
+ padding: 0;
1665
+ margin: 0;
1658
1666
  margin-bottom: 12px;
1659
1667
  }
1660
1668
  .components-border-radius-control legend {
@@ -1695,6 +1703,9 @@ iframe[name=editor-canvas] {
1695
1703
  }
1696
1704
 
1697
1705
  .block-editor-color-gradient-control__fieldset {
1706
+ border: 0;
1707
+ padding: 0;
1708
+ margin: 0;
1698
1709
  min-width: 0;
1699
1710
  }
1700
1711
 
@@ -2226,18 +2237,18 @@ iframe[name=editor-canvas] {
2226
2237
  transition: all 0.05s ease-in-out;
2227
2238
  }
2228
2239
  }
2229
- .components-button.block-editor-block-types-list__item:disabled {
2240
+ .components-button.block-editor-block-types-list__item:disabled, .components-button.block-editor-block-types-list__item[aria-disabled=true] {
2230
2241
  opacity: 0.6;
2231
2242
  cursor: default;
2232
2243
  }
2233
- .components-button.block-editor-block-types-list__item:not(:disabled):hover .block-editor-block-types-list__item-title {
2244
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover .block-editor-block-types-list__item-title {
2234
2245
  color: var(--wp-admin-theme-color) !important;
2235
2246
  filter: brightness(0.95);
2236
2247
  }
2237
- .components-button.block-editor-block-types-list__item:not(:disabled):hover svg {
2248
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover svg {
2238
2249
  color: var(--wp-admin-theme-color) !important;
2239
2250
  }
2240
- .components-button.block-editor-block-types-list__item:not(:disabled):hover::after {
2251
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]):hover::after {
2241
2252
  content: "";
2242
2253
  position: absolute;
2243
2254
  top: 0;
@@ -2249,15 +2260,15 @@ iframe[name=editor-canvas] {
2249
2260
  background: var(--wp-admin-theme-color);
2250
2261
  pointer-events: none;
2251
2262
  }
2252
- .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2253
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2254
- }
2255
- .components-button.block-editor-block-types-list__item:not(:disabled).is-active {
2263
+ .components-button.block-editor-block-types-list__item:not(:disabled, [aria-disabled=true]).is-active {
2256
2264
  color: #fff;
2257
2265
  background: #1e1e1e;
2258
2266
  outline: 2px solid transparent;
2259
2267
  outline-offset: -2px;
2260
2268
  }
2269
+ .components-button.block-editor-block-types-list__item:not(:disabled):focus {
2270
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2271
+ }
2261
2272
 
2262
2273
  .block-editor-block-types-list__item-icon {
2263
2274
  padding: 12px 20px;
@@ -2589,6 +2600,12 @@ iframe[name=editor-canvas] {
2589
2600
  position: relative;
2590
2601
  }
2591
2602
 
2603
+ .block-editor-link-control__settings {
2604
+ border: 0;
2605
+ padding: 0;
2606
+ margin: 0;
2607
+ }
2608
+
2592
2609
  .block-editor-link-control__setting {
2593
2610
  margin-bottom: 0;
2594
2611
  flex: 1;
@@ -3643,6 +3660,13 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
3643
3660
  margin-bottom: 8px;
3644
3661
  }
3645
3662
 
3663
+ .block-editor-hooks__grid-layout-columns-and-rows-controls,
3664
+ .block-editor-hooks__grid-layout-minimum-width-control {
3665
+ border: 0;
3666
+ padding: 0;
3667
+ margin: 0;
3668
+ }
3669
+
3646
3670
  .block-editor__spacing-visualizer {
3647
3671
  position: absolute;
3648
3672
  top: 0;
@@ -4486,6 +4510,11 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
4486
4510
  }
4487
4511
  }
4488
4512
 
4513
+ .spacing-sizes-control {
4514
+ border: 0;
4515
+ padding: 0;
4516
+ margin: 0;
4517
+ }
4489
4518
  .spacing-sizes-control .spacing-sizes-control__custom-value-input,
4490
4519
  .spacing-sizes-control .spacing-sizes-control__label {
4491
4520
  margin-bottom: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "14.21.0",
3
+ "version": "15.0.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,38 +37,38 @@
37
37
  "@emotion/react": "^11.7.1",
38
38
  "@emotion/styled": "^11.6.0",
39
39
  "@react-spring/web": "^9.4.5",
40
- "@wordpress/a11y": "^4.26.0",
41
- "@wordpress/api-fetch": "^7.26.0",
42
- "@wordpress/blob": "^4.26.0",
43
- "@wordpress/block-serialization-default-parser": "^5.26.0",
44
- "@wordpress/blocks": "^14.15.0",
45
- "@wordpress/commands": "^1.26.0",
46
- "@wordpress/components": "^29.12.0",
47
- "@wordpress/compose": "^7.26.0",
48
- "@wordpress/data": "^10.26.0",
49
- "@wordpress/date": "^5.26.0",
50
- "@wordpress/deprecated": "^4.26.0",
51
- "@wordpress/dom": "^4.26.0",
52
- "@wordpress/element": "^6.26.0",
53
- "@wordpress/escape-html": "^3.26.0",
54
- "@wordpress/hooks": "^4.26.0",
55
- "@wordpress/html-entities": "^4.26.0",
56
- "@wordpress/i18n": "^5.26.0",
57
- "@wordpress/icons": "^10.26.0",
58
- "@wordpress/is-shallow-equal": "^5.26.0",
59
- "@wordpress/keyboard-shortcuts": "^5.26.0",
60
- "@wordpress/keycodes": "^4.26.0",
61
- "@wordpress/notices": "^5.26.0",
62
- "@wordpress/preferences": "^4.26.0",
63
- "@wordpress/priority-queue": "^3.26.0",
64
- "@wordpress/private-apis": "^1.26.0",
65
- "@wordpress/rich-text": "^7.26.0",
66
- "@wordpress/style-engine": "^2.26.0",
67
- "@wordpress/token-list": "^3.26.0",
68
- "@wordpress/upload-media": "^0.11.0",
69
- "@wordpress/url": "^4.26.0",
70
- "@wordpress/warning": "^3.26.0",
71
- "@wordpress/wordcount": "^4.26.0",
40
+ "@wordpress/a11y": "^4.27.0",
41
+ "@wordpress/api-fetch": "^7.27.0",
42
+ "@wordpress/blob": "^4.27.0",
43
+ "@wordpress/block-serialization-default-parser": "^5.27.0",
44
+ "@wordpress/blocks": "^15.0.0",
45
+ "@wordpress/commands": "^1.27.0",
46
+ "@wordpress/components": "^30.0.0",
47
+ "@wordpress/compose": "^7.27.0",
48
+ "@wordpress/data": "^10.27.0",
49
+ "@wordpress/date": "^5.27.0",
50
+ "@wordpress/deprecated": "^4.27.0",
51
+ "@wordpress/dom": "^4.27.0",
52
+ "@wordpress/element": "^6.27.0",
53
+ "@wordpress/escape-html": "^3.27.0",
54
+ "@wordpress/hooks": "^4.27.0",
55
+ "@wordpress/html-entities": "^4.27.0",
56
+ "@wordpress/i18n": "^6.0.0",
57
+ "@wordpress/icons": "^10.27.0",
58
+ "@wordpress/is-shallow-equal": "^5.27.0",
59
+ "@wordpress/keyboard-shortcuts": "^5.27.0",
60
+ "@wordpress/keycodes": "^4.27.0",
61
+ "@wordpress/notices": "^5.27.0",
62
+ "@wordpress/preferences": "^4.27.0",
63
+ "@wordpress/priority-queue": "^3.27.0",
64
+ "@wordpress/private-apis": "^1.27.0",
65
+ "@wordpress/rich-text": "^7.27.0",
66
+ "@wordpress/style-engine": "^2.27.0",
67
+ "@wordpress/token-list": "^3.27.0",
68
+ "@wordpress/upload-media": "^0.12.0",
69
+ "@wordpress/url": "^4.27.0",
70
+ "@wordpress/warning": "^3.27.0",
71
+ "@wordpress/wordcount": "^4.27.0",
72
72
  "change-case": "^4.1.2",
73
73
  "clsx": "^2.1.1",
74
74
  "colord": "^2.7.0",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "35e26942820d8237771af0c58e45b4303f0497f1"
94
+ "gitHead": "abe06a6f2aef8d03c30ea9d5b3e133f041e523b1"
95
95
  }
@@ -115,7 +115,6 @@ function InspectorImagePreviewItem( {
115
115
  toggleProps = {},
116
116
  filename,
117
117
  label,
118
- className,
119
118
  onToggleCallback = noop,
120
119
  } ) {
121
120
  const { isOpen, ...restToggleProps } = toggleProps;
@@ -168,12 +167,7 @@ function InspectorImagePreviewItem( {
168
167
  };
169
168
 
170
169
  return as === 'button' ? (
171
- <Button
172
- __next40pxDefaultSize
173
- className={ className }
174
- { ...restToggleProps }
175
- aria-expanded={ isOpen }
176
- >
170
+ <Button __next40pxDefaultSize { ...restToggleProps }>
177
171
  { renderPreviewContent() }
178
172
  </Button>
179
173
  ) : (
@@ -386,7 +380,6 @@ function BackgroundImageControls( {
386
380
  } }
387
381
  name={
388
382
  <InspectorImagePreviewItem
389
- className="block-editor-global-styles-background-panel__image-preview"
390
383
  imgUrl={ url }
391
384
  filename={ title }
392
385
  label={ imgLabel }
@@ -76,17 +76,13 @@
76
76
  }
77
77
  }
78
78
 
79
- .block-editor-global-styles-background-panel__image-preview-content,
80
- .block-editor-global-styles-background-panel__dropdown-toggle {
81
- height: 100%;
82
- width: 100%;
83
- padding-left: $grid-unit-15;
84
- }
85
-
86
79
  .block-editor-global-styles-background-panel__dropdown-toggle {
87
80
  cursor: pointer;
88
81
  background: transparent;
89
82
  border: none;
83
+ height: 100%;
84
+ width: 100%;
85
+ padding-left: $grid-unit-15;
90
86
  }
91
87
 
92
88
  .block-editor-global-styles-background-panel__inspector-media-replace-title {
@@ -36,7 +36,7 @@ export default function BlockInvalidWarning( { clientId } ) {
36
36
  const { block, blockTitle, icon } = useSelect( selector, [ clientId ] );
37
37
 
38
38
  const accessibilityLabel = sprintf(
39
- /* translators: accessibility text for blocks with invalid content. %d: localized block title */
39
+ /* translators: accessibility text for blocks with invalid content. %s: localized block title */
40
40
  __( '%s block. This block has invalid content' ),
41
41
  blockTitle
42
42
  );
@@ -114,7 +114,7 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
114
114
  useBlockRefProvider( clientId ),
115
115
  useFocusHandler( clientId ),
116
116
  useEventHandlers( { clientId, isSelected } ),
117
- useIsHovered( { clientId } ),
117
+ useIsHovered(),
118
118
  useIntersectionObserver(),
119
119
  useMovingAnimation( { triggerAnimationOnChange: index, clientId } ),
120
120
  useDisabled( { isDisabled: ! hasOverlay } ),
@@ -2,37 +2,24 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useRefEffect } from '@wordpress/compose';
5
- import { useDispatch } from '@wordpress/data';
6
5
 
7
- /**
8
- * Internal dependencies
9
- */
10
- import { store as blockEditorStore } from '../../../store';
6
+ function listener( event ) {
7
+ if ( event.defaultPrevented ) {
8
+ return;
9
+ }
10
+
11
+ event.preventDefault();
12
+ event.currentTarget.classList.toggle(
13
+ 'is-hovered',
14
+ event.type === 'mouseover'
15
+ );
16
+ }
11
17
 
12
18
  /*
13
19
  * Adds `is-hovered` class when the block is hovered and in navigation or
14
20
  * outline mode.
15
21
  */
16
- export function useIsHovered( { clientId } ) {
17
- const { hoverBlock } = useDispatch( blockEditorStore );
18
-
19
- function listener( event ) {
20
- if ( event.defaultPrevented ) {
21
- return;
22
- }
23
-
24
- const action = event.type === 'mouseover' ? 'add' : 'remove';
25
-
26
- event.preventDefault();
27
- event.currentTarget.classList[ action ]( 'is-hovered' );
28
-
29
- if ( action === 'add' ) {
30
- hoverBlock( clientId );
31
- } else {
32
- hoverBlock( null );
33
- }
34
- }
35
-
22
+ export function useIsHovered() {
36
23
  return useRefEffect( ( node ) => {
37
24
  node.addEventListener( 'mouseout', listener );
38
25
  node.addEventListener( 'mouseover', listener );
@@ -43,7 +30,6 @@ export function useIsHovered( { clientId } ) {
43
30
 
44
31
  // Remove class in case it lingers.
45
32
  node.classList.remove( 'is-hovered' );
46
- hoverBlock( null );
47
33
  };
48
34
  }, [] );
49
35
  }
@@ -84,6 +84,7 @@ export default function BlockLockModal( { clientId, onClose } ) {
84
84
  ) }
85
85
  overlayClassName="block-editor-block-lock-modal"
86
86
  onRequestClose={ onClose }
87
+ size="small"
87
88
  >
88
89
  <form
89
90
  onSubmit={ ( event ) => {
@@ -1,11 +1,12 @@
1
1
  .block-editor-block-lock-modal {
2
2
  z-index: z-index(".block-editor-block-lock-modal");
3
+ }
3
4
 
4
- .components-modal__frame {
5
- @include break-small() {
6
- max-width: $break-mobile;
7
- }
8
- }
5
+ .block-editor-block-lock-modal__options {
6
+ // Reset `fieldset` browser defaults.
7
+ border: 0;
8
+ padding: 0;
9
+ margin: 0;
9
10
  }
10
11
 
11
12
  .block-editor-block-lock-modal__options legend {
@@ -14,6 +15,9 @@
14
15
  }
15
16
 
16
17
  .block-editor-block-lock-modal__checklist {
18
+ // Reset `ul` browser defaults.
19
+ list-style: none;
20
+ padding: 0;
17
21
  margin: 0;
18
22
  }
19
23
 
@@ -88,6 +88,7 @@ export function BlockSettingsDropdown( {
88
88
  selectedBlockClientIds,
89
89
  openedBlockSettingsMenu,
90
90
  isContentOnly,
91
+ isZoomOut,
91
92
  } = useSelect(
92
93
  ( select ) => {
93
94
  const {
@@ -98,6 +99,7 @@ export function BlockSettingsDropdown( {
98
99
  getBlockAttributes,
99
100
  getOpenedBlockSettingsMenu,
100
101
  getBlockEditingMode,
102
+ isZoomOut: _isZoomOut,
101
103
  } = unlock( select( blockEditorStore ) );
102
104
 
103
105
  const { getActiveBlockVariation } = select( blocksStore );
@@ -122,6 +124,7 @@ export function BlockSettingsDropdown( {
122
124
  openedBlockSettingsMenu: getOpenedBlockSettingsMenu(),
123
125
  isContentOnly:
124
126
  getBlockEditingMode( firstBlockClientId ) === 'contentOnly',
127
+ isZoomOut: _isZoomOut(),
125
128
  };
126
129
  },
127
130
  [ firstBlockClientId ]
@@ -301,7 +304,7 @@ export function BlockSettingsDropdown( {
301
304
  { __( 'Duplicate' ) }
302
305
  </MenuItem>
303
306
  ) }
304
- { canInsertBlock && ! isContentOnly && (
307
+ { canInsertBlock && ! isZoomOut && (
305
308
  <>
306
309
  <MenuItem
307
310
  onClick={ pipe(
@@ -1,3 +1,10 @@
1
+ .block-editor-block-variation-transforms:where(fieldset) {
2
+ // Reset `fieldset` browser defaults.
3
+ border: 0;
4
+ padding: 0;
5
+ margin: 0;
6
+ }
7
+
1
8
  .block-editor-block-variation-transforms {
2
9
  padding: 0 $grid-unit-20 $grid-unit-20 52px;
3
10
  width: 100%;
@@ -1,4 +1,9 @@
1
1
  .components-border-radius-control {
2
+ // Reset `fieldset` browser defaults.
3
+ border: 0;
4
+ padding: 0;
5
+ margin: 0;
6
+
2
7
  margin-bottom: $grid-unit-15;
3
8
 
4
9
  legend {