@wordpress/block-library 7.16.0 → 7.18.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 (419) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/build/archives/edit.js +1 -0
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/audio/edit.js +44 -4
  5. package/build/audio/edit.js.map +1 -1
  6. package/build/button/edit.js +1 -1
  7. package/build/button/edit.js.map +1 -1
  8. package/build/buttons/edit.native.js +1 -1
  9. package/build/buttons/edit.native.js.map +1 -1
  10. package/build/comment-template/edit.js +40 -32
  11. package/build/comment-template/edit.js.map +1 -1
  12. package/build/comment-template/index.js +6 -2
  13. package/build/comment-template/index.js.map +1 -1
  14. package/build/comments/edit/placeholder.js +1 -4
  15. package/build/comments/edit/placeholder.js.map +1 -1
  16. package/build/comments/index.js +5 -1
  17. package/build/comments/index.js.map +1 -1
  18. package/build/comments-title/edit.js +18 -1
  19. package/build/comments-title/edit.js.map +1 -1
  20. package/build/cover/edit/index.js +2 -2
  21. package/build/cover/edit/index.js.map +1 -1
  22. package/build/cover/edit/inspector-controls.js +3 -7
  23. package/build/cover/edit/inspector-controls.js.map +1 -1
  24. package/build/cover/edit/use-cover-is-dark.js +8 -7
  25. package/build/cover/edit/use-cover-is-dark.js.map +1 -1
  26. package/build/embed/deprecated.js +43 -4
  27. package/build/embed/deprecated.js.map +1 -1
  28. package/build/embed/variations.js +1 -1
  29. package/build/embed/variations.js.map +1 -1
  30. package/build/file/deprecated.js +108 -4
  31. package/build/file/deprecated.js.map +1 -1
  32. package/build/file/transforms.js +3 -9
  33. package/build/file/transforms.js.map +1 -1
  34. package/build/gallery/deprecated.js +148 -23
  35. package/build/gallery/deprecated.js.map +1 -1
  36. package/build/gallery/gallery.js +3 -2
  37. package/build/gallery/gallery.js.map +1 -1
  38. package/build/gallery/transforms.js +3 -3
  39. package/build/gallery/transforms.js.map +1 -1
  40. package/build/gallery/use-image-sizes.js +2 -1
  41. package/build/gallery/use-image-sizes.js.map +1 -1
  42. package/build/gallery/v1/edit.js +3 -2
  43. package/build/gallery/v1/edit.js.map +1 -1
  44. package/build/group/edit.js +7 -3
  45. package/build/group/edit.js.map +1 -1
  46. package/build/image/edit.native.js +1 -1
  47. package/build/image/edit.native.js.map +1 -1
  48. package/build/image/image.js +33 -12
  49. package/build/image/image.js.map +1 -1
  50. package/build/image/transforms.js +1 -7
  51. package/build/image/transforms.js.map +1 -1
  52. package/build/latest-posts/edit.js +1 -1
  53. package/build/latest-posts/edit.js.map +1 -1
  54. package/build/list/transforms.js +9 -1
  55. package/build/list/transforms.js.map +1 -1
  56. package/build/list/utils.js +4 -8
  57. package/build/list/utils.js.map +1 -1
  58. package/build/list-item/edit.js +3 -2
  59. package/build/list-item/edit.js.map +1 -1
  60. package/build/list-item/edit.native.js +3 -2
  61. package/build/list-item/edit.native.js.map +1 -1
  62. package/build/list-item/hooks/use-merge.js +19 -22
  63. package/build/list-item/hooks/use-merge.js.map +1 -1
  64. package/build/list-item/hooks/use-outdent-list-item.js +24 -10
  65. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  66. package/build/list-item/index.js +14 -1
  67. package/build/list-item/index.js.map +1 -1
  68. package/build/list-item/utils.js +14 -1
  69. package/build/list-item/utils.js.map +1 -1
  70. package/build/navigation/edit/index.js +45 -31
  71. package/build/navigation/edit/index.js.map +1 -1
  72. package/build/navigation/edit/inner-blocks.js +3 -5
  73. package/build/navigation/edit/inner-blocks.js.map +1 -1
  74. package/build/navigation/edit/unsaved-inner-blocks.js +3 -1
  75. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  76. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +25 -8
  77. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  78. package/build/navigation/edit/use-create-navigation-menu.js +1 -1
  79. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
  80. package/build/navigation/index.js +4 -1
  81. package/build/navigation/index.js.map +1 -1
  82. package/build/navigation-link/edit.js +5 -3
  83. package/build/navigation-link/edit.js.map +1 -1
  84. package/build/navigation-submenu/edit.js +4 -4
  85. package/build/navigation-submenu/edit.js.map +1 -1
  86. package/build/page-list/edit.js +29 -10
  87. package/build/page-list/edit.js.map +1 -1
  88. package/build/page-list/index.js +1 -5
  89. package/build/page-list/index.js.map +1 -1
  90. package/build/paragraph/edit.js +3 -11
  91. package/build/paragraph/edit.js.map +1 -1
  92. package/build/pattern/edit.js +11 -4
  93. package/build/pattern/edit.js.map +1 -1
  94. package/build/post-comments-count/index.js +4 -0
  95. package/build/post-comments-count/index.js.map +1 -1
  96. package/build/post-comments-form/form.js +1 -2
  97. package/build/post-comments-form/form.js.map +1 -1
  98. package/build/post-comments-form/index.js +4 -0
  99. package/build/post-comments-form/index.js.map +1 -1
  100. package/build/post-comments-link/index.js +4 -0
  101. package/build/post-comments-link/index.js.map +1 -1
  102. package/build/post-content/edit.js +14 -6
  103. package/build/post-content/edit.js.map +1 -1
  104. package/build/pullquote/deprecated.js +6 -6
  105. package/build/pullquote/deprecated.js.map +1 -1
  106. package/build/query/edit/inspector-controls/index.js +2 -2
  107. package/build/query/edit/inspector-controls/index.js.map +1 -1
  108. package/build/query/edit/inspector-controls/taxonomy-controls.js +79 -104
  109. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  110. package/build/search/edit.js +3 -4
  111. package/build/search/edit.js.map +1 -1
  112. package/build/site-logo/edit.js +7 -10
  113. package/build/site-logo/edit.js.map +1 -1
  114. package/build/site-tagline/edit.js +21 -9
  115. package/build/site-tagline/edit.js.map +1 -1
  116. package/build/site-title/edit/index.js +20 -8
  117. package/build/site-title/edit/index.js.map +1 -1
  118. package/build/social-link/edit.js +11 -2
  119. package/build/social-link/edit.js.map +1 -1
  120. package/build/social-link/index.js +3 -0
  121. package/build/social-link/index.js.map +1 -1
  122. package/build/spacer/controls.js +3 -7
  123. package/build/spacer/controls.js.map +1 -1
  124. package/build/table/deprecated.js +282 -27
  125. package/build/table/deprecated.js.map +1 -1
  126. package/build/table/state.js +2 -2
  127. package/build/table/state.js.map +1 -1
  128. package/build/table-of-contents/edit.js +1 -4
  129. package/build/table-of-contents/edit.js.map +1 -1
  130. package/build/tag-cloud/edit.js +1 -1
  131. package/build/tag-cloud/edit.js.map +1 -1
  132. package/build/tag-cloud/index.js +8 -0
  133. package/build/tag-cloud/index.js.map +1 -1
  134. package/build/utils/clean-empty-object.js +5 -4
  135. package/build/utils/clean-empty-object.js.map +1 -1
  136. package/build/video/deprecated.js +159 -0
  137. package/build/video/deprecated.js.map +1 -0
  138. package/build/video/edit.js +41 -5
  139. package/build/video/edit.js.map +1 -1
  140. package/build/video/index.js +3 -0
  141. package/build/video/index.js.map +1 -1
  142. package/build/video/tracks-editor.js +3 -28
  143. package/build/video/tracks-editor.js.map +1 -1
  144. package/build-module/archives/edit.js +1 -0
  145. package/build-module/archives/edit.js.map +1 -1
  146. package/build-module/audio/edit.js +46 -7
  147. package/build-module/audio/edit.js.map +1 -1
  148. package/build-module/button/edit.js +1 -1
  149. package/build-module/button/edit.js.map +1 -1
  150. package/build-module/buttons/edit.native.js +1 -1
  151. package/build-module/buttons/edit.native.js.map +1 -1
  152. package/build-module/comment-template/edit.js +38 -30
  153. package/build-module/comment-template/edit.js.map +1 -1
  154. package/build-module/comment-template/index.js +6 -2
  155. package/build-module/comment-template/index.js.map +1 -1
  156. package/build-module/comments/edit/placeholder.js +1 -3
  157. package/build-module/comments/edit/placeholder.js.map +1 -1
  158. package/build-module/comments/index.js +5 -1
  159. package/build-module/comments/index.js.map +1 -1
  160. package/build-module/comments-title/edit.js +18 -2
  161. package/build-module/comments-title/edit.js.map +1 -1
  162. package/build-module/cover/edit/index.js +2 -2
  163. package/build-module/cover/edit/index.js.map +1 -1
  164. package/build-module/cover/edit/inspector-controls.js +4 -8
  165. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  166. package/build-module/cover/edit/use-cover-is-dark.js +7 -7
  167. package/build-module/cover/edit/use-cover-is-dark.js.map +1 -1
  168. package/build-module/embed/deprecated.js +44 -5
  169. package/build-module/embed/deprecated.js.map +1 -1
  170. package/build-module/embed/variations.js +1 -1
  171. package/build-module/embed/variations.js.map +1 -1
  172. package/build-module/file/deprecated.js +108 -4
  173. package/build-module/file/deprecated.js.map +1 -1
  174. package/build-module/file/transforms.js +3 -8
  175. package/build-module/file/transforms.js.map +1 -1
  176. package/build-module/gallery/deprecated.js +147 -25
  177. package/build-module/gallery/deprecated.js.map +1 -1
  178. package/build-module/gallery/gallery.js +3 -2
  179. package/build-module/gallery/gallery.js.map +1 -1
  180. package/build-module/gallery/transforms.js +4 -4
  181. package/build-module/gallery/transforms.js.map +1 -1
  182. package/build-module/gallery/use-image-sizes.js +3 -2
  183. package/build-module/gallery/use-image-sizes.js.map +1 -1
  184. package/build-module/gallery/v1/edit.js +4 -3
  185. package/build-module/gallery/v1/edit.js.map +1 -1
  186. package/build-module/group/edit.js +7 -3
  187. package/build-module/group/edit.js.map +1 -1
  188. package/build-module/image/edit.native.js +1 -1
  189. package/build-module/image/edit.native.js.map +1 -1
  190. package/build-module/image/image.js +36 -15
  191. package/build-module/image/image.js.map +1 -1
  192. package/build-module/image/transforms.js +1 -6
  193. package/build-module/image/transforms.js.map +1 -1
  194. package/build-module/latest-posts/edit.js +2 -2
  195. package/build-module/latest-posts/edit.js.map +1 -1
  196. package/build-module/list/transforms.js +9 -1
  197. package/build-module/list/transforms.js.map +1 -1
  198. package/build-module/list/utils.js +5 -9
  199. package/build-module/list/utils.js.map +1 -1
  200. package/build-module/list-item/edit.js +3 -2
  201. package/build-module/list-item/edit.js.map +1 -1
  202. package/build-module/list-item/edit.native.js +3 -2
  203. package/build-module/list-item/edit.native.js.map +1 -1
  204. package/build-module/list-item/hooks/use-merge.js +19 -21
  205. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  206. package/build-module/list-item/hooks/use-outdent-list-item.js +24 -9
  207. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  208. package/build-module/list-item/index.js +14 -1
  209. package/build-module/list-item/index.js.map +1 -1
  210. package/build-module/list-item/utils.js +14 -1
  211. package/build-module/list-item/utils.js.map +1 -1
  212. package/build-module/navigation/edit/index.js +45 -31
  213. package/build-module/navigation/edit/index.js.map +1 -1
  214. package/build-module/navigation/edit/inner-blocks.js +3 -5
  215. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  216. package/build-module/navigation/edit/unsaved-inner-blocks.js +3 -1
  217. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  218. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +25 -8
  219. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  220. package/build-module/navigation/edit/use-create-navigation-menu.js +1 -1
  221. package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
  222. package/build-module/navigation/index.js +4 -1
  223. package/build-module/navigation/index.js.map +1 -1
  224. package/build-module/navigation-link/edit.js +5 -4
  225. package/build-module/navigation-link/edit.js.map +1 -1
  226. package/build-module/navigation-submenu/edit.js +4 -4
  227. package/build-module/navigation-submenu/edit.js.map +1 -1
  228. package/build-module/page-list/edit.js +29 -10
  229. package/build-module/page-list/edit.js.map +1 -1
  230. package/build-module/page-list/index.js +1 -5
  231. package/build-module/page-list/index.js.map +1 -1
  232. package/build-module/paragraph/edit.js +3 -10
  233. package/build-module/paragraph/edit.js.map +1 -1
  234. package/build-module/pattern/edit.js +10 -3
  235. package/build-module/pattern/edit.js.map +1 -1
  236. package/build-module/post-comments-count/index.js +4 -0
  237. package/build-module/post-comments-count/index.js.map +1 -1
  238. package/build-module/post-comments-form/form.js +2 -3
  239. package/build-module/post-comments-form/form.js.map +1 -1
  240. package/build-module/post-comments-form/index.js +4 -0
  241. package/build-module/post-comments-form/index.js.map +1 -1
  242. package/build-module/post-comments-link/index.js +4 -0
  243. package/build-module/post-comments-link/index.js.map +1 -1
  244. package/build-module/post-content/edit.js +14 -6
  245. package/build-module/post-content/edit.js.map +1 -1
  246. package/build-module/pullquote/deprecated.js +7 -7
  247. package/build-module/pullquote/deprecated.js.map +1 -1
  248. package/build-module/query/edit/inspector-controls/index.js +4 -4
  249. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  250. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +81 -102
  251. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  252. package/build-module/search/edit.js +4 -5
  253. package/build-module/search/edit.js.map +1 -1
  254. package/build-module/site-logo/edit.js +8 -11
  255. package/build-module/site-logo/edit.js.map +1 -1
  256. package/build-module/site-tagline/edit.js +23 -11
  257. package/build-module/site-tagline/edit.js.map +1 -1
  258. package/build-module/site-title/edit/index.js +22 -10
  259. package/build-module/site-title/edit/index.js.map +1 -1
  260. package/build-module/social-link/edit.js +11 -2
  261. package/build-module/social-link/edit.js.map +1 -1
  262. package/build-module/social-link/index.js +3 -0
  263. package/build-module/social-link/index.js.map +1 -1
  264. package/build-module/spacer/controls.js +4 -8
  265. package/build-module/spacer/controls.js.map +1 -1
  266. package/build-module/table/deprecated.js +282 -27
  267. package/build-module/table/deprecated.js.map +1 -1
  268. package/build-module/table/state.js +3 -3
  269. package/build-module/table/state.js.map +1 -1
  270. package/build-module/table-of-contents/edit.js +1 -3
  271. package/build-module/table-of-contents/edit.js.map +1 -1
  272. package/build-module/tag-cloud/edit.js +1 -1
  273. package/build-module/tag-cloud/edit.js.map +1 -1
  274. package/build-module/tag-cloud/index.js +8 -0
  275. package/build-module/tag-cloud/index.js.map +1 -1
  276. package/build-module/utils/clean-empty-object.js +5 -5
  277. package/build-module/utils/clean-empty-object.js.map +1 -1
  278. package/build-module/video/deprecated.js +147 -0
  279. package/build-module/video/deprecated.js.map +1 -0
  280. package/build-module/video/edit.js +45 -9
  281. package/build-module/video/edit.js.map +1 -1
  282. package/build-module/video/index.js +2 -0
  283. package/build-module/video/index.js.map +1 -1
  284. package/build-module/video/tracks-editor.js +4 -29
  285. package/build-module/video/tracks-editor.js.map +1 -1
  286. package/build-style/archives/style-rtl.css +4 -0
  287. package/build-style/archives/style.css +4 -0
  288. package/build-style/button/style-rtl.css +1 -0
  289. package/build-style/button/style.css +1 -0
  290. package/build-style/comment-template/style-rtl.css +1 -0
  291. package/build-style/comment-template/style.css +1 -0
  292. package/build-style/comments/editor-rtl.css +1 -0
  293. package/build-style/comments/editor.css +1 -0
  294. package/build-style/comments/style-rtl.css +1 -0
  295. package/build-style/comments/style.css +1 -0
  296. package/build-style/cover/editor-rtl.css +4 -0
  297. package/build-style/cover/editor.css +4 -0
  298. package/build-style/editor-rtl.css +13 -21
  299. package/build-style/editor.css +13 -21
  300. package/build-style/group/editor-rtl.css +1 -0
  301. package/build-style/group/editor.css +1 -0
  302. package/build-style/image/editor-rtl.css +1 -1
  303. package/build-style/image/editor.css +1 -1
  304. package/build-style/navigation/editor-rtl.css +5 -4
  305. package/build-style/navigation/editor.css +5 -4
  306. package/build-style/navigation/style-rtl.css +3 -1
  307. package/build-style/navigation/style.css +3 -1
  308. package/build-style/paragraph/editor-rtl.css +0 -16
  309. package/build-style/paragraph/editor.css +0 -16
  310. package/build-style/post-comments-form/style-rtl.css +3 -0
  311. package/build-style/post-comments-form/style.css +3 -0
  312. package/build-style/site-logo/editor-rtl.css +1 -0
  313. package/build-style/site-logo/editor.css +1 -0
  314. package/build-style/style-rtl.css +16 -1
  315. package/build-style/style.css +16 -1
  316. package/build-style/tag-cloud/style-rtl.css +3 -0
  317. package/build-style/tag-cloud/style.css +3 -0
  318. package/package.json +29 -28
  319. package/src/archives/edit.js +1 -0
  320. package/src/archives/style.scss +5 -0
  321. package/src/audio/edit.js +79 -24
  322. package/src/avatar/index.php +1 -1
  323. package/src/button/edit.js +1 -1
  324. package/src/button/style.scss +2 -0
  325. package/src/buttons/edit.native.js +1 -1
  326. package/src/code/test/__snapshots__/edit.native.js.snap +13 -0
  327. package/src/code/test/edit.native.js +46 -32
  328. package/src/comment-template/block.json +6 -2
  329. package/src/comment-template/edit.js +47 -34
  330. package/src/comment-template/style.scss +2 -0
  331. package/src/comments/block.json +5 -1
  332. package/src/comments/edit/placeholder.js +1 -7
  333. package/src/comments/style.scss +2 -0
  334. package/src/comments-title/edit.js +24 -1
  335. package/src/cover/edit/index.js +2 -7
  336. package/src/cover/edit/inspector-controls.js +11 -13
  337. package/src/cover/edit/use-cover-is-dark.js +11 -11
  338. package/src/cover/editor.scss +7 -0
  339. package/src/embed/deprecated.js +53 -26
  340. package/src/embed/variations.js +1 -1
  341. package/src/file/deprecated.js +130 -2
  342. package/src/file/transforms.js +3 -8
  343. package/src/gallery/deprecated.js +129 -4
  344. package/src/gallery/gallery.js +2 -0
  345. package/src/gallery/index.php +19 -10
  346. package/src/gallery/transforms.js +8 -5
  347. package/src/gallery/use-image-sizes.js +3 -2
  348. package/src/gallery/v1/edit.js +4 -3
  349. package/src/group/edit.js +10 -2
  350. package/src/group/editor.scss +1 -0
  351. package/src/image/edit.native.js +1 -1
  352. package/src/image/editor.scss +4 -1
  353. package/src/image/image.js +75 -33
  354. package/src/image/transforms.js +1 -7
  355. package/src/latest-posts/edit.js +2 -2
  356. package/src/list/test/edit.native.js +102 -3
  357. package/src/list/transforms.js +11 -0
  358. package/src/list/utils.js +3 -11
  359. package/src/list-item/block.json +14 -1
  360. package/src/list-item/edit.js +2 -1
  361. package/src/list-item/edit.native.js +2 -1
  362. package/src/list-item/hooks/use-merge.js +4 -23
  363. package/src/list-item/hooks/use-outdent-list-item.js +9 -8
  364. package/src/navigation/block.json +4 -1
  365. package/src/navigation/edit/index.js +61 -37
  366. package/src/navigation/edit/inner-blocks.js +2 -5
  367. package/src/navigation/edit/unsaved-inner-blocks.js +9 -2
  368. package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +32 -5
  369. package/src/navigation/edit/use-create-navigation-menu.js +2 -5
  370. package/src/navigation/editor.scss +5 -4
  371. package/src/navigation/index.php +103 -6
  372. package/src/navigation/style.scss +3 -1
  373. package/src/navigation-link/edit.js +6 -5
  374. package/src/navigation-link/index.php +8 -1
  375. package/src/navigation-submenu/edit.js +7 -5
  376. package/src/navigation-submenu/index.php +8 -1
  377. package/src/page-list/block.json +1 -5
  378. package/src/page-list/edit.js +36 -22
  379. package/src/page-list/index.php +8 -6
  380. package/src/paragraph/edit.js +1 -14
  381. package/src/paragraph/editor.scss +0 -20
  382. package/src/pattern/edit.js +10 -3
  383. package/src/post-comments-count/block.json +4 -0
  384. package/src/post-comments-form/block.json +4 -0
  385. package/src/post-comments-form/form.js +2 -3
  386. package/src/post-comments-form/style.scss +3 -0
  387. package/src/post-comments-link/block.json +4 -0
  388. package/src/post-content/edit.js +8 -4
  389. package/src/pullquote/deprecated.js +7 -7
  390. package/src/query/edit/inspector-controls/index.js +4 -3
  391. package/src/query/edit/inspector-controls/taxonomy-controls.js +82 -87
  392. package/src/rss/index.php +3 -3
  393. package/src/search/edit.js +7 -2
  394. package/src/search/index.php +21 -13
  395. package/src/site-logo/edit.js +12 -10
  396. package/src/site-logo/editor.scss +1 -0
  397. package/src/site-tagline/edit.js +25 -18
  398. package/src/site-title/edit/index.js +26 -12
  399. package/src/social-link/block.json +3 -0
  400. package/src/social-link/edit.js +8 -1
  401. package/src/social-link/index.php +11 -7
  402. package/src/spacer/controls.js +10 -12
  403. package/src/table/deprecated.js +587 -348
  404. package/src/table/state.js +3 -3
  405. package/src/table-of-contents/edit.js +1 -3
  406. package/src/tag-cloud/block.json +8 -0
  407. package/src/tag-cloud/edit.js +1 -1
  408. package/src/tag-cloud/style.scss +3 -0
  409. package/src/template-part/index.php +4 -0
  410. package/src/utils/clean-empty-object.js +5 -6
  411. package/src/video/deprecated.js +57 -0
  412. package/src/video/edit.js +71 -23
  413. package/src/video/index.js +2 -0
  414. package/src/video/tracks-editor.js +12 -28
  415. package/build/paragraph/drop-zone.js +0 -99
  416. package/build/paragraph/drop-zone.js.map +0 -1
  417. package/build-module/paragraph/drop-zone.js +0 -88
  418. package/build-module/paragraph/drop-zone.js.map +0 -1
  419. package/src/paragraph/drop-zone.js +0 -105
@@ -52,50 +52,64 @@ export default function PageListEdit( { context, clientId } ) {
52
52
  style: { ...context.style?.color },
53
53
  } );
54
54
 
55
- return (
56
- <>
57
- { allowConvertToLinks && (
58
- <BlockControls group="other">
59
- <ToolbarButton title={ __( 'Edit' ) } onClick={ openModal }>
60
- { __( 'Edit' ) }
61
- </ToolbarButton>
62
- </BlockControls>
63
- ) }
64
- { allowConvertToLinks && isOpen && (
65
- <ConvertToLinksModal
66
- onClose={ closeModal }
67
- clientId={ clientId }
68
- />
69
- ) }
70
- { ! hasResolvedPages && (
55
+ const getBlockContent = () => {
56
+ if ( ! hasResolvedPages ) {
57
+ return (
71
58
  <div { ...blockProps }>
72
59
  <Spinner />
73
60
  </div>
74
- ) }
61
+ );
62
+ }
75
63
 
76
- { hasResolvedPages && totalPages === null && (
64
+ if ( totalPages === null ) {
65
+ return (
77
66
  <div { ...blockProps }>
78
67
  <Notice status={ 'warning' } isDismissible={ false }>
79
68
  { __( 'Page List: Cannot retrieve Pages.' ) }
80
69
  </Notice>
81
70
  </div>
82
- ) }
71
+ );
72
+ }
83
73
 
84
- { totalPages === 0 && (
74
+ if ( totalPages === 0 ) {
75
+ return (
85
76
  <div { ...blockProps }>
86
77
  <Notice status={ 'info' } isDismissible={ false }>
87
78
  { __( 'Page List: Cannot retrieve Pages.' ) }
88
79
  </Notice>
89
80
  </div>
90
- ) }
91
- { totalPages > 0 && (
81
+ );
82
+ }
83
+
84
+ if ( totalPages > 0 ) {
85
+ return (
92
86
  <ul { ...blockProps }>
93
87
  <PageItems
94
88
  context={ context }
95
89
  pagesByParentId={ pagesByParentId }
96
90
  />
97
91
  </ul>
92
+ );
93
+ }
94
+ };
95
+
96
+ return (
97
+ <>
98
+ { allowConvertToLinks && (
99
+ <BlockControls group="other">
100
+ <ToolbarButton title={ __( 'Edit' ) } onClick={ openModal }>
101
+ { __( 'Edit' ) }
102
+ </ToolbarButton>
103
+ </BlockControls>
98
104
  ) }
105
+ { allowConvertToLinks && isOpen && (
106
+ <ConvertToLinksModal
107
+ onClose={ closeModal }
108
+ clientId={ clientId }
109
+ />
110
+ ) }
111
+
112
+ { getBlockContent() }
99
113
  </>
100
114
  );
101
115
  }
@@ -119,7 +119,14 @@ function block_core_page_list_build_css_font_sizes( $context ) {
119
119
  $font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] );
120
120
  } elseif ( $has_custom_font_size ) {
121
121
  // Add the custom font size inline style.
122
- $font_sizes['inline_styles'] = sprintf( 'font-size: %s;', $context['style']['typography']['fontSize'] );
122
+ $font_sizes['inline_styles'] = sprintf(
123
+ 'font-size: %s;',
124
+ wp_get_typography_font_size_value(
125
+ array(
126
+ 'size' => $context['style']['typography']['fontSize'],
127
+ )
128
+ )
129
+ );
123
130
  }
124
131
 
125
132
  return $font_sizes;
@@ -299,11 +306,6 @@ function render_block_core_page_list( $attributes, $content, $block ) {
299
306
 
300
307
  $nested_pages = block_core_page_list_nest_pages( $top_level_pages, $pages_with_children );
301
308
 
302
- // Limit the number of items to be visually displayed.
303
- if ( ! empty( $attributes['__unstableMaxPages'] ) ) {
304
- $nested_pages = array_slice( $nested_pages, 0, $attributes['__unstableMaxPages'] );
305
- }
306
-
307
309
  $is_navigation_child = array_key_exists( 'showSubmenuIcon', $block->context );
308
310
 
309
311
  $open_submenus_on_click = array_key_exists( 'openSubmenusOnClick', $block->context ) ? $block->context['openSubmenusOnClick'] : false;
@@ -6,7 +6,6 @@ import classnames from 'classnames';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { useState } from '@wordpress/element';
10
9
  import { __, _x, isRTL } from '@wordpress/i18n';
11
10
  import {
12
11
  ToolbarButton,
@@ -21,7 +20,6 @@ import {
21
20
  useBlockProps,
22
21
  useSetting,
23
22
  } from '@wordpress/block-editor';
24
- import { useMergeRefs } from '@wordpress/compose';
25
23
  import { createBlock } from '@wordpress/blocks';
26
24
  import { formatLtr } from '@wordpress/icons';
27
25
 
@@ -29,7 +27,6 @@ import { formatLtr } from '@wordpress/icons';
29
27
  * Internal dependencies
30
28
  */
31
29
  import { useOnEnter } from './use-enter';
32
- import DropZone from './drop-zone';
33
30
 
34
31
  const name = 'core/paragraph';
35
32
 
@@ -62,12 +59,8 @@ function ParagraphBlock( {
62
59
  } ) {
63
60
  const { align, content, direction, dropCap, placeholder } = attributes;
64
61
  const isDropCapFeatureEnabled = useSetting( 'typography.dropCap' );
65
- const [ paragraphElement, setParagraphElement ] = useState( null );
66
62
  const blockProps = useBlockProps( {
67
- ref: useMergeRefs( [
68
- useOnEnter( { clientId, content } ),
69
- setParagraphElement,
70
- ] ),
63
+ ref: useOnEnter( { clientId, content } ),
71
64
  className: classnames( {
72
65
  'has-drop-cap': hasDropCapDisabled( align ) ? false : dropCap,
73
66
  [ `has-text-align-${ align }` ]: align,
@@ -130,12 +123,6 @@ function ParagraphBlock( {
130
123
  </ToolsPanelItem>
131
124
  </InspectorControls>
132
125
  ) }
133
- { ! content && (
134
- <DropZone
135
- clientId={ clientId }
136
- paragraphElement={ paragraphElement }
137
- />
138
- ) }
139
126
  <RichText
140
127
  identifier="content"
141
128
  tagName="p"
@@ -17,23 +17,3 @@
17
17
  }
18
18
  }
19
19
  }
20
-
21
- .components-popover.wp-block-paragraph__drop-zone {
22
- .components-popover__content {
23
- border: none;
24
- outline: none;
25
- box-shadow: none;
26
- }
27
-
28
- .wp-block-paragraph__drop-zone-backdrop {
29
- position: absolute;
30
- }
31
-
32
- .wp-block-paragraph__drop-zone-foreground {
33
- position: absolute;
34
- inset: 0;
35
- pointer-events: none;
36
- background-color: var(--wp-admin-theme-color);
37
- border-radius: 2px;
38
- }
39
- }
@@ -26,10 +26,17 @@ const PatternEdit = ( { attributes, clientId } ) => {
26
26
  // It will continue to pull from the pattern file unless changes are made to its respective template part.
27
27
  useEffect( () => {
28
28
  if ( selectedPattern?.blocks ) {
29
- __unstableMarkNextChangeAsNotPersistent();
30
- replaceBlocks( clientId, selectedPattern.blocks );
29
+ // We batch updates to block list settings to avoid triggering cascading renders
30
+ // for each container block included in a tree and optimize initial render.
31
+ // Since the above uses microtasks, we need to use a microtask here as well,
32
+ // because nested pattern blocks cannot be inserted if the parent block supports
33
+ // inner blocks but doesn't have blockSettings in the state.
34
+ window.queueMicrotask( () => {
35
+ __unstableMarkNextChangeAsNotPersistent();
36
+ replaceBlocks( clientId, selectedPattern.blocks );
37
+ } );
31
38
  }
32
- }, [ selectedPattern?.blocks ] );
39
+ }, [ clientId, selectedPattern?.blocks ] );
33
40
 
34
41
  const props = useBlockProps();
35
42
 
@@ -22,6 +22,10 @@
22
22
  "text": true
23
23
  }
24
24
  },
25
+ "spacing": {
26
+ "margin": true,
27
+ "padding": true
28
+ },
25
29
  "typography": {
26
30
  "fontSize": true,
27
31
  "lineHeight": true,
@@ -22,6 +22,10 @@
22
22
  "text": true
23
23
  }
24
24
  },
25
+ "spacing": {
26
+ "margin": true,
27
+ "padding": true
28
+ },
25
29
  "typography": {
26
30
  "fontSize": true,
27
31
  "lineHeight": true,
@@ -13,18 +13,17 @@ import {
13
13
  __experimentalGetElementClassName,
14
14
  } from '@wordpress/block-editor';
15
15
  import { Button } from '@wordpress/components';
16
- import { useDisabled, useInstanceId } from '@wordpress/compose';
16
+ import { useInstanceId } from '@wordpress/compose';
17
17
  import { useEntityProp, store as coreStore } from '@wordpress/core-data';
18
18
  import { useSelect } from '@wordpress/data';
19
19
 
20
20
  const CommentsFormPlaceholder = () => {
21
- const disabledFormRef = useDisabled();
22
21
  const instanceId = useInstanceId( CommentsFormPlaceholder );
23
22
 
24
23
  return (
25
24
  <div className="comment-respond">
26
25
  <h3 className="comment-reply-title">{ __( 'Leave a Reply' ) }</h3>
27
- <form noValidate className="comment-form" ref={ disabledFormRef }>
26
+ <form noValidate className="comment-form" inert="true">
28
27
  <p>
29
28
  <label htmlFor={ `comment-${ instanceId }` }>
30
29
  { __( 'Comment' ) }
@@ -1,4 +1,7 @@
1
1
  .wp-block-post-comments-form {
2
+ // This block has customizable padding, border-box makes that more predictable.
3
+ box-sizing: border-box;
4
+
2
5
  &[style*="font-weight"] :where(.comment-reply-title) {
3
6
  font-weight: inherit;
4
7
  }
@@ -23,6 +23,10 @@
23
23
  "link": true
24
24
  }
25
25
  },
26
+ "spacing": {
27
+ "margin": true,
28
+ "padding": true
29
+ },
26
30
  "typography": {
27
31
  "fontSize": true,
28
32
  "lineHeight": true,
@@ -84,8 +84,8 @@ function Content( props ) {
84
84
  );
85
85
  }
86
86
 
87
- function Placeholder() {
88
- const blockProps = useBlockProps();
87
+ function Placeholder( { layoutClassNames } ) {
88
+ const blockProps = useBlockProps( { className: layoutClassNames } );
89
89
  return (
90
90
  <div { ...blockProps }>
91
91
  <p>
@@ -118,7 +118,11 @@ function RecursionError() {
118
118
  );
119
119
  }
120
120
 
121
- export default function PostContentEdit( { context, attributes } ) {
121
+ export default function PostContentEdit( {
122
+ context,
123
+ attributes,
124
+ __unstableLayoutClassNames: layoutClassNames,
125
+ } ) {
122
126
  const { postId: contextPostId, postType: contextPostType } = context;
123
127
  const { layout = {} } = attributes;
124
128
  const hasAlreadyRendered = useHasRecursion( contextPostId );
@@ -132,7 +136,7 @@ export default function PostContentEdit( { context, attributes } ) {
132
136
  { contextPostId && contextPostType ? (
133
137
  <Content context={ context } layout={ layout } />
134
138
  ) : (
135
- <Placeholder />
139
+ <Placeholder layoutClassNames={ layoutClassNames } />
136
140
  ) }
137
141
  </RecursionProvider>
138
142
  );
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import classnames from 'classnames';
5
- import { get, includes } from 'lodash';
5
+ import { get } from 'lodash';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -140,7 +140,7 @@ const v4 = {
140
140
  className,
141
141
  } = attributes;
142
142
 
143
- const isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );
143
+ const isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );
144
144
 
145
145
  let figureClasses, figureStyles;
146
146
 
@@ -206,7 +206,7 @@ const v4 = {
206
206
  customTextColor,
207
207
  ...attributes
208
208
  } ) {
209
- const isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );
209
+ const isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );
210
210
  let style;
211
211
 
212
212
  if ( customMainColor ) {
@@ -270,7 +270,7 @@ const v3 = {
270
270
  figureStyle,
271
271
  } = attributes;
272
272
 
273
- const isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );
273
+ const isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );
274
274
 
275
275
  let figureClasses, figureStyles;
276
276
 
@@ -345,7 +345,7 @@ const v3 = {
345
345
  customTextColor,
346
346
  ...attributes
347
347
  } ) {
348
- const isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );
348
+ const isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );
349
349
  let style;
350
350
 
351
351
  if ( customMainColor ) {
@@ -416,7 +416,7 @@ const v2 = {
416
416
  citation,
417
417
  className,
418
418
  } = attributes;
419
- const isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );
419
+ const isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );
420
420
 
421
421
  let figureClass, figureStyles;
422
422
  // Is solid color style
@@ -484,7 +484,7 @@ const v2 = {
484
484
  customTextColor,
485
485
  ...attributes
486
486
  } ) {
487
- const isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );
487
+ const isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );
488
488
  let style = {};
489
489
 
490
490
  if ( customMainColor ) {
@@ -22,13 +22,14 @@ import { useEffect, useState, useCallback } from '@wordpress/element';
22
22
  import OrderControl from './order-control';
23
23
  import AuthorControl from './author-control';
24
24
  import ParentControl from './parent-control';
25
- import { TaxonomyControls, useTaxonomiesInfo } from './taxonomy-controls';
25
+ import { TaxonomyControls } from './taxonomy-controls';
26
26
  import StickyControl from './sticky-control';
27
27
  import {
28
28
  usePostTypes,
29
29
  useIsPostTypeHierarchical,
30
30
  useAllowedControls,
31
31
  isControlAllowed,
32
+ useTaxonomies,
32
33
  } from '../../utils';
33
34
 
34
35
  export default function QueryInspectorControls( {
@@ -50,7 +51,7 @@ export default function QueryInspectorControls( {
50
51
  const allowedControls = useAllowedControls( attributes );
51
52
  const [ showSticky, setShowSticky ] = useState( postType === 'post' );
52
53
  const { postTypesTaxonomiesMap, postTypesSelectOptions } = usePostTypes();
53
- const taxonomiesInfo = useTaxonomiesInfo( postType );
54
+ const taxonomies = useTaxonomies( postType );
54
55
  const isPostTypeHierarchical = useIsPostTypeHierarchical( postType );
55
56
  useEffect( () => {
56
57
  setShowSticky( postType === 'post' );
@@ -192,7 +193,7 @@ export default function QueryInspectorControls( {
192
193
  setQuerySearch( '' );
193
194
  } }
194
195
  >
195
- { !! taxonomiesInfo?.length &&
196
+ { !! taxonomies?.length &&
196
197
  isControlAllowed( allowedControls, 'taxQuery' ) && (
197
198
  <ToolsPanelItem
198
199
  label={ __( 'Taxonomies' ) }
@@ -8,14 +8,18 @@ import { store as coreStore } from '@wordpress/core-data';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
- import { getEntitiesInfo, useTaxonomies } from '../../utils';
11
+ import { useTaxonomies } from '../../utils';
12
12
  import { MAX_FETCHED_TERMS } from '../../constants';
13
13
 
14
14
  // Helper function to get the term id based on user input in terms `FormTokenField`.
15
- const getTermIdByTermValue = ( termsMappedByName, termValue ) => {
15
+ const getTermIdByTermValue = ( terms, termValue ) => {
16
16
  // First we check for exact match by `term.id` or case sensitive `term.name` match.
17
- const termId = termValue?.id || termsMappedByName[ termValue ]?.id;
18
- if ( termId ) return termId;
17
+ const termId =
18
+ termValue?.id || terms.find( ( term ) => term.name === termValue )?.id;
19
+ if ( termId ) {
20
+ return termId;
21
+ }
22
+
19
23
  /**
20
24
  * Here we make an extra check for entered terms in a non case sensitive way,
21
25
  * to match user expectations, due to `FormTokenField` behaviour that shows
@@ -26,101 +30,92 @@ const getTermIdByTermValue = ( termsMappedByName, termValue ) => {
26
30
  * In this edge case we always apply the first match from the terms list.
27
31
  */
28
32
  const termValueLower = termValue.toLocaleLowerCase();
29
- for ( const term in termsMappedByName ) {
30
- if ( term.toLocaleLowerCase() === termValueLower ) {
31
- return termsMappedByName[ term ].id;
32
- }
33
- }
33
+ return terms.find(
34
+ ( term ) => term.name.toLocaleLowerCase() === termValueLower
35
+ )?.id;
34
36
  };
35
37
 
36
- export const useTaxonomiesInfo = ( postType ) => {
37
- const taxonomies = useTaxonomies( postType );
38
- const taxonomiesInfo = useSelect(
38
+ const useTaxonomyTerms = ( slug ) => {
39
+ return useSelect(
39
40
  ( select ) => {
40
- const { getEntityRecords } = select( coreStore );
41
- const termsQuery = { context: 'view', per_page: MAX_FETCHED_TERMS };
42
- const _taxonomiesInfo = taxonomies?.map( ( { slug, name } ) => {
43
- const _terms = getEntityRecords( 'taxonomy', slug, termsQuery );
44
- return {
45
- slug,
46
- name,
47
- terms: getEntitiesInfo( _terms ),
48
- };
49
- } );
50
- return _taxonomiesInfo;
41
+ const terms = select( coreStore ).getEntityRecords(
42
+ 'taxonomy',
43
+ slug,
44
+ { context: 'view', per_page: MAX_FETCHED_TERMS }
45
+ );
46
+ return { terms };
51
47
  },
52
- [ taxonomies ]
48
+ [ slug ]
53
49
  );
54
- return taxonomiesInfo;
55
50
  };
56
51
 
57
52
  export function TaxonomyControls( { onChange, query } ) {
58
- const taxonomiesInfo = useTaxonomiesInfo( query.postType );
59
- const onTermsChange = ( taxonomySlug ) => ( newTermValues ) => {
60
- const taxonomyInfo = taxonomiesInfo.find(
61
- ( { slug } ) => slug === taxonomySlug
62
- );
63
- if ( ! taxonomyInfo ) return;
64
- const termIds = Array.from(
65
- newTermValues.reduce( ( accumulator, termValue ) => {
66
- const termId = getTermIdByTermValue(
67
- taxonomyInfo.terms.mapByName,
68
- termValue
53
+ const { postType, taxQuery } = query;
54
+
55
+ const taxonomies = useTaxonomies( postType );
56
+ if ( ! taxonomies || taxonomies.length === 0 ) {
57
+ return null;
58
+ }
59
+
60
+ return (
61
+ <>
62
+ { taxonomies.map( ( taxonomy ) => {
63
+ const value = taxQuery?.[ taxonomy.slug ] || [];
64
+ const handleChange = ( newTermIds ) =>
65
+ onChange( {
66
+ taxQuery: {
67
+ ...taxQuery,
68
+ [ taxonomy.slug ]: newTermIds,
69
+ },
70
+ } );
71
+
72
+ return (
73
+ <TaxonomyItem
74
+ key={ taxonomy.slug }
75
+ taxonomy={ taxonomy }
76
+ value={ value }
77
+ onChange={ handleChange }
78
+ />
69
79
  );
70
- if ( termId ) accumulator.add( termId );
71
- return accumulator;
72
- }, new Set() )
73
- );
74
- const newTaxQuery = {
75
- ...query.taxQuery,
76
- [ taxonomySlug ]: termIds,
77
- };
78
- onChange( { taxQuery: newTaxQuery } );
80
+ } ) }
81
+ </>
82
+ );
83
+ }
84
+ function TaxonomyItem( { taxonomy, value, onChange } ) {
85
+ const { terms } = useTaxonomyTerms( taxonomy.slug );
86
+ if ( ! terms?.length ) {
87
+ return null;
88
+ }
89
+
90
+ const onTermsChange = ( newTermValues ) => {
91
+ const termIds = new Set();
92
+ for ( const termValue of newTermValues ) {
93
+ const termId = getTermIdByTermValue( terms, termValue );
94
+ if ( termId ) {
95
+ termIds.add( termId );
96
+ }
97
+ }
98
+
99
+ onChange( Array.from( termIds ) );
79
100
  };
80
- // Returns only the existing term ids in proper format to be
101
+
102
+ // Selects only the existing term ids in proper format to be
81
103
  // used in `FormTokenField`. This prevents the component from
82
104
  // crashing in the editor, when non existing term ids were provided.
83
- const getExistingTaxQueryValue = ( taxonomySlug ) => {
84
- const taxonomyInfo = taxonomiesInfo.find(
85
- ( { slug } ) => slug === taxonomySlug
86
- );
87
- if ( ! taxonomyInfo ) return [];
88
- return ( query.taxQuery?.[ taxonomySlug ] || [] ).reduce(
89
- ( accumulator, termId ) => {
90
- const term = taxonomyInfo.terms.mapById[ termId ];
91
- if ( term ) {
92
- accumulator.push( {
93
- id: termId,
94
- value: term.name,
95
- } );
96
- }
97
- return accumulator;
98
- },
99
- []
100
- );
101
- };
105
+ const taxQueryValue = value
106
+ .map( ( termId ) => terms.find( ( t ) => t.id === termId ) )
107
+ .filter( Boolean )
108
+ .map( ( term ) => ( { id: term.id, value: term.name } ) );
109
+
102
110
  return (
103
- <>
104
- { !! taxonomiesInfo?.length &&
105
- taxonomiesInfo.map( ( { slug, name, terms } ) => {
106
- if ( ! terms?.names?.length ) {
107
- return null;
108
- }
109
- return (
110
- <div
111
- key={ slug }
112
- className="block-library-query-inspector__taxonomy-control"
113
- >
114
- <FormTokenField
115
- label={ name }
116
- value={ getExistingTaxQueryValue( slug ) }
117
- suggestions={ terms.names }
118
- onChange={ onTermsChange( slug ) }
119
- __experimentalShowHowTo={ false }
120
- />
121
- </div>
122
- );
123
- } ) }
124
- </>
111
+ <div className="block-library-query-inspector__taxonomy-control">
112
+ <FormTokenField
113
+ label={ taxonomy.name }
114
+ value={ taxQueryValue }
115
+ suggestions={ terms.map( ( t ) => t.name ) }
116
+ onChange={ onTermsChange }
117
+ __experimentalShowHowTo={ false }
118
+ />
119
+ </div>
125
120
  );
126
121
  }
package/src/rss/index.php CHANGED
@@ -20,7 +20,7 @@ function render_block_core_rss( $attributes ) {
20
20
  $rss = fetch_feed( $attributes['feedURL'] );
21
21
 
22
22
  if ( is_wp_error( $rss ) ) {
23
- return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</div></div>';
23
+ return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</div></div>';
24
24
  }
25
25
 
26
26
  if ( ! $rss->get_item_quantity() ) {
@@ -48,8 +48,8 @@ function render_block_core_rss( $attributes ) {
48
48
  if ( $date ) {
49
49
  $date = sprintf(
50
50
  '<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ',
51
- date_i18n( get_option( 'c' ), $date ),
52
- date_i18n( get_option( 'date_format' ), $date )
51
+ esc_attr( date_i18n( get_option( 'c' ), $date ) ),
52
+ esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
53
53
  );
54
54
  }
55
55
  }
@@ -16,6 +16,7 @@ import {
16
16
  getTypographyClassesAndStyles as useTypographyProps,
17
17
  store as blockEditorStore,
18
18
  __experimentalGetElementClassName,
19
+ useSetting,
19
20
  } from '@wordpress/block-editor';
20
21
  import { useDispatch, useSelect } from '@wordpress/data';
21
22
  import { useEffect } from '@wordpress/element';
@@ -113,7 +114,11 @@ export default function SearchEdit( {
113
114
  }
114
115
 
115
116
  const colorProps = useColorProps( attributes );
116
- const typographyProps = useTypographyProps( attributes );
117
+ const fluidTypographyEnabled = useSetting( 'typography.fluid' );
118
+ const typographyProps = useTypographyProps(
119
+ attributes,
120
+ fluidTypographyEnabled
121
+ );
117
122
  const unitControlInstanceId = useInstanceId( UnitControl );
118
123
  const unitControlInputId = `wp-block-search__width-${ unitControlInstanceId }`;
119
124
  const isButtonPositionInside = 'button-inside' === buttonPosition;
@@ -358,7 +363,7 @@ export default function SearchEdit( {
358
363
  widthUnit: newUnit,
359
364
  } );
360
365
  } }
361
- style={ { maxWidth: 80 } }
366
+ __unstableInputWidth={ '80px' }
362
367
  value={ `${ width }${ widthUnit }` }
363
368
  units={ units }
364
369
  />