@wordpress/block-library 9.23.0 → 9.25.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 (606) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/button/edit.js +29 -17
  3. package/build/button/edit.js.map +1 -1
  4. package/build/code/index.js +2 -1
  5. package/build/code/index.js.map +1 -1
  6. package/build/columns/edit.js +18 -22
  7. package/build/columns/edit.js.map +1 -1
  8. package/build/comment-author-name/edit.js +41 -12
  9. package/build/comment-author-name/edit.js.map +1 -1
  10. package/build/comment-date/edit.js +41 -12
  11. package/build/comment-date/edit.js.map +1 -1
  12. package/build/comment-edit-link/edit.js +27 -7
  13. package/build/comment-edit-link/edit.js.map +1 -1
  14. package/build/comments/edit/comments-inspector-controls.js +1 -3
  15. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  16. package/build/comments-pagination/edit.js +23 -9
  17. package/build/comments-pagination/edit.js.map +1 -1
  18. package/build/comments-title/edit.js +41 -12
  19. package/build/comments-title/edit.js.map +1 -1
  20. package/build/details/edit.js +27 -3
  21. package/build/details/edit.js.map +1 -1
  22. package/build/details/index.js +2 -1
  23. package/build/details/index.js.map +1 -1
  24. package/build/embed/edit.js +2 -4
  25. package/build/embed/edit.js.map +1 -1
  26. package/build/embed/embed-controls.js +41 -22
  27. package/build/embed/embed-controls.js.map +1 -1
  28. package/build/file/inspector.js +73 -30
  29. package/build/file/inspector.js.map +1 -1
  30. package/build/form/edit.js +67 -37
  31. package/build/form/edit.js.map +1 -1
  32. package/build/form-input/edit.js +47 -18
  33. package/build/form-input/edit.js.map +1 -1
  34. package/build/html/index.js +2 -1
  35. package/build/html/index.js.map +1 -1
  36. package/build/image/constants.js +2 -1
  37. package/build/image/constants.js.map +1 -1
  38. package/build/image/edit.js +1 -1
  39. package/build/image/edit.js.map +1 -1
  40. package/build/image/image.js +1 -4
  41. package/build/image/image.js.map +1 -1
  42. package/build/latest-posts/edit.js +154 -82
  43. package/build/latest-posts/edit.js.map +1 -1
  44. package/build/list/ordered-list-settings.js +131 -52
  45. package/build/list/ordered-list-settings.js.map +1 -1
  46. package/build/more/index.js +2 -1
  47. package/build/more/index.js.map +1 -1
  48. package/build/navigation/edit/index.js +93 -51
  49. package/build/navigation/edit/index.js.map +1 -1
  50. package/build/navigation/edit/overlay-menu-preview.js +43 -27
  51. package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
  52. package/build/navigation-link/index.js +3 -0
  53. package/build/navigation-link/index.js.map +1 -1
  54. package/build/navigation-link/transforms.js +2 -0
  55. package/build/navigation-link/transforms.js.map +1 -1
  56. package/build/navigation-link/update-attributes.js +1 -0
  57. package/build/navigation-link/update-attributes.js.map +1 -1
  58. package/build/navigation-submenu/index.js +3 -0
  59. package/build/navigation-submenu/index.js.map +1 -1
  60. package/build/post-comments-count/index.js +3 -1
  61. package/build/post-comments-count/index.js.map +1 -1
  62. package/build/post-comments-count/transforms.js +26 -0
  63. package/build/post-comments-count/transforms.js.map +1 -0
  64. package/build/post-comments-link/index.js +3 -1
  65. package/build/post-comments-link/index.js.map +1 -1
  66. package/build/post-comments-link/transforms.js +26 -0
  67. package/build/post-comments-link/transforms.js.map +1 -0
  68. package/build/post-excerpt/edit.js +3 -1
  69. package/build/post-excerpt/edit.js.map +1 -1
  70. package/build/post-excerpt/index.js +2 -1
  71. package/build/post-excerpt/index.js.map +1 -1
  72. package/build/post-navigation-link/edit.js +3 -1
  73. package/build/post-navigation-link/edit.js.map +1 -1
  74. package/build/post-navigation-link/index.js +2 -1
  75. package/build/post-navigation-link/index.js.map +1 -1
  76. package/build/post-navigation-link/variations.js +13 -13
  77. package/build/post-navigation-link/variations.js.map +1 -1
  78. package/build/post-template/edit.js +5 -3
  79. package/build/post-template/edit.js.map +1 -1
  80. package/build/post-terms/edit.js +3 -1
  81. package/build/post-terms/edit.js.map +1 -1
  82. package/build/post-terms/index.js +4 -2
  83. package/build/post-terms/index.js.map +1 -1
  84. package/build/post-title/edit.js +56 -18
  85. package/build/post-title/edit.js.map +1 -1
  86. package/build/preformatted/transforms.js +5 -1
  87. package/build/preformatted/transforms.js.map +1 -1
  88. package/build/query/edit/enhanced-pagination-modal.js +1 -1
  89. package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
  90. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
  91. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  92. package/build/read-more/index.js +2 -1
  93. package/build/read-more/index.js.map +1 -1
  94. package/build/rss/edit.js +120 -46
  95. package/build/rss/edit.js.map +1 -1
  96. package/build/rss/index.js +2 -1
  97. package/build/rss/index.js.map +1 -1
  98. package/build/search/edit.js +76 -86
  99. package/build/search/edit.js.map +1 -1
  100. package/build/separator/edit.js +52 -20
  101. package/build/separator/edit.js.map +1 -1
  102. package/build/shortcode/index.js +2 -1
  103. package/build/shortcode/index.js.map +1 -1
  104. package/build/social-link/variations.js +53 -48
  105. package/build/social-link/variations.js.map +1 -1
  106. package/build/social-links/edit.js +35 -45
  107. package/build/social-links/edit.js.map +1 -1
  108. package/build/table/edit.js +3 -2
  109. package/build/table/edit.js.map +1 -1
  110. package/build/table/index.js +8 -4
  111. package/build/table/index.js.map +1 -1
  112. package/build/video/tracks-editor.js +40 -12
  113. package/build/video/tracks-editor.js.map +1 -1
  114. package/build-module/button/edit.js +30 -18
  115. package/build-module/button/edit.js.map +1 -1
  116. package/build-module/code/index.js +2 -1
  117. package/build-module/code/index.js.map +1 -1
  118. package/build-module/columns/edit.js +18 -22
  119. package/build-module/columns/edit.js.map +1 -1
  120. package/build-module/comment-author-name/edit.js +42 -13
  121. package/build-module/comment-author-name/edit.js.map +1 -1
  122. package/build-module/comment-date/edit.js +42 -13
  123. package/build-module/comment-date/edit.js.map +1 -1
  124. package/build-module/comment-edit-link/edit.js +28 -8
  125. package/build-module/comment-edit-link/edit.js.map +1 -1
  126. package/build-module/comments/edit/comments-inspector-controls.js +1 -3
  127. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  128. package/build-module/comments-pagination/edit.js +24 -10
  129. package/build-module/comments-pagination/edit.js.map +1 -1
  130. package/build-module/comments-title/edit.js +42 -13
  131. package/build-module/comments-title/edit.js.map +1 -1
  132. package/build-module/details/edit.js +29 -5
  133. package/build-module/details/edit.js.map +1 -1
  134. package/build-module/details/index.js +2 -1
  135. package/build-module/details/index.js.map +1 -1
  136. package/build-module/embed/edit.js +2 -4
  137. package/build-module/embed/edit.js.map +1 -1
  138. package/build-module/embed/embed-controls.js +42 -23
  139. package/build-module/embed/embed-controls.js.map +1 -1
  140. package/build-module/file/inspector.js +74 -31
  141. package/build-module/file/inspector.js.map +1 -1
  142. package/build-module/form/edit.js +68 -38
  143. package/build-module/form/edit.js.map +1 -1
  144. package/build-module/form-input/edit.js +48 -19
  145. package/build-module/form-input/edit.js.map +1 -1
  146. package/build-module/html/index.js +2 -1
  147. package/build-module/html/index.js.map +1 -1
  148. package/build-module/image/constants.js +1 -0
  149. package/build-module/image/constants.js.map +1 -1
  150. package/build-module/image/edit.js +2 -2
  151. package/build-module/image/edit.js.map +1 -1
  152. package/build-module/image/image.js +2 -5
  153. package/build-module/image/image.js.map +1 -1
  154. package/build-module/latest-posts/edit.js +155 -83
  155. package/build-module/latest-posts/edit.js.map +1 -1
  156. package/build-module/list/ordered-list-settings.js +132 -53
  157. package/build-module/list/ordered-list-settings.js.map +1 -1
  158. package/build-module/more/index.js +2 -1
  159. package/build-module/more/index.js.map +1 -1
  160. package/build-module/navigation/edit/index.js +94 -52
  161. package/build-module/navigation/edit/index.js.map +1 -1
  162. package/build-module/navigation/edit/overlay-menu-preview.js +44 -28
  163. package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
  164. package/build-module/navigation-link/index.js +3 -0
  165. package/build-module/navigation-link/index.js.map +1 -1
  166. package/build-module/navigation-link/transforms.js +2 -0
  167. package/build-module/navigation-link/transforms.js.map +1 -1
  168. package/build-module/navigation-link/update-attributes.js +1 -0
  169. package/build-module/navigation-link/update-attributes.js.map +1 -1
  170. package/build-module/navigation-submenu/index.js +3 -0
  171. package/build-module/navigation-submenu/index.js.map +1 -1
  172. package/build-module/post-comments-count/index.js +3 -1
  173. package/build-module/post-comments-count/index.js.map +1 -1
  174. package/build-module/post-comments-count/transforms.js +19 -0
  175. package/build-module/post-comments-count/transforms.js.map +1 -0
  176. package/build-module/post-comments-link/index.js +3 -1
  177. package/build-module/post-comments-link/index.js.map +1 -1
  178. package/build-module/post-comments-link/transforms.js +19 -0
  179. package/build-module/post-comments-link/transforms.js.map +1 -0
  180. package/build-module/post-excerpt/edit.js +4 -2
  181. package/build-module/post-excerpt/edit.js.map +1 -1
  182. package/build-module/post-excerpt/index.js +2 -1
  183. package/build-module/post-excerpt/index.js.map +1 -1
  184. package/build-module/post-navigation-link/edit.js +4 -2
  185. package/build-module/post-navigation-link/edit.js.map +1 -1
  186. package/build-module/post-navigation-link/index.js +2 -1
  187. package/build-module/post-navigation-link/index.js.map +1 -1
  188. package/build-module/post-navigation-link/variations.js +13 -13
  189. package/build-module/post-navigation-link/variations.js.map +1 -1
  190. package/build-module/post-template/edit.js +5 -3
  191. package/build-module/post-template/edit.js.map +1 -1
  192. package/build-module/post-terms/edit.js +4 -2
  193. package/build-module/post-terms/edit.js.map +1 -1
  194. package/build-module/post-terms/index.js +4 -2
  195. package/build-module/post-terms/index.js.map +1 -1
  196. package/build-module/post-title/edit.js +57 -19
  197. package/build-module/post-title/edit.js.map +1 -1
  198. package/build-module/preformatted/transforms.js +5 -1
  199. package/build-module/preformatted/transforms.js.map +1 -1
  200. package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
  201. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
  202. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
  203. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  204. package/build-module/read-more/index.js +2 -1
  205. package/build-module/read-more/index.js.map +1 -1
  206. package/build-module/rss/edit.js +121 -47
  207. package/build-module/rss/edit.js.map +1 -1
  208. package/build-module/rss/index.js +2 -1
  209. package/build-module/rss/index.js.map +1 -1
  210. package/build-module/search/edit.js +78 -88
  211. package/build-module/search/edit.js.map +1 -1
  212. package/build-module/separator/edit.js +54 -22
  213. package/build-module/separator/edit.js.map +1 -1
  214. package/build-module/shortcode/index.js +2 -1
  215. package/build-module/shortcode/index.js.map +1 -1
  216. package/build-module/social-link/variations.js +53 -48
  217. package/build-module/social-link/variations.js.map +1 -1
  218. package/build-module/social-links/edit.js +37 -47
  219. package/build-module/social-links/edit.js.map +1 -1
  220. package/build-module/table/edit.js +4 -3
  221. package/build-module/table/edit.js.map +1 -1
  222. package/build-module/table/index.js +8 -4
  223. package/build-module/table/index.js.map +1 -1
  224. package/build-module/video/tracks-editor.js +41 -13
  225. package/build-module/video/tracks-editor.js.map +1 -1
  226. package/build-style/archives/editor-rtl.css +47 -11
  227. package/build-style/archives/editor.css +47 -11
  228. package/build-style/archives/style-rtl.css +47 -11
  229. package/build-style/archives/style.css +47 -11
  230. package/build-style/audio/editor-rtl.css +47 -11
  231. package/build-style/audio/editor.css +47 -11
  232. package/build-style/audio/style-rtl.css +47 -11
  233. package/build-style/audio/style.css +47 -11
  234. package/build-style/audio/theme-rtl.css +47 -11
  235. package/build-style/audio/theme.css +47 -11
  236. package/build-style/avatar/editor-rtl.css +47 -11
  237. package/build-style/avatar/editor.css +47 -11
  238. package/build-style/avatar/style-rtl.css +47 -11
  239. package/build-style/avatar/style.css +47 -11
  240. package/build-style/button/editor-rtl.css +47 -11
  241. package/build-style/button/editor.css +47 -11
  242. package/build-style/button/style-rtl.css +47 -12
  243. package/build-style/button/style.css +47 -12
  244. package/build-style/buttons/editor-rtl.css +47 -11
  245. package/build-style/buttons/editor.css +47 -11
  246. package/build-style/buttons/style-rtl.css +50 -11
  247. package/build-style/buttons/style.css +50 -11
  248. package/build-style/calendar/style-rtl.css +47 -11
  249. package/build-style/calendar/style.css +47 -11
  250. package/build-style/categories/editor-rtl.css +47 -11
  251. package/build-style/categories/editor.css +47 -11
  252. package/build-style/categories/style-rtl.css +47 -11
  253. package/build-style/categories/style.css +47 -11
  254. package/build-style/classic-rtl.css +47 -11
  255. package/build-style/classic.css +47 -11
  256. package/build-style/code/editor-rtl.css +47 -11
  257. package/build-style/code/editor.css +47 -11
  258. package/build-style/code/style-rtl.css +47 -11
  259. package/build-style/code/style.css +47 -11
  260. package/build-style/code/theme-rtl.css +47 -11
  261. package/build-style/code/theme.css +47 -11
  262. package/build-style/columns/editor-rtl.css +47 -11
  263. package/build-style/columns/editor.css +47 -11
  264. package/build-style/columns/style-rtl.css +47 -11
  265. package/build-style/columns/style.css +47 -11
  266. package/build-style/comment-author-avatar/editor-rtl.css +47 -11
  267. package/build-style/comment-author-avatar/editor.css +47 -11
  268. package/build-style/comment-author-name/style-rtl.css +47 -11
  269. package/build-style/comment-author-name/style.css +47 -11
  270. package/build-style/comment-content/style-rtl.css +47 -11
  271. package/build-style/comment-content/style.css +47 -11
  272. package/build-style/comment-date/style-rtl.css +47 -11
  273. package/build-style/comment-date/style.css +47 -11
  274. package/build-style/comment-edit-link/style-rtl.css +47 -11
  275. package/build-style/comment-edit-link/style.css +47 -11
  276. package/build-style/comment-reply-link/style-rtl.css +47 -11
  277. package/build-style/comment-reply-link/style.css +47 -11
  278. package/build-style/comment-template/style-rtl.css +47 -11
  279. package/build-style/comment-template/style.css +47 -11
  280. package/build-style/comments/editor-rtl.css +47 -11
  281. package/build-style/comments/editor.css +47 -11
  282. package/build-style/comments/style-rtl.css +47 -11
  283. package/build-style/comments/style.css +47 -11
  284. package/build-style/comments-pagination/editor-rtl.css +47 -11
  285. package/build-style/comments-pagination/editor.css +47 -11
  286. package/build-style/comments-pagination/style-rtl.css +47 -11
  287. package/build-style/comments-pagination/style.css +47 -11
  288. package/build-style/comments-pagination-numbers/editor-rtl.css +47 -11
  289. package/build-style/comments-pagination-numbers/editor.css +47 -11
  290. package/build-style/comments-title/editor-rtl.css +47 -11
  291. package/build-style/comments-title/editor.css +47 -11
  292. package/build-style/common-rtl.css +130 -9
  293. package/build-style/common.css +130 -9
  294. package/build-style/cover/editor-rtl.css +47 -11
  295. package/build-style/cover/editor.css +47 -11
  296. package/build-style/cover/style-rtl.css +47 -11
  297. package/build-style/cover/style.css +47 -11
  298. package/build-style/details/editor-rtl.css +47 -11
  299. package/build-style/details/editor.css +47 -11
  300. package/build-style/details/style-rtl.css +47 -11
  301. package/build-style/details/style.css +47 -11
  302. package/build-style/editor-elements-rtl.css +47 -11
  303. package/build-style/editor-elements.css +47 -11
  304. package/build-style/editor-rtl.css +57 -15
  305. package/build-style/editor.css +57 -15
  306. package/build-style/elements-rtl.css +47 -11
  307. package/build-style/elements.css +47 -11
  308. package/build-style/embed/editor-rtl.css +47 -11
  309. package/build-style/embed/editor.css +47 -11
  310. package/build-style/embed/style-rtl.css +47 -11
  311. package/build-style/embed/style.css +47 -11
  312. package/build-style/embed/theme-rtl.css +47 -11
  313. package/build-style/embed/theme.css +47 -11
  314. package/build-style/file/editor-rtl.css +47 -11
  315. package/build-style/file/editor.css +47 -11
  316. package/build-style/file/style-rtl.css +47 -11
  317. package/build-style/file/style.css +47 -11
  318. package/build-style/footnotes/style-rtl.css +47 -11
  319. package/build-style/footnotes/style.css +47 -11
  320. package/build-style/form-input/editor-rtl.css +47 -11
  321. package/build-style/form-input/editor.css +47 -11
  322. package/build-style/form-input/style-rtl.css +47 -11
  323. package/build-style/form-input/style.css +47 -11
  324. package/build-style/form-submission-notification/editor-rtl.css +47 -11
  325. package/build-style/form-submission-notification/editor.css +47 -11
  326. package/build-style/form-submit-button/style-rtl.css +47 -11
  327. package/build-style/form-submit-button/style.css +47 -11
  328. package/build-style/freeform/editor-rtl.css +47 -11
  329. package/build-style/freeform/editor.css +47 -11
  330. package/build-style/gallery/editor-rtl.css +47 -11
  331. package/build-style/gallery/editor.css +47 -11
  332. package/build-style/gallery/style-rtl.css +48 -11
  333. package/build-style/gallery/style.css +48 -11
  334. package/build-style/gallery/theme-rtl.css +47 -11
  335. package/build-style/gallery/theme.css +47 -11
  336. package/build-style/group/editor-rtl.css +47 -11
  337. package/build-style/group/editor.css +47 -11
  338. package/build-style/group/style-rtl.css +47 -11
  339. package/build-style/group/style.css +47 -11
  340. package/build-style/group/theme-rtl.css +47 -11
  341. package/build-style/group/theme.css +47 -11
  342. package/build-style/heading/style-rtl.css +47 -11
  343. package/build-style/heading/style.css +47 -11
  344. package/build-style/html/editor-rtl.css +48 -11
  345. package/build-style/html/editor.css +48 -11
  346. package/build-style/image/editor-rtl.css +47 -11
  347. package/build-style/image/editor.css +47 -11
  348. package/build-style/image/style-rtl.css +47 -11
  349. package/build-style/image/style.css +47 -11
  350. package/build-style/image/theme-rtl.css +47 -11
  351. package/build-style/image/theme.css +47 -11
  352. package/build-style/latest-comments/style-rtl.css +47 -11
  353. package/build-style/latest-comments/style.css +47 -11
  354. package/build-style/latest-posts/editor-rtl.css +47 -11
  355. package/build-style/latest-posts/editor.css +47 -11
  356. package/build-style/latest-posts/style-rtl.css +47 -11
  357. package/build-style/latest-posts/style.css +47 -11
  358. package/build-style/list/style-rtl.css +47 -11
  359. package/build-style/list/style.css +47 -11
  360. package/build-style/loginout/style-rtl.css +47 -11
  361. package/build-style/loginout/style.css +47 -11
  362. package/build-style/media-text/editor-rtl.css +47 -11
  363. package/build-style/media-text/editor.css +47 -11
  364. package/build-style/media-text/style-rtl.css +47 -11
  365. package/build-style/media-text/style.css +47 -11
  366. package/build-style/more/editor-rtl.css +47 -11
  367. package/build-style/more/editor.css +47 -11
  368. package/build-style/navigation/editor-rtl.css +55 -14
  369. package/build-style/navigation/editor.css +55 -14
  370. package/build-style/navigation/style-rtl.css +47 -11
  371. package/build-style/navigation/style.css +47 -11
  372. package/build-style/navigation-link/editor-rtl.css +47 -11
  373. package/build-style/navigation-link/editor.css +47 -11
  374. package/build-style/navigation-link/style-rtl.css +47 -11
  375. package/build-style/navigation-link/style.css +47 -11
  376. package/build-style/navigation-submenu/editor-rtl.css +47 -11
  377. package/build-style/navigation-submenu/editor.css +47 -11
  378. package/build-style/nextpage/editor-rtl.css +47 -11
  379. package/build-style/nextpage/editor.css +47 -11
  380. package/build-style/page-list/editor-rtl.css +47 -11
  381. package/build-style/page-list/editor.css +47 -11
  382. package/build-style/page-list/style-rtl.css +47 -11
  383. package/build-style/page-list/style.css +47 -11
  384. package/build-style/paragraph/editor-rtl.css +47 -11
  385. package/build-style/paragraph/editor.css +47 -11
  386. package/build-style/paragraph/style-rtl.css +47 -11
  387. package/build-style/paragraph/style.css +47 -11
  388. package/build-style/post-author/editor-rtl.css +47 -11
  389. package/build-style/post-author/editor.css +47 -11
  390. package/build-style/post-author/style-rtl.css +47 -11
  391. package/build-style/post-author/style.css +47 -11
  392. package/build-style/post-author-biography/style-rtl.css +47 -11
  393. package/build-style/post-author-biography/style.css +47 -11
  394. package/build-style/post-author-name/style-rtl.css +47 -11
  395. package/build-style/post-author-name/style.css +47 -11
  396. package/build-style/post-comments-count/style-rtl.css +47 -11
  397. package/build-style/post-comments-count/style.css +47 -11
  398. package/build-style/post-comments-form/editor-rtl.css +47 -11
  399. package/build-style/post-comments-form/editor.css +47 -11
  400. package/build-style/post-comments-form/style-rtl.css +47 -14
  401. package/build-style/post-comments-form/style.css +47 -14
  402. package/build-style/post-comments-link/style-rtl.css +47 -11
  403. package/build-style/post-comments-link/style.css +47 -11
  404. package/build-style/post-content/style-rtl.css +47 -11
  405. package/build-style/post-content/style.css +47 -11
  406. package/build-style/post-date/style-rtl.css +47 -11
  407. package/build-style/post-date/style.css +47 -11
  408. package/build-style/post-excerpt/editor-rtl.css +47 -11
  409. package/build-style/post-excerpt/editor.css +47 -11
  410. package/build-style/post-excerpt/style-rtl.css +47 -11
  411. package/build-style/post-excerpt/style.css +47 -11
  412. package/build-style/post-featured-image/editor-rtl.css +47 -11
  413. package/build-style/post-featured-image/editor.css +47 -11
  414. package/build-style/post-featured-image/style-rtl.css +47 -11
  415. package/build-style/post-featured-image/style.css +47 -11
  416. package/build-style/post-navigation-link/style-rtl.css +47 -11
  417. package/build-style/post-navigation-link/style.css +47 -11
  418. package/build-style/post-template/style-rtl.css +47 -11
  419. package/build-style/post-template/style.css +47 -11
  420. package/build-style/post-terms/style-rtl.css +47 -11
  421. package/build-style/post-terms/style.css +47 -11
  422. package/build-style/post-time-to-read/style-rtl.css +47 -11
  423. package/build-style/post-time-to-read/style.css +47 -11
  424. package/build-style/post-title/style-rtl.css +47 -11
  425. package/build-style/post-title/style.css +47 -11
  426. package/build-style/preformatted/style-rtl.css +47 -11
  427. package/build-style/preformatted/style.css +47 -11
  428. package/build-style/pullquote/editor-rtl.css +48 -12
  429. package/build-style/pullquote/editor.css +48 -12
  430. package/build-style/pullquote/style-rtl.css +49 -14
  431. package/build-style/pullquote/style.css +49 -14
  432. package/build-style/pullquote/theme-rtl.css +49 -13
  433. package/build-style/pullquote/theme.css +49 -13
  434. package/build-style/query/editor-rtl.css +47 -11
  435. package/build-style/query/editor.css +47 -11
  436. package/build-style/query-pagination/editor-rtl.css +47 -11
  437. package/build-style/query-pagination/editor.css +47 -11
  438. package/build-style/query-pagination/style-rtl.css +47 -11
  439. package/build-style/query-pagination/style.css +47 -11
  440. package/build-style/query-pagination-numbers/editor-rtl.css +47 -11
  441. package/build-style/query-pagination-numbers/editor.css +47 -11
  442. package/build-style/query-title/style-rtl.css +47 -11
  443. package/build-style/query-title/style.css +47 -11
  444. package/build-style/query-total/style-rtl.css +47 -11
  445. package/build-style/query-total/style.css +47 -11
  446. package/build-style/quote/style-rtl.css +47 -11
  447. package/build-style/quote/style.css +47 -11
  448. package/build-style/quote/theme-rtl.css +47 -11
  449. package/build-style/quote/theme.css +47 -11
  450. package/build-style/read-more/style-rtl.css +47 -11
  451. package/build-style/read-more/style.css +47 -11
  452. package/build-style/reset-rtl.css +47 -11
  453. package/build-style/reset.css +47 -11
  454. package/build-style/rss/editor-rtl.css +47 -11
  455. package/build-style/rss/editor.css +47 -11
  456. package/build-style/rss/style-rtl.css +47 -11
  457. package/build-style/rss/style.css +47 -11
  458. package/build-style/search/editor-rtl.css +47 -11
  459. package/build-style/search/editor.css +47 -11
  460. package/build-style/search/style-rtl.css +47 -11
  461. package/build-style/search/style.css +47 -11
  462. package/build-style/search/theme-rtl.css +47 -11
  463. package/build-style/search/theme.css +47 -11
  464. package/build-style/separator/editor-rtl.css +47 -11
  465. package/build-style/separator/editor.css +47 -11
  466. package/build-style/separator/style-rtl.css +47 -11
  467. package/build-style/separator/style.css +47 -11
  468. package/build-style/separator/theme-rtl.css +47 -11
  469. package/build-style/separator/theme.css +47 -11
  470. package/build-style/shortcode/editor-rtl.css +47 -11
  471. package/build-style/shortcode/editor.css +47 -11
  472. package/build-style/site-logo/editor-rtl.css +47 -11
  473. package/build-style/site-logo/editor.css +47 -11
  474. package/build-style/site-logo/style-rtl.css +47 -11
  475. package/build-style/site-logo/style.css +47 -11
  476. package/build-style/site-tagline/editor-rtl.css +47 -11
  477. package/build-style/site-tagline/editor.css +47 -11
  478. package/build-style/site-tagline/style-rtl.css +47 -11
  479. package/build-style/site-tagline/style.css +47 -11
  480. package/build-style/site-title/editor-rtl.css +47 -11
  481. package/build-style/site-title/editor.css +47 -11
  482. package/build-style/site-title/style-rtl.css +47 -11
  483. package/build-style/site-title/style.css +47 -11
  484. package/build-style/social-link/editor-rtl.css +47 -11
  485. package/build-style/social-link/editor.css +47 -11
  486. package/build-style/social-links/editor-rtl.css +47 -11
  487. package/build-style/social-links/editor.css +47 -11
  488. package/build-style/social-links/style-rtl.css +47 -11
  489. package/build-style/social-links/style.css +47 -11
  490. package/build-style/spacer/editor-rtl.css +47 -11
  491. package/build-style/spacer/editor.css +47 -11
  492. package/build-style/spacer/style-rtl.css +47 -11
  493. package/build-style/spacer/style.css +47 -11
  494. package/build-style/style-rtl.css +53 -18
  495. package/build-style/style.css +53 -18
  496. package/build-style/table/editor-rtl.css +47 -11
  497. package/build-style/table/editor.css +47 -11
  498. package/build-style/table/style-rtl.css +47 -11
  499. package/build-style/table/style.css +47 -11
  500. package/build-style/table/theme-rtl.css +47 -11
  501. package/build-style/table/theme.css +47 -11
  502. package/build-style/table-of-contents/style-rtl.css +47 -11
  503. package/build-style/table-of-contents/style.css +47 -11
  504. package/build-style/tag-cloud/editor-rtl.css +47 -11
  505. package/build-style/tag-cloud/editor.css +47 -11
  506. package/build-style/tag-cloud/style-rtl.css +47 -11
  507. package/build-style/tag-cloud/style.css +47 -11
  508. package/build-style/template-part/editor-rtl.css +47 -11
  509. package/build-style/template-part/editor.css +47 -11
  510. package/build-style/template-part/theme-rtl.css +47 -11
  511. package/build-style/template-part/theme.css +47 -11
  512. package/build-style/term-description/style-rtl.css +47 -11
  513. package/build-style/term-description/style.css +47 -11
  514. package/build-style/text-columns/editor-rtl.css +47 -11
  515. package/build-style/text-columns/editor.css +47 -11
  516. package/build-style/text-columns/style-rtl.css +47 -11
  517. package/build-style/text-columns/style.css +47 -11
  518. package/build-style/theme-rtl.css +49 -13
  519. package/build-style/theme.css +49 -13
  520. package/build-style/verse/style-rtl.css +47 -11
  521. package/build-style/verse/style.css +47 -11
  522. package/build-style/video/editor-rtl.css +47 -11
  523. package/build-style/video/editor.css +47 -11
  524. package/build-style/video/style-rtl.css +47 -11
  525. package/build-style/video/style.css +47 -11
  526. package/build-style/video/theme-rtl.css +47 -11
  527. package/build-style/video/theme.css +47 -11
  528. package/package.json +35 -35
  529. package/src/button/edit.js +44 -29
  530. package/src/button/style.scss +0 -1
  531. package/src/buttons/style.scss +5 -0
  532. package/src/code/block.json +2 -1
  533. package/src/columns/edit.js +20 -31
  534. package/src/comment-author-name/edit.js +54 -13
  535. package/src/comment-date/edit.js +50 -15
  536. package/src/comment-edit-link/edit.js +39 -11
  537. package/src/comments/edit/comments-inspector-controls.js +0 -2
  538. package/src/comments-pagination/edit.js +29 -9
  539. package/src/comments-title/edit.js +53 -15
  540. package/src/details/block.json +2 -1
  541. package/src/details/edit.js +36 -4
  542. package/src/embed/edit.js +3 -5
  543. package/src/embed/embed-controls.js +55 -33
  544. package/src/file/inspector.js +99 -45
  545. package/src/form/edit.js +91 -46
  546. package/src/form-input/edit.js +56 -18
  547. package/src/gallery/style.scss +1 -0
  548. package/src/html/block.json +2 -1
  549. package/src/html/editor.scss +1 -0
  550. package/src/image/constants.js +1 -0
  551. package/src/image/edit.js +2 -1
  552. package/src/image/image.js +7 -5
  553. package/src/latest-posts/edit.js +206 -98
  554. package/src/list/ordered-list-settings.js +172 -62
  555. package/src/more/block.json +2 -1
  556. package/src/navigation/edit/index.js +127 -64
  557. package/src/navigation/edit/overlay-menu-preview.js +43 -26
  558. package/src/navigation/editor.scss +8 -4
  559. package/src/navigation-link/block.json +3 -0
  560. package/src/navigation-link/index.php +4 -0
  561. package/src/navigation-link/transforms.js +2 -1
  562. package/src/navigation-link/update-attributes.js +1 -0
  563. package/src/navigation-submenu/block.json +3 -0
  564. package/src/navigation-submenu/index.php +4 -0
  565. package/src/post-comments-count/index.js +2 -0
  566. package/src/post-comments-count/transforms.js +20 -0
  567. package/src/post-comments-form/style.scss +0 -5
  568. package/src/post-comments-link/index.js +2 -0
  569. package/src/post-comments-link/transforms.js +20 -0
  570. package/src/post-excerpt/block.json +2 -1
  571. package/src/post-excerpt/edit.js +13 -8
  572. package/src/post-navigation-link/block.json +2 -1
  573. package/src/post-navigation-link/edit.js +13 -8
  574. package/src/post-navigation-link/variations.js +13 -13
  575. package/src/post-template/edit.js +4 -3
  576. package/src/post-terms/block.json +4 -2
  577. package/src/post-terms/edit.js +13 -8
  578. package/src/post-title/edit.js +76 -24
  579. package/src/preformatted/test/__snapshots__/transforms.native.js.snap +6 -0
  580. package/src/preformatted/test/transforms.native.js +6 -1
  581. package/src/preformatted/transforms.js +7 -1
  582. package/src/pullquote/editor.scss +1 -1
  583. package/src/pullquote/style.scss +2 -3
  584. package/src/pullquote/theme.scss +2 -2
  585. package/src/query/edit/enhanced-pagination-modal.js +1 -5
  586. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -13
  587. package/src/read-more/block.json +2 -1
  588. package/src/rss/block.json +2 -1
  589. package/src/rss/edit.js +141 -55
  590. package/src/search/edit.js +84 -99
  591. package/src/separator/edit.js +66 -21
  592. package/src/shortcode/block.json +2 -1
  593. package/src/site-title/index.php +1 -1
  594. package/src/social-link/index.php +49 -49
  595. package/src/social-link/variations.js +53 -48
  596. package/src/social-links/edit.js +39 -60
  597. package/src/table/block.json +8 -4
  598. package/src/table/edit.js +6 -2
  599. package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
  600. package/src/verse/test/transforms.native.js +5 -1
  601. package/src/video/tracks-editor.js +57 -16
  602. package/build/search/icons.js +0 -121
  603. package/build/search/icons.js.map +0 -1
  604. package/build-module/search/icons.js +0 -114
  605. package/build-module/search/icons.js.map +0 -1
  606. package/src/search/icons.js +0 -89
@@ -3,10 +3,11 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import {
6
- PanelBody,
7
6
  RangeControl,
8
7
  SelectControl,
9
8
  ToggleControl,
9
+ __experimentalToolsPanel as ToolsPanel,
10
+ __experimentalToolsPanelItem as ToolsPanelItem,
10
11
  } from '@wordpress/components';
11
12
  import { InspectorControls } from '@wordpress/block-editor';
12
13
 
@@ -14,6 +15,7 @@ import { InspectorControls } from '@wordpress/block-editor';
14
15
  * Internal dependencies
15
16
  */
16
17
  import { MIN_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT } from './edit';
18
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
17
19
 
18
20
  export default function FileBlockInspector( {
19
21
  hrefs,
@@ -28,6 +30,7 @@ export default function FileBlockInspector( {
28
30
  changePreviewHeight,
29
31
  } ) {
30
32
  const { href, textLinkHref, attachmentPage } = hrefs;
33
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
31
34
 
32
35
  let linkDestinationOptions = [ { value: href, label: __( 'URL' ) } ];
33
36
  if ( attachmentPage ) {
@@ -41,58 +44,109 @@ export default function FileBlockInspector( {
41
44
  <>
42
45
  <InspectorControls>
43
46
  { href.endsWith( '.pdf' ) && (
44
- <PanelBody title={ __( 'PDF settings' ) }>
45
- <ToggleControl
46
- __nextHasNoMarginBottom
47
+ <ToolsPanel
48
+ label={ __( 'PDF settings' ) }
49
+ resetAll={ () => {
50
+ changeDisplayPreview( true );
51
+ changePreviewHeight( 600 );
52
+ } }
53
+ dropdownMenuProps={ dropdownMenuProps }
54
+ >
55
+ <ToolsPanelItem
47
56
  label={ __( 'Show inline embed' ) }
48
- help={
49
- displayPreview
50
- ? __(
51
- "Note: Most phone and tablet browsers won't display embedded PDFs."
52
- )
53
- : null
54
- }
55
- checked={ !! displayPreview }
56
- onChange={ changeDisplayPreview }
57
- />
58
- { displayPreview && (
59
- <RangeControl
57
+ isShownByDefault
58
+ hasValue={ () => ! displayPreview }
59
+ onDeselect={ () => changeDisplayPreview( true ) }
60
+ >
61
+ <ToggleControl
60
62
  __nextHasNoMarginBottom
61
- __next40pxDefaultSize
62
- label={ __( 'Height in pixels' ) }
63
- min={ MIN_PREVIEW_HEIGHT }
64
- max={ Math.max(
65
- MAX_PREVIEW_HEIGHT,
66
- previewHeight
67
- ) }
68
- value={ previewHeight }
69
- onChange={ changePreviewHeight }
63
+ label={ __( 'Show inline embed' ) }
64
+ help={
65
+ displayPreview
66
+ ? __(
67
+ "Note: Most phone and tablet browsers won't display embedded PDFs."
68
+ )
69
+ : null
70
+ }
71
+ checked={ !! displayPreview }
72
+ onChange={ changeDisplayPreview }
70
73
  />
74
+ </ToolsPanelItem>
75
+ { displayPreview && (
76
+ <ToolsPanelItem
77
+ label={ __( 'Height in pixels' ) }
78
+ isShownByDefault
79
+ hasValue={ () => previewHeight !== 600 }
80
+ onDeselect={ () => changePreviewHeight( 600 ) }
81
+ >
82
+ <RangeControl
83
+ __nextHasNoMarginBottom
84
+ __next40pxDefaultSize
85
+ label={ __( 'Height in pixels' ) }
86
+ min={ MIN_PREVIEW_HEIGHT }
87
+ max={ Math.max(
88
+ MAX_PREVIEW_HEIGHT,
89
+ previewHeight
90
+ ) }
91
+ value={ previewHeight }
92
+ onChange={ changePreviewHeight }
93
+ />
94
+ </ToolsPanelItem>
71
95
  ) }
72
- </PanelBody>
96
+ </ToolsPanel>
73
97
  ) }
74
- <PanelBody title={ __( 'Settings' ) }>
75
- <SelectControl
76
- __next40pxDefaultSize
77
- __nextHasNoMarginBottom
98
+
99
+ <ToolsPanel
100
+ label={ __( 'Settings' ) }
101
+ resetAll={ () => {
102
+ changeLinkDestinationOption( href );
103
+ changeOpenInNewWindow( false );
104
+ changeShowDownloadButton( true );
105
+ } }
106
+ dropdownMenuProps={ dropdownMenuProps }
107
+ >
108
+ <ToolsPanelItem
78
109
  label={ __( 'Link to' ) }
79
- value={ textLinkHref }
80
- options={ linkDestinationOptions }
81
- onChange={ changeLinkDestinationOption }
82
- />
83
- <ToggleControl
84
- __nextHasNoMarginBottom
110
+ isShownByDefault
111
+ hasValue={ () => textLinkHref !== href }
112
+ onDeselect={ () => changeLinkDestinationOption( href ) }
113
+ >
114
+ <SelectControl
115
+ __next40pxDefaultSize
116
+ __nextHasNoMarginBottom
117
+ label={ __( 'Link to' ) }
118
+ value={ textLinkHref }
119
+ options={ linkDestinationOptions }
120
+ onChange={ changeLinkDestinationOption }
121
+ />
122
+ </ToolsPanelItem>
123
+ <ToolsPanelItem
85
124
  label={ __( 'Open in new tab' ) }
86
- checked={ openInNewWindow }
87
- onChange={ changeOpenInNewWindow }
88
- />
89
- <ToggleControl
90
- __nextHasNoMarginBottom
125
+ isShownByDefault
126
+ hasValue={ () => !! openInNewWindow }
127
+ onDeselect={ () => changeOpenInNewWindow( false ) }
128
+ >
129
+ <ToggleControl
130
+ __nextHasNoMarginBottom
131
+ label={ __( 'Open in new tab' ) }
132
+ checked={ openInNewWindow }
133
+ onChange={ changeOpenInNewWindow }
134
+ />
135
+ </ToolsPanelItem>
136
+ <ToolsPanelItem
91
137
  label={ __( 'Show download button' ) }
92
- checked={ showDownloadButton }
93
- onChange={ changeShowDownloadButton }
94
- />
95
- </PanelBody>
138
+ isShownByDefault
139
+ hasValue={ () => ! showDownloadButton }
140
+ onDeselect={ () => changeShowDownloadButton( true ) }
141
+ >
142
+ <ToggleControl
143
+ __nextHasNoMarginBottom
144
+ label={ __( 'Show download button' ) }
145
+ checked={ showDownloadButton }
146
+ onChange={ changeShowDownloadButton }
147
+ />
148
+ </ToolsPanelItem>
149
+ </ToolsPanel>
96
150
  </InspectorControls>
97
151
  </>
98
152
  );
package/src/form/edit.js CHANGED
@@ -9,12 +9,18 @@ import {
9
9
  InspectorControls,
10
10
  store as blockEditorStore,
11
11
  } from '@wordpress/block-editor';
12
- import { TextControl, SelectControl, PanelBody } from '@wordpress/components';
12
+ import {
13
+ SelectControl,
14
+ TextControl,
15
+ __experimentalToolsPanel as ToolsPanel,
16
+ __experimentalToolsPanelItem as ToolsPanelItem,
17
+ } from '@wordpress/components';
13
18
  import { useSelect } from '@wordpress/data';
14
19
 
15
20
  /**
16
21
  * Internal dependencies
17
22
  */
23
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
18
24
  import {
19
25
  formSubmissionNotificationSuccess,
20
26
  formSubmissionNotificationError,
@@ -51,6 +57,17 @@ const TEMPLATE = [
51
57
  ];
52
58
 
53
59
  const Edit = ( { attributes, setAttributes, clientId } ) => {
60
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
61
+
62
+ const resetAllSettings = () => {
63
+ setAttributes( {
64
+ submissionMethod: 'email',
65
+ email: undefined,
66
+ action: undefined,
67
+ method: 'post',
68
+ } );
69
+ };
70
+
54
71
  const { action, method, email, submissionMethod } = attributes;
55
72
  const blockProps = useBlockProps();
56
73
 
@@ -75,58 +92,86 @@ const Edit = ( { attributes, setAttributes, clientId } ) => {
75
92
  return (
76
93
  <>
77
94
  <InspectorControls>
78
- <PanelBody title={ __( 'Settings' ) }>
79
- <SelectControl
80
- __nextHasNoMarginBottom
81
- __next40pxDefaultSize
95
+ <ToolsPanel
96
+ dropdownMenuProps={ dropdownMenuProps }
97
+ label={ __( 'Settings' ) }
98
+ resetAll={ resetAllSettings }
99
+ >
100
+ <ToolsPanelItem
101
+ hasValue={ () => submissionMethod !== 'email' }
82
102
  label={ __( 'Submissions method' ) }
83
- options={ [
84
- // TODO: Allow plugins to add their own submission methods.
85
- {
86
- label: __( 'Send email' ),
87
- value: 'email',
88
- },
89
- {
90
- label: __( '- Custom -' ),
91
- value: 'custom',
92
- },
93
- ] }
94
- value={ submissionMethod }
95
- onChange={ ( value ) =>
96
- setAttributes( { submissionMethod: value } )
97
- }
98
- help={
99
- submissionMethod === 'custom'
100
- ? __(
101
- 'Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'
102
- )
103
- : __(
104
- 'Select the method to use for form submissions.'
105
- )
103
+ onDeselect={ () =>
104
+ setAttributes( {
105
+ submissionMethod: 'email',
106
+ } )
106
107
  }
107
- />
108
- { submissionMethod === 'email' && (
109
- <TextControl
108
+ isShownByDefault
109
+ >
110
+ <SelectControl
110
111
  __nextHasNoMarginBottom
111
112
  __next40pxDefaultSize
112
- autoComplete="off"
113
+ label={ __( 'Submissions method' ) }
114
+ options={ [
115
+ // TODO: Allow plugins to add their own submission methods.
116
+ {
117
+ label: __( 'Send email' ),
118
+ value: 'email',
119
+ },
120
+ {
121
+ label: __( '- Custom -' ),
122
+ value: 'custom',
123
+ },
124
+ ] }
125
+ value={ submissionMethod }
126
+ onChange={ ( value ) =>
127
+ setAttributes( { submissionMethod: value } )
128
+ }
129
+ help={
130
+ submissionMethod === 'custom'
131
+ ? __(
132
+ 'Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'
133
+ )
134
+ : __(
135
+ 'Select the method to use for form submissions.'
136
+ )
137
+ }
138
+ />
139
+ </ToolsPanelItem>
140
+ { submissionMethod === 'email' && (
141
+ <ToolsPanelItem
142
+ hasValue={ () => !! email }
113
143
  label={ __( 'Email for form submissions' ) }
114
- value={ email }
115
- required
116
- onChange={ ( value ) => {
117
- setAttributes( { email: value } );
144
+ onDeselect={ () =>
118
145
  setAttributes( {
119
- action: `mailto:${ value }`,
120
- } );
121
- setAttributes( { method: 'post' } );
122
- } }
123
- help={ __(
124
- 'The email address where form submissions will be sent. Separate multiple email addresses with a comma.'
125
- ) }
126
- type="email"
127
- />
146
+ email: undefined,
147
+ action: undefined,
148
+ method: 'post',
149
+ } )
150
+ }
151
+ isShownByDefault
152
+ >
153
+ <TextControl
154
+ __nextHasNoMarginBottom
155
+ __next40pxDefaultSize
156
+ autoComplete="off"
157
+ label={ __( 'Email for form submissions' ) }
158
+ value={ email || '' }
159
+ required
160
+ onChange={ ( value ) => {
161
+ setAttributes( { email: value } );
162
+ setAttributes( {
163
+ action: `mailto:${ value }`,
164
+ } );
165
+ setAttributes( { method: 'post' } );
166
+ } }
167
+ help={ __(
168
+ 'The email address where form submissions will be sent. Separate multiple email addresses with a comma.'
169
+ ) }
170
+ type="email"
171
+ />
172
+ </ToolsPanelItem>
128
173
  ) }
129
- </PanelBody>
174
+ </ToolsPanel>
130
175
  </InspectorControls>
131
176
  { submissionMethod !== 'email' && (
132
177
  <InspectorControls group="advanced">
@@ -14,14 +14,24 @@ import {
14
14
  __experimentalUseBorderProps as useBorderProps,
15
15
  __experimentalUseColorProps as useColorProps,
16
16
  } from '@wordpress/block-editor';
17
- import { PanelBody, TextControl, CheckboxControl } from '@wordpress/components';
18
-
17
+ import {
18
+ TextControl,
19
+ CheckboxControl,
20
+ __experimentalToolsPanel as ToolsPanel,
21
+ __experimentalToolsPanelItem as ToolsPanelItem,
22
+ } from '@wordpress/components';
19
23
  import { useRef } from '@wordpress/element';
20
24
 
25
+ /**
26
+ * Internal dependencies
27
+ */
28
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
29
+
21
30
  function InputFieldBlock( { attributes, setAttributes, className } ) {
22
31
  const { type, name, label, inlineLabel, required, placeholder, value } =
23
32
  attributes;
24
33
  const blockProps = useBlockProps();
34
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
25
35
  const ref = useRef();
26
36
  const TagName = type === 'textarea' ? 'textarea' : 'input';
27
37
 
@@ -38,30 +48,58 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
38
48
  <>
39
49
  { 'hidden' !== type && (
40
50
  <InspectorControls>
41
- <PanelBody title={ __( 'Settings' ) }>
51
+ <ToolsPanel
52
+ label={ __( 'Settings' ) }
53
+ resetAll={ () => {
54
+ setAttributes( {
55
+ inlineLabel: false,
56
+ required: false,
57
+ } );
58
+ } }
59
+ dropdownMenuProps={ dropdownMenuProps }
60
+ >
42
61
  { 'checkbox' !== type && (
62
+ <ToolsPanelItem
63
+ label={ __( 'Inline label' ) }
64
+ hasValue={ () => !! inlineLabel }
65
+ onDeselect={ () =>
66
+ setAttributes( { inlineLabel: false } )
67
+ }
68
+ isShownByDefault
69
+ >
70
+ <CheckboxControl
71
+ __nextHasNoMarginBottom
72
+ label={ __( 'Inline label' ) }
73
+ checked={ inlineLabel }
74
+ onChange={ ( newVal ) => {
75
+ setAttributes( {
76
+ inlineLabel: newVal,
77
+ } );
78
+ } }
79
+ />
80
+ </ToolsPanelItem>
81
+ ) }
82
+
83
+ <ToolsPanelItem
84
+ label={ __( 'Required' ) }
85
+ hasValue={ () => !! required }
86
+ onDeselect={ () =>
87
+ setAttributes( { required: false } )
88
+ }
89
+ isShownByDefault
90
+ >
43
91
  <CheckboxControl
44
92
  __nextHasNoMarginBottom
45
- label={ __( 'Inline label' ) }
46
- checked={ inlineLabel }
93
+ label={ __( 'Required' ) }
94
+ checked={ required }
47
95
  onChange={ ( newVal ) => {
48
96
  setAttributes( {
49
- inlineLabel: newVal,
97
+ required: newVal,
50
98
  } );
51
99
  } }
52
100
  />
53
- ) }
54
- <CheckboxControl
55
- __nextHasNoMarginBottom
56
- label={ __( 'Required' ) }
57
- checked={ required }
58
- onChange={ ( newVal ) => {
59
- setAttributes( {
60
- required: newVal,
61
- } );
62
- } }
63
- />
64
- </PanelBody>
101
+ </ToolsPanelItem>
102
+ </ToolsPanel>
65
103
  </InspectorControls>
66
104
  ) }
67
105
  <InspectorControls group="advanced">
@@ -58,6 +58,7 @@ figure.wp-block-gallery.has-nested-images {
58
58
  content: "";
59
59
  height: 100%;
60
60
  max-height: 40%;
61
+ pointer-events: none;
61
62
 
62
63
  // Blur the background under the gradient scrim.
63
64
  backdrop-filter: blur(3px);
@@ -10,7 +10,8 @@
10
10
  "attributes": {
11
11
  "content": {
12
12
  "type": "string",
13
- "source": "raw"
13
+ "source": "raw",
14
+ "role": "content"
14
15
  }
15
16
  },
16
17
  "supports": {
@@ -10,6 +10,7 @@
10
10
  // The editing view for the HTML block is equivalent to block UI.
11
11
  // Therefore we increase specificity to avoid theme styles bleeding in.
12
12
  .block-editor-plain-text {
13
+ display: block;
13
14
  box-sizing: border-box;
14
15
  max-height: 250px;
15
16
  @include editor-input-reset();
@@ -7,3 +7,4 @@ export const NEW_TAB_REL = [ 'noreferrer', 'noopener' ];
7
7
  export const ALLOWED_MEDIA_TYPES = [ 'image' ];
8
8
  export const MEDIA_ID_NO_FEATURED_IMAGE_SET = 0;
9
9
  export const SIZED_LAYOUTS = [ 'flex', 'grid' ];
10
+ export const DEFAULT_MEDIA_SIZE_SLUG = 'full';
package/src/image/edit.js CHANGED
@@ -42,6 +42,7 @@ import {
42
42
  LINK_DESTINATION_MEDIA,
43
43
  LINK_DESTINATION_NONE,
44
44
  ALLOWED_MEDIA_TYPES,
45
+ DEFAULT_MEDIA_SIZE_SLUG,
45
46
  } from './constants';
46
47
 
47
48
  export const pickRelevantMediaFiles = ( image, size ) => {
@@ -239,7 +240,7 @@ export function ImageEdit( {
239
240
 
240
241
  // Try to use the previous selected image size if its available
241
242
  // otherwise try the default image size or fallback to "full"
242
- let newSize = 'full';
243
+ let newSize = DEFAULT_MEDIA_SIZE_SLUG;
243
244
  if ( sizeSlug && hasSize( media, sizeSlug ) ) {
244
245
  newSize = sizeSlug;
245
246
  } else if ( hasSize( media, imageDefaultSize ) ) {
@@ -53,12 +53,13 @@ import { unlock } from '../lock-unlock';
53
53
  import { createUpgradedEmbedBlock } from '../embed/util';
54
54
  import { isExternalImage } from './edit';
55
55
  import { Caption } from '../utils/caption';
56
-
57
- /**
58
- * Module constants
59
- */
60
56
  import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
61
- import { MIN_SIZE, ALLOWED_MEDIA_TYPES, SIZED_LAYOUTS } from './constants';
57
+ import {
58
+ MIN_SIZE,
59
+ ALLOWED_MEDIA_TYPES,
60
+ SIZED_LAYOUTS,
61
+ DEFAULT_MEDIA_SIZE_SLUG,
62
+ } from './constants';
62
63
  import { evalAspectRatio } from './utils';
63
64
 
64
65
  const { DimensionsTool, ResolutionTool } = unlock( blockEditorPrivateApis );
@@ -836,6 +837,7 @@ export default function Image( {
836
837
  { !! imageSizeOptions.length && (
837
838
  <ResolutionTool
838
839
  value={ sizeSlug }
840
+ defaultValue={ DEFAULT_MEDIA_SIZE_SLUG }
839
841
  onChange={ updateImage }
840
842
  options={ imageSizeOptions }
841
843
  />