@wordpress/block-library 7.17.0 → 7.19.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 (374) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/audio/edit.js +44 -4
  3. package/build/audio/edit.js.map +1 -1
  4. package/build/button/deprecated.js +16 -2
  5. package/build/button/deprecated.js.map +1 -1
  6. package/build/button/edit.js +14 -8
  7. package/build/button/edit.js.map +1 -1
  8. package/build/button/index.js +4 -1
  9. package/build/button/index.js.map +1 -1
  10. package/build/button/save.js +2 -0
  11. package/build/button/save.js.map +1 -1
  12. package/build/buttons/edit.native.js +1 -1
  13. package/build/buttons/edit.native.js.map +1 -1
  14. package/build/columns/transforms.js +5 -0
  15. package/build/columns/transforms.js.map +1 -1
  16. package/build/comment-template/index.js +6 -2
  17. package/build/comment-template/index.js.map +1 -1
  18. package/build/cover/edit/index.js +3 -1
  19. package/build/cover/edit/index.js.map +1 -1
  20. package/build/cover/edit/inspector-controls.js +3 -7
  21. package/build/cover/edit/inspector-controls.js.map +1 -1
  22. package/build/embed/deprecated.js +43 -4
  23. package/build/embed/deprecated.js.map +1 -1
  24. package/build/file/deprecated.js +108 -4
  25. package/build/file/deprecated.js.map +1 -1
  26. package/build/file/transforms.js +3 -9
  27. package/build/file/transforms.js.map +1 -1
  28. package/build/gallery/deprecated.js +148 -23
  29. package/build/gallery/deprecated.js.map +1 -1
  30. package/build/gallery/gallery.js +3 -2
  31. package/build/gallery/gallery.js.map +1 -1
  32. package/build/gallery/use-image-sizes.js +2 -1
  33. package/build/gallery/use-image-sizes.js.map +1 -1
  34. package/build/gallery/v1/edit.js +6 -3
  35. package/build/gallery/v1/edit.js.map +1 -1
  36. package/build/group/edit.js +105 -48
  37. package/build/group/edit.js.map +1 -1
  38. package/build/group/index.js +3 -0
  39. package/build/group/index.js.map +1 -1
  40. package/build/group/placeholder.js +168 -0
  41. package/build/group/placeholder.js.map +1 -0
  42. package/build/group/variations.js +3 -3
  43. package/build/group/variations.js.map +1 -1
  44. package/build/image/edit.native.js +1 -1
  45. package/build/image/edit.native.js.map +1 -1
  46. package/build/image/image.js +6 -9
  47. package/build/image/image.js.map +1 -1
  48. package/build/latest-comments/edit.js +2 -1
  49. package/build/latest-comments/edit.js.map +1 -1
  50. package/build/latest-comments/index.js +5 -1
  51. package/build/latest-comments/index.js.map +1 -1
  52. package/build/latest-posts/deprecated.js +13 -0
  53. package/build/latest-posts/deprecated.js.map +1 -1
  54. package/build/latest-posts/edit.js +1 -1
  55. package/build/latest-posts/edit.js.map +1 -1
  56. package/build/latest-posts/index.js +13 -0
  57. package/build/latest-posts/index.js.map +1 -1
  58. package/build/list/utils.js +4 -8
  59. package/build/list/utils.js.map +1 -1
  60. package/build/list-item/edit.js +2 -1
  61. package/build/list-item/edit.js.map +1 -1
  62. package/build/list-item/hooks/use-outdent-list-item.js +5 -7
  63. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  64. package/build/navigation/edit/index.js +94 -103
  65. package/build/navigation/edit/index.js.map +1 -1
  66. package/build/navigation/edit/manage-menus-button.js +36 -0
  67. package/build/navigation/edit/manage-menus-button.js.map +1 -0
  68. package/build/navigation/edit/navigation-menu-selector.js +12 -5
  69. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  70. package/build/navigation/edit/responsive-wrapper.js +2 -6
  71. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  72. package/build/navigation/edit/unsaved-inner-blocks.js +5 -17
  73. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  74. package/build/navigation-link/edit.js +14 -3
  75. package/build/navigation-link/edit.js.map +1 -1
  76. package/build/navigation-submenu/edit.js +4 -4
  77. package/build/navigation-submenu/edit.js.map +1 -1
  78. package/build/page-list/edit.js +29 -10
  79. package/build/page-list/edit.js.map +1 -1
  80. package/build/post-author/edit.js +35 -20
  81. package/build/post-author/edit.js.map +1 -1
  82. package/build/post-comments-count/index.js +4 -0
  83. package/build/post-comments-count/index.js.map +1 -1
  84. package/build/post-comments-form/index.js +4 -0
  85. package/build/post-comments-form/index.js.map +1 -1
  86. package/build/post-comments-link/index.js +4 -0
  87. package/build/post-comments-link/index.js.map +1 -1
  88. package/build/post-content/edit.js +14 -6
  89. package/build/post-content/edit.js.map +1 -1
  90. package/build/post-content/index.js +3 -0
  91. package/build/post-content/index.js.map +1 -1
  92. package/build/pullquote/deprecated.js +6 -6
  93. package/build/pullquote/deprecated.js.map +1 -1
  94. package/build/search/edit.js +1 -3
  95. package/build/search/edit.js.map +1 -1
  96. package/build/site-logo/edit.js +2 -2
  97. package/build/site-logo/edit.js.map +1 -1
  98. package/build/site-tagline/edit.js +21 -9
  99. package/build/site-tagline/edit.js.map +1 -1
  100. package/build/site-title/edit/index.js +20 -8
  101. package/build/site-title/edit/index.js.map +1 -1
  102. package/build/social-link/edit.js +11 -2
  103. package/build/social-link/edit.js.map +1 -1
  104. package/build/social-link/index.js +3 -0
  105. package/build/social-link/index.js.map +1 -1
  106. package/build/spacer/controls.js +3 -7
  107. package/build/spacer/controls.js.map +1 -1
  108. package/build/table/deprecated.js +282 -27
  109. package/build/table/deprecated.js.map +1 -1
  110. package/build/table/state.js +1 -1
  111. package/build/table/state.js.map +1 -1
  112. package/build/template-part/variations.js +5 -0
  113. package/build/template-part/variations.js.map +1 -1
  114. package/build/utils/clean-empty-object.js +5 -4
  115. package/build/utils/clean-empty-object.js.map +1 -1
  116. package/build/video/deprecated.js +159 -0
  117. package/build/video/deprecated.js.map +1 -0
  118. package/build/video/edit.js +41 -5
  119. package/build/video/edit.js.map +1 -1
  120. package/build/video/index.js +3 -0
  121. package/build/video/index.js.map +1 -1
  122. package/build/video/tracks-editor.js +3 -28
  123. package/build/video/tracks-editor.js.map +1 -1
  124. package/build-module/audio/edit.js +46 -7
  125. package/build-module/audio/edit.js.map +1 -1
  126. package/build-module/button/deprecated.js +16 -2
  127. package/build-module/button/deprecated.js.map +1 -1
  128. package/build-module/button/edit.js +16 -10
  129. package/build-module/button/edit.js.map +1 -1
  130. package/build-module/button/index.js +4 -1
  131. package/build-module/button/index.js.map +1 -1
  132. package/build-module/button/save.js +2 -0
  133. package/build-module/button/save.js.map +1 -1
  134. package/build-module/buttons/edit.native.js +1 -1
  135. package/build-module/buttons/edit.native.js.map +1 -1
  136. package/build-module/columns/transforms.js +5 -0
  137. package/build-module/columns/transforms.js.map +1 -1
  138. package/build-module/comment-template/index.js +6 -2
  139. package/build-module/comment-template/index.js.map +1 -1
  140. package/build-module/cover/edit/index.js +3 -1
  141. package/build-module/cover/edit/index.js.map +1 -1
  142. package/build-module/cover/edit/inspector-controls.js +4 -8
  143. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  144. package/build-module/embed/deprecated.js +44 -5
  145. package/build-module/embed/deprecated.js.map +1 -1
  146. package/build-module/file/deprecated.js +108 -4
  147. package/build-module/file/deprecated.js.map +1 -1
  148. package/build-module/file/transforms.js +3 -8
  149. package/build-module/file/transforms.js.map +1 -1
  150. package/build-module/gallery/deprecated.js +147 -25
  151. package/build-module/gallery/deprecated.js.map +1 -1
  152. package/build-module/gallery/gallery.js +3 -2
  153. package/build-module/gallery/gallery.js.map +1 -1
  154. package/build-module/gallery/use-image-sizes.js +3 -2
  155. package/build-module/gallery/use-image-sizes.js.map +1 -1
  156. package/build-module/gallery/v1/edit.js +7 -4
  157. package/build-module/gallery/v1/edit.js.map +1 -1
  158. package/build-module/group/edit.js +101 -48
  159. package/build-module/group/edit.js.map +1 -1
  160. package/build-module/group/index.js +3 -0
  161. package/build-module/group/index.js.map +1 -1
  162. package/build-module/group/placeholder.js +154 -0
  163. package/build-module/group/placeholder.js.map +1 -0
  164. package/build-module/group/variations.js +3 -3
  165. package/build-module/group/variations.js.map +1 -1
  166. package/build-module/image/edit.native.js +1 -1
  167. package/build-module/image/edit.native.js.map +1 -1
  168. package/build-module/image/image.js +8 -11
  169. package/build-module/image/image.js.map +1 -1
  170. package/build-module/latest-comments/edit.js +2 -1
  171. package/build-module/latest-comments/edit.js.map +1 -1
  172. package/build-module/latest-comments/index.js +5 -1
  173. package/build-module/latest-comments/index.js.map +1 -1
  174. package/build-module/latest-posts/deprecated.js +13 -0
  175. package/build-module/latest-posts/deprecated.js.map +1 -1
  176. package/build-module/latest-posts/edit.js +2 -2
  177. package/build-module/latest-posts/edit.js.map +1 -1
  178. package/build-module/latest-posts/index.js +13 -0
  179. package/build-module/latest-posts/index.js.map +1 -1
  180. package/build-module/list/utils.js +5 -9
  181. package/build-module/list/utils.js.map +1 -1
  182. package/build-module/list-item/edit.js +2 -1
  183. package/build-module/list-item/edit.js.map +1 -1
  184. package/build-module/list-item/hooks/use-outdent-list-item.js +5 -6
  185. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  186. package/build-module/navigation/edit/index.js +96 -105
  187. package/build-module/navigation/edit/index.js.map +1 -1
  188. package/build-module/navigation/edit/manage-menus-button.js +26 -0
  189. package/build-module/navigation/edit/manage-menus-button.js.map +1 -0
  190. package/build-module/navigation/edit/navigation-menu-selector.js +13 -6
  191. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  192. package/build-module/navigation/edit/responsive-wrapper.js +2 -6
  193. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  194. package/build-module/navigation/edit/unsaved-inner-blocks.js +7 -18
  195. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  196. package/build-module/navigation-link/edit.js +14 -4
  197. package/build-module/navigation-link/edit.js.map +1 -1
  198. package/build-module/navigation-submenu/edit.js +4 -4
  199. package/build-module/navigation-submenu/edit.js.map +1 -1
  200. package/build-module/page-list/edit.js +29 -10
  201. package/build-module/page-list/edit.js.map +1 -1
  202. package/build-module/post-author/edit.js +35 -21
  203. package/build-module/post-author/edit.js.map +1 -1
  204. package/build-module/post-comments-count/index.js +4 -0
  205. package/build-module/post-comments-count/index.js.map +1 -1
  206. package/build-module/post-comments-form/index.js +4 -0
  207. package/build-module/post-comments-form/index.js.map +1 -1
  208. package/build-module/post-comments-link/index.js +4 -0
  209. package/build-module/post-comments-link/index.js.map +1 -1
  210. package/build-module/post-content/edit.js +14 -6
  211. package/build-module/post-content/edit.js.map +1 -1
  212. package/build-module/post-content/index.js +3 -0
  213. package/build-module/post-content/index.js.map +1 -1
  214. package/build-module/pullquote/deprecated.js +7 -7
  215. package/build-module/pullquote/deprecated.js.map +1 -1
  216. package/build-module/search/edit.js +1 -3
  217. package/build-module/search/edit.js.map +1 -1
  218. package/build-module/site-logo/edit.js +3 -3
  219. package/build-module/site-logo/edit.js.map +1 -1
  220. package/build-module/site-tagline/edit.js +23 -11
  221. package/build-module/site-tagline/edit.js.map +1 -1
  222. package/build-module/site-title/edit/index.js +22 -10
  223. package/build-module/site-title/edit/index.js.map +1 -1
  224. package/build-module/social-link/edit.js +11 -2
  225. package/build-module/social-link/edit.js.map +1 -1
  226. package/build-module/social-link/index.js +3 -0
  227. package/build-module/social-link/index.js.map +1 -1
  228. package/build-module/spacer/controls.js +4 -8
  229. package/build-module/spacer/controls.js.map +1 -1
  230. package/build-module/table/deprecated.js +282 -27
  231. package/build-module/table/deprecated.js.map +1 -1
  232. package/build-module/table/state.js +1 -1
  233. package/build-module/table/state.js.map +1 -1
  234. package/build-module/template-part/variations.js +5 -0
  235. package/build-module/template-part/variations.js.map +1 -1
  236. package/build-module/utils/clean-empty-object.js +5 -5
  237. package/build-module/utils/clean-empty-object.js.map +1 -1
  238. package/build-module/video/deprecated.js +147 -0
  239. package/build-module/video/deprecated.js.map +1 -0
  240. package/build-module/video/edit.js +45 -9
  241. package/build-module/video/edit.js.map +1 -1
  242. package/build-module/video/index.js +2 -0
  243. package/build-module/video/index.js.map +1 -1
  244. package/build-module/video/tracks-editor.js +4 -29
  245. package/build-module/video/tracks-editor.js.map +1 -1
  246. package/build-style/button/style-rtl.css +1 -0
  247. package/build-style/button/style.css +1 -0
  248. package/build-style/comment-template/style-rtl.css +1 -0
  249. package/build-style/comment-template/style.css +1 -0
  250. package/build-style/editor-rtl.css +80 -5
  251. package/build-style/editor.css +80 -5
  252. package/build-style/group/editor-rtl.css +44 -0
  253. package/build-style/group/editor.css +44 -0
  254. package/build-style/latest-comments/style-rtl.css +1 -0
  255. package/build-style/latest-comments/style.css +1 -0
  256. package/build-style/latest-posts/style-rtl.css +3 -0
  257. package/build-style/latest-posts/style.css +3 -0
  258. package/build-style/navigation/editor-rtl.css +27 -4
  259. package/build-style/navigation/editor.css +27 -4
  260. package/build-style/navigation/style-rtl.css +13 -1
  261. package/build-style/navigation/style.css +13 -1
  262. package/build-style/navigation-link/editor-rtl.css +8 -1
  263. package/build-style/navigation-link/editor.css +8 -1
  264. package/build-style/post-comments-form/style-rtl.css +3 -0
  265. package/build-style/post-comments-form/style.css +3 -0
  266. package/build-style/query/editor-rtl.css +1 -1
  267. package/build-style/query/editor.css +1 -1
  268. package/build-style/query-pagination/style-rtl.css +1 -1
  269. package/build-style/query-pagination/style.css +1 -1
  270. package/build-style/style-rtl.css +28 -2
  271. package/build-style/style.css +28 -2
  272. package/build-style/table/editor-rtl.css +1 -0
  273. package/build-style/table/editor.css +1 -0
  274. package/build-style/table/style-rtl.css +5 -0
  275. package/build-style/table/style.css +5 -0
  276. package/build-style/table/theme-rtl.css +1 -3
  277. package/build-style/table/theme.css +1 -3
  278. package/build-style/theme-rtl.css +1 -3
  279. package/build-style/theme.css +1 -3
  280. package/package.json +29 -28
  281. package/src/audio/edit.js +79 -24
  282. package/src/avatar/index.php +1 -1
  283. package/src/block/test/edit.native.js +8 -8
  284. package/src/button/block.json +4 -1
  285. package/src/button/deprecated.js +18 -2
  286. package/src/button/edit.js +12 -10
  287. package/src/button/save.js +12 -2
  288. package/src/button/style.scss +2 -0
  289. package/src/buttons/edit.native.js +1 -1
  290. package/src/buttons/test/edit.native.js +19 -19
  291. package/src/columns/test/edit.native.js +32 -32
  292. package/src/columns/transforms.js +8 -0
  293. package/src/comment-template/block.json +6 -2
  294. package/src/comment-template/style.scss +2 -0
  295. package/src/cover/edit/index.js +3 -1
  296. package/src/cover/edit/inspector-controls.js +11 -13
  297. package/src/cover/test/edit.native.js +26 -26
  298. package/src/embed/deprecated.js +53 -26
  299. package/src/embed/test/index.native.js +43 -43
  300. package/src/file/deprecated.js +130 -2
  301. package/src/file/transforms.js +3 -8
  302. package/src/gallery/deprecated.js +129 -4
  303. package/src/gallery/gallery.js +2 -0
  304. package/src/gallery/index.php +19 -10
  305. package/src/gallery/test/index.native.js +11 -11
  306. package/src/gallery/use-image-sizes.js +3 -2
  307. package/src/gallery/v1/edit.js +21 -25
  308. package/src/group/block.json +3 -0
  309. package/src/group/edit.js +105 -46
  310. package/src/group/editor.scss +48 -0
  311. package/src/group/placeholder.js +187 -0
  312. package/src/group/test/edit.native.js +3 -3
  313. package/src/group/test/placeholder.js +78 -0
  314. package/src/group/variations.js +3 -3
  315. package/src/image/edit.native.js +1 -1
  316. package/src/image/image.js +22 -10
  317. package/src/image/test/edit.native.js +17 -17
  318. package/src/latest-comments/block.json +5 -1
  319. package/src/latest-comments/edit.js +1 -0
  320. package/src/latest-comments/style.scss +3 -0
  321. package/src/latest-posts/block.json +13 -0
  322. package/src/latest-posts/edit.js +2 -2
  323. package/src/latest-posts/style.scss +3 -0
  324. package/src/list/test/edit.native.js +36 -36
  325. package/src/list/utils.js +3 -11
  326. package/src/list-item/edit.js +1 -0
  327. package/src/list-item/hooks/use-outdent-list-item.js +3 -6
  328. package/src/missing/test/edit-integration.native.js +5 -5
  329. package/src/navigation/edit/index.js +186 -161
  330. package/src/navigation/edit/manage-menus-button.js +21 -0
  331. package/src/navigation/edit/navigation-menu-selector.js +20 -5
  332. package/src/navigation/edit/responsive-wrapper.js +2 -10
  333. package/src/navigation/edit/unsaved-inner-blocks.js +5 -22
  334. package/src/navigation/editor.scss +29 -4
  335. package/src/navigation/style.scss +19 -1
  336. package/src/navigation-link/edit.js +13 -4
  337. package/src/navigation-link/editor.scss +8 -0
  338. package/src/navigation-submenu/edit.js +7 -5
  339. package/src/page-list/edit.js +36 -22
  340. package/src/post-author/edit.js +44 -20
  341. package/src/post-comments-count/block.json +4 -0
  342. package/src/post-comments-form/block.json +4 -0
  343. package/src/post-comments-form/style.scss +3 -0
  344. package/src/post-comments-link/block.json +4 -0
  345. package/src/post-content/block.json +3 -0
  346. package/src/post-content/edit.js +8 -4
  347. package/src/pullquote/deprecated.js +7 -7
  348. package/src/query/editor.scss +1 -1
  349. package/src/query-pagination/style.scss +1 -1
  350. package/src/read-more/index.php +9 -2
  351. package/src/search/edit.js +1 -1
  352. package/src/shortcode/test/edit.native.js +5 -5
  353. package/src/site-logo/edit.js +3 -3
  354. package/src/site-tagline/edit.js +25 -18
  355. package/src/site-title/edit/index.js +26 -12
  356. package/src/social-link/block.json +3 -0
  357. package/src/social-link/edit.js +8 -1
  358. package/src/social-link/index.php +11 -7
  359. package/src/social-link/test/index.native.js +10 -10
  360. package/src/social-links/test/edit.native.js +4 -4
  361. package/src/spacer/controls.js +10 -12
  362. package/src/spacer/test/index.native.js +17 -17
  363. package/src/table/deprecated.js +587 -348
  364. package/src/table/editor.scss +1 -0
  365. package/src/table/state.js +1 -1
  366. package/src/table/style.scss +7 -0
  367. package/src/table/theme.scss +1 -3
  368. package/src/template-part/index.php +5 -0
  369. package/src/template-part/variations.js +4 -0
  370. package/src/utils/clean-empty-object.js +5 -6
  371. package/src/video/deprecated.js +57 -0
  372. package/src/video/edit.js +71 -23
  373. package/src/video/index.js +2 -0
  374. package/src/video/tracks-editor.js +12 -28
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/social-link/edit.js"],"names":["classNames","InspectorControls","URLPopover","URLInput","useBlockProps","Fragment","useState","Button","PanelBody","PanelRow","TextControl","__","sprintf","keyboardReturn","getIconBySite","getNameBySite","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","event","preventDefault","nextURL","SocialLinkEdit","attributes","context","isSelected","service","label","showLabels","iconColorValue","iconBackgroundColorValue","showURLPopover","classes","setPopoverAnchor","IconComponent","socialLinkName","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ACC,IAAA,KAAK,EAAG1B,EAAE,CAAE,YAAF,CADX;AAEC,IAAA,IAAI,EAAGA,EAAE,CACR,wDADQ,CAFV;AAKC,IAAA,KAAK,EAAGkB,KALT;AAMC,IAAA,QAAQ,EAAKe,KAAF,IACV1B,aAAa,CAAE;AAAEW,MAAAA,KAAK,EAAEe;AAAT,KAAF;AAPf,IADD,CARD,CADD,CADD,EAwBC,oBAASL,UAAT,EACC,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,6BADX;AAEC,IAAA,GAAG,EAAGJ,gBAFP;AAGC,IAAA,OAAO,EAAG,MAAMhB,UAAU,CAAE,IAAF;AAH3B,KAKC,cAAC,aAAD,OALD,EAMC;AACC,IAAA,SAAS,EAAGnB,UAAU,CAAE,4BAAF,EAAgC;AACrD,4BAAsB,CAAE8B;AAD6B,KAAhC;AADvB,KAKGQ,eALH,CAND,EAaGX,UAAU,IAAIM,cAAd,IACD,cAAC,oBAAD;AACC,IAAA,GAAG,EAAGhB,GADP;AAEC,IAAA,aAAa,EAAGC,aAFjB;AAGC,IAAA,UAAU,EAAGC,UAHd;AAIC,IAAA,aAAa,EAAGC;AAJjB,IAdF,CADD,CAxBD,CADD;AAmDA,CA/ED;;AAiFA,eAAeI,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { Fragment, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n} ) => (\n\t<URLPopover anchor={ popoverAnchor } onClose={ () => setPopover( false ) }>\n\t\t<form\n\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\tonSubmit={ ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetPopover( false );\n\t\t\t} }\n\t\t>\n\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t<URLInput\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t}\n\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\tdisableSuggestions={ true }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Button\n\t\t\t\ticon={ keyboardReturn }\n\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\ttype=\"submit\"\n\t\t\t/>\n\t\t</form>\n\t</URLPopover>\n);\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n} ) => {\n\tconst { url, service, label } = attributes;\n\tconst { showLabels, iconColorValue, iconBackgroundColorValue } = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = classNames( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\tconst socialLinkLabel = label ?? socialLinkName;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<Fragment>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ sprintf(\n\t\t\t\t\t\t/* translators: %s: name of the social service. */\n\t\t\t\t\t\t__( '%s label' ),\n\t\t\t\t\t\tsocialLinkName\n\t\t\t\t\t) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __( 'Link label' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Briefly describe the link to help screen reader users.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classNames( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkLabel }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t</Fragment>\n\t);\n};\n\nexport default SocialLinkEdit;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/social-link/edit.js"],"names":["classNames","InspectorControls","URLPopover","URLInput","useBlockProps","Fragment","useState","Button","PanelBody","PanelRow","TextControl","__","sprintf","keyboardReturn","getIconBySite","getNameBySite","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","event","preventDefault","nextURL","SocialLinkEdit","attributes","context","isSelected","service","label","rel","showLabels","iconColorValue","iconBackgroundColorValue","showURLPopover","classes","setPopoverAnchor","IconComponent","socialLinkName","socialLinkLabel","blockProps","className","style","color","backgroundColor","value"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,iBADD,EAECC,UAFD,EAGCC,QAHD,EAICC,aAJD,QAKO,yBALP;AAMA,SAASC,QAAT,EAAmBC,QAAnB,QAAmC,oBAAnC;AACA,SACCC,MADD,EAECC,SAFD,EAGCC,QAHD,EAICC,WAJD,QAKO,uBALP;AAMA,SAASC,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AAEA;AACA;AACA;;AACA,SAASC,aAAT,EAAwBC,aAAxB,QAA6C,eAA7C;;AAEA,MAAMC,oBAAoB,GAAG;AAAA,MAAE;AAC9BC,IAAAA,GAD8B;AAE9BC,IAAAA,aAF8B;AAG9BC,IAAAA,UAH8B;AAI9BC,IAAAA;AAJ8B,GAAF;AAAA,SAM5B,cAAC,UAAD;AAAY,IAAA,MAAM,EAAGA,aAArB;AAAqC,IAAA,OAAO,EAAG,MAAMD,UAAU,CAAE,KAAF;AAA/D,KACC;AACC,IAAA,SAAS,EAAC,uCADX;AAEC,IAAA,QAAQ,EAAKE,KAAF,IAAa;AACvBA,MAAAA,KAAK,CAACC,cAAN;AACAH,MAAAA,UAAU,CAAE,KAAF,CAAV;AACA;AALF,KAOC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,QAAD;AACC,IAAA,KAAK,EAAGF,GADT;AAEC,IAAA,QAAQ,EAAKM,OAAF,IACVL,aAAa,CAAE;AAAED,MAAAA,GAAG,EAAEM;AAAP,KA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AGC;AAJjB,IAdF,CADD,CA/BD,CADD;AA0DA,CAtFD;;AAwFA,eAAeI,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { Fragment, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n} ) => (\n\t<URLPopover anchor={ popoverAnchor } onClose={ () => setPopover( false ) }>\n\t\t<form\n\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\tonSubmit={ ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetPopover( false );\n\t\t\t} }\n\t\t>\n\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t<URLInput\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t}\n\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\tdisableSuggestions={ true }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Button\n\t\t\t\ticon={ keyboardReturn }\n\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\ttype=\"submit\"\n\t\t\t/>\n\t\t</form>\n\t</URLPopover>\n);\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n} ) => {\n\tconst { url, service, label, rel } = attributes;\n\tconst { showLabels, iconColorValue, iconBackgroundColorValue } = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = classNames( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\tconst socialLinkLabel = label ?? socialLinkName;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<Fragment>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ sprintf(\n\t\t\t\t\t\t/* translators: %s: name of the social service. */\n\t\t\t\t\t\t__( '%s label' ),\n\t\t\t\t\t\tsocialLinkName\n\t\t\t\t\t) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __( 'Link label' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Briefly describe the link to help screen reader users.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls __experimentalGroup=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classNames( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkLabel }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t</Fragment>\n\t);\n};\n\nexport default SocialLinkEdit;\n"]}
@@ -26,6 +26,9 @@ const metadata = {
26
26
  },
27
27
  label: {
28
28
  type: "string"
29
+ },
30
+ rel: {
31
+ type: "string"
29
32
  }
30
33
  },
31
34
  usesContext: ["openInNewTab", "showLabels", "iconColorValue", "iconBackgroundColorValue"],
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/social-link/index.js"],"names":["share","icon","initBlock","edit","variations","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMI,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { share as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/social-link/index.js"],"names":["share","icon","initBlock","edit","variations","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMI,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { share as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport edit from './edit';\nimport metadata from './block.json';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -5,7 +5,7 @@ import { createElement } from "@wordpress/element";
5
5
  */
6
6
  import { __ } from '@wordpress/i18n';
7
7
  import { InspectorControls, useSetting } from '@wordpress/block-editor';
8
- import { BaseControl, PanelBody, __experimentalUseCustomUnits as useCustomUnits, __experimentalUnitControl as UnitControl, __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue } from '@wordpress/components';
8
+ import { PanelBody, __experimentalUseCustomUnits as useCustomUnits, __experimentalUnitControl as UnitControl, __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue } from '@wordpress/components';
9
9
  import { useInstanceId } from '@wordpress/compose';
10
10
  /**
11
11
  * Internal dependencies
@@ -45,20 +45,16 @@ function DimensionInput(_ref) {
45
45
 
46
46
  const [parsedQuantity, parsedUnit] = parseQuantityAndUnitFromRawValue(value);
47
47
  const computedValue = [parsedQuantity, isResizing ? 'px' : parsedUnit].join('');
48
- return createElement(BaseControl, {
48
+ return createElement(UnitControl, {
49
49
  label: label,
50
- id: inputId
51
- }, createElement(UnitControl, {
52
50
  id: inputId,
53
51
  isResetValueOnUnitChange: true,
54
52
  min: MIN_SPACER_SIZE,
55
53
  onChange: handleOnChange,
56
- style: {
57
- maxWidth: 80
58
- },
54
+ __unstableInputWidth: '80px',
59
55
  value: computedValue,
60
56
  units: units
61
- }));
57
+ });
62
58
  }
63
59
 
64
60
  export default function SpacerControls(_ref3) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/spacer/controls.js"],"names":["__","InspectorControls","useSetting","BaseControl","PanelBody","__experimentalUseCustomUnits","useCustomUnits","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","MIN_SPACER_SIZE","DimensionInput","label","onChange","isResizing","value","inputId","availableUnitSettings","undefined","filter","availableUnit","units","availableUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","parsedQuantity","parsedUnit","computedValue","join","maxWidth","SpacerControls","setAttributes","orientation","height","width","nextWidth","nextHeight"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,iBAAT,EAA4BC,UAA5B,QAA8C,yBAA9C;AACA,SACCC,WADD,EAECC,SAFD,EAGCC,4BAA4B,IAAIC,cAHjC,EAICC,yBAAyB,IAAIC,WAJ9B,EAKCC,8CAA8C,IAAIC,gCALnD,QAMO,uBANP;AAOA,SAASC,aAAT,QAA8B,oBAA9B;AAEA;AACA;AACA;;AACA,SAASC,eAAT,QAAgC,aAAhC;;AAEA,SAASC,cAAT,OAAuE;AAAA;;AAAA,MAA9C;AAAEC,IAAAA,KAAF;AAASC,IAAAA,QAAT;AAAmBC,IAAAA,UAAnB;AAA+BC,IAAAA,KAAK,GAAG;AAAvC,GAA8C;AACtE,QAAMC,OAAO,GAAGP,aAAa,CAAEH,WAAF,EAAe,2BAAf,CAA7B,CADsE,CAGtE;AACA;AACA;;AACA,QAAMW,qBAAqB,YAC1BjB,UAAU,CAAE,eAAF,CAAV,IAAiCkB,SADP,0CAAG,MAE3BC,MAF2B,CAEjBC,aAAF,IAAqBA,aAAa,KAAK,GAFpB,CAA9B;AAIA,QAAMC,KAAK,GAAGjB,cAAc,CAAE;AAC7BkB,IAAAA,cAAc,EAAEL,qBAAqB,IAAI,CACxC,IADwC,EAExC,IAFwC,EAGxC,KAHwC,EAIxC,IAJwC,EAKxC,IALwC,CADZ;AAQ7BM,IAAAA,aAAa,EAAE;AAAEC,MAAAA,EAAE,EAAE,GAAN;AAAWC,MAAAA,EAAE,EAAE,EAAf;AAAmBC,MAAAA,GAAG,EAAE,EAAxB;AAA4BC,MAAAA,EAAE,EAAE,EAAhC;AAAoCC,MAAAA,EAAE,EAAE;AAAxC;AARc,GAAF,CAA5B;;AAWA,QAAM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AAK,EAAGxC,EAAE,CAAE,QAAF,CADX;AAEC,IAAA,KAAK,EAAGyC,MAFT;AAGC,IAAA,QAAQ,EAAKG,UAAF,IACVL,aAAa,CAAE;AAAEE,MAAAA,MAAM,EAAEG;AAAV,KAAF,CAJf;AAMC,IAAA,UAAU,EAAG5B;AANd,IAZF,CADD,CADD;AA0BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls, useSetting } from '@wordpress/block-editor';\nimport {\n\tBaseControl,\n\tPanelBody,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { MIN_SPACER_SIZE } from './constants';\n\nfunction DimensionInput( { label, onChange, isResizing, value = '' } ) {\n\tconst inputId = useInstanceId( UnitControl, 'block-spacer-height-input' );\n\n\t// In most contexts the spacer size cannot meaningfully be set to a\n\t// percentage, since this is relative to the parent container. This\n\t// unit is disabled from the UI.\n\tconst availableUnitSettings = (\n\t\tuseSetting( 'spacing.units' ) || undefined\n\t)?.filter( ( availableUnit ) => availableUnit !== '%' );\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnitSettings || [\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t\t'vh',\n\t\t],\n\t\tdefaultValues: { px: 100, em: 10, rem: 10, vw: 10, vh: 25 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tonChange( unprocessedValue );\n\t};\n\n\t// Force the unit to update to `px` when the Spacer is being resized.\n\tconst [ parsedQuantity, parsedUnit ] =\n\t\tparseQuantityAndUnitFromRawValue( value );\n\tconst computedValue = [\n\t\tparsedQuantity,\n\t\tisResizing ? 'px' : parsedUnit,\n\t].join( '' );\n\n\treturn (\n\t\t<BaseControl label={ label } id={ inputId }>\n\t\t\t<UnitControl\n\t\t\t\tid={ inputId }\n\t\t\t\tisResetValueOnUnitChange\n\t\t\t\tmin={ MIN_SPACER_SIZE }\n\t\t\t\tonChange={ handleOnChange }\n\t\t\t\tstyle={ { maxWidth: 80 } }\n\t\t\t\tvalue={ computedValue }\n\t\t\t\tunits={ units }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\nexport default function SpacerControls( {\n\tsetAttributes,\n\torientation,\n\theight,\n\twidth,\n\tisResizing,\n} ) {\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t{ orientation === 'horizontal' && (\n\t\t\t\t\t<DimensionInput\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tvalue={ width }\n\t\t\t\t\t\tonChange={ ( nextWidth ) =>\n\t\t\t\t\t\t\tsetAttributes( { width: nextWidth } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisResizing={ isResizing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ orientation !== 'horizontal' && (\n\t\t\t\t\t<DimensionInput\n\t\t\t\t\t\tlabel={ __( 'Height' ) }\n\t\t\t\t\t\tvalue={ height }\n\t\t\t\t\t\tonChange={ ( nextHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( { height: nextHeight } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisResizing={ isResizing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/spacer/controls.js"],"names":["__","InspectorControls","useSetting","PanelBody","__experimentalUseCustomUnits","useCustomUnits","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","MIN_SPACER_SIZE","DimensionInput","label","onChange","isResizing","value","inputId","availableUnitSettings","undefined","filter","availableUnit","units","availableUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","parsedQuantity","parsedUnit","computedValue","join","SpacerControls","setAttributes","orientation","height","width","nextWidth","nextHeight"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,iBAAT,EAA4BC,UAA5B,QAA8C,yBAA9C;AACA,SACCC,SADD,EAECC,4BAA4B,IAAIC,cAFjC,EAGCC,yBAAyB,IAAIC,WAH9B,EAICC,8CAA8C,IAAIC,gCAJnD,QAKO,uBALP;AAMA,SAASC,aAAT,QAA8B,oBAA9B;AAEA;AACA;AACA;;AACA,SAASC,eAAT,QAAgC,aAAhC;;AAEA,SAASC,cAAT,OAAuE;AAAA;;AAAA,MAA9C;AAAEC,IAAAA,KAAF;AAASC,IAAAA,QAAT;AAAmBC,IAAAA,UAAnB;AAA+BC,IAAAA,KAAK,GAAG;AAAvC,GAA8C;AACtE,QAAMC,OAAO,GAAGP,aAAa,CAAEH,WAAF,EAAe,2BAAf,CAA7B,CADsE,CAGtE;AACA;AACA;;AACA,QAAMW,qBAAqB,YAC1BhB,UAAU,CAAE,eAAF,CAAV,IAAiCiB,SADP,0CAAG,MAE3BC,MAF2B,CAEjBC,aAAF,IAAqBA,aAAa,KAAK,GAFpB,CAA9B;AAIA,QAAMC,KAAK,GAAGjB,cAAc,CAAE;AAC7BkB,IAAAA,cAAc,EAAEL,qBAAqB,IAAI,CACxC,IADwC,EAExC,IAFwC,EAGxC,KAHwC,EAIxC,IAJwC,EAKxC,IALwC,CADZ;AAQ7BM,IAAAA,aAAa,EAAE;AAAEC,MAAAA,EAAE,EAAE,GAAN;AAAWC,MAAAA,EAAE,EAAE,EAAf;AAAmBC,MAAAA,GAAG,EAAE,EAAxB;AAA4BC,MAAAA,EAAE,EAAE,EAAhC;AAAoCC,MAAAA,EAAE,EAAE;AAAxC;AARc,GAAF,CAA5B;;AAWA,QAAMC,cAAc,GAAKC,gBAAF,IAAwB;AAC9CjB,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AA,MAAM,EAAEG;AAAV,KAAF,CAJf;AAMC,IAAA,UAAU,EAAG3B;AANd,IAZF,CADD,CADD;AA0BA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls, useSetting } from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { MIN_SPACER_SIZE } from './constants';\n\nfunction DimensionInput( { label, onChange, isResizing, value = '' } ) {\n\tconst inputId = useInstanceId( UnitControl, 'block-spacer-height-input' );\n\n\t// In most contexts the spacer size cannot meaningfully be set to a\n\t// percentage, since this is relative to the parent container. This\n\t// unit is disabled from the UI.\n\tconst availableUnitSettings = (\n\t\tuseSetting( 'spacing.units' ) || undefined\n\t)?.filter( ( availableUnit ) => availableUnit !== '%' );\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnitSettings || [\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t\t'vh',\n\t\t],\n\t\tdefaultValues: { px: 100, em: 10, rem: 10, vw: 10, vh: 25 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tonChange( unprocessedValue );\n\t};\n\n\t// Force the unit to update to `px` when the Spacer is being resized.\n\tconst [ parsedQuantity, parsedUnit ] =\n\t\tparseQuantityAndUnitFromRawValue( value );\n\tconst computedValue = [\n\t\tparsedQuantity,\n\t\tisResizing ? 'px' : parsedUnit,\n\t].join( '' );\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ label }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ MIN_SPACER_SIZE }\n\t\t\tonChange={ handleOnChange }\n\t\t\t__unstableInputWidth={ '80px' }\n\t\t\tvalue={ computedValue }\n\t\t\tunits={ units }\n\t\t/>\n\t);\n}\n\nexport default function SpacerControls( {\n\tsetAttributes,\n\torientation,\n\theight,\n\twidth,\n\tisResizing,\n} ) {\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t{ orientation === 'horizontal' && (\n\t\t\t\t\t<DimensionInput\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tvalue={ width }\n\t\t\t\t\t\tonChange={ ( nextWidth ) =>\n\t\t\t\t\t\t\tsetAttributes( { width: nextWidth } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisResizing={ isResizing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ orientation !== 'horizontal' && (\n\t\t\t\t\t<DimensionInput\n\t\t\t\t\t\tlabel={ __( 'Height' ) }\n\t\t\t\t\t\tvalue={ height }\n\t\t\t\t\t\tonChange={ ( nextHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( { height: nextHeight } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisResizing={ isResizing }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n}\n"]}
@@ -8,10 +8,7 @@ import classnames from 'classnames';
8
8
  * WordPress dependencies
9
9
  */
10
10
 
11
- import { RichText, getColorClassName, useBlockProps } from '@wordpress/block-editor';
12
- const supports = {
13
- align: true
14
- }; // As the previous arbitrary colors won't match theme color palettes, the hex
11
+ import { RichText, getColorClassName, useBlockProps, __experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles, __experimentalGetColorClassesAndStyles as getColorClassesAndStyles } from '@wordpress/block-editor'; // As the previous arbitrary colors won't match theme color palettes, the hex
15
12
  // value will be mapped to the style.color.background attribute as if it was
16
13
  // a custom color selection.
17
14
 
@@ -20,9 +17,255 @@ const oldColors = {
20
17
  'subtle-pale-green': '#e9fbe5',
21
18
  'subtle-pale-blue': '#e7f5fe',
22
19
  'subtle-pale-pink': '#fcf0ef'
23
- };
24
- const deprecated = [// Deprecation migrating table block to use colors block support feature.
25
- {
20
+ }; // In #41140 support was added to global styles for caption elements which
21
+ // added a `wp-element-caption` classname to the embed figcaption element.
22
+
23
+ const v3 = {
24
+ attributes: {
25
+ hasFixedLayout: {
26
+ type: 'boolean',
27
+ default: false
28
+ },
29
+ caption: {
30
+ type: 'string',
31
+ source: 'html',
32
+ selector: 'figcaption',
33
+ default: ''
34
+ },
35
+ head: {
36
+ type: 'array',
37
+ default: [],
38
+ source: 'query',
39
+ selector: 'thead tr',
40
+ query: {
41
+ cells: {
42
+ type: 'array',
43
+ default: [],
44
+ source: 'query',
45
+ selector: 'td,th',
46
+ query: {
47
+ content: {
48
+ type: 'string',
49
+ source: 'html'
50
+ },
51
+ tag: {
52
+ type: 'string',
53
+ default: 'td',
54
+ source: 'tag'
55
+ },
56
+ scope: {
57
+ type: 'string',
58
+ source: 'attribute',
59
+ attribute: 'scope'
60
+ },
61
+ align: {
62
+ type: 'string',
63
+ source: 'attribute',
64
+ attribute: 'data-align'
65
+ }
66
+ }
67
+ }
68
+ }
69
+ },
70
+ body: {
71
+ type: 'array',
72
+ default: [],
73
+ source: 'query',
74
+ selector: 'tbody tr',
75
+ query: {
76
+ cells: {
77
+ type: 'array',
78
+ default: [],
79
+ source: 'query',
80
+ selector: 'td,th',
81
+ query: {
82
+ content: {
83
+ type: 'string',
84
+ source: 'html'
85
+ },
86
+ tag: {
87
+ type: 'string',
88
+ default: 'td',
89
+ source: 'tag'
90
+ },
91
+ scope: {
92
+ type: 'string',
93
+ source: 'attribute',
94
+ attribute: 'scope'
95
+ },
96
+ align: {
97
+ type: 'string',
98
+ source: 'attribute',
99
+ attribute: 'data-align'
100
+ }
101
+ }
102
+ }
103
+ }
104
+ },
105
+ foot: {
106
+ type: 'array',
107
+ default: [],
108
+ source: 'query',
109
+ selector: 'tfoot tr',
110
+ query: {
111
+ cells: {
112
+ type: 'array',
113
+ default: [],
114
+ source: 'query',
115
+ selector: 'td,th',
116
+ query: {
117
+ content: {
118
+ type: 'string',
119
+ source: 'html'
120
+ },
121
+ tag: {
122
+ type: 'string',
123
+ default: 'td',
124
+ source: 'tag'
125
+ },
126
+ scope: {
127
+ type: 'string',
128
+ source: 'attribute',
129
+ attribute: 'scope'
130
+ },
131
+ align: {
132
+ type: 'string',
133
+ source: 'attribute',
134
+ attribute: 'data-align'
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ },
141
+ supports: {
142
+ anchor: true,
143
+ align: true,
144
+ color: {
145
+ __experimentalSkipSerialization: true,
146
+ gradients: true,
147
+ __experimentalDefaultControls: {
148
+ background: true,
149
+ text: true
150
+ }
151
+ },
152
+ spacing: {
153
+ margin: true,
154
+ padding: true
155
+ },
156
+ typography: {
157
+ fontSize: true,
158
+ lineHeight: true,
159
+ __experimentalFontFamily: true,
160
+ __experimentalFontStyle: true,
161
+ __experimentalFontWeight: true,
162
+ __experimentalLetterSpacing: true,
163
+ __experimentalTextTransform: true,
164
+ __experimentalTextDecoration: true,
165
+ __experimentalDefaultControls: {
166
+ fontSize: true
167
+ }
168
+ },
169
+ __experimentalBorder: {
170
+ __experimentalSkipSerialization: true,
171
+ color: true,
172
+ style: true,
173
+ width: true,
174
+ __experimentalDefaultControls: {
175
+ color: true,
176
+ style: true,
177
+ width: true
178
+ }
179
+ },
180
+ __experimentalSelector: '.wp-block-table > table'
181
+ },
182
+
183
+ save(_ref) {
184
+ let {
185
+ attributes
186
+ } = _ref;
187
+ const {
188
+ hasFixedLayout,
189
+ head,
190
+ body,
191
+ foot,
192
+ caption
193
+ } = attributes;
194
+ const isEmpty = !head.length && !body.length && !foot.length;
195
+
196
+ if (isEmpty) {
197
+ return null;
198
+ }
199
+
200
+ const colorProps = getColorClassesAndStyles(attributes);
201
+ const borderProps = getBorderClassesAndStyles(attributes);
202
+ const classes = classnames(colorProps.className, borderProps.className, {
203
+ 'has-fixed-layout': hasFixedLayout
204
+ });
205
+ const hasCaption = !RichText.isEmpty(caption);
206
+
207
+ const Section = _ref2 => {
208
+ let {
209
+ type,
210
+ rows
211
+ } = _ref2;
212
+
213
+ if (!rows.length) {
214
+ return null;
215
+ }
216
+
217
+ const Tag = `t${type}`;
218
+ return createElement(Tag, null, rows.map((_ref3, rowIndex) => {
219
+ let {
220
+ cells
221
+ } = _ref3;
222
+ return createElement("tr", {
223
+ key: rowIndex
224
+ }, cells.map((_ref4, cellIndex) => {
225
+ let {
226
+ content,
227
+ tag,
228
+ scope,
229
+ align
230
+ } = _ref4;
231
+ const cellClasses = classnames({
232
+ [`has-text-align-${align}`]: align
233
+ });
234
+ return createElement(RichText.Content, {
235
+ className: cellClasses ? cellClasses : undefined,
236
+ "data-align": align,
237
+ tagName: tag,
238
+ value: content,
239
+ key: cellIndex,
240
+ scope: tag === 'th' ? scope : undefined
241
+ });
242
+ }));
243
+ }));
244
+ };
245
+
246
+ return createElement("figure", useBlockProps.save(), createElement("table", {
247
+ className: classes === '' ? undefined : classes,
248
+ style: { ...colorProps.style,
249
+ ...borderProps.style
250
+ }
251
+ }, createElement(Section, {
252
+ type: "head",
253
+ rows: head
254
+ }), createElement(Section, {
255
+ type: "body",
256
+ rows: body
257
+ }), createElement(Section, {
258
+ type: "foot",
259
+ rows: foot
260
+ })), hasCaption && createElement(RichText.Content, {
261
+ tagName: "figcaption",
262
+ value: caption
263
+ }));
264
+ }
265
+
266
+ }; // Deprecation migrating table block to use colors block support feature.
267
+
268
+ const v2 = {
26
269
  attributes: {
27
270
  hasFixedLayout: {
28
271
  type: 'boolean',
@@ -148,10 +391,10 @@ const deprecated = [// Deprecation migrating table block to use colors block sup
148
391
  align: true,
149
392
  __experimentalSelector: '.wp-block-table > table'
150
393
  },
151
- save: _ref => {
394
+ save: _ref5 => {
152
395
  let {
153
396
  attributes
154
- } = _ref;
397
+ } = _ref5;
155
398
  const {
156
399
  hasFixedLayout,
157
400
  head,
@@ -173,30 +416,30 @@ const deprecated = [// Deprecation migrating table block to use colors block sup
173
416
  });
174
417
  const hasCaption = !RichText.isEmpty(caption);
175
418
 
176
- const Section = _ref2 => {
419
+ const Section = _ref6 => {
177
420
  let {
178
421
  type,
179
422
  rows
180
- } = _ref2;
423
+ } = _ref6;
181
424
 
182
425
  if (!rows.length) {
183
426
  return null;
184
427
  }
185
428
 
186
429
  const Tag = `t${type}`;
187
- return createElement(Tag, null, rows.map((_ref3, rowIndex) => {
430
+ return createElement(Tag, null, rows.map((_ref7, rowIndex) => {
188
431
  let {
189
432
  cells
190
- } = _ref3;
433
+ } = _ref7;
191
434
  return createElement("tr", {
192
435
  key: rowIndex
193
- }, cells.map((_ref4, cellIndex) => {
436
+ }, cells.map((_ref8, cellIndex) => {
194
437
  let {
195
438
  content,
196
439
  tag,
197
440
  scope,
198
441
  align
199
- } = _ref4;
442
+ } = _ref8;
200
443
  const cellClasses = classnames({
201
444
  [`has-text-align-${align}`]: align
202
445
  });
@@ -243,7 +486,8 @@ const deprecated = [// Deprecation migrating table block to use colors block sup
243
486
  }
244
487
  };
245
488
  }
246
- }, {
489
+ };
490
+ const v1 = {
247
491
  attributes: {
248
492
  hasFixedLayout: {
249
493
  type: 'boolean',
@@ -343,12 +587,14 @@ const deprecated = [// Deprecation migrating table block to use colors block sup
343
587
  }
344
588
  }
345
589
  },
346
- supports,
590
+ supports: {
591
+ align: true
592
+ },
347
593
 
348
- save(_ref5) {
594
+ save(_ref9) {
349
595
  let {
350
596
  attributes
351
- } = _ref5;
597
+ } = _ref9;
352
598
  const {
353
599
  hasFixedLayout,
354
600
  head,
@@ -368,29 +614,29 @@ const deprecated = [// Deprecation migrating table block to use colors block sup
368
614
  'has-background': !!backgroundClass
369
615
  });
370
616
 
371
- const Section = _ref6 => {
617
+ const Section = _ref10 => {
372
618
  let {
373
619
  type,
374
620
  rows
375
- } = _ref6;
621
+ } = _ref10;
376
622
 
377
623
  if (!rows.length) {
378
624
  return null;
379
625
  }
380
626
 
381
627
  const Tag = `t${type}`;
382
- return createElement(Tag, null, rows.map((_ref7, rowIndex) => {
628
+ return createElement(Tag, null, rows.map((_ref11, rowIndex) => {
383
629
  let {
384
630
  cells
385
- } = _ref7;
631
+ } = _ref11;
386
632
  return createElement("tr", {
387
633
  key: rowIndex
388
- }, cells.map((_ref8, cellIndex) => {
634
+ }, cells.map((_ref12, cellIndex) => {
389
635
  let {
390
636
  content,
391
637
  tag,
392
638
  scope
393
- } = _ref8;
639
+ } = _ref12;
394
640
  return createElement(RichText.Content, {
395
641
  tagName: tag,
396
642
  value: content,
@@ -415,6 +661,15 @@ const deprecated = [// Deprecation migrating table block to use colors block sup
415
661
  }));
416
662
  }
417
663
 
418
- }];
419
- export default deprecated;
664
+ };
665
+ /**
666
+ * New deprecations need to be placed first
667
+ * for them to have higher priority.
668
+ *
669
+ * Old deprecations may need to be updated as well.
670
+ *
671
+ * See block-deprecation.md
672
+ */
673
+
674
+ export default [v3, v2, v1];
420
675
  //# sourceMappingURL=deprecated.js.map