@wordpress/block-library 9.48.0 → 9.48.1

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 (519) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/build/columns/transforms.cjs +65 -0
  3. package/build/columns/transforms.cjs.map +2 -2
  4. package/build/gallery/edit.cjs +212 -331
  5. package/build/gallery/edit.cjs.map +2 -2
  6. package/build/gallery/transforms.cjs +43 -0
  7. package/build/gallery/transforms.cjs.map +2 -2
  8. package/build/heading/edit.cjs +0 -1
  9. package/build/heading/edit.cjs.map +2 -2
  10. package/build/list/edit.cjs +1 -8
  11. package/build/list/edit.cjs.map +2 -2
  12. package/build/list/ordered-list-settings.cjs +1 -44
  13. package/build/list/ordered-list-settings.cjs.map +2 -2
  14. package/build/list-item/hooks/use-merge.cjs +47 -24
  15. package/build/list-item/hooks/use-merge.cjs.map +2 -2
  16. package/build/navigation/edit/index.cjs +15 -26
  17. package/build/navigation/edit/index.cjs.map +2 -2
  18. package/build/navigation-link/edit.cjs +0 -1
  19. package/build/navigation-link/edit.cjs.map +2 -2
  20. package/build/navigation-submenu/edit.cjs +2 -1
  21. package/build/navigation-submenu/edit.cjs.map +2 -2
  22. package/build/paragraph/deprecated.cjs +1 -0
  23. package/build/paragraph/deprecated.cjs.map +2 -2
  24. package/build/paragraph/edit.cjs +10 -1
  25. package/build/paragraph/edit.cjs.map +3 -3
  26. package/build/playlist/block.json +12 -0
  27. package/build/playlist/edit.cjs +27 -1
  28. package/build/playlist/edit.cjs.map +2 -2
  29. package/build/playlist/save.cjs +8 -1
  30. package/build/playlist/save.cjs.map +2 -2
  31. package/build/playlist/view.cjs +1 -0
  32. package/build/playlist/view.cjs.map +2 -2
  33. package/build/post-time-to-read/index.cjs +1 -1
  34. package/build/post-time-to-read/index.cjs.map +2 -2
  35. package/build/post-time-to-read/variations.cjs +1 -1
  36. package/build/post-time-to-read/variations.cjs.map +2 -2
  37. package/build/pullquote/edit.cjs +2 -7
  38. package/build/pullquote/edit.cjs.map +2 -2
  39. package/build/quote/edit.cjs +4 -9
  40. package/build/quote/edit.cjs.map +2 -2
  41. package/build/shortcode/transforms.cjs +2 -2
  42. package/build/shortcode/transforms.cjs.map +2 -2
  43. package/build/utils/waveform-player.cjs +42 -9
  44. package/build/utils/waveform-player.cjs.map +2 -2
  45. package/build/utils/waveform-utils.cjs +6 -4
  46. package/build/utils/waveform-utils.cjs.map +2 -2
  47. package/build/video/edit-common-settings.cjs +3 -6
  48. package/build/video/edit-common-settings.cjs.map +2 -2
  49. package/build-module/columns/transforms.mjs +65 -0
  50. package/build-module/columns/transforms.mjs.map +2 -2
  51. package/build-module/gallery/edit.mjs +214 -334
  52. package/build-module/gallery/edit.mjs.map +2 -2
  53. package/build-module/gallery/transforms.mjs +43 -0
  54. package/build-module/gallery/transforms.mjs.map +2 -2
  55. package/build-module/heading/edit.mjs +1 -2
  56. package/build-module/heading/edit.mjs.map +2 -2
  57. package/build-module/list/edit.mjs +2 -9
  58. package/build-module/list/edit.mjs.map +2 -2
  59. package/build-module/list/ordered-list-settings.mjs +1 -45
  60. package/build-module/list/ordered-list-settings.mjs.map +2 -2
  61. package/build-module/list-item/hooks/use-merge.mjs +48 -25
  62. package/build-module/list-item/hooks/use-merge.mjs.map +2 -2
  63. package/build-module/navigation/edit/index.mjs +16 -33
  64. package/build-module/navigation/edit/index.mjs.map +2 -2
  65. package/build-module/navigation-link/edit.mjs +0 -1
  66. package/build-module/navigation-link/edit.mjs.map +2 -2
  67. package/build-module/navigation-submenu/edit.mjs +2 -1
  68. package/build-module/navigation-submenu/edit.mjs.map +2 -2
  69. package/build-module/paragraph/deprecated.mjs +1 -0
  70. package/build-module/paragraph/deprecated.mjs.map +2 -2
  71. package/build-module/paragraph/edit.mjs +12 -2
  72. package/build-module/paragraph/edit.mjs.map +2 -2
  73. package/build-module/playlist/block.json +12 -0
  74. package/build-module/playlist/edit.mjs +27 -1
  75. package/build-module/playlist/edit.mjs.map +2 -2
  76. package/build-module/playlist/save.mjs +8 -1
  77. package/build-module/playlist/save.mjs.map +2 -2
  78. package/build-module/playlist/view.mjs +1 -0
  79. package/build-module/playlist/view.mjs.map +2 -2
  80. package/build-module/post-time-to-read/index.mjs +1 -1
  81. package/build-module/post-time-to-read/index.mjs.map +2 -2
  82. package/build-module/post-time-to-read/variations.mjs +2 -2
  83. package/build-module/post-time-to-read/variations.mjs.map +2 -2
  84. package/build-module/pullquote/edit.mjs +2 -7
  85. package/build-module/pullquote/edit.mjs.map +2 -2
  86. package/build-module/quote/edit.mjs +5 -10
  87. package/build-module/quote/edit.mjs.map +2 -2
  88. package/build-module/shortcode/transforms.mjs +2 -2
  89. package/build-module/shortcode/transforms.mjs.map +2 -2
  90. package/build-module/utils/waveform-player.mjs +44 -11
  91. package/build-module/utils/waveform-player.mjs.map +2 -2
  92. package/build-module/utils/waveform-utils.mjs +6 -4
  93. package/build-module/utils/waveform-utils.mjs.map +2 -2
  94. package/build-module/video/edit-common-settings.mjs +4 -7
  95. package/build-module/video/edit-common-settings.mjs.map +2 -2
  96. package/build-style/comment-template/style-rtl.css +1 -0
  97. package/build-style/comment-template/style.css +1 -0
  98. package/build-style/common-rtl.css +30 -10
  99. package/build-style/common.css +30 -10
  100. package/build-style/cover/style-rtl.css +2 -1
  101. package/build-style/cover/style.css +2 -1
  102. package/build-style/editor-rtl.css +22 -11
  103. package/build-style/editor.css +22 -11
  104. package/build-style/form-input/style-rtl.css +2 -0
  105. package/build-style/form-input/style.css +2 -0
  106. package/build-style/gallery/style-rtl.css +4 -2
  107. package/build-style/gallery/style.css +4 -2
  108. package/build-style/media-text/style-rtl.css +2 -1
  109. package/build-style/media-text/style.css +2 -1
  110. package/build-style/playlist/style-rtl.css +3 -0
  111. package/build-style/playlist/style.css +3 -0
  112. package/build-style/query/editor-rtl.css +8 -4
  113. package/build-style/query/editor.css +8 -4
  114. package/build-style/read-more/style-rtl.css +1 -0
  115. package/build-style/read-more/style.css +1 -0
  116. package/build-style/reset-rtl.css +3 -1
  117. package/build-style/reset.css +3 -1
  118. package/build-style/search/style-rtl.css +3 -1
  119. package/build-style/search/style.css +3 -1
  120. package/build-style/site-logo/editor-rtl.css +2 -1
  121. package/build-style/site-logo/editor.css +2 -1
  122. package/build-style/style-rtl.css +53 -17
  123. package/build-style/style.css +53 -17
  124. package/build-style/tab/style-rtl.css +3 -1
  125. package/build-style/tab/style.css +3 -1
  126. package/build-style/template-part/editor-rtl.css +8 -4
  127. package/build-style/template-part/editor.css +8 -4
  128. package/build-style/video/style-rtl.css +2 -1
  129. package/build-style/video/style.css +2 -1
  130. package/package.json +49 -45
  131. package/src/accordion/README.md +97 -0
  132. package/src/accordion-heading/README.md +81 -0
  133. package/src/accordion-item/README.md +85 -0
  134. package/src/accordion-panel/README.md +74 -0
  135. package/src/archives/README.md +56 -0
  136. package/src/audio/README.md +55 -0
  137. package/src/avatar/README.md +74 -0
  138. package/src/block/README.md +56 -0
  139. package/src/breadcrumbs/README.md +67 -0
  140. package/src/button/README.md +93 -0
  141. package/src/buttons/README.md +80 -0
  142. package/src/calendar/README.md +51 -0
  143. package/src/categories/README.md +69 -0
  144. package/src/code/README.md +55 -0
  145. package/src/column/README.md +72 -0
  146. package/src/columns/README.md +90 -0
  147. package/src/columns/test/transforms.js +164 -0
  148. package/src/columns/transforms.js +74 -0
  149. package/src/comment-author-avatar/README.md +63 -0
  150. package/src/comment-author-name/README.md +67 -0
  151. package/src/comment-content/README.md +61 -0
  152. package/src/comment-date/README.md +67 -0
  153. package/src/comment-edit-link/README.md +67 -0
  154. package/src/comment-reply-link/README.md +63 -0
  155. package/src/comment-template/README.md +60 -0
  156. package/src/comments/README.md +88 -0
  157. package/src/comments-pagination/README.md +77 -0
  158. package/src/comments-pagination-next/README.md +64 -0
  159. package/src/comments-pagination-numbers/README.md +64 -0
  160. package/src/comments-pagination-previous/README.md +64 -0
  161. package/src/comments-title/README.md +70 -0
  162. package/src/common.scss +63 -10
  163. package/src/cover/README.md +111 -0
  164. package/src/details/README.md +65 -0
  165. package/src/embed/README.md +56 -0
  166. package/src/file/README.md +60 -0
  167. package/src/footnotes/README.md +64 -0
  168. package/src/form/README.md +90 -0
  169. package/src/form-input/README.md +74 -0
  170. package/src/form-submission-notification/README.md +50 -0
  171. package/src/form-submit-button/README.md +54 -0
  172. package/src/freeform/README.md +49 -0
  173. package/src/gallery/README.md +115 -0
  174. package/src/gallery/edit.js +213 -350
  175. package/src/gallery/test/transforms.js +155 -0
  176. package/src/gallery/transforms.js +47 -0
  177. package/src/group/README.md +80 -0
  178. package/src/heading/README.md +60 -0
  179. package/src/heading/edit.js +1 -2
  180. package/src/home-link/README.md +66 -0
  181. package/src/home-link/index.php +3 -15
  182. package/src/html/README.md +48 -0
  183. package/src/icon/README.md +63 -0
  184. package/src/image/README.md +102 -0
  185. package/src/image/index.php +4 -4
  186. package/src/latest-comments/README.md +57 -0
  187. package/src/latest-posts/README.md +71 -0
  188. package/src/list/README.md +70 -0
  189. package/src/list/edit.js +2 -9
  190. package/src/list/ordered-list-settings.js +46 -92
  191. package/src/list-item/README.md +71 -0
  192. package/src/list-item/hooks/use-merge.js +53 -46
  193. package/src/loginout/README.md +56 -0
  194. package/src/math/README.md +50 -0
  195. package/src/media-text/README.md +92 -0
  196. package/src/missing/README.md +55 -0
  197. package/src/more/README.md +49 -0
  198. package/src/navigation/README.md +115 -0
  199. package/src/navigation/edit/index.js +10 -30
  200. package/src/navigation-link/README.md +93 -0
  201. package/src/navigation-link/edit.js +0 -1
  202. package/src/navigation-link/index.php +1 -15
  203. package/src/navigation-overlay-close/README.md +48 -0
  204. package/src/navigation-submenu/README.md +84 -0
  205. package/src/navigation-submenu/edit.js +1 -0
  206. package/src/navigation-submenu/index.php +1 -17
  207. package/src/nextpage/README.md +50 -0
  208. package/src/page-list/README.md +84 -0
  209. package/src/page-list/index.php +3 -15
  210. package/src/page-list-item/README.md +77 -0
  211. package/src/paragraph/README.md +70 -0
  212. package/src/paragraph/deprecated.js +1 -0
  213. package/src/paragraph/edit.js +13 -1
  214. package/src/pattern/README.md +45 -0
  215. package/src/playlist/README.md +86 -0
  216. package/src/playlist/block.json +12 -0
  217. package/src/playlist/edit.js +27 -0
  218. package/src/playlist/index.php +10 -3
  219. package/src/playlist/save.js +9 -1
  220. package/src/playlist/style.scss +7 -0
  221. package/src/playlist/view.js +1 -0
  222. package/src/playlist-track/README.md +69 -0
  223. package/src/post-author/README.md +78 -0
  224. package/src/post-author-biography/README.md +59 -0
  225. package/src/post-author-name/README.md +63 -0
  226. package/src/post-author-name/index.php +1 -1
  227. package/src/post-comment/README.md +61 -0
  228. package/src/post-comments-count/README.md +58 -0
  229. package/src/post-comments-form/README.md +59 -0
  230. package/src/post-comments-link/README.md +60 -0
  231. package/src/post-content/README.md +71 -0
  232. package/src/post-date/README.md +65 -0
  233. package/src/post-date/index.php +1 -1
  234. package/src/post-excerpt/README.md +66 -0
  235. package/src/post-featured-image/README.md +85 -0
  236. package/src/post-featured-image/index.php +1 -1
  237. package/src/post-navigation-link/README.md +63 -0
  238. package/src/post-template/README.md +71 -0
  239. package/src/post-terms/README.md +65 -0
  240. package/src/post-time-to-read/README.md +63 -0
  241. package/src/post-time-to-read/index.js +1 -1
  242. package/src/post-time-to-read/variations.js +2 -2
  243. package/src/post-title/README.md +69 -0
  244. package/src/preformatted/README.md +50 -0
  245. package/src/pullquote/README.md +64 -0
  246. package/src/pullquote/edit.js +1 -7
  247. package/src/query/README.md +64 -0
  248. package/src/query-no-results/README.md +65 -0
  249. package/src/query-pagination/README.md +79 -0
  250. package/src/query-pagination-next/README.md +67 -0
  251. package/src/query-pagination-numbers/README.md +65 -0
  252. package/src/query-pagination-previous/README.md +67 -0
  253. package/src/query-title/README.md +65 -0
  254. package/src/query-total/README.md +66 -0
  255. package/src/quote/README.md +75 -0
  256. package/src/quote/edit.js +3 -9
  257. package/src/read-more/README.md +61 -0
  258. package/src/read-more/index.php +2 -2
  259. package/src/rss/README.md +62 -0
  260. package/src/search/README.md +66 -0
  261. package/src/separator/README.md +62 -0
  262. package/src/shortcode/README.md +44 -0
  263. package/src/shortcode/transforms.js +2 -2
  264. package/src/site-logo/README.md +72 -0
  265. package/src/site-tagline/README.md +56 -0
  266. package/src/site-title/README.md +57 -0
  267. package/src/social-link/README.md +64 -0
  268. package/src/social-links/README.md +98 -0
  269. package/src/spacer/README.md +53 -0
  270. package/src/tab/README.md +69 -0
  271. package/src/tab-list/README.md +79 -0
  272. package/src/tab-panel/README.md +75 -0
  273. package/src/tab-panels/README.md +75 -0
  274. package/src/table/README.md +71 -0
  275. package/src/table-of-contents/README.md +61 -0
  276. package/src/tabs/README.md +83 -0
  277. package/src/tag-cloud/README.md +62 -0
  278. package/src/template-part/README.md +48 -0
  279. package/src/term-count/README.md +59 -0
  280. package/src/term-description/README.md +60 -0
  281. package/src/term-name/README.md +65 -0
  282. package/src/term-template/README.md +65 -0
  283. package/src/terms-query/README.md +58 -0
  284. package/src/text-columns/README.md +51 -0
  285. package/src/utils/test/waveform-player.js +254 -0
  286. package/src/utils/waveform-player.js +90 -18
  287. package/src/utils/waveform-utils.js +15 -11
  288. package/src/verse/README.md +58 -0
  289. package/src/video/README.md +58 -0
  290. package/src/video/edit-common-settings.js +4 -7
  291. package/src/audio/edit.native.js +0 -250
  292. package/src/audio/style.native.scss +0 -13
  293. package/src/audio/test/__snapshots__/edit.native.js.snap +0 -546
  294. package/src/audio/test/__snapshots__/transforms.native.js.snap +0 -25
  295. package/src/audio/test/edit.native.js +0 -132
  296. package/src/audio/test/transforms.native.js +0 -43
  297. package/src/audio/transforms.native.js +0 -12
  298. package/src/block/edit-title.native.js +0 -67
  299. package/src/block/edit.native.js +0 -247
  300. package/src/block/editor.native.scss +0 -125
  301. package/src/block/test/__snapshots__/transforms.native.js.snap +0 -15
  302. package/src/block/test/edit.native.js +0 -262
  303. package/src/block/test/transforms.native.js +0 -40
  304. package/src/button/color-background.native.js +0 -41
  305. package/src/button/edit.native.js +0 -567
  306. package/src/button/editor.native.scss +0 -70
  307. package/src/button/rich-text.android.scss +0 -6
  308. package/src/button/rich-text.ios.scss +0 -6
  309. package/src/buttons/edit.native.js +0 -157
  310. package/src/buttons/editor.native.scss +0 -11
  311. package/src/buttons/test/__snapshots__/edit.native.js.snap +0 -99
  312. package/src/buttons/test/__snapshots__/transforms.native.js.snap +0 -31
  313. package/src/buttons/test/edit.native.js +0 -485
  314. package/src/buttons/test/transforms.native.js +0 -48
  315. package/src/buttons/transforms.native.js +0 -12
  316. package/src/code/edit.native.js +0 -70
  317. package/src/code/test/__snapshots__/edit.native.js.snap +0 -13
  318. package/src/code/test/edit.native.js +0 -65
  319. package/src/code/theme.native.scss +0 -22
  320. package/src/code/transforms.native.js +0 -12
  321. package/src/column/column-preview.native.js +0 -58
  322. package/src/column/edit.native.js +0 -273
  323. package/src/column/editor.native.scss +0 -75
  324. package/src/columns/columnCalculations.native.js +0 -178
  325. package/src/columns/edit.native.js +0 -507
  326. package/src/columns/editor.native.scss +0 -17
  327. package/src/columns/test/__snapshots__/edit.native.js.snap +0 -305
  328. package/src/columns/test/__snapshots__/transforms.native.js.snap +0 -61
  329. package/src/columns/test/edit.native.js +0 -496
  330. package/src/columns/test/transforms.native.js +0 -89
  331. package/src/columns/transforms.native.js +0 -12
  332. package/src/cover/controls.native.js +0 -307
  333. package/src/cover/edit.native.js +0 -708
  334. package/src/cover/focal-point-settings-button.native.js +0 -53
  335. package/src/cover/overlay-color-settings.native.js +0 -106
  336. package/src/cover/style.native.scss +0 -220
  337. package/src/cover/test/__snapshots__/edit.native.js.snap +0 -105
  338. package/src/cover/test/__snapshots__/transforms.native.js.snap +0 -73
  339. package/src/cover/test/edit.native.js +0 -701
  340. package/src/cover/test/transforms.native.js +0 -116
  341. package/src/cover/transforms.native.js +0 -12
  342. package/src/cover/use-cover-is-dark.native.js +0 -51
  343. package/src/embed/edit.native.js +0 -345
  344. package/src/embed/embed-controls.native.js +0 -65
  345. package/src/embed/embed-link-settings.native.js +0 -99
  346. package/src/embed/embed-loading.native.js +0 -29
  347. package/src/embed/embed-no-preview.native.js +0 -230
  348. package/src/embed/embed-placeholder.native.js +0 -178
  349. package/src/embed/embed-preview.native.js +0 -157
  350. package/src/embed/styles.native.scss +0 -196
  351. package/src/embed/test/__snapshots__/index.native.js.snap +0 -191
  352. package/src/embed/test/__snapshots__/transforms.native.js.snap +0 -23
  353. package/src/embed/test/index.native.js +0 -1125
  354. package/src/embed/test/transforms.native.js +0 -44
  355. package/src/embed/transforms.native.js +0 -12
  356. package/src/embed/wp-embed-preview.native.js +0 -80
  357. package/src/file/edit.native.js +0 -605
  358. package/src/file/style.native.scss +0 -79
  359. package/src/file/test/__snapshots__/edit.native.js.snap +0 -580
  360. package/src/file/test/__snapshots__/transforms.native.js.snap +0 -19
  361. package/src/file/test/edit.native.js +0 -93
  362. package/src/file/test/transforms.native.js +0 -43
  363. package/src/file/transforms.native.js +0 -12
  364. package/src/freeform/edit.native.js +0 -13
  365. package/src/freeform/test/__snapshots__/index.native.js.snap +0 -7
  366. package/src/freeform/test/__snapshots__/transforms.native.js.snap +0 -19
  367. package/src/freeform/test/index.native.js +0 -57
  368. package/src/freeform/test/transforms.native.js +0 -39
  369. package/src/gallery/gallery-styles.native.scss +0 -8
  370. package/src/gallery/gallery.native.js +0 -124
  371. package/src/gallery/styles.native.scss +0 -7
  372. package/src/gallery/test/__snapshots__/index.native.js.snap +0 -177
  373. package/src/gallery/test/__snapshots__/transforms.native.js.snap +0 -53
  374. package/src/gallery/test/helpers.native.js +0 -106
  375. package/src/gallery/test/index.native.js +0 -700
  376. package/src/gallery/test/transforms.native.js +0 -53
  377. package/src/gallery/test/use-get-media.native.js +0 -24
  378. package/src/gallery/transforms.native.js +0 -12
  379. package/src/gallery/use-get-media.native.js +0 -49
  380. package/src/group/edit.native.js +0 -137
  381. package/src/group/editor.native.scss +0 -56
  382. package/src/group/test/__snapshots__/edit.native.js.snap +0 -19
  383. package/src/group/test/__snapshots__/transforms.native.js.snap +0 -35
  384. package/src/group/test/edit.native.js +0 -100
  385. package/src/group/test/transforms.native.js +0 -73
  386. package/src/heading/edit.native.js +0 -159
  387. package/src/heading/test/__snapshots__/index.native.js.snap +0 -43
  388. package/src/heading/test/__snapshots__/transforms.native.js.snap +0 -47
  389. package/src/heading/test/index.native.js +0 -257
  390. package/src/heading/test/transforms.native.js +0 -46
  391. package/src/heading/transforms.native.js +0 -12
  392. package/src/html/transforms.native.js +0 -11
  393. package/src/image/edit.native.js +0 -959
  394. package/src/image/styles.native.scss +0 -70
  395. package/src/image/test/__snapshots__/transforms.native.js.snap +0 -49
  396. package/src/image/test/edit.native.js +0 -459
  397. package/src/image/test/transforms.native.js +0 -49
  398. package/src/image/transforms.native.js +0 -12
  399. package/src/index.native.js +0 -274
  400. package/src/latest-posts/edit.native.js +0 -294
  401. package/src/latest-posts/style.native.scss +0 -47
  402. package/src/latest-posts/test/__snapshots__/edit.native.js.snap +0 -3
  403. package/src/latest-posts/test/__snapshots__/transforms.native.js.snap +0 -15
  404. package/src/latest-posts/test/edit.native.js +0 -49
  405. package/src/latest-posts/test/transforms.native.js +0 -61
  406. package/src/list/tag-name.native.js +0 -12
  407. package/src/list/test/__snapshots__/edit.native.js.snap +0 -121
  408. package/src/list/test/__snapshots__/transforms.native.js.snap +0 -85
  409. package/src/list/test/edit.native.js +0 -602
  410. package/src/list/test/transforms.native.js +0 -56
  411. package/src/list/transforms.native.js +0 -12
  412. package/src/list-item/edit.native.js +0 -175
  413. package/src/list-item/hooks/use-enter.native.js +0 -81
  414. package/src/list-item/icons.native.js +0 -34
  415. package/src/list-item/list-style-type.native.js +0 -146
  416. package/src/list-item/style.native.scss +0 -57
  417. package/src/media-text/edit.native.js +0 -417
  418. package/src/media-text/icon-retry.native.js +0 -11
  419. package/src/media-text/media-container.native.js +0 -393
  420. package/src/media-text/style.native.scss +0 -191
  421. package/src/media-text/test/__snapshots__/transforms.native.js.snap +0 -73
  422. package/src/media-text/test/edit.native.js +0 -58
  423. package/src/media-text/test/transforms.native.js +0 -116
  424. package/src/media-text/transforms.native.js +0 -12
  425. package/src/missing/edit.native.js +0 -294
  426. package/src/missing/style.native.scss +0 -79
  427. package/src/missing/test/__snapshots__/edit.native.js.snap +0 -110
  428. package/src/missing/test/edit-integration.native.js +0 -168
  429. package/src/missing/test/edit.native.js +0 -81
  430. package/src/more/edit.native.js +0 -36
  431. package/src/more/editor.native.scss +0 -21
  432. package/src/more/test/__snapshots__/edit.native.js.snap +0 -7
  433. package/src/more/test/__snapshots__/transforms.native.js.snap +0 -19
  434. package/src/more/test/edit.native.js +0 -41
  435. package/src/more/test/transforms.native.js +0 -42
  436. package/src/more/transforms.native.js +0 -12
  437. package/src/navigation-link/shared/build-css-font-sizes.php +0 -43
  438. package/src/nextpage/edit.native.js +0 -58
  439. package/src/nextpage/editor.native.scss +0 -21
  440. package/src/nextpage/test/__snapshots__/transforms.native.js.snap +0 -19
  441. package/src/nextpage/test/transforms.native.js +0 -42
  442. package/src/nextpage/transforms.native.js +0 -12
  443. package/src/paragraph/edit.native.js +0 -116
  444. package/src/paragraph/test/__snapshots__/edit.native.js.snap +0 -88
  445. package/src/paragraph/test/__snapshots__/transforms.native.js.snap +0 -65
  446. package/src/paragraph/test/edit.native.js +0 -999
  447. package/src/paragraph/test/transforms.native.js +0 -51
  448. package/src/paragraph/transforms.native.js +0 -12
  449. package/src/preformatted/edit.native.js +0 -48
  450. package/src/preformatted/styles.native.scss +0 -30
  451. package/src/preformatted/test/__snapshots__/edit.native.js.snap +0 -95
  452. package/src/preformatted/test/__snapshots__/transforms.native.js.snap +0 -37
  453. package/src/preformatted/test/edit.native.js +0 -111
  454. package/src/preformatted/test/transforms.native.js +0 -47
  455. package/src/preformatted/transforms.native.js +0 -12
  456. package/src/pullquote/blockquote.native.js +0 -39
  457. package/src/pullquote/blockquote.native.scss +0 -8
  458. package/src/pullquote/edit.native.js +0 -128
  459. package/src/pullquote/figure.native.js +0 -33
  460. package/src/pullquote/figure.native.scss +0 -16
  461. package/src/pullquote/test/__snapshots__/transforms.native.js.snap +0 -47
  462. package/src/pullquote/test/edit.native.js +0 -73
  463. package/src/pullquote/test/transforms.native.js +0 -46
  464. package/src/pullquote/transforms.native.js +0 -12
  465. package/src/quote/test/__snapshots__/transforms.native.js.snap +0 -49
  466. package/src/quote/test/edit.native.js +0 -94
  467. package/src/quote/test/transforms.native.js +0 -69
  468. package/src/quote/transforms.native.js +0 -12
  469. package/src/search/edit.native.js +0 -486
  470. package/src/search/style.native.scss +0 -99
  471. package/src/search/test/__snapshots__/edit.native.js.snap +0 -827
  472. package/src/search/test/__snapshots__/transforms.native.js.snap +0 -15
  473. package/src/search/test/edit.native.js +0 -170
  474. package/src/search/test/transforms.native.js +0 -40
  475. package/src/separator/separator-settings.native.js +0 -3
  476. package/src/separator/test/__snapshots__/edit.native.js.snap +0 -7
  477. package/src/separator/test/__snapshots__/transforms.native.js.snap +0 -25
  478. package/src/separator/test/edit.native.js +0 -41
  479. package/src/separator/test/transforms.native.js +0 -42
  480. package/src/separator/transforms.native.js +0 -12
  481. package/src/shortcode/edit.native.js +0 -77
  482. package/src/shortcode/style.native.scss +0 -44
  483. package/src/shortcode/test/__snapshots__/edit.native.js.snap +0 -9
  484. package/src/shortcode/test/__snapshots__/transforms.native.js.snap +0 -19
  485. package/src/shortcode/test/edit.native.js +0 -70
  486. package/src/shortcode/test/transforms.native.js +0 -42
  487. package/src/shortcode/transforms.native.js +0 -12
  488. package/src/social-link/edit.native.js +0 -219
  489. package/src/social-link/editor.native.scss +0 -18
  490. package/src/social-links/edit.native.js +0 -147
  491. package/src/social-links/editor.native.scss +0 -25
  492. package/src/social-links/test/__snapshots__/edit.native.js.snap +0 -57
  493. package/src/social-links/test/__snapshots__/transforms.native.js.snap +0 -31
  494. package/src/social-links/test/edit.native.js +0 -266
  495. package/src/social-links/test/transforms.native.js +0 -53
  496. package/src/spacer/controls.native.js +0 -86
  497. package/src/spacer/edit.native.js +0 -110
  498. package/src/spacer/editor.native.scss +0 -18
  499. package/src/spacer/save.native.js +0 -18
  500. package/src/spacer/test/__snapshots__/index.native.js.snap +0 -43
  501. package/src/spacer/test/__snapshots__/transforms.native.js.snap +0 -25
  502. package/src/spacer/test/index.native.js +0 -257
  503. package/src/spacer/test/transforms.native.js +0 -42
  504. package/src/table/transforms.native.js +0 -11
  505. package/src/text-columns/transforms.native.js +0 -12
  506. package/src/utils/init-block.native.js +0 -40
  507. package/src/utils/transformation-categories.native.js +0 -47
  508. package/src/verse/test/__snapshots__/edit.native.js.snap +0 -13
  509. package/src/verse/test/__snapshots__/transforms.native.js.snap +0 -31
  510. package/src/verse/test/edit.native.js +0 -118
  511. package/src/verse/test/transforms.native.js +0 -46
  512. package/src/verse/transforms.native.js +0 -12
  513. package/src/video/edit.native.js +0 -406
  514. package/src/video/icon-retry.native.js +0 -11
  515. package/src/video/style.native.scss +0 -81
  516. package/src/video/test/__snapshots__/transforms.native.js.snap +0 -41
  517. package/src/video/test/edit.native.js +0 -53
  518. package/src/video/test/transforms.native.js +0 -49
  519. package/src/video/transforms.native.js +0 -12
@@ -1,567 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { View, AccessibilityInfo, Platform, Text } from 'react-native';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { useCallback, useEffect, useState, useRef } from '@wordpress/element';
10
- import { useSelect, useDispatch } from '@wordpress/data';
11
- import { __, _x } from '@wordpress/i18n';
12
- import {
13
- RichText,
14
- InspectorControls,
15
- BlockControls,
16
- store as blockEditorStore,
17
- getColorObjectByAttributeValues,
18
- getGradientValueBySlug,
19
- __experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
20
- useMobileGlobalStylesColors,
21
- } from '@wordpress/block-editor';
22
- import {
23
- PanelBody,
24
- ToolbarGroup,
25
- ToolbarButton,
26
- LinkSettingsNavigation,
27
- UnitControl,
28
- getValueAndUnit,
29
- BottomSheetSelectControl,
30
- CSS_UNITS,
31
- filterUnitsWithSettings,
32
- } from '@wordpress/components';
33
- import { link } from '@wordpress/icons';
34
- // eslint-disable-next-line no-restricted-imports
35
- import { store as editPostStore } from '@wordpress/edit-post';
36
-
37
- /**
38
- * Internal dependencies
39
- */
40
- import richTextStyle from './rich-text.scss';
41
- import styles from './editor.scss';
42
- import ColorBackground from './color-background';
43
-
44
- const MIN_BORDER_RADIUS_VALUE = 0;
45
- const MAX_BORDER_RADIUS_VALUE = 50;
46
- const INITIAL_MAX_WIDTH = 108;
47
- const MIN_WIDTH = 40;
48
- // Map of the percentage width to pixel subtraction that make the buttons fit nicely into columns.
49
- const MIN_WIDTH_MARGINS = {
50
- 100: 0,
51
- 75: styles.button75?.marginLeft,
52
- 50: styles.button50?.marginLeft,
53
- 25: styles.button25?.marginLeft,
54
- };
55
-
56
- function WidthPanel( { selectedWidth, setAttributes } ) {
57
- function handleChange( newWidth ) {
58
- // Check if we are toggling the width off
59
- let width = selectedWidth === newWidth ? undefined : newWidth;
60
- if ( newWidth === 'auto' ) {
61
- width = undefined;
62
- }
63
- // Update attributes.
64
- setAttributes( { width } );
65
- }
66
-
67
- const options = [
68
- { value: 'auto', label: __( 'Auto' ) },
69
- { value: 25, label: '25%' },
70
- { value: 50, label: '50%' },
71
- { value: 75, label: '75%' },
72
- { value: 100, label: '100%' },
73
- ];
74
-
75
- if ( ! selectedWidth ) {
76
- selectedWidth = 'auto';
77
- }
78
-
79
- return (
80
- <PanelBody title={ __( 'Width Settings' ) }>
81
- <BottomSheetSelectControl
82
- label={ __( 'Button width' ) }
83
- value={ selectedWidth }
84
- onChange={ handleChange }
85
- options={ options }
86
- />
87
- </PanelBody>
88
- );
89
- }
90
-
91
- function ButtonEdit( props ) {
92
- const { isSelected, parentWidth } = props;
93
- const initialBorderRadius = props?.attributes?.style?.border?.radius;
94
- const { valueUnit = 'px' } = getValueAndUnit( initialBorderRadius ) || {};
95
-
96
- const { editorSidebarOpened, numOfButtons } = useSelect(
97
- ( select ) => {
98
- const { isEditorSidebarOpened } = select( editPostStore );
99
- const { getBlockCount, getBlockRootClientId } =
100
- select( blockEditorStore );
101
- const parentId = getBlockRootClientId( clientId );
102
- const blockCount = getBlockCount( parentId );
103
- const currentIsEditorSidebarOpened = isEditorSidebarOpened();
104
-
105
- return {
106
- editorSidebarOpened: isSelected && currentIsEditorSidebarOpened,
107
- numOfButtons: blockCount,
108
- };
109
- },
110
- [ clientId, isSelected ]
111
- );
112
-
113
- const { closeGeneralSidebar } = useDispatch( editPostStore );
114
- const [ maxWidth, setMaxWidth ] = useState( INITIAL_MAX_WIDTH );
115
- const [ isLinkSheetVisible, setIsLinkSheetVisible ] = useState( false );
116
- const [ isButtonFocused, setIsButtonFocused ] = useState( true );
117
- const [ placeholderTextWidth, setPlaceholderTextWidth ] = useState( 0 );
118
- const [ borderRadiusUnit, setBorderRadiusUnit ] = useState( valueUnit );
119
-
120
- const richTextRef = useRef();
121
- const colors = useMobileGlobalStylesColors();
122
- const gradients = useMobileGlobalStylesColors( 'gradients' );
123
-
124
- useEffect( () => {
125
- if ( isSelected ) {
126
- onToggleButtonFocus( true );
127
- }
128
- }, [ isSelected ] );
129
-
130
- useEffect( () => {
131
- onSetMaxWidth( null, true );
132
- }, [ parentWidth ] );
133
-
134
- useEffect( () => {
135
- // Blur `RichText` on Android when link settings sheet or button settings sheet is opened,
136
- // to avoid flashing caret after closing one of them
137
- const richText = richTextRef?.current;
138
- if ( Platform.OS === 'android' && richText ) {
139
- if ( editorSidebarOpened || isLinkSheetVisible ) {
140
- richText.blur();
141
- onToggleButtonFocus( false );
142
- } else {
143
- onToggleButtonFocus( true );
144
- }
145
- }
146
- }, [ editorSidebarOpened, isLinkSheetVisible ] );
147
-
148
- useEffect( () => {
149
- if ( richTextRef?.current ) {
150
- if ( ! isSelected && isButtonFocused ) {
151
- onToggleButtonFocus( false );
152
- }
153
-
154
- if ( isSelected && ! isButtonFocused ) {
155
- AccessibilityInfo.isScreenReaderEnabled().then( ( enabled ) => {
156
- if ( enabled ) {
157
- onToggleButtonFocus( true );
158
- richTextRef?.current.focus();
159
- }
160
- } );
161
- }
162
- }
163
- }, [ isSelected, isButtonFocused ] );
164
-
165
- const linkSettingsActions = [
166
- {
167
- label: __( 'Remove link' ),
168
- onPress: onClearSettings,
169
- },
170
- ];
171
-
172
- const linkSettingsOptions = {
173
- url: {
174
- label: __( 'Button Link URL' ),
175
- placeholder: __( 'Add URL' ),
176
- autoFocus: true,
177
- autoFill: false,
178
- },
179
- openInNewTab: {
180
- label: __( 'Open in new tab' ),
181
- },
182
- linkRel: {
183
- label: __( 'Link relation' ),
184
- placeholder: _x( 'None', 'Link rel attribute value placeholder' ),
185
- },
186
- };
187
-
188
- const noFocusLinkSettingOptions = {
189
- ...linkSettingsOptions,
190
- url: {
191
- ...linkSettingsOptions.url,
192
- autoFocus: false,
193
- },
194
- };
195
-
196
- function getBackgroundColor() {
197
- const { attributes, style } = props;
198
- const { backgroundColor, gradient } = attributes;
199
-
200
- // Return named gradient value if available.
201
- const gradientValue = getGradientValueBySlug( gradients, gradient );
202
-
203
- if ( gradientValue ) {
204
- return gradientValue;
205
- }
206
-
207
- const colorProps = getColorClassesAndStyles( attributes );
208
-
209
- // Retrieve named color object to force inline styles for themes that
210
- // do not load their color stylesheets in the editor.
211
- const colorObject = getColorObjectByAttributeValues(
212
- colors,
213
- backgroundColor
214
- );
215
-
216
- return (
217
- colorObject?.color ||
218
- colorProps.style?.backgroundColor ||
219
- colorProps.style?.background ||
220
- style?.backgroundColor ||
221
- styles.defaultButton.backgroundColor
222
- );
223
- }
224
-
225
- function getTextColor() {
226
- const { attributes, style } = props;
227
- const colorProps = getColorClassesAndStyles( attributes );
228
-
229
- // Retrieve named color object to force inline styles for themes that
230
- // do not load their color stylesheets in the editor.
231
- const colorObject = getColorObjectByAttributeValues(
232
- colors,
233
- attributes.textColor
234
- );
235
-
236
- return (
237
- colorObject?.color ||
238
- colorProps.style?.color ||
239
- style?.color ||
240
- styles.defaultButton.color
241
- );
242
- }
243
-
244
- function onChangeText( value ) {
245
- const { setAttributes } = props;
246
- setAttributes( { text: value } );
247
- }
248
-
249
- function onChangeBorderRadius( newRadius ) {
250
- const { setAttributes, attributes } = props;
251
- const { style } = attributes;
252
- const newStyle = getNewStyle( style, newRadius, borderRadiusUnit );
253
-
254
- setAttributes( { style: newStyle } );
255
- }
256
-
257
- function onChangeBorderRadiusUnit( newRadiusUnit ) {
258
- const { setAttributes, attributes } = props;
259
- const { style } = attributes;
260
- const newBorderRadius = getBorderRadiusValue(
261
- attributes?.style?.border?.radius
262
- );
263
- const newStyle = getNewStyle( style, newBorderRadius, newRadiusUnit );
264
- setAttributes( { style: newStyle } );
265
- setBorderRadiusUnit( newRadiusUnit );
266
- }
267
-
268
- function getNewStyle( style, radius, radiusUnit ) {
269
- return {
270
- ...style,
271
- border: {
272
- ...style?.border,
273
- radius: `${ radius }${ radiusUnit }`, // Store the value with the unit so that it works as expected.
274
- },
275
- };
276
- }
277
-
278
- function onShowLinkSettings() {
279
- setIsLinkSheetVisible( true );
280
- }
281
-
282
- function onHideLinkSettings() {
283
- setIsLinkSheetVisible( false );
284
- }
285
-
286
- function onToggleButtonFocus( value ) {
287
- if ( value !== isButtonFocused ) {
288
- setIsButtonFocused( value );
289
- }
290
- }
291
-
292
- function onClearSettings() {
293
- const { setAttributes } = props;
294
-
295
- setAttributes( {
296
- url: '',
297
- rel: '',
298
- linkTarget: '',
299
- } );
300
-
301
- onHideLinkSettings();
302
- }
303
-
304
- function onLayout( { nativeEvent } ) {
305
- const { width } = nativeEvent.layout;
306
- onSetMaxWidth( width );
307
- }
308
-
309
- const onSetMaxWidth = useCallback(
310
- ( width, isParentWidthDidChange = false ) => {
311
- const { marginRight: spacing } = styles.defaultButton;
312
-
313
- const isParentWidthChanged = isParentWidthDidChange
314
- ? isParentWidthDidChange
315
- : maxWidth !== parentWidth;
316
- const isWidthChanged = maxWidth !== width;
317
-
318
- if ( parentWidth && ! width && isParentWidthChanged ) {
319
- setMaxWidth( parentWidth - spacing );
320
- } else if ( ! parentWidth && width && isWidthChanged ) {
321
- setMaxWidth( width - spacing );
322
- }
323
- },
324
- [ maxWidth, parentWidth ]
325
- );
326
-
327
- function onRemove() {
328
- const { onDeleteBlock, onReplace } = props;
329
-
330
- if ( numOfButtons === 1 ) {
331
- onDeleteBlock();
332
- } else {
333
- onReplace( [] );
334
- }
335
- }
336
-
337
- function onPlaceholderTextWidth( { nativeEvent } ) {
338
- const textWidth =
339
- nativeEvent.lines[ 0 ] && nativeEvent.lines[ 0 ].width;
340
-
341
- if ( textWidth && textWidth !== placeholderTextWidth ) {
342
- setPlaceholderTextWidth( Math.min( textWidth, maxWidth ) );
343
- }
344
- }
345
-
346
- const onSetRef = useCallback(
347
- ( ref ) => {
348
- richTextRef.current = ref;
349
- },
350
- [ richTextRef ]
351
- );
352
-
353
- const onUnstableOnFocus = useCallback( () => {
354
- onToggleButtonFocus( true );
355
- }, [] );
356
-
357
- const onBlur = useCallback( () => {
358
- onSetMaxWidth();
359
- }, [] );
360
-
361
- function dismissSheet() {
362
- onHideLinkSettings();
363
- closeGeneralSidebar();
364
- }
365
-
366
- function getLinkSettings( isCompatibleWithSettings ) {
367
- const { attributes, setAttributes } = props;
368
- return (
369
- <LinkSettingsNavigation
370
- isVisible={ isLinkSheetVisible }
371
- url={ attributes.url }
372
- rel={ attributes.rel }
373
- linkTarget={ attributes.linkTarget }
374
- onClose={ dismissSheet }
375
- setAttributes={ setAttributes }
376
- withBottomSheet={ ! isCompatibleWithSettings }
377
- hasPicker
378
- actions={ linkSettingsActions }
379
- options={
380
- isCompatibleWithSettings
381
- ? linkSettingsOptions
382
- : noFocusLinkSettingOptions
383
- }
384
- showIcon={ ! isCompatibleWithSettings }
385
- />
386
- );
387
- }
388
-
389
- // Render `Text` with `placeholderText` styled as a placeholder
390
- // to calculate its width which then is set as a `minWidth`
391
- function getPlaceholderWidth( placeholderText ) {
392
- return (
393
- <Text
394
- style={ styles.placeholder }
395
- onTextLayout={ onPlaceholderTextWidth }
396
- >
397
- { placeholderText }
398
- </Text>
399
- );
400
- }
401
-
402
- function getBorderRadiusValue( currentBorderRadius, defaultBorderRadius ) {
403
- const valueAndUnit = getValueAndUnit( currentBorderRadius );
404
- if ( Number.isInteger( parseInt( valueAndUnit?.valueToConvert ) ) ) {
405
- return parseFloat( valueAndUnit.valueToConvert );
406
- }
407
- return defaultBorderRadius;
408
- }
409
-
410
- const {
411
- attributes,
412
- clientId,
413
- onReplace,
414
- mergeBlocks,
415
- setAttributes,
416
- style,
417
- } = props;
418
- const {
419
- placeholder,
420
- text,
421
- style: buttonStyle,
422
- url,
423
- align = 'center',
424
- width,
425
- } = attributes;
426
- const { paddingTop: spacing, borderWidth } = styles.defaultButton;
427
-
428
- if ( parentWidth === 0 ) {
429
- return null;
430
- }
431
-
432
- const currentBorderRadius = buttonStyle?.border?.radius;
433
- const borderRadiusValue = getBorderRadiusValue(
434
- currentBorderRadius,
435
- styles.defaultButton.borderRadius
436
- );
437
-
438
- const buttonBorderRadiusValue =
439
- borderRadiusUnit === 'px' || borderRadiusUnit === '%'
440
- ? borderRadiusValue
441
- : Math.floor( 14 * borderRadiusValue ); // Lets assume that the font size is set to 14px; TO get a nicer preview.
442
- const outlineBorderRadius =
443
- buttonBorderRadiusValue > 0
444
- ? buttonBorderRadiusValue + spacing + borderWidth
445
- : 0;
446
-
447
- // To achieve proper expanding and shrinking `RichText` on iOS, there is a need to set a `minWidth`
448
- // value at least on 1 when `RichText` is focused or when is not focused, but `RichText` value is
449
- // different than empty string.
450
- let minWidth =
451
- isButtonFocused || ( ! isButtonFocused && text && text !== '' )
452
- ? MIN_WIDTH
453
- : placeholderTextWidth;
454
- if ( width ) {
455
- // Set the width of the button.
456
- minWidth = Math.floor(
457
- maxWidth * ( width / 100 ) - MIN_WIDTH_MARGINS[ width ]
458
- );
459
- }
460
- // To achieve proper expanding and shrinking `RichText` on Android, there is a need to set
461
- // a `placeholder` as an empty string when `RichText` is focused,
462
- // because `AztecView` is calculating a `minWidth` based on placeholder text.
463
- const placeholderText =
464
- isButtonFocused || ( ! isButtonFocused && text && text !== '' )
465
- ? ''
466
- : placeholder || __( 'Add text…' );
467
-
468
- const backgroundColor = getBackgroundColor();
469
- const textColor = getTextColor();
470
- const isFixedWidth = !! width;
471
- const outLineStyles = [
472
- styles.outline,
473
- {
474
- borderRadius: outlineBorderRadius,
475
- borderColor: backgroundColor,
476
- },
477
- ];
478
- const textStyles = {
479
- ...richTextStyle.richText,
480
- paddingLeft: isFixedWidth ? 0 : richTextStyle.richText.paddingLeft,
481
- paddingRight: isFixedWidth ? 0 : richTextStyle.richText.paddingRight,
482
- color: textColor,
483
- };
484
-
485
- return (
486
- <View onLayout={ onLayout }>
487
- { getPlaceholderWidth( placeholderText ) }
488
- <ColorBackground
489
- borderRadiusValue={ buttonBorderRadiusValue }
490
- backgroundColor={ backgroundColor }
491
- isSelected={ isSelected }
492
- >
493
- { isSelected && (
494
- <View pointerEvents="none" style={ outLineStyles } />
495
- ) }
496
- <RichText
497
- ref={ onSetRef }
498
- placeholder={ placeholderText }
499
- value={ text }
500
- onChange={ onChangeText }
501
- style={ textStyles }
502
- textAlign={ align }
503
- placeholderTextColor={
504
- style?.color || styles.placeholderTextColor.color
505
- }
506
- identifier="text"
507
- tagName="p"
508
- minWidth={ minWidth } // The minimum Button size.
509
- maxWidth={ isFixedWidth ? minWidth : maxWidth } // The width of the screen.
510
- id={ clientId }
511
- isSelected={ isButtonFocused }
512
- withoutInteractiveFormatting
513
- unstableOnFocus={ onUnstableOnFocus }
514
- __unstableMobileNoFocusOnMount={ ! isSelected }
515
- selectionColor={ textColor }
516
- onBlur={ onBlur }
517
- onReplace={ onReplace }
518
- onRemove={ onRemove }
519
- onMerge={ mergeBlocks }
520
- fontSize={ style?.fontSize }
521
- />
522
- </ColorBackground>
523
-
524
- { isSelected && (
525
- <>
526
- <BlockControls>
527
- <ToolbarGroup>
528
- <ToolbarButton
529
- title={ __( 'Edit link' ) }
530
- icon={ link }
531
- onClick={ onShowLinkSettings }
532
- isActive={ url }
533
- />
534
- </ToolbarGroup>
535
- </BlockControls>
536
- { getLinkSettings( false ) }
537
- <InspectorControls>
538
- <PanelBody title={ __( 'Border Settings' ) }>
539
- <UnitControl
540
- label={ __( 'Border Radius' ) }
541
- min={ MIN_BORDER_RADIUS_VALUE }
542
- max={ MAX_BORDER_RADIUS_VALUE }
543
- value={ borderRadiusValue }
544
- onChange={ onChangeBorderRadius }
545
- onUnitChange={ onChangeBorderRadiusUnit }
546
- unit={ borderRadiusUnit }
547
- units={ filterUnitsWithSettings(
548
- [ 'px', 'em', 'rem' ],
549
- CSS_UNITS
550
- ) }
551
- />
552
- </PanelBody>
553
- <WidthPanel
554
- selectedWidth={ width }
555
- setAttributes={ setAttributes }
556
- />
557
- <PanelBody title={ __( 'Link Settings' ) }>
558
- { getLinkSettings( true ) }
559
- </PanelBody>
560
- </InspectorControls>
561
- </>
562
- ) }
563
- </View>
564
- );
565
- }
566
-
567
- export default ButtonEdit;
@@ -1,70 +0,0 @@
1
- .richTextWrapper {
2
- overflow: visible;
3
- align-self: flex-start;
4
- }
5
-
6
- // Block spacing used to indicate the space between blocks in the editor.
7
- // The variable has been retired.
8
- $block-spacing: 4px;
9
- .outline {
10
- // Border Width has to be spread since width is thicker
11
- // on Android when border radius is decreased to 0
12
- border-left-width: $border-width;
13
- border-right-width: $border-width;
14
- border-top-width: $border-width;
15
- border-bottom-width: $border-width;
16
- position: absolute;
17
- left: -($block-spacing + $border-width);
18
- right: -($block-spacing + $border-width);
19
- top: -($block-spacing + $border-width);
20
- bottom: -($block-spacing + $border-width);
21
- }
22
-
23
- .linearGradient {
24
- position: absolute;
25
- left: 0;
26
- right: 0;
27
- top: 0;
28
- bottom: 0;
29
- }
30
-
31
- .defaultButton {
32
- border-radius: $border-width * 4;
33
- padding: $block-spacing;
34
- border-width: $border-width;
35
- margin: 2 * $grid-unit-20;
36
- background-color: $button-fallback-bg;
37
- color: $white;
38
- }
39
-
40
- .clearLinkButton {
41
- color: $alert-red;
42
- }
43
-
44
- .placeholderTextColor {
45
- color: rgba($color: $white, $alpha: 0.43);
46
- }
47
-
48
- .placeholder {
49
- font-family: $default-regular-font;
50
- min-height: 22px;
51
- font-size: 16px;
52
- display: none;
53
- }
54
-
55
- .linkSettingsPanel {
56
- padding-left: 0;
57
- padding-right: 0;
58
- }
59
-
60
- .button75 {
61
- margin: $solid-border-space - $block-selected-border-width;
62
- }
63
-
64
- .button50 {
65
- margin: $solid-border-space * 2 - $block-selected-border-width * 2;
66
- }
67
-
68
- .button25 {
69
- margin: $block-edge-to-content * 2 + $block-selected-border-width;
70
- }
@@ -1,6 +0,0 @@
1
- .richText {
2
- background-color: transparent;
3
- padding-left: $grid-unit-20;
4
- padding-right: $grid-unit-20;
5
- margin: 10px $grid-unit-20;
6
- }
@@ -1,6 +0,0 @@
1
- .richText {
2
- margin: 10px $grid-unit-20;
3
- padding-left: 0;
4
- padding-right: 0;
5
- background-color: transparent;
6
- }