@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
@@ -181,14 +181,15 @@ export default function PostTemplateEdit( {
181
181
  * Handle cases where sticky is set to `exclude` or `only`.
182
182
  * Which works as a `post__in/post__not_in` query for sticky posts.
183
183
  */
184
- if ( sticky && sticky !== 'ignore' ) {
184
+ if ( [ 'exclude', 'only' ].includes( sticky ) ) {
185
185
  query.sticky = sticky === 'only';
186
186
  }
187
187
 
188
- if ( sticky === 'ignore' ) {
188
+ // Empty string represents the default behavior of including sticky posts.
189
+ if ( [ '', 'ignore' ].includes( sticky ) ) {
189
190
  // Remove any leftover sticky query parameter.
190
191
  delete query.sticky;
191
- query.ignore_sticky = true;
192
+ query.ignore_sticky = sticky === 'ignore';
192
193
  }
193
194
 
194
195
  // If `inherit` is truthy, adjust conditionally the query to create a better preview.
@@ -19,11 +19,13 @@
19
19
  },
20
20
  "prefix": {
21
21
  "type": "string",
22
- "default": ""
22
+ "default": "",
23
+ "role": "content"
23
24
  },
24
25
  "suffix": {
25
26
  "type": "string",
26
- "default": ""
27
+ "default": "",
28
+ "role": "content"
27
29
  }
28
30
  },
29
31
  "usesContext": [ "postId", "postType" ],
@@ -13,6 +13,7 @@ import {
13
13
  useBlockProps,
14
14
  useBlockDisplayInformation,
15
15
  RichText,
16
+ useBlockEditingMode,
16
17
  } from '@wordpress/block-editor';
17
18
  import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
18
19
  import { Spinner, TextControl } from '@wordpress/components';
@@ -46,6 +47,8 @@ export default function PostTermsEdit( {
46
47
  } ) {
47
48
  const { term, textAlign, separator, prefix, suffix } = attributes;
48
49
  const { postId, postType } = context;
50
+ const blockEditingMode = useBlockEditingMode();
51
+ const showControls = blockEditingMode === 'default';
49
52
 
50
53
  const selectedTerm = useSelect(
51
54
  ( select ) => {
@@ -73,14 +76,16 @@ export default function PostTermsEdit( {
73
76
 
74
77
  return (
75
78
  <>
76
- <BlockControls>
77
- <AlignmentToolbar
78
- value={ textAlign }
79
- onChange={ ( nextAlign ) => {
80
- setAttributes( { textAlign: nextAlign } );
81
- } }
82
- />
83
- </BlockControls>
79
+ { showControls && (
80
+ <BlockControls>
81
+ <AlignmentToolbar
82
+ value={ textAlign }
83
+ onChange={ ( nextAlign ) => {
84
+ setAttributes( { textAlign: nextAlign } );
85
+ } }
86
+ />
87
+ </BlockControls>
88
+ ) }
84
89
  <InspectorControls group="advanced">
85
90
  <TextControl
86
91
  __next40pxDefaultSize
@@ -15,12 +15,22 @@ import {
15
15
  HeadingLevelDropdown,
16
16
  useBlockEditingMode,
17
17
  } from '@wordpress/block-editor';
18
- import { ToggleControl, TextControl, PanelBody } from '@wordpress/components';
18
+ import {
19
+ ToggleControl,
20
+ TextControl,
21
+ __experimentalToolsPanel as ToolsPanel,
22
+ __experimentalToolsPanelItem as ToolsPanelItem,
23
+ } from '@wordpress/components';
19
24
  import { __ } from '@wordpress/i18n';
20
25
  import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
21
26
  import { useEntityProp, store as coreStore } from '@wordpress/core-data';
22
27
  import { useSelect } from '@wordpress/data';
23
28
 
29
+ /**
30
+ * Internal dependencies
31
+ */
32
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
33
+
24
34
  export default function PostTitleEdit( {
25
35
  attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
26
36
  setAttributes,
@@ -66,6 +76,7 @@ export default function PostTitleEdit( {
66
76
  } ),
67
77
  } );
68
78
  const blockEditingMode = useBlockEditingMode();
79
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
69
80
 
70
81
  let titleElement = <TagName { ...blockProps }>{ __( 'Title' ) }</TagName>;
71
82
 
@@ -138,41 +149,82 @@ export default function PostTitleEdit( {
138
149
  />
139
150
  </BlockControls>
140
151
  <InspectorControls>
141
- <PanelBody title={ __( 'Settings' ) }>
142
- <ToggleControl
143
- __nextHasNoMarginBottom
152
+ <ToolsPanel
153
+ label={ __( 'Settings' ) }
154
+ resetAll={ () => {
155
+ setAttributes( {
156
+ rel: '',
157
+ linkTarget: '_self',
158
+ isLink: false,
159
+ } );
160
+ } }
161
+ dropdownMenuProps={ dropdownMenuProps }
162
+ >
163
+ <ToolsPanelItem
144
164
  label={ __( 'Make title a link' ) }
145
- onChange={ () =>
146
- setAttributes( { isLink: ! isLink } )
165
+ isShownByDefault
166
+ hasValue={ () => isLink }
167
+ onDeselect={ () =>
168
+ setAttributes( { isLink: false } )
147
169
  }
148
- checked={ isLink }
149
- />
170
+ >
171
+ <ToggleControl
172
+ __nextHasNoMarginBottom
173
+ label={ __( 'Make title a link' ) }
174
+ onChange={ () =>
175
+ setAttributes( { isLink: ! isLink } )
176
+ }
177
+ checked={ isLink }
178
+ />
179
+ </ToolsPanelItem>
150
180
  { isLink && (
151
181
  <>
152
- <ToggleControl
153
- __nextHasNoMarginBottom
182
+ <ToolsPanelItem
154
183
  label={ __( 'Open in new tab' ) }
155
- onChange={ ( value ) =>
184
+ isShownByDefault
185
+ hasValue={ () =>
186
+ linkTarget === '_blank'
187
+ }
188
+ onDeselect={ () =>
156
189
  setAttributes( {
157
- linkTarget: value
158
- ? '_blank'
159
- : '_self',
190
+ linkTarget: '_self',
160
191
  } )
161
192
  }
162
- checked={ linkTarget === '_blank' }
163
- />
164
- <TextControl
165
- __next40pxDefaultSize
166
- __nextHasNoMarginBottom
193
+ >
194
+ <ToggleControl
195
+ __nextHasNoMarginBottom
196
+ label={ __( 'Open in new tab' ) }
197
+ onChange={ ( value ) =>
198
+ setAttributes( {
199
+ linkTarget: value
200
+ ? '_blank'
201
+ : '_self',
202
+ } )
203
+ }
204
+ checked={ linkTarget === '_blank' }
205
+ />
206
+ </ToolsPanelItem>
207
+ <ToolsPanelItem
167
208
  label={ __( 'Link rel' ) }
168
- value={ rel }
169
- onChange={ ( newRel ) =>
170
- setAttributes( { rel: newRel } )
209
+ isShownByDefault
210
+ hasValue={ () => !! rel }
211
+ onDeselect={ () =>
212
+ setAttributes( { rel: '' } )
171
213
  }
172
- />
214
+ >
215
+ <TextControl
216
+ __next40pxDefaultSize
217
+ __nextHasNoMarginBottom
218
+ label={ __( 'Link rel' ) }
219
+ value={ rel }
220
+ onChange={ ( newRel ) =>
221
+ setAttributes( { rel: newRel } )
222
+ }
223
+ />
224
+ </ToolsPanelItem>
173
225
  </>
174
226
  ) }
175
- </PanelBody>
227
+ </ToolsPanel>
176
228
  </InspectorControls>
177
229
  </>
178
230
  ) }
@@ -29,3 +29,9 @@ exports[`Preformatted block transforms to Paragraph block 1`] = `
29
29
  <p>Some <em>preformatted</em> text...<br />And more!</p>
30
30
  <!-- /wp:paragraph -->"
31
31
  `;
32
+
33
+ exports[`Preformatted block transforms to Verse block 1`] = `
34
+ "<!-- wp:verse -->
35
+ <pre class="wp-block-verse">Some <em>preformatted</em> text...<br />And more!</pre>
36
+ <!-- /wp:verse -->"
37
+ `;
@@ -16,7 +16,12 @@ const initialHtml = `
16
16
  <!-- /wp:preformatted -->`;
17
17
 
18
18
  const transformsWithInnerBlocks = [ 'Columns', 'Group' ];
19
- const blockTransforms = [ 'Paragraph', 'Code', ...transformsWithInnerBlocks ];
19
+ const blockTransforms = [
20
+ 'Paragraph',
21
+ 'Code',
22
+ 'Verse',
23
+ ...transformsWithInnerBlocks,
24
+ ];
20
25
 
21
26
  setupCoreBlocks();
22
27
 
@@ -7,7 +7,7 @@ const transforms = {
7
7
  from: [
8
8
  {
9
9
  type: 'block',
10
- blocks: [ 'core/code', 'core/paragraph' ],
10
+ blocks: [ 'core/code', 'core/paragraph', 'core/verse' ],
11
11
  transform: ( { content, anchor } ) =>
12
12
  createBlock( 'core/preformatted', {
13
13
  content,
@@ -41,6 +41,12 @@ const transforms = {
41
41
  blocks: [ 'core/code' ],
42
42
  transform: ( attributes ) => createBlock( 'core/code', attributes ),
43
43
  },
44
+ {
45
+ type: 'block',
46
+ blocks: [ 'core/verse' ],
47
+ transform: ( attributes ) =>
48
+ createBlock( 'core/verse', attributes ),
49
+ },
44
50
  ],
45
51
  };
46
52
 
@@ -12,6 +12,6 @@
12
12
  }
13
13
  }
14
14
 
15
- .wp-block-pullquote .wp-block-pullquote__citation {
15
+ .wp-block-pullquote__citation {
16
16
  color: inherit;
17
17
  }
@@ -6,8 +6,7 @@
6
6
  padding: 4em 0;
7
7
 
8
8
  p,
9
- blockquote,
10
- cite {
9
+ blockquote {
11
10
  color: inherit;
12
11
  }
13
12
 
@@ -74,7 +73,7 @@
74
73
  }
75
74
  }
76
75
 
77
- .wp-block-pullquote cite {
76
+ .wp-block-pullquote :where(cite) {
78
77
  color: inherit;
79
78
  display: block;
80
79
  }
@@ -4,8 +4,8 @@
4
4
  margin-bottom: 1.75em;
5
5
  color: currentColor;
6
6
 
7
- cite,
8
- footer,
7
+ :where(cite),
8
+ :where(footer),
9
9
  &__citation {
10
10
  color: currentColor;
11
11
  text-transform: uppercase;
@@ -27,11 +27,7 @@ export default function EnhancedPaginationModal( {
27
27
  useUnsupportedBlocks( clientId );
28
28
 
29
29
  useEffect( () => {
30
- if (
31
- enhancedPagination &&
32
- hasUnsupportedBlocks &&
33
- ! window.__experimentalFullPageClientSideNavigation
34
- ) {
30
+ if ( enhancedPagination && hasUnsupportedBlocks ) {
35
31
  setAttributes( { enhancedPagination: false } );
36
32
  setOpen( true );
37
33
  }
@@ -15,17 +15,11 @@ export default function EnhancedPaginationControl( {
15
15
  clientId,
16
16
  } ) {
17
17
  const { hasUnsupportedBlocks } = useUnsupportedBlocks( clientId );
18
- const fullPageClientSideNavigation =
19
- window.__experimentalFullPageClientSideNavigation;
20
18
 
21
19
  let help = __(
22
20
  'Reload the full page—instead of just the posts list—when visitors navigate between pages.'
23
21
  );
24
- if ( fullPageClientSideNavigation ) {
25
- help = __(
26
- 'Experimental full-page client-side navigation setting enabled.'
27
- );
28
- } else if ( hasUnsupportedBlocks ) {
22
+ if ( hasUnsupportedBlocks ) {
29
23
  help = __(
30
24
  'Enhancement disabled because there are non-compatible blocks inside the Query block.'
31
25
  );
@@ -37,12 +31,8 @@ export default function EnhancedPaginationControl( {
37
31
  __nextHasNoMarginBottom
38
32
  label={ __( 'Reload full page' ) }
39
33
  help={ help }
40
- checked={
41
- ! enhancedPagination && ! fullPageClientSideNavigation
42
- }
43
- disabled={
44
- hasUnsupportedBlocks || fullPageClientSideNavigation
45
- }
34
+ checked={ ! enhancedPagination }
35
+ disabled={ hasUnsupportedBlocks }
46
36
  onChange={ ( value ) => {
47
37
  setAttributes( {
48
38
  enhancedPagination: ! value,
@@ -8,7 +8,8 @@
8
8
  "textdomain": "default",
9
9
  "attributes": {
10
10
  "content": {
11
- "type": "string"
11
+ "type": "string",
12
+ "role": "content"
12
13
  },
13
14
  "linkTarget": {
14
15
  "type": "string",
@@ -18,7 +18,8 @@
18
18
  },
19
19
  "feedURL": {
20
20
  "type": "string",
21
- "default": ""
21
+ "default": "",
22
+ "role": "content"
22
23
  },
23
24
  "itemsToShow": {
24
25
  "type": "number",
package/src/rss/edit.js CHANGED
@@ -9,13 +9,14 @@ import {
9
9
  import {
10
10
  Button,
11
11
  Disabled,
12
- PanelBody,
13
12
  Placeholder,
14
13
  RangeControl,
15
14
  ToggleControl,
16
15
  ToolbarGroup,
17
16
  TextControl,
18
17
  __experimentalInputControl as InputControl,
18
+ __experimentalToolsPanel as ToolsPanel,
19
+ __experimentalToolsPanelItem as ToolsPanelItem,
19
20
  } from '@wordpress/components';
20
21
  import { useState } from '@wordpress/element';
21
22
  import { grid, list, edit, rss } from '@wordpress/icons';
@@ -23,6 +24,11 @@ import { __, _x } from '@wordpress/i18n';
23
24
  import { prependHTTP } from '@wordpress/url';
24
25
  import ServerSideRender from '@wordpress/server-side-render';
25
26
 
27
+ /**
28
+ * Internal dependencies
29
+ */
30
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
31
+
26
32
  const DEFAULT_MIN_ITEMS = 1;
27
33
  const DEFAULT_MAX_ITEMS = 20;
28
34
 
@@ -42,6 +48,8 @@ export default function RSSEdit( { attributes, setAttributes } ) {
42
48
  rel,
43
49
  } = attributes;
44
50
 
51
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
52
+
45
53
  function toggleAttribute( propName ) {
46
54
  return () => {
47
55
  const value = attributes[ propName ];
@@ -141,75 +149,153 @@ export default function RSSEdit( { attributes, setAttributes } ) {
141
149
  <ToolbarGroup controls={ toolbarControls } />
142
150
  </BlockControls>
143
151
  <InspectorControls>
144
- <PanelBody title={ __( 'Settings' ) }>
145
- <RangeControl
146
- __nextHasNoMarginBottom
147
- __next40pxDefaultSize
152
+ <ToolsPanel
153
+ label={ __( 'Settings' ) }
154
+ resetAll={ () => {
155
+ setAttributes( {
156
+ itemsToShow: 5,
157
+ displayAuthor: false,
158
+ displayDate: false,
159
+ displayExcerpt: false,
160
+ excerptLength: 55,
161
+ columns: 2,
162
+ openInNewTab: false,
163
+ } );
164
+ } }
165
+ dropdownMenuProps={ dropdownMenuProps }
166
+ >
167
+ <ToolsPanelItem
148
168
  label={ __( 'Number of items' ) }
149
- value={ itemsToShow }
150
- onChange={ ( value ) =>
151
- setAttributes( { itemsToShow: value } )
152
- }
153
- min={ DEFAULT_MIN_ITEMS }
154
- max={ DEFAULT_MAX_ITEMS }
155
- required
156
- />
157
- <ToggleControl
158
- __nextHasNoMarginBottom
159
- label={ __( 'Display author' ) }
160
- checked={ displayAuthor }
161
- onChange={ toggleAttribute( 'displayAuthor' ) }
162
- />
163
- <ToggleControl
164
- __nextHasNoMarginBottom
165
- label={ __( 'Display date' ) }
166
- checked={ displayDate }
167
- onChange={ toggleAttribute( 'displayDate' ) }
168
- />
169
- <ToggleControl
170
- __nextHasNoMarginBottom
171
- label={ __( 'Display excerpt' ) }
172
- checked={ displayExcerpt }
173
- onChange={ toggleAttribute( 'displayExcerpt' ) }
174
- />
175
- { displayExcerpt && (
169
+ hasValue={ () => itemsToShow !== 5 }
170
+ onDeselect={ () => setAttributes( { itemsToShow: 5 } ) }
171
+ isShownByDefault
172
+ >
176
173
  <RangeControl
177
174
  __nextHasNoMarginBottom
178
175
  __next40pxDefaultSize
179
- label={ __( 'Max number of words in excerpt' ) }
180
- value={ excerptLength }
176
+ label={ __( 'Number of items' ) }
177
+ value={ itemsToShow }
181
178
  onChange={ ( value ) =>
182
- setAttributes( { excerptLength: value } )
179
+ setAttributes( { itemsToShow: value } )
183
180
  }
184
- min={ 10 }
185
- max={ 100 }
181
+ min={ DEFAULT_MIN_ITEMS }
182
+ max={ DEFAULT_MAX_ITEMS }
186
183
  required
187
184
  />
185
+ </ToolsPanelItem>
186
+
187
+ <ToolsPanelItem
188
+ label={ __( 'Display author' ) }
189
+ hasValue={ () => !! displayAuthor }
190
+ onDeselect={ () =>
191
+ setAttributes( { displayAuthor: false } )
192
+ }
193
+ isShownByDefault
194
+ >
195
+ <ToggleControl
196
+ __nextHasNoMarginBottom
197
+ label={ __( 'Display author' ) }
198
+ checked={ displayAuthor }
199
+ onChange={ toggleAttribute( 'displayAuthor' ) }
200
+ />
201
+ </ToolsPanelItem>
202
+
203
+ <ToolsPanelItem
204
+ label={ __( 'Display date' ) }
205
+ hasValue={ () => !! displayDate }
206
+ onDeselect={ () =>
207
+ setAttributes( { displayDate: false } )
208
+ }
209
+ isShownByDefault
210
+ >
211
+ <ToggleControl
212
+ __nextHasNoMarginBottom
213
+ label={ __( 'Display date' ) }
214
+ checked={ displayDate }
215
+ onChange={ toggleAttribute( 'displayDate' ) }
216
+ />
217
+ </ToolsPanelItem>
218
+
219
+ <ToolsPanelItem
220
+ label={ __( 'Display excerpt' ) }
221
+ hasValue={ () => !! displayExcerpt }
222
+ onDeselect={ () =>
223
+ setAttributes( { displayExcerpt: false } )
224
+ }
225
+ isShownByDefault
226
+ >
227
+ <ToggleControl
228
+ __nextHasNoMarginBottom
229
+ label={ __( 'Display excerpt' ) }
230
+ checked={ displayExcerpt }
231
+ onChange={ toggleAttribute( 'displayExcerpt' ) }
232
+ />
233
+ </ToolsPanelItem>
234
+
235
+ { displayExcerpt && (
236
+ <ToolsPanelItem
237
+ label={ __( 'Max number of words in excerpt' ) }
238
+ hasValue={ () => excerptLength !== 55 }
239
+ onDeselect={ () =>
240
+ setAttributes( { excerptLength: 55 } )
241
+ }
242
+ isShownByDefault
243
+ >
244
+ <RangeControl
245
+ __nextHasNoMarginBottom
246
+ __next40pxDefaultSize
247
+ label={ __( 'Max number of words in excerpt' ) }
248
+ value={ excerptLength }
249
+ onChange={ ( value ) =>
250
+ setAttributes( { excerptLength: value } )
251
+ }
252
+ min={ 10 }
253
+ max={ 100 }
254
+ required
255
+ />
256
+ </ToolsPanelItem>
188
257
  ) }
258
+
189
259
  { blockLayout === 'grid' && (
190
- <RangeControl
191
- __nextHasNoMarginBottom
192
- __next40pxDefaultSize
260
+ <ToolsPanelItem
193
261
  label={ __( 'Columns' ) }
194
- value={ columns }
195
- onChange={ ( value ) =>
196
- setAttributes( { columns: value } )
197
- }
198
- min={ 2 }
199
- max={ 6 }
200
- required
201
- />
262
+ hasValue={ () => columns !== 2 }
263
+ onDeselect={ () => setAttributes( { columns: 2 } ) }
264
+ isShownByDefault
265
+ >
266
+ <RangeControl
267
+ __nextHasNoMarginBottom
268
+ __next40pxDefaultSize
269
+ label={ __( 'Columns' ) }
270
+ value={ columns }
271
+ onChange={ ( value ) =>
272
+ setAttributes( { columns: value } )
273
+ }
274
+ min={ 2 }
275
+ max={ 6 }
276
+ required
277
+ />
278
+ </ToolsPanelItem>
202
279
  ) }
203
280
 
204
- <ToggleControl
205
- __nextHasNoMarginBottom
281
+ <ToolsPanelItem
206
282
  label={ __( 'Open links in new tab' ) }
207
- checked={ openInNewTab }
208
- onChange={ ( value ) =>
209
- setAttributes( { openInNewTab: value } )
283
+ hasValue={ () => !! openInNewTab }
284
+ onDeselect={ () =>
285
+ setAttributes( { openInNewTab: false } )
210
286
  }
211
- />
212
- </PanelBody>
287
+ isShownByDefault
288
+ >
289
+ <ToggleControl
290
+ __nextHasNoMarginBottom
291
+ label={ __( 'Open links in new tab' ) }
292
+ checked={ openInNewTab }
293
+ onChange={ ( value ) =>
294
+ setAttributes( { openInNewTab: value } )
295
+ }
296
+ />
297
+ </ToolsPanelItem>
298
+ </ToolsPanel>
213
299
  </InspectorControls>
214
300
  <InspectorControls group="advanced">
215
301
  <TextControl