@wordpress/block-library 9.6.1 → 9.7.1-next.1f6eadc42.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 (427) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/archives/edit.js +1 -1
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/audio/edit.js +2 -1
  5. package/build/audio/edit.js.map +1 -1
  6. package/build/block/edit.js +5 -8
  7. package/build/block/edit.js.map +1 -1
  8. package/build/button/edit.js +1 -1
  9. package/build/button/edit.js.map +1 -1
  10. package/build/buttons/index.js +1 -1
  11. package/build/categories/index.js +1 -0
  12. package/build/categories/index.js.map +1 -1
  13. package/build/comment-edit-link/index.js +13 -2
  14. package/build/comment-edit-link/index.js.map +1 -1
  15. package/build/comment-reply-link/index.js +13 -2
  16. package/build/comment-reply-link/index.js.map +1 -1
  17. package/build/comments/edit/comments-legacy.js +1 -0
  18. package/build/comments/edit/comments-legacy.js.map +1 -1
  19. package/build/cover/deprecated.js +1 -1
  20. package/build/cover/deprecated.js.map +1 -1
  21. package/build/cover/edit/block-controls.js +4 -2
  22. package/build/cover/edit/block-controls.js.map +1 -1
  23. package/build/cover/edit/index.js +6 -3
  24. package/build/cover/edit/index.js.map +1 -1
  25. package/build/cover/edit/inspector-controls.js +4 -12
  26. package/build/cover/edit/inspector-controls.js.map +1 -1
  27. package/build/details/index.js +3 -1
  28. package/build/details/index.js.map +1 -1
  29. package/build/details/transforms.js +24 -0
  30. package/build/details/transforms.js.map +1 -0
  31. package/build/embed/edit.js +5 -11
  32. package/build/embed/edit.js.map +1 -1
  33. package/build/embed/embed-placeholder.js +2 -0
  34. package/build/embed/embed-placeholder.js.map +1 -1
  35. package/build/embed/embed-preview.js +16 -4
  36. package/build/embed/embed-preview.js.map +1 -1
  37. package/build/file/edit.js +12 -1
  38. package/build/file/edit.js.map +1 -1
  39. package/build/file/transforms.js +18 -4
  40. package/build/file/transforms.js.map +1 -1
  41. package/build/form-input/deprecated.js +113 -1
  42. package/build/form-input/deprecated.js.map +1 -1
  43. package/build/form-input/edit.js +16 -12
  44. package/build/form-input/edit.js.map +1 -1
  45. package/build/form-input/save.js +9 -1
  46. package/build/form-input/save.js.map +1 -1
  47. package/build/freeform/edit.js +4 -4
  48. package/build/freeform/edit.js.map +1 -1
  49. package/build/freeform/modal.js +3 -0
  50. package/build/freeform/modal.js.map +1 -1
  51. package/build/home-link/edit.js +3 -9
  52. package/build/home-link/edit.js.map +1 -1
  53. package/build/image/edit.js +95 -45
  54. package/build/image/edit.js.map +1 -1
  55. package/build/image/image.js +39 -24
  56. package/build/image/image.js.map +1 -1
  57. package/build/image/transforms.js +0 -13
  58. package/build/image/transforms.js.map +1 -1
  59. package/build/image/use-max-width-observer.js +35 -0
  60. package/build/image/use-max-width-observer.js.map +1 -0
  61. package/build/image/utils.js +11 -0
  62. package/build/image/utils.js.map +1 -1
  63. package/build/latest-posts/edit.js +1 -1
  64. package/build/latest-posts/edit.js.map +1 -1
  65. package/build/media-text/deprecated.js +144 -3
  66. package/build/media-text/deprecated.js.map +1 -1
  67. package/build/media-text/edit.js +5 -5
  68. package/build/media-text/edit.js.map +1 -1
  69. package/build/media-text/image-fill.js +12 -0
  70. package/build/media-text/image-fill.js.map +1 -0
  71. package/build/media-text/media-container.js +21 -18
  72. package/build/media-text/media-container.js.map +1 -1
  73. package/build/media-text/media-container.native.js +0 -7
  74. package/build/media-text/media-container.native.js.map +1 -1
  75. package/build/media-text/save.js +5 -6
  76. package/build/media-text/save.js.map +1 -1
  77. package/build/missing/edit.js +3 -2
  78. package/build/missing/edit.js.map +1 -1
  79. package/build/navigation/edit/deleted-navigation-warning.js +14 -7
  80. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  81. package/build/navigation/edit/index.js +1 -0
  82. package/build/navigation/edit/index.js.map +1 -1
  83. package/build/navigation/edit/menu-inspector-controls.js +2 -1
  84. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  85. package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
  86. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  87. package/build/navigation/edit/placeholder/index.js +1 -0
  88. package/build/navigation/edit/placeholder/index.js.map +1 -1
  89. package/build/navigation/edit/responsive-wrapper.js +2 -0
  90. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  91. package/build/navigation/edit/unsaved-inner-blocks.js +4 -4
  92. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  93. package/build/navigation-link/link-ui.js +2 -1
  94. package/build/navigation-link/link-ui.js.map +1 -1
  95. package/build/page-list/convert-to-links-modal.js +2 -0
  96. package/build/page-list/convert-to-links-modal.js.map +1 -1
  97. package/build/page-list/edit.js +4 -1
  98. package/build/page-list/edit.js.map +1 -1
  99. package/build/post-comments-form/form.js +1 -0
  100. package/build/post-comments-form/form.js.map +1 -1
  101. package/build/post-featured-image/dimension-controls.js +6 -8
  102. package/build/post-featured-image/dimension-controls.js.map +1 -1
  103. package/build/post-featured-image/edit.js +2 -4
  104. package/build/post-featured-image/edit.js.map +1 -1
  105. package/build/post-title/index.js +4 -1
  106. package/build/post-title/index.js.map +1 -1
  107. package/build/query/edit/enhanced-pagination-modal.js +3 -2
  108. package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
  109. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
  110. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  111. package/build/query/edit/inspector-controls/index.js +2 -10
  112. package/build/query/edit/inspector-controls/index.js.map +1 -1
  113. package/build/query/edit/query-content.js +9 -3
  114. package/build/query/edit/query-content.js.map +1 -1
  115. package/build/query/edit/query-placeholder.js +2 -0
  116. package/build/query/edit/query-placeholder.js.map +1 -1
  117. package/build/site-logo/edit.js +9 -13
  118. package/build/site-logo/edit.js.map +1 -1
  119. package/build/site-title/index.js +4 -1
  120. package/build/site-title/index.js.map +1 -1
  121. package/build/social-link/edit.js +4 -1
  122. package/build/social-link/edit.js.map +1 -1
  123. package/build/social-links/edit.js +10 -9
  124. package/build/social-links/edit.js.map +1 -1
  125. package/build/template-part/edit/advanced-controls.js.map +1 -1
  126. package/build/template-part/edit/index.js +1 -1
  127. package/build/template-part/edit/index.js.map +1 -1
  128. package/build/template-part/edit/inner-blocks.js +10 -1
  129. package/build/template-part/edit/inner-blocks.js.map +1 -1
  130. package/build/template-part/edit/placeholder.js +2 -0
  131. package/build/template-part/edit/placeholder.js.map +1 -1
  132. package/build/utils/hooks.js +10 -10
  133. package/build/utils/hooks.js.map +1 -1
  134. package/build/video/edit.js +16 -12
  135. package/build/video/edit.js.map +1 -1
  136. package/build/video/tracks-editor.js +3 -0
  137. package/build/video/tracks-editor.js.map +1 -1
  138. package/build-module/archives/edit.js +1 -1
  139. package/build-module/archives/edit.js.map +1 -1
  140. package/build-module/audio/edit.js +2 -1
  141. package/build-module/audio/edit.js.map +1 -1
  142. package/build-module/block/edit.js +6 -9
  143. package/build-module/block/edit.js.map +1 -1
  144. package/build-module/button/edit.js +1 -1
  145. package/build-module/button/edit.js.map +1 -1
  146. package/build-module/buttons/index.js +1 -1
  147. package/build-module/categories/index.js +1 -0
  148. package/build-module/categories/index.js.map +1 -1
  149. package/build-module/comment-edit-link/index.js +13 -2
  150. package/build-module/comment-edit-link/index.js.map +1 -1
  151. package/build-module/comment-reply-link/index.js +13 -2
  152. package/build-module/comment-reply-link/index.js.map +1 -1
  153. package/build-module/comments/edit/comments-legacy.js +1 -0
  154. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  155. package/build-module/cover/deprecated.js +1 -1
  156. package/build-module/cover/deprecated.js.map +1 -1
  157. package/build-module/cover/edit/block-controls.js +4 -2
  158. package/build-module/cover/edit/block-controls.js.map +1 -1
  159. package/build-module/cover/edit/index.js +6 -3
  160. package/build-module/cover/edit/index.js.map +1 -1
  161. package/build-module/cover/edit/inspector-controls.js +5 -13
  162. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  163. package/build-module/details/index.js +3 -1
  164. package/build-module/details/index.js.map +1 -1
  165. package/build-module/details/transforms.js +18 -0
  166. package/build-module/details/transforms.js.map +1 -0
  167. package/build-module/embed/edit.js +6 -12
  168. package/build-module/embed/edit.js.map +1 -1
  169. package/build-module/embed/embed-placeholder.js +2 -0
  170. package/build-module/embed/embed-placeholder.js.map +1 -1
  171. package/build-module/embed/embed-preview.js +16 -4
  172. package/build-module/embed/embed-preview.js.map +1 -1
  173. package/build-module/file/edit.js +12 -1
  174. package/build-module/file/edit.js.map +1 -1
  175. package/build-module/file/transforms.js +18 -4
  176. package/build-module/file/transforms.js.map +1 -1
  177. package/build-module/form-input/deprecated.js +114 -2
  178. package/build-module/form-input/deprecated.js.map +1 -1
  179. package/build-module/form-input/edit.js +16 -12
  180. package/build-module/form-input/edit.js.map +1 -1
  181. package/build-module/form-input/save.js +9 -1
  182. package/build-module/form-input/save.js.map +1 -1
  183. package/build-module/freeform/edit.js +4 -4
  184. package/build-module/freeform/edit.js.map +1 -1
  185. package/build-module/freeform/modal.js +3 -0
  186. package/build-module/freeform/modal.js.map +1 -1
  187. package/build-module/home-link/edit.js +3 -9
  188. package/build-module/home-link/edit.js.map +1 -1
  189. package/build-module/image/edit.js +99 -48
  190. package/build-module/image/edit.js.map +1 -1
  191. package/build-module/image/image.js +40 -25
  192. package/build-module/image/image.js.map +1 -1
  193. package/build-module/image/transforms.js +0 -13
  194. package/build-module/image/transforms.js.map +1 -1
  195. package/build-module/image/use-max-width-observer.js +29 -0
  196. package/build-module/image/use-max-width-observer.js.map +1 -0
  197. package/build-module/image/utils.js +11 -1
  198. package/build-module/image/utils.js.map +1 -1
  199. package/build-module/latest-posts/edit.js +1 -1
  200. package/build-module/latest-posts/edit.js.map +1 -1
  201. package/build-module/media-text/deprecated.js +144 -3
  202. package/build-module/media-text/deprecated.js.map +1 -1
  203. package/build-module/media-text/edit.js +5 -5
  204. package/build-module/media-text/edit.js.map +1 -1
  205. package/build-module/media-text/image-fill.js +6 -0
  206. package/build-module/media-text/image-fill.js.map +1 -0
  207. package/build-module/media-text/media-container.js +21 -17
  208. package/build-module/media-text/media-container.js.map +1 -1
  209. package/build-module/media-text/media-container.native.js +0 -1
  210. package/build-module/media-text/media-container.native.js.map +1 -1
  211. package/build-module/media-text/save.js +5 -6
  212. package/build-module/media-text/save.js.map +1 -1
  213. package/build-module/missing/edit.js +3 -2
  214. package/build-module/missing/edit.js.map +1 -1
  215. package/build-module/navigation/edit/deleted-navigation-warning.js +15 -8
  216. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  217. package/build-module/navigation/edit/index.js +1 -0
  218. package/build-module/navigation/edit/index.js.map +1 -1
  219. package/build-module/navigation/edit/menu-inspector-controls.js +2 -1
  220. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  221. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
  222. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  223. package/build-module/navigation/edit/placeholder/index.js +1 -0
  224. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  225. package/build-module/navigation/edit/responsive-wrapper.js +2 -0
  226. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  227. package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -4
  228. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  229. package/build-module/navigation-link/link-ui.js +4 -3
  230. package/build-module/navigation-link/link-ui.js.map +1 -1
  231. package/build-module/page-list/convert-to-links-modal.js +2 -0
  232. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  233. package/build-module/page-list/edit.js +4 -1
  234. package/build-module/page-list/edit.js.map +1 -1
  235. package/build-module/post-comments-form/form.js +1 -0
  236. package/build-module/post-comments-form/form.js.map +1 -1
  237. package/build-module/post-featured-image/dimension-controls.js +6 -8
  238. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  239. package/build-module/post-featured-image/edit.js +3 -5
  240. package/build-module/post-featured-image/edit.js.map +1 -1
  241. package/build-module/post-title/index.js +4 -1
  242. package/build-module/post-title/index.js.map +1 -1
  243. package/build-module/query/edit/enhanced-pagination-modal.js +3 -2
  244. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
  245. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
  246. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  247. package/build-module/query/edit/inspector-controls/index.js +2 -10
  248. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  249. package/build-module/query/edit/query-content.js +10 -4
  250. package/build-module/query/edit/query-content.js.map +1 -1
  251. package/build-module/query/edit/query-placeholder.js +2 -0
  252. package/build-module/query/edit/query-placeholder.js.map +1 -1
  253. package/build-module/site-logo/edit.js +10 -14
  254. package/build-module/site-logo/edit.js.map +1 -1
  255. package/build-module/site-title/index.js +4 -1
  256. package/build-module/site-title/index.js.map +1 -1
  257. package/build-module/social-link/edit.js +4 -1
  258. package/build-module/social-link/edit.js.map +1 -1
  259. package/build-module/social-links/edit.js +11 -10
  260. package/build-module/social-links/edit.js.map +1 -1
  261. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  262. package/build-module/template-part/edit/index.js +1 -1
  263. package/build-module/template-part/edit/index.js.map +1 -1
  264. package/build-module/template-part/edit/inner-blocks.js +10 -1
  265. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  266. package/build-module/template-part/edit/placeholder.js +2 -0
  267. package/build-module/template-part/edit/placeholder.js.map +1 -1
  268. package/build-module/utils/hooks.js +10 -10
  269. package/build-module/utils/hooks.js.map +1 -1
  270. package/build-module/video/edit.js +16 -13
  271. package/build-module/video/edit.js.map +1 -1
  272. package/build-module/video/tracks-editor.js +3 -0
  273. package/build-module/video/tracks-editor.js.map +1 -1
  274. package/build-style/button/editor-rtl.css +0 -4
  275. package/build-style/button/editor.css +0 -4
  276. package/build-style/buttons/editor-rtl.css +2 -5
  277. package/build-style/buttons/editor.css +2 -5
  278. package/build-style/buttons/style-rtl.css +2 -2
  279. package/build-style/buttons/style.css +2 -2
  280. package/build-style/comment-edit-link/style-rtl.css +94 -0
  281. package/build-style/comment-edit-link/style.css +94 -0
  282. package/build-style/comment-reply-link/style-rtl.css +94 -0
  283. package/build-style/comment-reply-link/style.css +94 -0
  284. package/build-style/comments-pagination/editor-rtl.css +2 -2
  285. package/build-style/comments-pagination/editor.css +2 -2
  286. package/build-style/common-rtl.css +2 -2
  287. package/build-style/common.css +2 -2
  288. package/build-style/cover/editor-rtl.css +0 -6
  289. package/build-style/cover/editor.css +0 -6
  290. package/build-style/editor-rtl.css +35 -99
  291. package/build-style/editor.css +35 -101
  292. package/build-style/form-input/style-rtl.css +7 -8
  293. package/build-style/form-input/style.css +7 -8
  294. package/build-style/group/editor-rtl.css +0 -1
  295. package/build-style/group/editor.css +0 -1
  296. package/build-style/image/editor-rtl.css +6 -27
  297. package/build-style/image/editor.css +6 -27
  298. package/build-style/media-text/editor-rtl.css +3 -1
  299. package/build-style/media-text/editor.css +3 -1
  300. package/build-style/media-text/style-rtl.css +20 -0
  301. package/build-style/media-text/style.css +20 -0
  302. package/build-style/navigation/editor-rtl.css +1 -2
  303. package/build-style/navigation/editor.css +1 -2
  304. package/build-style/post-featured-image/style-rtl.css +1 -1
  305. package/build-style/post-featured-image/style.css +1 -1
  306. package/build-style/post-title/style-rtl.css +21 -0
  307. package/build-style/post-title/style.css +21 -0
  308. package/build-style/query-pagination/editor-rtl.css +2 -16
  309. package/build-style/query-pagination/editor.css +2 -18
  310. package/build-style/query-pagination/style-rtl.css +0 -11
  311. package/build-style/query-pagination/style.css +0 -13
  312. package/build-style/site-title/editor-rtl.css +0 -4
  313. package/build-style/site-title/editor.css +0 -4
  314. package/build-style/site-title/style-rtl.css +21 -0
  315. package/build-style/site-title/style.css +21 -0
  316. package/build-style/social-links/editor-rtl.css +17 -0
  317. package/build-style/social-links/editor.css +17 -0
  318. package/build-style/style-rtl.css +82 -24
  319. package/build-style/style.css +82 -26
  320. package/build-style/video/editor-rtl.css +0 -29
  321. package/build-style/video/editor.css +0 -29
  322. package/package.json +42 -35
  323. package/src/archives/edit.js +1 -1
  324. package/src/audio/edit.js +1 -0
  325. package/src/block/edit.js +9 -11
  326. package/src/button/edit.js +1 -1
  327. package/src/button/editor.scss +0 -5
  328. package/src/buttons/block.json +1 -1
  329. package/src/buttons/editor.scss +2 -8
  330. package/src/buttons/style.scss +2 -2
  331. package/src/categories/block.json +1 -0
  332. package/src/categories/index.php +13 -2
  333. package/src/comment-edit-link/block.json +13 -2
  334. package/src/comment-edit-link/style.scss +4 -0
  335. package/src/comment-reply-link/block.json +13 -2
  336. package/src/comment-reply-link/style.scss +4 -0
  337. package/src/comments/edit/comments-legacy.js +1 -0
  338. package/src/comments-pagination/editor.scss +1 -1
  339. package/src/cover/deprecated.js +3 -2
  340. package/src/cover/edit/block-controls.js +2 -0
  341. package/src/cover/edit/index.js +6 -1
  342. package/src/cover/edit/inspector-controls.js +3 -15
  343. package/src/cover/editor.scss +0 -5
  344. package/src/cover/test/edit.js +30 -26
  345. package/src/details/index.js +2 -0
  346. package/src/details/transforms.js +26 -0
  347. package/src/embed/edit.js +0 -7
  348. package/src/embed/embed-placeholder.js +10 -2
  349. package/src/embed/embed-preview.js +22 -2
  350. package/src/file/edit.js +11 -0
  351. package/src/file/index.php +1 -1
  352. package/src/file/transforms.js +26 -6
  353. package/src/form-input/deprecated.js +114 -1
  354. package/src/form-input/edit.js +17 -11
  355. package/src/form-input/save.js +13 -3
  356. package/src/form-input/style.scss +9 -8
  357. package/src/freeform/edit.js +4 -4
  358. package/src/freeform/editor.scss +1 -1
  359. package/src/freeform/modal.js +7 -1
  360. package/src/gallery/editor.scss +1 -1
  361. package/src/group/editor.scss +0 -1
  362. package/src/home-link/edit.js +4 -7
  363. package/src/image/edit.js +130 -47
  364. package/src/image/editor.scss +7 -41
  365. package/src/image/image.js +100 -67
  366. package/src/image/index.php +1 -1
  367. package/src/image/transforms.js +0 -23
  368. package/src/image/use-max-width-observer.js +32 -0
  369. package/src/image/utils.js +13 -1
  370. package/src/latest-posts/edit.js +1 -1
  371. package/src/media-text/deprecated.js +159 -3
  372. package/src/media-text/edit.js +5 -5
  373. package/src/media-text/editor.scss +3 -1
  374. package/src/media-text/image-fill.js +11 -0
  375. package/src/media-text/index.php +53 -43
  376. package/src/media-text/media-container.js +25 -25
  377. package/src/media-text/media-container.native.js +0 -2
  378. package/src/media-text/save.js +9 -13
  379. package/src/media-text/style.scss +21 -0
  380. package/src/media-text/test/image-fill.js +19 -0
  381. package/src/missing/edit.js +8 -3
  382. package/src/navigation/edit/deleted-navigation-warning.js +23 -13
  383. package/src/navigation/edit/index.js +1 -0
  384. package/src/navigation/edit/menu-inspector-controls.js +3 -1
  385. package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
  386. package/src/navigation/edit/placeholder/index.js +1 -0
  387. package/src/navigation/edit/responsive-wrapper.js +2 -0
  388. package/src/navigation/edit/unsaved-inner-blocks.js +4 -4
  389. package/src/navigation/editor.scss +11 -4
  390. package/src/navigation/index.php +1 -1
  391. package/src/navigation-link/link-ui.js +4 -3
  392. package/src/page-list/convert-to-links-modal.js +6 -1
  393. package/src/page-list/edit.js +6 -1
  394. package/src/page-list/index.php +3 -1
  395. package/src/post-comments-form/form.js +1 -0
  396. package/src/post-featured-image/dimension-controls.js +4 -4
  397. package/src/post-featured-image/edit.js +3 -6
  398. package/src/post-featured-image/style.scss +1 -1
  399. package/src/post-title/block.json +4 -1
  400. package/src/post-title/style.scss +24 -0
  401. package/src/query/edit/enhanced-pagination-modal.js +7 -3
  402. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
  403. package/src/query/edit/inspector-controls/index.js +2 -9
  404. package/src/query/edit/query-content.js +7 -0
  405. package/src/query/edit/query-placeholder.js +2 -0
  406. package/src/query/index.php +1 -1
  407. package/src/query-pagination/editor.scss +1 -21
  408. package/src/query-pagination/style.scss +0 -15
  409. package/src/search/index.php +1 -1
  410. package/src/site-logo/edit.js +11 -20
  411. package/src/site-title/block.json +4 -1
  412. package/src/site-title/editor.scss +0 -4
  413. package/src/site-title/style.scss +24 -0
  414. package/src/social-link/edit.js +2 -0
  415. package/src/social-links/edit.js +17 -10
  416. package/src/social-links/editor.scss +24 -5
  417. package/src/style.scss +2 -0
  418. package/src/tag-cloud/index.php +7 -2
  419. package/src/template-part/edit/advanced-controls.js +0 -1
  420. package/src/template-part/edit/index.js +12 -10
  421. package/src/template-part/edit/inner-blocks.js +20 -1
  422. package/src/template-part/edit/placeholder.js +6 -1
  423. package/src/utils/hooks.js +11 -11
  424. package/src/video/edit.js +24 -21
  425. package/src/video/editor.scss +0 -45
  426. package/src/video/tracks-editor.js +3 -0
  427. package/src/media-text/test/media-container.js +0 -24
@@ -29,15 +29,32 @@ function render_block_core_media_text( $attributes, $content ) {
29
29
  return $content;
30
30
  }
31
31
 
32
+ $has_media_on_right = isset( $attributes['mediaPosition'] ) && 'right' === $attributes['mediaPosition'];
33
+ $image_fill = isset( $attributes['imageFill'] ) && $attributes['imageFill'];
34
+ $focal_point = isset( $attributes['focalPoint'] ) ? round( $attributes['focalPoint']['x'] * 100 ) . '% ' . round( $attributes['focalPoint']['y'] * 100 ) . '%' : '50% 50%';
35
+ $unique_id = 'wp-block-media-text__media-' . wp_unique_id();
36
+
37
+ $block_tag_processor = new WP_HTML_Tag_Processor( $content );
38
+ $block_query = array(
39
+ 'tag_name' => 'div',
40
+ 'class_name' => 'wp-block-media-text',
41
+ );
42
+
43
+ while ( $block_tag_processor->next_tag( $block_query ) ) {
44
+ if ( $image_fill ) {
45
+ // The markup below does not work with the deprecated `is-image-fill` class.
46
+ $block_tag_processor->remove_class( 'is-image-fill' );
47
+ $block_tag_processor->add_class( 'is-image-fill-element' );
48
+ }
49
+ }
50
+
51
+ $content = $block_tag_processor->get_updated_html();
52
+
32
53
  $media_tag_processor = new WP_HTML_Tag_Processor( $content );
33
54
  $wrapping_figure_query = array(
34
55
  'tag_name' => 'figure',
35
56
  'class_name' => 'wp-block-media-text__media',
36
57
  );
37
- $has_media_on_right = isset( $attributes['mediaPosition'] ) && 'right' === $attributes['mediaPosition'];
38
- $image_fill = isset( $attributes['imageFill'] ) && $attributes['imageFill'];
39
- $focal_point = isset( $attributes['focalPoint'] ) ? round( $attributes['focalPoint']['x'] * 100 ) . '% ' . round( $attributes['focalPoint']['y'] * 100 ) . '%' : '50% 50%';
40
- $unique_id = 'wp-block-media-text__media-' . wp_unique_id();
41
58
 
42
59
  if ( $has_media_on_right ) {
43
60
  // Loop through all the figure tags and set a bookmark on the last figure tag.
@@ -46,59 +63,52 @@ function render_block_core_media_text( $attributes, $content ) {
46
63
  }
47
64
  if ( $media_tag_processor->has_bookmark( 'last_figure' ) ) {
48
65
  $media_tag_processor->seek( 'last_figure' );
49
- if ( $image_fill ) {
50
- $media_tag_processor->set_attribute( 'style', 'background-image:url(' . esc_url( $current_featured_image ) . ');background-position:' . $focal_point . ';' );
51
- } else {
52
- // Insert a unique ID to identify the figure tag.
53
- $media_tag_processor->set_attribute( 'id', $unique_id );
54
- }
66
+ // Insert a unique ID to identify the figure tag.
67
+ $media_tag_processor->set_attribute( 'id', $unique_id );
55
68
  }
56
69
  } else {
57
70
  if ( $media_tag_processor->next_tag( $wrapping_figure_query ) ) {
58
- if ( $image_fill ) {
59
- $media_tag_processor->set_attribute( 'style', 'background-image:url(' . esc_url( $current_featured_image ) . ');background-position:' . $focal_point . ';' );
60
- } else {
61
- // Insert a unique ID to identify the figure tag.
62
- $media_tag_processor->set_attribute( 'id', $unique_id );
63
- }
71
+ // Insert a unique ID to identify the figure tag.
72
+ $media_tag_processor->set_attribute( 'id', $unique_id );
64
73
  }
65
74
  }
66
75
 
67
76
  $content = $media_tag_processor->get_updated_html();
68
77
 
69
- // If the image is not set to fill, add the image tag inside the figure tag,
70
- // and update the image attributes in order to display the featured image.
71
- if ( ! $image_fill ) {
72
- $media_size_slug = isset( $attributes['mediaSizeSlug'] ) ? $attributes['mediaSizeSlug'] : 'full';
73
- $image_tag = '<img class="wp-block-media-text__featured_image">';
74
- $content = preg_replace(
75
- '/(<figure\s+id="' . preg_quote( $unique_id, '/' ) . '"\s+class="wp-block-media-text__media"\s*>)/',
76
- '$1' . $image_tag,
77
- $content
78
- );
78
+ // Add the image tag inside the figure tag, and update the image attributes
79
+ // in order to display the featured image.
80
+ $media_size_slug = isset( $attributes['mediaSizeSlug'] ) ? $attributes['mediaSizeSlug'] : 'full';
81
+ $image_tag = '<img class="wp-block-media-text__featured_image">';
82
+ $content = preg_replace(
83
+ '/(<figure\s+id="' . preg_quote( $unique_id, '/' ) . '"\s+class="wp-block-media-text__media"\s*>)/',
84
+ '$1' . $image_tag,
85
+ $content
86
+ );
79
87
 
80
- $image_tag_processor = new WP_HTML_Tag_Processor( $content );
88
+ $image_tag_processor = new WP_HTML_Tag_Processor( $content );
89
+ if ( $image_tag_processor->next_tag(
90
+ array(
91
+ 'tag_name' => 'figure',
92
+ 'id' => $unique_id,
93
+ )
94
+ ) ) {
95
+ // The ID is only used to ensure that the correct figure tag is selected,
96
+ // and can now be removed.
97
+ $image_tag_processor->remove_attribute( 'id' );
81
98
  if ( $image_tag_processor->next_tag(
82
99
  array(
83
- 'tag_name' => 'figure',
84
- 'id' => $unique_id,
100
+ 'tag_name' => 'img',
101
+ 'class_name' => 'wp-block-media-text__featured_image',
85
102
  )
86
103
  ) ) {
87
- // The ID is only used to ensure that the correct figure tag is selected,
88
- // and can now be removed.
89
- $image_tag_processor->remove_attribute( 'id' );
90
- if ( $image_tag_processor->next_tag(
91
- array(
92
- 'tag_name' => 'img',
93
- 'class_name' => 'wp-block-media-text__featured_image',
94
- )
95
- ) ) {
96
- $image_tag_processor->set_attribute( 'src', esc_url( $current_featured_image ) );
97
- $image_tag_processor->set_attribute( 'class', 'wp-image-' . get_post_thumbnail_id() . ' size-' . $media_size_slug );
98
- $image_tag_processor->set_attribute( 'alt', trim( strip_tags( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) ) );
99
-
100
- $content = $image_tag_processor->get_updated_html();
104
+ $image_tag_processor->set_attribute( 'src', esc_url( $current_featured_image ) );
105
+ $image_tag_processor->set_attribute( 'class', 'wp-image-' . get_post_thumbnail_id() . ' size-' . $media_size_slug );
106
+ $image_tag_processor->set_attribute( 'alt', trim( strip_tags( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) ) );
107
+ if ( $image_fill ) {
108
+ $image_tag_processor->set_attribute( 'style', 'object-position:' . $focal_point . ';' );
101
109
  }
110
+
111
+ $content = $image_tag_processor->get_updated_html();
102
112
  }
103
113
  }
104
114
 
@@ -22,25 +22,17 @@ import { isBlobURL } from '@wordpress/blob';
22
22
  import { store as noticesStore } from '@wordpress/notices';
23
23
  import { media as icon } from '@wordpress/icons';
24
24
 
25
+ /**
26
+ * Internal dependencies
27
+ */
28
+ import { imageFillStyles } from './image-fill';
29
+
25
30
  /**
26
31
  * Constants
27
32
  */
28
33
  const ALLOWED_MEDIA_TYPES = [ 'image', 'video' ];
29
34
  const noop = () => {};
30
35
 
31
- export function imageFillStyles( url, focalPoint ) {
32
- return url
33
- ? {
34
- backgroundImage: `url(${ url })`,
35
- backgroundPosition: focalPoint
36
- ? `${ Math.round( focalPoint.x * 100 ) }% ${ Math.round(
37
- focalPoint.y * 100
38
- ) }%`
39
- : `50% 50%`,
40
- }
41
- : {};
42
- }
43
-
44
36
  const ResizableBoxContainer = forwardRef(
45
37
  ( { isSelected, isStackedOnMobile, ...props }, ref ) => {
46
38
  const isMobile = useViewportMatch( 'small', '<' );
@@ -62,22 +54,18 @@ function ToolbarEditButton( {
62
54
  onSelectMedia,
63
55
  toggleUseFeaturedImage,
64
56
  useFeaturedImage,
65
- featuredImageURL,
66
57
  } ) {
67
58
  return (
68
59
  <BlockControls group="other">
69
60
  <MediaReplaceFlow
70
61
  mediaId={ mediaId }
71
- mediaUrl={
72
- useFeaturedImage && featuredImageURL
73
- ? featuredImageURL
74
- : mediaUrl
75
- }
62
+ mediaURL={ mediaUrl }
76
63
  allowedTypes={ ALLOWED_MEDIA_TYPES }
77
64
  accept="image/*,video/*"
78
65
  onSelect={ onSelectMedia }
79
66
  onToggleFeaturedImage={ toggleUseFeaturedImage }
80
67
  useFeaturedImage={ useFeaturedImage }
68
+ onReset={ () => onSelectMedia( undefined ) }
81
69
  />
82
70
  </BlockControls>
83
71
  );
@@ -133,6 +121,7 @@ function MediaContainer( props, ref ) {
133
121
  useFeaturedImage,
134
122
  featuredImageURL,
135
123
  featuredImageAlt,
124
+ refMedia,
136
125
  } = props;
137
126
 
138
127
  const isTemporaryMedia = ! mediaId && isBlobURL( mediaUrl );
@@ -155,7 +144,7 @@ function MediaContainer( props, ref ) {
155
144
  left: enableResize && mediaPosition === 'right',
156
145
  };
157
146
 
158
- const backgroundStyles =
147
+ const positionStyles =
159
148
  mediaType === 'image' && imageFill
160
149
  ? imageFillStyles( mediaUrl || featuredImageURL, focalPoint )
161
150
  : {};
@@ -163,11 +152,23 @@ function MediaContainer( props, ref ) {
163
152
  const mediaTypeRenderers = {
164
153
  image: () =>
165
154
  useFeaturedImage && featuredImageURL ? (
166
- <img src={ featuredImageURL } alt={ featuredImageAlt } />
155
+ <img
156
+ ref={ refMedia }
157
+ src={ featuredImageURL }
158
+ alt={ featuredImageAlt }
159
+ style={ positionStyles }
160
+ />
167
161
  ) : (
168
- mediaUrl && <img src={ mediaUrl } alt={ mediaAlt } />
162
+ mediaUrl && (
163
+ <img
164
+ ref={ refMedia }
165
+ src={ mediaUrl }
166
+ alt={ mediaAlt }
167
+ style={ positionStyles }
168
+ />
169
+ )
169
170
  ),
170
- video: () => <video controls src={ mediaUrl } />,
171
+ video: () => <video controls ref={ refMedia } src={ mediaUrl } />,
171
172
  };
172
173
 
173
174
  return (
@@ -178,7 +179,6 @@ function MediaContainer( props, ref ) {
178
179
  'editor-media-container__resizer',
179
180
  { 'is-transient': isTemporaryMedia }
180
181
  ) }
181
- style={ backgroundStyles }
182
182
  size={ { width: mediaWidth + '%' } }
183
183
  minWidth="10%"
184
184
  maxWidth="100%"
@@ -200,7 +200,6 @@ function MediaContainer( props, ref ) {
200
200
  }
201
201
  mediaId={ mediaId }
202
202
  toggleUseFeaturedImage={ toggleUseFeaturedImage }
203
- useFeaturedImage={ useFeaturedImage }
204
203
  />
205
204
  { ( mediaTypeRenderers[ mediaType ] || noop )() }
206
205
  { isTemporaryMedia && <Spinner /> }
@@ -208,6 +207,7 @@ function MediaContainer( props, ref ) {
208
207
  { ! featuredImageURL && useFeaturedImage && (
209
208
  <Placeholder
210
209
  className="wp-block-media-text--placeholder-image"
210
+ style={ positionStyles }
211
211
  withIllustration
212
212
  />
213
213
  ) }
@@ -44,8 +44,6 @@ const ICON_TYPE = {
44
44
  RETRY: 'retry',
45
45
  };
46
46
 
47
- export { imageFillStyles } from './media-container.js';
48
-
49
47
  class MediaContainer extends Component {
50
48
  constructor() {
51
49
  super( ...arguments );
@@ -11,7 +11,7 @@ import { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';
11
11
  /**
12
12
  * Internal dependencies
13
13
  */
14
- import { imageFillStyles } from './media-container';
14
+ import { imageFillStyles } from './image-fill';
15
15
  import { DEFAULT_MEDIA_SIZE_SLUG } from './constants';
16
16
 
17
17
  const DEFAULT_MEDIA_WIDTH = 50;
@@ -42,11 +42,16 @@ export default function save( { attributes } ) {
42
42
  [ `size-${ mediaSizeSlug }` ]: mediaId && mediaType === 'image',
43
43
  } );
44
44
 
45
+ const positionStyles = imageFill
46
+ ? imageFillStyles( mediaUrl, focalPoint )
47
+ : {};
48
+
45
49
  let image = mediaUrl ? (
46
50
  <img
47
51
  src={ mediaUrl }
48
52
  alt={ mediaAlt }
49
53
  className={ imageClasses || null }
54
+ style={ positionStyles }
50
55
  />
51
56
  ) : null;
52
57
 
@@ -71,11 +76,8 @@ export default function save( { attributes } ) {
71
76
  'has-media-on-the-right': 'right' === mediaPosition,
72
77
  'is-stacked-on-mobile': isStackedOnMobile,
73
78
  [ `is-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment,
74
- 'is-image-fill': imageFill,
79
+ 'is-image-fill-element': imageFill,
75
80
  } );
76
- const backgroundStyles = imageFill
77
- ? imageFillStyles( mediaUrl, focalPoint )
78
- : {};
79
81
 
80
82
  let gridTemplateColumns;
81
83
  if ( mediaWidth !== DEFAULT_MEDIA_WIDTH ) {
@@ -96,10 +98,7 @@ export default function save( { attributes } ) {
96
98
  className: 'wp-block-media-text__content',
97
99
  } ) }
98
100
  />
99
- <figure
100
- className="wp-block-media-text__media"
101
- style={ backgroundStyles }
102
- >
101
+ <figure className="wp-block-media-text__media">
103
102
  { ( mediaTypeRenders[ mediaType ] || noop )() }
104
103
  </figure>
105
104
  </div>
@@ -107,10 +106,7 @@ export default function save( { attributes } ) {
107
106
  }
108
107
  return (
109
108
  <div { ...useBlockProps.save( { className, style } ) }>
110
- <figure
111
- className="wp-block-media-text__media"
112
- style={ backgroundStyles }
113
- >
109
+ <figure className="wp-block-media-text__media">
114
110
  { ( mediaTypeRenders[ mediaType ] || noop )() }
115
111
  </figure>
116
112
  <div
@@ -80,6 +80,7 @@
80
80
  vertical-align: middle;
81
81
  }
82
82
 
83
+ /* `is-image-fill` is deprecated and the styles are kept for backwards compatibility. */
83
84
  .wp-block-media-text.is-image-fill > .wp-block-media-text__media {
84
85
  height: 100%;
85
86
  min-height: 250px;
@@ -102,6 +103,26 @@
102
103
  clip: rect(0, 0, 0, 0);
103
104
  border: 0;
104
105
  }
106
+
107
+ /* Image fill for versions 8 and onwards */
108
+ .wp-block-media-text.is-image-fill-element > .wp-block-media-text__media {
109
+ position: relative;
110
+ height: 100%;
111
+ min-height: 250px;
112
+ }
113
+
114
+ .wp-block-media-text.is-image-fill-element > .wp-block-media-text__media > a {
115
+ display: block;
116
+ height: 100%;
117
+ }
118
+
119
+ .wp-block-media-text.is-image-fill-element > .wp-block-media-text__media img {
120
+ position: absolute;
121
+ width: 100%;
122
+ height: 100%;
123
+ object-fit: cover;
124
+ }
125
+
105
126
  /*
106
127
  * Here we here not able to use a mobile first CSS approach.
107
128
  * Custom widths are set using inline styles, and on mobile,
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { imageFillStyles } from '../image-fill';
5
+
6
+ describe( 'imageFillStyles()', () => {
7
+ it( 'should return centered object position', () => {
8
+ const { objectPosition } = imageFillStyles( 'image.jpg' );
9
+ expect( objectPosition ).toBe( '50% 50%' );
10
+ } );
11
+
12
+ it( 'should return custom object position', () => {
13
+ const { objectPosition } = imageFillStyles( 'image.jpg', {
14
+ x: 0.56,
15
+ y: 0.57,
16
+ } );
17
+ expect( objectPosition ).toBe( '56% 57%' );
18
+ } );
19
+ } );
@@ -49,7 +49,12 @@ export default function MissingEdit( { attributes, clientId } ) {
49
49
  let messageHTML;
50
50
 
51
51
  const convertToHtmlButton = (
52
- <Button key="convert" onClick={ convertToHTML } variant="primary">
52
+ <Button
53
+ __next40pxDefaultSize
54
+ key="convert"
55
+ onClick={ convertToHTML }
56
+ variant="primary"
57
+ >
53
58
  { __( 'Keep as HTML' ) }
54
59
  </Button>
55
60
  );
@@ -69,7 +74,7 @@ export default function MissingEdit( { attributes, clientId } ) {
69
74
  messageHTML = sprintf(
70
75
  /* translators: %s: block name */
71
76
  __(
72
- 'Your site doesn’t include support for the "%s" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'
77
+ 'Your site doesn’t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'
73
78
  ),
74
79
  originalName
75
80
  );
@@ -78,7 +83,7 @@ export default function MissingEdit( { attributes, clientId } ) {
78
83
  messageHTML = sprintf(
79
84
  /* translators: %s: block name */
80
85
  __(
81
- 'Your site doesn’t include support for the "%s" block. You can leave this block intact or remove it entirely.'
86
+ 'Your site doesn’t include support for the "%s" block. You can leave it as-is or remove it.'
82
87
  ),
83
88
  originalName
84
89
  );
@@ -2,22 +2,32 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { Warning } from '@wordpress/block-editor';
5
- import { Button } from '@wordpress/components';
5
+ import { Button, Notice } from '@wordpress/components';
6
6
  import { __ } from '@wordpress/i18n';
7
7
  import { createInterpolateElement } from '@wordpress/element';
8
8
 
9
- function DeletedNavigationWarning( { onCreateNew } ) {
10
- return (
11
- <Warning>
12
- { createInterpolateElement(
13
- __(
14
- 'Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>'
15
- ),
16
- {
17
- button: <Button onClick={ onCreateNew } variant="link" />,
18
- }
19
- ) }
20
- </Warning>
9
+ function DeletedNavigationWarning( { onCreateNew, isNotice = false } ) {
10
+ const message = createInterpolateElement(
11
+ __(
12
+ 'Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>'
13
+ ),
14
+ {
15
+ button: (
16
+ <Button
17
+ __next40pxDefaultSize
18
+ onClick={ onCreateNew }
19
+ variant="link"
20
+ />
21
+ ),
22
+ }
23
+ );
24
+
25
+ return isNotice ? (
26
+ <Notice status="warning" isDismissible={ false }>
27
+ { message }
28
+ </Notice>
29
+ ) : (
30
+ <Warning>{ message }</Warning>
21
31
  );
22
32
  }
23
33
 
@@ -591,6 +591,7 @@ function Navigation( {
591
591
  { isResponsive && (
592
592
  <>
593
593
  <Button
594
+ __next40pxDefaultSize
594
595
  className={ overlayMenuPreviewClasses }
595
596
  onClick={ () => {
596
597
  setOverlayMenuPreview(
@@ -94,7 +94,9 @@ const MainContent = ( {
94
94
  const { navigationMenu } = useNavigationMenu( currentMenuId );
95
95
 
96
96
  if ( currentMenuId && isNavigationMenuMissing ) {
97
- return <DeletedNavigationWarning onCreateNew={ onCreateNew } />;
97
+ return (
98
+ <DeletedNavigationWarning onCreateNew={ onCreateNew } isNotice />
99
+ );
98
100
  }
99
101
 
100
102
  if ( isLoading ) {
@@ -19,6 +19,7 @@ export default function NavigationMenuDeleteControl( { onDelete } ) {
19
19
  return (
20
20
  <>
21
21
  <Button
22
+ __next40pxDefaultSize
22
23
  className="wp-block-navigation-delete-menu-button"
23
24
  variant="secondary"
24
25
  isDestructive
@@ -76,6 +76,7 @@ export default function NavigationPlaceholder( {
76
76
 
77
77
  { canUserCreateNavigationMenus && (
78
78
  <Button
79
+ __next40pxDefaultSize
79
80
  variant="tertiary"
80
81
  onClick={ onCreateEmpty }
81
82
  >
@@ -79,6 +79,7 @@ export default function ResponsiveWrapper( {
79
79
  <>
80
80
  { ! isOpen && (
81
81
  <Button
82
+ __next40pxDefaultSize
82
83
  aria-haspopup="true"
83
84
  aria-label={ hasIcon && __( 'Open menu' ) }
84
85
  className={ openButtonClasses }
@@ -100,6 +101,7 @@ export default function ResponsiveWrapper( {
100
101
  >
101
102
  <div { ...dialogProps }>
102
103
  <Button
104
+ __next40pxDefaultSize
103
105
  className="wp-block-navigation__responsive-container-close"
104
106
  aria-label={ hasIcon && __( 'Close menu' ) }
105
107
  onClick={ () => onToggle( false ) }
@@ -20,13 +20,13 @@ export default function UnsavedInnerBlocks( {
20
20
  createNavigationMenu,
21
21
  hasSelection,
22
22
  } ) {
23
- const originalBlocks = useRef();
23
+ const originalBlocksRef = useRef();
24
24
 
25
25
  useEffect( () => {
26
26
  // Initially store the uncontrolled inner blocks for
27
27
  // dirty state comparison.
28
- if ( ! originalBlocks?.current ) {
29
- originalBlocks.current = blocks;
28
+ if ( ! originalBlocksRef?.current ) {
29
+ originalBlocksRef.current = blocks;
30
30
  }
31
31
  }, [ blocks ] );
32
32
 
@@ -38,7 +38,7 @@ export default function UnsavedInnerBlocks( {
38
38
  // entity records. As a result we need to perform a deep equality check skipping
39
39
  // the page list's inner blocks.
40
40
  const innerBlocksAreDirty = areBlocksDirty(
41
- originalBlocks?.current,
41
+ originalBlocksRef?.current,
42
42
  blocks
43
43
  );
44
44
 
@@ -5,6 +5,10 @@
5
5
  // Undo default editor styles.
6
6
  // These need extra specificity.
7
7
  .editor-styles-wrapper .wp-block-navigation {
8
+ // Extra specificity is applied to do two things in classic themes:
9
+ // 1. Override the auto margin from alignment styles. This is needed as the `ul` element
10
+ // has a `wp-block` class applied to it, even though it's not a block.
11
+ // 2. Override list indentation that targets `ul,ol` elements.
8
12
  ul {
9
13
  margin-top: 0;
10
14
  margin-bottom: 0;
@@ -100,7 +104,6 @@
100
104
  background: $gray-900;
101
105
  padding: 0;
102
106
  width: $button-size-small;
103
- border-radius: $radius-block-ui;
104
107
  margin-right: 0;
105
108
  margin-left: auto;
106
109
  }
@@ -322,7 +325,7 @@ $color-control-label-height: 20px;
322
325
  }
323
326
 
324
327
  .wp-block-navigation-placeholder__controls {
325
- border-radius: $radius-block-ui;
328
+ border-radius: $radius-small;
326
329
  background-color: $white;
327
330
  box-shadow: inset 0 0 0 $border-width $gray-900;
328
331
  display: none;
@@ -478,7 +481,7 @@ $color-control-label-height: 20px;
478
481
  }
479
482
  }
480
483
 
481
- // The iframe makes these rules a lot simpler.
484
+ // `body.editor-styles-wrapper` ensures this only applies to the iframed editor.
482
485
  body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-open {
483
486
  top: 0;
484
487
  right: 0;
@@ -560,7 +563,11 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
560
563
  width: 100%;
561
564
  background-color: $gray-100;
562
565
  padding: 0 $grid-unit-30;
563
- height: $grid-unit-40 * 2;
566
+
567
+ // Adding !important to override default 40px size.
568
+ // Ref - https://github.com/WordPress/gutenberg/pull/65075#discussion_r1746282734
569
+ height: $grid-unit-40 * 2 !important;
570
+
564
571
  margin-bottom: $grid-unit-15;
565
572
 
566
573
  &.open {
@@ -624,7 +624,7 @@ class WP_Navigation_Block_Renderer {
624
624
  if ( static::is_interactive( $attributes, $inner_blocks ) ) {
625
625
  $suffix = wp_scripts_get_suffix();
626
626
  if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
627
- $module_url = gutenberg_url( '/build/interactivity/navigation.min.js' );
627
+ $module_url = gutenberg_url( '/build-module/block-library/navigation/view.min.js' );
628
628
  }
629
629
 
630
630
  wp_register_script_module(
@@ -8,7 +8,7 @@ import {
8
8
  VisuallyHidden,
9
9
  __experimentalVStack as VStack,
10
10
  } from '@wordpress/components';
11
- import { __, sprintf } from '@wordpress/i18n';
11
+ import { __, sprintf, isRTL } from '@wordpress/i18n';
12
12
  import {
13
13
  __experimentalLinkControl as LinkControl,
14
14
  store as blockEditorStore,
@@ -28,7 +28,7 @@ import {
28
28
  } from '@wordpress/core-data';
29
29
  import { decodeEntities } from '@wordpress/html-entities';
30
30
  import { useSelect, useDispatch } from '@wordpress/data';
31
- import { chevronLeftSmall, plus } from '@wordpress/icons';
31
+ import { chevronLeftSmall, chevronRightSmall, plus } from '@wordpress/icons';
32
32
  import { useInstanceId, useFocusOnMount } from '@wordpress/compose';
33
33
 
34
34
  /**
@@ -123,7 +123,7 @@ function LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {
123
123
 
124
124
  <Button
125
125
  className="link-ui-block-inserter__back"
126
- icon={ chevronLeftSmall }
126
+ icon={ isRTL() ? chevronRightSmall : chevronLeftSmall }
127
127
  onClick={ ( e ) => {
128
128
  e.preventDefault();
129
129
  onBack();
@@ -310,6 +310,7 @@ const LinkUITools = ( { setAddingBlock, focusAddBlockButton } ) => {
310
310
  return (
311
311
  <VStack className="link-ui-tools">
312
312
  <Button
313
+ __next40pxDefaultSize
313
314
  ref={ addBlockButtonRef }
314
315
  icon={ plus }
315
316
  onClick={ ( e ) => {
@@ -31,10 +31,15 @@ export function ConvertToLinksModal( { onClick, onClose, disabled } ) {
31
31
  { convertDescription }
32
32
  </p>
33
33
  <div className="wp-block-page-list-modal-buttons">
34
- <Button variant="tertiary" onClick={ onClose }>
34
+ <Button
35
+ __next40pxDefaultSize
36
+ variant="tertiary"
37
+ onClick={ onClose }
38
+ >
35
39
  { __( 'Cancel' ) }
36
40
  </Button>
37
41
  <Button
42
+ __next40pxDefaultSize
38
43
  variant="primary"
39
44
  accessibleWhenDisabled
40
45
  disabled={ disabled }