@wordpress/block-library 8.0.0 → 8.1.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 (450) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/categories/edit.js +1 -1
  3. package/build/categories/edit.js.map +1 -1
  4. package/build/cover/edit/inspector-controls.js +1 -1
  5. package/build/cover/edit/inspector-controls.js.map +1 -1
  6. package/build/freeform/edit.js +21 -6
  7. package/build/freeform/edit.js.map +1 -1
  8. package/build/freeform/modal.js +97 -0
  9. package/build/freeform/modal.js.map +1 -0
  10. package/build/gallery/edit.js +13 -2
  11. package/build/gallery/edit.js.map +1 -1
  12. package/build/gallery/gallery.js +2 -16
  13. package/build/gallery/gallery.js.map +1 -1
  14. package/build/image/image.js +1 -0
  15. package/build/image/image.js.map +1 -1
  16. package/build/media-text/edit.js +1 -0
  17. package/build/media-text/edit.js.map +1 -1
  18. package/build/missing/edit.native.js +2 -2
  19. package/build/missing/edit.native.js.map +1 -1
  20. package/build/navigation/edit/index.js +3 -4
  21. package/build/navigation/edit/index.js.map +1 -1
  22. package/build/navigation/edit/menu-inspector-controls.js +29 -7
  23. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  24. package/build/navigation/edit/navigation-menu-selector.js +11 -8
  25. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  26. package/build/navigation/edit/utils.js +81 -0
  27. package/build/navigation/edit/utils.js.map +1 -1
  28. package/build/navigation-link/edit.js +4 -58
  29. package/build/navigation-link/edit.js.map +1 -1
  30. package/build/navigation-submenu/edit.js +7 -72
  31. package/build/navigation-submenu/edit.js.map +1 -1
  32. package/build/page-list/edit.js +16 -15
  33. package/build/page-list/edit.js.map +1 -1
  34. package/build/page-list/index.js +29 -2
  35. package/build/page-list/index.js.map +1 -1
  36. package/build/page-list-item/edit.js +9 -5
  37. package/build/page-list-item/edit.js.map +1 -1
  38. package/build/post-featured-image/overlay.js +0 -1
  39. package/build/post-featured-image/overlay.js.map +1 -1
  40. package/build/query/edit/index.js +2 -1
  41. package/build/query/edit/index.js.map +1 -1
  42. package/build/query/edit/inspector-controls/index.js +10 -5
  43. package/build/query/edit/inspector-controls/index.js.map +1 -1
  44. package/build/query/edit/inspector-controls/taxonomy-controls.js +101 -37
  45. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  46. package/build/query/edit/query-content.js +2 -3
  47. package/build/query/edit/query-content.js.map +1 -1
  48. package/build/query/edit/query-placeholder.js +17 -12
  49. package/build/query/edit/query-placeholder.js.map +1 -1
  50. package/build/query/utils.js +73 -1
  51. package/build/query/utils.js.map +1 -1
  52. package/build/search/edit.js +2 -2
  53. package/build/search/edit.js.map +1 -1
  54. package/build/social-link/edit.js.map +1 -1
  55. package/build/social-links/edit.js +0 -1
  56. package/build/social-links/edit.js.map +1 -1
  57. package/build/table-of-contents/edit.js +1 -1
  58. package/build/table-of-contents/edit.js.map +1 -1
  59. package/build/template-part/edit/advanced-controls.js +11 -1
  60. package/build/template-part/edit/advanced-controls.js.map +1 -1
  61. package/build/template-part/edit/import-controls.js +160 -0
  62. package/build/template-part/edit/import-controls.js.map +1 -0
  63. package/build/template-part/edit/index.js +2 -1
  64. package/build/template-part/edit/index.js.map +1 -1
  65. package/build/template-part/edit/utils/transformers.js +48 -0
  66. package/build/template-part/edit/utils/transformers.js.map +1 -0
  67. package/build-module/categories/edit.js +1 -1
  68. package/build-module/categories/edit.js.map +1 -1
  69. package/build-module/cover/edit/inspector-controls.js +3 -3
  70. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  71. package/build-module/freeform/edit.js +22 -8
  72. package/build-module/freeform/edit.js.map +1 -1
  73. package/build-module/freeform/modal.js +90 -0
  74. package/build-module/freeform/modal.js.map +1 -0
  75. package/build-module/gallery/edit.js +14 -3
  76. package/build-module/gallery/edit.js.map +1 -1
  77. package/build-module/gallery/gallery.js +3 -16
  78. package/build-module/gallery/gallery.js.map +1 -1
  79. package/build-module/image/image.js +1 -0
  80. package/build-module/image/image.js.map +1 -1
  81. package/build-module/media-text/edit.js +1 -0
  82. package/build-module/media-text/edit.js.map +1 -1
  83. package/build-module/missing/edit.native.js +2 -2
  84. package/build-module/missing/edit.native.js.map +1 -1
  85. package/build-module/navigation/edit/index.js +3 -4
  86. package/build-module/navigation/edit/index.js.map +1 -1
  87. package/build-module/navigation/edit/menu-inspector-controls.js +30 -9
  88. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  89. package/build-module/navigation/edit/navigation-menu-selector.js +12 -9
  90. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  91. package/build-module/navigation/edit/utils.js +75 -0
  92. package/build-module/navigation/edit/utils.js.map +1 -1
  93. package/build-module/navigation-link/edit.js +4 -59
  94. package/build-module/navigation-link/edit.js.map +1 -1
  95. package/build-module/navigation-submenu/edit.js +6 -72
  96. package/build-module/navigation-submenu/edit.js.map +1 -1
  97. package/build-module/page-list/edit.js +17 -15
  98. package/build-module/page-list/edit.js.map +1 -1
  99. package/build-module/page-list/index.js +30 -3
  100. package/build-module/page-list/index.js.map +1 -1
  101. package/build-module/page-list-item/edit.js +9 -6
  102. package/build-module/page-list-item/edit.js.map +1 -1
  103. package/build-module/post-featured-image/overlay.js +0 -1
  104. package/build-module/post-featured-image/overlay.js.map +1 -1
  105. package/build-module/query/edit/index.js +2 -1
  106. package/build-module/query/edit/index.js.map +1 -1
  107. package/build-module/query/edit/inspector-controls/index.js +10 -5
  108. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  109. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +99 -35
  110. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  111. package/build-module/query/edit/query-content.js +1 -1
  112. package/build-module/query/edit/query-content.js.map +1 -1
  113. package/build-module/query/edit/query-placeholder.js +16 -12
  114. package/build-module/query/edit/query-placeholder.js.map +1 -1
  115. package/build-module/query/utils.js +69 -0
  116. package/build-module/query/utils.js.map +1 -1
  117. package/build-module/search/edit.js +2 -2
  118. package/build-module/search/edit.js.map +1 -1
  119. package/build-module/social-link/edit.js +2 -2
  120. package/build-module/social-link/edit.js.map +1 -1
  121. package/build-module/social-links/edit.js +0 -1
  122. package/build-module/social-links/edit.js.map +1 -1
  123. package/build-module/table-of-contents/edit.js +1 -1
  124. package/build-module/table-of-contents/edit.js.map +1 -1
  125. package/build-module/template-part/edit/advanced-controls.js +10 -1
  126. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  127. package/build-module/template-part/edit/import-controls.js +146 -0
  128. package/build-module/template-part/edit/import-controls.js.map +1 -0
  129. package/build-module/template-part/edit/index.js +2 -1
  130. package/build-module/template-part/edit/index.js.map +1 -1
  131. package/build-module/template-part/edit/utils/transformers.js +40 -0
  132. package/build-module/template-part/edit/utils/transformers.js.map +1 -0
  133. package/build-style/archives/editor-rtl.css +3 -3
  134. package/build-style/archives/editor.css +3 -3
  135. package/build-style/archives/style-rtl.css +3 -3
  136. package/build-style/archives/style.css +3 -3
  137. package/build-style/audio/editor-rtl.css +3 -3
  138. package/build-style/audio/editor.css +3 -3
  139. package/build-style/audio/style-rtl.css +3 -3
  140. package/build-style/audio/style.css +3 -3
  141. package/build-style/audio/theme-rtl.css +3 -3
  142. package/build-style/audio/theme.css +3 -3
  143. package/build-style/avatar/editor-rtl.css +3 -3
  144. package/build-style/avatar/editor.css +3 -3
  145. package/build-style/avatar/style-rtl.css +3 -3
  146. package/build-style/avatar/style.css +3 -3
  147. package/build-style/block/editor-rtl.css +3 -3
  148. package/build-style/block/editor.css +3 -3
  149. package/build-style/button/editor-rtl.css +3 -3
  150. package/build-style/button/editor.css +3 -3
  151. package/build-style/button/style-rtl.css +3 -3
  152. package/build-style/button/style.css +3 -3
  153. package/build-style/buttons/editor-rtl.css +3 -3
  154. package/build-style/buttons/editor.css +3 -3
  155. package/build-style/buttons/style-rtl.css +3 -3
  156. package/build-style/buttons/style.css +3 -3
  157. package/build-style/calendar/style-rtl.css +3 -3
  158. package/build-style/calendar/style.css +3 -3
  159. package/build-style/categories/editor-rtl.css +3 -3
  160. package/build-style/categories/editor.css +3 -3
  161. package/build-style/categories/style-rtl.css +3 -3
  162. package/build-style/categories/style.css +3 -3
  163. package/build-style/classic-rtl.css +3 -3
  164. package/build-style/classic.css +3 -3
  165. package/build-style/code/editor-rtl.css +3 -3
  166. package/build-style/code/editor.css +3 -3
  167. package/build-style/code/style-rtl.css +3 -3
  168. package/build-style/code/style.css +3 -3
  169. package/build-style/code/theme-rtl.css +3 -3
  170. package/build-style/code/theme.css +3 -3
  171. package/build-style/columns/editor-rtl.css +3 -3
  172. package/build-style/columns/editor.css +3 -3
  173. package/build-style/columns/style-rtl.css +3 -3
  174. package/build-style/columns/style.css +3 -3
  175. package/build-style/comment-author-avatar/editor-rtl.css +3 -3
  176. package/build-style/comment-author-avatar/editor.css +3 -3
  177. package/build-style/comment-content/style-rtl.css +3 -3
  178. package/build-style/comment-content/style.css +3 -3
  179. package/build-style/comment-template/style-rtl.css +3 -3
  180. package/build-style/comment-template/style.css +3 -3
  181. package/build-style/comments/editor-rtl.css +3 -3
  182. package/build-style/comments/editor.css +3 -3
  183. package/build-style/comments/style-rtl.css +3 -3
  184. package/build-style/comments/style.css +3 -3
  185. package/build-style/comments-pagination/editor-rtl.css +3 -3
  186. package/build-style/comments-pagination/editor.css +3 -3
  187. package/build-style/comments-pagination/style-rtl.css +3 -3
  188. package/build-style/comments-pagination/style.css +3 -3
  189. package/build-style/comments-pagination-numbers/editor-rtl.css +3 -3
  190. package/build-style/comments-pagination-numbers/editor.css +3 -3
  191. package/build-style/comments-title/editor-rtl.css +3 -3
  192. package/build-style/comments-title/editor.css +3 -3
  193. package/build-style/common-rtl.css +3 -3
  194. package/build-style/common.css +3 -3
  195. package/build-style/cover/editor-rtl.css +3 -3
  196. package/build-style/cover/editor.css +3 -3
  197. package/build-style/cover/style-rtl.css +3 -3
  198. package/build-style/cover/style.css +3 -3
  199. package/build-style/editor-elements-rtl.css +3 -3
  200. package/build-style/editor-elements.css +3 -3
  201. package/build-style/editor-rtl.css +7 -9
  202. package/build-style/editor.css +7 -9
  203. package/build-style/elements-rtl.css +3 -3
  204. package/build-style/elements.css +3 -3
  205. package/build-style/embed/editor-rtl.css +3 -3
  206. package/build-style/embed/editor.css +3 -3
  207. package/build-style/embed/style-rtl.css +3 -3
  208. package/build-style/embed/style.css +3 -3
  209. package/build-style/embed/theme-rtl.css +3 -3
  210. package/build-style/embed/theme.css +3 -3
  211. package/build-style/file/editor-rtl.css +3 -3
  212. package/build-style/file/editor.css +3 -3
  213. package/build-style/file/style-rtl.css +3 -3
  214. package/build-style/file/style.css +3 -3
  215. package/build-style/freeform/editor-rtl.css +3 -3
  216. package/build-style/freeform/editor.css +3 -3
  217. package/build-style/gallery/editor-rtl.css +3 -3
  218. package/build-style/gallery/editor.css +3 -3
  219. package/build-style/gallery/style-rtl.css +3 -3
  220. package/build-style/gallery/style.css +3 -3
  221. package/build-style/gallery/theme-rtl.css +3 -3
  222. package/build-style/gallery/theme.css +3 -3
  223. package/build-style/group/editor-rtl.css +3 -3
  224. package/build-style/group/editor.css +3 -3
  225. package/build-style/group/style-rtl.css +3 -3
  226. package/build-style/group/style.css +3 -3
  227. package/build-style/group/theme-rtl.css +3 -3
  228. package/build-style/group/theme.css +3 -3
  229. package/build-style/heading/style-rtl.css +3 -3
  230. package/build-style/heading/style.css +3 -3
  231. package/build-style/html/editor-rtl.css +3 -3
  232. package/build-style/html/editor.css +3 -3
  233. package/build-style/image/editor-rtl.css +3 -3
  234. package/build-style/image/editor.css +3 -3
  235. package/build-style/image/style-rtl.css +3 -3
  236. package/build-style/image/style.css +3 -3
  237. package/build-style/image/theme-rtl.css +3 -3
  238. package/build-style/image/theme.css +3 -3
  239. package/build-style/latest-comments/style-rtl.css +3 -3
  240. package/build-style/latest-comments/style.css +3 -3
  241. package/build-style/latest-posts/editor-rtl.css +3 -3
  242. package/build-style/latest-posts/editor.css +3 -3
  243. package/build-style/latest-posts/style-rtl.css +3 -3
  244. package/build-style/latest-posts/style.css +3 -3
  245. package/build-style/list/style-rtl.css +3 -3
  246. package/build-style/list/style.css +3 -3
  247. package/build-style/media-text/editor-rtl.css +3 -3
  248. package/build-style/media-text/editor.css +3 -3
  249. package/build-style/media-text/style-rtl.css +3 -3
  250. package/build-style/media-text/style.css +3 -3
  251. package/build-style/more/editor-rtl.css +3 -3
  252. package/build-style/more/editor.css +3 -3
  253. package/build-style/navigation/editor-rtl.css +3 -9
  254. package/build-style/navigation/editor.css +3 -9
  255. package/build-style/navigation/style-rtl.css +3 -4
  256. package/build-style/navigation/style.css +3 -4
  257. package/build-style/navigation-link/editor-rtl.css +3 -3
  258. package/build-style/navigation-link/editor.css +3 -3
  259. package/build-style/navigation-link/style-rtl.css +3 -3
  260. package/build-style/navigation-link/style.css +3 -3
  261. package/build-style/navigation-submenu/editor-rtl.css +3 -3
  262. package/build-style/navigation-submenu/editor.css +3 -3
  263. package/build-style/nextpage/editor-rtl.css +3 -3
  264. package/build-style/nextpage/editor.css +3 -3
  265. package/build-style/page-list/editor-rtl.css +7 -3
  266. package/build-style/page-list/editor.css +7 -3
  267. package/build-style/page-list/style-rtl.css +3 -3
  268. package/build-style/page-list/style.css +3 -3
  269. package/build-style/paragraph/editor-rtl.css +3 -3
  270. package/build-style/paragraph/editor.css +3 -3
  271. package/build-style/paragraph/style-rtl.css +3 -3
  272. package/build-style/paragraph/style.css +3 -3
  273. package/build-style/post-author/style-rtl.css +3 -3
  274. package/build-style/post-author/style.css +3 -3
  275. package/build-style/post-comments-form/editor-rtl.css +3 -3
  276. package/build-style/post-comments-form/editor.css +3 -3
  277. package/build-style/post-comments-form/style-rtl.css +3 -3
  278. package/build-style/post-comments-form/style.css +3 -3
  279. package/build-style/post-date/style-rtl.css +3 -3
  280. package/build-style/post-date/style.css +3 -3
  281. package/build-style/post-excerpt/editor-rtl.css +3 -3
  282. package/build-style/post-excerpt/editor.css +3 -3
  283. package/build-style/post-excerpt/style-rtl.css +3 -3
  284. package/build-style/post-excerpt/style.css +3 -3
  285. package/build-style/post-featured-image/editor-rtl.css +3 -3
  286. package/build-style/post-featured-image/editor.css +3 -3
  287. package/build-style/post-featured-image/style-rtl.css +3 -3
  288. package/build-style/post-featured-image/style.css +3 -3
  289. package/build-style/post-navigation-link/style-rtl.css +3 -3
  290. package/build-style/post-navigation-link/style.css +3 -3
  291. package/build-style/post-template/editor-rtl.css +3 -3
  292. package/build-style/post-template/editor.css +3 -3
  293. package/build-style/post-template/style-rtl.css +3 -3
  294. package/build-style/post-template/style.css +3 -3
  295. package/build-style/post-terms/style-rtl.css +3 -3
  296. package/build-style/post-terms/style.css +3 -3
  297. package/build-style/post-title/style-rtl.css +3 -3
  298. package/build-style/post-title/style.css +3 -3
  299. package/build-style/preformatted/style-rtl.css +3 -3
  300. package/build-style/preformatted/style.css +3 -3
  301. package/build-style/pullquote/editor-rtl.css +3 -3
  302. package/build-style/pullquote/editor.css +3 -3
  303. package/build-style/pullquote/style-rtl.css +3 -3
  304. package/build-style/pullquote/style.css +3 -3
  305. package/build-style/pullquote/theme-rtl.css +3 -3
  306. package/build-style/pullquote/theme.css +3 -3
  307. package/build-style/query/editor-rtl.css +3 -3
  308. package/build-style/query/editor.css +3 -3
  309. package/build-style/query-pagination/editor-rtl.css +3 -3
  310. package/build-style/query-pagination/editor.css +3 -3
  311. package/build-style/query-pagination/style-rtl.css +3 -3
  312. package/build-style/query-pagination/style.css +3 -3
  313. package/build-style/query-pagination-numbers/editor-rtl.css +3 -3
  314. package/build-style/query-pagination-numbers/editor.css +3 -3
  315. package/build-style/query-title/style-rtl.css +3 -3
  316. package/build-style/query-title/style.css +3 -3
  317. package/build-style/quote/style-rtl.css +3 -3
  318. package/build-style/quote/style.css +3 -3
  319. package/build-style/quote/theme-rtl.css +3 -3
  320. package/build-style/quote/theme.css +3 -3
  321. package/build-style/read-more/style-rtl.css +3 -3
  322. package/build-style/read-more/style.css +3 -3
  323. package/build-style/reset-rtl.css +3 -3
  324. package/build-style/reset.css +3 -3
  325. package/build-style/rss/editor-rtl.css +3 -3
  326. package/build-style/rss/editor.css +3 -3
  327. package/build-style/rss/style-rtl.css +3 -3
  328. package/build-style/rss/style.css +3 -3
  329. package/build-style/search/editor-rtl.css +3 -3
  330. package/build-style/search/editor.css +3 -3
  331. package/build-style/search/style-rtl.css +3 -3
  332. package/build-style/search/style.css +3 -3
  333. package/build-style/search/theme-rtl.css +3 -3
  334. package/build-style/search/theme.css +3 -3
  335. package/build-style/separator/editor-rtl.css +3 -3
  336. package/build-style/separator/editor.css +3 -3
  337. package/build-style/separator/style-rtl.css +3 -3
  338. package/build-style/separator/style.css +3 -3
  339. package/build-style/separator/theme-rtl.css +3 -3
  340. package/build-style/separator/theme.css +3 -3
  341. package/build-style/shortcode/editor-rtl.css +3 -3
  342. package/build-style/shortcode/editor.css +3 -3
  343. package/build-style/site-logo/editor-rtl.css +3 -3
  344. package/build-style/site-logo/editor.css +3 -3
  345. package/build-style/site-logo/style-rtl.css +3 -3
  346. package/build-style/site-logo/style.css +3 -3
  347. package/build-style/site-tagline/editor-rtl.css +3 -3
  348. package/build-style/site-tagline/editor.css +3 -3
  349. package/build-style/site-title/editor-rtl.css +3 -3
  350. package/build-style/site-title/editor.css +3 -3
  351. package/build-style/site-title/style-rtl.css +3 -3
  352. package/build-style/site-title/style.css +3 -3
  353. package/build-style/social-link/editor-rtl.css +3 -3
  354. package/build-style/social-link/editor.css +3 -3
  355. package/build-style/social-links/editor-rtl.css +3 -3
  356. package/build-style/social-links/editor.css +3 -3
  357. package/build-style/social-links/style-rtl.css +3 -3
  358. package/build-style/social-links/style.css +3 -3
  359. package/build-style/spacer/editor-rtl.css +3 -3
  360. package/build-style/spacer/editor.css +3 -3
  361. package/build-style/spacer/style-rtl.css +3 -3
  362. package/build-style/spacer/style.css +3 -3
  363. package/build-style/style-rtl.css +13 -5
  364. package/build-style/style.css +13 -5
  365. package/build-style/table/editor-rtl.css +3 -3
  366. package/build-style/table/editor.css +3 -3
  367. package/build-style/table/style-rtl.css +9 -3
  368. package/build-style/table/style.css +9 -3
  369. package/build-style/table/theme-rtl.css +3 -9
  370. package/build-style/table/theme.css +3 -9
  371. package/build-style/tag-cloud/style-rtl.css +3 -3
  372. package/build-style/tag-cloud/style.css +3 -3
  373. package/build-style/template-part/editor-rtl.css +3 -3
  374. package/build-style/template-part/editor.css +3 -3
  375. package/build-style/template-part/theme-rtl.css +3 -3
  376. package/build-style/template-part/theme.css +3 -3
  377. package/build-style/text-columns/editor-rtl.css +3 -3
  378. package/build-style/text-columns/editor.css +3 -3
  379. package/build-style/text-columns/style-rtl.css +3 -3
  380. package/build-style/text-columns/style.css +3 -3
  381. package/build-style/theme-rtl.css +3 -9
  382. package/build-style/theme.css +3 -9
  383. package/build-style/verse/style-rtl.css +7 -4
  384. package/build-style/verse/style.css +7 -4
  385. package/build-style/video/editor-rtl.css +3 -3
  386. package/build-style/video/editor.css +3 -3
  387. package/build-style/video/style-rtl.css +3 -3
  388. package/build-style/video/style.css +3 -3
  389. package/build-style/video/theme-rtl.css +3 -3
  390. package/build-style/video/theme.css +3 -3
  391. package/package.json +29 -29
  392. package/src/categories/edit.js +1 -1
  393. package/src/comments/index.php +0 -1
  394. package/src/cover/edit/inspector-controls.js +4 -4
  395. package/src/freeform/edit.js +48 -29
  396. package/src/freeform/modal.js +111 -0
  397. package/src/gallery/edit.js +17 -2
  398. package/src/gallery/gallery.js +3 -13
  399. package/src/image/image.js +1 -0
  400. package/src/latest-posts/test/__snapshots__/edit.native.js.snap +3 -0
  401. package/src/latest-posts/test/edit.native.js +49 -0
  402. package/src/media-text/edit.js +1 -0
  403. package/src/missing/edit.native.js +13 -6
  404. package/src/more/test/__snapshots__/edit.native.js.snap +7 -0
  405. package/src/more/test/edit.native.js +41 -0
  406. package/src/navigation/edit/index.js +3 -4
  407. package/src/navigation/edit/menu-inspector-controls.js +70 -29
  408. package/src/navigation/edit/navigation-menu-selector.js +19 -9
  409. package/src/navigation/edit/utils.js +82 -0
  410. package/src/navigation/editor.scss +0 -7
  411. package/src/navigation/index.php +32 -0
  412. package/src/navigation/style.scss +0 -1
  413. package/src/navigation-link/edit.js +5 -58
  414. package/src/navigation-link/index.php +32 -0
  415. package/src/navigation-submenu/edit.js +29 -100
  416. package/src/navigation-submenu/index.php +32 -0
  417. package/src/page-list/block.json +18 -1
  418. package/src/page-list/edit.js +30 -22
  419. package/src/page-list/editor.scss +4 -0
  420. package/src/page-list/index.js +8 -2
  421. package/src/page-list/index.php +9 -10
  422. package/src/page-list-item/edit.js +17 -9
  423. package/src/post-featured-image/overlay.js +0 -1
  424. package/src/query/edit/index.js +1 -0
  425. package/src/query/edit/inspector-controls/index.js +49 -38
  426. package/src/query/edit/inspector-controls/taxonomy-controls.js +102 -38
  427. package/src/query/edit/query-content.js +2 -1
  428. package/src/query/edit/query-placeholder.js +15 -14
  429. package/src/query/utils.js +59 -1
  430. package/src/search/edit.js +2 -2
  431. package/src/separator/test/__snapshots__/edit.native.js.snap +7 -0
  432. package/src/separator/test/edit.native.js +41 -0
  433. package/src/social-link/edit.js +3 -3
  434. package/src/social-links/edit.js +0 -1
  435. package/src/table/style.scss +8 -0
  436. package/src/table/theme.scss +0 -8
  437. package/src/table-of-contents/edit.js +1 -1
  438. package/src/template-part/edit/advanced-controls.js +12 -0
  439. package/src/template-part/edit/import-controls.js +180 -0
  440. package/src/template-part/edit/index.js +1 -0
  441. package/src/template-part/edit/utils/transformers.js +37 -0
  442. package/src/verse/style.scss +4 -1
  443. package/src/verse/test/__snapshots__/edit.native.js.snap +13 -0
  444. package/src/verse/test/edit.native.js +40 -33
  445. package/tsconfig.tsbuildinfo +1 -1
  446. package/build/query/constants.js +0 -16
  447. package/build/query/constants.js.map +0 -1
  448. package/build-module/query/constants.js +0 -7
  449. package/build-module/query/constants.js.map +0 -1
  450. package/src/query/constants.js +0 -7
@@ -151,7 +151,8 @@ export class UnsupportedBlockEdit extends Component {
151
151
  const infoTitle = sprintf( titleFormat, blockTitle );
152
152
  const missingBlockDetail = applyFilters(
153
153
  'native.missing_block_detail',
154
- __( 'We are working hard to add more blocks with each release.' )
154
+ __( 'We are working hard to add more blocks with each release.' ),
155
+ blockName
155
156
  );
156
157
  const missingBlockActionButton = applyFilters(
157
158
  'native.missing_block_action_button',
@@ -205,11 +206,17 @@ export class UnsupportedBlockEdit extends Component {
205
206
  <Text style={ [ infoTextStyle, infoTitleStyle ] }>
206
207
  { infoTitle }
207
208
  </Text>
208
- { isEditableInUnsupportedBlockEditor && (
209
- <Text style={ [ infoTextStyle, infoDescriptionStyle ] }>
210
- { missingBlockDetail }
211
- </Text>
212
- ) }
209
+ { isEditableInUnsupportedBlockEditor &&
210
+ missingBlockDetail && (
211
+ <Text
212
+ style={ [
213
+ infoTextStyle,
214
+ infoDescriptionStyle,
215
+ ] }
216
+ >
217
+ { missingBlockDetail }
218
+ </Text>
219
+ ) }
213
220
  </View>
214
221
  { ( isUnsupportedBlockEditorSupported ||
215
222
  canEnableUnsupportedBlockEditor ) &&
@@ -0,0 +1,7 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`More block inserts block 1`] = `
4
+ "<!-- wp:more -->
5
+ <!--more-->
6
+ <!-- /wp:more -->"
7
+ `;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import {
5
+ addBlock,
6
+ getEditorHtml,
7
+ initializeEditor,
8
+ getBlock,
9
+ } from 'test/helpers';
10
+
11
+ /**
12
+ * WordPress dependencies
13
+ */
14
+ import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks';
15
+ import { registerCoreBlocks } from '@wordpress/block-library';
16
+
17
+ beforeAll( () => {
18
+ // Register all core blocks
19
+ registerCoreBlocks();
20
+ } );
21
+
22
+ afterAll( () => {
23
+ // Clean up registered blocks
24
+ getBlockTypes().forEach( ( block ) => {
25
+ unregisterBlockType( block.name );
26
+ } );
27
+ } );
28
+
29
+ describe( 'More block', () => {
30
+ it( 'inserts block', async () => {
31
+ const screen = await initializeEditor();
32
+
33
+ // Add block
34
+ await addBlock( screen, 'More' );
35
+
36
+ // Get block
37
+ const moreBlock = await getBlock( screen, 'More' );
38
+ expect( moreBlock ).toBeVisible();
39
+ expect( getEditorHtml() ).toMatchSnapshot();
40
+ } );
41
+ } );
@@ -648,7 +648,6 @@ function Navigation( {
648
648
  { hasColorSettings && (
649
649
  <>
650
650
  <ColorGradientSettingsDropdown
651
- __experimentalHasMultipleOrigins
652
651
  __experimentalIsRenderedInSidebar
653
652
  settings={ [
654
653
  {
@@ -717,13 +716,13 @@ function Navigation( {
717
716
  return (
718
717
  <TagName { ...blockProps }>
719
718
  <MenuInspectorControls
719
+ clientId={ clientId }
720
720
  createNavigationMenuIsSuccess={
721
721
  createNavigationMenuIsSuccess
722
722
  }
723
723
  createNavigationMenuIsError={ createNavigationMenuIsError }
724
724
  currentMenuId={ ref }
725
725
  isNavigationMenuMissing={ isNavigationMenuMissing }
726
- innerBlocks={ innerBlocks }
727
726
  isManageMenusButtonDisabled={ isManageMenusButtonDisabled }
728
727
  onCreateNew={ createUntitledEmptyNavigationMenu }
729
728
  onSelectClassicMenu={ onSelectClassicMenu }
@@ -759,12 +758,12 @@ function Navigation( {
759
758
  return (
760
759
  <TagName { ...blockProps }>
761
760
  <MenuInspectorControls
761
+ clientId={ clientId }
762
762
  createNavigationMenuIsSuccess={
763
763
  createNavigationMenuIsSuccess
764
764
  }
765
765
  createNavigationMenuIsError={ createNavigationMenuIsError }
766
766
  isNavigationMenuMissing={ isNavigationMenuMissing }
767
- innerBlocks={ innerBlocks }
768
767
  isManageMenusButtonDisabled={ isManageMenusButtonDisabled }
769
768
  onCreateNew={ createUntitledEmptyNavigationMenu }
770
769
  onSelectClassicMenu={ onSelectClassicMenu }
@@ -832,13 +831,13 @@ function Navigation( {
832
831
  <EntityProvider kind="postType" type="wp_navigation" id={ ref }>
833
832
  <RecursionProvider uniqueId={ recursionId }>
834
833
  <MenuInspectorControls
834
+ clientId={ clientId }
835
835
  createNavigationMenuIsSuccess={
836
836
  createNavigationMenuIsSuccess
837
837
  }
838
838
  createNavigationMenuIsError={ createNavigationMenuIsError }
839
839
  currentMenuId={ ref }
840
840
  isNavigationMenuMissing={ isNavigationMenuMissing }
841
- innerBlocks={ innerBlocks }
842
841
  isManageMenusButtonDisabled={ isManageMenusButtonDisabled }
843
842
  onCreateNew={ createUntitledEmptyNavigationMenu }
844
843
  onSelectClassicMenu={ onSelectClassicMenu }
@@ -4,8 +4,14 @@
4
4
  import {
5
5
  __experimentalOffCanvasEditor as OffCanvasEditor,
6
6
  InspectorControls,
7
+ store as blockEditorStore,
7
8
  } from '@wordpress/block-editor';
8
- import { PanelBody, VisuallyHidden } from '@wordpress/components';
9
+ import {
10
+ PanelBody,
11
+ __experimentalHStack as HStack,
12
+ __experimentalHeading as Heading,
13
+ } from '@wordpress/components';
14
+ import { useSelect } from '@wordpress/data';
9
15
  import { __ } from '@wordpress/i18n';
10
16
 
11
17
  /**
@@ -15,10 +21,11 @@ import ManageMenusButton from './manage-menus-button';
15
21
  import NavigationMenuSelector from './navigation-menu-selector';
16
22
 
17
23
  const MenuInspectorControls = ( {
24
+ clientId,
18
25
  createNavigationMenuIsSuccess,
19
26
  createNavigationMenuIsError,
20
27
  currentMenuId = null,
21
- innerBlocks,
28
+ isNavigationMenuMissing,
22
29
  isManageMenusButtonDisabled,
23
30
  onCreateNew,
24
31
  onSelectClassicMenu,
@@ -32,6 +39,16 @@ const MenuInspectorControls = ( {
32
39
  /* translators: %s: The name of a menu. */
33
40
  const actionLabel = __( "Switch to '%s'" );
34
41
 
42
+ // Provide a hierarchy of clientIds for the given Navigation block (clientId).
43
+ // This is required else the list view will display the entire block tree.
44
+ const clientIdsTree = useSelect(
45
+ ( select ) => {
46
+ const { __unstableGetClientIdsTree } = select( blockEditorStore );
47
+ return __unstableGetClientIdsTree( clientId );
48
+ },
49
+ [ clientId ]
50
+ );
51
+
35
52
  return (
36
53
  <InspectorControls __experimentalGroup={ menuControlsSlot }>
37
54
  <PanelBody
@@ -39,37 +56,61 @@ const MenuInspectorControls = ( {
39
56
  isOffCanvasNavigationEditorEnabled ? null : __( 'Menu' )
40
57
  }
41
58
  >
42
- <>
43
- { isOffCanvasNavigationEditorEnabled && (
44
- <VisuallyHidden as="h2">
45
- { __( 'Menu' ) }
46
- </VisuallyHidden>
47
- ) }
48
- <NavigationMenuSelector
49
- currentMenuId={ currentMenuId }
50
- onSelectClassicMenu={ onSelectClassicMenu }
51
- onSelectNavigationMenu={ onSelectNavigationMenu }
52
- onCreateNew={ onCreateNew }
53
- createNavigationMenuIsSuccess={
54
- createNavigationMenuIsSuccess
55
- }
56
- createNavigationMenuIsError={
57
- createNavigationMenuIsError
58
- }
59
- actionLabel={ actionLabel }
60
- />
61
- { isOffCanvasNavigationEditorEnabled ? (
62
- <OffCanvasEditor
63
- blocks={ innerBlocks }
64
- isExpanded={ true }
65
- selectBlockInCanvas={ false }
59
+ { isOffCanvasNavigationEditorEnabled ? (
60
+ <>
61
+ <HStack className="wp-block-navigation-off-canvas-editor__header">
62
+ <Heading
63
+ className="wp-block-navigation-off-canvas-editor__title"
64
+ level={ 2 }
65
+ >
66
+ { __( 'Menu' ) }
67
+ </Heading>
68
+ <NavigationMenuSelector
69
+ currentMenuId={ currentMenuId }
70
+ onSelectClassicMenu={ onSelectClassicMenu }
71
+ onSelectNavigationMenu={
72
+ onSelectNavigationMenu
73
+ }
74
+ onCreateNew={ onCreateNew }
75
+ createNavigationMenuIsSuccess={
76
+ createNavigationMenuIsSuccess
77
+ }
78
+ createNavigationMenuIsError={
79
+ createNavigationMenuIsError
80
+ }
81
+ actionLabel={ actionLabel }
82
+ />
83
+ </HStack>
84
+ { currentMenuId && isNavigationMenuMissing ? (
85
+ <p>{ __( 'Select or create a menu' ) }</p>
86
+ ) : (
87
+ <OffCanvasEditor
88
+ blocks={ clientIdsTree }
89
+ isExpanded={ true }
90
+ selectBlockInCanvas={ false }
91
+ />
92
+ ) }
93
+ </>
94
+ ) : (
95
+ <>
96
+ <NavigationMenuSelector
97
+ currentMenuId={ currentMenuId }
98
+ onSelectClassicMenu={ onSelectClassicMenu }
99
+ onSelectNavigationMenu={ onSelectNavigationMenu }
100
+ onCreateNew={ onCreateNew }
101
+ createNavigationMenuIsSuccess={
102
+ createNavigationMenuIsSuccess
103
+ }
104
+ createNavigationMenuIsError={
105
+ createNavigationMenuIsError
106
+ }
107
+ actionLabel={ actionLabel }
66
108
  />
67
- ) : (
68
109
  <ManageMenusButton
69
110
  disabled={ isManageMenusButtonDisabled }
70
111
  />
71
- ) }
72
- </>
112
+ </>
113
+ ) }
73
114
  </PanelBody>
74
115
  </InspectorControls>
75
116
  );
@@ -10,7 +10,7 @@ import {
10
10
  VisuallyHidden,
11
11
  } from '@wordpress/components';
12
12
  import { useEntityProp } from '@wordpress/core-data';
13
- import { Icon, chevronUp, chevronDown } from '@wordpress/icons';
13
+ import { Icon, chevronUp, chevronDown, moreVertical } from '@wordpress/icons';
14
14
  import { __, sprintf } from '@wordpress/i18n';
15
15
  import { decodeEntities } from '@wordpress/html-entities';
16
16
  import { useEffect, useMemo, useState } from '@wordpress/element';
@@ -31,6 +31,8 @@ function NavigationMenuSelector( {
31
31
  createNavigationMenuIsError,
32
32
  toggleProps = {},
33
33
  } ) {
34
+ const isOffCanvasNavigationEditorEnabled =
35
+ window?.__experimentalEnableOffCanvasNavigationEditor === true;
34
36
  /* translators: %s: The name of a menu. */
35
37
  const createActionLabel = __( "Create from '%s'" );
36
38
 
@@ -140,7 +142,11 @@ function NavigationMenuSelector( {
140
142
  },
141
143
  };
142
144
 
143
- if ( ! hasNavigationMenus && ! hasClassicMenus ) {
145
+ if (
146
+ ! hasNavigationMenus &&
147
+ ! hasClassicMenus &&
148
+ ! isOffCanvasNavigationEditorEnabled
149
+ ) {
144
150
  return (
145
151
  <Button
146
152
  className="wp-block-navigation__navigation-selector-button--createnew"
@@ -161,15 +167,19 @@ function NavigationMenuSelector( {
161
167
 
162
168
  return (
163
169
  <DropdownMenu
164
- className="wp-block-navigation__navigation-selector"
170
+ className={
171
+ isOffCanvasNavigationEditorEnabled
172
+ ? ''
173
+ : 'wp-block-navigation__navigation-selector'
174
+ }
165
175
  label={ selectorLabel }
166
- text={
167
- <span className="wp-block-navigation__navigation-selector-button__label">
168
- { selectorLabel }
169
- </span>
176
+ text={ isOffCanvasNavigationEditorEnabled ? '' : selectorLabel }
177
+ icon={ isOffCanvasNavigationEditorEnabled ? moreVertical : null }
178
+ toggleProps={
179
+ isOffCanvasNavigationEditorEnabled
180
+ ? { isSmall: true }
181
+ : toggleProps
170
182
  }
171
- icon={ null }
172
- toggleProps={ toggleProps }
173
183
  >
174
184
  { ( { onClose } ) => (
175
185
  <>
@@ -1,3 +1,8 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
1
6
  function getComputedStyle( node ) {
2
7
  return node.ownerDocument.defaultView.getComputedStyle( node );
3
8
  }
@@ -28,3 +33,80 @@ export function detectColors(
28
33
 
29
34
  setBackground( backgroundColor );
30
35
  }
36
+
37
+ /**
38
+ * Determine the colors for a menu.
39
+ *
40
+ * Order of priority is:
41
+ * 1: Overlay custom colors (if submenu)
42
+ * 2: Overlay theme colors (if submenu)
43
+ * 3: Custom colors
44
+ * 4: Theme colors
45
+ * 5: Global styles
46
+ *
47
+ * @param {Object} context
48
+ * @param {boolean} isSubMenu
49
+ */
50
+ export function getColors( context, isSubMenu ) {
51
+ const {
52
+ textColor,
53
+ customTextColor,
54
+ backgroundColor,
55
+ customBackgroundColor,
56
+ overlayTextColor,
57
+ customOverlayTextColor,
58
+ overlayBackgroundColor,
59
+ customOverlayBackgroundColor,
60
+ style,
61
+ } = context;
62
+
63
+ const colors = {};
64
+
65
+ if ( isSubMenu && !! customOverlayTextColor ) {
66
+ colors.customTextColor = customOverlayTextColor;
67
+ } else if ( isSubMenu && !! overlayTextColor ) {
68
+ colors.textColor = overlayTextColor;
69
+ } else if ( !! customTextColor ) {
70
+ colors.customTextColor = customTextColor;
71
+ } else if ( !! textColor ) {
72
+ colors.textColor = textColor;
73
+ } else if ( !! style?.color?.text ) {
74
+ colors.customTextColor = style.color.text;
75
+ }
76
+
77
+ if ( isSubMenu && !! customOverlayBackgroundColor ) {
78
+ colors.customBackgroundColor = customOverlayBackgroundColor;
79
+ } else if ( isSubMenu && !! overlayBackgroundColor ) {
80
+ colors.backgroundColor = overlayBackgroundColor;
81
+ } else if ( !! customBackgroundColor ) {
82
+ colors.customBackgroundColor = customBackgroundColor;
83
+ } else if ( !! backgroundColor ) {
84
+ colors.backgroundColor = backgroundColor;
85
+ } else if ( !! style?.color?.background ) {
86
+ colors.customTextColor = style.color.background;
87
+ }
88
+
89
+ return colors;
90
+ }
91
+
92
+ export function getNavigationChildBlockProps( innerBlocksColors ) {
93
+ return {
94
+ className: classnames( 'wp-block-navigation__submenu-container', {
95
+ 'has-text-color': !! (
96
+ innerBlocksColors.textColor || innerBlocksColors.customTextColor
97
+ ),
98
+ [ `has-${ innerBlocksColors.textColor }-color` ]:
99
+ !! innerBlocksColors.textColor,
100
+ 'has-background': !! (
101
+ innerBlocksColors.backgroundColor ||
102
+ innerBlocksColors.customBackgroundColor
103
+ ),
104
+ [ `has-${ innerBlocksColors.backgroundColor }-background-color` ]:
105
+ !! innerBlocksColors.backgroundColor,
106
+ } ),
107
+ style: {
108
+ color: innerBlocksColors.customTextColor,
109
+ backgroundColor: innerBlocksColors.customBackgroundColor,
110
+ },
111
+ };
112
+ }
@@ -32,13 +32,6 @@
32
32
  * Submenus.
33
33
  */
34
34
 
35
- // Ensure sub-menus stay open and visible when a nested block is selected.
36
- .wp-block-navigation__container.is-parent-of-selected-block {
37
- visibility: visible;
38
- opacity: 1;
39
- overflow: visible;
40
- }
41
-
42
35
  // Low specificity default to ensure background color applies to submenus.
43
36
  .wp-block-navigation__container,
44
37
  .wp-block-navigation-item {
@@ -856,3 +856,35 @@ function block_core_navigation_typographic_presets_backcompatibility( $parsed_bl
856
856
  }
857
857
 
858
858
  add_filter( 'render_block_data', 'block_core_navigation_typographic_presets_backcompatibility' );
859
+
860
+ /**
861
+ * Enables animation of the block inspector for the Navigation block.
862
+ *
863
+ * See:
864
+ * - https://github.com/WordPress/gutenberg/pull/46342
865
+ * - https://github.com/WordPress/gutenberg/issues/45884
866
+ *
867
+ * @param array $settings Default editor settings.
868
+ * @return array Filtered editor settings.
869
+ */
870
+ function gutenberg_enable_animation_for_navigation_inspector( $settings ) {
871
+ $current_animation_settings = _wp_array_get(
872
+ $settings,
873
+ array( '__experimentalBlockInspectorAnimation' ),
874
+ array()
875
+ );
876
+
877
+ $settings['__experimentalBlockInspectorAnimation'] = array_merge(
878
+ $current_animation_settings,
879
+ array(
880
+ 'core/navigation' =>
881
+ array(
882
+ 'enterDirection' => 'leftToRight',
883
+ ),
884
+ )
885
+ );
886
+
887
+ return $settings;
888
+ }
889
+
890
+ add_filter( 'block_editor_settings_all', 'gutenberg_enable_animation_for_navigation_inspector' );
@@ -533,7 +533,6 @@ button.wp-block-navigation-item__content {
533
533
  }
534
534
 
535
535
  // Always expand/unfold submenus inside the modal.
536
- .has-child .submenu-container,
537
536
  .has-child .wp-block-navigation__submenu-container {
538
537
  // Unset CSS that hides dropdown menus.
539
538
  opacity: 1;
@@ -30,7 +30,7 @@ import {
30
30
  useInnerBlocksProps,
31
31
  } from '@wordpress/block-editor';
32
32
  import { isURL, prependHTTP } from '@wordpress/url';
33
- import { Fragment, useState, useEffect, useRef } from '@wordpress/element';
33
+ import { useState, useEffect, useRef } from '@wordpress/element';
34
34
  import {
35
35
  placeCaretAtHorizontalEdge,
36
36
  __unstableStripHTML as stripHTML,
@@ -48,6 +48,7 @@ import { useMergeRefs } from '@wordpress/compose';
48
48
  import { name } from './block.json';
49
49
  import { LinkUI } from './link-ui';
50
50
  import { updateAttributes } from './update-attributes';
51
+ import { getColors } from '../navigation/edit/utils';
51
52
 
52
53
  /**
53
54
  * A React hook to determine if it's dragging within the target element.
@@ -100,61 +101,6 @@ const useIsDraggingWithin = ( elementRef ) => {
100
101
  return isDraggingWithin;
101
102
  };
102
103
 
103
- /**
104
- * Determine the colors for a menu.
105
- *
106
- * Order of priority is:
107
- * 1: Overlay custom colors (if submenu)
108
- * 2: Overlay theme colors (if submenu)
109
- * 3: Custom colors
110
- * 4: Theme colors
111
- * 5: Global styles
112
- *
113
- * @param {Object} context
114
- * @param {boolean} isSubMenu
115
- */
116
- function getColors( context, isSubMenu ) {
117
- const {
118
- textColor,
119
- customTextColor,
120
- backgroundColor,
121
- customBackgroundColor,
122
- overlayTextColor,
123
- customOverlayTextColor,
124
- overlayBackgroundColor,
125
- customOverlayBackgroundColor,
126
- style,
127
- } = context;
128
-
129
- const colors = {};
130
-
131
- if ( isSubMenu && !! customOverlayTextColor ) {
132
- colors.customTextColor = customOverlayTextColor;
133
- } else if ( isSubMenu && !! overlayTextColor ) {
134
- colors.textColor = overlayTextColor;
135
- } else if ( !! customTextColor ) {
136
- colors.customTextColor = customTextColor;
137
- } else if ( !! textColor ) {
138
- colors.textColor = textColor;
139
- } else if ( !! style?.color?.text ) {
140
- colors.customTextColor = style.color.text;
141
- }
142
-
143
- if ( isSubMenu && !! customOverlayBackgroundColor ) {
144
- colors.customBackgroundColor = customOverlayBackgroundColor;
145
- } else if ( isSubMenu && !! overlayBackgroundColor ) {
146
- colors.backgroundColor = overlayBackgroundColor;
147
- } else if ( !! customBackgroundColor ) {
148
- colors.customBackgroundColor = customBackgroundColor;
149
- } else if ( !! backgroundColor ) {
150
- colors.backgroundColor = backgroundColor;
151
- } else if ( !! style?.color?.background ) {
152
- colors.customTextColor = style.color.background;
153
- }
154
-
155
- return colors;
156
- }
157
-
158
104
  const useIsInvalidLink = ( kind, type, id ) => {
159
105
  const isPostType =
160
106
  kind === 'post-type' || type === 'post' || type === 'page';
@@ -455,7 +401,7 @@ export default function NavigationLinkEdit( {
455
401
  : __( 'This item is missing a link' );
456
402
 
457
403
  return (
458
- <Fragment>
404
+ <>
459
405
  <BlockControls>
460
406
  <ToolbarGroup>
461
407
  <ToolbarButton
@@ -495,6 +441,7 @@ export default function NavigationLinkEdit( {
495
441
  autoComplete="off"
496
442
  />
497
443
  <TextareaControl
444
+ __nextHasNoMarginBottom
498
445
  value={ description || '' }
499
446
  onChange={ ( descriptionValue ) => {
500
447
  setAttributes( { description: descriptionValue } );
@@ -644,6 +591,6 @@ export default function NavigationLinkEdit( {
644
591
  </a>
645
592
  <div { ...innerBlocksProps } />
646
593
  </div>
647
- </Fragment>
594
+ </>
648
595
  );
649
596
  }
@@ -376,3 +376,35 @@ function gutenberg_disable_tabs_for_navigation_link_block( $settings ) {
376
376
  }
377
377
 
378
378
  add_filter( 'block_editor_settings_all', 'gutenberg_disable_tabs_for_navigation_link_block' );
379
+
380
+ /**
381
+ * Enables animation of the block inspector for the Navigation Link block.
382
+ *
383
+ * See:
384
+ * - https://github.com/WordPress/gutenberg/pull/46342
385
+ * - https://github.com/WordPress/gutenberg/issues/45884
386
+ *
387
+ * @param array $settings Default editor settings.
388
+ * @return array Filtered editor settings.
389
+ */
390
+ function gutenberg_enable_animation_for_navigation_link_inspector( $settings ) {
391
+ $current_animation_settings = _wp_array_get(
392
+ $settings,
393
+ array( '__experimentalBlockInspectorAnimation' ),
394
+ array()
395
+ );
396
+
397
+ $settings['__experimentalBlockInspectorAnimation'] = array_merge(
398
+ $current_animation_settings,
399
+ array(
400
+ 'core/navigation-link' =>
401
+ array(
402
+ 'enterDirection' => 'rightToLeft',
403
+ ),
404
+ )
405
+ );
406
+
407
+ return $settings;
408
+ }
409
+
410
+ add_filter( 'block_editor_settings_all', 'gutenberg_enable_animation_for_navigation_link_inspector' );