@wordpress/block-editor 10.3.0 → 10.5.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 (460) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +0 -1
  3. package/build/components/alignment-control/ui.js +1 -1
  4. package/build/components/alignment-control/ui.js.map +1 -1
  5. package/build/components/block-alignment-control/constants.js +1 -1
  6. package/build/components/block-alignment-control/constants.js.map +1 -1
  7. package/build/components/block-alignment-matrix-control/index.js +1 -1
  8. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  9. package/build/components/block-compare/index.js +1 -3
  10. package/build/components/block-compare/index.js.map +1 -1
  11. package/build/components/block-edit/index.js +4 -2
  12. package/build/components/block-edit/index.js.map +1 -1
  13. package/build/components/block-list/block.js +3 -1
  14. package/build/components/block-list/block.js.map +1 -1
  15. package/build/components/block-lock/menu-item.js +1 -1
  16. package/build/components/block-lock/menu-item.js.map +1 -1
  17. package/build/components/block-lock/modal.js +16 -9
  18. package/build/components/block-lock/modal.js.map +1 -1
  19. package/build/components/block-popover/inbetween.js +2 -1
  20. package/build/components/block-popover/inbetween.js.map +1 -1
  21. package/build/components/block-popover/index.js +2 -1
  22. package/build/components/block-popover/index.js.map +1 -1
  23. package/build/components/block-preview/index.js +2 -4
  24. package/build/components/block-preview/index.js.map +1 -1
  25. package/build/components/block-settings-menu/block-settings-dropdown.js +2 -8
  26. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  27. package/build/components/block-styles/utils.js +3 -3
  28. package/build/components/block-styles/utils.js.map +1 -1
  29. package/build/components/block-switcher/index.js +21 -12
  30. package/build/components/block-switcher/index.js.map +1 -1
  31. package/build/components/block-switcher/preview-block-popover.js +1 -1
  32. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  33. package/build/components/block-tools/insertion-point.js +12 -2
  34. package/build/components/block-tools/insertion-point.js.map +1 -1
  35. package/build/components/block-tools/selected-block-popover.js +27 -4
  36. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  37. package/build/components/block-vertical-alignment-control/ui.js +1 -1
  38. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  39. package/build/components/border-radius-control/all-input-control.js +2 -1
  40. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  41. package/build/components/border-radius-control/index.js +2 -1
  42. package/build/components/border-radius-control/index.js.map +1 -1
  43. package/build/components/border-radius-control/input-controls.js +2 -1
  44. package/build/components/border-radius-control/input-controls.js.map +1 -1
  45. package/build/components/colors/with-colors.js +4 -3
  46. package/build/components/colors/with-colors.js.map +1 -1
  47. package/build/components/duotone-control/index.js +1 -1
  48. package/build/components/duotone-control/index.js.map +1 -1
  49. package/build/components/font-sizes/fluid-utils.js +24 -40
  50. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  51. package/build/components/font-sizes/with-font-sizes.js +8 -6
  52. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  53. package/build/components/iframe/index.js +1 -1
  54. package/build/components/iframe/index.js.map +1 -1
  55. package/build/components/image-editor/constants.js +1 -1
  56. package/build/components/image-editor/constants.js.map +1 -1
  57. package/build/components/index.js +9 -0
  58. package/build/components/index.js.map +1 -1
  59. package/build/components/inner-blocks/index.js +10 -4
  60. package/build/components/inner-blocks/index.js.map +1 -1
  61. package/build/components/inserter/hooks/use-insertion-point.js +2 -7
  62. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  63. package/build/components/inserter/reusable-blocks-tab.js +4 -1
  64. package/build/components/inserter/reusable-blocks-tab.js.map +1 -1
  65. package/build/components/inserter/search-items.js +23 -2
  66. package/build/components/inserter/search-items.js.map +1 -1
  67. package/build/components/line-height-control/index.js +2 -1
  68. package/build/components/line-height-control/index.js.map +1 -1
  69. package/build/components/link-control/index.js +18 -34
  70. package/build/components/link-control/index.js.map +1 -1
  71. package/build/components/link-control/search-input.js +1 -1
  72. package/build/components/link-control/search-input.js.map +1 -1
  73. package/build/components/link-control/use-internal-input-value.js +26 -0
  74. package/build/components/link-control/use-internal-input-value.js.map +1 -0
  75. package/build/components/list-view/block.js +5 -3
  76. package/build/components/list-view/block.js.map +1 -1
  77. package/build/components/list-view/branch.js +9 -3
  78. package/build/components/list-view/branch.js.map +1 -1
  79. package/build/components/list-view/drop-indicator.js +2 -1
  80. package/build/components/list-view/drop-indicator.js.map +1 -1
  81. package/build/components/media-replace-flow/index.js +1 -1
  82. package/build/components/media-replace-flow/index.js.map +1 -1
  83. package/build/components/off-canvas-editor/block-contents.js +100 -0
  84. package/build/components/off-canvas-editor/block-contents.js.map +1 -0
  85. package/build/components/off-canvas-editor/block-select-button.js +119 -0
  86. package/build/components/off-canvas-editor/block-select-button.js.map +1 -0
  87. package/build/components/off-canvas-editor/block.js +292 -0
  88. package/build/components/off-canvas-editor/block.js.map +1 -0
  89. package/build/components/off-canvas-editor/branch.js +181 -0
  90. package/build/components/off-canvas-editor/branch.js.map +1 -0
  91. package/build/components/off-canvas-editor/context.js +19 -0
  92. package/build/components/off-canvas-editor/context.js.map +1 -0
  93. package/build/components/off-canvas-editor/drop-indicator.js +118 -0
  94. package/build/components/off-canvas-editor/drop-indicator.js.map +1 -0
  95. package/build/components/off-canvas-editor/expander.js +41 -0
  96. package/build/components/off-canvas-editor/expander.js.map +1 -0
  97. package/build/components/off-canvas-editor/index.js +204 -0
  98. package/build/components/off-canvas-editor/index.js.map +1 -0
  99. package/build/components/off-canvas-editor/leaf.js +60 -0
  100. package/build/components/off-canvas-editor/leaf.js.map +1 -0
  101. package/build/components/off-canvas-editor/use-block-selection.js +139 -0
  102. package/build/components/off-canvas-editor/use-block-selection.js.map +1 -0
  103. package/build/components/off-canvas-editor/use-list-view-client-ids.js +33 -0
  104. package/build/components/off-canvas-editor/use-list-view-client-ids.js.map +1 -0
  105. package/build/components/off-canvas-editor/use-list-view-drop-zone.js +235 -0
  106. package/build/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -0
  107. package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js +60 -0
  108. package/build/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +1 -0
  109. package/build/components/off-canvas-editor/utils.js +60 -0
  110. package/build/components/off-canvas-editor/utils.js.map +1 -0
  111. package/build/components/rich-text/format-toolbar/index.js +1 -1
  112. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  113. package/build/components/rich-text/format-toolbar-container.js +1 -1
  114. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  115. package/build/components/rich-text/use-paste-handler.js +1 -1
  116. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  117. package/build/components/spacing-sizes-control/all-input-control.js +6 -2
  118. package/build/components/spacing-sizes-control/all-input-control.js.map +1 -1
  119. package/build/components/spacing-sizes-control/axial-input-controls.js +6 -2
  120. package/build/components/spacing-sizes-control/axial-input-controls.js.map +1 -1
  121. package/build/components/spacing-sizes-control/index.js +6 -2
  122. package/build/components/spacing-sizes-control/index.js.map +1 -1
  123. package/build/components/spacing-sizes-control/input-controls.js +6 -2
  124. package/build/components/spacing-sizes-control/input-controls.js.map +1 -1
  125. package/build/components/spacing-sizes-control/spacing-input-control.js +12 -5
  126. package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
  127. package/build/components/url-input/index.js +1 -1
  128. package/build/components/url-input/index.js.map +1 -1
  129. package/build/components/url-popover/index.js +31 -2
  130. package/build/components/url-popover/index.js.map +1 -1
  131. package/build/components/use-setting/index.js +1 -1
  132. package/build/components/use-setting/index.js.map +1 -1
  133. package/build/hooks/border.js +1 -0
  134. package/build/hooks/border.js.map +1 -1
  135. package/build/hooks/color-panel.js +17 -1
  136. package/build/hooks/color-panel.js.map +1 -1
  137. package/build/hooks/color.js +1 -1
  138. package/build/hooks/color.js.map +1 -1
  139. package/build/hooks/content-lock-ui.js +13 -6
  140. package/build/hooks/content-lock-ui.js.map +1 -1
  141. package/build/hooks/dimensions.js +72 -13
  142. package/build/hooks/dimensions.js.map +1 -1
  143. package/build/hooks/font-size.js +1 -0
  144. package/build/hooks/font-size.js.map +1 -1
  145. package/build/hooks/layout.js +5 -4
  146. package/build/hooks/layout.js.map +1 -1
  147. package/build/hooks/margin.js +26 -18
  148. package/build/hooks/margin.js.map +1 -1
  149. package/build/hooks/min-height.js +145 -0
  150. package/build/hooks/min-height.js.map +1 -0
  151. package/build/hooks/padding.js +22 -13
  152. package/build/hooks/padding.js.map +1 -1
  153. package/build/hooks/style.js +3 -2
  154. package/build/hooks/style.js.map +1 -1
  155. package/build/hooks/utils.js +7 -6
  156. package/build/hooks/utils.js.map +1 -1
  157. package/build/layouts/constrained.js +0 -1
  158. package/build/layouts/constrained.js.map +1 -1
  159. package/build/layouts/flex.js +23 -22
  160. package/build/layouts/flex.js.map +1 -1
  161. package/build/store/actions.js +30 -0
  162. package/build/store/actions.js.map +1 -1
  163. package/build/store/array.js +1 -7
  164. package/build/store/array.js.map +1 -1
  165. package/build/store/reducer.js +46 -14
  166. package/build/store/reducer.js.map +1 -1
  167. package/build/store/selectors.js +62 -31
  168. package/build/store/selectors.js.map +1 -1
  169. package/build-module/components/alignment-control/ui.js +1 -1
  170. package/build-module/components/alignment-control/ui.js.map +1 -1
  171. package/build-module/components/block-alignment-control/constants.js +1 -1
  172. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  173. package/build-module/components/block-alignment-matrix-control/index.js +1 -1
  174. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  175. package/build-module/components/block-compare/index.js +2 -3
  176. package/build-module/components/block-compare/index.js.map +1 -1
  177. package/build-module/components/block-edit/index.js +4 -2
  178. package/build-module/components/block-edit/index.js.map +1 -1
  179. package/build-module/components/block-list/block.js +3 -1
  180. package/build-module/components/block-list/block.js.map +1 -1
  181. package/build-module/components/block-lock/menu-item.js +2 -2
  182. package/build-module/components/block-lock/menu-item.js.map +1 -1
  183. package/build-module/components/block-lock/modal.js +17 -10
  184. package/build-module/components/block-lock/modal.js.map +1 -1
  185. package/build-module/components/block-popover/inbetween.js +2 -1
  186. package/build-module/components/block-popover/inbetween.js.map +1 -1
  187. package/build-module/components/block-popover/index.js +2 -1
  188. package/build-module/components/block-popover/index.js.map +1 -1
  189. package/build-module/components/block-preview/index.js +2 -3
  190. package/build-module/components/block-preview/index.js.map +1 -1
  191. package/build-module/components/block-settings-menu/block-settings-dropdown.js +2 -7
  192. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  193. package/build-module/components/block-styles/utils.js +3 -3
  194. package/build-module/components/block-styles/utils.js.map +1 -1
  195. package/build-module/components/block-switcher/index.js +21 -11
  196. package/build-module/components/block-switcher/index.js.map +1 -1
  197. package/build-module/components/block-switcher/preview-block-popover.js +1 -1
  198. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  199. package/build-module/components/block-tools/insertion-point.js +12 -2
  200. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  201. package/build-module/components/block-tools/selected-block-popover.js +27 -5
  202. package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
  203. package/build-module/components/block-vertical-alignment-control/ui.js +1 -1
  204. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  205. package/build-module/components/border-radius-control/all-input-control.js +2 -1
  206. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  207. package/build-module/components/border-radius-control/index.js +2 -1
  208. package/build-module/components/border-radius-control/index.js.map +1 -1
  209. package/build-module/components/border-radius-control/input-controls.js +2 -1
  210. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  211. package/build-module/components/colors/with-colors.js +5 -4
  212. package/build-module/components/colors/with-colors.js.map +1 -1
  213. package/build-module/components/duotone-control/index.js +1 -1
  214. package/build-module/components/duotone-control/index.js.map +1 -1
  215. package/build-module/components/font-sizes/fluid-utils.js +24 -40
  216. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  217. package/build-module/components/font-sizes/with-font-sizes.js +9 -7
  218. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  219. package/build-module/components/iframe/index.js +1 -1
  220. package/build-module/components/iframe/index.js.map +1 -1
  221. package/build-module/components/image-editor/constants.js +1 -1
  222. package/build-module/components/image-editor/constants.js.map +1 -1
  223. package/build-module/components/index.js +1 -0
  224. package/build-module/components/index.js.map +1 -1
  225. package/build-module/components/inner-blocks/index.js +10 -4
  226. package/build-module/components/inner-blocks/index.js.map +1 -1
  227. package/build-module/components/inserter/hooks/use-insertion-point.js +2 -6
  228. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  229. package/build-module/components/inserter/reusable-blocks-tab.js +3 -1
  230. package/build-module/components/inserter/reusable-blocks-tab.js.map +1 -1
  231. package/build-module/components/inserter/search-items.js +23 -3
  232. package/build-module/components/inserter/search-items.js.map +1 -1
  233. package/build-module/components/line-height-control/index.js +2 -1
  234. package/build-module/components/line-height-control/index.js.map +1 -1
  235. package/build-module/components/link-control/index.js +17 -34
  236. package/build-module/components/link-control/index.js.map +1 -1
  237. package/build-module/components/link-control/search-input.js +1 -1
  238. package/build-module/components/link-control/search-input.js.map +1 -1
  239. package/build-module/components/link-control/use-internal-input-value.js +18 -0
  240. package/build-module/components/link-control/use-internal-input-value.js.map +1 -0
  241. package/build-module/components/list-view/block.js +5 -3
  242. package/build-module/components/list-view/block.js.map +1 -1
  243. package/build-module/components/list-view/branch.js +9 -3
  244. package/build-module/components/list-view/branch.js.map +1 -1
  245. package/build-module/components/list-view/drop-indicator.js +2 -1
  246. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  247. package/build-module/components/media-replace-flow/index.js +1 -1
  248. package/build-module/components/media-replace-flow/index.js.map +1 -1
  249. package/build-module/components/off-canvas-editor/block-contents.js +85 -0
  250. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -0
  251. package/build-module/components/off-canvas-editor/block-select-button.js +101 -0
  252. package/build-module/components/off-canvas-editor/block-select-button.js.map +1 -0
  253. package/build-module/components/off-canvas-editor/block.js +268 -0
  254. package/build-module/components/off-canvas-editor/block.js.map +1 -0
  255. package/build-module/components/off-canvas-editor/branch.js +165 -0
  256. package/build-module/components/off-canvas-editor/branch.js.map +1 -0
  257. package/build-module/components/off-canvas-editor/context.js +7 -0
  258. package/build-module/components/off-canvas-editor/context.js.map +1 -0
  259. package/build-module/components/off-canvas-editor/drop-indicator.js +111 -0
  260. package/build-module/components/off-canvas-editor/drop-indicator.js.map +1 -0
  261. package/build-module/components/off-canvas-editor/expander.js +32 -0
  262. package/build-module/components/off-canvas-editor/expander.js.map +1 -0
  263. package/build-module/components/off-canvas-editor/index.js +181 -0
  264. package/build-module/components/off-canvas-editor/index.js.map +1 -0
  265. package/build-module/components/off-canvas-editor/leaf.js +45 -0
  266. package/build-module/components/off-canvas-editor/leaf.js.map +1 -0
  267. package/build-module/components/off-canvas-editor/use-block-selection.js +124 -0
  268. package/build-module/components/off-canvas-editor/use-block-selection.js.map +1 -0
  269. package/build-module/components/off-canvas-editor/use-list-view-client-ids.js +24 -0
  270. package/build-module/components/off-canvas-editor/use-list-view-client-ids.js.map +1 -0
  271. package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js +220 -0
  272. package/build-module/components/off-canvas-editor/use-list-view-drop-zone.js.map +1 -0
  273. package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js +50 -0
  274. package/build-module/components/off-canvas-editor/use-list-view-expand-selected-item.js.map +1 -0
  275. package/build-module/components/off-canvas-editor/utils.js +44 -0
  276. package/build-module/components/off-canvas-editor/utils.js.map +1 -0
  277. package/build-module/components/rich-text/format-toolbar/index.js +1 -1
  278. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  279. package/build-module/components/rich-text/format-toolbar-container.js +1 -1
  280. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  281. package/build-module/components/rich-text/use-paste-handler.js +1 -1
  282. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  283. package/build-module/components/spacing-sizes-control/all-input-control.js +6 -2
  284. package/build-module/components/spacing-sizes-control/all-input-control.js.map +1 -1
  285. package/build-module/components/spacing-sizes-control/axial-input-controls.js +6 -2
  286. package/build-module/components/spacing-sizes-control/axial-input-controls.js.map +1 -1
  287. package/build-module/components/spacing-sizes-control/index.js +6 -2
  288. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  289. package/build-module/components/spacing-sizes-control/input-controls.js +6 -2
  290. package/build-module/components/spacing-sizes-control/input-controls.js.map +1 -1
  291. package/build-module/components/spacing-sizes-control/spacing-input-control.js +12 -5
  292. package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
  293. package/build-module/components/url-input/index.js +1 -1
  294. package/build-module/components/url-input/index.js.map +1 -1
  295. package/build-module/components/url-popover/index.js +30 -3
  296. package/build-module/components/url-popover/index.js.map +1 -1
  297. package/build-module/components/use-setting/index.js +1 -1
  298. package/build-module/components/use-setting/index.js.map +1 -1
  299. package/build-module/hooks/border.js +1 -0
  300. package/build-module/hooks/border.js.map +1 -1
  301. package/build-module/hooks/color-panel.js +17 -1
  302. package/build-module/hooks/color-panel.js.map +1 -1
  303. package/build-module/hooks/color.js +1 -1
  304. package/build-module/hooks/color.js.map +1 -1
  305. package/build-module/hooks/content-lock-ui.js +15 -8
  306. package/build-module/hooks/content-lock-ui.js.map +1 -1
  307. package/build-module/hooks/dimensions.js +67 -12
  308. package/build-module/hooks/dimensions.js.map +1 -1
  309. package/build-module/hooks/font-size.js +1 -0
  310. package/build-module/hooks/font-size.js.map +1 -1
  311. package/build-module/hooks/layout.js +6 -5
  312. package/build-module/hooks/layout.js.map +1 -1
  313. package/build-module/hooks/margin.js +27 -19
  314. package/build-module/hooks/margin.js.map +1 -1
  315. package/build-module/hooks/min-height.js +122 -0
  316. package/build-module/hooks/min-height.js.map +1 -0
  317. package/build-module/hooks/padding.js +23 -14
  318. package/build-module/hooks/padding.js.map +1 -1
  319. package/build-module/hooks/style.js +4 -3
  320. package/build-module/hooks/style.js.map +1 -1
  321. package/build-module/hooks/utils.js +7 -7
  322. package/build-module/hooks/utils.js.map +1 -1
  323. package/build-module/layouts/constrained.js +0 -1
  324. package/build-module/layouts/constrained.js.map +1 -1
  325. package/build-module/layouts/flex.js +24 -23
  326. package/build-module/layouts/flex.js.map +1 -1
  327. package/build-module/store/actions.js +26 -0
  328. package/build-module/store/actions.js.map +1 -1
  329. package/build-module/store/array.js +1 -6
  330. package/build-module/store/array.js.map +1 -1
  331. package/build-module/store/reducer.js +44 -14
  332. package/build-module/store/reducer.js.map +1 -1
  333. package/build-module/store/selectors.js +59 -31
  334. package/build-module/store/selectors.js.map +1 -1
  335. package/build-style/style-rtl.css +88 -88
  336. package/build-style/style.css +84 -84
  337. package/package.json +29 -28
  338. package/src/components/alignment-control/README.md +1 -1
  339. package/src/components/alignment-control/ui.js +1 -1
  340. package/src/components/block-alignment-control/constants.js +1 -1
  341. package/src/components/block-alignment-control/test/index.native.js +4 -4
  342. package/src/components/block-alignment-matrix-control/index.js +1 -1
  343. package/src/components/block-breadcrumb/test/__snapshots__/index.js.snap +13 -11
  344. package/src/components/block-breadcrumb/test/index.js +1 -1
  345. package/src/components/block-compare/index.js +3 -2
  346. package/src/components/block-draggable/test/helpers.native.js +3 -3
  347. package/src/components/block-draggable/test/index.native.js +27 -27
  348. package/src/components/block-edit/index.js +2 -1
  349. package/src/components/block-list/block.js +2 -0
  350. package/src/components/block-list/style.scss +11 -6
  351. package/src/components/block-lock/menu-item.js +5 -2
  352. package/src/components/block-lock/modal.js +19 -36
  353. package/src/components/block-lock/style.scss +8 -17
  354. package/src/components/block-mover/stories/index.js +1 -1
  355. package/src/components/block-mover/style.scss +35 -1
  356. package/src/components/block-popover/inbetween.js +1 -0
  357. package/src/components/block-popover/index.js +1 -0
  358. package/src/components/block-popover/style.scss +1 -5
  359. package/src/components/block-preview/index.js +8 -3
  360. package/src/components/block-settings-menu/block-settings-dropdown.js +4 -7
  361. package/src/components/block-styles/utils.js +3 -3
  362. package/src/components/block-switcher/index.js +21 -11
  363. package/src/components/block-switcher/preview-block-popover.js +1 -1
  364. package/src/components/block-tools/insertion-point.js +10 -1
  365. package/src/components/block-tools/selected-block-popover.js +80 -34
  366. package/src/components/block-tools/style.scss +15 -0
  367. package/src/components/block-variation-picker/README.md +1 -1
  368. package/src/components/block-vertical-alignment-control/ui.js +1 -1
  369. package/src/components/border-radius-control/all-input-control.js +1 -0
  370. package/src/components/border-radius-control/index.js +1 -0
  371. package/src/components/border-radius-control/input-controls.js +1 -0
  372. package/src/components/border-radius-control/style.scss +15 -24
  373. package/src/components/color-palette/test/__snapshots__/control.js.snap +85 -83
  374. package/src/components/color-palette/test/control.js +1 -1
  375. package/src/components/colors/with-colors.js +13 -23
  376. package/src/components/default-block-appender/style.scss +1 -0
  377. package/src/components/duotone-control/index.js +1 -1
  378. package/src/components/font-sizes/fluid-utils.js +37 -64
  379. package/src/components/font-sizes/test/fluid-utils.js +5 -5
  380. package/src/components/font-sizes/with-font-sizes.js +15 -13
  381. package/src/components/iframe/index.js +1 -1
  382. package/src/components/image-editor/constants.js +1 -1
  383. package/src/components/index.js +1 -0
  384. package/src/components/inner-blocks/index.js +11 -4
  385. package/src/components/inner-blocks/test/index.js +4 -0
  386. package/src/components/inserter/hooks/use-insertion-point.js +3 -11
  387. package/src/components/inserter/reusable-blocks-tab.js +4 -2
  388. package/src/components/inserter/search-items.js +23 -3
  389. package/src/components/inserter/style.scss +8 -7
  390. package/src/components/inserter/test/reusable-blocks-tab.js +14 -57
  391. package/src/components/inserter/test/search-items.js +6 -0
  392. package/src/components/inserter-list-item/style.scss +2 -0
  393. package/src/components/letter-spacing-control/README.md +55 -0
  394. package/src/components/line-height-control/index.js +1 -0
  395. package/src/components/link-control/README.md +3 -3
  396. package/src/components/link-control/index.js +23 -39
  397. package/src/components/link-control/search-input.js +1 -1
  398. package/src/components/link-control/test/index.js +272 -241
  399. package/src/components/link-control/use-internal-input-value.js +22 -0
  400. package/src/components/list-view/block.js +4 -3
  401. package/src/components/list-view/branch.js +11 -6
  402. package/src/components/list-view/drop-indicator.js +1 -0
  403. package/src/components/list-view/style.scss +1 -36
  404. package/src/components/media-replace-flow/index.js +1 -1
  405. package/src/components/media-replace-flow/test/index.js +69 -51
  406. package/src/components/off-canvas-editor/README.md +5 -0
  407. package/src/components/off-canvas-editor/block-contents.js +89 -0
  408. package/src/components/off-canvas-editor/block-select-button.js +113 -0
  409. package/src/components/off-canvas-editor/block.js +335 -0
  410. package/src/components/off-canvas-editor/branch.js +210 -0
  411. package/src/components/off-canvas-editor/context.js +8 -0
  412. package/src/components/off-canvas-editor/drop-indicator.js +126 -0
  413. package/src/components/off-canvas-editor/expander.js +26 -0
  414. package/src/components/off-canvas-editor/index.js +216 -0
  415. package/src/components/off-canvas-editor/leaf.js +48 -0
  416. package/src/components/off-canvas-editor/style.scss +397 -0
  417. package/src/components/off-canvas-editor/test/utils.js +50 -0
  418. package/src/components/off-canvas-editor/use-block-selection.js +169 -0
  419. package/src/components/off-canvas-editor/use-list-view-client-ids.js +29 -0
  420. package/src/components/off-canvas-editor/use-list-view-drop-zone.js +260 -0
  421. package/src/components/off-canvas-editor/use-list-view-expand-selected-item.js +58 -0
  422. package/src/components/off-canvas-editor/utils.js +58 -0
  423. package/src/components/responsive-block-control/test/index.js +69 -92
  424. package/src/components/rich-text/format-toolbar/index.js +1 -1
  425. package/src/components/rich-text/format-toolbar-container.js +1 -1
  426. package/src/components/rich-text/use-paste-handler.js +1 -1
  427. package/src/components/spacing-sizes-control/all-input-control.js +4 -0
  428. package/src/components/spacing-sizes-control/axial-input-controls.js +4 -0
  429. package/src/components/spacing-sizes-control/index.js +4 -0
  430. package/src/components/spacing-sizes-control/input-controls.js +4 -0
  431. package/src/components/spacing-sizes-control/spacing-input-control.js +10 -1
  432. package/src/components/spacing-sizes-control/style.scss +1 -0
  433. package/src/components/url-input/index.js +1 -1
  434. package/src/components/url-popover/README.md +12 -3
  435. package/src/components/url-popover/index.js +33 -3
  436. package/src/components/use-setting/index.js +7 -1
  437. package/src/hooks/border.js +1 -0
  438. package/src/hooks/color-panel.js +13 -1
  439. package/src/hooks/color.js +2 -0
  440. package/src/hooks/content-lock-ui.js +46 -34
  441. package/src/hooks/dimensions.js +106 -19
  442. package/src/hooks/font-size.js +1 -0
  443. package/src/hooks/layout.js +8 -11
  444. package/src/hooks/margin.js +23 -17
  445. package/src/hooks/min-height.js +121 -0
  446. package/src/hooks/padding.js +23 -19
  447. package/src/hooks/style.js +10 -2
  448. package/src/hooks/test/align.js +96 -72
  449. package/src/hooks/test/style.js +4 -0
  450. package/src/hooks/test/use-typography-props.js +1 -1
  451. package/src/hooks/utils.js +5 -6
  452. package/src/layouts/constrained.js +0 -1
  453. package/src/layouts/flex.js +44 -39
  454. package/src/store/actions.js +26 -0
  455. package/src/store/array.js +1 -6
  456. package/src/store/reducer.js +50 -40
  457. package/src/store/selectors.js +43 -29
  458. package/src/store/test/actions.js +18 -0
  459. package/src/store/test/reducer.js +40 -0
  460. package/src/store/test/selectors.js +20 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "10.3.0",
3
+ "version": "10.5.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -33,32 +33,33 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
35
  "@react-spring/web": "^9.4.5",
36
- "@wordpress/a11y": "^3.20.0",
37
- "@wordpress/api-fetch": "^6.17.0",
38
- "@wordpress/blob": "^3.20.0",
39
- "@wordpress/blocks": "^11.19.0",
40
- "@wordpress/components": "^21.3.0",
41
- "@wordpress/compose": "^5.18.0",
42
- "@wordpress/data": "^7.4.0",
43
- "@wordpress/date": "^4.20.0",
44
- "@wordpress/deprecated": "^3.20.0",
45
- "@wordpress/dom": "^3.20.0",
46
- "@wordpress/element": "^4.18.0",
47
- "@wordpress/hooks": "^3.20.0",
48
- "@wordpress/html-entities": "^3.20.0",
49
- "@wordpress/i18n": "^4.20.0",
50
- "@wordpress/icons": "^9.11.0",
51
- "@wordpress/is-shallow-equal": "^4.20.0",
52
- "@wordpress/keyboard-shortcuts": "^3.18.0",
53
- "@wordpress/keycodes": "^3.20.0",
54
- "@wordpress/notices": "^3.20.0",
55
- "@wordpress/rich-text": "^5.18.0",
56
- "@wordpress/shortcode": "^3.20.0",
57
- "@wordpress/style-engine": "^1.3.0",
58
- "@wordpress/token-list": "^2.20.0",
59
- "@wordpress/url": "^3.21.0",
60
- "@wordpress/warning": "^2.20.0",
61
- "@wordpress/wordcount": "^3.20.0",
36
+ "@wordpress/a11y": "^3.22.0",
37
+ "@wordpress/api-fetch": "^6.19.0",
38
+ "@wordpress/blob": "^3.22.0",
39
+ "@wordpress/blocks": "^11.21.0",
40
+ "@wordpress/components": "^22.1.0",
41
+ "@wordpress/compose": "^5.20.0",
42
+ "@wordpress/data": "^7.6.0",
43
+ "@wordpress/date": "^4.22.0",
44
+ "@wordpress/deprecated": "^3.22.0",
45
+ "@wordpress/dom": "^3.22.0",
46
+ "@wordpress/element": "^4.20.0",
47
+ "@wordpress/hooks": "^3.22.0",
48
+ "@wordpress/html-entities": "^3.22.0",
49
+ "@wordpress/i18n": "^4.22.0",
50
+ "@wordpress/icons": "^9.13.0",
51
+ "@wordpress/is-shallow-equal": "^4.22.0",
52
+ "@wordpress/keyboard-shortcuts": "^3.20.0",
53
+ "@wordpress/keycodes": "^3.22.0",
54
+ "@wordpress/notices": "^3.22.0",
55
+ "@wordpress/rich-text": "^5.20.0",
56
+ "@wordpress/shortcode": "^3.22.0",
57
+ "@wordpress/style-engine": "^1.5.0",
58
+ "@wordpress/token-list": "^2.22.0",
59
+ "@wordpress/url": "^3.23.0",
60
+ "@wordpress/warning": "^2.22.0",
61
+ "@wordpress/wordcount": "^3.22.0",
62
+ "change-case": "^4.1.2",
62
63
  "classnames": "^2.3.1",
63
64
  "colord": "^2.7.0",
64
65
  "diff": "^4.0.2",
@@ -78,5 +79,5 @@
78
79
  "publishConfig": {
79
80
  "access": "public"
80
81
  },
81
- "gitHead": "a2ff0e6471c88436dad0287beb88d1729aa6f5dd"
82
+ "gitHead": "7ac04f446242452d3cb24372f9ca58f0cae97715"
82
83
  }
@@ -40,7 +40,7 @@ _Note:_ In this example that we render `AlignmentControl` as a child of the `Blo
40
40
 
41
41
  - **Type:** `String`
42
42
  - **Default:** `undefined`
43
- - **Options:**: `left`, `center`, `right`
43
+ - **Options:** `left`, `center`, `right`
44
44
 
45
45
  The current value of the alignment setting. You may only choose from the `Options` listed above.
46
46
 
@@ -30,7 +30,7 @@ const DEFAULT_ALIGNMENT_CONTROLS = [
30
30
 
31
31
  const POPOVER_PROPS = {
32
32
  position: 'bottom right',
33
- isAlternate: true,
33
+ variant: 'toolbar',
34
34
  };
35
35
 
36
36
  function AlignmentUI( {
@@ -41,5 +41,5 @@ export const BLOCK_ALIGNMENTS_CONTROLS = {
41
41
  export const DEFAULT_CONTROL = 'none';
42
42
 
43
43
  export const POPOVER_PROPS = {
44
- isAlternate: true,
44
+ variant: 'toolbar',
45
45
  };
@@ -13,9 +13,9 @@ it( 'should call onChange with undefined when the control is already active', ()
13
13
  const screen = render(
14
14
  <BlockAlignmentUI value="right" onChange={ onChangeMock } />
15
15
  );
16
- const alignButton = screen.getByA11yLabel( 'Align' );
16
+ const alignButton = screen.getByLabelText( 'Align' );
17
17
  fireEvent.press( alignButton );
18
- const rightAlignmentButton = screen.getByA11yLabel( 'Align right' );
18
+ const rightAlignmentButton = screen.getByLabelText( 'Align right' );
19
19
  fireEvent.press( rightAlignmentButton );
20
20
 
21
21
  expect( onChangeMock ).toHaveBeenCalledTimes( 1 );
@@ -27,9 +27,9 @@ it( 'should call onChange with alignment value when the control is inactive', ()
27
27
  const screen = render(
28
28
  <BlockAlignmentUI value="left" onChange={ onChangeMock } />
29
29
  );
30
- const alignButton = screen.getByA11yLabel( 'Align' );
30
+ const alignButton = screen.getByLabelText( 'Align' );
31
31
  fireEvent.press( alignButton );
32
- const centerAlignmentButton = screen.getByA11yLabel( 'Align center' );
32
+ const centerAlignmentButton = screen.getByLabelText( 'Align center' );
33
33
  fireEvent.press( centerAlignmentButton );
34
34
 
35
35
  expect( onChangeMock ).toHaveBeenCalledTimes( 1 );
@@ -24,7 +24,7 @@ function BlockAlignmentMatrixControl( props ) {
24
24
  return (
25
25
  <Dropdown
26
26
  position="bottom right"
27
- popoverProps={ { isAlternate: true } }
27
+ popoverProps={ { variant: 'toolbar' } }
28
28
  renderToggle={ ( { onToggle, isOpen } ) => {
29
29
  const openOnArrowDown = ( event ) => {
30
30
  if ( ! isOpen && event.keyCode === DOWN ) {
@@ -1,16 +1,18 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`BlockBreadcrumb should render correctly 1`] = `
4
- <ul
5
- aria-label="Block breadcrumb"
6
- class="block-editor-block-breadcrumb"
7
- role="list"
8
- >
9
- <li
10
- aria-current="true"
11
- class="block-editor-block-breadcrumb__current"
4
+ <div>
5
+ <ul
6
+ aria-label="Block breadcrumb"
7
+ class="block-editor-block-breadcrumb"
8
+ role="list"
12
9
  >
13
- Document
14
- </li>
15
- </ul>
10
+ <li
11
+ aria-current="true"
12
+ class="block-editor-block-breadcrumb__current"
13
+ >
14
+ Document
15
+ </li>
16
+ </ul>
17
+ </div>
16
18
  `;
@@ -12,7 +12,7 @@ describe( 'BlockBreadcrumb', () => {
12
12
  it( 'should render correctly', () => {
13
13
  const { container } = render( <BlockBreadcrumb /> );
14
14
 
15
- expect( container.firstChild ).toMatchSnapshot();
15
+ expect( container ).toMatchSnapshot();
16
16
  } );
17
17
 
18
18
  describe( 'Root label text', () => {
@@ -2,7 +2,6 @@
2
2
  * External dependencies
3
3
  */
4
4
  import classnames from 'classnames';
5
- import { castArray } from 'lodash';
6
5
  // diff doesn't tree-shake correctly, so we import from the individual
7
6
  // module here, to avoid including too much of the library
8
7
  import { diffChars } from 'diff/lib/diff/character';
@@ -44,7 +43,9 @@ function BlockCompare( {
44
43
 
45
44
  function getConvertedContent( convertedBlock ) {
46
45
  // The convertor may return an array of items or a single item.
47
- const newBlocks = castArray( convertedBlock );
46
+ const newBlocks = Array.isArray( convertedBlock )
47
+ ? convertedBlock
48
+ : [ convertedBlock ];
48
49
 
49
50
  // Get converted block details.
50
51
  const newContent = newBlocks.map( ( item ) =>
@@ -53,14 +53,14 @@ export const initializeWithBlocksLayouts = async ( blocks ) => {
53
53
  const initialHtml = blocks.map( ( block ) => block.html ).join( '\n' );
54
54
 
55
55
  const screen = await initializeEditor( { initialHtml } );
56
- const { getByA11yLabel } = screen;
56
+ const { getByLabelText } = screen;
57
57
 
58
58
  const waitPromises = [];
59
59
  blocks.forEach( ( block, index ) => {
60
60
  const a11yLabel = new RegExp(
61
61
  `${ block.name } Block\\. Row ${ index + 1 }`
62
62
  );
63
- const element = getByA11yLabel( a11yLabel );
63
+ const element = getByLabelText( a11yLabel );
64
64
  // "onLayout" event will populate the blocks layouts data.
65
65
  fireEvent( element, 'layout', {
66
66
  nativeEvent: { layout: block.layout },
@@ -92,7 +92,7 @@ export const initializeWithBlocksLayouts = async ( blocks ) => {
92
92
  `${ nestedBlock.name } Block\\. Row ${ nestedIndex + 1 }`
93
93
  );
94
94
  fireEvent(
95
- within( element ).getByA11yLabel( nestedA11yLabel ),
95
+ within( element ).getByLabelText( nestedA11yLabel ),
96
96
  'layout',
97
97
  {
98
98
  nativeEvent: { layout: nestedBlock.layout },
@@ -93,11 +93,11 @@ describe( 'BlockDraggable', () => {
93
93
  it( 'enables drag mode when unselected', async () =>
94
94
  withReanimatedTimer( async () => {
95
95
  const screen = await initializeWithBlocksLayouts( BLOCKS );
96
- const { getByA11yLabel } = screen;
96
+ const { getByLabelText } = screen;
97
97
 
98
98
  // Start dragging from block's content
99
99
  fireLongPress(
100
- getByA11yLabel( /Paragraph Block\. Row 1/ ),
100
+ getByLabelText( /Paragraph Block\. Row 1/ ),
101
101
  'draggable-trigger-content'
102
102
  );
103
103
  expect( getDraggableChip( screen ) ).toBeVisible();
@@ -112,12 +112,12 @@ describe( 'BlockDraggable', () => {
112
112
  it( 'enables drag mode when selected', async () =>
113
113
  withReanimatedTimer( async () => {
114
114
  const screen = await initializeWithBlocksLayouts( BLOCKS );
115
- const { getByA11yLabel } = screen;
115
+ const { getByLabelText } = screen;
116
116
  const blockDraggableWrapper = getByGestureTestId(
117
117
  'block-draggable-wrapper'
118
118
  );
119
119
 
120
- const paragraphBlock = getByA11yLabel(
120
+ const paragraphBlock = getByLabelText(
121
121
  /Paragraph Block\. Row 1/
122
122
  );
123
123
  fireEvent.press( paragraphBlock );
@@ -146,9 +146,9 @@ describe( 'BlockDraggable', () => {
146
146
  it( 'does not enable drag mode when selected and editing text', async () =>
147
147
  withReanimatedTimer( async () => {
148
148
  const screen = await initializeWithBlocksLayouts( BLOCKS );
149
- const { getByA11yLabel } = screen;
149
+ const { getByLabelText } = screen;
150
150
 
151
- const paragraphBlock = getByA11yLabel(
151
+ const paragraphBlock = getByLabelText(
152
152
  /Paragraph Block\. Row 1/
153
153
  );
154
154
 
@@ -178,13 +178,13 @@ describe( 'BlockDraggable', () => {
178
178
  it( 'finishes editing text and enables drag mode when long-pressing over a different block', async () =>
179
179
  withReanimatedTimer( async () => {
180
180
  const screen = await initializeWithBlocksLayouts( BLOCKS );
181
- const { getByA11yLabel } = screen;
181
+ const { getByLabelText } = screen;
182
182
 
183
- const paragraphBlock = getByA11yLabel(
183
+ const paragraphBlock = getByLabelText(
184
184
  /Paragraph Block\. Row 1/
185
185
  );
186
186
  const spacerBlock =
187
- getByA11yLabel( /Spacer Block\. Row 3/ );
187
+ getByLabelText( /Spacer Block\. Row 3/ );
188
188
 
189
189
  // Select Paragraph block and start editing text
190
190
  fireEvent.press( paragraphBlock );
@@ -208,12 +208,12 @@ describe( 'BlockDraggable', () => {
208
208
  it( 'enables drag mode when unselected', async () =>
209
209
  withReanimatedTimer( async () => {
210
210
  const screen = await initializeWithBlocksLayouts( BLOCKS );
211
- const { getAllByA11yLabel } = screen;
211
+ const { getAllByLabelText } = screen;
212
212
 
213
213
  // We select the first Image block as the Gallery block
214
214
  // also contains Image blocks.
215
215
  const imageBlock =
216
- getAllByA11yLabel( /Image Block\. Row 2/ )[ 0 ];
216
+ getAllByLabelText( /Image Block\. Row 2/ )[ 0 ];
217
217
  // Start dragging from block's content
218
218
  fireLongPress( imageBlock, 'draggable-trigger-content' );
219
219
  expect( getDraggableChip( screen ) ).toBeVisible();
@@ -228,7 +228,7 @@ describe( 'BlockDraggable', () => {
228
228
  it( 'enables drag mode when selected', async () =>
229
229
  withReanimatedTimer( async () => {
230
230
  const screen = await initializeWithBlocksLayouts( BLOCKS );
231
- const { getAllByA11yLabel } = screen;
231
+ const { getAllByLabelText } = screen;
232
232
  const blockDraggableWrapper = getByGestureTestId(
233
233
  'block-draggable-wrapper'
234
234
  );
@@ -236,7 +236,7 @@ describe( 'BlockDraggable', () => {
236
236
  // We select the first Image block as the Gallery block
237
237
  // also contains Image blocks.
238
238
  const imageBlock =
239
- getAllByA11yLabel( /Image Block\. Row 2/ )[ 0 ];
239
+ getAllByLabelText( /Image Block\. Row 2/ )[ 0 ];
240
240
  fireEvent.press( imageBlock );
241
241
 
242
242
  // Start dragging from block's content
@@ -262,12 +262,12 @@ describe( 'BlockDraggable', () => {
262
262
  it( 'enables drag mode when unselected', async () =>
263
263
  withReanimatedTimer( async () => {
264
264
  const screen = await initializeWithBlocksLayouts( BLOCKS );
265
- const { getByA11yLabel } = screen;
265
+ const { getByLabelText } = screen;
266
266
 
267
267
  // Start dragging from block's content, specifically the first
268
268
  // trigger index, which corresponds to the Gallery block content.
269
269
  fireLongPress(
270
- getByA11yLabel( /Gallery Block\. Row 4/ ),
270
+ getByLabelText( /Gallery Block\. Row 4/ ),
271
271
  'draggable-trigger-content',
272
272
  { triggerIndex: 0 }
273
273
  );
@@ -283,12 +283,12 @@ describe( 'BlockDraggable', () => {
283
283
  it( 'enables drag mode when selected', async () =>
284
284
  withReanimatedTimer( async () => {
285
285
  const screen = await initializeWithBlocksLayouts( BLOCKS );
286
- const { getByA11yLabel } = screen;
286
+ const { getByLabelText } = screen;
287
287
  const blockDraggableWrapper = getByGestureTestId(
288
288
  'block-draggable-wrapper'
289
289
  );
290
290
 
291
- const galleryBlock = getByA11yLabel(
291
+ const galleryBlock = getByLabelText(
292
292
  /Gallery Block\. Row 4/
293
293
  );
294
294
  await waitForStoreResolvers( () =>
@@ -319,16 +319,16 @@ describe( 'BlockDraggable', () => {
319
319
  it( 'enables drag mode when nested block is selected', async () =>
320
320
  withReanimatedTimer( async () => {
321
321
  const screen = await initializeWithBlocksLayouts( BLOCKS );
322
- const { getByA11yLabel } = screen;
322
+ const { getByLabelText } = screen;
323
323
  const blockDraggableWrapper = getByGestureTestId(
324
324
  'block-draggable-wrapper'
325
325
  );
326
326
 
327
- const galleryBlock = getByA11yLabel(
327
+ const galleryBlock = getByLabelText(
328
328
  /Gallery Block\. Row 4/
329
329
  );
330
330
  const galleryItem =
331
- within( galleryBlock ).getByA11yLabel(
331
+ within( galleryBlock ).getByLabelText(
332
332
  /Image Block\. Row 2/
333
333
  );
334
334
  fireEvent.press( galleryBlock );
@@ -361,11 +361,11 @@ describe( 'BlockDraggable', () => {
361
361
  it( 'enables drag mode when unselected', async () =>
362
362
  withReanimatedTimer( async () => {
363
363
  const screen = await initializeWithBlocksLayouts( BLOCKS );
364
- const { getByA11yLabel } = screen;
364
+ const { getByLabelText } = screen;
365
365
 
366
366
  // Start dragging from block's content
367
367
  fireLongPress(
368
- getByA11yLabel( /Spacer Block\. Row 3/ ),
368
+ getByLabelText( /Spacer Block\. Row 3/ ),
369
369
  'draggable-trigger-content'
370
370
  );
371
371
  expect( getDraggableChip( screen ) ).toBeVisible();
@@ -380,13 +380,13 @@ describe( 'BlockDraggable', () => {
380
380
  it( 'enables drag mode when selected', async () =>
381
381
  withReanimatedTimer( async () => {
382
382
  const screen = await initializeWithBlocksLayouts( BLOCKS );
383
- const { getByA11yLabel } = screen;
383
+ const { getByLabelText } = screen;
384
384
  const blockDraggableWrapper = getByGestureTestId(
385
385
  'block-draggable-wrapper'
386
386
  );
387
387
 
388
388
  const spacerBlock =
389
- getByA11yLabel( /Spacer Block\. Row 3/ );
389
+ getByLabelText( /Spacer Block\. Row 3/ );
390
390
  await waitForStoreResolvers( () =>
391
391
  fireEvent.press( spacerBlock )
392
392
  );
@@ -413,7 +413,7 @@ describe( 'BlockDraggable', () => {
413
413
 
414
414
  it( 'moves blocks', async () =>
415
415
  withReanimatedTimer( async () => {
416
- const { getByA11yLabel } = await initializeWithBlocksLayouts(
416
+ const { getByLabelText } = await initializeWithBlocksLayouts(
417
417
  BLOCKS
418
418
  );
419
419
  const blockDraggableWrapper = getByGestureTestId(
@@ -424,7 +424,7 @@ describe( 'BlockDraggable', () => {
424
424
 
425
425
  // Move Paragraph block from first to second position
426
426
  fireLongPress(
427
- getByA11yLabel( /Paragraph Block\. Row 1/ ),
427
+ getByLabelText( /Paragraph Block\. Row 1/ ),
428
428
  'draggable-trigger-content'
429
429
  );
430
430
  firePanGesture( blockDraggableWrapper, [
@@ -454,7 +454,7 @@ describe( 'BlockDraggable', () => {
454
454
 
455
455
  // Move Spacer block from third to first position
456
456
  fireLongPress(
457
- getByA11yLabel( /Spacer Block\. Row 3/ ),
457
+ getByLabelText( /Spacer Block\. Row 3/ ),
458
458
  'draggable-trigger-content'
459
459
  );
460
460
  firePanGesture( blockDraggableWrapper, [
@@ -20,11 +20,12 @@ import { BlockEditContextProvider, useBlockEditContext } from './context';
20
20
  export { useBlockEditContext };
21
21
 
22
22
  export default function BlockEdit( props ) {
23
- const { name, isSelected, clientId } = props;
23
+ const { name, isSelected, clientId, __unstableLayoutClassNames } = props;
24
24
  const context = {
25
25
  name,
26
26
  isSelected,
27
27
  clientId,
28
+ __unstableLayoutClassNames,
28
29
  };
29
30
  return (
30
31
  <BlockEditContextProvider
@@ -84,6 +84,7 @@ function BlockListBlock( {
84
84
  isSelected,
85
85
  isSelectionEnabled,
86
86
  className,
87
+ __unstableLayoutClassNames: layoutClassNames,
87
88
  name,
88
89
  isValid,
89
90
  attributes,
@@ -146,6 +147,7 @@ function BlockListBlock( {
146
147
  clientId={ clientId }
147
148
  isSelectionEnabled={ isSelectionEnabled }
148
149
  toggleSelection={ toggleSelection }
150
+ __unstableLayoutClassNames={ layoutClassNames }
149
151
  />
150
152
  );
151
153
 
@@ -174,7 +174,7 @@
174
174
  // With `position: static`, Safari marks a full-width selection rectangle, including margins.
175
175
  // With `position: relative`, Safari marks an inline selection rectangle, similar to that of
176
176
  // Blink based browsers, but it also does "crop" the marker, which can result in a small line
177
- // from the preceeding paragraph showing, which is effectively the above selection bleeding in.
177
+ // from the preceding paragraph showing, which is effectively the above selection bleeding in.
178
178
  // We choose relative, as that matches the multi-selection, which is limited to the block footprint.
179
179
  position: relative;
180
180
 
@@ -290,11 +290,16 @@
290
290
  cursor: unset;
291
291
  }
292
292
 
293
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); // Selected not focussed.
294
- border-radius: $radius-block-ui;
295
-
296
- &:focus {
297
- box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
293
+ &::after {
294
+ content: "";
295
+ position: absolute;
296
+ pointer-events: none;
297
+ top: $border-width;
298
+ left: $border-width;
299
+ right: $border-width;
300
+ bottom: $border-width;
301
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
302
+ border-radius: $radius-block-ui;
298
303
  }
299
304
  }
300
305
  }
@@ -4,7 +4,7 @@
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import { useReducer } from '@wordpress/element';
6
6
  import { MenuItem } from '@wordpress/components';
7
- import { lock, unlock } from '@wordpress/icons';
7
+ import { lockOutline, unlock } from '@wordpress/icons';
8
8
 
9
9
  /**
10
10
  * Internal dependencies
@@ -28,7 +28,10 @@ export default function BlockLockMenuItem( { clientId } ) {
28
28
 
29
29
  return (
30
30
  <>
31
- <MenuItem icon={ isLocked ? unlock : lock } onClick={ toggleModal }>
31
+ <MenuItem
32
+ icon={ isLocked ? unlock : lockOutline }
33
+ onClick={ toggleModal }
34
+ >
32
35
  { label }
33
36
  </MenuItem>
34
37
  { isModalOpen && (
@@ -114,6 +114,7 @@ export default function BlockLockModal( { clientId, onClose } ) {
114
114
  className="block-editor-block-lock-modal__options"
115
115
  >
116
116
  <CheckboxControl
117
+ __nextHasNoMarginBottom
117
118
  className="block-editor-block-lock-modal__options-title"
118
119
  label={
119
120
  <span id={ instanceId }>{ __( 'Lock all' ) }</span>
@@ -134,18 +135,8 @@ export default function BlockLockModal( { clientId, onClose } ) {
134
135
  { allowsEditLocking && (
135
136
  <li className="block-editor-block-lock-modal__checklist-item">
136
137
  <CheckboxControl
137
- label={
138
- <>
139
- { __( 'Restrict editing' ) }
140
- <Icon
141
- icon={
142
- lock.edit
143
- ? lockIcon
144
- : unlockIcon
145
- }
146
- />
147
- </>
148
- }
138
+ __nextHasNoMarginBottom
139
+ label={ __( 'Restrict editing' ) }
149
140
  checked={ !! lock.edit }
150
141
  onChange={ ( edit ) =>
151
142
  setLock( ( prevLock ) => ( {
@@ -154,22 +145,16 @@ export default function BlockLockModal( { clientId, onClose } ) {
154
145
  } ) )
155
146
  }
156
147
  />
148
+ <Icon
149
+ className="block-editor-block-lock-modal__lock-icon"
150
+ icon={ lock.edit ? lockIcon : unlockIcon }
151
+ />
157
152
  </li>
158
153
  ) }
159
154
  <li className="block-editor-block-lock-modal__checklist-item">
160
155
  <CheckboxControl
161
- label={
162
- <>
163
- { __( 'Disable movement' ) }
164
- <Icon
165
- icon={
166
- lock.move
167
- ? lockIcon
168
- : unlockIcon
169
- }
170
- />
171
- </>
172
- }
156
+ __nextHasNoMarginBottom
157
+ label={ __( 'Disable movement' ) }
173
158
  checked={ lock.move }
174
159
  onChange={ ( move ) =>
175
160
  setLock( ( prevLock ) => ( {
@@ -178,21 +163,15 @@ export default function BlockLockModal( { clientId, onClose } ) {
178
163
  } ) )
179
164
  }
180
165
  />
166
+ <Icon
167
+ className="block-editor-block-lock-modal__lock-icon"
168
+ icon={ lock.move ? lockIcon : unlockIcon }
169
+ />
181
170
  </li>
182
171
  <li className="block-editor-block-lock-modal__checklist-item">
183
172
  <CheckboxControl
184
- label={
185
- <>
186
- { __( 'Prevent removal' ) }
187
- <Icon
188
- icon={
189
- lock.remove
190
- ? lockIcon
191
- : unlockIcon
192
- }
193
- />
194
- </>
195
- }
173
+ __nextHasNoMarginBottom
174
+ label={ __( 'Prevent removal' ) }
196
175
  checked={ lock.remove }
197
176
  onChange={ ( remove ) =>
198
177
  setLock( ( prevLock ) => ( {
@@ -201,6 +180,10 @@ export default function BlockLockModal( { clientId, onClose } ) {
201
180
  } ) )
202
181
  }
203
182
  />
183
+ <Icon
184
+ className="block-editor-block-lock-modal__lock-icon"
185
+ icon={ lock.remove ? lockIcon : unlockIcon }
186
+ />
204
187
  </li>
205
188
  </ul>
206
189
  { hasTemplateLock && (
@@ -22,29 +22,20 @@
22
22
  .components-base-control__field {
23
23
  align-items: center;
24
24
  display: flex;
25
- margin: 0;
26
25
  }
27
26
  }
28
27
  .block-editor-block-lock-modal__checklist-item {
28
+ display: flex;
29
+ justify-content: space-between;
30
+ align-items: center;
31
+ gap: $grid-unit-15;
29
32
  margin-bottom: 0;
30
33
  padding: $grid-unit-15 0 $grid-unit-15 $grid-unit-40;
31
34
 
32
- .components-base-control__field {
33
- align-items: center;
34
- display: flex;
35
- margin: 0;
36
- }
37
-
38
- .components-checkbox-control__label {
39
- display: flex;
40
- align-items: center;
41
- justify-content: space-between;
42
- flex-grow: 1;
43
-
44
- svg {
45
- margin-right: $grid-unit-15;
46
- fill: $gray-900;
47
- }
35
+ .block-editor-block-lock-modal__lock-icon {
36
+ flex-shrink: 0;
37
+ margin-right: $grid-unit-15;
38
+ fill: $gray-900;
48
39
  }
49
40
 
50
41
  &:hover {
@@ -70,7 +70,7 @@ function BlockMoverStory() {
70
70
  </Toolbar>
71
71
 
72
72
  <p style={ { marginTop: 36 } }>
73
- But it can also accomodate horizontal blocks.
73
+ But it can also accommodate horizontal blocks.
74
74
  </p>
75
75
  <Toolbar label="Block Mover">
76
76
  <BlockMover