@wordpress/block-library 9.3.0 → 9.4.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 (392) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/block/edit.js +38 -23
  3. package/build/block/edit.js.map +1 -1
  4. package/build/button/edit.js +1 -1
  5. package/build/button/edit.js.map +1 -1
  6. package/build/buttons/index.js +26 -0
  7. package/build/buttons/index.js.map +1 -1
  8. package/build/categories/edit.js +20 -3
  9. package/build/categories/edit.js.map +1 -1
  10. package/build/categories/index.js +8 -0
  11. package/build/categories/index.js.map +1 -1
  12. package/build/columns/index.js +2 -2
  13. package/build/columns/index.js.map +1 -1
  14. package/build/cover/edit/inspector-controls.js +2 -1
  15. package/build/cover/edit/inspector-controls.js.map +1 -1
  16. package/build/embed/variations.js +39 -34
  17. package/build/embed/variations.js.map +1 -1
  18. package/build/footnotes/index.js +1 -1
  19. package/build/footnotes/index.js.map +1 -1
  20. package/build/form-input/edit.js +2 -0
  21. package/build/form-input/edit.js.map +1 -1
  22. package/build/gallery/index.js +10 -0
  23. package/build/gallery/index.js.map +1 -1
  24. package/build/group/deprecated.js +2 -5
  25. package/build/group/deprecated.js.map +1 -1
  26. package/build/heading/index.js +14 -1
  27. package/build/heading/index.js.map +1 -1
  28. package/build/image/edit.js +1 -1
  29. package/build/image/edit.js.map +1 -1
  30. package/build/image/image.js +24 -11
  31. package/build/image/image.js.map +1 -1
  32. package/build/image/index.js +3 -0
  33. package/build/image/index.js.map +1 -1
  34. package/build/image/view.js +65 -49
  35. package/build/image/view.js.map +1 -1
  36. package/build/latest-comments/index.js +9 -0
  37. package/build/latest-comments/index.js.map +1 -1
  38. package/build/list/edit.js +3 -3
  39. package/build/list/edit.js.map +1 -1
  40. package/build/list-item/edit.js +2 -2
  41. package/build/list-item/edit.js.map +1 -1
  42. package/build/list-item/hooks/index.js +0 -7
  43. package/build/list-item/hooks/index.js.map +1 -1
  44. package/build/media-text/index.js +12 -0
  45. package/build/media-text/index.js.map +1 -1
  46. package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
  47. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  48. package/build/navigation/use-navigation-menu.js +5 -1
  49. package/build/navigation/use-navigation-menu.js.map +1 -1
  50. package/build/navigation-link/link-ui.js +13 -17
  51. package/build/navigation-link/link-ui.js.map +1 -1
  52. package/build/navigation-submenu/edit.js +0 -11
  53. package/build/navigation-submenu/edit.js.map +1 -1
  54. package/build/page-list/edit.js +1 -0
  55. package/build/page-list/edit.js.map +1 -1
  56. package/build/page-list-item/edit.js +4 -1
  57. package/build/page-list-item/edit.js.map +1 -1
  58. package/build/paragraph/index.js +6 -0
  59. package/build/paragraph/index.js.map +1 -1
  60. package/build/paragraph/transforms.js +6 -0
  61. package/build/paragraph/transforms.js.map +1 -1
  62. package/build/post-author/index.js +8 -0
  63. package/build/post-author/index.js.map +1 -1
  64. package/build/post-author-biography/index.js +3 -0
  65. package/build/post-author-biography/index.js.map +1 -1
  66. package/build/post-author-name/index.js +3 -0
  67. package/build/post-author-name/index.js.map +1 -1
  68. package/build/post-date/index.js +3 -0
  69. package/build/post-date/index.js.map +1 -1
  70. package/build/post-excerpt/edit.js +1 -0
  71. package/build/post-excerpt/edit.js.map +1 -1
  72. package/build/post-featured-image/index.js +3 -0
  73. package/build/post-featured-image/index.js.map +1 -1
  74. package/build/post-terms/index.js +3 -0
  75. package/build/post-terms/index.js.map +1 -1
  76. package/build/post-title/edit.js +5 -1
  77. package/build/post-title/edit.js.map +1 -1
  78. package/build/query/edit/inspector-controls/author-control.js +3 -1
  79. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  80. package/build/query/edit/inspector-controls/index.js +24 -6
  81. package/build/query/edit/inspector-controls/index.js.map +1 -1
  82. package/build/query/edit/inspector-controls/order-control.js +1 -0
  83. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  84. package/build/query/edit/inspector-controls/parent-control.js +2 -1
  85. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  86. package/build/query/edit/inspector-controls/sticky-control.js +1 -0
  87. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  88. package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
  89. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  90. package/build/query/edit/query-content.js +11 -2
  91. package/build/query/edit/query-content.js.map +1 -1
  92. package/build/query/edit/query-placeholder.js +1 -14
  93. package/build/query/edit/query-placeholder.js.map +1 -1
  94. package/build/query/utils.js +5 -1
  95. package/build/query/utils.js.map +1 -1
  96. package/build/query/variations.js +9 -55
  97. package/build/query/variations.js.map +1 -1
  98. package/build/query-pagination-numbers/edit.js +1 -0
  99. package/build/query-pagination-numbers/edit.js.map +1 -1
  100. package/build/query-title/edit.js +11 -19
  101. package/build/query-title/edit.js.map +1 -1
  102. package/build/query-title/use-archive-label.js +95 -0
  103. package/build/query-title/use-archive-label.js.map +1 -0
  104. package/build/quote/index.js +15 -1
  105. package/build/quote/index.js.map +1 -1
  106. package/build/search/index.js +3 -0
  107. package/build/search/index.js.map +1 -1
  108. package/build/site-logo/edit.js +4 -1
  109. package/build/site-logo/edit.js.map +1 -1
  110. package/build/site-tagline/edit.js +5 -2
  111. package/build/site-tagline/edit.js.map +1 -1
  112. package/build/site-tagline/index.js +6 -1
  113. package/build/site-tagline/index.js.map +1 -1
  114. package/build/site-title/edit.js +4 -1
  115. package/build/site-title/edit.js.map +1 -1
  116. package/build/site-title/index.js +6 -1
  117. package/build/site-title/index.js.map +1 -1
  118. package/build/social-link/icons/soundcloud.js +1 -1
  119. package/build/social-link/icons/soundcloud.js.map +1 -1
  120. package/build/social-links/index.js +12 -0
  121. package/build/social-links/index.js.map +1 -1
  122. package/build/tag-cloud/edit.js +4 -1
  123. package/build/tag-cloud/edit.js.map +1 -1
  124. package/build/template-part/edit/index.js +5 -3
  125. package/build/template-part/edit/index.js.map +1 -1
  126. package/build/template-part/edit/inner-blocks.js +8 -3
  127. package/build/template-part/edit/inner-blocks.js.map +1 -1
  128. package/build/template-part/edit/placeholder.js +23 -3
  129. package/build/template-part/edit/placeholder.js.map +1 -1
  130. package/build/template-part/edit/title-modal.js +20 -8
  131. package/build/template-part/edit/title-modal.js.map +1 -1
  132. package/build/term-description/index.js +12 -0
  133. package/build/term-description/index.js.map +1 -1
  134. package/build/utils/hooks.js +5 -1
  135. package/build/utils/hooks.js.map +1 -1
  136. package/build-module/block/edit.js +38 -23
  137. package/build-module/block/edit.js.map +1 -1
  138. package/build-module/button/edit.js +1 -1
  139. package/build-module/button/edit.js.map +1 -1
  140. package/build-module/buttons/index.js +26 -0
  141. package/build-module/buttons/index.js.map +1 -1
  142. package/build-module/categories/edit.js +21 -4
  143. package/build-module/categories/edit.js.map +1 -1
  144. package/build-module/categories/index.js +8 -0
  145. package/build-module/categories/index.js.map +1 -1
  146. package/build-module/columns/index.js +2 -2
  147. package/build-module/columns/index.js.map +1 -1
  148. package/build-module/cover/edit/inspector-controls.js +2 -1
  149. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  150. package/build-module/embed/variations.js +40 -35
  151. package/build-module/embed/variations.js.map +1 -1
  152. package/build-module/footnotes/index.js +1 -1
  153. package/build-module/footnotes/index.js.map +1 -1
  154. package/build-module/form-input/edit.js +2 -0
  155. package/build-module/form-input/edit.js.map +1 -1
  156. package/build-module/gallery/index.js +10 -0
  157. package/build-module/gallery/index.js.map +1 -1
  158. package/build-module/group/deprecated.js +2 -5
  159. package/build-module/group/deprecated.js.map +1 -1
  160. package/build-module/heading/index.js +14 -1
  161. package/build-module/heading/index.js.map +1 -1
  162. package/build-module/image/edit.js +1 -1
  163. package/build-module/image/edit.js.map +1 -1
  164. package/build-module/image/image.js +25 -12
  165. package/build-module/image/image.js.map +1 -1
  166. package/build-module/image/index.js +3 -0
  167. package/build-module/image/index.js.map +1 -1
  168. package/build-module/image/view.js +65 -49
  169. package/build-module/image/view.js.map +1 -1
  170. package/build-module/latest-comments/index.js +9 -0
  171. package/build-module/latest-comments/index.js.map +1 -1
  172. package/build-module/list/edit.js +3 -3
  173. package/build-module/list/edit.js.map +1 -1
  174. package/build-module/list-item/edit.js +2 -2
  175. package/build-module/list-item/edit.js.map +1 -1
  176. package/build-module/list-item/hooks/index.js +0 -1
  177. package/build-module/list-item/hooks/index.js.map +1 -1
  178. package/build-module/media-text/index.js +12 -0
  179. package/build-module/media-text/index.js.map +1 -1
  180. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
  181. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  182. package/build-module/navigation/use-navigation-menu.js +5 -1
  183. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  184. package/build-module/navigation-link/link-ui.js +13 -17
  185. package/build-module/navigation-link/link-ui.js.map +1 -1
  186. package/build-module/navigation-submenu/edit.js +0 -11
  187. package/build-module/navigation-submenu/edit.js.map +1 -1
  188. package/build-module/page-list/edit.js +1 -0
  189. package/build-module/page-list/edit.js.map +1 -1
  190. package/build-module/page-list-item/edit.js +4 -1
  191. package/build-module/page-list-item/edit.js.map +1 -1
  192. package/build-module/paragraph/index.js +6 -0
  193. package/build-module/paragraph/index.js.map +1 -1
  194. package/build-module/paragraph/transforms.js +6 -0
  195. package/build-module/paragraph/transforms.js.map +1 -1
  196. package/build-module/post-author/index.js +8 -0
  197. package/build-module/post-author/index.js.map +1 -1
  198. package/build-module/post-author-biography/index.js +3 -0
  199. package/build-module/post-author-biography/index.js.map +1 -1
  200. package/build-module/post-author-name/index.js +3 -0
  201. package/build-module/post-author-name/index.js.map +1 -1
  202. package/build-module/post-date/index.js +3 -0
  203. package/build-module/post-date/index.js.map +1 -1
  204. package/build-module/post-excerpt/edit.js +1 -0
  205. package/build-module/post-excerpt/edit.js.map +1 -1
  206. package/build-module/post-featured-image/index.js +3 -0
  207. package/build-module/post-featured-image/index.js.map +1 -1
  208. package/build-module/post-terms/index.js +3 -0
  209. package/build-module/post-terms/index.js.map +1 -1
  210. package/build-module/post-title/edit.js +5 -1
  211. package/build-module/post-title/edit.js.map +1 -1
  212. package/build-module/query/edit/inspector-controls/author-control.js +3 -1
  213. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  214. package/build-module/query/edit/inspector-controls/index.js +25 -7
  215. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  216. package/build-module/query/edit/inspector-controls/order-control.js +1 -0
  217. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  218. package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
  219. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  220. package/build-module/query/edit/inspector-controls/sticky-control.js +1 -0
  221. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  222. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
  223. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  224. package/build-module/query/edit/query-content.js +11 -2
  225. package/build-module/query/edit/query-content.js.map +1 -1
  226. package/build-module/query/edit/query-placeholder.js +1 -14
  227. package/build-module/query/edit/query-placeholder.js.map +1 -1
  228. package/build-module/query/utils.js +5 -1
  229. package/build-module/query/utils.js.map +1 -1
  230. package/build-module/query/variations.js +4 -50
  231. package/build-module/query/variations.js.map +1 -1
  232. package/build-module/query-pagination-numbers/edit.js +1 -0
  233. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  234. package/build-module/query-title/edit.js +12 -20
  235. package/build-module/query-title/edit.js.map +1 -1
  236. package/build-module/query-title/use-archive-label.js +88 -0
  237. package/build-module/query-title/use-archive-label.js.map +1 -0
  238. package/build-module/quote/index.js +15 -1
  239. package/build-module/quote/index.js.map +1 -1
  240. package/build-module/search/index.js +3 -0
  241. package/build-module/search/index.js.map +1 -1
  242. package/build-module/site-logo/edit.js +4 -1
  243. package/build-module/site-logo/edit.js.map +1 -1
  244. package/build-module/site-tagline/edit.js +5 -2
  245. package/build-module/site-tagline/edit.js.map +1 -1
  246. package/build-module/site-tagline/index.js +6 -1
  247. package/build-module/site-tagline/index.js.map +1 -1
  248. package/build-module/site-title/edit.js +4 -1
  249. package/build-module/site-title/edit.js.map +1 -1
  250. package/build-module/site-title/index.js +6 -1
  251. package/build-module/site-title/index.js.map +1 -1
  252. package/build-module/social-link/icons/soundcloud.js +1 -1
  253. package/build-module/social-link/icons/soundcloud.js.map +1 -1
  254. package/build-module/social-links/index.js +12 -0
  255. package/build-module/social-links/index.js.map +1 -1
  256. package/build-module/tag-cloud/edit.js +4 -1
  257. package/build-module/tag-cloud/edit.js.map +1 -1
  258. package/build-module/template-part/edit/index.js +5 -3
  259. package/build-module/template-part/edit/index.js.map +1 -1
  260. package/build-module/template-part/edit/inner-blocks.js +8 -3
  261. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  262. package/build-module/template-part/edit/placeholder.js +23 -3
  263. package/build-module/template-part/edit/placeholder.js.map +1 -1
  264. package/build-module/template-part/edit/title-modal.js +20 -8
  265. package/build-module/template-part/edit/title-modal.js.map +1 -1
  266. package/build-module/term-description/index.js +12 -0
  267. package/build-module/term-description/index.js.map +1 -1
  268. package/build-module/utils/hooks.js +5 -1
  269. package/build-module/utils/hooks.js.map +1 -1
  270. package/build-style/categories/editor-rtl.css +4 -0
  271. package/build-style/categories/editor.css +4 -0
  272. package/build-style/categories/style-rtl.css +4 -0
  273. package/build-style/categories/style.css +4 -0
  274. package/build-style/editor-rtl.css +13 -12
  275. package/build-style/editor.css +13 -12
  276. package/build-style/image/editor-rtl.css +8 -4
  277. package/build-style/image/editor.css +8 -4
  278. package/build-style/image/style-rtl.css +19 -0
  279. package/build-style/image/style.css +19 -0
  280. package/build-style/list/style-rtl.css +1 -1
  281. package/build-style/list/style.css +1 -1
  282. package/build-style/navigation/style-rtl.css +1 -4
  283. package/build-style/navigation/style.css +1 -4
  284. package/build-style/post-comments-form/style-rtl.css +1 -1
  285. package/build-style/post-comments-form/style.css +1 -1
  286. package/build-style/query/editor-rtl.css +0 -7
  287. package/build-style/query/editor.css +0 -7
  288. package/build-style/search/editor-rtl.css +1 -1
  289. package/build-style/search/editor.css +1 -1
  290. package/build-style/social-links/style-rtl.css +2 -2
  291. package/build-style/social-links/style.css +2 -2
  292. package/build-style/style-rtl.css +29 -8
  293. package/build-style/style.css +29 -8
  294. package/build-style/term-description/style-rtl.css +1 -0
  295. package/build-style/term-description/style.css +1 -0
  296. package/package.json +35 -35
  297. package/src/block/edit.js +58 -27
  298. package/src/block/test/edit.native.js +6 -2
  299. package/src/button/edit.js +1 -1
  300. package/src/button/index.php +2 -2
  301. package/src/buttons/block.json +20 -0
  302. package/src/buttons/index.js +6 -0
  303. package/src/categories/block.json +8 -0
  304. package/src/categories/edit.js +32 -4
  305. package/src/categories/editor.scss +4 -0
  306. package/src/categories/index.php +4 -1
  307. package/src/categories/style.scss +4 -0
  308. package/src/columns/index.js +1 -1
  309. package/src/cover/edit/inspector-controls.js +1 -0
  310. package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
  311. package/src/embed/test/index.js +1 -1
  312. package/src/embed/test/index.native.js +24 -23
  313. package/src/embed/variations.js +43 -35
  314. package/src/footnotes/index.js +1 -2
  315. package/src/form-input/edit.js +2 -0
  316. package/src/gallery/block.json +10 -0
  317. package/src/group/deprecated.js +3 -7
  318. package/src/heading/block.json +12 -0
  319. package/src/heading/index.js +1 -0
  320. package/src/image/block.json +3 -0
  321. package/src/image/edit.js +1 -1
  322. package/src/image/editor.scss +6 -1
  323. package/src/image/image.js +55 -35
  324. package/src/image/index.php +32 -15
  325. package/src/image/style.scss +22 -0
  326. package/src/image/test/edit.native.js +1 -0
  327. package/src/image/view.js +69 -49
  328. package/src/latest-comments/block.json +9 -0
  329. package/src/list/edit.js +3 -3
  330. package/src/list/style.scss +1 -1
  331. package/src/list-item/edit.js +2 -2
  332. package/src/list-item/hooks/index.js +0 -1
  333. package/src/media-text/block.json +12 -0
  334. package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
  335. package/src/navigation/index.php +1 -1
  336. package/src/navigation/style.scss +4 -9
  337. package/src/navigation/test/use-navigation-menu.js +54 -15
  338. package/src/navigation/use-navigation-menu.js +5 -1
  339. package/src/navigation-link/link-ui.js +8 -14
  340. package/src/navigation-submenu/edit.js +1 -13
  341. package/src/page-list/edit.js +1 -0
  342. package/src/page-list-item/edit.js +4 -4
  343. package/src/paragraph/block.json +6 -0
  344. package/src/post-author/index.js +8 -0
  345. package/src/post-author-biography/block.json +3 -0
  346. package/src/post-author-name/block.json +3 -0
  347. package/src/post-comments-form/style.scss +1 -1
  348. package/src/post-date/block.json +3 -0
  349. package/src/post-excerpt/edit.js +1 -0
  350. package/src/post-featured-image/block.json +3 -0
  351. package/src/post-terms/block.json +3 -0
  352. package/src/post-title/edit.js +5 -5
  353. package/src/query/edit/inspector-controls/author-control.js +2 -0
  354. package/src/query/edit/inspector-controls/index.js +41 -14
  355. package/src/query/edit/inspector-controls/order-control.js +1 -0
  356. package/src/query/edit/inspector-controls/parent-control.js +1 -0
  357. package/src/query/edit/inspector-controls/sticky-control.js +1 -0
  358. package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
  359. package/src/query/edit/query-content.js +17 -3
  360. package/src/query/edit/query-placeholder.js +1 -21
  361. package/src/query/editor.scss +0 -9
  362. package/src/query/utils.js +4 -0
  363. package/src/query/variations.js +4 -46
  364. package/src/query-pagination-numbers/edit.js +1 -0
  365. package/src/query-title/edit.js +10 -17
  366. package/src/query-title/use-archive-label.js +99 -0
  367. package/src/quote/block.json +15 -1
  368. package/src/search/block.json +3 -0
  369. package/src/search/editor.scss +1 -1
  370. package/src/site-logo/edit.js +4 -1
  371. package/src/site-tagline/block.json +6 -1
  372. package/src/site-tagline/edit.js +5 -2
  373. package/src/site-title/edit.js +4 -1
  374. package/src/site-title/index.js +6 -1
  375. package/src/social-link/icons/soundcloud.js +1 -1
  376. package/src/social-link/socials-with-bg.scss +1 -1
  377. package/src/social-link/socials-without-bg.scss +1 -1
  378. package/src/social-links/block.json +12 -0
  379. package/src/tag-cloud/edit.js +7 -1
  380. package/src/template-part/edit/index.js +5 -3
  381. package/src/template-part/edit/inner-blocks.js +8 -5
  382. package/src/template-part/edit/placeholder.js +31 -6
  383. package/src/template-part/edit/title-modal.js +18 -4
  384. package/src/term-description/block.json +12 -0
  385. package/src/term-description/style.scss +2 -0
  386. package/src/utils/hooks.js +5 -1
  387. package/tsconfig.tsbuildinfo +1 -1
  388. package/build/list-item/hooks/use-split.js +0 -39
  389. package/build/list-item/hooks/use-split.js.map +0 -1
  390. package/build-module/list-item/hooks/use-split.js +0 -32
  391. package/build-module/list-item/hooks/use-split.js.map +0 -1
  392. package/src/list-item/hooks/use-split.js +0 -33
@@ -308,6 +308,10 @@
308
308
  .wp-block-categories.wp-block-categories-dropdown.aligncenter {
309
309
  text-align: center;
310
310
  }
311
+ .wp-block-categories .wp-block-categories__label {
312
+ width: 100%;
313
+ display: block;
314
+ }
311
315
 
312
316
  .wp-block-code {
313
317
  box-sizing: border-box;
@@ -1530,6 +1534,14 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
1530
1534
  vertical-align: bottom;
1531
1535
  box-sizing: border-box;
1532
1536
  }
1537
+ @media (prefers-reduced-motion: no-preference) {
1538
+ .wp-block-image img.hide {
1539
+ visibility: hidden;
1540
+ }
1541
+ .wp-block-image img.show {
1542
+ animation: show-content-image 0.4s;
1543
+ }
1544
+ }
1533
1545
  .wp-block-image[style*=border-radius] > a,
1534
1546
  .wp-block-image[style*=border-radius] img {
1535
1547
  border-radius: inherit;
@@ -1773,6 +1785,17 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
1773
1785
  }
1774
1786
  }
1775
1787
 
1788
+ @keyframes show-content-image {
1789
+ 0% {
1790
+ visibility: hidden;
1791
+ }
1792
+ 99% {
1793
+ visibility: hidden;
1794
+ }
1795
+ 100% {
1796
+ visibility: visible;
1797
+ }
1798
+ }
1776
1799
  @keyframes turn-on-visibility {
1777
1800
  0% {
1778
1801
  opacity: 0;
@@ -1977,7 +2000,7 @@ ul {
1977
2000
  box-sizing: border-box;
1978
2001
  }
1979
2002
 
1980
- :root :where(ul.has-background, ol.has-background) {
2003
+ :root :where(.wp-block-list.has-background) {
1981
2004
  padding: 1.25em 2.375em;
1982
2005
  }
1983
2006
 
@@ -2133,10 +2156,7 @@ ul {
2133
2156
  .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active {
2134
2157
  text-decoration: line-through;
2135
2158
  }
2136
- .wp-block-navigation:where(:not([class*="has-text-decoration"])) a {
2137
- text-decoration: none;
2138
- }
2139
- .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:focus, .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:active {
2159
+ .wp-block-navigation :where(a), .wp-block-navigation :where(a:focus), .wp-block-navigation :where(a:active) {
2140
2160
  text-decoration: none;
2141
2161
  }
2142
2162
  .wp-block-navigation .wp-block-navigation__submenu-icon {
@@ -2754,7 +2774,7 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
2754
2774
  .wp-block-post-comments-form[style*=letter-spacing] :where(.comment-reply-title) {
2755
2775
  letter-spacing: inherit;
2756
2776
  }
2757
- .wp-block-post-comments-form input[type=submit] {
2777
+ .wp-block-post-comments-form :where(input[type="submit"]) {
2758
2778
  box-shadow: none;
2759
2779
  cursor: pointer;
2760
2780
  display: inline-block;
@@ -3456,7 +3476,7 @@ ul.wp-block-rss.is-grid li {
3456
3476
  color: #fff;
3457
3477
  }
3458
3478
  :where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-facebook {
3459
- background-color: #1778f2;
3479
+ background-color: #0866ff;
3460
3480
  color: #fff;
3461
3481
  }
3462
3482
  :where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-fivehundredpx {
@@ -3632,7 +3652,7 @@ ul.wp-block-rss.is-grid li {
3632
3652
  color: #f45800;
3633
3653
  }
3634
3654
  :where(.wp-block-social-links.is-style-logos-only) .wp-social-link-facebook {
3635
- color: #1778f2;
3655
+ color: #0866ff;
3636
3656
  }
3637
3657
  :where(.wp-block-social-links.is-style-logos-only) .wp-social-link-fivehundredpx {
3638
3658
  color: #000;
@@ -3930,6 +3950,7 @@ ul.wp-block-rss.is-grid li {
3930
3950
  }
3931
3951
 
3932
3952
  :where(.wp-block-term-description) {
3953
+ box-sizing: border-box;
3933
3954
  margin-top: var(--wp--style--block-gap);
3934
3955
  margin-bottom: var(--wp--style--block-gap);
3935
3956
  }
@@ -311,6 +311,10 @@
311
311
  .wp-block-categories.wp-block-categories-dropdown.aligncenter {
312
312
  text-align: center;
313
313
  }
314
+ .wp-block-categories .wp-block-categories__label {
315
+ width: 100%;
316
+ display: block;
317
+ }
314
318
 
315
319
  .wp-block-code {
316
320
  box-sizing: border-box;
@@ -1538,6 +1542,14 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
1538
1542
  vertical-align: bottom;
1539
1543
  box-sizing: border-box;
1540
1544
  }
1545
+ @media (prefers-reduced-motion: no-preference) {
1546
+ .wp-block-image img.hide {
1547
+ visibility: hidden;
1548
+ }
1549
+ .wp-block-image img.show {
1550
+ animation: show-content-image 0.4s;
1551
+ }
1552
+ }
1541
1553
  .wp-block-image[style*=border-radius] > a,
1542
1554
  .wp-block-image[style*=border-radius] img {
1543
1555
  border-radius: inherit;
@@ -1787,6 +1799,17 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
1787
1799
  }
1788
1800
  }
1789
1801
 
1802
+ @keyframes show-content-image {
1803
+ 0% {
1804
+ visibility: hidden;
1805
+ }
1806
+ 99% {
1807
+ visibility: hidden;
1808
+ }
1809
+ 100% {
1810
+ visibility: visible;
1811
+ }
1812
+ }
1790
1813
  @keyframes turn-on-visibility {
1791
1814
  0% {
1792
1815
  opacity: 0;
@@ -1997,7 +2020,7 @@ ul {
1997
2020
  box-sizing: border-box;
1998
2021
  }
1999
2022
 
2000
- :root :where(ul.has-background, ol.has-background) {
2023
+ :root :where(.wp-block-list.has-background) {
2001
2024
  padding: 1.25em 2.375em;
2002
2025
  }
2003
2026
 
@@ -2163,10 +2186,7 @@ ul {
2163
2186
  .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active {
2164
2187
  text-decoration: line-through;
2165
2188
  }
2166
- .wp-block-navigation:where(:not([class*="has-text-decoration"])) a {
2167
- text-decoration: none;
2168
- }
2169
- .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:focus, .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:active {
2189
+ .wp-block-navigation :where(a), .wp-block-navigation :where(a:focus), .wp-block-navigation :where(a:active) {
2170
2190
  text-decoration: none;
2171
2191
  }
2172
2192
  .wp-block-navigation .wp-block-navigation__submenu-icon {
@@ -2784,7 +2804,7 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
2784
2804
  .wp-block-post-comments-form[style*=letter-spacing] :where(.comment-reply-title) {
2785
2805
  letter-spacing: inherit;
2786
2806
  }
2787
- .wp-block-post-comments-form input[type=submit] {
2807
+ .wp-block-post-comments-form :where(input[type="submit"]) {
2788
2808
  box-shadow: none;
2789
2809
  cursor: pointer;
2790
2810
  display: inline-block;
@@ -3491,7 +3511,7 @@ ul.wp-block-rss.is-grid li {
3491
3511
  color: #fff;
3492
3512
  }
3493
3513
  :where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-facebook {
3494
- background-color: #1778f2;
3514
+ background-color: #0866ff;
3495
3515
  color: #fff;
3496
3516
  }
3497
3517
  :where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-fivehundredpx {
@@ -3667,7 +3687,7 @@ ul.wp-block-rss.is-grid li {
3667
3687
  color: #f45800;
3668
3688
  }
3669
3689
  :where(.wp-block-social-links.is-style-logos-only) .wp-social-link-facebook {
3670
- color: #1778f2;
3690
+ color: #0866ff;
3671
3691
  }
3672
3692
  :where(.wp-block-social-links.is-style-logos-only) .wp-social-link-fivehundredpx {
3673
3693
  color: #000;
@@ -3965,6 +3985,7 @@ ul.wp-block-rss.is-grid li {
3965
3985
  }
3966
3986
 
3967
3987
  :where(.wp-block-term-description) {
3988
+ box-sizing: border-box;
3968
3989
  margin-top: var(--wp--style--block-gap);
3969
3990
  margin-bottom: var(--wp--style--block-gap);
3970
3991
  }
@@ -87,6 +87,7 @@
87
87
  * Reset the WP Admin page styles for Gutenberg-like pages.
88
88
  */
89
89
  :where(.wp-block-term-description) {
90
+ box-sizing: border-box;
90
91
  margin-top: var(--wp--style--block-gap);
91
92
  margin-bottom: var(--wp--style--block-gap);
92
93
  }
@@ -87,6 +87,7 @@
87
87
  * Reset the WP Admin page styles for Gutenberg-like pages.
88
88
  */
89
89
  :where(.wp-block-term-description) {
90
+ box-sizing: border-box;
90
91
  margin-top: var(--wp--style--block-gap);
91
92
  margin-bottom: var(--wp--style--block-gap);
92
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.3.0",
3
+ "version": "9.4.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,39 +32,39 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
- "@wordpress/a11y": "^4.3.0",
36
- "@wordpress/api-fetch": "^7.3.0",
37
- "@wordpress/autop": "^4.3.0",
38
- "@wordpress/blob": "^4.3.0",
39
- "@wordpress/block-editor": "^13.3.0",
40
- "@wordpress/blocks": "^13.3.0",
41
- "@wordpress/components": "^28.3.0",
42
- "@wordpress/compose": "^7.3.0",
43
- "@wordpress/core-data": "^7.3.0",
44
- "@wordpress/data": "^10.3.0",
45
- "@wordpress/date": "^5.3.0",
46
- "@wordpress/deprecated": "^4.3.0",
47
- "@wordpress/dom": "^4.3.0",
48
- "@wordpress/element": "^6.3.0",
49
- "@wordpress/escape-html": "^3.3.0",
50
- "@wordpress/hooks": "^4.3.0",
51
- "@wordpress/html-entities": "^4.3.0",
52
- "@wordpress/i18n": "^5.3.0",
53
- "@wordpress/icons": "^10.3.0",
54
- "@wordpress/interactivity": "^6.3.0",
55
- "@wordpress/interactivity-router": "^2.3.0",
56
- "@wordpress/keyboard-shortcuts": "^5.3.0",
57
- "@wordpress/keycodes": "^4.3.0",
58
- "@wordpress/notices": "^5.3.0",
59
- "@wordpress/patterns": "^2.3.0",
60
- "@wordpress/primitives": "^4.3.0",
61
- "@wordpress/private-apis": "^1.3.0",
62
- "@wordpress/reusable-blocks": "^5.3.0",
63
- "@wordpress/rich-text": "^7.3.0",
64
- "@wordpress/server-side-render": "^5.3.0",
65
- "@wordpress/url": "^4.3.0",
66
- "@wordpress/viewport": "^6.3.0",
67
- "@wordpress/wordcount": "^4.3.0",
35
+ "@wordpress/a11y": "^4.4.0",
36
+ "@wordpress/api-fetch": "^7.4.0",
37
+ "@wordpress/autop": "^4.4.0",
38
+ "@wordpress/blob": "^4.4.0",
39
+ "@wordpress/block-editor": "^13.4.0",
40
+ "@wordpress/blocks": "^13.4.0",
41
+ "@wordpress/components": "^28.4.0",
42
+ "@wordpress/compose": "^7.4.0",
43
+ "@wordpress/core-data": "^7.4.0",
44
+ "@wordpress/data": "^10.4.0",
45
+ "@wordpress/date": "^5.4.0",
46
+ "@wordpress/deprecated": "^4.4.0",
47
+ "@wordpress/dom": "^4.4.0",
48
+ "@wordpress/element": "^6.4.0",
49
+ "@wordpress/escape-html": "^3.4.0",
50
+ "@wordpress/hooks": "^4.4.0",
51
+ "@wordpress/html-entities": "^4.4.0",
52
+ "@wordpress/i18n": "^5.4.0",
53
+ "@wordpress/icons": "^10.4.0",
54
+ "@wordpress/interactivity": "^6.4.0",
55
+ "@wordpress/interactivity-router": "^2.4.0",
56
+ "@wordpress/keyboard-shortcuts": "^5.4.0",
57
+ "@wordpress/keycodes": "^4.4.0",
58
+ "@wordpress/notices": "^5.4.0",
59
+ "@wordpress/patterns": "^2.4.0",
60
+ "@wordpress/primitives": "^4.4.0",
61
+ "@wordpress/private-apis": "^1.4.0",
62
+ "@wordpress/reusable-blocks": "^5.4.0",
63
+ "@wordpress/rich-text": "^7.4.0",
64
+ "@wordpress/server-side-render": "^5.4.0",
65
+ "@wordpress/url": "^4.4.0",
66
+ "@wordpress/viewport": "^6.4.0",
67
+ "@wordpress/wordcount": "^4.4.0",
68
68
  "change-case": "^4.1.2",
69
69
  "clsx": "^2.1.1",
70
70
  "colord": "^2.7.0",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "122867d355ca4edc63d3a3bbd9411d3a2e1458df"
85
+ "gitHead": "363edb39b8dda8727f652e42cbb8497732693ed2"
86
86
  }
package/src/block/edit.js CHANGED
@@ -121,6 +121,51 @@ export default function ReusableBlockEditRecursionWrapper( props ) {
121
121
  );
122
122
  }
123
123
 
124
+ function ReusableBlockControl( {
125
+ recordId,
126
+ canOverrideBlocks,
127
+ hasContent,
128
+ handleEditOriginal,
129
+ resetContent,
130
+ } ) {
131
+ const canUserEdit = useSelect(
132
+ ( select ) =>
133
+ !! select( coreStore ).canUser( 'update', {
134
+ kind: 'postType',
135
+ name: 'wp_block',
136
+ id: recordId,
137
+ } ),
138
+ [ recordId ]
139
+ );
140
+
141
+ return (
142
+ <>
143
+ { canUserEdit && !! handleEditOriginal && (
144
+ <BlockControls>
145
+ <ToolbarGroup>
146
+ <ToolbarButton onClick={ handleEditOriginal }>
147
+ { __( 'Edit original' ) }
148
+ </ToolbarButton>
149
+ </ToolbarGroup>
150
+ </BlockControls>
151
+ ) }
152
+
153
+ { canOverrideBlocks && (
154
+ <BlockControls>
155
+ <ToolbarGroup>
156
+ <ToolbarButton
157
+ onClick={ resetContent }
158
+ disabled={ ! hasContent }
159
+ >
160
+ { __( 'Reset' ) }
161
+ </ToolbarButton>
162
+ </ToolbarGroup>
163
+ </BlockControls>
164
+ ) }
165
+ </>
166
+ );
167
+ }
168
+
124
169
  function ReusableBlockEdit( {
125
170
  name,
126
171
  attributes: { ref, content },
@@ -143,25 +188,20 @@ function ReusableBlockEdit( {
143
188
 
144
189
  const {
145
190
  innerBlocks,
146
- userCanEdit,
147
191
  onNavigateToEntityRecord,
148
192
  editingMode,
149
193
  hasPatternOverridesSource,
150
194
  } = useSelect(
151
195
  ( select ) => {
152
- const { canUser } = select( coreStore );
153
196
  const {
154
197
  getBlocks,
155
198
  getSettings,
156
199
  getBlockEditingMode: _getBlockEditingMode,
157
200
  } = select( blockEditorStore );
158
201
  const { getBlockBindingsSource } = unlock( select( blocksStore ) );
159
- const canEdit = canUser( 'update', 'blocks', ref );
160
-
161
202
  // For editing link to the site editor if the theme and user permissions support it.
162
203
  return {
163
204
  innerBlocks: getBlocks( patternClientId ),
164
- userCanEdit: canEdit,
165
205
  getBlockEditingMode: _getBlockEditingMode,
166
206
  onNavigateToEntityRecord:
167
207
  getSettings().onNavigateToEntityRecord,
@@ -171,7 +211,7 @@ function ReusableBlockEdit( {
171
211
  ),
172
212
  };
173
213
  },
174
- [ patternClientId, ref ]
214
+ [ patternClientId ]
175
215
  );
176
216
 
177
217
  // Sync the editing mode of the pattern block with the inner blocks.
@@ -252,27 +292,18 @@ function ReusableBlockEdit( {
252
292
 
253
293
  return (
254
294
  <>
255
- { userCanEdit && onNavigateToEntityRecord && (
256
- <BlockControls>
257
- <ToolbarGroup>
258
- <ToolbarButton onClick={ handleEditOriginal }>
259
- { __( 'Edit original' ) }
260
- </ToolbarButton>
261
- </ToolbarGroup>
262
- </BlockControls>
263
- ) }
264
-
265
- { canOverrideBlocks && (
266
- <BlockControls>
267
- <ToolbarGroup>
268
- <ToolbarButton
269
- onClick={ resetContent }
270
- disabled={ ! content }
271
- >
272
- { __( 'Reset' ) }
273
- </ToolbarButton>
274
- </ToolbarGroup>
275
- </BlockControls>
295
+ { hasResolved && (
296
+ <ReusableBlockControl
297
+ recordId={ ref }
298
+ canOverrideBlocks={ canOverrideBlocks }
299
+ hasContent={ !! content }
300
+ handleEditOriginal={
301
+ onNavigateToEntityRecord
302
+ ? handleEditOriginal
303
+ : undefined
304
+ }
305
+ resetContent={ resetContent }
306
+ />
276
307
  ) }
277
308
 
278
309
  { children === null ? (
@@ -158,7 +158,9 @@ describe( 'Synced patterns', () => {
158
158
  if ( path.startsWith( endpoint ) ) {
159
159
  response = getMockedReusableBlock( id );
160
160
  }
161
- return Promise.resolve( response );
161
+ return Promise.resolve( {
162
+ json: () => Promise.resolve( response ),
163
+ } );
162
164
  } );
163
165
 
164
166
  const screen = await initializeEditor( {
@@ -229,7 +231,9 @@ describe( 'Synced patterns', () => {
229
231
  response.content.raw = `<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"none"} -->
230
232
  <figure class="wp-block-image size-large"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1"/></figure>
231
233
  <!-- /wp:image -->`;
232
- return Promise.resolve( response );
234
+ return Promise.resolve( {
235
+ json: () => Promise.resolve( response ),
236
+ } );
233
237
  } );
234
238
 
235
239
  const screen = await initializeEditor( {
@@ -247,7 +247,7 @@ function ButtonEdit( props ) {
247
247
  return {
248
248
  lockUrlControls:
249
249
  !! metadata?.bindings?.url &&
250
- ! blockBindingsSource?.canUserEditValue( {
250
+ ! blockBindingsSource?.canUserEditValue?.( {
251
251
  select,
252
252
  context,
253
253
  args: metadata?.bindings?.url?.args,
@@ -26,8 +26,8 @@ function render_block_core_button( $attributes, $content ) {
26
26
  * conditional statement will be removed and the core class `WP_HTML_Tag_Processor`
27
27
  * should be used.
28
28
  */
29
- if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && class_exists( 'Gutenberg_HTML_Tag_Processor_6_5' ) ) {
30
- $p = new Gutenberg_HTML_Tag_Processor_6_5( $content );
29
+ if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && class_exists( 'Gutenberg_HTML_Tag_Processor_6_7' ) ) {
30
+ $p = new Gutenberg_HTML_Tag_Processor_6_7( $content );
31
31
  } else {
32
32
  $p = new WP_HTML_Tag_Processor( $content );
33
33
  }
@@ -13,8 +13,16 @@
13
13
  "align": [ "wide", "full" ],
14
14
  "html": false,
15
15
  "__experimentalExposeControlsToChildren": true,
16
+ "color": {
17
+ "gradients": true,
18
+ "text": false,
19
+ "__experimentalDefaultControls": {
20
+ "background": true
21
+ }
22
+ },
16
23
  "spacing": {
17
24
  "blockGap": true,
25
+ "padding": true,
18
26
  "margin": [ "top", "bottom" ],
19
27
  "__experimentalDefaultControls": {
20
28
  "blockGap": true
@@ -33,6 +41,18 @@
33
41
  "fontSize": true
34
42
  }
35
43
  },
44
+ "__experimentalBorder": {
45
+ "color": true,
46
+ "radius": true,
47
+ "style": true,
48
+ "width": true,
49
+ "__experimentalDefaultControls": {
50
+ "color": true,
51
+ "radius": true,
52
+ "style": true,
53
+ "width": true
54
+ }
55
+ },
36
56
  "layout": {
37
57
  "allowSwitching": false,
38
58
  "allowInheriting": false,
@@ -21,6 +21,12 @@ export { metadata, name };
21
21
  export const settings = {
22
22
  icon,
23
23
  example: {
24
+ attributes: {
25
+ layout: {
26
+ type: 'flex',
27
+ justifyContent: 'center',
28
+ },
29
+ },
24
30
  innerBlocks: [
25
31
  {
26
32
  name: 'core/button',
@@ -26,6 +26,14 @@
26
26
  "showEmpty": {
27
27
  "type": "boolean",
28
28
  "default": false
29
+ },
30
+ "label": {
31
+ "type": "string",
32
+ "__experimentalRole": "content"
33
+ },
34
+ "showLabel": {
35
+ "type": "boolean",
36
+ "default": true
29
37
  }
30
38
  },
31
39
  "supports": {
@@ -14,7 +14,11 @@ import {
14
14
  VisuallyHidden,
15
15
  } from '@wordpress/components';
16
16
  import { useInstanceId } from '@wordpress/compose';
17
- import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
17
+ import {
18
+ InspectorControls,
19
+ useBlockProps,
20
+ RichText,
21
+ } from '@wordpress/block-editor';
18
22
  import { decodeEntities } from '@wordpress/html-entities';
19
23
  import { __ } from '@wordpress/i18n';
20
24
  import { pin } from '@wordpress/icons';
@@ -27,6 +31,8 @@ export default function CategoriesEdit( {
27
31
  showPostCounts,
28
32
  showOnlyTopLevel,
29
33
  showEmpty,
34
+ label,
35
+ showLabel,
30
36
  },
31
37
  setAttributes,
32
38
  className,
@@ -92,9 +98,22 @@ export default function CategoriesEdit( {
92
98
  const categoriesList = getCategoriesList( parentId );
93
99
  return (
94
100
  <>
95
- <VisuallyHidden as="label" htmlFor={ selectId }>
96
- { __( 'Categories' ) }
97
- </VisuallyHidden>
101
+ { showLabel ? (
102
+ <RichText
103
+ className="wp-block-categories__label"
104
+ aria-label={ __( 'Label text' ) }
105
+ placeholder={ __( 'Categories' ) }
106
+ withoutInteractiveFormatting
107
+ value={ label }
108
+ onChange={ ( html ) =>
109
+ setAttributes( { label: html } )
110
+ }
111
+ />
112
+ ) : (
113
+ <VisuallyHidden as="label" htmlFor={ selectId }>
114
+ { label ? label : __( 'Categories' ) }
115
+ </VisuallyHidden>
116
+ ) }
98
117
  <select id={ selectId }>
99
118
  <option>{ __( 'Select Category' ) }</option>
100
119
  { categoriesList.map( ( category ) =>
@@ -148,6 +167,15 @@ export default function CategoriesEdit( {
148
167
  checked={ displayAsDropdown }
149
168
  onChange={ toggleAttribute( 'displayAsDropdown' ) }
150
169
  />
170
+ { displayAsDropdown && (
171
+ <ToggleControl
172
+ __nextHasNoMarginBottom
173
+ className="wp-block-categories__indentation"
174
+ label={ __( 'Show label' ) }
175
+ checked={ showLabel }
176
+ onChange={ toggleAttribute( 'showLabel' ) }
177
+ />
178
+ ) }
151
179
  <ToggleControl
152
180
  __nextHasNoMarginBottom
153
181
  label={ __( 'Show post counts' ) }
@@ -10,3 +10,7 @@
10
10
  [data-align="center"] .wp-block-categories {
11
11
  text-align: center;
12
12
  }
13
+
14
+ .wp-block-categories__indentation {
15
+ padding-left: 16px;
16
+ }
@@ -34,7 +34,10 @@ function render_block_core_categories( $attributes ) {
34
34
  $id = 'wp-block-categories-' . $block_id;
35
35
  $args['id'] = $id;
36
36
  $args['show_option_none'] = __( 'Select Category' );
37
- $wrapper_markup = '<div %1$s><label class="screen-reader-text" for="' . esc_attr( $id ) . '">' . __( 'Categories' ) . '</label>%2$s</div>';
37
+ $show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
38
+ $default_label = __( 'Categories' );
39
+ $label_text = ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
40
+ $wrapper_markup = '<div %1$s><label class="wp-block-categories__label' . $show_label . '" for="' . esc_attr( $id ) . '">' . $label_text . '</label>%2$s</div>';
38
41
  $items_markup = wp_dropdown_categories( $args );
39
42
  $type = 'dropdown';
40
43
 
@@ -14,4 +14,8 @@
14
14
  &.wp-block-categories-dropdown.aligncenter {
15
15
  text-align: center;
16
16
  }
17
+ & .wp-block-categories__label {
18
+ width: 100%;
19
+ display: block;
20
+ }
17
21
  }
@@ -23,7 +23,7 @@ export const settings = {
23
23
  icon,
24
24
  variations,
25
25
  example: {
26
- viewportWidth: 600, // Columns collapse "@media (max-width: 599px)".
26
+ viewportWidth: 782, // Columns collapse "@media (max-width: 781px)".
27
27
  innerBlocks: [
28
28
  {
29
29
  name: 'core/column',
@@ -260,6 +260,7 @@ export default function CoverInspectorControls( {
260
260
  gradient: undefined,
261
261
  customGradient: undefined,
262
262
  } ),
263
+ clearable: true,
263
264
  },
264
265
  ] }
265
266
  panelId={ clientId }