@wordpress/block-library 8.30.0 → 8.32.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 (362) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/block/edit.js +22 -16
  3. package/build/block/edit.js.map +1 -1
  4. package/build/button/edit.native.js +1 -1
  5. package/build/button/edit.native.js.map +1 -1
  6. package/build/code/save.js +3 -1
  7. package/build/code/save.js.map +1 -1
  8. package/build/cover/edit/index.js +2 -1
  9. package/build/cover/edit/index.js.map +1 -1
  10. package/build/details/edit.js +1 -0
  11. package/build/details/edit.js.map +1 -1
  12. package/build/file/edit.js +2 -0
  13. package/build/file/edit.js.map +1 -1
  14. package/build/heading/index.js +4 -3
  15. package/build/heading/index.js.map +1 -1
  16. package/build/image/edit.js +10 -39
  17. package/build/image/edit.js.map +1 -1
  18. package/build/image/image.js +27 -6
  19. package/build/image/image.js.map +1 -1
  20. package/build/media-text/edit.js +33 -9
  21. package/build/media-text/edit.js.map +1 -1
  22. package/build/media-text/index.js +5 -0
  23. package/build/media-text/index.js.map +1 -1
  24. package/build/media-text/media-container.js +30 -11
  25. package/build/media-text/media-container.js.map +1 -1
  26. package/build/media-text/save.js +2 -2
  27. package/build/media-text/save.js.map +1 -1
  28. package/build/navigation/edit/index.js +23 -29
  29. package/build/navigation/edit/index.js.map +1 -1
  30. package/build/navigation/edit/navigation-menu-delete-control.js +12 -20
  31. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  32. package/build/navigation/edit/navigation-menu-selector.js +24 -23
  33. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  34. package/build/navigation/edit/placeholder/index.js +4 -4
  35. package/build/navigation/edit/placeholder/index.js.map +1 -1
  36. package/build/navigation/use-navigation-menu.js +15 -12
  37. package/build/navigation/use-navigation-menu.js.map +1 -1
  38. package/build/navigation/view.js +12 -2
  39. package/build/navigation/view.js.map +1 -1
  40. package/build/navigation-link/edit.js +52 -27
  41. package/build/navigation-link/edit.js.map +1 -1
  42. package/build/navigation-submenu/edit.js +31 -9
  43. package/build/navigation-submenu/edit.js.map +1 -1
  44. package/build/pattern/edit.js +3 -1
  45. package/build/pattern/edit.js.map +1 -1
  46. package/build/post-author/edit.js +1 -0
  47. package/build/post-author/edit.js.map +1 -1
  48. package/build/post-excerpt/edit.js +1 -0
  49. package/build/post-excerpt/edit.js.map +1 -1
  50. package/build/post-featured-image/edit.js +16 -4
  51. package/build/post-featured-image/edit.js.map +1 -1
  52. package/build/post-featured-image/index.js +13 -2
  53. package/build/post-featured-image/index.js.map +1 -1
  54. package/build/post-featured-image/overlay-controls.js +82 -0
  55. package/build/post-featured-image/overlay-controls.js.map +1 -0
  56. package/build/post-featured-image/overlay.js +5 -54
  57. package/build/post-featured-image/overlay.js.map +1 -1
  58. package/build/post-navigation-link/edit.js +1 -0
  59. package/build/post-navigation-link/edit.js.map +1 -1
  60. package/build/post-terms/edit.js +2 -0
  61. package/build/post-terms/edit.js.map +1 -1
  62. package/build/quote/edit.js +18 -23
  63. package/build/quote/edit.js.map +1 -1
  64. package/build/read-more/edit.js +1 -0
  65. package/build/read-more/edit.js.map +1 -1
  66. package/build/search/edit.js +2 -0
  67. package/build/search/edit.js.map +1 -1
  68. package/build/search/edit.native.js +2 -2
  69. package/build/search/edit.native.js.map +1 -1
  70. package/build/site-tagline/edit.js +13 -4
  71. package/build/site-tagline/edit.js.map +1 -1
  72. package/build/site-tagline/index.js +4 -0
  73. package/build/site-tagline/index.js.map +1 -1
  74. package/build/social-link/edit.js +1 -1
  75. package/build/social-link/edit.js.map +1 -1
  76. package/build/social-link/icons/medium.js +1 -1
  77. package/build/social-link/icons/medium.js.map +1 -1
  78. package/build/social-link/icons/reddit.js +1 -1
  79. package/build/social-link/icons/reddit.js.map +1 -1
  80. package/build/table/deprecated.js +285 -175
  81. package/build/table/deprecated.js.map +1 -1
  82. package/build/table/index.js +1 -1
  83. package/build/template-part/edit/index.js +55 -47
  84. package/build/template-part/edit/index.js.map +1 -1
  85. package/build/template-part/edit/inner-blocks.js +106 -10
  86. package/build/template-part/edit/inner-blocks.js.map +1 -1
  87. package/build/template-part/edit/selection-modal.js +1 -9
  88. package/build/template-part/edit/selection-modal.js.map +1 -1
  89. package/build/utils/caption.js +19 -13
  90. package/build/utils/caption.js.map +1 -1
  91. package/build/utils/hooks.js +1 -0
  92. package/build/utils/hooks.js.map +1 -1
  93. package/build/video/edit.native.js +1 -1
  94. package/build/video/edit.native.js.map +1 -1
  95. package/build-module/block/edit.js +23 -17
  96. package/build-module/block/edit.js.map +1 -1
  97. package/build-module/button/edit.native.js +1 -1
  98. package/build-module/button/edit.native.js.map +1 -1
  99. package/build-module/code/save.js +3 -1
  100. package/build-module/code/save.js.map +1 -1
  101. package/build-module/cover/edit/index.js +2 -1
  102. package/build-module/cover/edit/index.js.map +1 -1
  103. package/build-module/details/edit.js +1 -0
  104. package/build-module/details/edit.js.map +1 -1
  105. package/build-module/file/edit.js +2 -0
  106. package/build-module/file/edit.js.map +1 -1
  107. package/build-module/heading/index.js +4 -3
  108. package/build-module/heading/index.js.map +1 -1
  109. package/build-module/image/edit.js +11 -40
  110. package/build-module/image/edit.js.map +1 -1
  111. package/build-module/image/image.js +27 -6
  112. package/build-module/image/image.js.map +1 -1
  113. package/build-module/media-text/edit.js +34 -10
  114. package/build-module/media-text/edit.js.map +1 -1
  115. package/build-module/media-text/index.js +5 -0
  116. package/build-module/media-text/index.js.map +1 -1
  117. package/build-module/media-text/media-container.js +31 -12
  118. package/build-module/media-text/media-container.js.map +1 -1
  119. package/build-module/media-text/save.js +2 -2
  120. package/build-module/media-text/save.js.map +1 -1
  121. package/build-module/navigation/edit/index.js +24 -30
  122. package/build-module/navigation/edit/index.js.map +1 -1
  123. package/build-module/navigation/edit/navigation-menu-delete-control.js +15 -23
  124. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  125. package/build-module/navigation/edit/navigation-menu-selector.js +24 -23
  126. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  127. package/build-module/navigation/edit/placeholder/index.js +4 -4
  128. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  129. package/build-module/navigation/use-navigation-menu.js +15 -12
  130. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  131. package/build-module/navigation/view.js +12 -2
  132. package/build-module/navigation/view.js.map +1 -1
  133. package/build-module/navigation-link/edit.js +55 -30
  134. package/build-module/navigation-link/edit.js.map +1 -1
  135. package/build-module/navigation-submenu/edit.js +31 -9
  136. package/build-module/navigation-submenu/edit.js.map +1 -1
  137. package/build-module/pattern/edit.js +3 -1
  138. package/build-module/pattern/edit.js.map +1 -1
  139. package/build-module/post-author/edit.js +1 -0
  140. package/build-module/post-author/edit.js.map +1 -1
  141. package/build-module/post-excerpt/edit.js +1 -0
  142. package/build-module/post-excerpt/edit.js.map +1 -1
  143. package/build-module/post-featured-image/edit.js +17 -5
  144. package/build-module/post-featured-image/edit.js.map +1 -1
  145. package/build-module/post-featured-image/index.js +13 -2
  146. package/build-module/post-featured-image/index.js.map +1 -1
  147. package/build-module/post-featured-image/overlay-controls.js +75 -0
  148. package/build-module/post-featured-image/overlay-controls.js.map +1 -0
  149. package/build-module/post-featured-image/overlay.js +7 -56
  150. package/build-module/post-featured-image/overlay.js.map +1 -1
  151. package/build-module/post-navigation-link/edit.js +1 -0
  152. package/build-module/post-navigation-link/edit.js.map +1 -1
  153. package/build-module/post-terms/edit.js +2 -0
  154. package/build-module/post-terms/edit.js.map +1 -1
  155. package/build-module/quote/edit.js +20 -25
  156. package/build-module/quote/edit.js.map +1 -1
  157. package/build-module/read-more/edit.js +1 -0
  158. package/build-module/read-more/edit.js.map +1 -1
  159. package/build-module/search/edit.js +2 -0
  160. package/build-module/search/edit.js.map +1 -1
  161. package/build-module/search/edit.native.js +2 -2
  162. package/build-module/search/edit.native.js.map +1 -1
  163. package/build-module/site-tagline/edit.js +14 -5
  164. package/build-module/site-tagline/edit.js.map +1 -1
  165. package/build-module/site-tagline/index.js +4 -0
  166. package/build-module/site-tagline/index.js.map +1 -1
  167. package/build-module/social-link/edit.js +1 -1
  168. package/build-module/social-link/edit.js.map +1 -1
  169. package/build-module/social-link/icons/medium.js +1 -1
  170. package/build-module/social-link/icons/medium.js.map +1 -1
  171. package/build-module/social-link/icons/reddit.js +1 -1
  172. package/build-module/social-link/icons/reddit.js.map +1 -1
  173. package/build-module/table/deprecated.js +286 -176
  174. package/build-module/table/deprecated.js.map +1 -1
  175. package/build-module/table/index.js +1 -1
  176. package/build-module/template-part/edit/index.js +58 -50
  177. package/build-module/template-part/edit/index.js.map +1 -1
  178. package/build-module/template-part/edit/inner-blocks.js +108 -12
  179. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  180. package/build-module/template-part/edit/selection-modal.js +2 -10
  181. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  182. package/build-module/utils/caption.js +19 -13
  183. package/build-module/utils/caption.js.map +1 -1
  184. package/build-module/utils/hooks.js +1 -0
  185. package/build-module/utils/hooks.js.map +1 -1
  186. package/build-module/video/edit.native.js +1 -1
  187. package/build-module/video/edit.native.js.map +1 -1
  188. package/build-style/audio/theme-rtl.css +1 -1
  189. package/build-style/audio/theme.css +1 -1
  190. package/build-style/cover/style-rtl.css +5 -2
  191. package/build-style/cover/style.css +5 -2
  192. package/build-style/editor-rtl.css +22 -12
  193. package/build-style/editor.css +22 -12
  194. package/build-style/embed/theme-rtl.css +1 -1
  195. package/build-style/embed/theme.css +1 -1
  196. package/build-style/file/editor-rtl.css +3 -0
  197. package/build-style/file/editor.css +3 -0
  198. package/build-style/image/editor-rtl.css +0 -3
  199. package/build-style/image/editor.css +0 -3
  200. package/build-style/image/theme-rtl.css +1 -1
  201. package/build-style/image/theme.css +1 -1
  202. package/build-style/media-text/editor-rtl.css +7 -1
  203. package/build-style/media-text/editor.css +7 -1
  204. package/build-style/pullquote/theme-rtl.css +2 -1
  205. package/build-style/pullquote/theme.css +2 -1
  206. package/build-style/quote/theme-rtl.css +6 -6
  207. package/build-style/quote/theme.css +6 -6
  208. package/build-style/search/style-rtl.css +10 -0
  209. package/build-style/search/style.css +10 -0
  210. package/build-style/social-links/editor-rtl.css +0 -4
  211. package/build-style/social-links/editor.css +0 -4
  212. package/build-style/social-links/style-rtl.css +2 -2
  213. package/build-style/social-links/style.css +2 -2
  214. package/build-style/style-rtl.css +17 -4
  215. package/build-style/style.css +17 -4
  216. package/build-style/table/theme-rtl.css +4 -3
  217. package/build-style/table/theme.css +4 -3
  218. package/build-style/template-part/editor-rtl.css +12 -4
  219. package/build-style/template-part/editor.css +12 -4
  220. package/build-style/template-part/theme-rtl.css +1 -1
  221. package/build-style/template-part/theme.css +1 -1
  222. package/build-style/theme-rtl.css +17 -15
  223. package/build-style/theme.css +17 -15
  224. package/build-style/video/theme-rtl.css +1 -1
  225. package/build-style/video/theme.css +1 -1
  226. package/package.json +34 -34
  227. package/src/archives/index.php +4 -0
  228. package/src/audio/theme.scss +1 -1
  229. package/src/avatar/index.php +6 -0
  230. package/src/block/edit.js +43 -32
  231. package/src/block/index.php +4 -0
  232. package/src/block/test/edit.native.js +67 -0
  233. package/src/button/edit.native.js +1 -1
  234. package/src/calendar/index.php +12 -0
  235. package/src/categories/index.php +6 -0
  236. package/src/code/save.js +7 -1
  237. package/src/comment-author-name/index.php +4 -0
  238. package/src/comment-content/index.php +4 -0
  239. package/src/comment-date/index.php +4 -0
  240. package/src/comment-edit-link/index.php +4 -0
  241. package/src/comment-reply-link/index.php +4 -0
  242. package/src/comment-template/index.php +4 -0
  243. package/src/comments/index.php +10 -0
  244. package/src/comments-pagination/index.php +4 -0
  245. package/src/comments-pagination-next/index.php +4 -0
  246. package/src/comments-pagination-numbers/index.php +4 -0
  247. package/src/comments-pagination-previous/index.php +4 -0
  248. package/src/comments-title/index.php +4 -0
  249. package/src/cover/edit/index.js +4 -1
  250. package/src/cover/index.php +4 -0
  251. package/src/cover/style.scss +6 -2
  252. package/src/details/edit.js +1 -0
  253. package/src/embed/theme.scss +1 -1
  254. package/src/file/edit.js +2 -0
  255. package/src/file/editor.scss +3 -0
  256. package/src/file/index.php +4 -0
  257. package/src/gallery/editor.scss +1 -1
  258. package/src/gallery/index.php +7 -1
  259. package/src/heading/index.js +4 -3
  260. package/src/heading/index.php +4 -0
  261. package/src/home-link/index.php +10 -0
  262. package/src/image/edit.js +11 -40
  263. package/src/image/editor.scss +2 -7
  264. package/src/image/image.js +25 -7
  265. package/src/image/index.php +12 -1
  266. package/src/image/theme.scss +1 -1
  267. package/src/latest-comments/index.php +4 -0
  268. package/src/latest-posts/index.php +8 -0
  269. package/src/loginout/index.php +4 -0
  270. package/src/media-text/block.json +5 -0
  271. package/src/media-text/edit.js +70 -19
  272. package/src/media-text/editor.scss +7 -1
  273. package/src/media-text/index.php +70 -0
  274. package/src/media-text/media-container.js +49 -9
  275. package/src/media-text/save.js +2 -2
  276. package/src/navigation/edit/index.js +67 -71
  277. package/src/navigation/edit/navigation-menu-delete-control.js +22 -49
  278. package/src/navigation/edit/navigation-menu-selector.js +39 -21
  279. package/src/navigation/edit/placeholder/index.js +4 -4
  280. package/src/navigation/edit/test/navigation-menu-selector.js +75 -53
  281. package/src/navigation/index.php +109 -26
  282. package/src/navigation/test/use-navigation-menu.js +21 -21
  283. package/src/navigation/use-navigation-menu.js +23 -9
  284. package/src/navigation/view.js +11 -2
  285. package/src/navigation-link/edit.js +64 -39
  286. package/src/navigation-link/index.php +14 -0
  287. package/src/navigation-submenu/edit.js +34 -10
  288. package/src/navigation-submenu/index.php +8 -0
  289. package/src/page-list/index.php +12 -0
  290. package/src/page-list-item/index.php +2 -0
  291. package/src/pattern/edit.js +4 -0
  292. package/src/pattern/index.php +2 -0
  293. package/src/post-author/edit.js +1 -0
  294. package/src/post-author/index.php +4 -0
  295. package/src/post-author-biography/index.php +4 -0
  296. package/src/post-author-name/index.php +4 -0
  297. package/src/post-comments-form/index.php +6 -0
  298. package/src/post-content/index.php +4 -0
  299. package/src/post-date/index.php +4 -0
  300. package/src/post-excerpt/edit.js +1 -0
  301. package/src/post-excerpt/index.php +4 -0
  302. package/src/post-featured-image/block.json +13 -2
  303. package/src/post-featured-image/edit.js +16 -1
  304. package/src/post-featured-image/editor.scss +1 -1
  305. package/src/post-featured-image/index.php +15 -0
  306. package/src/post-featured-image/overlay-controls.js +88 -0
  307. package/src/post-featured-image/overlay.js +17 -84
  308. package/src/post-navigation-link/edit.js +1 -0
  309. package/src/post-navigation-link/index.php +4 -0
  310. package/src/post-template/index.php +4 -0
  311. package/src/post-terms/edit.js +2 -0
  312. package/src/post-terms/index.php +6 -0
  313. package/src/post-title/index.php +2 -0
  314. package/src/pullquote/theme.scss +3 -1
  315. package/src/query/index.php +2 -0
  316. package/src/query-no-results/index.php +6 -0
  317. package/src/query-pagination/index.php +4 -0
  318. package/src/query-pagination-next/index.php +6 -0
  319. package/src/query-pagination-numbers/index.php +6 -0
  320. package/src/query-pagination-previous/index.php +4 -0
  321. package/src/query-title/index.php +4 -0
  322. package/src/quote/edit.js +27 -37
  323. package/src/quote/test/edit.native.js +4 -6
  324. package/src/quote/theme.scss +1 -2
  325. package/src/read-more/edit.js +1 -0
  326. package/src/read-more/index.php +4 -0
  327. package/src/rss/index.php +4 -0
  328. package/src/search/edit.js +2 -0
  329. package/src/search/edit.native.js +2 -2
  330. package/src/search/index.php +19 -1
  331. package/src/search/style.scss +11 -0
  332. package/src/shortcode/index.php +4 -0
  333. package/src/site-logo/editor.scss +2 -2
  334. package/src/site-logo/index.php +20 -0
  335. package/src/site-tagline/block.json +4 -0
  336. package/src/site-tagline/edit.js +16 -3
  337. package/src/site-tagline/index.php +13 -1
  338. package/src/site-title/index.php +4 -0
  339. package/src/social-link/edit.js +1 -1
  340. package/src/social-link/icons/medium.js +1 -1
  341. package/src/social-link/icons/reddit.js +1 -1
  342. package/src/social-link/index.php +22 -9
  343. package/src/social-link/socials-with-bg.scss +1 -1
  344. package/src/social-link/socials-without-bg.scss +1 -1
  345. package/src/social-links/editor.scss +1 -9
  346. package/src/table/block.json +1 -1
  347. package/src/table/deprecated.js +308 -175
  348. package/src/table/theme.scss +4 -2
  349. package/src/tag-cloud/index.php +4 -0
  350. package/src/template-part/edit/index.js +87 -79
  351. package/src/template-part/edit/inner-blocks.js +126 -13
  352. package/src/template-part/edit/selection-modal.js +1 -22
  353. package/src/template-part/editor.scss +11 -3
  354. package/src/template-part/index.php +12 -0
  355. package/src/template-part/theme.scss +1 -1
  356. package/src/term-description/index.php +4 -0
  357. package/src/utils/caption.js +19 -16
  358. package/src/utils/hooks.js +1 -0
  359. package/src/video/edit.native.js +2 -0
  360. package/src/video/editor.scss +2 -2
  361. package/src/video/theme.scss +1 -1
  362. package/tsconfig.json +1 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","_react","createElement","URLPopover","anchor","onClose","className","onSubmit","event","preventDefault","URLInput","__nextHasNoMarginBottom","value","onChange","nextURL","placeholder","__","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","label","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","classNames","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkLabel","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","sprintf","initialOpen","PanelRow","TextControl","help","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { 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\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\tonClose={ () => setPopover( false ) }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label, rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = 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\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\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<>\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\t__nextHasNoMarginBottom\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 group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\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\tclientId={ clientId }\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</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"m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aAAa,CAAE;MAAEwC,GAAG,EAAEtB;IAAM,CAAE;EAAG,CACzD,CACiB,CAAC,EACpB,IAAAX,MAAA,CAAAC,aAAA;IAAA,GAASgD;EAAU,GAClB,IAAAjD,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAoC,MAAM;IACNlB,SAAS,EAAC,6BAA6B;IACvC2D,GAAG,EAAGrB,gBAAkB;IACxBsB,OAAO,EAAGA,CAAA,KAAMvE,UAAU,CAAE,IAAK;EAAG,GAEpC,IAAAM,MAAA,CAAAC,aAAA,EAAC2C,aAAa,MAAE,CAAC,EACjB,IAAA5C,MAAA,CAAAC,aAAA;IACCI,SAAS,EAAG,IAAAqC,mBAAU,EAAE,4BAA4B,EAAE;MACrD,oBAAoB,EAAE,CAAER;IACzB,CAAE;EAAG,GAEHc,eACG,CAAC,EACLjB,UAAU,IAAIQ,cAAc,IAC7B,IAAAvC,MAAA,CAAAC,aAAA,EAACV,oBAAoB;IACpBC,GAAG,EAAGA,GAAK;IACXC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA,UAAY;IACzBC,aAAa,EAAGA,aAAe;IAC/BC,QAAQ,EAAGA;EAAU,CACrB,CAEK,CACL,CACH,CAAC;AAEL,CAAC;AAAC,IAAAsE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaxC,cAAc"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","_react","createElement","URLPopover","anchor","onClose","className","onSubmit","event","preventDefault","URLInput","__nextHasNoMarginBottom","value","onChange","nextURL","placeholder","__","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","label","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","classNames","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkLabel","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","sprintf","initialOpen","PanelRow","TextControl","help","undefined","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { 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\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\tonClose={ () => setPopover( false ) }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label, rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = 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\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\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<>\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\t__nextHasNoMarginBottom\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 || undefined } )\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 group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\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\tclientId={ clientId }\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</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AA/BA;AACA;AACA;;AAGA;AACA;AACA;;AAqBA;AACA;AACA;;AAGA,MAAMS,oBAAoB,GAAGA,CAAE;EAC9BC,GAAG;EACHC,aAAa;EACbC,UAAU;EACVC,aAAa;EACbC;AACD,CAAC,KAAM;EACN,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACvD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAiB,UAAU;IACVC,MAAM,EAAGR,aAAe;IACxBS,OAAO,EAAGA,CAAA,KAAMV,UAAU,CAAE,KAAM;EAAG,GAErC,IAAAM,MAAA,CAAAC,aAAA;IACCI,SAAS,EAAC,uCAAuC;IACjDC,QAAQ,EAAKC,KAAK,IAAM;MACvBA,KAAK,CAACC,cAAc,CAAC,CAAC;MACtBd,UAAU,CA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-16,7 +16,7 @@ const MediumIcon = () => (0, _react.createElement)(_primitives.SVG, {
16
16
  viewBox: "0 0 24 24",
17
17
  version: "1.1"
18
18
  }, (0, _react.createElement)(_primitives.Path, {
19
- d: "M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"
19
+ d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12"
20
20
  }));
21
21
  exports.MediumIcon = MediumIcon;
22
22
  //# sourceMappingURL=medium.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_primitives","require","MediumIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/medium.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const MediumIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAA2mB,CAAE,CACjnB,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["_primitives","require","MediumIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/medium.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const MediumIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAAqP,CAAE,CAC3P,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
@@ -16,7 +16,7 @@ const RedditIcon = () => (0, _react.createElement)(_primitives.SVG, {
16
16
  viewBox: "0 0 24 24",
17
17
  version: "1.1"
18
18
  }, (0, _react.createElement)(_primitives.Path, {
19
- d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"
19
+ d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z"
20
20
  }));
21
21
  exports.RedditIcon = RedditIcon;
22
22
  //# sourceMappingURL=reddit.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_primitives","require","RedditIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/reddit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const RedditIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAAu2B,CAAE,CAC72B,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["_primitives","require","RedditIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/reddit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const RedditIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAA+lC,CAAE,CACrmC,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
@@ -26,8 +26,246 @@ const oldColors = {
26
26
  'subtle-pale-pink': '#fcf0ef'
27
27
  };
28
28
 
29
+ // Fixed width table cells on by default.
30
+ const v4Query = {
31
+ content: {
32
+ type: 'rich-text',
33
+ source: 'rich-text'
34
+ },
35
+ tag: {
36
+ type: 'string',
37
+ default: 'td',
38
+ source: 'tag'
39
+ },
40
+ scope: {
41
+ type: 'string',
42
+ source: 'attribute',
43
+ attribute: 'scope'
44
+ },
45
+ align: {
46
+ type: 'string',
47
+ source: 'attribute',
48
+ attribute: 'data-align'
49
+ },
50
+ colspan: {
51
+ type: 'string',
52
+ source: 'attribute',
53
+ attribute: 'colspan'
54
+ },
55
+ rowspan: {
56
+ type: 'string',
57
+ source: 'attribute',
58
+ attribute: 'rowspan'
59
+ }
60
+ };
61
+ const v4 = {
62
+ attributes: {
63
+ hasFixedLayout: {
64
+ type: 'boolean',
65
+ default: false
66
+ },
67
+ caption: {
68
+ type: 'rich-text',
69
+ source: 'rich-text',
70
+ selector: 'figcaption'
71
+ },
72
+ head: {
73
+ type: 'array',
74
+ default: [],
75
+ source: 'query',
76
+ selector: 'thead tr',
77
+ query: {
78
+ cells: {
79
+ type: 'array',
80
+ default: [],
81
+ source: 'query',
82
+ selector: 'td,th',
83
+ query: v4Query
84
+ }
85
+ }
86
+ },
87
+ body: {
88
+ type: 'array',
89
+ default: [],
90
+ source: 'query',
91
+ selector: 'tbody tr',
92
+ query: {
93
+ cells: {
94
+ type: 'array',
95
+ default: [],
96
+ source: 'query',
97
+ selector: 'td,th',
98
+ query: v4Query
99
+ }
100
+ }
101
+ },
102
+ foot: {
103
+ type: 'array',
104
+ default: [],
105
+ source: 'query',
106
+ selector: 'tfoot tr',
107
+ query: {
108
+ cells: {
109
+ type: 'array',
110
+ default: [],
111
+ source: 'query',
112
+ selector: 'td,th',
113
+ query: v4Query
114
+ }
115
+ }
116
+ }
117
+ },
118
+ supports: {
119
+ anchor: true,
120
+ align: true,
121
+ color: {
122
+ __experimentalSkipSerialization: true,
123
+ gradients: true,
124
+ __experimentalDefaultControls: {
125
+ background: true,
126
+ text: true
127
+ }
128
+ },
129
+ spacing: {
130
+ margin: true,
131
+ padding: true,
132
+ __experimentalDefaultControls: {
133
+ margin: false,
134
+ padding: false
135
+ }
136
+ },
137
+ typography: {
138
+ fontSize: true,
139
+ lineHeight: true,
140
+ __experimentalFontFamily: true,
141
+ __experimentalFontStyle: true,
142
+ __experimentalFontWeight: true,
143
+ __experimentalLetterSpacing: true,
144
+ __experimentalTextTransform: true,
145
+ __experimentalTextDecoration: true,
146
+ __experimentalDefaultControls: {
147
+ fontSize: true
148
+ }
149
+ },
150
+ __experimentalBorder: {
151
+ __experimentalSkipSerialization: true,
152
+ color: true,
153
+ style: true,
154
+ width: true,
155
+ __experimentalDefaultControls: {
156
+ color: true,
157
+ style: true,
158
+ width: true
159
+ }
160
+ },
161
+ __experimentalSelector: '.wp-block-table > table',
162
+ interactivity: {
163
+ clientNavigation: true
164
+ }
165
+ },
166
+ save({
167
+ attributes
168
+ }) {
169
+ const {
170
+ hasFixedLayout,
171
+ head,
172
+ body,
173
+ foot,
174
+ caption
175
+ } = attributes;
176
+ const isEmpty = !head.length && !body.length && !foot.length;
177
+ if (isEmpty) {
178
+ return null;
179
+ }
180
+ const colorProps = (0, _blockEditor.__experimentalGetColorClassesAndStyles)(attributes);
181
+ const borderProps = (0, _blockEditor.__experimentalGetBorderClassesAndStyles)(attributes);
182
+ const classes = (0, _classnames.default)(colorProps.className, borderProps.className, {
183
+ 'has-fixed-layout': hasFixedLayout
184
+ });
185
+ const hasCaption = !_blockEditor.RichText.isEmpty(caption);
186
+ const Section = ({
187
+ type,
188
+ rows
189
+ }) => {
190
+ if (!rows.length) {
191
+ return null;
192
+ }
193
+ const Tag = `t${type}`;
194
+ return (0, _react.createElement)(Tag, null, rows.map(({
195
+ cells
196
+ }, rowIndex) => (0, _react.createElement)("tr", {
197
+ key: rowIndex
198
+ }, cells.map(({
199
+ content,
200
+ tag,
201
+ scope,
202
+ align,
203
+ colspan,
204
+ rowspan
205
+ }, cellIndex) => {
206
+ const cellClasses = (0, _classnames.default)({
207
+ [`has-text-align-${align}`]: align
208
+ });
209
+ return (0, _react.createElement)(_blockEditor.RichText.Content, {
210
+ className: cellClasses ? cellClasses : undefined,
211
+ "data-align": align,
212
+ tagName: tag,
213
+ value: content,
214
+ key: cellIndex,
215
+ scope: tag === 'th' ? scope : undefined,
216
+ colSpan: colspan,
217
+ rowSpan: rowspan
218
+ });
219
+ }))));
220
+ };
221
+ return (0, _react.createElement)("figure", {
222
+ ..._blockEditor.useBlockProps.save()
223
+ }, (0, _react.createElement)("table", {
224
+ className: classes === '' ? undefined : classes,
225
+ style: {
226
+ ...colorProps.style,
227
+ ...borderProps.style
228
+ }
229
+ }, (0, _react.createElement)(Section, {
230
+ type: "head",
231
+ rows: head
232
+ }), (0, _react.createElement)(Section, {
233
+ type: "body",
234
+ rows: body
235
+ }), (0, _react.createElement)(Section, {
236
+ type: "foot",
237
+ rows: foot
238
+ })), hasCaption && (0, _react.createElement)(_blockEditor.RichText.Content, {
239
+ tagName: "figcaption",
240
+ value: caption,
241
+ className: (0, _blockEditor.__experimentalGetElementClassName)('caption')
242
+ }));
243
+ }
244
+ };
245
+
29
246
  // In #41140 support was added to global styles for caption elements which
30
247
  // added a `wp-element-caption` classname to the embed figcaption element.
248
+ const v3Query = {
249
+ content: {
250
+ type: 'string',
251
+ source: 'html'
252
+ },
253
+ tag: {
254
+ type: 'string',
255
+ default: 'td',
256
+ source: 'tag'
257
+ },
258
+ scope: {
259
+ type: 'string',
260
+ source: 'attribute',
261
+ attribute: 'scope'
262
+ },
263
+ align: {
264
+ type: 'string',
265
+ source: 'attribute',
266
+ attribute: 'data-align'
267
+ }
268
+ };
31
269
  const v3 = {
32
270
  attributes: {
33
271
  hasFixedLayout: {
@@ -51,27 +289,7 @@ const v3 = {
51
289
  default: [],
52
290
  source: 'query',
53
291
  selector: 'td,th',
54
- query: {
55
- content: {
56
- type: 'string',
57
- source: 'html'
58
- },
59
- tag: {
60
- type: 'string',
61
- default: 'td',
62
- source: 'tag'
63
- },
64
- scope: {
65
- type: 'string',
66
- source: 'attribute',
67
- attribute: 'scope'
68
- },
69
- align: {
70
- type: 'string',
71
- source: 'attribute',
72
- attribute: 'data-align'
73
- }
74
- }
292
+ query: v3Query
75
293
  }
76
294
  }
77
295
  },
@@ -86,27 +304,7 @@ const v3 = {
86
304
  default: [],
87
305
  source: 'query',
88
306
  selector: 'td,th',
89
- query: {
90
- content: {
91
- type: 'string',
92
- source: 'html'
93
- },
94
- tag: {
95
- type: 'string',
96
- default: 'td',
97
- source: 'tag'
98
- },
99
- scope: {
100
- type: 'string',
101
- source: 'attribute',
102
- attribute: 'scope'
103
- },
104
- align: {
105
- type: 'string',
106
- source: 'attribute',
107
- attribute: 'data-align'
108
- }
109
- }
307
+ query: v3Query
110
308
  }
111
309
  }
112
310
  },
@@ -121,27 +319,7 @@ const v3 = {
121
319
  default: [],
122
320
  source: 'query',
123
321
  selector: 'td,th',
124
- query: {
125
- content: {
126
- type: 'string',
127
- source: 'html'
128
- },
129
- tag: {
130
- type: 'string',
131
- default: 'td',
132
- source: 'tag'
133
- },
134
- scope: {
135
- type: 'string',
136
- source: 'attribute',
137
- attribute: 'scope'
138
- },
139
- align: {
140
- type: 'string',
141
- source: 'attribute',
142
- attribute: 'data-align'
143
- }
144
- }
322
+ query: v3Query
145
323
  }
146
324
  }
147
325
  }
@@ -263,6 +441,27 @@ const v3 = {
263
441
  };
264
442
 
265
443
  // Deprecation migrating table block to use colors block support feature.
444
+ const v2Query = {
445
+ content: {
446
+ type: 'string',
447
+ source: 'html'
448
+ },
449
+ tag: {
450
+ type: 'string',
451
+ default: 'td',
452
+ source: 'tag'
453
+ },
454
+ scope: {
455
+ type: 'string',
456
+ source: 'attribute',
457
+ attribute: 'scope'
458
+ },
459
+ align: {
460
+ type: 'string',
461
+ source: 'attribute',
462
+ attribute: 'data-align'
463
+ }
464
+ };
266
465
  const v2 = {
267
466
  attributes: {
268
467
  hasFixedLayout: {
@@ -289,27 +488,7 @@ const v2 = {
289
488
  default: [],
290
489
  source: 'query',
291
490
  selector: 'td,th',
292
- query: {
293
- content: {
294
- type: 'string',
295
- source: 'html'
296
- },
297
- tag: {
298
- type: 'string',
299
- default: 'td',
300
- source: 'tag'
301
- },
302
- scope: {
303
- type: 'string',
304
- source: 'attribute',
305
- attribute: 'scope'
306
- },
307
- align: {
308
- type: 'string',
309
- source: 'attribute',
310
- attribute: 'data-align'
311
- }
312
- }
491
+ query: v2Query
313
492
  }
314
493
  }
315
494
  },
@@ -324,27 +503,7 @@ const v2 = {
324
503
  default: [],
325
504
  source: 'query',
326
505
  selector: 'td,th',
327
- query: {
328
- content: {
329
- type: 'string',
330
- source: 'html'
331
- },
332
- tag: {
333
- type: 'string',
334
- default: 'td',
335
- source: 'tag'
336
- },
337
- scope: {
338
- type: 'string',
339
- source: 'attribute',
340
- attribute: 'scope'
341
- },
342
- align: {
343
- type: 'string',
344
- source: 'attribute',
345
- attribute: 'data-align'
346
- }
347
- }
506
+ query: v2Query
348
507
  }
349
508
  }
350
509
  },
@@ -359,27 +518,7 @@ const v2 = {
359
518
  default: [],
360
519
  source: 'query',
361
520
  selector: 'td,th',
362
- query: {
363
- content: {
364
- type: 'string',
365
- source: 'html'
366
- },
367
- tag: {
368
- type: 'string',
369
- default: 'td',
370
- source: 'tag'
371
- },
372
- scope: {
373
- type: 'string',
374
- source: 'attribute',
375
- attribute: 'scope'
376
- },
377
- align: {
378
- type: 'string',
379
- source: 'attribute',
380
- attribute: 'data-align'
381
- }
382
- }
521
+ query: v2Query
383
522
  }
384
523
  }
385
524
  }
@@ -476,6 +615,22 @@ const v2 = {
476
615
  };
477
616
  }
478
617
  };
618
+ const v1Query = {
619
+ content: {
620
+ type: 'string',
621
+ source: 'html'
622
+ },
623
+ tag: {
624
+ type: 'string',
625
+ default: 'td',
626
+ source: 'tag'
627
+ },
628
+ scope: {
629
+ type: 'string',
630
+ source: 'attribute',
631
+ attribute: 'scope'
632
+ }
633
+ };
479
634
  const v1 = {
480
635
  attributes: {
481
636
  hasFixedLayout: {
@@ -496,22 +651,7 @@ const v1 = {
496
651
  default: [],
497
652
  source: 'query',
498
653
  selector: 'td,th',
499
- query: {
500
- content: {
501
- type: 'string',
502
- source: 'html'
503
- },
504
- tag: {
505
- type: 'string',
506
- default: 'td',
507
- source: 'tag'
508
- },
509
- scope: {
510
- type: 'string',
511
- source: 'attribute',
512
- attribute: 'scope'
513
- }
514
- }
654
+ query: v1Query
515
655
  }
516
656
  }
517
657
  },
@@ -526,22 +666,7 @@ const v1 = {
526
666
  default: [],
527
667
  source: 'query',
528
668
  selector: 'td,th',
529
- query: {
530
- content: {
531
- type: 'string',
532
- source: 'html'
533
- },
534
- tag: {
535
- type: 'string',
536
- default: 'td',
537
- source: 'tag'
538
- },
539
- scope: {
540
- type: 'string',
541
- source: 'attribute',
542
- attribute: 'scope'
543
- }
544
- }
669
+ query: v1Query
545
670
  }
546
671
  }
547
672
  },
@@ -556,22 +681,7 @@ const v1 = {
556
681
  default: [],
557
682
  source: 'query',
558
683
  selector: 'td,th',
559
- query: {
560
- content: {
561
- type: 'string',
562
- source: 'html'
563
- },
564
- tag: {
565
- type: 'string',
566
- default: 'td',
567
- source: 'tag'
568
- },
569
- scope: {
570
- type: 'string',
571
- source: 'attribute',
572
- attribute: 'scope'
573
- }
574
- }
684
+ query: v1Query
575
685
  }
576
686
  }
577
687
  }
@@ -644,5 +754,5 @@ const v1 = {
644
754
  *
645
755
  * See block-deprecation.md
646
756
  */
647
- var _default = exports.default = [v3, v2, v1];
757
+ var _default = exports.default = [v4, v3, v2, v1];
648
758
  //# sourceMappingURL=deprecated.js.map