@wordpress/block-editor 12.25.0 → 12.26.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 (674) hide show
  1. package/CHANGELOG.md +9 -3
  2. package/README.md +6 -0
  3. package/build/components/block-actions/index.js +4 -2
  4. package/build/components/block-actions/index.js.map +1 -1
  5. package/build/components/block-alignment-control/ui.js +2 -2
  6. package/build/components/block-alignment-control/ui.js.map +1 -1
  7. package/build/components/block-card/index.js +2 -2
  8. package/build/components/block-card/index.js.map +1 -1
  9. package/build/components/block-compare/index.js +2 -2
  10. package/build/components/block-compare/index.js.map +1 -1
  11. package/build/components/block-edit/edit.js +2 -2
  12. package/build/components/block-edit/edit.js.map +1 -1
  13. package/build/components/block-icon/index.js +2 -2
  14. package/build/components/block-icon/index.js.map +1 -1
  15. package/build/components/block-inspector/index.js +1 -1
  16. package/build/components/block-inspector/index.js.map +1 -1
  17. package/build/components/block-list/block.js +4 -4
  18. package/build/components/block-list/block.js.map +1 -1
  19. package/build/components/block-list/block.native.js +2 -2
  20. package/build/components/block-list/block.native.js.map +1 -1
  21. package/build/components/block-list/index.js +2 -2
  22. package/build/components/block-list/index.js.map +1 -1
  23. package/build/components/block-list/use-block-props/index.js +5 -2
  24. package/build/components/block-list/use-block-props/index.js.map +1 -1
  25. package/build/components/block-list/use-block-props/use-scroll-into-view.js +44 -0
  26. package/build/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
  27. package/build/components/block-list-appender/index.js +2 -2
  28. package/build/components/block-list-appender/index.js.map +1 -1
  29. package/build/components/block-mover/button.js +2 -2
  30. package/build/components/block-mover/button.js.map +1 -1
  31. package/build/components/block-mover/index.js +2 -2
  32. package/build/components/block-mover/index.js.map +1 -1
  33. package/build/components/block-patterns-list/index.js +26 -5
  34. package/build/components/block-patterns-list/index.js.map +1 -1
  35. package/build/components/block-popover/cover.js +9 -6
  36. package/build/components/block-popover/cover.js.map +1 -1
  37. package/build/components/block-popover/inbetween.js +2 -2
  38. package/build/components/block-popover/inbetween.js.map +1 -1
  39. package/build/components/block-popover/index.js +22 -4
  40. package/build/components/block-popover/index.js.map +1 -1
  41. package/build/components/block-preview/index.js +2 -2
  42. package/build/components/block-preview/index.js.map +1 -1
  43. package/build/components/block-settings-menu/block-settings-dropdown.js +8 -5
  44. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  45. package/build/components/block-settings-menu-controls/index.js +10 -7
  46. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  47. package/build/components/block-styles/index.js +2 -2
  48. package/build/components/block-styles/index.js.map +1 -1
  49. package/build/components/block-toolbar/index.js +3 -3
  50. package/build/components/block-toolbar/index.js.map +1 -1
  51. package/build/components/block-tools/block-selection-button.js +2 -2
  52. package/build/components/block-tools/block-selection-button.js.map +1 -1
  53. package/build/components/block-tools/block-toolbar-breadcrumb.js +4 -4
  54. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  55. package/build/components/block-tools/block-toolbar-popover.js +2 -2
  56. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  57. package/build/components/block-tools/empty-block-inserter.js +2 -2
  58. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  59. package/build/components/block-tools/index.js +20 -1
  60. package/build/components/block-tools/index.js.map +1 -1
  61. package/build/components/block-tools/insertion-point.js +4 -4
  62. package/build/components/block-tools/insertion-point.js.map +1 -1
  63. package/build/components/block-tools/zoom-out-mode-inserters.js +66 -22
  64. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  65. package/build/components/block-variation-picker/index.js +2 -2
  66. package/build/components/block-variation-picker/index.js.map +1 -1
  67. package/build/components/button-block-appender/index.js +2 -2
  68. package/build/components/button-block-appender/index.js.map +1 -1
  69. package/build/components/child-layout-control/index.js +2 -2
  70. package/build/components/child-layout-control/index.js.map +1 -1
  71. package/build/components/colors-gradients/control.js +3 -3
  72. package/build/components/colors-gradients/control.js.map +1 -1
  73. package/build/components/colors-gradients/dropdown.js +2 -2
  74. package/build/components/colors-gradients/dropdown.js.map +1 -1
  75. package/build/components/colors-gradients/panel-color-gradient-settings.js +2 -2
  76. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  77. package/build/components/convert-to-group-buttons/index.js +6 -0
  78. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  79. package/build/components/default-block-appender/index.js +2 -2
  80. package/build/components/default-block-appender/index.js.map +1 -1
  81. package/build/components/dimensions-tool/aspect-ratio-tool.js +30 -36
  82. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  83. package/build/components/global-styles/background-panel.js +3 -3
  84. package/build/components/global-styles/background-panel.js.map +1 -1
  85. package/build/components/global-styles/color-panel.js +3 -3
  86. package/build/components/global-styles/color-panel.js.map +1 -1
  87. package/build/components/global-styles/dimensions-panel.js +4 -4
  88. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  89. package/build/components/global-styles/filters-panel.js +2 -2
  90. package/build/components/global-styles/filters-panel.js.map +1 -1
  91. package/build/components/global-styles/shadow-panel-components.js +4 -4
  92. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  93. package/build/components/global-styles/use-global-styles-output.js +1 -1
  94. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  95. package/build/components/grid-visualizer/grid-item-resizer.js +141 -24
  96. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  97. package/build/components/grid-visualizer/grid-visualizer.js +11 -5
  98. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  99. package/build/components/iframe/index.js +69 -30
  100. package/build/components/iframe/index.js.map +1 -1
  101. package/build/components/image-editor/aspect-ratio-dropdown.js +53 -36
  102. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  103. package/build/components/image-editor/cropper.js +2 -2
  104. package/build/components/image-editor/cropper.js.map +1 -1
  105. package/build/components/image-editor/index.js +1 -1
  106. package/build/components/image-editor/index.js.map +1 -1
  107. package/build/components/index.js +8 -0
  108. package/build/components/index.js.map +1 -1
  109. package/build/components/inner-blocks/button-block-appender.js +2 -2
  110. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  111. package/build/components/inner-blocks/index.js +22 -21
  112. package/build/components/inner-blocks/index.js.map +1 -1
  113. package/build/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  114. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  115. package/build/components/inserter/block-patterns-tab/index.js +9 -0
  116. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  117. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -1
  118. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  119. package/build/components/inserter/block-types-tab.js +5 -3
  120. package/build/components/inserter/block-types-tab.js.map +1 -1
  121. package/build/components/inserter/hooks/use-insertion-point.js +11 -2
  122. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  123. package/build/components/inserter/hooks/use-patterns-state.js +12 -5
  124. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  125. package/build/components/inserter/index.js +2 -2
  126. package/build/components/inserter/index.js.map +1 -1
  127. package/build/components/inserter/library.js +8 -2
  128. package/build/components/inserter/library.js.map +1 -1
  129. package/build/components/inserter/media-tab/media-preview.js +2 -2
  130. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  131. package/build/components/inserter/menu.js +72 -56
  132. package/build/components/inserter/menu.js.map +1 -1
  133. package/build/components/inserter/quick-inserter.js +2 -2
  134. package/build/components/inserter/quick-inserter.js.map +1 -1
  135. package/build/components/inserter/tabs.js +17 -5
  136. package/build/components/inserter/tabs.js.map +1 -1
  137. package/build/components/inserter-list-item/index.js +3 -3
  138. package/build/components/inserter-list-item/index.js.map +1 -1
  139. package/build/components/keyboard-shortcuts/index.js +9 -0
  140. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  141. package/build/components/link-control/index.js +2 -2
  142. package/build/components/link-control/index.js.map +1 -1
  143. package/build/components/link-control/link-preview.js +3 -3
  144. package/build/components/link-control/link-preview.js.map +1 -1
  145. package/build/components/link-control/search-results.js +2 -2
  146. package/build/components/link-control/search-results.js.map +1 -1
  147. package/build/components/list-view/block-contents.js +2 -2
  148. package/build/components/list-view/block-contents.js.map +1 -1
  149. package/build/components/list-view/block-select-button.js +11 -3
  150. package/build/components/list-view/block-select-button.js.map +1 -1
  151. package/build/components/list-view/block.js +35 -12
  152. package/build/components/list-view/block.js.map +1 -1
  153. package/build/components/list-view/drop-indicator.js +3 -3
  154. package/build/components/list-view/drop-indicator.js.map +1 -1
  155. package/build/components/list-view/index.js +2 -2
  156. package/build/components/list-view/index.js.map +1 -1
  157. package/build/components/list-view/leaf.js +2 -2
  158. package/build/components/list-view/leaf.js.map +1 -1
  159. package/build/components/media-placeholder/index.js +4 -4
  160. package/build/components/media-placeholder/index.js.map +1 -1
  161. package/build/components/media-replace-flow/index.js +2 -2
  162. package/build/components/media-replace-flow/index.js.map +1 -1
  163. package/build/components/plain-text/index.js +2 -2
  164. package/build/components/plain-text/index.js.map +1 -1
  165. package/build/components/provider/use-block-sync.js +18 -0
  166. package/build/components/provider/use-block-sync.js.map +1 -1
  167. package/build/components/responsive-block-control/index.js +2 -2
  168. package/build/components/responsive-block-control/index.js.map +1 -1
  169. package/build/components/rich-text/event-listeners/enter.js +33 -42
  170. package/build/components/rich-text/event-listeners/enter.js.map +1 -1
  171. package/build/components/rich-text/event-listeners/paste-handler.js +22 -42
  172. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  173. package/build/components/rich-text/format-toolbar/index.js +2 -2
  174. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  175. package/build/components/rich-text/index.js +9 -2
  176. package/build/components/rich-text/index.js.map +1 -1
  177. package/build/components/rich-text/index.native.js +2 -2
  178. package/build/components/rich-text/index.native.js.map +1 -1
  179. package/build/components/rich-text/multiline.js +30 -2
  180. package/build/components/rich-text/multiline.js.map +1 -1
  181. package/build/components/segmented-text-control/index.js +2 -2
  182. package/build/components/segmented-text-control/index.js.map +1 -1
  183. package/build/components/text-alignment-control/index.js +2 -2
  184. package/build/components/text-alignment-control/index.js.map +1 -1
  185. package/build/components/text-decoration-control/index.js +2 -2
  186. package/build/components/text-decoration-control/index.js.map +1 -1
  187. package/build/components/text-transform-control/index.js +2 -2
  188. package/build/components/text-transform-control/index.js.map +1 -1
  189. package/build/components/url-input/index.js +4 -4
  190. package/build/components/url-input/index.js.map +1 -1
  191. package/build/components/url-popover/link-editor.js +2 -2
  192. package/build/components/url-popover/link-editor.js.map +1 -1
  193. package/build/components/url-popover/link-viewer-url.js +2 -2
  194. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  195. package/build/components/url-popover/link-viewer.js +2 -2
  196. package/build/components/url-popover/link-viewer.js.map +1 -1
  197. package/build/components/warning/index.js +2 -2
  198. package/build/components/warning/index.js.map +1 -1
  199. package/build/components/writing-flow/index.js +2 -2
  200. package/build/components/writing-flow/index.js.map +1 -1
  201. package/build/components/writing-flow/use-clipboard-handler.js +77 -30
  202. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  203. package/build/components/writing-flow/use-input.js +44 -2
  204. package/build/components/writing-flow/use-input.js.map +1 -1
  205. package/build/components/writing-flow/use-tab-nav.js +6 -1
  206. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  207. package/build/components/writing-mode-control/index.js +2 -2
  208. package/build/components/writing-mode-control/index.js.map +1 -1
  209. package/build/hooks/align.js +2 -2
  210. package/build/hooks/align.js.map +1 -1
  211. package/build/hooks/background.js +1 -1
  212. package/build/hooks/background.js.map +1 -1
  213. package/build/hooks/border.js +3 -3
  214. package/build/hooks/border.js.map +1 -1
  215. package/build/hooks/color.js +3 -3
  216. package/build/hooks/color.js.map +1 -1
  217. package/build/hooks/content-lock-ui.js +5 -28
  218. package/build/hooks/content-lock-ui.js.map +1 -1
  219. package/build/hooks/custom-class-name.js +2 -2
  220. package/build/hooks/custom-class-name.js.map +1 -1
  221. package/build/hooks/custom-class-name.native.js +2 -2
  222. package/build/hooks/custom-class-name.native.js.map +1 -1
  223. package/build/hooks/dimensions.js +2 -2
  224. package/build/hooks/dimensions.js.map +1 -1
  225. package/build/hooks/layout-child.js +16 -8
  226. package/build/hooks/layout-child.js.map +1 -1
  227. package/build/hooks/layout.js +2 -2
  228. package/build/hooks/layout.js.map +1 -1
  229. package/build/hooks/position.js +2 -2
  230. package/build/hooks/position.js.map +1 -1
  231. package/build/hooks/text-align.js +3 -3
  232. package/build/hooks/text-align.js.map +1 -1
  233. package/build/hooks/use-bindings-attributes.js +39 -13
  234. package/build/hooks/use-bindings-attributes.js.map +1 -1
  235. package/build/hooks/use-color-props.js +2 -2
  236. package/build/hooks/use-color-props.js.map +1 -1
  237. package/build/hooks/use-typography-props.js +2 -2
  238. package/build/hooks/use-typography-props.js.map +1 -1
  239. package/build/hooks/utils.js +2 -2
  240. package/build/hooks/utils.js.map +1 -1
  241. package/build/layouts/grid.js +7 -6
  242. package/build/layouts/grid.js.map +1 -1
  243. package/build/private-apis.js +4 -1
  244. package/build/private-apis.js.map +1 -1
  245. package/build/store/actions.js +134 -40
  246. package/build/store/actions.js.map +1 -1
  247. package/build/store/private-actions.js +26 -1
  248. package/build/store/private-actions.js.map +1 -1
  249. package/build/store/private-keys.js +2 -1
  250. package/build/store/private-keys.js.map +1 -1
  251. package/build/store/private-selectors.js +6 -0
  252. package/build/store/private-selectors.js.map +1 -1
  253. package/build/store/selectors.js +4 -1
  254. package/build/store/selectors.js.map +1 -1
  255. package/build/utils/selection.js +8 -0
  256. package/build/utils/selection.js.map +1 -1
  257. package/build/utils/transform-styles/index.js +12 -7
  258. package/build/utils/transform-styles/index.js.map +1 -1
  259. package/build-module/components/block-actions/index.js +4 -2
  260. package/build-module/components/block-actions/index.js.map +1 -1
  261. package/build-module/components/block-alignment-control/ui.js +2 -2
  262. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  263. package/build-module/components/block-card/index.js +2 -2
  264. package/build-module/components/block-card/index.js.map +1 -1
  265. package/build-module/components/block-compare/index.js +2 -2
  266. package/build-module/components/block-compare/index.js.map +1 -1
  267. package/build-module/components/block-edit/edit.js +2 -2
  268. package/build-module/components/block-edit/edit.js.map +1 -1
  269. package/build-module/components/block-icon/index.js +2 -2
  270. package/build-module/components/block-icon/index.js.map +1 -1
  271. package/build-module/components/block-inspector/index.js +1 -1
  272. package/build-module/components/block-inspector/index.js.map +1 -1
  273. package/build-module/components/block-list/block.js +4 -4
  274. package/build-module/components/block-list/block.js.map +1 -1
  275. package/build-module/components/block-list/block.native.js +2 -2
  276. package/build-module/components/block-list/block.native.js.map +1 -1
  277. package/build-module/components/block-list/index.js +2 -2
  278. package/build-module/components/block-list/index.js.map +1 -1
  279. package/build-module/components/block-list/use-block-props/index.js +5 -2
  280. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  281. package/build-module/components/block-list/use-block-props/use-scroll-into-view.js +37 -0
  282. package/build-module/components/block-list/use-block-props/use-scroll-into-view.js.map +1 -0
  283. package/build-module/components/block-list-appender/index.js +2 -2
  284. package/build-module/components/block-list-appender/index.js.map +1 -1
  285. package/build-module/components/block-mover/button.js +2 -2
  286. package/build-module/components/block-mover/button.js.map +1 -1
  287. package/build-module/components/block-mover/index.js +2 -2
  288. package/build-module/components/block-mover/index.js.map +1 -1
  289. package/build-module/components/block-patterns-list/index.js +27 -6
  290. package/build-module/components/block-patterns-list/index.js.map +1 -1
  291. package/build-module/components/block-popover/cover.js +9 -5
  292. package/build-module/components/block-popover/cover.js.map +1 -1
  293. package/build-module/components/block-popover/inbetween.js +2 -2
  294. package/build-module/components/block-popover/inbetween.js.map +1 -1
  295. package/build-module/components/block-popover/index.js +21 -3
  296. package/build-module/components/block-popover/index.js.map +1 -1
  297. package/build-module/components/block-preview/index.js +2 -2
  298. package/build-module/components/block-preview/index.js.map +1 -1
  299. package/build-module/components/block-settings-menu/block-settings-dropdown.js +8 -5
  300. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  301. package/build-module/components/block-settings-menu-controls/index.js +10 -7
  302. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  303. package/build-module/components/block-styles/index.js +2 -2
  304. package/build-module/components/block-styles/index.js.map +1 -1
  305. package/build-module/components/block-toolbar/index.js +3 -3
  306. package/build-module/components/block-toolbar/index.js.map +1 -1
  307. package/build-module/components/block-tools/block-selection-button.js +2 -2
  308. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  309. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +4 -4
  310. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  311. package/build-module/components/block-tools/block-toolbar-popover.js +2 -2
  312. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  313. package/build-module/components/block-tools/empty-block-inserter.js +2 -2
  314. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  315. package/build-module/components/block-tools/index.js +20 -1
  316. package/build-module/components/block-tools/index.js.map +1 -1
  317. package/build-module/components/block-tools/insertion-point.js +4 -4
  318. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  319. package/build-module/components/block-tools/zoom-out-mode-inserters.js +67 -23
  320. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  321. package/build-module/components/block-variation-picker/index.js +2 -2
  322. package/build-module/components/block-variation-picker/index.js.map +1 -1
  323. package/build-module/components/button-block-appender/index.js +2 -2
  324. package/build-module/components/button-block-appender/index.js.map +1 -1
  325. package/build-module/components/child-layout-control/index.js +2 -2
  326. package/build-module/components/child-layout-control/index.js.map +1 -1
  327. package/build-module/components/colors-gradients/control.js +3 -3
  328. package/build-module/components/colors-gradients/control.js.map +1 -1
  329. package/build-module/components/colors-gradients/dropdown.js +2 -2
  330. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  331. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +2 -2
  332. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  333. package/build-module/components/convert-to-group-buttons/index.js +7 -1
  334. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  335. package/build-module/components/default-block-appender/index.js +2 -2
  336. package/build-module/components/default-block-appender/index.js.map +1 -1
  337. package/build-module/components/dimensions-tool/aspect-ratio-tool.js +30 -36
  338. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  339. package/build-module/components/global-styles/background-panel.js +3 -3
  340. package/build-module/components/global-styles/background-panel.js.map +1 -1
  341. package/build-module/components/global-styles/color-panel.js +3 -3
  342. package/build-module/components/global-styles/color-panel.js.map +1 -1
  343. package/build-module/components/global-styles/dimensions-panel.js +4 -4
  344. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  345. package/build-module/components/global-styles/filters-panel.js +2 -2
  346. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  347. package/build-module/components/global-styles/shadow-panel-components.js +4 -4
  348. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  349. package/build-module/components/global-styles/use-global-styles-output.js +1 -1
  350. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  351. package/build-module/components/grid-visualizer/grid-item-resizer.js +141 -24
  352. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  353. package/build-module/components/grid-visualizer/grid-visualizer.js +12 -6
  354. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  355. package/build-module/components/iframe/index.js +70 -31
  356. package/build-module/components/iframe/index.js.map +1 -1
  357. package/build-module/components/image-editor/aspect-ratio-dropdown.js +52 -36
  358. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  359. package/build-module/components/image-editor/cropper.js +2 -2
  360. package/build-module/components/image-editor/cropper.js.map +1 -1
  361. package/build-module/components/image-editor/index.js +1 -1
  362. package/build-module/components/image-editor/index.js.map +1 -1
  363. package/build-module/components/index.js +1 -0
  364. package/build-module/components/index.js.map +1 -1
  365. package/build-module/components/inner-blocks/button-block-appender.js +2 -2
  366. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  367. package/build-module/components/inner-blocks/index.js +22 -21
  368. package/build-module/components/inner-blocks/index.js.map +1 -1
  369. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +1 -1
  370. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  371. package/build-module/components/inserter/block-patterns-tab/index.js +10 -1
  372. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  373. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -1
  374. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  375. package/build-module/components/inserter/block-types-tab.js +6 -4
  376. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  377. package/build-module/components/inserter/hooks/use-insertion-point.js +11 -2
  378. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  379. package/build-module/components/inserter/hooks/use-patterns-state.js +12 -5
  380. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  381. package/build-module/components/inserter/index.js +2 -2
  382. package/build-module/components/inserter/index.js.map +1 -1
  383. package/build-module/components/inserter/library.js +8 -2
  384. package/build-module/components/inserter/library.js.map +1 -1
  385. package/build-module/components/inserter/media-tab/media-preview.js +2 -2
  386. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  387. package/build-module/components/inserter/menu.js +72 -56
  388. package/build-module/components/inserter/menu.js.map +1 -1
  389. package/build-module/components/inserter/quick-inserter.js +2 -2
  390. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  391. package/build-module/components/inserter/tabs.js +18 -6
  392. package/build-module/components/inserter/tabs.js.map +1 -1
  393. package/build-module/components/inserter-list-item/index.js +3 -3
  394. package/build-module/components/inserter-list-item/index.js.map +1 -1
  395. package/build-module/components/keyboard-shortcuts/index.js +9 -0
  396. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  397. package/build-module/components/link-control/index.js +2 -2
  398. package/build-module/components/link-control/index.js.map +1 -1
  399. package/build-module/components/link-control/link-preview.js +3 -3
  400. package/build-module/components/link-control/link-preview.js.map +1 -1
  401. package/build-module/components/link-control/search-results.js +2 -2
  402. package/build-module/components/link-control/search-results.js.map +1 -1
  403. package/build-module/components/list-view/block-contents.js +2 -2
  404. package/build-module/components/list-view/block-contents.js.map +1 -1
  405. package/build-module/components/list-view/block-select-button.js +11 -3
  406. package/build-module/components/list-view/block-select-button.js.map +1 -1
  407. package/build-module/components/list-view/block.js +36 -13
  408. package/build-module/components/list-view/block.js.map +1 -1
  409. package/build-module/components/list-view/drop-indicator.js +3 -3
  410. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  411. package/build-module/components/list-view/index.js +2 -2
  412. package/build-module/components/list-view/index.js.map +1 -1
  413. package/build-module/components/list-view/leaf.js +2 -2
  414. package/build-module/components/list-view/leaf.js.map +1 -1
  415. package/build-module/components/media-placeholder/index.js +4 -4
  416. package/build-module/components/media-placeholder/index.js.map +1 -1
  417. package/build-module/components/media-replace-flow/index.js +2 -2
  418. package/build-module/components/media-replace-flow/index.js.map +1 -1
  419. package/build-module/components/plain-text/index.js +2 -2
  420. package/build-module/components/plain-text/index.js.map +1 -1
  421. package/build-module/components/provider/use-block-sync.js +19 -1
  422. package/build-module/components/provider/use-block-sync.js.map +1 -1
  423. package/build-module/components/responsive-block-control/index.js +2 -2
  424. package/build-module/components/responsive-block-control/index.js.map +1 -1
  425. package/build-module/components/rich-text/event-listeners/enter.js +33 -43
  426. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
  427. package/build-module/components/rich-text/event-listeners/paste-handler.js +23 -43
  428. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  429. package/build-module/components/rich-text/format-toolbar/index.js +2 -2
  430. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  431. package/build-module/components/rich-text/index.js +9 -2
  432. package/build-module/components/rich-text/index.js.map +1 -1
  433. package/build-module/components/rich-text/index.native.js +2 -2
  434. package/build-module/components/rich-text/index.native.js.map +1 -1
  435. package/build-module/components/rich-text/multiline.js +31 -3
  436. package/build-module/components/rich-text/multiline.js.map +1 -1
  437. package/build-module/components/segmented-text-control/index.js +2 -2
  438. package/build-module/components/segmented-text-control/index.js.map +1 -1
  439. package/build-module/components/text-alignment-control/index.js +2 -2
  440. package/build-module/components/text-alignment-control/index.js.map +1 -1
  441. package/build-module/components/text-decoration-control/index.js +2 -2
  442. package/build-module/components/text-decoration-control/index.js.map +1 -1
  443. package/build-module/components/text-transform-control/index.js +2 -2
  444. package/build-module/components/text-transform-control/index.js.map +1 -1
  445. package/build-module/components/url-input/index.js +4 -4
  446. package/build-module/components/url-input/index.js.map +1 -1
  447. package/build-module/components/url-popover/link-editor.js +2 -2
  448. package/build-module/components/url-popover/link-editor.js.map +1 -1
  449. package/build-module/components/url-popover/link-viewer-url.js +2 -2
  450. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  451. package/build-module/components/url-popover/link-viewer.js +2 -2
  452. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  453. package/build-module/components/warning/index.js +2 -2
  454. package/build-module/components/warning/index.js.map +1 -1
  455. package/build-module/components/writing-flow/index.js +2 -2
  456. package/build-module/components/writing-flow/index.js.map +1 -1
  457. package/build-module/components/writing-flow/use-clipboard-handler.js +78 -31
  458. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  459. package/build-module/components/writing-flow/use-input.js +45 -3
  460. package/build-module/components/writing-flow/use-input.js.map +1 -1
  461. package/build-module/components/writing-flow/use-tab-nav.js +6 -1
  462. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  463. package/build-module/components/writing-mode-control/index.js +2 -2
  464. package/build-module/components/writing-mode-control/index.js.map +1 -1
  465. package/build-module/hooks/align.js +2 -2
  466. package/build-module/hooks/align.js.map +1 -1
  467. package/build-module/hooks/background.js +1 -1
  468. package/build-module/hooks/background.js.map +1 -1
  469. package/build-module/hooks/border.js +3 -3
  470. package/build-module/hooks/border.js.map +1 -1
  471. package/build-module/hooks/color.js +3 -3
  472. package/build-module/hooks/color.js.map +1 -1
  473. package/build-module/hooks/content-lock-ui.js +5 -28
  474. package/build-module/hooks/content-lock-ui.js.map +1 -1
  475. package/build-module/hooks/custom-class-name.js +2 -2
  476. package/build-module/hooks/custom-class-name.js.map +1 -1
  477. package/build-module/hooks/custom-class-name.native.js +2 -2
  478. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  479. package/build-module/hooks/dimensions.js +2 -2
  480. package/build-module/hooks/dimensions.js.map +1 -1
  481. package/build-module/hooks/layout-child.js +16 -8
  482. package/build-module/hooks/layout-child.js.map +1 -1
  483. package/build-module/hooks/layout.js +2 -2
  484. package/build-module/hooks/layout.js.map +1 -1
  485. package/build-module/hooks/position.js +2 -2
  486. package/build-module/hooks/position.js.map +1 -1
  487. package/build-module/hooks/text-align.js +3 -3
  488. package/build-module/hooks/text-align.js.map +1 -1
  489. package/build-module/hooks/use-bindings-attributes.js +39 -13
  490. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  491. package/build-module/hooks/use-color-props.js +2 -2
  492. package/build-module/hooks/use-color-props.js.map +1 -1
  493. package/build-module/hooks/use-typography-props.js +2 -2
  494. package/build-module/hooks/use-typography-props.js.map +1 -1
  495. package/build-module/hooks/utils.js +2 -2
  496. package/build-module/hooks/utils.js.map +1 -1
  497. package/build-module/layouts/grid.js +7 -6
  498. package/build-module/layouts/grid.js.map +1 -1
  499. package/build-module/private-apis.js +5 -2
  500. package/build-module/private-apis.js.map +1 -1
  501. package/build-module/store/actions.js +136 -42
  502. package/build-module/store/actions.js.map +1 -1
  503. package/build-module/store/private-actions.js +24 -0
  504. package/build-module/store/private-actions.js.map +1 -1
  505. package/build-module/store/private-keys.js +1 -0
  506. package/build-module/store/private-keys.js.map +1 -1
  507. package/build-module/store/private-selectors.js +5 -0
  508. package/build-module/store/private-selectors.js.map +1 -1
  509. package/build-module/store/selectors.js +4 -1
  510. package/build-module/store/selectors.js.map +1 -1
  511. package/build-module/utils/selection.js +7 -0
  512. package/build-module/utils/selection.js.map +1 -1
  513. package/build-module/utils/transform-styles/index.js +12 -7
  514. package/build-module/utils/transform-styles/index.js.map +1 -1
  515. package/build-style/content-rtl.css +89 -96
  516. package/build-style/content.css +89 -96
  517. package/build-style/style-rtl.css +14 -4
  518. package/build-style/style.css +14 -4
  519. package/build-types/components/block-context/index.d.ts +1 -1
  520. package/build-types/components/block-context/index.d.ts.map +1 -1
  521. package/package.json +32 -32
  522. package/src/components/block-actions/index.js +5 -1
  523. package/src/components/block-alignment-control/ui.js +2 -2
  524. package/src/components/block-card/index.js +2 -2
  525. package/src/components/block-compare/index.js +2 -2
  526. package/src/components/block-content-overlay/content.scss +4 -37
  527. package/src/components/block-draggable/test/helpers.native.js +8 -8
  528. package/src/components/block-edit/edit.js +2 -2
  529. package/src/components/block-icon/index.js +2 -2
  530. package/src/components/block-inspector/index.js +2 -1
  531. package/src/components/block-list/block.js +4 -4
  532. package/src/components/block-list/block.native.js +2 -2
  533. package/src/components/block-list/content.scss +46 -73
  534. package/src/components/block-list/index.js +2 -2
  535. package/src/components/block-list/use-block-props/index.js +4 -2
  536. package/src/components/block-list/use-block-props/use-scroll-into-view.js +38 -0
  537. package/src/components/block-list-appender/index.js +2 -2
  538. package/src/components/block-mover/button.js +2 -2
  539. package/src/components/block-mover/index.js +2 -2
  540. package/src/components/block-patterns-list/index.js +29 -4
  541. package/src/components/block-popover/README.md +1 -1
  542. package/src/components/block-popover/cover.js +22 -7
  543. package/src/components/block-popover/inbetween.js +2 -2
  544. package/src/components/block-popover/index.js +24 -6
  545. package/src/components/block-preview/index.js +2 -2
  546. package/src/components/block-settings-menu/block-settings-dropdown.js +14 -6
  547. package/src/components/block-settings-menu-controls/index.js +25 -16
  548. package/src/components/block-styles/index.js +2 -2
  549. package/src/components/block-toolbar/index.js +3 -3
  550. package/src/components/block-tools/block-selection-button.js +2 -2
  551. package/src/components/block-tools/block-toolbar-breadcrumb.js +5 -5
  552. package/src/components/block-tools/block-toolbar-popover.js +4 -7
  553. package/src/components/block-tools/empty-block-inserter.js +2 -2
  554. package/src/components/block-tools/index.js +24 -3
  555. package/src/components/block-tools/insertion-point.js +4 -4
  556. package/src/components/block-tools/style.scss +8 -0
  557. package/src/components/block-tools/zoom-out-mode-inserters.js +73 -21
  558. package/src/components/block-variation-picker/index.js +2 -2
  559. package/src/components/button-block-appender/index.js +2 -2
  560. package/src/components/child-layout-control/index.js +14 -2
  561. package/src/components/colors-gradients/control.js +3 -3
  562. package/src/components/colors-gradients/dropdown.js +2 -2
  563. package/src/components/colors-gradients/panel-color-gradient-settings.js +2 -2
  564. package/src/components/colors-gradients/test/control.js +3 -3
  565. package/src/components/convert-to-group-buttons/index.js +10 -1
  566. package/src/components/default-block-appender/index.js +2 -2
  567. package/src/components/dimensions-tool/aspect-ratio-tool.js +40 -67
  568. package/src/components/dimensions-tool/test/index.js +10 -0
  569. package/src/components/editable-text/README.md +0 -4
  570. package/src/components/global-styles/background-panel.js +3 -3
  571. package/src/components/global-styles/color-panel.js +3 -3
  572. package/src/components/global-styles/dimensions-panel.js +4 -4
  573. package/src/components/global-styles/filters-panel.js +2 -2
  574. package/src/components/global-styles/shadow-panel-components.js +6 -9
  575. package/src/components/global-styles/test/get-global-styles-changes.js +0 -2
  576. package/src/components/global-styles/test/use-global-styles-output.js +5 -5
  577. package/src/components/global-styles/use-global-styles-output.js +1 -1
  578. package/src/components/grid-visualizer/grid-item-resizer.js +169 -40
  579. package/src/components/grid-visualizer/grid-visualizer.js +19 -6
  580. package/src/components/iframe/content.scss +63 -0
  581. package/src/components/iframe/index.js +119 -39
  582. package/src/components/image-editor/aspect-ratio-dropdown.js +91 -59
  583. package/src/components/image-editor/cropper.js +2 -2
  584. package/src/components/image-editor/index.js +1 -1
  585. package/src/components/image-editor/test/index.js +22 -0
  586. package/src/components/index.js +1 -0
  587. package/src/components/inner-blocks/button-block-appender.js +2 -2
  588. package/src/components/inner-blocks/index.js +19 -17
  589. package/src/components/inserter/block-patterns-explorer/pattern-list.js +2 -1
  590. package/src/components/inserter/block-patterns-tab/index.js +17 -1
  591. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -1
  592. package/src/components/inserter/block-types-tab.js +7 -9
  593. package/src/components/inserter/hooks/use-insertion-point.js +15 -1
  594. package/src/components/inserter/hooks/use-patterns-state.js +18 -5
  595. package/src/components/inserter/index.js +4 -5
  596. package/src/components/inserter/library.js +6 -0
  597. package/src/components/inserter/media-tab/media-preview.js +2 -2
  598. package/src/components/inserter/menu.js +113 -107
  599. package/src/components/inserter/quick-inserter.js +2 -2
  600. package/src/components/inserter/style.scss +6 -8
  601. package/src/components/inserter/tabs.js +29 -15
  602. package/src/components/inserter-list-item/index.js +3 -3
  603. package/src/components/keyboard-shortcuts/index.js +12 -0
  604. package/src/components/line-height-control/test/index.js +16 -14
  605. package/src/components/link-control/index.js +2 -2
  606. package/src/components/link-control/link-preview.js +3 -3
  607. package/src/components/link-control/search-results.js +2 -2
  608. package/src/components/list-view/block-contents.js +2 -2
  609. package/src/components/list-view/block-select-button.js +14 -3
  610. package/src/components/list-view/block.js +54 -30
  611. package/src/components/list-view/drop-indicator.js +3 -3
  612. package/src/components/list-view/index.js +2 -2
  613. package/src/components/list-view/leaf.js +2 -5
  614. package/src/components/media-placeholder/index.js +4 -4
  615. package/src/components/media-replace-flow/index.js +2 -2
  616. package/src/components/plain-text/index.js +2 -2
  617. package/src/components/provider/use-block-sync.js +27 -1
  618. package/src/components/responsive-block-control/index.js +2 -2
  619. package/src/components/rich-text/README.md +0 -8
  620. package/src/components/rich-text/event-listeners/enter.js +28 -48
  621. package/src/components/rich-text/event-listeners/paste-handler.js +21 -58
  622. package/src/components/rich-text/format-toolbar/index.js +2 -2
  623. package/src/components/rich-text/index.js +10 -3
  624. package/src/components/rich-text/index.native.js +2 -2
  625. package/src/components/rich-text/multiline.js +31 -3
  626. package/src/components/segmented-text-control/index.js +2 -2
  627. package/src/components/text-alignment-control/index.js +2 -2
  628. package/src/components/text-decoration-control/index.js +2 -2
  629. package/src/components/text-transform-control/index.js +2 -2
  630. package/src/components/url-input/index.js +4 -4
  631. package/src/components/url-popover/link-editor.js +2 -2
  632. package/src/components/url-popover/link-viewer-url.js +2 -2
  633. package/src/components/url-popover/link-viewer.js +2 -2
  634. package/src/components/warning/index.js +2 -2
  635. package/src/components/writing-flow/index.js +2 -2
  636. package/src/components/writing-flow/use-clipboard-handler.js +107 -47
  637. package/src/components/writing-flow/use-input.js +75 -1
  638. package/src/components/writing-flow/use-tab-nav.js +10 -1
  639. package/src/components/writing-mode-control/index.js +2 -5
  640. package/src/content.scss +1 -0
  641. package/src/hooks/align.js +2 -2
  642. package/src/hooks/background.js +1 -1
  643. package/src/hooks/border.js +3 -3
  644. package/src/hooks/color.js +12 -19
  645. package/src/hooks/color.scss +1 -0
  646. package/src/hooks/content-lock-ui.js +16 -33
  647. package/src/hooks/custom-class-name.js +2 -2
  648. package/src/hooks/custom-class-name.native.js +2 -2
  649. package/src/hooks/dimensions.js +2 -2
  650. package/src/hooks/layout-child.js +34 -20
  651. package/src/hooks/layout.js +2 -2
  652. package/src/hooks/position.js +2 -2
  653. package/src/hooks/text-align.js +3 -3
  654. package/src/hooks/use-bindings-attributes.js +48 -16
  655. package/src/hooks/use-color-props.js +2 -2
  656. package/src/hooks/use-typography-props.js +2 -2
  657. package/src/hooks/utils.js +2 -2
  658. package/src/layouts/grid.js +3 -7
  659. package/src/private-apis.js +4 -0
  660. package/src/store/actions.js +225 -70
  661. package/src/store/private-actions.js +24 -0
  662. package/src/store/private-keys.js +1 -0
  663. package/src/store/private-selectors.js +15 -0
  664. package/src/store/selectors.js +4 -2
  665. package/src/utils/selection.js +8 -0
  666. package/src/utils/test/__snapshots__/transform-styles.js.snap +6 -0
  667. package/src/utils/test/transform-styles.js +14 -0
  668. package/src/utils/transform-styles/index.js +12 -9
  669. package/tsconfig.tsbuildinfo +1 -1
  670. package/build/components/rich-text/split-value.js +0 -81
  671. package/build/components/rich-text/split-value.js.map +0 -1
  672. package/build-module/components/rich-text/split-value.js +0 -75
  673. package/build-module/components/rich-text/split-value.js.map +0 -1
  674. package/src/components/rich-text/split-value.js +0 -64
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -60,7 +60,7 @@ export default function DefaultBlockAppender({
60
60
  };
61
61
  return createElement("div", {
62
62
  "data-root-client-id": rootClientId || '',
63
- className: classnames('block-editor-default-block-appender', {
63
+ className: clsx('block-editor-default-block-appender', {
64
64
  'has-visible-prompt': showPrompt
65
65
  })
66
66
  }, createElement("p", {
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__","decodeEntities","useSelect","useDispatch","ENTER","SPACE","Inserter","store","blockEditorStore","ZWNBSP","DefaultBlockAppender","rootClientId","showPrompt","isLocked","placeholder","select","getBlockCount","getSettings","getTemplateLock","isEmpty","bodyPlaceholder","insertDefaultBlock","startTyping","value","onAppend","undefined","createElement","className","tabIndex","role","onKeyDown","event","keyCode","onClick","onFocus","position","isAppender","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/default-block-appender/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Zero width non-breaking space, used as padding for the paragraph when it is\n * empty.\n */\nexport const ZWNBSP = '\\ufeff';\n\nexport default function DefaultBlockAppender( { rootClientId } ) {\n\tconst { showPrompt, isLocked, placeholder } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockCount, getSettings, getTemplateLock } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst isEmpty = ! getBlockCount( rootClientId );\n\t\t\tconst { bodyPlaceholder } = getSettings();\n\n\t\t\treturn {\n\t\t\t\tshowPrompt: isEmpty,\n\t\t\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\t\t\tplaceholder: bodyPlaceholder,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\tconst { insertDefaultBlock, startTyping } = useDispatch( blockEditorStore );\n\n\tif ( isLocked ) {\n\t\treturn null;\n\t}\n\n\tconst value =\n\t\tdecodeEntities( placeholder ) || __( 'Type / to choose a block' );\n\n\tconst onAppend = () => {\n\t\tinsertDefaultBlock( undefined, rootClientId );\n\t\tstartTyping();\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tdata-root-client-id={ rootClientId || '' }\n\t\t\tclassName={ classnames( 'block-editor-default-block-appender', {\n\t\t\t\t'has-visible-prompt': showPrompt,\n\t\t\t} ) }\n\t\t>\n\t\t\t<p\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\t// We want this element to be styled as a paragraph by themes.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\t\trole=\"button\"\n\t\t\t\taria-label={ __( 'Add default block' ) }\n\t\t\t\t// A wrapping container for this one already has the wp-block className.\n\t\t\t\tclassName=\"block-editor-default-block-appender__content\"\n\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\tif ( ENTER === event.keyCode || SPACE === event.keyCode ) {\n\t\t\t\t\t\tonAppend();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonClick={ () => onAppend() }\n\t\t\t\tonFocus={ () => {\n\t\t\t\t\tif ( showPrompt ) {\n\t\t\t\t\t\tonAppend();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ showPrompt ? value : ZWNBSP }\n\t\t\t</p>\n\t\t\t<Inserter\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\tposition=\"bottom right\"\n\t\t\t\tisAppender\n\t\t\t\t__experimentalIsQuick\n\t\t\t/>\n\t\t</div>\n\t);\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C7CW,WAAW,CAAC,CAAC;EACd,CAAC;EAED,OACCI,aAAA;IACC,uBAAsBf,YAAY,IAAI,EAAI;IAC1CgB,SAAS,EAAG5B,UAAU,CAAE,qCAAqC,EAAE;MAC9D,oBAAoB,EAAEa;IACvB,CAAE;EAAG,GAELc,aAAA;IACCE,QAAQ,EAAC;IACT;IACA;IAAA;IACAC,IAAI,EAAC,QAAQ;IACb,cAAa7B,EAAE,CAAE,mBAAoB;IACrC;IAAA;IACA2B,SAAS,EAAC,8CAA8C;IACxDG,SAAS,EAAKC,KAAK,IAAM;MACxB,IAAK3B,KAAK,KAAK2B,KAAK,CAACC,OAAO,IAAI3B,KAAK,KAAK0B,KAAK,CAACC,OAAO,EAAG;QACzDR,QAAQ,CAAC,CAAC;MACX;IACD,CAAG;IACHS,OAAO,EAAGA,CAAA,KAAMT,QAAQ,CAAC,CAAG;IAC5BU,OAAO,EAAGA,CAAA,KAAM;MACf,IAAKtB,UAAU,EAAG;QACjBY,QAAQ,CAAC,CAAC;MACX;IACD;EAAG,GAEDZ,UAAU,GAAGW,KAAK,GAAGd,MACrB,CAAC,EACJiB,aAAA,CAACpB,QAAQ;IACRK,YAAY,EAAGA,YAAc;IAC7BwB,QAAQ,EAAC,cAAc;IACvBC,UAAU;IACVC,qBAAqB;EAAA,CACrB,CACG,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","decodeEntities","useSelect","useDispatch","ENTER","SPACE","Inserter","store","blockEditorStore","ZWNBSP","DefaultBlockAppender","rootClientId","showPrompt","isLocked","placeholder","select","getBlockCount","getSettings","getTemplateLock","isEmpty","bodyPlaceholder","insertDefaultBlock","startTyping","value","onAppend","undefined","createElement","className","tabIndex","role","onKeyDown","event","keyCode","onClick","onFocus","position","isAppender","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/default-block-appender/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Zero width non-breaking space, used as padding for the paragraph when it is\n * empty.\n */\nexport const ZWNBSP = '\\ufeff';\n\nexport default function DefaultBlockAppender( { rootClientId } ) {\n\tconst { showPrompt, isLocked, placeholder } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockCount, getSettings, getTemplateLock } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst isEmpty = ! getBlockCount( rootClientId );\n\t\t\tconst { bodyPlaceholder } = getSettings();\n\n\t\t\treturn {\n\t\t\t\tshowPrompt: isEmpty,\n\t\t\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\t\t\tplaceholder: bodyPlaceholder,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\tconst { insertDefaultBlock, startTyping } = useDispatch( blockEditorStore );\n\n\tif ( isLocked ) {\n\t\treturn null;\n\t}\n\n\tconst value =\n\t\tdecodeEntities( placeholder ) || __( 'Type / to choose a block' );\n\n\tconst onAppend = () => {\n\t\tinsertDefaultBlock( undefined, rootClientId );\n\t\tstartTyping();\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tdata-root-client-id={ rootClientId || '' }\n\t\t\tclassName={ clsx( 'block-editor-default-block-appender', {\n\t\t\t\t'has-visible-prompt': showPrompt,\n\t\t\t} ) }\n\t\t>\n\t\t\t<p\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\t// We want this element to be styled as a paragraph by themes.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\t\trole=\"button\"\n\t\t\t\taria-label={ __( 'Add default block' ) }\n\t\t\t\t// A wrapping container for this one already has the wp-block className.\n\t\t\t\tclassName=\"block-editor-default-block-appender__content\"\n\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\tif ( ENTER === event.keyCode || SPACE === event.keyCode ) {\n\t\t\t\t\t\tonAppend();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonClick={ () => onAppend() }\n\t\t\t\tonFocus={ () => {\n\t\t\t\t\tif ( showPrompt ) {\n\t\t\t\t\t\tonAppend();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ showPrompt ? value : ZWNBSP }\n\t\t\t</p>\n\t\t\t<Inserter\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\tposition=\"bottom right\"\n\t\t\t\tisAppender\n\t\t\t\t__experimentalIsQuick\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,EAAEC,KAAK,QAAQ,qBAAqB;;AAElD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA,OAAO,MAAMC,MAAM,GAAG,QAAQ;AAE9B,eAAe,SAASC,oBAAoBA,CAAE;EAAEC;AAAa,CAAC,EAAG;EAChE,MAAM;IAAEC,UAAU;IAAEC,QAAQ;IAAEC;EAAY,CAAC,GAAGZ,SAAS,CACpDa,MAAM,IAAM;IACb,MAAM;MAAEC,aAAa;MAAEC,WAAW;MAAEC;IAAgB,CAAC,GACpDH,MAAM,CAAEP,gBAAiB,CAAC;IAE3B,MAAMW,OAAO,GAAG,CAAEH,aAAa,CAAEL,YAAa,CAAC;IAC/C,MAAM;MAAES;IAAgB,CAAC,GAAGH,WAAW,CAAC,CAAC;IAEzC,OAAO;MACNL,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C,UAAU;IACVC,qBAAqB;EAAA,CACrB,CACG,CAAC;AAER","ignoreList":[]}
@@ -4,44 +4,14 @@ import { createElement } from "react";
4
4
  */
5
5
  import { SelectControl, __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';
6
6
  import { __, _x } from '@wordpress/i18n';
7
-
8
7
  /**
9
- * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps
8
+ * Internal dependencies
10
9
  */
10
+ import { useSettings } from '../use-settings';
11
11
 
12
12
  /**
13
- * @type {SelectControlProps[]}
13
+ * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps
14
14
  */
15
- export const DEFAULT_ASPECT_RATIO_OPTIONS = [{
16
- label: _x('Original', 'Aspect ratio option for dimensions control'),
17
- value: 'auto'
18
- }, {
19
- label: _x('Square - 1:1', 'Aspect ratio option for dimensions control'),
20
- value: '1'
21
- }, {
22
- label: _x('Standard - 4:3', 'Aspect ratio option for dimensions control'),
23
- value: '4/3'
24
- }, {
25
- label: _x('Portrait - 3:4', 'Aspect ratio option for dimensions control'),
26
- value: '3/4'
27
- }, {
28
- label: _x('Classic - 3:2', 'Aspect ratio option for dimensions control'),
29
- value: '3/2'
30
- }, {
31
- label: _x('Classic Portrait - 2:3', 'Aspect ratio option for dimensions control'),
32
- value: '2/3'
33
- }, {
34
- label: _x('Wide - 16:9', 'Aspect ratio option for dimensions control'),
35
- value: '16/9'
36
- }, {
37
- label: _x('Tall - 9:16', 'Aspect ratio option for dimensions control'),
38
- value: '9/16'
39
- }, {
40
- label: _x('Custom', 'Aspect ratio option for dimensions control'),
41
- value: 'custom',
42
- disabled: true,
43
- hidden: true
44
- }];
45
15
 
46
16
  /**
47
17
  * @callback AspectRatioToolPropsOnChange
@@ -63,13 +33,37 @@ export default function AspectRatioTool({
63
33
  panelId,
64
34
  value,
65
35
  onChange = () => {},
66
- options = DEFAULT_ASPECT_RATIO_OPTIONS,
67
- defaultValue = DEFAULT_ASPECT_RATIO_OPTIONS[0].value,
36
+ options,
37
+ defaultValue = 'auto',
68
38
  hasValue,
69
39
  isShownByDefault = true
70
40
  }) {
71
41
  // Match the CSS default so if the value is used directly in CSS it will look correct in the control.
72
42
  const displayValue = value !== null && value !== void 0 ? value : 'auto';
43
+ const [defaultRatios, themeRatios, showDefaultRatios] = useSettings('dimensions.aspectRatios.default', 'dimensions.aspectRatios.theme', 'dimensions.defaultAspectRatios');
44
+ const themeOptions = themeRatios?.map(({
45
+ name,
46
+ ratio
47
+ }) => ({
48
+ label: name,
49
+ value: ratio
50
+ }));
51
+ const defaultOptions = defaultRatios?.map(({
52
+ name,
53
+ ratio
54
+ }) => ({
55
+ label: name,
56
+ value: ratio
57
+ }));
58
+ const aspectRatioOptions = [{
59
+ label: _x('Original', 'Aspect ratio option for dimensions control'),
60
+ value: 'auto'
61
+ }, ...(showDefaultRatios ? defaultOptions : []), ...(themeOptions ? themeOptions : []), {
62
+ label: _x('Custom', 'Aspect ratio option for dimensions control'),
63
+ value: 'custom',
64
+ disabled: true,
65
+ hidden: true
66
+ }];
73
67
  return createElement(ToolsPanelItem, {
74
68
  hasValue: hasValue ? hasValue : () => displayValue !== defaultValue,
75
69
  label: __('Aspect ratio'),
@@ -79,7 +73,7 @@ export default function AspectRatioTool({
79
73
  }, createElement(SelectControl, {
80
74
  label: __('Aspect ratio'),
81
75
  value: displayValue,
82
- options: options,
76
+ options: options !== null && options !== void 0 ? options : aspectRatioOptions,
83
77
  onChange: onChange,
84
78
  size: '__unstable-large',
85
79
  __nextHasNoMarginBottom: true
@@ -1 +1 @@
1
- {"version":3,"names":["SelectControl","__experimentalToolsPanelItem","ToolsPanelItem","__","_x","DEFAULT_ASPECT_RATIO_OPTIONS","label","value","disabled","hidden","AspectRatioTool","panelId","onChange","options","defaultValue","hasValue","isShownByDefault","displayValue","createElement","onDeselect","undefined","size","__nextHasNoMarginBottom"],"sources":["@wordpress/block-editor/src/components/dimensions-tool/aspect-ratio-tool.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tSelectControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps\n */\n\n/**\n * @type {SelectControlProps[]}\n */\nexport const DEFAULT_ASPECT_RATIO_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Original', 'Aspect ratio option for dimensions control' ),\n\t\tvalue: 'auto',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Square - 1:1',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '1',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Standard - 4:3',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '4/3',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Portrait - 3:4',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '3/4',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Classic - 3:2',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '3/2',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Classic Portrait - 2:3',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '2/3',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Wide - 16:9',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '16/9',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Tall - 9:16',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '9/16',\n\t},\n\t{\n\t\tlabel: _x( 'Custom', 'Aspect ratio option for dimensions control' ),\n\t\tvalue: 'custom',\n\t\tdisabled: true,\n\t\thidden: true,\n\t},\n];\n\n/**\n * @callback AspectRatioToolPropsOnChange\n * @param {string} [value] New aspect ratio value.\n * @return {void} No return.\n */\n\n/**\n * @typedef {Object} AspectRatioToolProps\n * @property {string} [panelId] ID of the panel this tool is associated with.\n * @property {string} [value] Current aspect ratio value.\n * @property {AspectRatioToolPropsOnChange} [onChange] Callback to update the aspect ratio value.\n * @property {SelectControlProps[]} [options] Aspect ratio options.\n * @property {string} [defaultValue] Default aspect ratio value.\n * @property {boolean} [isShownByDefault] Whether the tool is shown by default.\n */\n\nexport default function AspectRatioTool( {\n\tpanelId,\n\tvalue,\n\tonChange = () => {},\n\toptions = DEFAULT_ASPECT_RATIO_OPTIONS,\n\tdefaultValue = DEFAULT_ASPECT_RATIO_OPTIONS[ 0 ].value,\n\thasValue,\n\tisShownByDefault = true,\n} ) {\n\t// Match the CSS default so if the value is used directly in CSS it will look correct in the control.\n\tconst displayValue = value ?? 'auto';\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={\n\t\t\t\thasValue ? hasValue : () => displayValue !== defaultValue\n\t\t\t}\n\t\t\tlabel={ __( 'Aspect ratio' ) }\n\t\t\tonDeselect={ () => onChange( undefined ) }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<SelectControl\n\t\t\t\tlabel={ __( 'Aspect ratio' ) }\n\t\t\t\tvalue={ displayValue }\n\t\t\t\toptions={ options }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,aAAa,EACbC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,CAC3C;EACCC,KAAK,EAAEF,EAAE,CAAE,UAAU,EAAE,4CAA6C,CAAC;EACrEG,KAAK,EAAE;AACR,CAAC,EACD;E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,YAAY,KAAKH,YAC7C;IACDR,KAAK,EAAGH,EAAE,CAAE,cAAe,CAAG;IAC9BgB,UAAU,EAAGA,CAAA,KAAMP,QAAQ,CAAEQ,SAAU,CAAG;IAC1CJ,gBAAgB,EAAGA,gBAAkB;IACrCL,OAAO,EAAGA;EAAS,GAEnBO,aAAA,CAAClB,aAAa;IACbM,KAAK,EAAGH,EAAE,CAAE,cAAe,CAAG;IAC9BI,KAAK,EAAGU,YAAc;IACtBJ,OAAO,EAAGA,OAAS;IACnBD,QAAQ,EAAGA,QAAU;IACrBS,IAAI,EAAG,kBAAoB;IAC3BC,uBAAuB;EAAA,CACvB,CACc,CAAC;AAEnB","ignoreList":[]}
1
+ {"version":3,"names":["SelectControl","__experimentalToolsPanelItem","ToolsPanelItem","__","_x","useSettings","AspectRatioTool","panelId","value","onChange","options","defaultValue","hasValue","isShownByDefault","displayValue","defaultRatios","themeRatios","showDefaultRatios","themeOptions","map","name","ratio","label","defaultOptions","aspectRatioOptions","disabled","hidden","createElement","onDeselect","undefined","size","__nextHasNoMarginBottom"],"sources":["@wordpress/block-editor/src/components/dimensions-tool/aspect-ratio-tool.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tSelectControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\n/**\n * Internal dependencies\n */\nimport { useSettings } from '../use-settings';\n\n/**\n * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps\n */\n\n/**\n * @callback AspectRatioToolPropsOnChange\n * @param {string} [value] New aspect ratio value.\n * @return {void} No return.\n */\n\n/**\n * @typedef {Object} AspectRatioToolProps\n * @property {string} [panelId] ID of the panel this tool is associated with.\n * @property {string} [value] Current aspect ratio value.\n * @property {AspectRatioToolPropsOnChange} [onChange] Callback to update the aspect ratio value.\n * @property {SelectControlProps[]} [options] Aspect ratio options.\n * @property {string} [defaultValue] Default aspect ratio value.\n * @property {boolean} [isShownByDefault] Whether the tool is shown by default.\n */\n\nexport default function AspectRatioTool( {\n\tpanelId,\n\tvalue,\n\tonChange = () => {},\n\toptions,\n\tdefaultValue = 'auto',\n\thasValue,\n\tisShownByDefault = true,\n} ) {\n\t// Match the CSS default so if the value is used directly in CSS it will look correct in the control.\n\tconst displayValue = value ?? 'auto';\n\n\tconst [ defaultRatios, themeRatios, showDefaultRatios ] = useSettings(\n\t\t'dimensions.aspectRatios.default',\n\t\t'dimensions.aspectRatios.theme',\n\t\t'dimensions.defaultAspectRatios'\n\t);\n\n\tconst themeOptions = themeRatios?.map( ( { name, ratio } ) => ( {\n\t\tlabel: name,\n\t\tvalue: ratio,\n\t} ) );\n\n\tconst defaultOptions = defaultRatios?.map( ( { name, ratio } ) => ( {\n\t\tlabel: name,\n\t\tvalue: ratio,\n\t} ) );\n\n\tconst aspectRatioOptions = [\n\t\t{\n\t\t\tlabel: _x(\n\t\t\t\t'Original',\n\t\t\t\t'Aspect ratio option for dimensions control'\n\t\t\t),\n\t\t\tvalue: 'auto',\n\t\t},\n\t\t...( showDefaultRatios ? defaultOptions : [] ),\n\t\t...( themeOptions ? themeOptions : [] ),\n\t\t{\n\t\t\tlabel: _x( 'Custom', 'Aspect ratio option for dimensions control' ),\n\t\t\tvalue: 'custom',\n\t\t\tdisabled: true,\n\t\t\thidden: true,\n\t\t},\n\t];\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={\n\t\t\t\thasValue ? hasValue : () => displayValue !== defaultValue\n\t\t\t}\n\t\t\tlabel={ __( 'Aspect ratio' ) }\n\t\t\tonDeselect={ () => onChange( undefined ) }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<SelectControl\n\t\t\t\tlabel={ __( 'Aspect ratio' ) }\n\t\t\t\tvalue={ displayValue }\n\t\t\t\toptions={ options ?? aspectRatioOptions }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tsize={ '__unstable-large' }\n\t\t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,IAAKL,YAAY,GAAGA,YAAY,GAAG,EAAE,CAAE,EACvC;IACCI,KAAK,EAAElB,EAAE,CAAE,QAAQ,EAAE,4CAA6C,CAAC;IACnEI,KAAK,EAAE,QAAQ;IACfiB,QAAQ,EAAE,IAAI;IACdC,MAAM,EAAE;EACT,CAAC,CACD;EAED,OACCC,aAAA,CAACzB,cAAc;IACdU,QAAQ,EACPA,QAAQ,GAAGA,QAAQ,GAAG,MAAME,YAAY,KAAKH,YAC7C;IACDW,KAAK,EAAGnB,EAAE,CAAE,cAAe,CAAG;IAC9ByB,UAAU,EAAGA,CAAA,KAAMnB,QAAQ,CAAEoB,SAAU,CAAG;IAC1ChB,gBAAgB,EAAGA,gBAAkB;IACrCN,OAAO,EAAGA;EAAS,GAEnBoB,aAAA,CAAC3B,aAAa;IACbsB,KAAK,EAAGnB,EAAE,CAAE,cAAe,CAAG;IAC9BK,KAAK,EAAGM,YAAc;IACtBJ,OAAO,EAAGA,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAIc,kBAAoB;IACzCf,QAAQ,EAAGA,QAAU;IACrBqB,IAAI,EAAG,kBAAoB;IAC3BC,uBAAuB;EAAA,CACvB,CACc,CAAC;AAEnB","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -129,7 +129,7 @@ function InspectorImagePreview({
129
129
  justify: imgUrl ? 'flex-start' : 'center',
130
130
  as: "span"
131
131
  }, imgUrl && createElement("span", {
132
- className: classnames('block-editor-global-styles-background-panel__inspector-image-indicator-wrapper', {
132
+ className: clsx('block-editor-global-styles-background-panel__inspector-image-indicator-wrapper', {
133
133
  'has-image': imgUrl
134
134
  }),
135
135
  "aria-hidden": true
@@ -318,7 +318,7 @@ function BackgroundSizeToolsPanelItem({
318
318
  const updateBackgroundPosition = next => {
319
319
  onChange(setImmutably(style, ['background', 'backgroundPosition'], coordsToBackgroundPosition(next)));
320
320
  };
321
- const toggleIsRepeated = () => onChange(setImmutably(style, ['background', 'backgroundRepeat'], repeatCheckedValue === true ? 'no-repeat' : undefined));
321
+ const toggleIsRepeated = () => onChange(setImmutably(style, ['background', 'backgroundRepeat'], repeatCheckedValue === true ? 'no-repeat' : 'repeat'));
322
322
  const resetBackgroundSize = () => onChange(setImmutably(style, ['background'], {
323
323
  ...style?.background,
324
324
  backgroundPosition: undefined,
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__experimentalUnitControl","UnitControl","__experimentalVStack","VStack","DropZone","FlexItem","FocalPointPicker","MenuItem","VisuallyHidden","__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalTruncate","Truncate","__","sprintf","store","noticesStore","getFilename","useCallback","Platform","useRef","useDispatch","useSelect","focus","isBlobURL","TOOLSPANEL_DROPDOWNMENU_PROPS","setImmutably","MediaReplaceFlow","blockEditorStore","IMAGE_BACKGROUND_TYPE","DEFAULT_CONTROLS","backgroundImage","backgroundSize","useHasBackgroundPanel","settings","OS","background","hasBackgroundSizeValue","style","backgroundPosition","undefined","hasBackgroundImageValue","id","url","backgroundSizeHelpText","value","coordsToBackgroundPosition","isNaN","x","y","backgroundPositionToCoords","split","map","v","parseFloat","InspectorImagePreview","label","filename","imgUrl","imgLabel","createElement","as","justify","className","numberOfLines","BackgroundImageToolsPanelItem","panelId","isShownByDefault","onChange","inheritedValue","mediaUpload","select","getSettings","title","replaceContainerRef","createErrorNotice","onUploadError","message","type","resetBackgroundImage","onSelectMedia","media","media_type","source","onFilesDrop","filesList","allowedTypes","onFileChange","image","onError","resetAllFilter","previousValue","hasValue","onDeselect","ref","mediaId","mediaURL","accept","onSelect","name","variant","onClick","toggleButton","tabbable","find","current","click","BackgroundSizeToolsPanelItem","defaultValues","sizeValue","repeatValue","backgroundRepeat","imageValue","positionValue","currentValueForToggle","repeatCheckedValue","updateBackgroundSize","next","nextRepeat","updateBackgroundPosition","toggleIsRepeated","resetBackgroundSize","spacing","__next40pxDefaultSize","size","isBlock","help","key","checked","BackgroundToolsPanel","children","headerLabel","resetAll","updatedValue","dropdownMenuProps","BackgroundPanel","Wrapper","defaultControls","shouldShowBackgroundSizeControls"],"sources":["@wordpress/block-editor/src/components/global-styles/background-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalVStack as VStack,\n\tDropZone,\n\tFlexItem,\n\tFocalPointPicker,\n\tMenuItem,\n\tVisuallyHidden,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { getFilename } from '@wordpress/url';\nimport { useCallback, Platform, useRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';\nimport { setImmutably } from '../../utils/object';\nimport MediaReplaceFlow from '../media-replace-flow';\nimport { store as blockEditorStore } from '../../store';\n\nconst IMAGE_BACKGROUND_TYPE = 'image';\nconst DEFAULT_CONTROLS = {\n\tbackgroundImage: true,\n\tbackgroundSize: false,\n};\n\n/**\n * Checks site settings to see if the background panel may be used.\n * `settings.background.backgroundSize` exists also,\n * but can only be used if settings?.background?.backgroundImage is `true`.\n *\n * @param {Object} settings Site settings\n * @return {boolean} Whether site settings has activated background panel.\n */\nexport function useHasBackgroundPanel( settings ) {\n\treturn Platform.OS === 'web' && settings?.background?.backgroundImage;\n}\n\n/**\n * Checks if there is a current value in the background size block support\n * attributes. Background size values include background size as well\n * as background position.\n *\n * @param {Object} style Style attribute.\n * @return {boolean} Whether the block has a background size value set.\n */\nexport function hasBackgroundSizeValue( style ) {\n\treturn (\n\t\tstyle?.background?.backgroundPosition !== undefined ||\n\t\tstyle?.background?.backgroundSize !== undefined\n\t);\n}\n\n/**\n * Checks if there is a current value in the background image block support\n * attributes.\n *\n * @param {Object} style Style attribute.\n * @return {boolean} Whether the block has a background image value set.\n */\nexport function hasBackgroundImageValue( style ) {\n\treturn (\n\t\t!! style?.background?.backgroundImage?.id ||\n\t\t!! style?.background?.backgroundImage?.url\n\t);\n}\n\n/**\n * Get the help text for the background size control.\n *\n * @param {string} value backgroundSize value.\n * @return {string} Translated help text.\n */\nfunction backgroundSizeHelpText( value ) {\n\tif ( value === 'cover' || value === undefined ) {\n\t\treturn __( 'Image covers the space evenly.' );\n\t}\n\tif ( value === 'contain' ) {\n\t\treturn __( 'Image is contained without distortion.' );\n\t}\n\treturn __( 'Specify a fixed width.' );\n}\n\n/**\n * Converts decimal x and y coords from FocalPointPicker to percentage-based values\n * to use as backgroundPosition value.\n *\n * @param {{x?:number, y?:number}} value FocalPointPicker coords.\n * @return {string} \t\t\t\t backgroundPosition value.\n */\nexport const coordsToBackgroundPosition = ( value ) => {\n\tif ( ! value || ( isNaN( value.x ) && isNaN( value.y ) ) ) {\n\t\treturn undefined;\n\t}\n\n\tconst x = isNaN( value.x ) ? 0.5 : value.x;\n\tconst y = isNaN( value.y ) ? 0.5 : value.y;\n\n\treturn `${ x * 100 }% ${ y * 100 }%`;\n};\n\n/**\n * Converts backgroundPosition value to x and y coords for FocalPointPicker.\n *\n * @param {string} value backgroundPosition value.\n * @return {{x?:number, y?:number}} FocalPointPicker coords.\n */\nexport const backgroundPositionToCoords = ( value ) => {\n\tif ( ! value ) {\n\t\treturn { x: undefined, y: undefined };\n\t}\n\n\tlet [ x, y ] = value.split( ' ' ).map( ( v ) => parseFloat( v ) / 100 );\n\tx = isNaN( x ) ? undefined : x;\n\ty = isNaN( y ) ? x : y;\n\n\treturn { x, y };\n};\n\nfunction InspectorImagePreview( { label, filename, url: imgUrl } ) {\n\tconst imgLabel =\n\t\tlabel || getFilename( imgUrl ) || __( 'Add background image' );\n\n\treturn (\n\t\t<ItemGroup as=\"span\">\n\t\t\t<HStack justify={ imgUrl ? 'flex-start' : 'center' } as=\"span\">\n\t\t\t\t{ imgUrl && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-global-styles-background-panel__inspector-image-indicator-wrapper',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-image': imgUrl,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName=\"block-editor-global-styles-background-panel__inspector-image-indicator\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tbackgroundImage: `url(${ imgUrl })`,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t<FlexItem as=\"span\">\n\t\t\t\t\t<Truncate\n\t\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-global-styles-background-panel__inspector-media-replace-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ imgLabel }\n\t\t\t\t\t</Truncate>\n\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t{ filename\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: file name */\n\t\t\t\t\t\t\t\t\t__( 'Selected image: %s' ),\n\t\t\t\t\t\t\t\t\tfilename\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __( 'No image selected' ) }\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</ItemGroup>\n\t);\n}\n\nfunction BackgroundImageToolsPanelItem( {\n\tpanelId,\n\tisShownByDefault,\n\tonChange,\n\tstyle,\n\tinheritedValue,\n} ) {\n\tconst mediaUpload = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings().mediaUpload,\n\t\t[]\n\t);\n\n\tconst { id, title, url } = style?.background?.backgroundImage || {\n\t\t...inheritedValue?.background?.backgroundImage,\n\t};\n\n\tconst replaceContainerRef = useRef();\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst resetBackgroundImage = () =>\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tstyle,\n\t\t\t\t[ 'background', 'backgroundImage' ],\n\t\t\t\tundefined\n\t\t\t)\n\t\t);\n\n\tconst onSelectMedia = ( media ) => {\n\t\tif ( ! media || ! media.url ) {\n\t\t\tresetBackgroundImage();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isBlobURL( media.url ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For media selections originated from a file upload.\n\t\tif (\n\t\t\t( media.media_type &&\n\t\t\t\tmedia.media_type !== IMAGE_BACKGROUND_TYPE ) ||\n\t\t\t( ! media.media_type &&\n\t\t\t\tmedia.type &&\n\t\t\t\tmedia.type !== IMAGE_BACKGROUND_TYPE )\n\t\t) {\n\t\t\tonUploadError(\n\t\t\t\t__( 'Only images can be used as a background image.' )\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tonChange(\n\t\t\tsetImmutably( style, [ 'background', 'backgroundImage' ], {\n\t\t\t\turl: media.url,\n\t\t\t\tid: media.id,\n\t\t\t\tsource: 'file',\n\t\t\t\ttitle: media.title || undefined,\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst onFilesDrop = ( filesList ) => {\n\t\tmediaUpload( {\n\t\t\tallowedTypes: [ IMAGE_BACKGROUND_TYPE ],\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tonSelectMedia( image );\n\t\t\t},\n\t\t\tonError: onUploadError,\n\t\t} );\n\t};\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tstyle: {\n\t\t\t\t...previousValue.style,\n\t\t\t\tbackground: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst hasValue = hasBackgroundImageValue( style );\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\tclassName=\"single-column\"\n\t\t\thasValue={ () => hasValue }\n\t\t\tlabel={ __( 'Background image' ) }\n\t\t\tonDeselect={ resetBackgroundImage }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"block-editor-global-styles-background-panel__inspector-media-replace-container\"\n\t\t\t\tref={ replaceContainerRef }\n\t\t\t>\n\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\tmediaId={ id }\n\t\t\t\t\tmediaURL={ url }\n\t\t\t\t\tallowedTypes={ [ IMAGE_BACKGROUND_TYPE ] }\n\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\tonSelect={ onSelectMedia }\n\t\t\t\t\tname={\n\t\t\t\t\t\t<InspectorImagePreview\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tfilename={ title || __( 'Untitled' ) }\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t>\n\t\t\t\t\t{ hasValue && (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst [ toggleButton ] = focus.tabbable.find(\n\t\t\t\t\t\t\t\t\treplaceContainerRef.current\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t// Focus the toggle button and close the dropdown menu.\n\t\t\t\t\t\t\t\t// This ensures similar behaviour as to selecting an image, where the dropdown is\n\t\t\t\t\t\t\t\t// closed and focus is redirected to the dropdown toggle button.\n\t\t\t\t\t\t\t\ttoggleButton?.focus();\n\t\t\t\t\t\t\t\ttoggleButton?.click();\n\t\t\t\t\t\t\t\tresetBackgroundImage();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset ' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t) }\n\t\t\t\t</MediaReplaceFlow>\n\t\t\t\t<DropZone\n\t\t\t\t\tonFilesDrop={ onFilesDrop }\n\t\t\t\t\tlabel={ __( 'Drop to upload' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</ToolsPanelItem>\n\t);\n}\n\nfunction BackgroundSizeToolsPanelItem( {\n\tpanelId,\n\tisShownByDefault,\n\tonChange,\n\tstyle,\n\tinheritedValue,\n\tdefaultValues,\n} ) {\n\tconst sizeValue =\n\t\tstyle?.background?.backgroundSize ||\n\t\tinheritedValue?.background?.backgroundSize;\n\tconst repeatValue =\n\t\tstyle?.background?.backgroundRepeat ||\n\t\tinheritedValue?.background?.backgroundRepeat;\n\tconst imageValue =\n\t\tstyle?.background?.backgroundImage?.url ||\n\t\tinheritedValue?.background?.backgroundImage?.url;\n\tconst positionValue =\n\t\tstyle?.background?.backgroundPosition ||\n\t\tinheritedValue?.background?.backgroundPosition;\n\n\t/*\n\t * An `undefined` value is replaced with any supplied\n\t * default control value for the toggle group control.\n\t * An empty string is treated as `auto` - this allows a user\n\t * to select \"Size\" and then enter a custom value, with an\n\t * empty value being treated as `auto`.\n\t */\n\tconst currentValueForToggle =\n\t\t( sizeValue !== undefined &&\n\t\t\tsizeValue !== 'cover' &&\n\t\t\tsizeValue !== 'contain' ) ||\n\t\tsizeValue === ''\n\t\t\t? 'auto'\n\t\t\t: sizeValue || defaultValues?.backgroundSize;\n\n\t/*\n\t * If the current value is `cover` and the repeat value is `undefined`, then\n\t * the toggle should be unchecked as the default state. Otherwise, the toggle\n\t * should reflect the current repeat value.\n\t */\n\tconst repeatCheckedValue = ! (\n\t\trepeatValue === 'no-repeat' ||\n\t\t( currentValueForToggle === 'cover' && repeatValue === undefined )\n\t);\n\n\tconst hasValue = hasBackgroundSizeValue( style );\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tstyle: {\n\t\t\t\t...previousValue.style,\n\t\t\t\tbackground: {\n\t\t\t\t\t...previousValue.style?.background,\n\t\t\t\t\tbackgroundRepeat: undefined,\n\t\t\t\t\tbackgroundSize: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst updateBackgroundSize = ( next ) => {\n\t\t// When switching to 'contain' toggle the repeat off.\n\t\tlet nextRepeat = repeatValue;\n\n\t\tif ( next === 'contain' ) {\n\t\t\tnextRepeat = 'no-repeat';\n\t\t}\n\n\t\tif ( next === 'cover' ) {\n\t\t\tnextRepeat = undefined;\n\t\t}\n\n\t\tif (\n\t\t\t( currentValueForToggle === 'cover' ||\n\t\t\t\tcurrentValueForToggle === 'contain' ) &&\n\t\t\tnext === 'auto'\n\t\t) {\n\t\t\tnextRepeat = undefined;\n\t\t}\n\n\t\tonChange(\n\t\t\tsetImmutably( style, [ 'background' ], {\n\t\t\t\t...style?.background,\n\t\t\t\tbackgroundRepeat: nextRepeat,\n\t\t\t\tbackgroundSize: next,\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst updateBackgroundPosition = ( next ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tstyle,\n\t\t\t\t[ 'background', 'backgroundPosition' ],\n\t\t\t\tcoordsToBackgroundPosition( next )\n\t\t\t)\n\t\t);\n\t};\n\n\tconst toggleIsRepeated = () =>\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tstyle,\n\t\t\t\t[ 'background', 'backgroundRepeat' ],\n\t\t\t\trepeatCheckedValue === true ? 'no-repeat' : undefined\n\t\t\t)\n\t\t);\n\n\tconst resetBackgroundSize = () =>\n\t\tonChange(\n\t\t\tsetImmutably( style, [ 'background' ], {\n\t\t\t\t...style?.background,\n\t\t\t\tbackgroundPosition: undefined,\n\t\t\t\tbackgroundRepeat: undefined,\n\t\t\t\tbackgroundSize: undefined,\n\t\t\t} )\n\t\t);\n\n\treturn (\n\t\t<VStack\n\t\t\tas={ ToolsPanelItem }\n\t\t\tspacing={ 2 }\n\t\t\tclassName=\"single-column\"\n\t\t\thasValue={ () => hasValue }\n\t\t\tlabel={ __( 'Size' ) }\n\t\t\tonDeselect={ resetBackgroundSize }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<FocalPointPicker\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\turl={ imageValue }\n\t\t\t\tvalue={ backgroundPositionToCoords( positionValue ) }\n\t\t\t\tonChange={ updateBackgroundPosition }\n\t\t\t/>\n\t\t\t<ToggleGroupControl\n\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\tlabel={ __( 'Size' ) }\n\t\t\t\tvalue={ currentValueForToggle }\n\t\t\t\tonChange={ updateBackgroundSize }\n\t\t\t\tisBlock\n\t\t\t\thelp={ backgroundSizeHelpText( sizeValue ) }\n\t\t\t>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tkey={ 'cover' }\n\t\t\t\t\tvalue={ 'cover' }\n\t\t\t\t\tlabel={ __( 'Cover' ) }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tkey={ 'contain' }\n\t\t\t\t\tvalue={ 'contain' }\n\t\t\t\t\tlabel={ __( 'Contain' ) }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tkey={ 'fixed' }\n\t\t\t\t\tvalue={ 'auto' }\n\t\t\t\t\tlabel={ __( 'Fixed' ) }\n\t\t\t\t/>\n\t\t\t</ToggleGroupControl>\n\t\t\t{ currentValueForToggle !== undefined &&\n\t\t\tcurrentValueForToggle !== 'cover' &&\n\t\t\tcurrentValueForToggle !== 'contain' ? (\n\t\t\t\t<UnitControl\n\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\tonChange={ updateBackgroundSize }\n\t\t\t\t\tvalue={ sizeValue }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t\t{ currentValueForToggle !== 'cover' && (\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Repeat' ) }\n\t\t\t\t\tchecked={ repeatCheckedValue }\n\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nfunction BackgroundToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n\theaderLabel,\n} ) {\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<VStack\n\t\t\tas={ ToolsPanel }\n\t\t\tspacing={ 4 }\n\t\t\tlabel={ headerLabel }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t>\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport default function BackgroundPanel( {\n\tas: Wrapper = BackgroundToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tdefaultValues = {},\n\theaderLabel = __( 'Background image' ),\n} ) {\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tbackground: {},\n\t\t};\n\t}, [] );\n\tconst shouldShowBackgroundSizeControls =\n\t\tsettings?.background?.backgroundSize;\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t\theaderLabel={ headerLabel }\n\t\t>\n\t\t\t<BackgroundImageToolsPanelItem\n\t\t\t\tonChange={ onChange }\n\t\t\t\tpanelId={ panelId }\n\t\t\t\tisShownByDefault={ defaultControls.backgroundImage }\n\t\t\t\tstyle={ value }\n\t\t\t\tinheritedValue={ inheritedValue }\n\t\t\t/>\n\t\t\t{ shouldShowBackgroundSizeControls && (\n\t\t\t\t<BackgroundSizeToolsPanelItem\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\tisShownByDefault={ defaultControls.backgroundSize }\n\t\t\t\t\tstyle={ value }\n\t\t\t\t\tinheritedValue={ inheritedValue }\n\t\t\t\t\tdefaultValues={ defaultValues }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,aAAa,EACbC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,EAClEC,yBAAyB,IAAIC,WAAW,EACxCC,oBAAoB,IAAIC,MAAM,EAC9BC,QAAQ,EACRC,QAAQ,EACRC,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,EACdC,uBA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KAAK,EAAGO,KAAO;IACfwB,cAAc,EAAGA;EAAgB,CACjC,CAAC,EACAqE,gCAAgC,IACjC9E,aAAA,CAAC+C,4BAA4B;IAC5BvC,QAAQ,EAAGA,QAAU;IACrBF,OAAO,EAAGA,OAAS;IACnBC,gBAAgB,EAAGsE,eAAe,CAACzG,cAAgB;IACnDM,KAAK,EAAGO,KAAO;IACfwB,cAAc,EAAGA,cAAgB;IACjCuC,aAAa,EAAGA;EAAe,CAC/B,CAEM,CAAC;AAEZ","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__experimentalUnitControl","UnitControl","__experimentalVStack","VStack","DropZone","FlexItem","FocalPointPicker","MenuItem","VisuallyHidden","__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalTruncate","Truncate","__","sprintf","store","noticesStore","getFilename","useCallback","Platform","useRef","useDispatch","useSelect","focus","isBlobURL","TOOLSPANEL_DROPDOWNMENU_PROPS","setImmutably","MediaReplaceFlow","blockEditorStore","IMAGE_BACKGROUND_TYPE","DEFAULT_CONTROLS","backgroundImage","backgroundSize","useHasBackgroundPanel","settings","OS","background","hasBackgroundSizeValue","style","backgroundPosition","undefined","hasBackgroundImageValue","id","url","backgroundSizeHelpText","value","coordsToBackgroundPosition","isNaN","x","y","backgroundPositionToCoords","split","map","v","parseFloat","InspectorImagePreview","label","filename","imgUrl","imgLabel","createElement","as","justify","className","numberOfLines","BackgroundImageToolsPanelItem","panelId","isShownByDefault","onChange","inheritedValue","mediaUpload","select","getSettings","title","replaceContainerRef","createErrorNotice","onUploadError","message","type","resetBackgroundImage","onSelectMedia","media","media_type","source","onFilesDrop","filesList","allowedTypes","onFileChange","image","onError","resetAllFilter","previousValue","hasValue","onDeselect","ref","mediaId","mediaURL","accept","onSelect","name","variant","onClick","toggleButton","tabbable","find","current","click","BackgroundSizeToolsPanelItem","defaultValues","sizeValue","repeatValue","backgroundRepeat","imageValue","positionValue","currentValueForToggle","repeatCheckedValue","updateBackgroundSize","next","nextRepeat","updateBackgroundPosition","toggleIsRepeated","resetBackgroundSize","spacing","__next40pxDefaultSize","size","isBlock","help","key","checked","BackgroundToolsPanel","children","headerLabel","resetAll","updatedValue","dropdownMenuProps","BackgroundPanel","Wrapper","defaultControls","shouldShowBackgroundSizeControls"],"sources":["@wordpress/block-editor/src/components/global-styles/background-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalVStack as VStack,\n\tDropZone,\n\tFlexItem,\n\tFocalPointPicker,\n\tMenuItem,\n\tVisuallyHidden,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { getFilename } from '@wordpress/url';\nimport { useCallback, Platform, useRef } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';\nimport { setImmutably } from '../../utils/object';\nimport MediaReplaceFlow from '../media-replace-flow';\nimport { store as blockEditorStore } from '../../store';\n\nconst IMAGE_BACKGROUND_TYPE = 'image';\nconst DEFAULT_CONTROLS = {\n\tbackgroundImage: true,\n\tbackgroundSize: false,\n};\n\n/**\n * Checks site settings to see if the background panel may be used.\n * `settings.background.backgroundSize` exists also,\n * but can only be used if settings?.background?.backgroundImage is `true`.\n *\n * @param {Object} settings Site settings\n * @return {boolean} Whether site settings has activated background panel.\n */\nexport function useHasBackgroundPanel( settings ) {\n\treturn Platform.OS === 'web' && settings?.background?.backgroundImage;\n}\n\n/**\n * Checks if there is a current value in the background size block support\n * attributes. Background size values include background size as well\n * as background position.\n *\n * @param {Object} style Style attribute.\n * @return {boolean} Whether the block has a background size value set.\n */\nexport function hasBackgroundSizeValue( style ) {\n\treturn (\n\t\tstyle?.background?.backgroundPosition !== undefined ||\n\t\tstyle?.background?.backgroundSize !== undefined\n\t);\n}\n\n/**\n * Checks if there is a current value in the background image block support\n * attributes.\n *\n * @param {Object} style Style attribute.\n * @return {boolean} Whether the block has a background image value set.\n */\nexport function hasBackgroundImageValue( style ) {\n\treturn (\n\t\t!! style?.background?.backgroundImage?.id ||\n\t\t!! style?.background?.backgroundImage?.url\n\t);\n}\n\n/**\n * Get the help text for the background size control.\n *\n * @param {string} value backgroundSize value.\n * @return {string} Translated help text.\n */\nfunction backgroundSizeHelpText( value ) {\n\tif ( value === 'cover' || value === undefined ) {\n\t\treturn __( 'Image covers the space evenly.' );\n\t}\n\tif ( value === 'contain' ) {\n\t\treturn __( 'Image is contained without distortion.' );\n\t}\n\treturn __( 'Specify a fixed width.' );\n}\n\n/**\n * Converts decimal x and y coords from FocalPointPicker to percentage-based values\n * to use as backgroundPosition value.\n *\n * @param {{x?:number, y?:number}} value FocalPointPicker coords.\n * @return {string} \t\t\t\t backgroundPosition value.\n */\nexport const coordsToBackgroundPosition = ( value ) => {\n\tif ( ! value || ( isNaN( value.x ) && isNaN( value.y ) ) ) {\n\t\treturn undefined;\n\t}\n\n\tconst x = isNaN( value.x ) ? 0.5 : value.x;\n\tconst y = isNaN( value.y ) ? 0.5 : value.y;\n\n\treturn `${ x * 100 }% ${ y * 100 }%`;\n};\n\n/**\n * Converts backgroundPosition value to x and y coords for FocalPointPicker.\n *\n * @param {string} value backgroundPosition value.\n * @return {{x?:number, y?:number}} FocalPointPicker coords.\n */\nexport const backgroundPositionToCoords = ( value ) => {\n\tif ( ! value ) {\n\t\treturn { x: undefined, y: undefined };\n\t}\n\n\tlet [ x, y ] = value.split( ' ' ).map( ( v ) => parseFloat( v ) / 100 );\n\tx = isNaN( x ) ? undefined : x;\n\ty = isNaN( y ) ? x : y;\n\n\treturn { x, y };\n};\n\nfunction InspectorImagePreview( { label, filename, url: imgUrl } ) {\n\tconst imgLabel =\n\t\tlabel || getFilename( imgUrl ) || __( 'Add background image' );\n\n\treturn (\n\t\t<ItemGroup as=\"span\">\n\t\t\t<HStack justify={ imgUrl ? 'flex-start' : 'center' } as=\"span\">\n\t\t\t\t{ imgUrl && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'block-editor-global-styles-background-panel__inspector-image-indicator-wrapper',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-image': imgUrl,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName=\"block-editor-global-styles-background-panel__inspector-image-indicator\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tbackgroundImage: `url(${ imgUrl })`,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t\t<FlexItem as=\"span\">\n\t\t\t\t\t<Truncate\n\t\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-global-styles-background-panel__inspector-media-replace-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ imgLabel }\n\t\t\t\t\t</Truncate>\n\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t{ filename\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: file name */\n\t\t\t\t\t\t\t\t\t__( 'Selected image: %s' ),\n\t\t\t\t\t\t\t\t\tfilename\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __( 'No image selected' ) }\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</ItemGroup>\n\t);\n}\n\nfunction BackgroundImageToolsPanelItem( {\n\tpanelId,\n\tisShownByDefault,\n\tonChange,\n\tstyle,\n\tinheritedValue,\n} ) {\n\tconst mediaUpload = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings().mediaUpload,\n\t\t[]\n\t);\n\n\tconst { id, title, url } = style?.background?.backgroundImage || {\n\t\t...inheritedValue?.background?.backgroundImage,\n\t};\n\n\tconst replaceContainerRef = useRef();\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst resetBackgroundImage = () =>\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tstyle,\n\t\t\t\t[ 'background', 'backgroundImage' ],\n\t\t\t\tundefined\n\t\t\t)\n\t\t);\n\n\tconst onSelectMedia = ( media ) => {\n\t\tif ( ! media || ! media.url ) {\n\t\t\tresetBackgroundImage();\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isBlobURL( media.url ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// For media selections originated from a file upload.\n\t\tif (\n\t\t\t( media.media_type &&\n\t\t\t\tmedia.media_type !== IMAGE_BACKGROUND_TYPE ) ||\n\t\t\t( ! media.media_type &&\n\t\t\t\tmedia.type &&\n\t\t\t\tmedia.type !== IMAGE_BACKGROUND_TYPE )\n\t\t) {\n\t\t\tonUploadError(\n\t\t\t\t__( 'Only images can be used as a background image.' )\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tonChange(\n\t\t\tsetImmutably( style, [ 'background', 'backgroundImage' ], {\n\t\t\t\turl: media.url,\n\t\t\t\tid: media.id,\n\t\t\t\tsource: 'file',\n\t\t\t\ttitle: media.title || undefined,\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst onFilesDrop = ( filesList ) => {\n\t\tmediaUpload( {\n\t\t\tallowedTypes: [ IMAGE_BACKGROUND_TYPE ],\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tonSelectMedia( image );\n\t\t\t},\n\t\t\tonError: onUploadError,\n\t\t} );\n\t};\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tstyle: {\n\t\t\t\t...previousValue.style,\n\t\t\t\tbackground: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst hasValue = hasBackgroundImageValue( style );\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\tclassName=\"single-column\"\n\t\t\thasValue={ () => hasValue }\n\t\t\tlabel={ __( 'Background image' ) }\n\t\t\tonDeselect={ resetBackgroundImage }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"block-editor-global-styles-background-panel__inspector-media-replace-container\"\n\t\t\t\tref={ replaceContainerRef }\n\t\t\t>\n\t\t\t\t<MediaReplaceFlow\n\t\t\t\t\tmediaId={ id }\n\t\t\t\t\tmediaURL={ url }\n\t\t\t\t\tallowedTypes={ [ IMAGE_BACKGROUND_TYPE ] }\n\t\t\t\t\taccept=\"image/*\"\n\t\t\t\t\tonSelect={ onSelectMedia }\n\t\t\t\t\tname={\n\t\t\t\t\t\t<InspectorImagePreview\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tfilename={ title || __( 'Untitled' ) }\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t>\n\t\t\t\t\t{ hasValue && (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst [ toggleButton ] = focus.tabbable.find(\n\t\t\t\t\t\t\t\t\treplaceContainerRef.current\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t// Focus the toggle button and close the dropdown menu.\n\t\t\t\t\t\t\t\t// This ensures similar behaviour as to selecting an image, where the dropdown is\n\t\t\t\t\t\t\t\t// closed and focus is redirected to the dropdown toggle button.\n\t\t\t\t\t\t\t\ttoggleButton?.focus();\n\t\t\t\t\t\t\t\ttoggleButton?.click();\n\t\t\t\t\t\t\t\tresetBackgroundImage();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset ' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t) }\n\t\t\t\t</MediaReplaceFlow>\n\t\t\t\t<DropZone\n\t\t\t\t\tonFilesDrop={ onFilesDrop }\n\t\t\t\t\tlabel={ __( 'Drop to upload' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</ToolsPanelItem>\n\t);\n}\n\nfunction BackgroundSizeToolsPanelItem( {\n\tpanelId,\n\tisShownByDefault,\n\tonChange,\n\tstyle,\n\tinheritedValue,\n\tdefaultValues,\n} ) {\n\tconst sizeValue =\n\t\tstyle?.background?.backgroundSize ||\n\t\tinheritedValue?.background?.backgroundSize;\n\tconst repeatValue =\n\t\tstyle?.background?.backgroundRepeat ||\n\t\tinheritedValue?.background?.backgroundRepeat;\n\tconst imageValue =\n\t\tstyle?.background?.backgroundImage?.url ||\n\t\tinheritedValue?.background?.backgroundImage?.url;\n\tconst positionValue =\n\t\tstyle?.background?.backgroundPosition ||\n\t\tinheritedValue?.background?.backgroundPosition;\n\n\t/*\n\t * An `undefined` value is replaced with any supplied\n\t * default control value for the toggle group control.\n\t * An empty string is treated as `auto` - this allows a user\n\t * to select \"Size\" and then enter a custom value, with an\n\t * empty value being treated as `auto`.\n\t */\n\tconst currentValueForToggle =\n\t\t( sizeValue !== undefined &&\n\t\t\tsizeValue !== 'cover' &&\n\t\t\tsizeValue !== 'contain' ) ||\n\t\tsizeValue === ''\n\t\t\t? 'auto'\n\t\t\t: sizeValue || defaultValues?.backgroundSize;\n\n\t/*\n\t * If the current value is `cover` and the repeat value is `undefined`, then\n\t * the toggle should be unchecked as the default state. Otherwise, the toggle\n\t * should reflect the current repeat value.\n\t */\n\tconst repeatCheckedValue = ! (\n\t\trepeatValue === 'no-repeat' ||\n\t\t( currentValueForToggle === 'cover' && repeatValue === undefined )\n\t);\n\n\tconst hasValue = hasBackgroundSizeValue( style );\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tstyle: {\n\t\t\t\t...previousValue.style,\n\t\t\t\tbackground: {\n\t\t\t\t\t...previousValue.style?.background,\n\t\t\t\t\tbackgroundRepeat: undefined,\n\t\t\t\t\tbackgroundSize: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst updateBackgroundSize = ( next ) => {\n\t\t// When switching to 'contain' toggle the repeat off.\n\t\tlet nextRepeat = repeatValue;\n\n\t\tif ( next === 'contain' ) {\n\t\t\tnextRepeat = 'no-repeat';\n\t\t}\n\n\t\tif ( next === 'cover' ) {\n\t\t\tnextRepeat = undefined;\n\t\t}\n\n\t\tif (\n\t\t\t( currentValueForToggle === 'cover' ||\n\t\t\t\tcurrentValueForToggle === 'contain' ) &&\n\t\t\tnext === 'auto'\n\t\t) {\n\t\t\tnextRepeat = undefined;\n\t\t}\n\n\t\tonChange(\n\t\t\tsetImmutably( style, [ 'background' ], {\n\t\t\t\t...style?.background,\n\t\t\t\tbackgroundRepeat: nextRepeat,\n\t\t\t\tbackgroundSize: next,\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst updateBackgroundPosition = ( next ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tstyle,\n\t\t\t\t[ 'background', 'backgroundPosition' ],\n\t\t\t\tcoordsToBackgroundPosition( next )\n\t\t\t)\n\t\t);\n\t};\n\n\tconst toggleIsRepeated = () =>\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tstyle,\n\t\t\t\t[ 'background', 'backgroundRepeat' ],\n\t\t\t\trepeatCheckedValue === true ? 'no-repeat' : 'repeat'\n\t\t\t)\n\t\t);\n\n\tconst resetBackgroundSize = () =>\n\t\tonChange(\n\t\t\tsetImmutably( style, [ 'background' ], {\n\t\t\t\t...style?.background,\n\t\t\t\tbackgroundPosition: undefined,\n\t\t\t\tbackgroundRepeat: undefined,\n\t\t\t\tbackgroundSize: undefined,\n\t\t\t} )\n\t\t);\n\n\treturn (\n\t\t<VStack\n\t\t\tas={ ToolsPanelItem }\n\t\t\tspacing={ 2 }\n\t\t\tclassName=\"single-column\"\n\t\t\thasValue={ () => hasValue }\n\t\t\tlabel={ __( 'Size' ) }\n\t\t\tonDeselect={ resetBackgroundSize }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<FocalPointPicker\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tlabel={ __( 'Position' ) }\n\t\t\t\turl={ imageValue }\n\t\t\t\tvalue={ backgroundPositionToCoords( positionValue ) }\n\t\t\t\tonChange={ updateBackgroundPosition }\n\t\t\t/>\n\t\t\t<ToggleGroupControl\n\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\tlabel={ __( 'Size' ) }\n\t\t\t\tvalue={ currentValueForToggle }\n\t\t\t\tonChange={ updateBackgroundSize }\n\t\t\t\tisBlock\n\t\t\t\thelp={ backgroundSizeHelpText( sizeValue ) }\n\t\t\t>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tkey={ 'cover' }\n\t\t\t\t\tvalue={ 'cover' }\n\t\t\t\t\tlabel={ __( 'Cover' ) }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tkey={ 'contain' }\n\t\t\t\t\tvalue={ 'contain' }\n\t\t\t\t\tlabel={ __( 'Contain' ) }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tkey={ 'fixed' }\n\t\t\t\t\tvalue={ 'auto' }\n\t\t\t\t\tlabel={ __( 'Fixed' ) }\n\t\t\t\t/>\n\t\t\t</ToggleGroupControl>\n\t\t\t{ currentValueForToggle !== undefined &&\n\t\t\tcurrentValueForToggle !== 'cover' &&\n\t\t\tcurrentValueForToggle !== 'contain' ? (\n\t\t\t\t<UnitControl\n\t\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t\tonChange={ updateBackgroundSize }\n\t\t\t\t\tvalue={ sizeValue }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t\t{ currentValueForToggle !== 'cover' && (\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Repeat' ) }\n\t\t\t\t\tchecked={ repeatCheckedValue }\n\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nfunction BackgroundToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n\theaderLabel,\n} ) {\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<VStack\n\t\t\tas={ ToolsPanel }\n\t\t\tspacing={ 4 }\n\t\t\tlabel={ headerLabel }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t>\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport default function BackgroundPanel( {\n\tas: Wrapper = BackgroundToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tdefaultValues = {},\n\theaderLabel = __( 'Background image' ),\n} ) {\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tbackground: {},\n\t\t};\n\t}, [] );\n\tconst shouldShowBackgroundSizeControls =\n\t\tsettings?.background?.backgroundSize;\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t\theaderLabel={ headerLabel }\n\t\t>\n\t\t\t<BackgroundImageToolsPanelItem\n\t\t\t\tonChange={ onChange }\n\t\t\t\tpanelId={ panelId }\n\t\t\t\tisShownByDefault={ defaultControls.backgroundImage }\n\t\t\t\tstyle={ value }\n\t\t\t\tinheritedValue={ inheritedValue }\n\t\t\t/>\n\t\t\t{ shouldShowBackgroundSizeControls && (\n\t\t\t\t<BackgroundSizeToolsPanelItem\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\tisShownByDefault={ defaultControls.backgroundSize }\n\t\t\t\t\tstyle={ value }\n\t\t\t\t\tinheritedValue={ inheritedValue }\n\t\t\t\t\tdefaultValues={ defaultValues }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,aAAa,EACbC,gCAAgC,IAAIC,kBAAkB,EACtDC,sCAAsC,IAAIC,wBAAwB,EAClEC,yBAAyB,IAAIC,WAAW,EACxCC,oBAAoB,IAAIC,MAAM,EAC9BC,QAAQ,EACRC,QAAQ,EACRC,gBAAgB,EAChBC,QAAQ,EACRC,cAAc,E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DO,KAAK,EAAGO,KAAO;IACfwB,cAAc,EAAGA;EAAgB,CACjC,CAAC,EACAqE,gCAAgC,IACjC9E,aAAA,CAAC+C,4BAA4B;IAC5BvC,QAAQ,EAAGA,QAAU;IACrBF,OAAO,EAAGA,OAAS;IACnBC,gBAAgB,EAAGsE,eAAe,CAACzG,cAAgB;IACnDM,KAAK,EAAGO,KAAO;IACfwB,cAAc,EAAGA,cAAgB;IACjCuC,aAAa,EAAGA;EAAe,CAC/B,CAEM,CAAC;AAEZ","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -163,7 +163,7 @@ function ColorPanelDropdown({
163
163
  }) => {
164
164
  const toggleProps = {
165
165
  onClick: onToggle,
166
- className: classnames('block-editor-panel-color-gradient-settings__dropdown', {
166
+ className: clsx('block-editor-panel-color-gradient-settings__dropdown', {
167
167
  'is-open': isOpen
168
168
  }),
169
169
  'aria-expanded': isOpen,
@@ -381,7 +381,7 @@ export default function ColorPanel({
381
381
  indicators: [gradient !== null && gradient !== void 0 ? gradient : backgroundColor],
382
382
  tabs: [hasSolidColors && {
383
383
  key: 'background',
384
- label: __('Solid'),
384
+ label: __('Color'),
385
385
  inheritedValue: backgroundColor,
386
386
  setValue: setBackgroundColor,
387
387
  userValue: userBackgroundColor
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalHStack","HStack","__experimentalZStack","ZStack","__experimentalDropdownContentWrapper","DropdownContentWrapper","ColorIndicator","Flex","FlexItem","Dropdown","Button","privateApis","componentsPrivateApis","useCallback","__","sprintf","ColorGradientControl","useColorsPerOrigin","useGradientsPerOrigin","getValueFromVariable","TOOLSPANEL_DROPDOWNMENU_PROPS","setImmutably","unlock","useHasColorPanel","settings","hasTextPanel","useHasTextPanel","hasBackgroundPanel","useHasBackgroundPanel","hasLinkPanel","useHasLinkPanel","hasHeadingPanel","useHasHeadingPanel","hasButtonPanel","useHasButtonPanel","hasCaptionPanel","useHasCaptionPanel","colors","color","text","length","custom","link","caption","gradients","heading","customGradient","button","background","ColorToolsPanel","resetAllFilter","onChange","value","panelId","children","resetAll","updatedValue","createElement","label","hasInnerWrapper","headingLevel","className","__experimentalFirstVisibleItemClass","__experimentalLastVisibleItemClass","dropdownMenuProps","DEFAULT_CONTROLS","popoverProps","placement","offset","shift","LabeledColorIndicators","indicators","justify","isLayered","map","indicator","index","key","expanded","colorValue","title","ColorPanelTab","isGradient","inheritedValue","userValue","setValue","colorGradientControlSettings","showTitle","enableAlpha","__experimentalIsRenderedInSidebar","undefined","gradientValue","onColorChange","onGradientChange","clearable","ColorPanelDropdown","hasValue","resetValue","isShownByDefault","tabs","currentTab","find","tab","Tabs","onDeselect","renderToggle","onToggle","isOpen","toggleProps","onClick","renderContent","paddingSize","defaultTabId","TabList","Tab","tabId","TabPanel","focusable","ColorPanel","as","Wrapper","defaultControls","areCustomSolidsEnabled","areCustomGradientsEnabled","hasSolidColors","hasGradientColors","decodeValue","rawValue","encodeColorValue","allColors","flatMap","originColors","colorObject","slug","encodeGradientValue","allGradients","originGradients","gradientObject","gradient","showBackgroundPanel","backgroundColor","userBackgroundColor","userGradient","hasBackground","setBackgroundColor","newColor","newValue","setGradient","newGradient","resetBackground","showLinkPanel","linkColor","elements","userLinkColor","setLinkColor","hoverLinkColor","userHoverLinkColor","setHoverLinkColor","hasLink","resetLink","showTextPanel","textColor","userTextColor","hasTextColor","setTextColor","changedObject","resetTextColor","name","showPanel","previousValue","reduce","acc","element","items","filter","Boolean","forEach","elementBackgroundColor","elementGradient","elementTextColor","elementBackgroundUserColor","elementGradientUserColor","elementTextUserColor","hasElement","resetElement","setElementTextColor","newTextColor","setElementBackgroundColor","newBackgroundColor","setElementGradient","supportsTextColor","supportsBackground","push","item","disableCustomColors","disableCustomGradients"],"sources":["@wordpress/block-editor/src/components/global-styles/color-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\tColorIndicator,\n\tFlex,\n\tFlexItem,\n\tDropdown,\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorGradientControl from '../colors-gradients/control';\nimport { useColorsPerOrigin, useGradientsPerOrigin } from './hooks';\nimport { getValueFromVariable, TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';\nimport { setImmutably } from '../../utils/object';\nimport { unlock } from '../../lock-unlock';\n\nexport function useHasColorPanel( settings ) {\n\tconst hasTextPanel = useHasTextPanel( settings );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst hasLinkPanel = useHasLinkPanel( settings );\n\tconst hasHeadingPanel = useHasHeadingPanel( settings );\n\tconst hasButtonPanel = useHasButtonPanel( settings );\n\tconst hasCaptionPanel = useHasCaptionPanel( settings );\n\n\treturn (\n\t\thasTextPanel ||\n\t\thasBackgroundPanel ||\n\t\thasLinkPanel ||\n\t\thasHeadingPanel ||\n\t\thasButtonPanel ||\n\t\thasCaptionPanel\n\t);\n}\n\nexport function useHasTextPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.text &&\n\t\t( colors?.length > 0 || settings?.color?.custom )\n\t);\n}\n\nexport function useHasLinkPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.link &&\n\t\t( colors?.length > 0 || settings?.color?.custom )\n\t);\n}\n\nexport function useHasCaptionPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.caption &&\n\t\t( colors?.length > 0 || settings?.color?.custom )\n\t);\n}\n\nexport function useHasHeadingPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.heading &&\n\t\t( colors?.length > 0 ||\n\t\t\tsettings?.color?.custom ||\n\t\t\tgradients?.length > 0 ||\n\t\t\tsettings?.color?.customGradient )\n\t);\n}\n\nexport function useHasButtonPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.button &&\n\t\t( colors?.length > 0 ||\n\t\t\tsettings?.color?.custom ||\n\t\t\tgradients?.length > 0 ||\n\t\t\tsettings?.color?.customGradient )\n\t);\n}\n\nexport function useHasBackgroundPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.background &&\n\t\t( colors?.length > 0 ||\n\t\t\tsettings?.color?.custom ||\n\t\t\tgradients?.length > 0 ||\n\t\t\tsettings?.color?.customGradient )\n\t);\n}\n\nfunction ColorToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Elements' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\thasInnerWrapper\n\t\t\theadingLevel={ 3 }\n\t\t\tclassName=\"color-block-support-panel\"\n\t\t\t__experimentalFirstVisibleItemClass=\"first\"\n\t\t\t__experimentalLastVisibleItemClass=\"last\"\n\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t>\n\t\t\t<div className=\"color-block-support-panel__inner-wrapper\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\ttext: true,\n\tbackground: true,\n\tlink: true,\n\theading: true,\n\tbutton: true,\n\tcaption: true,\n};\n\nconst popoverProps = {\n\tplacement: 'left-start',\n\toffset: 36,\n\tshift: true,\n};\n\nconst LabeledColorIndicators = ( { indicators, label } ) => (\n\t<HStack justify=\"flex-start\">\n\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t{ indicators.map( ( indicator, index ) => (\n\t\t\t\t<Flex key={ index } expanded={ false }>\n\t\t\t\t\t<ColorIndicator colorValue={ indicator } />\n\t\t\t\t</Flex>\n\t\t\t) ) }\n\t\t</ZStack>\n\t\t<FlexItem\n\t\t\tclassName=\"block-editor-panel-color-gradient-settings__color-name\"\n\t\t\ttitle={ label }\n\t\t>\n\t\t\t{ label }\n\t\t</FlexItem>\n\t</HStack>\n);\n\nfunction ColorPanelTab( {\n\tisGradient,\n\tinheritedValue,\n\tuserValue,\n\tsetValue,\n\tcolorGradientControlSettings,\n} ) {\n\treturn (\n\t\t<ColorGradientControl\n\t\t\t{ ...colorGradientControlSettings }\n\t\t\tshowTitle={ false }\n\t\t\tenableAlpha\n\t\t\t__experimentalIsRenderedInSidebar\n\t\t\tcolorValue={ isGradient ? undefined : inheritedValue }\n\t\t\tgradientValue={ isGradient ? inheritedValue : undefined }\n\t\t\tonColorChange={ isGradient ? undefined : setValue }\n\t\t\tonGradientChange={ isGradient ? setValue : undefined }\n\t\t\tclearable={ inheritedValue === userValue }\n\t\t\theadingLevel={ 3 }\n\t\t/>\n\t);\n}\n\nfunction ColorPanelDropdown( {\n\tlabel,\n\thasValue,\n\tresetValue,\n\tisShownByDefault,\n\tindicators,\n\ttabs,\n\tcolorGradientControlSettings,\n\tpanelId,\n} ) {\n\tconst currentTab = tabs.find( ( tab ) => tab.userValue !== undefined );\n\t// Unlocking `Tabs` too early causes the `unlock` method to receive an empty\n\t// object, due to circular dependencies.\n\t// See https://github.com/WordPress/gutenberg/issues/52692\n\tconst { Tabs } = unlock( componentsPrivateApis );\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\tclassName=\"block-editor-tools-panel-color-gradient-settings__item\"\n\t\t\thasValue={ hasValue }\n\t\t\tlabel={ label }\n\t\t\tonDeselect={ resetValue }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tclassName=\"block-editor-tools-panel-color-gradient-settings__dropdown\"\n\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\t\tconst toggleProps = {\n\t\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t'block-editor-panel-color-gradient-settings__dropdown',\n\t\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t\t\t'aria-label': sprintf(\n\t\t\t\t\t\t\t/* translators: %s is the type of color property, e.g., \"background\" */\n\t\t\t\t\t\t\t__( 'Color %s styles' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button { ...toggleProps }>\n\t\t\t\t\t\t\t<LabeledColorIndicators\n\t\t\t\t\t\t\t\tindicators={ indicators }\n\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t\trenderContent={ () => (\n\t\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t\t<div className=\"block-editor-panel-color-gradient-settings__dropdown-content\">\n\t\t\t\t\t\t\t{ tabs.length === 1 && (\n\t\t\t\t\t\t\t\t<ColorPanelTab\n\t\t\t\t\t\t\t\t\t{ ...tabs[ 0 ] }\n\t\t\t\t\t\t\t\t\tcolorGradientControlSettings={\n\t\t\t\t\t\t\t\t\t\tcolorGradientControlSettings\n\t\t\t\t\t\t\t\t\t}\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{ tabs.length > 1 && (\n\t\t\t\t\t\t\t\t<Tabs defaultTabId={ currentTab?.key }>\n\t\t\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t\ttabId={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ tab.label }\n\t\t\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t\t</Tabs.TabList>\n\n\t\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t\ttabId={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<ColorPanelTab\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ ...tab }\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolorGradientControlSettings={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolorGradientControlSettings\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</DropdownContentWrapper>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n\nexport default function ColorPanel( {\n\tas: Wrapper = ColorToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tchildren,\n} ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\tconst areCustomSolidsEnabled = settings?.color?.custom;\n\tconst areCustomGradientsEnabled = settings?.color?.customGradient;\n\tconst hasSolidColors = colors.length > 0 || areCustomSolidsEnabled;\n\tconst hasGradientColors = gradients.length > 0 || areCustomGradientsEnabled;\n\tconst decodeValue = ( rawValue ) =>\n\t\tgetValueFromVariable( { settings }, '', rawValue );\n\tconst encodeColorValue = ( colorValue ) => {\n\t\tconst allColors = colors.flatMap(\n\t\t\t( { colors: originColors } ) => originColors\n\t\t);\n\t\tconst colorObject = allColors.find(\n\t\t\t( { color } ) => color === colorValue\n\t\t);\n\t\treturn colorObject\n\t\t\t? 'var:preset|color|' + colorObject.slug\n\t\t\t: colorValue;\n\t};\n\tconst encodeGradientValue = ( gradientValue ) => {\n\t\tconst allGradients = gradients.flatMap(\n\t\t\t( { gradients: originGradients } ) => originGradients\n\t\t);\n\t\tconst gradientObject = allGradients.find(\n\t\t\t( { gradient } ) => gradient === gradientValue\n\t\t);\n\t\treturn gradientObject\n\t\t\t? 'var:preset|gradient|' + gradientObject.slug\n\t\t\t: gradientValue;\n\t};\n\n\t// BackgroundColor\n\tconst showBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst backgroundColor = decodeValue( inheritedValue?.color?.background );\n\tconst userBackgroundColor = decodeValue( value?.color?.background );\n\tconst gradient = decodeValue( inheritedValue?.color?.gradient );\n\tconst userGradient = decodeValue( value?.color?.gradient );\n\tconst hasBackground = () => !! userBackgroundColor || !! userGradient;\n\tconst setBackgroundColor = ( newColor ) => {\n\t\tconst newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'background' ],\n\t\t\tencodeColorValue( newColor )\n\t\t);\n\t\tnewValue.color.gradient = undefined;\n\t\tonChange( newValue );\n\t};\n\tconst setGradient = ( newGradient ) => {\n\t\tconst newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'gradient' ],\n\t\t\tencodeGradientValue( newGradient )\n\t\t);\n\t\tnewValue.color.background = undefined;\n\t\tonChange( newValue );\n\t};\n\tconst resetBackground = () => {\n\t\tconst newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'background' ],\n\t\t\tundefined\n\t\t);\n\t\tnewValue.color.gradient = undefined;\n\t\tonChange( newValue );\n\t};\n\n\t// Links\n\tconst showLinkPanel = useHasLinkPanel( settings );\n\tconst linkColor = decodeValue(\n\t\tinheritedValue?.elements?.link?.color?.text\n\t);\n\tconst userLinkColor = decodeValue( value?.elements?.link?.color?.text );\n\tconst setLinkColor = ( newColor ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\t\t\tencodeColorValue( newColor )\n\t\t\t)\n\t\t);\n\t};\n\tconst hoverLinkColor = decodeValue(\n\t\tinheritedValue?.elements?.link?.[ ':hover' ]?.color?.text\n\t);\n\tconst userHoverLinkColor = decodeValue(\n\t\tvalue?.elements?.link?.[ ':hover' ]?.color?.text\n\t);\n\tconst setHoverLinkColor = ( newColor ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', 'link', ':hover', 'color', 'text' ],\n\t\t\t\tencodeColorValue( newColor )\n\t\t\t)\n\t\t);\n\t};\n\tconst hasLink = () => !! userLinkColor || !! userHoverLinkColor;\n\tconst resetLink = () => {\n\t\tlet newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'elements', 'link', ':hover', 'color', 'text' ],\n\t\t\tundefined\n\t\t);\n\t\tnewValue = setImmutably(\n\t\t\tnewValue,\n\t\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\t\tundefined\n\t\t);\n\t\tonChange( newValue );\n\t};\n\n\t// Text Color\n\tconst showTextPanel = useHasTextPanel( settings );\n\tconst textColor = decodeValue( inheritedValue?.color?.text );\n\tconst userTextColor = decodeValue( value?.color?.text );\n\tconst hasTextColor = () => !! userTextColor;\n\tconst setTextColor = ( newColor ) => {\n\t\tlet changedObject = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'text' ],\n\t\t\tencodeColorValue( newColor )\n\t\t);\n\t\tif ( textColor === linkColor ) {\n\t\t\tchangedObject = setImmutably(\n\t\t\t\tchangedObject,\n\t\t\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\t\t\tencodeColorValue( newColor )\n\t\t\t);\n\t\t}\n\n\t\tonChange( changedObject );\n\t};\n\tconst resetTextColor = () => setTextColor( undefined );\n\n\t// Elements\n\tconst elements = [\n\t\t{\n\t\t\tname: 'caption',\n\t\t\tlabel: __( 'Captions' ),\n\t\t\tshowPanel: useHasCaptionPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'button',\n\t\t\tlabel: __( 'Button' ),\n\t\t\tshowPanel: useHasButtonPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'heading',\n\t\t\tlabel: __( 'Heading' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h1',\n\t\t\tlabel: __( 'H1' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h2',\n\t\t\tlabel: __( 'H2' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h3',\n\t\t\tlabel: __( 'H3' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h4',\n\t\t\tlabel: __( 'H4' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h5',\n\t\t\tlabel: __( 'H5' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h6',\n\t\t\tlabel: __( 'H6' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t];\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tcolor: undefined,\n\t\t\telements: {\n\t\t\t\t...previousValue?.elements,\n\t\t\t\tlink: {\n\t\t\t\t\t...previousValue?.elements?.link,\n\t\t\t\t\tcolor: undefined,\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tcolor: undefined,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t...elements.reduce( ( acc, element ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t[ element.name ]: {\n\t\t\t\t\t\t\t...previousValue?.elements?.[ element.name ],\n\t\t\t\t\t\t\tcolor: undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}, {} ),\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst items = [\n\t\tshowTextPanel && {\n\t\t\tkey: 'text',\n\t\t\tlabel: __( 'Text' ),\n\t\t\thasValue: hasTextColor,\n\t\t\tresetValue: resetTextColor,\n\t\t\tisShownByDefault: defaultControls.text,\n\t\t\tindicators: [ textColor ],\n\t\t\ttabs: [\n\t\t\t\t{\n\t\t\t\t\tkey: 'text',\n\t\t\t\t\tlabel: __( 'Text' ),\n\t\t\t\t\tinheritedValue: textColor,\n\t\t\t\t\tsetValue: setTextColor,\n\t\t\t\t\tuserValue: userTextColor,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\tshowBackgroundPanel && {\n\t\t\tkey: 'background',\n\t\t\tlabel: __( 'Background' ),\n\t\t\thasValue: hasBackground,\n\t\t\tresetValue: resetBackground,\n\t\t\tisShownByDefault: defaultControls.background,\n\t\t\tindicators: [ gradient ?? backgroundColor ],\n\t\t\ttabs: [\n\t\t\t\thasSolidColors && {\n\t\t\t\t\tkey: 'background',\n\t\t\t\t\tlabel: __( 'Solid' ),\n\t\t\t\t\tinheritedValue: backgroundColor,\n\t\t\t\t\tsetValue: setBackgroundColor,\n\t\t\t\t\tuserValue: userBackgroundColor,\n\t\t\t\t},\n\t\t\t\thasGradientColors && {\n\t\t\t\t\tkey: 'gradient',\n\t\t\t\t\tlabel: __( 'Gradient' ),\n\t\t\t\t\tinheritedValue: gradient,\n\t\t\t\t\tsetValue: setGradient,\n\t\t\t\t\tuserValue: userGradient,\n\t\t\t\t\tisGradient: true,\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t},\n\t\tshowLinkPanel && {\n\t\t\tkey: 'link',\n\t\t\tlabel: __( 'Link' ),\n\t\t\thasValue: hasLink,\n\t\t\tresetValue: resetLink,\n\t\t\tisShownByDefault: defaultControls.link,\n\t\t\tindicators: [ linkColor, hoverLinkColor ],\n\t\t\ttabs: [\n\t\t\t\t{\n\t\t\t\t\tkey: 'link',\n\t\t\t\t\tlabel: __( 'Default' ),\n\t\t\t\t\tinheritedValue: linkColor,\n\t\t\t\t\tsetValue: setLinkColor,\n\t\t\t\t\tuserValue: userLinkColor,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkey: 'hover',\n\t\t\t\t\tlabel: __( 'Hover' ),\n\t\t\t\t\tinheritedValue: hoverLinkColor,\n\t\t\t\t\tsetValue: setHoverLinkColor,\n\t\t\t\t\tuserValue: userHoverLinkColor,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t].filter( Boolean );\n\n\telements.forEach( ( { name, label, showPanel } ) => {\n\t\tif ( ! showPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementBackgroundColor = decodeValue(\n\t\t\tinheritedValue?.elements?.[ name ]?.color?.background\n\t\t);\n\t\tconst elementGradient = decodeValue(\n\t\t\tinheritedValue?.elements?.[ name ]?.color?.gradient\n\t\t);\n\t\tconst elementTextColor = decodeValue(\n\t\t\tinheritedValue?.elements?.[ name ]?.color?.text\n\t\t);\n\t\tconst elementBackgroundUserColor = decodeValue(\n\t\t\tvalue?.elements?.[ name ]?.color?.background\n\t\t);\n\t\tconst elementGradientUserColor = decodeValue(\n\t\t\tvalue?.elements?.[ name ]?.color?.gradient\n\t\t);\n\t\tconst elementTextUserColor = decodeValue(\n\t\t\tvalue?.elements?.[ name ]?.color?.text\n\t\t);\n\t\tconst hasElement = () =>\n\t\t\t!! (\n\t\t\t\telementTextUserColor ||\n\t\t\t\telementBackgroundUserColor ||\n\t\t\t\telementGradientUserColor\n\t\t\t);\n\t\tconst resetElement = () => {\n\t\t\tconst newValue = setImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', name, 'color', 'background' ],\n\t\t\t\tundefined\n\t\t\t);\n\t\t\tnewValue.elements[ name ].color.gradient = undefined;\n\t\t\tnewValue.elements[ name ].color.text = undefined;\n\t\t\tonChange( newValue );\n\t\t};\n\n\t\tconst setElementTextColor = ( newTextColor ) => {\n\t\t\tonChange(\n\t\t\t\tsetImmutably(\n\t\t\t\t\tvalue,\n\t\t\t\t\t[ 'elements', name, 'color', 'text' ],\n\t\t\t\t\tencodeColorValue( newTextColor )\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tconst setElementBackgroundColor = ( newBackgroundColor ) => {\n\t\t\tconst newValue = setImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', name, 'color', 'background' ],\n\t\t\t\tencodeColorValue( newBackgroundColor )\n\t\t\t);\n\t\t\tnewValue.elements[ name ].color.gradient = undefined;\n\t\t\tonChange( newValue );\n\t\t};\n\t\tconst setElementGradient = ( newGradient ) => {\n\t\t\tconst newValue = setImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', name, 'color', 'gradient' ],\n\t\t\t\tencodeGradientValue( newGradient )\n\t\t\t);\n\t\t\tnewValue.elements[ name ].color.background = undefined;\n\t\t\tonChange( newValue );\n\t\t};\n\t\tconst supportsTextColor = true;\n\t\t// Background color is not supported for `caption`\n\t\t// as there isn't yet a way to set padding for the element.\n\t\tconst supportsBackground = name !== 'caption';\n\n\t\titems.push( {\n\t\t\tkey: name,\n\t\t\tlabel,\n\t\t\thasValue: hasElement,\n\t\t\tresetValue: resetElement,\n\t\t\tisShownByDefault: defaultControls[ name ],\n\t\t\tindicators:\n\t\t\t\tsupportsTextColor && supportsBackground\n\t\t\t\t\t? [\n\t\t\t\t\t\t\telementTextColor,\n\t\t\t\t\t\t\telementGradient ?? elementBackgroundColor,\n\t\t\t\t\t ]\n\t\t\t\t\t: [\n\t\t\t\t\t\t\tsupportsTextColor\n\t\t\t\t\t\t\t\t? elementTextColor\n\t\t\t\t\t\t\t\t: elementGradient ?? elementBackgroundColor,\n\t\t\t\t\t ],\n\t\t\ttabs: [\n\t\t\t\thasSolidColors &&\n\t\t\t\t\tsupportsTextColor && {\n\t\t\t\t\t\tkey: 'text',\n\t\t\t\t\t\tlabel: __( 'Text' ),\n\t\t\t\t\t\tinheritedValue: elementTextColor,\n\t\t\t\t\t\tsetValue: setElementTextColor,\n\t\t\t\t\t\tuserValue: elementTextUserColor,\n\t\t\t\t\t},\n\t\t\t\thasSolidColors &&\n\t\t\t\t\tsupportsBackground && {\n\t\t\t\t\t\tkey: 'background',\n\t\t\t\t\t\tlabel: __( 'Background' ),\n\t\t\t\t\t\tinheritedValue: elementBackgroundColor,\n\t\t\t\t\t\tsetValue: setElementBackgroundColor,\n\t\t\t\t\t\tuserValue: elementBackgroundUserColor,\n\t\t\t\t\t},\n\t\t\t\thasGradientColors &&\n\t\t\t\t\tsupportsBackground && {\n\t\t\t\t\t\tkey: 'gradient',\n\t\t\t\t\t\tlabel: __( 'Gradient' ),\n\t\t\t\t\t\tinheritedValue: elementGradient,\n\t\t\t\t\t\tsetValue: setElementGradient,\n\t\t\t\t\t\tuserValue: elementGradientUserColor,\n\t\t\t\t\t\tisGradient: true,\n\t\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t} );\n\t} );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ items.map( ( item ) => (\n\t\t\t\t<ColorPanelDropdown\n\t\t\t\t\tkey={ item.key }\n\t\t\t\t\t{ ...item }\n\t\t\t\t\tcolorGradientControlSettings={ {\n\t\t\t\t\t\tcolors,\n\t\t\t\t\t\tdisableCustomColors: ! areCustomSolidsEnabled,\n\t\t\t\t\t\tgradients,\n\t\t\t\t\t\tdisableCustomGradients: ! areCustomGradientsEnabled,\n\t\t\t\t\t} }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,oCAAoC,IAAIC,sBAAsB,EAC9DC,cAAc,EACdC,IAAI,EACJC,QAAQ,EACRC,QAAQ,EACRC,MAAM,EACNC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,6BAA6B;AAC9D,SAASC,kBAAkB,EAAEC,qBAAqB,QAA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;QACnCnG,UAAU,EAAE;MACb,CAAC,CACF,CAAC4F,MAAM,CAAEC,OAAQ;IACnB,CAAE,CAAC;EACJ,CAAE,CAAC;EAEH,OACCtH,aAAA,CAAC+D,OAAO;IACPtE,cAAc,EAAGA,cAAgB;IACjCE,KAAK,EAAGA,KAAO;IACfD,QAAQ,EAAGA,QAAU;IACrBE,OAAO,EAAGA;EAAS,GAEjBwH,KAAK,CAACnG,GAAG,CAAIuH,IAAI,IAClBxI,aAAA,CAACsC,kBAAkB;IAClBlB,GAAG,EAAGoH,IAAI,CAACpH,GAAK;IAAA,GACXoH,IAAI;IACT3G,4BAA4B,EAAG;MAC9BjD,MAAM;MACN6J,mBAAmB,EAAE,CAAExE,sBAAsB;MAC7C9E,SAAS;MACTuJ,sBAAsB,EAAE,CAAExE;IAC3B,CAAG;IACHtE,OAAO,EAAGA;EAAS,CACnB,CACA,CAAC,EACDC,QACM,CAAC;AAEZ","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalHStack","HStack","__experimentalZStack","ZStack","__experimentalDropdownContentWrapper","DropdownContentWrapper","ColorIndicator","Flex","FlexItem","Dropdown","Button","privateApis","componentsPrivateApis","useCallback","__","sprintf","ColorGradientControl","useColorsPerOrigin","useGradientsPerOrigin","getValueFromVariable","TOOLSPANEL_DROPDOWNMENU_PROPS","setImmutably","unlock","useHasColorPanel","settings","hasTextPanel","useHasTextPanel","hasBackgroundPanel","useHasBackgroundPanel","hasLinkPanel","useHasLinkPanel","hasHeadingPanel","useHasHeadingPanel","hasButtonPanel","useHasButtonPanel","hasCaptionPanel","useHasCaptionPanel","colors","color","text","length","custom","link","caption","gradients","heading","customGradient","button","background","ColorToolsPanel","resetAllFilter","onChange","value","panelId","children","resetAll","updatedValue","createElement","label","hasInnerWrapper","headingLevel","className","__experimentalFirstVisibleItemClass","__experimentalLastVisibleItemClass","dropdownMenuProps","DEFAULT_CONTROLS","popoverProps","placement","offset","shift","LabeledColorIndicators","indicators","justify","isLayered","map","indicator","index","key","expanded","colorValue","title","ColorPanelTab","isGradient","inheritedValue","userValue","setValue","colorGradientControlSettings","showTitle","enableAlpha","__experimentalIsRenderedInSidebar","undefined","gradientValue","onColorChange","onGradientChange","clearable","ColorPanelDropdown","hasValue","resetValue","isShownByDefault","tabs","currentTab","find","tab","Tabs","onDeselect","renderToggle","onToggle","isOpen","toggleProps","onClick","renderContent","paddingSize","defaultTabId","TabList","Tab","tabId","TabPanel","focusable","ColorPanel","as","Wrapper","defaultControls","areCustomSolidsEnabled","areCustomGradientsEnabled","hasSolidColors","hasGradientColors","decodeValue","rawValue","encodeColorValue","allColors","flatMap","originColors","colorObject","slug","encodeGradientValue","allGradients","originGradients","gradientObject","gradient","showBackgroundPanel","backgroundColor","userBackgroundColor","userGradient","hasBackground","setBackgroundColor","newColor","newValue","setGradient","newGradient","resetBackground","showLinkPanel","linkColor","elements","userLinkColor","setLinkColor","hoverLinkColor","userHoverLinkColor","setHoverLinkColor","hasLink","resetLink","showTextPanel","textColor","userTextColor","hasTextColor","setTextColor","changedObject","resetTextColor","name","showPanel","previousValue","reduce","acc","element","items","filter","Boolean","forEach","elementBackgroundColor","elementGradient","elementTextColor","elementBackgroundUserColor","elementGradientUserColor","elementTextUserColor","hasElement","resetElement","setElementTextColor","newTextColor","setElementBackgroundColor","newBackgroundColor","setElementGradient","supportsTextColor","supportsBackground","push","item","disableCustomColors","disableCustomGradients"],"sources":["@wordpress/block-editor/src/components/global-styles/color-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\tColorIndicator,\n\tFlex,\n\tFlexItem,\n\tDropdown,\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorGradientControl from '../colors-gradients/control';\nimport { useColorsPerOrigin, useGradientsPerOrigin } from './hooks';\nimport { getValueFromVariable, TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';\nimport { setImmutably } from '../../utils/object';\nimport { unlock } from '../../lock-unlock';\n\nexport function useHasColorPanel( settings ) {\n\tconst hasTextPanel = useHasTextPanel( settings );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst hasLinkPanel = useHasLinkPanel( settings );\n\tconst hasHeadingPanel = useHasHeadingPanel( settings );\n\tconst hasButtonPanel = useHasButtonPanel( settings );\n\tconst hasCaptionPanel = useHasCaptionPanel( settings );\n\n\treturn (\n\t\thasTextPanel ||\n\t\thasBackgroundPanel ||\n\t\thasLinkPanel ||\n\t\thasHeadingPanel ||\n\t\thasButtonPanel ||\n\t\thasCaptionPanel\n\t);\n}\n\nexport function useHasTextPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.text &&\n\t\t( colors?.length > 0 || settings?.color?.custom )\n\t);\n}\n\nexport function useHasLinkPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.link &&\n\t\t( colors?.length > 0 || settings?.color?.custom )\n\t);\n}\n\nexport function useHasCaptionPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.caption &&\n\t\t( colors?.length > 0 || settings?.color?.custom )\n\t);\n}\n\nexport function useHasHeadingPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.heading &&\n\t\t( colors?.length > 0 ||\n\t\t\tsettings?.color?.custom ||\n\t\t\tgradients?.length > 0 ||\n\t\t\tsettings?.color?.customGradient )\n\t);\n}\n\nexport function useHasButtonPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.button &&\n\t\t( colors?.length > 0 ||\n\t\t\tsettings?.color?.custom ||\n\t\t\tgradients?.length > 0 ||\n\t\t\tsettings?.color?.customGradient )\n\t);\n}\n\nexport function useHasBackgroundPanel( settings ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\treturn (\n\t\tsettings?.color?.background &&\n\t\t( colors?.length > 0 ||\n\t\t\tsettings?.color?.custom ||\n\t\t\tgradients?.length > 0 ||\n\t\t\tsettings?.color?.customGradient )\n\t);\n}\n\nfunction ColorToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Elements' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\thasInnerWrapper\n\t\t\theadingLevel={ 3 }\n\t\t\tclassName=\"color-block-support-panel\"\n\t\t\t__experimentalFirstVisibleItemClass=\"first\"\n\t\t\t__experimentalLastVisibleItemClass=\"last\"\n\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t>\n\t\t\t<div className=\"color-block-support-panel__inner-wrapper\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\ttext: true,\n\tbackground: true,\n\tlink: true,\n\theading: true,\n\tbutton: true,\n\tcaption: true,\n};\n\nconst popoverProps = {\n\tplacement: 'left-start',\n\toffset: 36,\n\tshift: true,\n};\n\nconst LabeledColorIndicators = ( { indicators, label } ) => (\n\t<HStack justify=\"flex-start\">\n\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t{ indicators.map( ( indicator, index ) => (\n\t\t\t\t<Flex key={ index } expanded={ false }>\n\t\t\t\t\t<ColorIndicator colorValue={ indicator } />\n\t\t\t\t</Flex>\n\t\t\t) ) }\n\t\t</ZStack>\n\t\t<FlexItem\n\t\t\tclassName=\"block-editor-panel-color-gradient-settings__color-name\"\n\t\t\ttitle={ label }\n\t\t>\n\t\t\t{ label }\n\t\t</FlexItem>\n\t</HStack>\n);\n\nfunction ColorPanelTab( {\n\tisGradient,\n\tinheritedValue,\n\tuserValue,\n\tsetValue,\n\tcolorGradientControlSettings,\n} ) {\n\treturn (\n\t\t<ColorGradientControl\n\t\t\t{ ...colorGradientControlSettings }\n\t\t\tshowTitle={ false }\n\t\t\tenableAlpha\n\t\t\t__experimentalIsRenderedInSidebar\n\t\t\tcolorValue={ isGradient ? undefined : inheritedValue }\n\t\t\tgradientValue={ isGradient ? inheritedValue : undefined }\n\t\t\tonColorChange={ isGradient ? undefined : setValue }\n\t\t\tonGradientChange={ isGradient ? setValue : undefined }\n\t\t\tclearable={ inheritedValue === userValue }\n\t\t\theadingLevel={ 3 }\n\t\t/>\n\t);\n}\n\nfunction ColorPanelDropdown( {\n\tlabel,\n\thasValue,\n\tresetValue,\n\tisShownByDefault,\n\tindicators,\n\ttabs,\n\tcolorGradientControlSettings,\n\tpanelId,\n} ) {\n\tconst currentTab = tabs.find( ( tab ) => tab.userValue !== undefined );\n\t// Unlocking `Tabs` too early causes the `unlock` method to receive an empty\n\t// object, due to circular dependencies.\n\t// See https://github.com/WordPress/gutenberg/issues/52692\n\tconst { Tabs } = unlock( componentsPrivateApis );\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\tclassName=\"block-editor-tools-panel-color-gradient-settings__item\"\n\t\t\thasValue={ hasValue }\n\t\t\tlabel={ label }\n\t\t\tonDeselect={ resetValue }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tclassName=\"block-editor-tools-panel-color-gradient-settings__dropdown\"\n\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\t\tconst toggleProps = {\n\t\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t\t'block-editor-panel-color-gradient-settings__dropdown',\n\t\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t\t\t'aria-label': sprintf(\n\t\t\t\t\t\t\t/* translators: %s is the type of color property, e.g., \"background\" */\n\t\t\t\t\t\t\t__( 'Color %s styles' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button { ...toggleProps }>\n\t\t\t\t\t\t\t<LabeledColorIndicators\n\t\t\t\t\t\t\t\tindicators={ indicators }\n\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t\trenderContent={ () => (\n\t\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t\t<div className=\"block-editor-panel-color-gradient-settings__dropdown-content\">\n\t\t\t\t\t\t\t{ tabs.length === 1 && (\n\t\t\t\t\t\t\t\t<ColorPanelTab\n\t\t\t\t\t\t\t\t\t{ ...tabs[ 0 ] }\n\t\t\t\t\t\t\t\t\tcolorGradientControlSettings={\n\t\t\t\t\t\t\t\t\t\tcolorGradientControlSettings\n\t\t\t\t\t\t\t\t\t}\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{ tabs.length > 1 && (\n\t\t\t\t\t\t\t\t<Tabs defaultTabId={ currentTab?.key }>\n\t\t\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t\ttabId={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{ tab.label }\n\t\t\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t\t</Tabs.TabList>\n\n\t\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t\ttabId={ tab.key }\n\t\t\t\t\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<ColorPanelTab\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ ...tab }\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolorGradientControlSettings={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolorGradientControlSettings\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</DropdownContentWrapper>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n\nexport default function ColorPanel( {\n\tas: Wrapper = ColorToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tchildren,\n} ) {\n\tconst colors = useColorsPerOrigin( settings );\n\tconst gradients = useGradientsPerOrigin( settings );\n\tconst areCustomSolidsEnabled = settings?.color?.custom;\n\tconst areCustomGradientsEnabled = settings?.color?.customGradient;\n\tconst hasSolidColors = colors.length > 0 || areCustomSolidsEnabled;\n\tconst hasGradientColors = gradients.length > 0 || areCustomGradientsEnabled;\n\tconst decodeValue = ( rawValue ) =>\n\t\tgetValueFromVariable( { settings }, '', rawValue );\n\tconst encodeColorValue = ( colorValue ) => {\n\t\tconst allColors = colors.flatMap(\n\t\t\t( { colors: originColors } ) => originColors\n\t\t);\n\t\tconst colorObject = allColors.find(\n\t\t\t( { color } ) => color === colorValue\n\t\t);\n\t\treturn colorObject\n\t\t\t? 'var:preset|color|' + colorObject.slug\n\t\t\t: colorValue;\n\t};\n\tconst encodeGradientValue = ( gradientValue ) => {\n\t\tconst allGradients = gradients.flatMap(\n\t\t\t( { gradients: originGradients } ) => originGradients\n\t\t);\n\t\tconst gradientObject = allGradients.find(\n\t\t\t( { gradient } ) => gradient === gradientValue\n\t\t);\n\t\treturn gradientObject\n\t\t\t? 'var:preset|gradient|' + gradientObject.slug\n\t\t\t: gradientValue;\n\t};\n\n\t// BackgroundColor\n\tconst showBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst backgroundColor = decodeValue( inheritedValue?.color?.background );\n\tconst userBackgroundColor = decodeValue( value?.color?.background );\n\tconst gradient = decodeValue( inheritedValue?.color?.gradient );\n\tconst userGradient = decodeValue( value?.color?.gradient );\n\tconst hasBackground = () => !! userBackgroundColor || !! userGradient;\n\tconst setBackgroundColor = ( newColor ) => {\n\t\tconst newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'background' ],\n\t\t\tencodeColorValue( newColor )\n\t\t);\n\t\tnewValue.color.gradient = undefined;\n\t\tonChange( newValue );\n\t};\n\tconst setGradient = ( newGradient ) => {\n\t\tconst newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'gradient' ],\n\t\t\tencodeGradientValue( newGradient )\n\t\t);\n\t\tnewValue.color.background = undefined;\n\t\tonChange( newValue );\n\t};\n\tconst resetBackground = () => {\n\t\tconst newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'background' ],\n\t\t\tundefined\n\t\t);\n\t\tnewValue.color.gradient = undefined;\n\t\tonChange( newValue );\n\t};\n\n\t// Links\n\tconst showLinkPanel = useHasLinkPanel( settings );\n\tconst linkColor = decodeValue(\n\t\tinheritedValue?.elements?.link?.color?.text\n\t);\n\tconst userLinkColor = decodeValue( value?.elements?.link?.color?.text );\n\tconst setLinkColor = ( newColor ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\t\t\tencodeColorValue( newColor )\n\t\t\t)\n\t\t);\n\t};\n\tconst hoverLinkColor = decodeValue(\n\t\tinheritedValue?.elements?.link?.[ ':hover' ]?.color?.text\n\t);\n\tconst userHoverLinkColor = decodeValue(\n\t\tvalue?.elements?.link?.[ ':hover' ]?.color?.text\n\t);\n\tconst setHoverLinkColor = ( newColor ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', 'link', ':hover', 'color', 'text' ],\n\t\t\t\tencodeColorValue( newColor )\n\t\t\t)\n\t\t);\n\t};\n\tconst hasLink = () => !! userLinkColor || !! userHoverLinkColor;\n\tconst resetLink = () => {\n\t\tlet newValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'elements', 'link', ':hover', 'color', 'text' ],\n\t\t\tundefined\n\t\t);\n\t\tnewValue = setImmutably(\n\t\t\tnewValue,\n\t\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\t\tundefined\n\t\t);\n\t\tonChange( newValue );\n\t};\n\n\t// Text Color\n\tconst showTextPanel = useHasTextPanel( settings );\n\tconst textColor = decodeValue( inheritedValue?.color?.text );\n\tconst userTextColor = decodeValue( value?.color?.text );\n\tconst hasTextColor = () => !! userTextColor;\n\tconst setTextColor = ( newColor ) => {\n\t\tlet changedObject = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'color', 'text' ],\n\t\t\tencodeColorValue( newColor )\n\t\t);\n\t\tif ( textColor === linkColor ) {\n\t\t\tchangedObject = setImmutably(\n\t\t\t\tchangedObject,\n\t\t\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\t\t\tencodeColorValue( newColor )\n\t\t\t);\n\t\t}\n\n\t\tonChange( changedObject );\n\t};\n\tconst resetTextColor = () => setTextColor( undefined );\n\n\t// Elements\n\tconst elements = [\n\t\t{\n\t\t\tname: 'caption',\n\t\t\tlabel: __( 'Captions' ),\n\t\t\tshowPanel: useHasCaptionPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'button',\n\t\t\tlabel: __( 'Button' ),\n\t\t\tshowPanel: useHasButtonPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'heading',\n\t\t\tlabel: __( 'Heading' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h1',\n\t\t\tlabel: __( 'H1' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h2',\n\t\t\tlabel: __( 'H2' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h3',\n\t\t\tlabel: __( 'H3' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h4',\n\t\t\tlabel: __( 'H4' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h5',\n\t\t\tlabel: __( 'H5' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t\t{\n\t\t\tname: 'h6',\n\t\t\tlabel: __( 'H6' ),\n\t\t\tshowPanel: useHasHeadingPanel( settings ),\n\t\t},\n\t];\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tcolor: undefined,\n\t\t\telements: {\n\t\t\t\t...previousValue?.elements,\n\t\t\t\tlink: {\n\t\t\t\t\t...previousValue?.elements?.link,\n\t\t\t\t\tcolor: undefined,\n\t\t\t\t\t':hover': {\n\t\t\t\t\t\tcolor: undefined,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t...elements.reduce( ( acc, element ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t[ element.name ]: {\n\t\t\t\t\t\t\t...previousValue?.elements?.[ element.name ],\n\t\t\t\t\t\t\tcolor: undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}, {} ),\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst items = [\n\t\tshowTextPanel && {\n\t\t\tkey: 'text',\n\t\t\tlabel: __( 'Text' ),\n\t\t\thasValue: hasTextColor,\n\t\t\tresetValue: resetTextColor,\n\t\t\tisShownByDefault: defaultControls.text,\n\t\t\tindicators: [ textColor ],\n\t\t\ttabs: [\n\t\t\t\t{\n\t\t\t\t\tkey: 'text',\n\t\t\t\t\tlabel: __( 'Text' ),\n\t\t\t\t\tinheritedValue: textColor,\n\t\t\t\t\tsetValue: setTextColor,\n\t\t\t\t\tuserValue: userTextColor,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\tshowBackgroundPanel && {\n\t\t\tkey: 'background',\n\t\t\tlabel: __( 'Background' ),\n\t\t\thasValue: hasBackground,\n\t\t\tresetValue: resetBackground,\n\t\t\tisShownByDefault: defaultControls.background,\n\t\t\tindicators: [ gradient ?? backgroundColor ],\n\t\t\ttabs: [\n\t\t\t\thasSolidColors && {\n\t\t\t\t\tkey: 'background',\n\t\t\t\t\tlabel: __( 'Color' ),\n\t\t\t\t\tinheritedValue: backgroundColor,\n\t\t\t\t\tsetValue: setBackgroundColor,\n\t\t\t\t\tuserValue: userBackgroundColor,\n\t\t\t\t},\n\t\t\t\thasGradientColors && {\n\t\t\t\t\tkey: 'gradient',\n\t\t\t\t\tlabel: __( 'Gradient' ),\n\t\t\t\t\tinheritedValue: gradient,\n\t\t\t\t\tsetValue: setGradient,\n\t\t\t\t\tuserValue: userGradient,\n\t\t\t\t\tisGradient: true,\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t},\n\t\tshowLinkPanel && {\n\t\t\tkey: 'link',\n\t\t\tlabel: __( 'Link' ),\n\t\t\thasValue: hasLink,\n\t\t\tresetValue: resetLink,\n\t\t\tisShownByDefault: defaultControls.link,\n\t\t\tindicators: [ linkColor, hoverLinkColor ],\n\t\t\ttabs: [\n\t\t\t\t{\n\t\t\t\t\tkey: 'link',\n\t\t\t\t\tlabel: __( 'Default' ),\n\t\t\t\t\tinheritedValue: linkColor,\n\t\t\t\t\tsetValue: setLinkColor,\n\t\t\t\t\tuserValue: userLinkColor,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tkey: 'hover',\n\t\t\t\t\tlabel: __( 'Hover' ),\n\t\t\t\t\tinheritedValue: hoverLinkColor,\n\t\t\t\t\tsetValue: setHoverLinkColor,\n\t\t\t\t\tuserValue: userHoverLinkColor,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t].filter( Boolean );\n\n\telements.forEach( ( { name, label, showPanel } ) => {\n\t\tif ( ! showPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst elementBackgroundColor = decodeValue(\n\t\t\tinheritedValue?.elements?.[ name ]?.color?.background\n\t\t);\n\t\tconst elementGradient = decodeValue(\n\t\t\tinheritedValue?.elements?.[ name ]?.color?.gradient\n\t\t);\n\t\tconst elementTextColor = decodeValue(\n\t\t\tinheritedValue?.elements?.[ name ]?.color?.text\n\t\t);\n\t\tconst elementBackgroundUserColor = decodeValue(\n\t\t\tvalue?.elements?.[ name ]?.color?.background\n\t\t);\n\t\tconst elementGradientUserColor = decodeValue(\n\t\t\tvalue?.elements?.[ name ]?.color?.gradient\n\t\t);\n\t\tconst elementTextUserColor = decodeValue(\n\t\t\tvalue?.elements?.[ name ]?.color?.text\n\t\t);\n\t\tconst hasElement = () =>\n\t\t\t!! (\n\t\t\t\telementTextUserColor ||\n\t\t\t\telementBackgroundUserColor ||\n\t\t\t\telementGradientUserColor\n\t\t\t);\n\t\tconst resetElement = () => {\n\t\t\tconst newValue = setImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', name, 'color', 'background' ],\n\t\t\t\tundefined\n\t\t\t);\n\t\t\tnewValue.elements[ name ].color.gradient = undefined;\n\t\t\tnewValue.elements[ name ].color.text = undefined;\n\t\t\tonChange( newValue );\n\t\t};\n\n\t\tconst setElementTextColor = ( newTextColor ) => {\n\t\t\tonChange(\n\t\t\t\tsetImmutably(\n\t\t\t\t\tvalue,\n\t\t\t\t\t[ 'elements', name, 'color', 'text' ],\n\t\t\t\t\tencodeColorValue( newTextColor )\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tconst setElementBackgroundColor = ( newBackgroundColor ) => {\n\t\t\tconst newValue = setImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', name, 'color', 'background' ],\n\t\t\t\tencodeColorValue( newBackgroundColor )\n\t\t\t);\n\t\t\tnewValue.elements[ name ].color.gradient = undefined;\n\t\t\tonChange( newValue );\n\t\t};\n\t\tconst setElementGradient = ( newGradient ) => {\n\t\t\tconst newValue = setImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'elements', name, 'color', 'gradient' ],\n\t\t\t\tencodeGradientValue( newGradient )\n\t\t\t);\n\t\t\tnewValue.elements[ name ].color.background = undefined;\n\t\t\tonChange( newValue );\n\t\t};\n\t\tconst supportsTextColor = true;\n\t\t// Background color is not supported for `caption`\n\t\t// as there isn't yet a way to set padding for the element.\n\t\tconst supportsBackground = name !== 'caption';\n\n\t\titems.push( {\n\t\t\tkey: name,\n\t\t\tlabel,\n\t\t\thasValue: hasElement,\n\t\t\tresetValue: resetElement,\n\t\t\tisShownByDefault: defaultControls[ name ],\n\t\t\tindicators:\n\t\t\t\tsupportsTextColor && supportsBackground\n\t\t\t\t\t? [\n\t\t\t\t\t\t\telementTextColor,\n\t\t\t\t\t\t\telementGradient ?? elementBackgroundColor,\n\t\t\t\t\t ]\n\t\t\t\t\t: [\n\t\t\t\t\t\t\tsupportsTextColor\n\t\t\t\t\t\t\t\t? elementTextColor\n\t\t\t\t\t\t\t\t: elementGradient ?? elementBackgroundColor,\n\t\t\t\t\t ],\n\t\t\ttabs: [\n\t\t\t\thasSolidColors &&\n\t\t\t\t\tsupportsTextColor && {\n\t\t\t\t\t\tkey: 'text',\n\t\t\t\t\t\tlabel: __( 'Text' ),\n\t\t\t\t\t\tinheritedValue: elementTextColor,\n\t\t\t\t\t\tsetValue: setElementTextColor,\n\t\t\t\t\t\tuserValue: elementTextUserColor,\n\t\t\t\t\t},\n\t\t\t\thasSolidColors &&\n\t\t\t\t\tsupportsBackground && {\n\t\t\t\t\t\tkey: 'background',\n\t\t\t\t\t\tlabel: __( 'Background' ),\n\t\t\t\t\t\tinheritedValue: elementBackgroundColor,\n\t\t\t\t\t\tsetValue: setElementBackgroundColor,\n\t\t\t\t\t\tuserValue: elementBackgroundUserColor,\n\t\t\t\t\t},\n\t\t\t\thasGradientColors &&\n\t\t\t\t\tsupportsBackground && {\n\t\t\t\t\t\tkey: 'gradient',\n\t\t\t\t\t\tlabel: __( 'Gradient' ),\n\t\t\t\t\t\tinheritedValue: elementGradient,\n\t\t\t\t\t\tsetValue: setElementGradient,\n\t\t\t\t\t\tuserValue: elementGradientUserColor,\n\t\t\t\t\t\tisGradient: true,\n\t\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t} );\n\t} );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ items.map( ( item ) => (\n\t\t\t\t<ColorPanelDropdown\n\t\t\t\t\tkey={ item.key }\n\t\t\t\t\t{ ...item }\n\t\t\t\t\tcolorGradientControlSettings={ {\n\t\t\t\t\t\tcolors,\n\t\t\t\t\t\tdisableCustomColors: ! areCustomSolidsEnabled,\n\t\t\t\t\t\tgradients,\n\t\t\t\t\t\tdisableCustomGradients: ! areCustomGradientsEnabled,\n\t\t\t\t\t} }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,oCAAoC,IAAIC,sBAAsB,EAC9DC,cAAc,EACdC,IAAI,EACJC,QAAQ,EACRC,QAAQ,EACRC,MAAM,EACNC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,6BAA6B;AAC9D,SAASC,kBAAkB,EAAEC,qBAAqB,QAAQ,SAAS;AACnE,SAASC,oBAAoB,EAAEC,6BAA6B,QAAQ,SAAS;AAC7E,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,OAAO,SAASC,gBAAgBA,CAAEC,QAAQ,EAAG;EAC5C,MAAMC,YAAY,GAAGC,eAAe,CAAEF,QAAS,CAAC;EAChD,MAAMG,kBAAkB,GAAGC,qBAAqB,CAAEJ,QAAS,CAAC;EAC5D,MAAMK,YAAY,GAAGC,eAAe,CA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