@wordpress/edit-site 6.10.0 → 6.12.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 (516) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/add-new-post/index.js +1 -1
  3. package/build/components/add-new-post/index.js.map +1 -1
  4. package/build/components/add-new-template/index.js +1 -1
  5. package/build/components/add-new-template/index.js.map +1 -1
  6. package/build/components/add-new-template/utils.js +8 -8
  7. package/build/components/add-new-template/utils.js.map +1 -1
  8. package/build/components/app/index.js +2 -2
  9. package/build/components/app/index.js.map +1 -1
  10. package/build/components/block-editor/use-editor-iframe-props.js +29 -22
  11. package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
  12. package/build/components/block-editor/use-site-editor-settings.js +10 -8
  13. package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
  14. package/build/components/editor/index.js +32 -14
  15. package/build/components/editor/index.js.map +1 -1
  16. package/build/components/editor/use-adapt-editor-to-canvas.js +49 -0
  17. package/build/components/editor/use-adapt-editor-to-canvas.js.map +1 -0
  18. package/build/components/editor/use-editor-title.js +30 -13
  19. package/build/components/editor/use-editor-title.js.map +1 -1
  20. package/build/components/global-styles/font-sizes/font-size.js +6 -6
  21. package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
  22. package/build/components/global-styles/font-sizes/font-sizes-count.js +0 -1
  23. package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  24. package/build/components/global-styles/font-sizes/font-sizes.js +4 -4
  25. package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  26. package/build/components/global-styles/palette.js +16 -13
  27. package/build/components/global-styles/palette.js.map +1 -1
  28. package/build/components/global-styles/root-menu.js +0 -4
  29. package/build/components/global-styles/root-menu.js.map +1 -1
  30. package/build/components/global-styles/screen-block-list.js +0 -4
  31. package/build/components/global-styles/screen-block-list.js.map +1 -1
  32. package/build/components/global-styles/screen-css.js +1 -1
  33. package/build/components/global-styles/screen-css.js.map +1 -1
  34. package/build/components/global-styles/screen-revisions/revisions-buttons.js +26 -24
  35. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  36. package/build/components/global-styles/screen-root.js +0 -3
  37. package/build/components/global-styles/screen-root.js.map +1 -1
  38. package/build/components/global-styles/screen-style-variations.js +5 -1
  39. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  40. package/build/components/global-styles/shadows-edit-panel.js +11 -13
  41. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  42. package/build/components/global-styles/shadows-panel.js +0 -3
  43. package/build/components/global-styles/shadows-panel.js.map +1 -1
  44. package/build/components/global-styles/typography-elements.js +1 -4
  45. package/build/components/global-styles/typography-elements.js.map +1 -1
  46. package/build/components/global-styles/ui.js +49 -2
  47. package/build/components/global-styles/ui.js.map +1 -1
  48. package/build/components/global-styles/variations/variation.js +2 -2
  49. package/build/components/global-styles/variations/variation.js.map +1 -1
  50. package/build/components/global-styles/variations/variations-panel.js +0 -1
  51. package/build/components/global-styles/variations/variations-panel.js.map +1 -1
  52. package/build/components/global-styles-renderer/index.js +6 -8
  53. package/build/components/global-styles-renderer/index.js.map +1 -1
  54. package/build/components/global-styles-sidebar/default-sidebar.js +0 -1
  55. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  56. package/build/components/global-styles-sidebar/index.js +43 -30
  57. package/build/components/global-styles-sidebar/index.js.map +1 -1
  58. package/build/components/layout/animation.js +1 -3
  59. package/build/components/layout/animation.js.map +1 -1
  60. package/build/components/layout/hooks.js +1 -10
  61. package/build/components/layout/hooks.js.map +1 -1
  62. package/build/components/layout/index.js +23 -35
  63. package/build/components/layout/index.js.map +1 -1
  64. package/build/components/layout/router.js +17 -140
  65. package/build/components/layout/router.js.map +1 -1
  66. package/build/components/page-patterns/delete-category-menu-item.js +3 -3
  67. package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
  68. package/build/components/page-patterns/fields.js +3 -7
  69. package/build/components/page-patterns/fields.js.map +1 -1
  70. package/build/components/page-patterns/use-pattern-settings.js +1 -1
  71. package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
  72. package/build/components/page-templates/fields.js +1 -2
  73. package/build/components/page-templates/fields.js.map +1 -1
  74. package/build/components/page-templates/index.js +1 -2
  75. package/build/components/page-templates/index.js.map +1 -1
  76. package/build/components/pagination/index.js +1 -1
  77. package/build/components/pagination/index.js.map +1 -1
  78. package/build/components/post-edit/index.js +15 -5
  79. package/build/components/post-edit/index.js.map +1 -1
  80. package/build/components/post-fields/index.js +4 -244
  81. package/build/components/post-fields/index.js.map +1 -1
  82. package/build/components/post-list/index.js +12 -2
  83. package/build/components/post-list/index.js.map +1 -1
  84. package/build/components/posts-app/index.js.map +1 -1
  85. package/build/components/posts-app/router.js +4 -4
  86. package/build/components/posts-app/router.js.map +1 -1
  87. package/build/components/resizable-frame/index.js +21 -9
  88. package/build/components/resizable-frame/index.js.map +1 -1
  89. package/build/components/revisions/index.js +1 -1
  90. package/build/components/revisions/index.js.map +1 -1
  91. package/build/components/save-keyboard-shortcut/index.js +78 -0
  92. package/build/components/save-keyboard-shortcut/index.js.map +1 -0
  93. package/build/components/save-panel/index.js +17 -6
  94. package/build/components/save-panel/index.js.map +1 -1
  95. package/build/components/sidebar/index.js +11 -3
  96. package/build/components/sidebar/index.js.map +1 -1
  97. package/build/components/sidebar-dataviews/default-views.js +2 -5
  98. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  99. package/build/components/sidebar-global-styles-wrapper/index.js +129 -0
  100. package/build/components/sidebar-global-styles-wrapper/index.js.map +1 -0
  101. package/build/components/sidebar-navigation-screen/index.js +2 -1
  102. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  103. package/build/components/sidebar-navigation-screen-global-styles/index.js +33 -71
  104. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  105. package/build/components/sidebar-navigation-screen-main/index.js +43 -42
  106. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  107. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
  108. package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  109. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +3 -3
  110. package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  111. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +7 -12
  112. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  113. package/build/components/site-editor-routes/home-edit.js +26 -0
  114. package/build/components/site-editor-routes/home-edit.js.map +1 -0
  115. package/build/components/site-editor-routes/home-view.js +25 -0
  116. package/build/components/site-editor-routes/home-view.js.map +1 -0
  117. package/build/components/site-editor-routes/index.js +49 -0
  118. package/build/components/site-editor-routes/index.js.map +1 -0
  119. package/build/components/site-editor-routes/navigation-edit.js +29 -0
  120. package/build/components/site-editor-routes/navigation-edit.js.map +1 -0
  121. package/build/components/site-editor-routes/navigation-item-edit.js +31 -0
  122. package/build/components/site-editor-routes/navigation-item-edit.js.map +1 -0
  123. package/build/components/site-editor-routes/navigation-item-view.js +30 -0
  124. package/build/components/site-editor-routes/navigation-item-view.js.map +1 -0
  125. package/build/components/site-editor-routes/navigation-view.js +28 -0
  126. package/build/components/site-editor-routes/navigation-view.js.map +1 -0
  127. package/build/components/site-editor-routes/pages-edit.js +43 -0
  128. package/build/components/site-editor-routes/pages-edit.js.map +1 -0
  129. package/build/components/site-editor-routes/pages-list-view-quick-edit.js +64 -0
  130. package/build/components/site-editor-routes/pages-list-view-quick-edit.js.map +1 -0
  131. package/build/components/site-editor-routes/pages-list-view.js +47 -0
  132. package/build/components/site-editor-routes/pages-list-view.js.map +1 -0
  133. package/build/components/site-editor-routes/pages-view-quick-edit.js +61 -0
  134. package/build/components/site-editor-routes/pages-view-quick-edit.js.map +1 -0
  135. package/build/components/site-editor-routes/pages-view.js +42 -0
  136. package/build/components/site-editor-routes/pages-view.js.map +1 -0
  137. package/build/components/site-editor-routes/patterns-edit.js +31 -0
  138. package/build/components/site-editor-routes/patterns-edit.js.map +1 -0
  139. package/build/components/site-editor-routes/patterns-view.js +29 -0
  140. package/build/components/site-editor-routes/patterns-view.js.map +1 -0
  141. package/build/components/site-editor-routes/styles-edit.js +33 -0
  142. package/build/components/site-editor-routes/styles-edit.js.map +1 -0
  143. package/build/components/site-editor-routes/styles-view.js +33 -0
  144. package/build/components/site-editor-routes/styles-view.js.map +1 -0
  145. package/build/components/site-editor-routes/templates-edit.js +31 -0
  146. package/build/components/site-editor-routes/templates-edit.js.map +1 -0
  147. package/build/components/site-editor-routes/templates-list-view.js +34 -0
  148. package/build/components/site-editor-routes/templates-list-view.js.map +1 -0
  149. package/build/components/site-editor-routes/templates-view.js +29 -0
  150. package/build/components/site-editor-routes/templates-view.js.map +1 -0
  151. package/build/components/site-hub/index.js +22 -8
  152. package/build/components/site-hub/index.js.map +1 -1
  153. package/build/components/style-book/color-examples.js +46 -0
  154. package/build/components/style-book/color-examples.js.map +1 -0
  155. package/build/components/style-book/constants.js +85 -13
  156. package/build/components/style-book/constants.js.map +1 -1
  157. package/build/components/style-book/duotone-examples.js +55 -0
  158. package/build/components/style-book/duotone-examples.js.map +1 -0
  159. package/build/components/style-book/examples.js +116 -3
  160. package/build/components/style-book/examples.js.map +1 -1
  161. package/build/components/style-book/index.js +161 -46
  162. package/build/components/style-book/index.js.map +1 -1
  163. package/build/components/style-book/types.js.map +1 -1
  164. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +38 -33
  165. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  166. package/build/components/welcome-guide/index.js +4 -2
  167. package/build/components/welcome-guide/index.js.map +1 -1
  168. package/build/components/welcome-guide/page.js +1 -9
  169. package/build/components/welcome-guide/page.js.map +1 -1
  170. package/build/components/welcome-guide/template.js +1 -12
  171. package/build/components/welcome-guide/template.js.map +1 -1
  172. package/build/hooks/commands/use-common-commands.js +61 -45
  173. package/build/hooks/commands/use-common-commands.js.map +1 -1
  174. package/build/hooks/commands/use-set-command-context.js +12 -15
  175. package/build/hooks/commands/use-set-command-context.js.map +1 -1
  176. package/build/index.js +1 -0
  177. package/build/index.js.map +1 -1
  178. package/build/posts.js +1 -0
  179. package/build/posts.js.map +1 -1
  180. package/build/store/private-actions.js +8 -60
  181. package/build/store/private-actions.js.map +1 -1
  182. package/build/store/private-selectors.js +4 -12
  183. package/build/store/private-selectors.js.map +1 -1
  184. package/build/store/reducer.js +9 -18
  185. package/build/store/reducer.js.map +1 -1
  186. package/build-module/components/add-new-post/index.js +1 -1
  187. package/build-module/components/add-new-post/index.js.map +1 -1
  188. package/build-module/components/add-new-template/index.js +1 -1
  189. package/build-module/components/add-new-template/index.js.map +1 -1
  190. package/build-module/components/add-new-template/utils.js +9 -9
  191. package/build-module/components/add-new-template/utils.js.map +1 -1
  192. package/build-module/components/app/index.js +4 -4
  193. package/build-module/components/app/index.js.map +1 -1
  194. package/build-module/components/block-editor/use-editor-iframe-props.js +30 -23
  195. package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
  196. package/build-module/components/block-editor/use-site-editor-settings.js +10 -8
  197. package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
  198. package/build-module/components/editor/index.js +32 -14
  199. package/build-module/components/editor/index.js.map +1 -1
  200. package/build-module/components/editor/use-adapt-editor-to-canvas.js +42 -0
  201. package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +1 -0
  202. package/build-module/components/editor/use-editor-title.js +31 -14
  203. package/build-module/components/editor/use-editor-title.js.map +1 -1
  204. package/build-module/components/global-styles/font-sizes/font-size.js +6 -6
  205. package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
  206. package/build-module/components/global-styles/font-sizes/font-sizes-count.js +0 -1
  207. package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -1
  208. package/build-module/components/global-styles/font-sizes/font-sizes.js +4 -4
  209. package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
  210. package/build-module/components/global-styles/palette.js +17 -14
  211. package/build-module/components/global-styles/palette.js.map +1 -1
  212. package/build-module/components/global-styles/root-menu.js +0 -4
  213. package/build-module/components/global-styles/root-menu.js.map +1 -1
  214. package/build-module/components/global-styles/screen-block-list.js +0 -4
  215. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  216. package/build-module/components/global-styles/screen-css.js +1 -1
  217. package/build-module/components/global-styles/screen-css.js.map +1 -1
  218. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +27 -25
  219. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  220. package/build-module/components/global-styles/screen-root.js +0 -3
  221. package/build-module/components/global-styles/screen-root.js.map +1 -1
  222. package/build-module/components/global-styles/screen-style-variations.js +5 -1
  223. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  224. package/build-module/components/global-styles/shadows-edit-panel.js +11 -13
  225. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  226. package/build-module/components/global-styles/shadows-panel.js +0 -3
  227. package/build-module/components/global-styles/shadows-panel.js.map +1 -1
  228. package/build-module/components/global-styles/typography-elements.js +2 -5
  229. package/build-module/components/global-styles/typography-elements.js.map +1 -1
  230. package/build-module/components/global-styles/ui.js +50 -3
  231. package/build-module/components/global-styles/ui.js.map +1 -1
  232. package/build-module/components/global-styles/variations/variation.js +3 -3
  233. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  234. package/build-module/components/global-styles/variations/variations-panel.js +0 -1
  235. package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
  236. package/build-module/components/global-styles-renderer/index.js +6 -8
  237. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  238. package/build-module/components/global-styles-sidebar/default-sidebar.js +0 -1
  239. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  240. package/build-module/components/global-styles-sidebar/index.js +44 -31
  241. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  242. package/build-module/components/layout/animation.js +1 -3
  243. package/build-module/components/layout/animation.js.map +1 -1
  244. package/build-module/components/layout/hooks.js +1 -9
  245. package/build-module/components/layout/hooks.js.map +1 -1
  246. package/build-module/components/layout/index.js +23 -35
  247. package/build-module/components/layout/index.js.map +1 -1
  248. package/build-module/components/layout/router.js +17 -139
  249. package/build-module/components/layout/router.js.map +1 -1
  250. package/build-module/components/page-patterns/delete-category-menu-item.js +4 -4
  251. package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
  252. package/build-module/components/page-patterns/fields.js +4 -8
  253. package/build-module/components/page-patterns/fields.js.map +1 -1
  254. package/build-module/components/page-patterns/use-pattern-settings.js +1 -1
  255. package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
  256. package/build-module/components/page-templates/fields.js +1 -2
  257. package/build-module/components/page-templates/fields.js.map +1 -1
  258. package/build-module/components/page-templates/index.js +1 -2
  259. package/build-module/components/page-templates/index.js.map +1 -1
  260. package/build-module/components/pagination/index.js +1 -1
  261. package/build-module/components/pagination/index.js.map +1 -1
  262. package/build-module/components/post-edit/index.js +15 -5
  263. package/build-module/components/post-edit/index.js.map +1 -1
  264. package/build-module/components/post-fields/index.js +7 -246
  265. package/build-module/components/post-fields/index.js.map +1 -1
  266. package/build-module/components/post-list/index.js +12 -2
  267. package/build-module/components/post-list/index.js.map +1 -1
  268. package/build-module/components/posts-app/index.js +2 -2
  269. package/build-module/components/posts-app/index.js.map +1 -1
  270. package/build-module/components/posts-app/router.js +3 -3
  271. package/build-module/components/posts-app/router.js.map +1 -1
  272. package/build-module/components/resizable-frame/index.js +21 -10
  273. package/build-module/components/resizable-frame/index.js.map +1 -1
  274. package/build-module/components/revisions/index.js +1 -1
  275. package/build-module/components/revisions/index.js.map +1 -1
  276. package/build-module/components/save-keyboard-shortcut/index.js +71 -0
  277. package/build-module/components/save-keyboard-shortcut/index.js.map +1 -0
  278. package/build-module/components/save-panel/index.js +17 -6
  279. package/build-module/components/save-panel/index.js.map +1 -1
  280. package/build-module/components/sidebar/index.js +11 -3
  281. package/build-module/components/sidebar/index.js.map +1 -1
  282. package/build-module/components/sidebar-dataviews/default-views.js +2 -5
  283. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  284. package/build-module/components/sidebar-global-styles-wrapper/index.js +121 -0
  285. package/build-module/components/sidebar-global-styles-wrapper/index.js.map +1 -0
  286. package/build-module/components/sidebar-navigation-screen/index.js +2 -1
  287. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  288. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +34 -72
  289. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  290. package/build-module/components/sidebar-navigation-screen-main/index.js +43 -43
  291. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  292. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -2
  293. package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
  294. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  295. package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
  296. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +8 -13
  297. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  298. package/build-module/components/site-editor-routes/home-edit.js +18 -0
  299. package/build-module/components/site-editor-routes/home-edit.js.map +1 -0
  300. package/build-module/components/site-editor-routes/home-view.js +17 -0
  301. package/build-module/components/site-editor-routes/home-view.js.map +1 -0
  302. package/build-module/components/site-editor-routes/index.js +42 -0
  303. package/build-module/components/site-editor-routes/index.js.map +1 -0
  304. package/build-module/components/site-editor-routes/navigation-edit.js +21 -0
  305. package/build-module/components/site-editor-routes/navigation-edit.js.map +1 -0
  306. package/build-module/components/site-editor-routes/navigation-item-edit.js +23 -0
  307. package/build-module/components/site-editor-routes/navigation-item-edit.js.map +1 -0
  308. package/build-module/components/site-editor-routes/navigation-item-view.js +22 -0
  309. package/build-module/components/site-editor-routes/navigation-item-view.js.map +1 -0
  310. package/build-module/components/site-editor-routes/navigation-view.js +20 -0
  311. package/build-module/components/site-editor-routes/navigation-view.js.map +1 -0
  312. package/build-module/components/site-editor-routes/pages-edit.js +35 -0
  313. package/build-module/components/site-editor-routes/pages-edit.js.map +1 -0
  314. package/build-module/components/site-editor-routes/pages-list-view-quick-edit.js +56 -0
  315. package/build-module/components/site-editor-routes/pages-list-view-quick-edit.js.map +1 -0
  316. package/build-module/components/site-editor-routes/pages-list-view.js +39 -0
  317. package/build-module/components/site-editor-routes/pages-list-view.js.map +1 -0
  318. package/build-module/components/site-editor-routes/pages-view-quick-edit.js +53 -0
  319. package/build-module/components/site-editor-routes/pages-view-quick-edit.js.map +1 -0
  320. package/build-module/components/site-editor-routes/pages-view.js +34 -0
  321. package/build-module/components/site-editor-routes/pages-view.js.map +1 -0
  322. package/build-module/components/site-editor-routes/patterns-edit.js +23 -0
  323. package/build-module/components/site-editor-routes/patterns-edit.js.map +1 -0
  324. package/build-module/components/site-editor-routes/patterns-view.js +21 -0
  325. package/build-module/components/site-editor-routes/patterns-view.js.map +1 -0
  326. package/build-module/components/site-editor-routes/styles-edit.js +25 -0
  327. package/build-module/components/site-editor-routes/styles-edit.js.map +1 -0
  328. package/build-module/components/site-editor-routes/styles-view.js +25 -0
  329. package/build-module/components/site-editor-routes/styles-view.js.map +1 -0
  330. package/build-module/components/site-editor-routes/templates-edit.js +23 -0
  331. package/build-module/components/site-editor-routes/templates-edit.js.map +1 -0
  332. package/build-module/components/site-editor-routes/templates-list-view.js +26 -0
  333. package/build-module/components/site-editor-routes/templates-list-view.js.map +1 -0
  334. package/build-module/components/site-editor-routes/templates-view.js +21 -0
  335. package/build-module/components/site-editor-routes/templates-view.js.map +1 -0
  336. package/build-module/components/site-hub/index.js +22 -8
  337. package/build-module/components/site-hub/index.js.map +1 -1
  338. package/build-module/components/style-book/color-examples.js +38 -0
  339. package/build-module/components/style-book/color-examples.js.map +1 -0
  340. package/build-module/components/style-book/constants.js +84 -12
  341. package/build-module/components/style-book/constants.js.map +1 -1
  342. package/build-module/components/style-book/duotone-examples.js +48 -0
  343. package/build-module/components/style-book/duotone-examples.js.map +1 -0
  344. package/build-module/components/style-book/examples.js +117 -3
  345. package/build-module/components/style-book/examples.js.map +1 -1
  346. package/build-module/components/style-book/index.js +164 -49
  347. package/build-module/components/style-book/index.js.map +1 -1
  348. package/build-module/components/style-book/types.js.map +1 -1
  349. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +38 -33
  350. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  351. package/build-module/components/welcome-guide/index.js +4 -2
  352. package/build-module/components/welcome-guide/index.js.map +1 -1
  353. package/build-module/components/welcome-guide/page.js +1 -9
  354. package/build-module/components/welcome-guide/page.js.map +1 -1
  355. package/build-module/components/welcome-guide/template.js +1 -11
  356. package/build-module/components/welcome-guide/template.js.map +1 -1
  357. package/build-module/hooks/commands/use-common-commands.js +61 -45
  358. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  359. package/build-module/hooks/commands/use-set-command-context.js +12 -15
  360. package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
  361. package/build-module/index.js +1 -0
  362. package/build-module/index.js.map +1 -1
  363. package/build-module/posts.js +1 -0
  364. package/build-module/posts.js.map +1 -1
  365. package/build-module/store/private-actions.js +6 -58
  366. package/build-module/store/private-actions.js.map +1 -1
  367. package/build-module/store/private-selectors.js +3 -11
  368. package/build-module/store/private-selectors.js.map +1 -1
  369. package/build-module/store/reducer.js +9 -18
  370. package/build-module/store/reducer.js.map +1 -1
  371. package/build-style/posts-rtl.css +60 -14
  372. package/build-style/posts.css +60 -14
  373. package/build-style/style-rtl.css +232 -50
  374. package/build-style/style.css +232 -50
  375. package/package.json +42 -41
  376. package/src/components/add-new-post/index.js +1 -1
  377. package/src/components/add-new-template/index.js +1 -1
  378. package/src/components/add-new-template/utils.js +12 -9
  379. package/src/components/app/index.js +4 -4
  380. package/src/components/block-editor/use-editor-iframe-props.js +23 -20
  381. package/src/components/block-editor/use-site-editor-settings.js +12 -10
  382. package/src/components/editor/index.js +50 -17
  383. package/src/components/editor/use-adapt-editor-to-canvas.js +53 -0
  384. package/src/components/editor/use-editor-title.js +40 -16
  385. package/src/components/editor-canvas-container/style.scss +0 -1
  386. package/src/components/global-styles/font-sizes/font-size.js +11 -15
  387. package/src/components/global-styles/font-sizes/font-sizes-count.js +1 -4
  388. package/src/components/global-styles/font-sizes/font-sizes.js +7 -9
  389. package/src/components/global-styles/palette.js +21 -18
  390. package/src/components/global-styles/root-menu.js +3 -16
  391. package/src/components/global-styles/screen-block-list.js +0 -7
  392. package/src/components/global-styles/screen-css.js +1 -0
  393. package/src/components/global-styles/screen-revisions/revisions-buttons.js +30 -33
  394. package/src/components/global-styles/screen-revisions/style.scss +11 -17
  395. package/src/components/global-styles/screen-root.js +3 -12
  396. package/src/components/global-styles/screen-style-variations.js +4 -1
  397. package/src/components/global-styles/shadows-edit-panel.js +16 -15
  398. package/src/components/global-styles/shadows-panel.js +0 -4
  399. package/src/components/global-styles/typography-elements.js +3 -11
  400. package/src/components/global-styles/ui.js +53 -2
  401. package/src/components/global-styles/variations/variation.js +3 -3
  402. package/src/components/global-styles/variations/variations-panel.js +0 -1
  403. package/src/components/global-styles-renderer/index.js +4 -10
  404. package/src/components/global-styles-sidebar/default-sidebar.js +0 -1
  405. package/src/components/global-styles-sidebar/index.js +86 -65
  406. package/src/components/global-styles-sidebar/style.scss +6 -0
  407. package/src/components/layout/animation.js +0 -1
  408. package/src/components/layout/hooks.js +1 -7
  409. package/src/components/layout/index.js +22 -35
  410. package/src/components/layout/router.js +18 -133
  411. package/src/components/layout/style.scss +2 -2
  412. package/src/components/page-patterns/delete-category-menu-item.js +4 -4
  413. package/src/components/page-patterns/fields.js +6 -12
  414. package/src/components/page-patterns/style.scss +0 -5
  415. package/src/components/page-patterns/use-pattern-settings.js +1 -1
  416. package/src/components/page-templates/fields.js +2 -3
  417. package/src/components/page-templates/index.js +0 -1
  418. package/src/components/pagination/index.js +1 -1
  419. package/src/components/post-edit/index.js +45 -6
  420. package/src/components/post-edit/style.scss +7 -0
  421. package/src/components/post-fields/index.js +22 -323
  422. package/src/components/post-fields/style.scss +3 -0
  423. package/src/components/post-list/index.js +10 -4
  424. package/src/components/post-list/style.scss +30 -4
  425. package/src/components/posts-app/index.js +2 -2
  426. package/src/components/posts-app/router.js +3 -3
  427. package/src/components/resizable-frame/index.js +19 -10
  428. package/src/components/revisions/index.js +4 -1
  429. package/src/components/save-keyboard-shortcut/index.js +69 -0
  430. package/src/components/save-panel/index.js +30 -32
  431. package/src/components/sidebar/index.js +23 -7
  432. package/src/components/sidebar-dataviews/default-views.js +2 -5
  433. package/src/components/sidebar-global-styles-wrapper/index.js +150 -0
  434. package/src/components/sidebar-global-styles-wrapper/style.scss +35 -0
  435. package/src/components/sidebar-navigation-item/style.scss +2 -2
  436. package/src/components/sidebar-navigation-screen/index.js +2 -1
  437. package/src/components/sidebar-navigation-screen-global-styles/index.js +42 -99
  438. package/src/components/sidebar-navigation-screen-main/index.js +46 -45
  439. package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -2
  440. package/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +4 -4
  441. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +11 -13
  442. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +1 -1
  443. package/src/components/site-editor-routes/README.md +20 -0
  444. package/src/components/site-editor-routes/home-edit.js +17 -0
  445. package/src/components/site-editor-routes/home-view.js +16 -0
  446. package/src/components/site-editor-routes/index.js +60 -0
  447. package/src/components/site-editor-routes/navigation-edit.js +22 -0
  448. package/src/components/site-editor-routes/navigation-item-edit.js +26 -0
  449. package/src/components/site-editor-routes/navigation-item-view.js +25 -0
  450. package/src/components/site-editor-routes/navigation-view.js +21 -0
  451. package/src/components/site-editor-routes/pages-edit.js +35 -0
  452. package/src/components/site-editor-routes/pages-list-view-quick-edit.js +56 -0
  453. package/src/components/site-editor-routes/pages-list-view.js +44 -0
  454. package/src/components/site-editor-routes/pages-view-quick-edit.js +53 -0
  455. package/src/components/site-editor-routes/pages-view.js +39 -0
  456. package/src/components/site-editor-routes/patterns-edit.js +24 -0
  457. package/src/components/site-editor-routes/patterns-view.js +22 -0
  458. package/src/components/site-editor-routes/styles-edit.js +26 -0
  459. package/src/components/site-editor-routes/styles-view.js +26 -0
  460. package/src/components/site-editor-routes/templates-edit.js +22 -0
  461. package/src/components/site-editor-routes/templates-list-view.js +28 -0
  462. package/src/components/site-editor-routes/templates-view.js +22 -0
  463. package/src/components/site-hub/index.js +35 -18
  464. package/src/components/site-hub/style.scss +4 -0
  465. package/src/components/site-icon/style.scss +16 -0
  466. package/src/components/style-book/color-examples.tsx +44 -0
  467. package/src/components/style-book/constants.ts +94 -13
  468. package/src/components/style-book/duotone-examples.tsx +53 -0
  469. package/src/components/style-book/examples.tsx +217 -0
  470. package/src/components/style-book/index.js +235 -60
  471. package/src/components/style-book/style.scss +12 -14
  472. package/src/components/style-book/test/categories.js +0 -5
  473. package/src/components/style-book/types.ts +34 -1
  474. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +65 -65
  475. package/src/components/welcome-guide/index.js +3 -3
  476. package/src/components/welcome-guide/page.js +1 -7
  477. package/src/components/welcome-guide/template.js +1 -8
  478. package/src/hooks/commands/use-common-commands.js +257 -230
  479. package/src/hooks/commands/use-set-command-context.js +7 -9
  480. package/src/index.js +1 -0
  481. package/src/posts.js +1 -0
  482. package/src/store/private-actions.js +7 -79
  483. package/src/store/private-selectors.js +4 -11
  484. package/src/store/reducer.js +10 -18
  485. package/src/style.scss +3 -1
  486. package/build/components/async/index.js +0 -51
  487. package/build/components/async/index.js.map +0 -1
  488. package/build/components/keyboard-shortcuts/global.js +0 -53
  489. package/build/components/keyboard-shortcuts/global.js.map +0 -1
  490. package/build/components/keyboard-shortcuts/register.js +0 -34
  491. package/build/components/keyboard-shortcuts/register.js.map +0 -1
  492. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -69
  493. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +0 -1
  494. package/build/components/use-edited-entity-record/index.js +0 -60
  495. package/build/components/use-edited-entity-record/index.js.map +0 -1
  496. package/build/hooks/commands/use-edit-mode-commands.js +0 -175
  497. package/build/hooks/commands/use-edit-mode-commands.js.map +0 -1
  498. package/build-module/components/async/index.js +0 -44
  499. package/build-module/components/async/index.js.map +0 -1
  500. package/build-module/components/keyboard-shortcuts/global.js +0 -46
  501. package/build-module/components/keyboard-shortcuts/global.js.map +0 -1
  502. package/build-module/components/keyboard-shortcuts/register.js +0 -27
  503. package/build-module/components/keyboard-shortcuts/register.js.map +0 -1
  504. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -62
  505. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +0 -1
  506. package/build-module/components/use-edited-entity-record/index.js +0 -53
  507. package/build-module/components/use-edited-entity-record/index.js.map +0 -1
  508. package/build-module/hooks/commands/use-edit-mode-commands.js +0 -167
  509. package/build-module/hooks/commands/use-edit-mode-commands.js.map +0 -1
  510. package/src/components/async/index.js +0 -43
  511. package/src/components/keyboard-shortcuts/global.js +0 -47
  512. package/src/components/keyboard-shortcuts/register.js +0 -27
  513. package/src/components/style-book/examples.ts +0 -63
  514. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +0 -73
  515. package/src/components/use-edited-entity-record/index.js +0 -58
  516. package/src/hooks/commands/use-edit-mode-commands.js +0 -172
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_components","_date","_coreData","_data","_blockEditor","_lockUnlock","_jsxRuntime","DAY_IN_MILLISECONDS","getGlobalStylesChanges","unlock","blockEditorPrivateApis","ChangesSummary","revision","previousRevision","changes","maxResults","length","jsx","className","children","map","change","getRevisionLabel","id","authorDisplayName","formattedModifiedDate","areStylesEqual","__","sprintf","RevisionsButtons","userRevisions","selectedRevisionId","onChange","canApplyRevision","onApplyRevision","currentThemeName","currentUser","useSelect","select","getCurrentTheme","getCurrentUser","coreStore","currentTheme","name","rendered","stylesheet","dateNowInMs","getDate","getTime","datetimeAbbreviated","getSettings","formats","role","index","author","modified","isUnsaved","revisionAuthor","authorAvatar","avatar_urls","isFirstItem","isSelected","isReset","modifiedDate","displayDate","dateI18n","humanTimeDiff","revisionLabel","jsxs","clsx","Button","__next40pxDefaultSize","accessibleWhenDisabled","disabled","onClick","dateTime","alt","src","size","variant","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/revisions-buttons.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst DAY_IN_MILLISECONDS = 60 * 60 * 1000 * 24;\nconst { getGlobalStylesChanges } = unlock( blockEditorPrivateApis );\n\nfunction ChangesSummary( { revision, previousRevision } ) {\n\tconst changes = getGlobalStylesChanges( revision, previousRevision, {\n\t\tmaxResults: 7,\n\t} );\n\n\tif ( ! changes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul\n\t\t\tdata-testid=\"global-styles-revision-changes\"\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__changes\"\n\t\t>\n\t\t\t{ changes.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\n/**\n * Returns a button label for the revision.\n *\n * @param {string|number} id A revision object.\n * @param {string} authorDisplayName Author name.\n * @param {string} formattedModifiedDate Revision modified date formatted.\n * @param {boolean} areStylesEqual Whether the revision matches the current editor styles.\n * @return {string} Translated label.\n */\nfunction getRevisionLabel(\n\tid,\n\tauthorDisplayName,\n\tformattedModifiedDate,\n\tareStylesEqual\n) {\n\tif ( 'parent' === id ) {\n\t\treturn __( 'Reset the styles to the theme defaults' );\n\t}\n\n\tif ( 'unsaved' === id ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: author display name */\n\t\t\t__( 'Unsaved changes by %s' ),\n\t\t\tauthorDisplayName\n\t\t);\n\t}\n\n\treturn areStylesEqual\n\t\t? sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__(\n\t\t\t\t\t'Changes saved by %1$s on %2$s. This revision matches current editor styles.'\n\t\t\t\t),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__( 'Changes saved by %1$s on %2$s' ),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t );\n}\n\n/**\n * Returns a rendered list of revisions buttons.\n *\n * @typedef {Object} props\n * @property {Array<Object>} userRevisions A collection of user revisions.\n * @property {number} selectedRevisionId The id of the currently-selected revision.\n * @property {Function} onChange Callback fired when a revision is selected.\n *\n * @param {props} Component props.\n * @return {JSX.Element} The modal component.\n */\nfunction RevisionsButtons( {\n\tuserRevisions,\n\tselectedRevisionId,\n\tonChange,\n\tcanApplyRevision,\n\tonApplyRevision,\n} ) {\n\tconst { currentThemeName, currentUser } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getCurrentUser } = select( coreStore );\n\t\tconst currentTheme = getCurrentTheme();\n\t\treturn {\n\t\t\tcurrentThemeName:\n\t\t\t\tcurrentTheme?.name?.rendered || currentTheme?.stylesheet,\n\t\t\tcurrentUser: getCurrentUser(),\n\t\t};\n\t}, [] );\n\tconst dateNowInMs = getDate().getTime();\n\tconst { datetimeAbbreviated } = getSettings().formats;\n\n\treturn (\n\t\t<ol\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revisions-list\"\n\t\t\taria-label={ __( 'Global styles revisions list' ) }\n\t\t\trole=\"group\"\n\t\t>\n\t\t\t{ userRevisions.map( ( revision, index ) => {\n\t\t\t\tconst { id, author, modified } = revision;\n\t\t\t\tconst isUnsaved = 'unsaved' === id;\n\t\t\t\t// Unsaved changes are created by the current user.\n\t\t\t\tconst revisionAuthor = isUnsaved ? currentUser : author;\n\t\t\t\tconst authorDisplayName = revisionAuthor?.name || __( 'User' );\n\t\t\t\tconst authorAvatar = revisionAuthor?.avatar_urls?.[ '48' ];\n\t\t\t\tconst isFirstItem = index === 0;\n\t\t\t\tconst isSelected = selectedRevisionId\n\t\t\t\t\t? selectedRevisionId === id\n\t\t\t\t\t: isFirstItem;\n\t\t\t\tconst areStylesEqual = ! canApplyRevision && isSelected;\n\t\t\t\tconst isReset = 'parent' === id;\n\t\t\t\tconst modifiedDate = getDate( modified );\n\t\t\t\tconst displayDate =\n\t\t\t\t\tmodified &&\n\t\t\t\t\tdateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS\n\t\t\t\t\t\t? dateI18n( datetimeAbbreviated, modifiedDate )\n\t\t\t\t\t\t: humanTimeDiff( modified );\n\t\t\t\tconst revisionLabel = getRevisionLabel(\n\t\t\t\t\tid,\n\t\t\t\t\tauthorDisplayName,\n\t\t\t\t\tdateI18n( datetimeAbbreviated, modifiedDate ),\n\t\t\t\t\tareStylesEqual\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-global-styles-screen-revisions__revision-item',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t\t\t'is-active': areStylesEqual,\n\t\t\t\t\t\t\t\t'is-reset': isReset,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\taria-current={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revision-button\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\taria-label={ revisionLabel }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ isReset ? (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ __( 'Default styles' ) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t{ currentThemeName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ isUnsaved ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__date\">\n\t\t\t\t\t\t\t\t\t\t\t{ __( '(Unsaved)' ) }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__date\"\n\t\t\t\t\t\t\t\t\t\t\tdateTime={ modified }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ displayDate }\n\t\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\talt={ authorDisplayName }\n\t\t\t\t\t\t\t\t\t\t\tsrc={ authorAvatar }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ authorDisplayName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t\t\t<ChangesSummary\n\t\t\t\t\t\t\t\t\t\t\trevision={ revision }\n\t\t\t\t\t\t\t\t\t\t\tpreviousRevision={\n\t\t\t\t\t\t\t\t\t\t\t\tindex < userRevisions.length\n\t\t\t\t\t\t\t\t\t\t\t\t\t? userRevisions[ index + 1 ]\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}\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</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ isSelected &&\n\t\t\t\t\t\t\t( areStylesEqual ? (\n\t\t\t\t\t\t\t\t<p className=\"edit-site-global-styles-screen-revisions__applied-text\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'These styles are already applied to your site.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__apply-button\"\n\t\t\t\t\t\t\t\t\tonClick={ onApplyRevision }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ isReset\n\t\t\t\t\t\t\t\t\t\t? __( 'Reset to defaults' )\n\t\t\t\t\t\t\t\t\t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vD,WAAA,CAAAW,GAAA,EAACN,cAAc;cACdC,QAAQ,EAAGA,QAAU;cACrBC,gBAAgB,EACfwC,KAAK,GAAGvB,aAAa,CAACd,MAAM,GACzBc,aAAa,CAAEuB,KAAK,GAAG,CAAC,CAAE,GAC1B,CAAC;YACJ,CACD,CACD;UAAA,CACI;QACN,CACM,CAAC,EACPQ,UAAU,KACTnC,cAAc,gBACf,IAAApB,WAAA,CAAAW,GAAA;UAAGC,SAAS,EAAC,wDAAwD;UAAAC,QAAA,EAClE,IAAAQ,QAAE,EACH,gDACD;QAAC,CACC,CAAC,gBAEJ,IAAArB,WAAA,CAAAW,GAAA,EAACjB,WAAA,CAAAsE,MAAM;UACNQ,IAAI,EAAC,SAAS;UACdC,OAAO,EAAC,SAAS;UACjB7D,SAAS,EAAC,wDAAwD;UAClEwD,OAAO,EAAGxC,eAAiB;UAAAf,QAAA,EAEzB2C,OAAO,GACN,IAAAnC,QAAE,EAAE,mBAAoB,CAAC,GACzB,IAAAA,QAAE,EAAE,OAAQ;QAAC,CACT,CACR,CAAE;MAAA,GAxEEJ,EAyEH,CAAC;IAEP,CAAE;EAAC,CACA,CAAC;AAEP;AAAC,IAAAyD,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcrD,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_components","_date","_coreData","_data","_blockEditor","_keycodes","_lockUnlock","_jsxRuntime","DAY_IN_MILLISECONDS","getGlobalStylesChanges","unlock","blockEditorPrivateApis","ChangesSummary","revision","previousRevision","changes","maxResults","length","jsx","className","children","map","change","getRevisionLabel","id","authorDisplayName","formattedModifiedDate","areStylesEqual","__","sprintf","RevisionsButtons","userRevisions","selectedRevisionId","onChange","canApplyRevision","onApplyRevision","currentThemeName","currentUser","useSelect","select","getCurrentTheme","getCurrentUser","coreStore","currentTheme","name","rendered","stylesheet","dateNowInMs","getDate","getTime","datetimeAbbreviated","getSettings","formats","Composite","orientation","role","index","author","modified","isUnsaved","revisionAuthor","authorAvatar","avatar_urls","isFirstItem","isSelected","isReset","modifiedDate","displayDate","dateI18n","humanTimeDiff","revisionLabel","jsxs","Item","onKeyDown","event","keyCode","ENTER","SPACE","onClick","preventDefault","render","dateTime","alt","src","Button","size","variant","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-revisions/revisions-buttons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, Composite } from '@wordpress/components';\nimport { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst DAY_IN_MILLISECONDS = 60 * 60 * 1000 * 24;\nconst { getGlobalStylesChanges } = unlock( blockEditorPrivateApis );\n\nfunction ChangesSummary( { revision, previousRevision } ) {\n\tconst changes = getGlobalStylesChanges( revision, previousRevision, {\n\t\tmaxResults: 7,\n\t} );\n\n\tif ( ! changes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul\n\t\t\tdata-testid=\"global-styles-revision-changes\"\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__changes\"\n\t\t>\n\t\t\t{ changes.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\n/**\n * Returns a button label for the revision.\n *\n * @param {string|number} id A revision object.\n * @param {string} authorDisplayName Author name.\n * @param {string} formattedModifiedDate Revision modified date formatted.\n * @param {boolean} areStylesEqual Whether the revision matches the current editor styles.\n * @return {string} Translated label.\n */\nfunction getRevisionLabel(\n\tid,\n\tauthorDisplayName,\n\tformattedModifiedDate,\n\tareStylesEqual\n) {\n\tif ( 'parent' === id ) {\n\t\treturn __( 'Reset the styles to the theme defaults' );\n\t}\n\n\tif ( 'unsaved' === id ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: author display name */\n\t\t\t__( 'Unsaved changes by %s' ),\n\t\t\tauthorDisplayName\n\t\t);\n\t}\n\n\treturn areStylesEqual\n\t\t? sprintf(\n\t\t\t\t// translators: 1: author display name. 2: revision creation date.\n\t\t\t\t__(\n\t\t\t\t\t'Changes saved by %1$s on %2$s. This revision matches current editor styles.'\n\t\t\t\t),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: 1: author display name. 2: revision creation date.\n\t\t\t\t__( 'Changes saved by %1$s on %2$s' ),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t );\n}\n\n/**\n * Returns a rendered list of revisions buttons.\n *\n * @typedef {Object} props\n * @property {Array<Object>} userRevisions A collection of user revisions.\n * @property {number} selectedRevisionId The id of the currently-selected revision.\n * @property {Function} onChange Callback fired when a revision is selected.\n *\n * @param {props} Component props.\n * @return {JSX.Element} The modal component.\n */\nfunction RevisionsButtons( {\n\tuserRevisions,\n\tselectedRevisionId,\n\tonChange,\n\tcanApplyRevision,\n\tonApplyRevision,\n} ) {\n\tconst { currentThemeName, currentUser } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getCurrentUser } = select( coreStore );\n\t\tconst currentTheme = getCurrentTheme();\n\t\treturn {\n\t\t\tcurrentThemeName:\n\t\t\t\tcurrentTheme?.name?.rendered || currentTheme?.stylesheet,\n\t\t\tcurrentUser: getCurrentUser(),\n\t\t};\n\t}, [] );\n\tconst dateNowInMs = getDate().getTime();\n\tconst { datetimeAbbreviated } = getSettings().formats;\n\n\treturn (\n\t\t<Composite\n\t\t\torientation=\"vertical\"\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revisions-list\"\n\t\t\taria-label={ __( 'Global styles revisions list' ) }\n\t\t\trole=\"listbox\"\n\t\t>\n\t\t\t{ userRevisions.map( ( revision, index ) => {\n\t\t\t\tconst { id, author, modified } = revision;\n\t\t\t\tconst isUnsaved = 'unsaved' === id;\n\t\t\t\t// Unsaved changes are created by the current user.\n\t\t\t\tconst revisionAuthor = isUnsaved ? currentUser : author;\n\t\t\t\tconst authorDisplayName = revisionAuthor?.name || __( 'User' );\n\t\t\t\tconst authorAvatar = revisionAuthor?.avatar_urls?.[ '48' ];\n\t\t\t\tconst isFirstItem = index === 0;\n\t\t\t\tconst isSelected = selectedRevisionId\n\t\t\t\t\t? selectedRevisionId === id\n\t\t\t\t\t: isFirstItem;\n\t\t\t\tconst areStylesEqual = ! canApplyRevision && isSelected;\n\t\t\t\tconst isReset = 'parent' === id;\n\t\t\t\tconst modifiedDate = getDate( modified );\n\t\t\t\tconst displayDate =\n\t\t\t\t\tmodified &&\n\t\t\t\t\tdateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS\n\t\t\t\t\t\t? dateI18n( datetimeAbbreviated, modifiedDate )\n\t\t\t\t\t\t: humanTimeDiff( modified );\n\t\t\t\tconst revisionLabel = getRevisionLabel(\n\t\t\t\t\tid,\n\t\t\t\t\tauthorDisplayName,\n\t\t\t\t\tdateI18n( datetimeAbbreviated, modifiedDate ),\n\t\t\t\t\tareStylesEqual\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revision-item\"\n\t\t\t\t\t\taria-current={ isSelected }\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tconst { keyCode } = event;\n\t\t\t\t\t\t\tif ( keyCode === ENTER || keyCode === SPACE ) {\n\t\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-selected={ isSelected }\n\t\t\t\t\t\taria-label={ revisionLabel }\n\t\t\t\t\t\trender={ <div /> }\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__revision-item-wrapper\">\n\t\t\t\t\t\t\t{ isReset ? (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ __( 'Default styles' ) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t{ currentThemeName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ isUnsaved ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__date\">\n\t\t\t\t\t\t\t\t\t\t\t{ __( '(Unsaved)' ) }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__date\"\n\t\t\t\t\t\t\t\t\t\t\tdateTime={ modified }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ displayDate }\n\t\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\talt={ authorDisplayName }\n\t\t\t\t\t\t\t\t\t\t\tsrc={ authorAvatar }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ authorDisplayName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t\t\t<ChangesSummary\n\t\t\t\t\t\t\t\t\t\t\trevision={ revision }\n\t\t\t\t\t\t\t\t\t\t\tpreviousRevision={\n\t\t\t\t\t\t\t\t\t\t\t\tindex < userRevisions.length\n\t\t\t\t\t\t\t\t\t\t\t\t\t? userRevisions[ index + 1 ]\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}\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</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t{ isSelected &&\n\t\t\t\t\t\t\t( areStylesEqual ? (\n\t\t\t\t\t\t\t\t<p className=\"edit-site-global-styles-screen-revisions__applied-text\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'These styles are already applied to your site.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__apply-button\"\n\t\t\t\t\t\t\t\t\tonClick={ onApplyRevision }\n\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t'Apply the selected revision to your site.'\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\t\t{ isReset\n\t\t\t\t\t\t\t\t\t\t? __( 'Reset to defaults' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Apply' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Composite.Item>\n\t\t\t\t);\n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,iBAAmB;gBACzB0D,GAAG,EAAGtB;cAAc,CACpB,CAAC,EACApC,iBAAiB;YAAA,CACd,CAAC,EACLuC,UAAU,iBACX,IAAAzD,WAAA,CAAAW,GAAA,EAACN,cAAc;cACdC,QAAQ,EAAGA,QAAU;cACrBC,gBAAgB,EACf0C,KAAK,GAAGzB,aAAa,CAACd,MAAM,GACzBc,aAAa,CAAEyB,KAAK,GAAG,CAAC,CAAE,GAC1B,CAAC;YACJ,CACD,CACD;UAAA,CACI;QACN,CACI,CAAC,EACLQ,UAAU,KACTrC,cAAc,gBACf,IAAApB,WAAA,CAAAW,GAAA;UAAGC,SAAS,EAAC,wDAAwD;UAAAC,QAAA,EAClE,IAAAQ,QAAE,EACH,gDACD;QAAC,CACC,CAAC,gBAEJ,IAAArB,WAAA,CAAAW,GAAA,EAAClB,WAAA,CAAAoF,MAAM;UACNC,IAAI,EAAC,SAAS;UACdC,OAAO,EAAC,SAAS;UACjBnE,SAAS,EAAC,wDAAwD;UAClE2D,OAAO,EAAG3C,eAAiB;UAC3B,cAAa,IAAAP,QAAE,EACd,2CACD,CAAG;UAAAR,QAAA,EAED6C,OAAO,GACN,IAAArC,QAAE,EAAE,mBAAoB,CAAC,GACzB,IAAAA,QAAE,EAAE,OAAQ;QAAC,CACT,CACR,CAAE;MAAA,GAjFEJ,EAkFS,CAAC;IAEnB,CAAE;EAAC,CACO,CAAC;AAEd;AAAC,IAAA+D,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc3D,gBAAgB","ignoreList":[]}
@@ -62,7 +62,6 @@ function ScreenRoot() {
62
62
  }), hasVariations && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalItemGroup, {
63
63
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_navigationButton.NavigationButtonAsItem, {
64
64
  path: "/variations",
65
- "aria-label": (0, _i18n.__)('Browse styles'),
66
65
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
67
66
  justify: "space-between",
68
67
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
@@ -89,7 +88,6 @@ function ScreenRoot() {
89
88
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalItemGroup, {
90
89
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_navigationButton.NavigationButtonAsItem, {
91
90
  path: "/blocks",
92
- "aria-label": (0, _i18n.__)('Blocks styles'),
93
91
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
94
92
  justify: "space-between",
95
93
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
@@ -111,7 +109,6 @@ function ScreenRoot() {
111
109
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalItemGroup, {
112
110
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_navigationButton.NavigationButtonAsItem, {
113
111
  path: "/css",
114
- "aria-label": (0, _i18n.__)('Additional CSS'),
115
112
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
116
113
  justify: "space-between",
117
114
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_icons","_data","_coreData","_blockEditor","_iconWithCurrentColor","_navigationButton","_rootMenu","_interopRequireDefault","_previewStyles","_lockUnlock","_jsxRuntime","useGlobalStyle","unlock","blockEditorPrivateApis","ScreenRoot","customCSS","hasVariations","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","coreStore","globalStylesId","globalStyles","undefined","length","_links","jsxs","Card","size","className","isRounded","children","jsx","CardBody","__experimentalVStack","spacing","CardMedia","default","__experimentalItemGroup","NavigationButtonAsItem","path","__","__experimentalHStack","justify","FlexItem","IconWithCurrentColor","icon","isRTL","chevronLeft","chevronRight","CardDivider","__experimentalSpacer","as","paddingTop","paddingX","marginBottom","Fragment","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport PreviewStyles from './preview-styles';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ScreenRoot() {\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card\n\t\t\tsize=\"small\"\n\t\t\tclassName=\"edit-site-global-styles-screen-root\"\n\t\t\tisRounded={ false }\n\t\t>\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card className=\"edit-site-global-styles-screen-root__active-style-tile\">\n\t\t\t\t\t\t<CardMedia className=\"edit-site-global-styles-screen-root__active-style-tile-preview\">\n\t\t\t\t\t\t\t<PreviewStyles />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\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</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\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AAA,CAAAyB,GAAA,EAAC/B,qBAAA,CAAA4C,oBAAoB;gBACpBC,IAAI,EACH,IAAAC,WAAK,EAAC,CAAC,GAAGC,kBAAW,GAAGC;cACxB,CACD,CAAC;YAAA,CACK;UAAC,CACc;QAAC,CACf,CAAC;MAAA,CACH,CAAC;IAAA,CACV,CACF;EAAA,CACI,CAAC;AAET;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEc1B,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_i18n","_icons","_data","_coreData","_blockEditor","_iconWithCurrentColor","_navigationButton","_rootMenu","_interopRequireDefault","_previewStyles","_lockUnlock","_jsxRuntime","useGlobalStyle","unlock","blockEditorPrivateApis","ScreenRoot","customCSS","hasVariations","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","__experimentalGetCurrentThemeGlobalStylesVariations","coreStore","globalStylesId","globalStyles","undefined","length","_links","jsxs","Card","size","className","isRounded","children","jsx","CardBody","__experimentalVStack","spacing","CardMedia","default","__experimentalItemGroup","NavigationButtonAsItem","path","__experimentalHStack","justify","FlexItem","__","IconWithCurrentColor","icon","isRTL","chevronLeft","chevronRight","CardDivider","__experimentalSpacer","as","paddingTop","paddingX","marginBottom","Fragment","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-root.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport PreviewStyles from './preview-styles';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ScreenRoot() {\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card\n\t\t\tsize=\"small\"\n\t\t\tclassName=\"edit-site-global-styles-screen-root\"\n\t\t\tisRounded={ false }\n\t\t>\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card className=\"edit-site-global-styles-screen-root__active-style-tile\">\n\t\t\t\t\t\t<CardMedia className=\"edit-site-global-styles-screen-root__active-style-tile-preview\">\n\t\t\t\t\t\t\t<PreviewStyles />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem path=\"/variations\">\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\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</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem path=\"/blocks\">\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem path=\"/css\">\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\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</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAWA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAKA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,cAAA,GAAAD,sBAAA,CAAAT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C,WAAA,CAAA4C,uBAAS;UAAAP,QAAA,eACT,IAAAxB,WAAA,CAAAyB,GAAA,EAAC9B,iBAAA,CAAAqC,sBAAsB;YAACC,IAAI,EAAC,MAAM;YAAAT,QAAA,eAClC,IAAAxB,WAAA,CAAAmB,IAAA,EAAChC,WAAA,CAAA+C,oBAAM;cAACC,OAAO,EAAC,eAAe;cAAAX,QAAA,gBAC9B,IAAAxB,WAAA,CAAAyB,GAAA,EAACtC,WAAA,CAAAiD,QAAQ;gBAAAZ,QAAA,EACN,IAAAa,QAAE,EAAE,gBAAiB;cAAC,CACf,CAAC,eACX,IAAArC,WAAA,CAAAyB,GAAA,EAAC/B,qBAAA,CAAA4C,oBAAoB;gBACpBC,IAAI,EACH,IAAAC,WAAK,EAAC,CAAC,GAAGC,kBAAW,GAAGC;cACxB,CACD,CAAC;YAAA,CACK;UAAC,CACc;QAAC,CACf,CAAC;MAAA,CACH,CAAC;IAAA,CACV,CACF;EAAA,CACI,CAAC;AAET;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEc1B,UAAU","ignoreList":[]}
@@ -12,6 +12,7 @@ var _data = require("@wordpress/data");
12
12
  var _editor = require("@wordpress/editor");
13
13
  var _header = _interopRequireDefault(require("./header"));
14
14
  var _content = _interopRequireDefault(require("../sidebar-navigation-screen-global-styles/content"));
15
+ var _lockUnlock = require("../../lock-unlock");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
16
17
  /**
17
18
  * WordPress dependencies
@@ -21,6 +22,9 @@ var _jsxRuntime = require("react/jsx-runtime");
21
22
  * Internal dependencies
22
23
  */
23
24
 
25
+ const {
26
+ useZoomOut
27
+ } = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
24
28
  function ScreenStyleVariations() {
25
29
  // Style Variations should only be previewed in with
26
30
  // - a "zoomed out" editor
@@ -28,7 +32,7 @@ function ScreenStyleVariations() {
28
32
  const {
29
33
  setDeviceType
30
34
  } = (0, _data.useDispatch)(_editor.store);
31
- (0, _blockEditor.useZoomOut)();
35
+ useZoomOut();
32
36
  setDeviceType('desktop');
33
37
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
34
38
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_blockEditor","_data","_editor","_header","_interopRequireDefault","_content","_jsxRuntime","ScreenStyleVariations","setDeviceType","useDispatch","editorStore","useZoomOut","jsxs","Fragment","children","jsx","default","title","__","description","Card","size","isBorderless","className","CardBody","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-style-variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useZoomOut } from '@wordpress/block-editor';\nimport { useDispatch } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport SidebarNavigationScreenGlobalStylesContent from '../sidebar-navigation-screen-global-styles/content';\n\nfunction ScreenStyleVariations() {\n\t// Style Variations should only be previewed in with\n\t// - a \"zoomed out\" editor\n\t// - \"Desktop\" device preview\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tuseZoomOut();\n\tsetDeviceType( 'desktop' );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Browse styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a variation to change the look of the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<Card\n\t\t\t\tsize=\"small\"\n\t\t\t\tisBorderless\n\t\t\t\tclassName=\"edit-site-global-styles-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<SidebarNavigationScreenGlobalStylesContent />\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</>\n\t);\n}\n\nexport default ScreenStyleVariations;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,OAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,QAAA,GAAAD,sBAAA,CAAAN,OAAA;AAA4G,IAAAQ,WAAA,GAAAR,OAAA;AAb5G;AACA;AACA;;AAOA;AACA;AACA;;AAIA,SAASS,qBAAqBA,CAAA,EAAG;EAChC;EACA;EACA;EACA,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAC,iBAAW,EAAEC,aAAY,CAAC;EACpD,IAAAC,uBAAU,EAAC,CAAC;EACZH,aAAa,CAAE,SAAU,CAAC;EAE1B,oBACC,IAAAF,WAAA,CAAAM,IAAA,EAAAN,WAAA,CAAAO,QAAA;IAAAC,QAAA,gBACC,IAAAR,WAAA,CAAAS,GAAA,EAACZ,OAAA,CAAAa,OAAY;MACZC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB,CAAG;MAC/BC,WAAW,EAAG,IAAAD,QAAE,EACf,oDACD;IAAG,CACH,CAAC,eAEF,IAAAZ,WAAA,CAAAS,GAAA,EAAClB,WAAA,CAAAuB,IAAI;MACJC,IAAI,EAAC,OAAO;MACZC,YAAY;MACZC,SAAS,EAAC,iDAAiD;MAAAT,QAAA,eAE3D,IAAAR,WAAA,CAAAS,GAAA,EAAClB,WAAA,CAAA2B,QAAQ;QAAAV,QAAA,eACR,IAAAR,WAAA,CAAAS,GAAA,EAACV,QAAA,CAAAW,OAA0C,IAAE;MAAC,CACrC;IAAC,CACN,CAAC;EAAA,CACN,CAAC;AAEL;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEcT,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_i18n","_blockEditor","_data","_editor","_header","_interopRequireDefault","_content","_lockUnlock","_jsxRuntime","useZoomOut","unlock","blockEditorPrivateApis","ScreenStyleVariations","setDeviceType","useDispatch","editorStore","jsxs","Fragment","children","jsx","default","title","__","description","Card","size","isBorderless","className","CardBody","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-style-variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useDispatch } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport SidebarNavigationScreenGlobalStylesContent from '../sidebar-navigation-screen-global-styles/content';\nimport { unlock } from '../../lock-unlock';\n\nconst { useZoomOut } = unlock( blockEditorPrivateApis );\n\nfunction ScreenStyleVariations() {\n\t// Style Variations should only be previewed in with\n\t// - a \"zoomed out\" editor\n\t// - \"Desktop\" device preview\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tuseZoomOut();\n\tsetDeviceType( 'desktop' );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Browse styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a variation to change the look of the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<Card\n\t\t\t\tsize=\"small\"\n\t\t\t\tisBorderless\n\t\t\t\tclassName=\"edit-site-global-styles-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<SidebarNavigationScreenGlobalStylesContent />\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</>\n\t);\n}\n\nexport default ScreenStyleVariations;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAA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(0, _lockUnlock.unlock)(_components.privateApis);
38
38
  const customShadowMenuItems = [{
39
39
  label: (0, _i18n.__)('Rename'),
@@ -129,16 +129,16 @@ function ShadowsEditPanel() {
129
129
  marginTop: 2,
130
130
  marginBottom: 0,
131
131
  paddingX: 4,
132
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DropdownMenuV2, {
132
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Menu, {
133
133
  trigger: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
134
134
  size: "small",
135
135
  icon: _icons.moreVertical,
136
136
  label: (0, _i18n.__)('Menu')
137
137
  }),
138
- children: (category === 'custom' ? customShadowMenuItems : presetShadowMenuItems).map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(DropdownMenuV2.Item, {
138
+ children: (category === 'custom' ? customShadowMenuItems : presetShadowMenuItems).map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(Menu.Item, {
139
139
  onClick: () => onMenuClick(item.action),
140
140
  disabled: item.action === 'reset' && selectedShadow.shadow === baseSelectedShadow.shadow,
141
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DropdownMenuV2.ItemLabel, {
141
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Menu.ItemLabel, {
142
142
  children: item.label
143
143
  })
144
144
  }, item.action))
@@ -164,9 +164,8 @@ function ShadowsEditPanel() {
164
164
  },
165
165
  confirmButtonText: (0, _i18n.__)('Delete'),
166
166
  size: "medium",
167
- children: (0, _i18n.sprintf)(
168
- // translators: %s: name of the shadow
169
- 'Are you sure you want to delete "%s"?', selectedShadow.name)
167
+ children: (0, _i18n.sprintf)(/* translators: %s: Name of the shadow preset. */
168
+ (0, _i18n.__)('Are you sure you want to delete "%s" shadow preset?'), selectedShadow.name)
170
169
  }), isRenameModalVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Modal, {
171
170
  title: (0, _i18n.__)('Rename'),
172
171
  onRequestClose: () => setIsRenameModalVisible(false),
@@ -236,16 +235,15 @@ function ShadowEditor({
236
235
  }) {
237
236
  const shadowParts = (0, _element.useMemo)(() => (0, _shadowUtils.getShadowParts)(shadow), [shadow]);
238
237
  const onChangeShadowPart = (index, part) => {
239
- shadowParts[index] = part;
240
- onChange(shadowParts.join(', '));
238
+ const newShadowParts = [...shadowParts];
239
+ newShadowParts[index] = part;
240
+ onChange(newShadowParts.join(', '));
241
241
  };
242
242
  const onAddShadowPart = () => {
243
- shadowParts.push(_shadowsPanel.defaultShadow);
244
- onChange(shadowParts.join(', '));
243
+ onChange([...shadowParts, _shadowsPanel.defaultShadow].join(', '));
245
244
  };
246
245
  const onRemoveShadowPart = index => {
247
- shadowParts.splice(index, 1);
248
- onChange(shadowParts.join(', '));
246
+ onChange(shadowParts.filter((p, i) => i !== index).join(', '));
249
247
  };
250
248
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
251
249
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalVStack, {
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_blockEditor","_icons","_element","_lockUnlock","_subtitle","_header","_shadowsPanel","_shadowUtils","_jsxRuntime","useGlobalSetting","unlock","blockEditorPrivateApis","DropdownMenuV2","componentsPrivateApis","customShadowMenuItems","label","__","action","presetShadowMenuItems","ShadowsEditPanel","goBack","params","category","slug","useNavigator","shadows","setShadows","useEffect","hasCurrentShadow","some","shadow","baseShadows","undefined","selectedShadow","setSelectedShadow","useState","find","baseSelectedShadow","useMemo","b","isConfirmDialogVisible","setIsConfirmDialogVisible","isRenameModalVisible","setIsRenameModalVisible","shadowName","setShadowName","name","onShadowChange","updatedShadows","map","s","onMenuClick","handleShadowDelete","filter","handleShadowRename","newName","jsx","default","title","jsxs","Fragment","children","__experimentalHStack","justify","FlexItem","__experimentalSpacer","marginTop","marginBottom","paddingX","trigger","Button","size","icon","moreVertical","item","Item","onClick","disabled","ItemLabel","className","ShadowsPreview","ShadowEditor","onChange","__experimentalConfirmDialog","isOpen","onConfirm","onCancel","confirmButtonText","sprintf","Modal","onRequestClose","onSubmit","event","preventDefault","__experimentalInputControl","__next40pxDefaultSize","autoComplete","placeholder","value","Flex","expanded","variant","type","shadowStyle","boxShadow","align","style","shadowParts","getShadowParts","onChangeShadowPart","index","part","join","onAddShadowPart","push","defaultShadow","onRemoveShadowPart","splice","__experimentalVStack","spacing","level","plus","__experimentalItemGroup","isBordered","isSeparated","ShadowItem","canRemove","length","onRemove","popoverProps","placement","offset","shift","shadowObj","shadowStringToObject","newShadow","shadowObjectToString","Dropdown","renderToggle","onToggle","toggleProps","clsx","removeButtonProps","flexGrow","shadowIcon","inset","reset","renderContent","__experimentalDropdownContentWrapper","paddingSize","ShadowPopover","__experimentalIsRenderedInSidebar","enableAlpha","key","ColorPalette","clearable","color","__experimentalToggleGroupControl","__nextHasNoMarginBottom","isBlock","hideLabelFromVision","__experimentalToggleGroupControlOption","__experimentalGrid","columns","gap","ShadowInputControl","x","y","blur","spread","onValueChange","next","isNumeric","isNaN","parseFloat","nextValue","__experimentalUnitControl"],"sources":["@wordpress/edit-site/src/components/global-styles/shadows-edit-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalInputControl as InputControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalGrid as Grid,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\tuseNavigator,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tDropdown,\n\tButton,\n\tFlex,\n\tFlexItem,\n\tColorPalette,\n\tModal,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\tplus,\n\tshadow as shadowIcon,\n\treset,\n\tmoreVertical,\n} from '@wordpress/icons';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport ScreenHeader from './header';\nimport { defaultShadow } from './shadows-panel';\nimport {\n\tgetShadowParts,\n\tshadowStringToObject,\n\tshadowObjectToString,\n} from './shadow-utils';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst { DropdownMenuV2 } = unlock( componentsPrivateApis );\n\nconst customShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Rename' ),\n\t\taction: 'rename',\n\t},\n\t{\n\t\tlabel: __( 'Delete' ),\n\t\taction: 'delete',\n\t},\n];\n\nconst presetShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Reset' ),\n\t\taction: 'reset',\n\t},\n];\n\nexport default function ShadowsEditPanel() {\n\tconst {\n\t\tgoBack,\n\t\tparams: { category, slug },\n\t} = useNavigator();\n\tconst [ shadows, setShadows ] = useGlobalSetting(\n\t\t`shadow.presets.${ category }`\n\t);\n\n\tuseEffect( () => {\n\t\tconst hasCurrentShadow = shadows?.some(\n\t\t\t( shadow ) => shadow.slug === slug\n\t\t);\n\t\t// If the shadow being edited doesn't exist anymore in the global styles setting, navigate back\n\t\t// to prevent the user from editing a non-existent shadow entry.\n\t\t// This can happen, for example:\n\t\t// - when the user deletes the shadow\n\t\t// - when the user resets the styles while editing a custom shadow\n\t\t//\n\t\t// The check on the slug is necessary to prevent a double back navigation when the user triggers\n\t\t// a backward navigation by interacting with the screen's UI.\n\t\tif ( !! slug && ! hasCurrentShadow ) {\n\t\t\tgoBack();\n\t\t}\n\t}, [ shadows, slug, goBack ] );\n\n\tconst [ baseShadows ] = useGlobalSetting(\n\t\t`shadow.presets.${ category }`,\n\t\tundefined,\n\t\t'base'\n\t);\n\tconst [ selectedShadow, setSelectedShadow ] = useState( () =>\n\t\t( shadows || [] ).find( ( shadow ) => shadow.slug === slug )\n\t);\n\tconst baseSelectedShadow = useMemo(\n\t\t() => ( baseShadows || [] ).find( ( b ) => b.slug === slug ),\n\t\t[ baseShadows, slug ]\n\t);\n\tconst [ isConfirmDialogVisible, setIsConfirmDialogVisible ] =\n\t\tuseState( false );\n\tconst [ isRenameModalVisible, setIsRenameModalVisible ] = useState( false );\n\tconst [ shadowName, setShadowName ] = useState( selectedShadow.name );\n\n\tif ( ! category || ! slug ) {\n\t\treturn null;\n\t}\n\n\tconst onShadowChange = ( shadow ) => {\n\t\tsetSelectedShadow( { ...selectedShadow, shadow } );\n\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, shadow } : s\n\t\t);\n\t\tsetShadows( updatedShadows );\n\t};\n\n\tconst onMenuClick = ( action ) => {\n\t\tif ( action === 'reset' ) {\n\t\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\t\ts.slug === slug ? baseSelectedShadow : s\n\t\t\t);\n\t\t\tsetSelectedShadow( baseSelectedShadow );\n\t\t\tsetShadows( updatedShadows );\n\t\t} else if ( action === 'delete' ) {\n\t\t\tsetIsConfirmDialogVisible( true );\n\t\t} else if ( action === 'rename' ) {\n\t\t\tsetIsRenameModalVisible( true );\n\t\t}\n\t};\n\n\tconst handleShadowDelete = () => {\n\t\tsetShadows( shadows.filter( ( s ) => s.slug !== slug ) );\n\t};\n\n\tconst handleShadowRename = ( newName ) => {\n\t\tif ( ! newName ) {\n\t\t\treturn;\n\t\t}\n\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, name: newName } : s\n\t\t);\n\t\tsetSelectedShadow( { ...selectedShadow, name: newName } );\n\t\tsetShadows( updatedShadows );\n\t};\n\n\treturn ! selectedShadow ? (\n\t\t<ScreenHeader title=\"\" />\n\t) : (\n\t\t<>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<ScreenHeader title={ selectedShadow.name } />\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Spacer marginTop={ 2 } marginBottom={ 0 } paddingX={ 4 }>\n\t\t\t\t\t\t<DropdownMenuV2\n\t\t\t\t\t\t\ttrigger={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Menu' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ( category === 'custom'\n\t\t\t\t\t\t\t\t? customShadowMenuItems\n\t\t\t\t\t\t\t\t: presetShadowMenuItems\n\t\t\t\t\t\t\t).map( ( item ) => (\n\t\t\t\t\t\t\t\t<DropdownMenuV2.Item\n\t\t\t\t\t\t\t\t\tkey={ item.action }\n\t\t\t\t\t\t\t\t\tonClick={ () => onMenuClick( item.action ) }\n\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\titem.action === 'reset' &&\n\t\t\t\t\t\t\t\t\t\tselectedShadow.shadow ===\n\t\t\t\t\t\t\t\t\t\t\tbaseSelectedShadow.shadow\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\t\t<DropdownMenuV2.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t{ item.label }\n\t\t\t\t\t\t\t\t\t</DropdownMenuV2.ItemLabel>\n\t\t\t\t\t\t\t\t</DropdownMenuV2.Item>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</DropdownMenuV2>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<ShadowsPreview shadow={ selectedShadow.shadow } />\n\t\t\t\t<ShadowEditor\n\t\t\t\t\tshadow={ selectedShadow.shadow }\n\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{ isConfirmDialogVisible && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen\n\t\t\t\t\tonConfirm={ () => {\n\t\t\t\t\t\thandleShadowDelete();\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => {\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t// translators: %s: name of the shadow\n\t\t\t\t\t\t'Are you sure you want to delete \"%s\"?',\n\t\t\t\t\t\tselectedShadow.name\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t\t{ isRenameModalVisible && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Rename' ) }\n\t\t\t\t\tonRequestClose={ () => setIsRenameModalVisible( false ) }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\thandleShadowRename( shadowName );\n\t\t\t\t\t\t\tsetIsRenameModalVisible( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Shadow name' ) }\n\t\t\t\t\t\t\tvalue={ shadowName }\n\t\t\t\t\t\t\tonChange={ ( value ) => setShadowName( value ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer marginBottom={ 6 } />\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tclassName=\"block-editor-shadow-edit-modal__actions\"\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\tsetIsRenameModalVisible( false )\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\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction ShadowsPreview( { shadow } ) {\n\tconst shadowStyle = {\n\t\tboxShadow: shadow,\n\t};\n\n\treturn (\n\t\t<Spacer marginBottom={ 4 } marginTop={ -2 }>\n\t\t\t<HStack\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tclassName=\"edit-site-global-styles__shadow-preview-panel\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadow-preview-block\"\n\t\t\t\t\tstyle={ shadowStyle }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</Spacer>\n\t);\n}\n\nfunction ShadowEditor( { shadow, onChange } ) {\n\tconst shadowParts = useMemo( () => getShadowParts( shadow ), [ shadow ] );\n\n\tconst onChangeShadowPart = ( index, part ) => {\n\t\tshadowParts[ index ] = part;\n\t\tonChange( shadowParts.join( ', ' ) );\n\t};\n\n\tconst onAddShadowPart = () => {\n\t\tshadowParts.push( defaultShadow );\n\t\tonChange( shadowParts.join( ', ' ) );\n\t};\n\n\tconst onRemoveShadowPart = ( index ) => {\n\t\tshadowParts.splice( index, 1 );\n\t\tonChange( shadowParts.join( ', ' ) );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t<Flex\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel__title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Shadows' ) }</Subtitle>\n\t\t\t\t\t</Flex>\n\t\t\t\t\t<FlexItem className=\"edit-site-global-styles__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonAddShadowPart();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t\t<Spacer />\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t{ shadowParts.map( ( part, index ) => (\n\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tshadow={ part }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonChangeShadowPart( index, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanRemove={ shadowParts.length > 1 }\n\t\t\t\t\t\tonRemove={ () => onRemoveShadowPart( index ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nfunction ShadowItem( { shadow, onChange, canRemove, onRemove } ) {\n\tconst popoverProps = {\n\t\tplacement: 'left-start',\n\t\toffset: 36,\n\t\tshift: true,\n\t};\n\tconst shadowObj = useMemo(\n\t\t() => shadowStringToObject( shadow ),\n\t\t[ shadow ]\n\t);\n\tconst onShadowChange = ( newShadow ) => {\n\t\tonChange( shadowObjectToString( newShadow ) );\n\t};\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName=\"edit-site-global-styles__shadow-editor__dropdown\"\n\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\tconst toggleProps = {\n\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'edit-site-global-styles__shadow-editor__dropdown-toggle',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t};\n\t\t\t\tconst removeButtonProps = {\n\t\t\t\t\tonClick: onRemove,\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'edit-site-global-styles__shadow-editor__remove-button',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\tlabel: __( 'Remove shadow' ),\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<HStack align=\"center\" justify=\"flex-start\" spacing={ 0 }>\n\t\t\t\t\t\t<FlexItem style={ { flexGrow: 1 } }>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\ticon={ shadowIcon }\n\t\t\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ shadowObj.inset\n\t\t\t\t\t\t\t\t\t? __( 'Inner shadow' )\n\t\t\t\t\t\t\t\t\t: __( 'Drop shadow' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t{ canRemove && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\t\t\t\t{ ...removeButtonProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HStack>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => (\n\t\t\t\t<DropdownContentWrapper\n\t\t\t\t\tpaddingSize=\"medium\"\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadow-editor__dropdown-content\"\n\t\t\t\t>\n\t\t\t\t\t<ShadowPopover\n\t\t\t\t\t\tshadowObj={ shadowObj }\n\t\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t\t/>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction ShadowPopover( { shadowObj, onChange } ) {\n\tconst __experimentalIsRenderedInSidebar = true;\n\tconst enableAlpha = true;\n\n\tconst onShadowChange = ( key, value ) => {\n\t\tconst newShadow = {\n\t\t\t...shadowObj,\n\t\t\t[ key ]: value,\n\t\t};\n\t\tonChange( newShadow );\n\t};\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 4 }\n\t\t\tclassName=\"edit-site-global-styles__shadow-editor-panel\"\n\t\t>\n\t\t\t<ColorPalette\n\t\t\t\tclearable={ false }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tvalue={ shadowObj.color }\n\t\t\t\tonChange={ ( value ) => onShadowChange( 'color', value ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ shadowObj.inset ? 'inset' : 'outset' }\n\t\t\t\tisBlock\n\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\tonShadowChange( 'inset', value === 'inset' )\n\t\t\t\t}\n\t\t\t\thideLabelFromVision\n\t\t\t\t__next40pxDefaultSize\n\t\t\t>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"outset\"\n\t\t\t\t\tlabel={ __( 'Outset' ) }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"inset\"\n\t\t\t\t\tlabel={ __( 'Inset' ) }\n\t\t\t\t/>\n\t\t\t</ToggleGroupControl>\n\t\t\t<Grid columns={ 2 } gap={ 4 }>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'X Position' ) }\n\t\t\t\t\tvalue={ shadowObj.x }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'x', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Y Position' ) }\n\t\t\t\t\tvalue={ shadowObj.y }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'y', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Blur' ) }\n\t\t\t\t\tvalue={ shadowObj.blur }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'blur', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Spread' ) }\n\t\t\t\t\tvalue={ shadowObj.spread }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'spread', value ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n\nfunction ShadowInputControl( { label, value, onChange } ) {\n\tconst onValueChange = ( next ) => {\n\t\tconst isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : '0px';\n\t\tonChange( nextValue );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ label }\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ value }\n\t\t\tonChange={ onValueChange }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAqBA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAMA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAIwB,IAAAW,WAAA,GAAAX,OAAA;AAlDxB;AACA;AACA;;AAGA;AACA;AACA;;AAgCA;AACA;AACA;;AAWA,MAAM;EAAEY;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAC7D,MAAM;EAAEC;AAAe,CAAC,GAAG,IAAAF,kBAAM,EAAEG,uBAAsB,CAAC;AAE1D,MAAMC,qBAAqB,GAAG,CAC7B;EACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS,CAAC;EACrBC,MAAM,EAAE;AACT,CAAC,EACD;EACCF,KAAK,EAAE,IAAAC,QAAE,EAAE,QAAS,CAAC;EACrBC,MAAM,EAAE;AACT,CAAC,CACD;AAED,MAAMC,qBAAqB,GAAG,CAC7B;EACCH,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;EACpBC,MAAM,EAAE;AACT,CAAC,CACD;AAEc,SAASE,gBAAgBA,CAAA,EAAG;E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AAEmD,KAAM;MAAG,CACtD,CAAC,eACF,IAAA1F,WAAA,CAAAgD,GAAA,EAAC6G,kBAAkB;QAClBtJ,KAAK,EAAG,IAAAC,QAAE,EAAE,MAAO,CAAG;QACtBkF,KAAK,EAAGmC,SAAS,CAACmC,IAAM;QACxBtF,QAAQ,EAAKgB,KAAK,IAAMnD,cAAc,CAAE,MAAM,EAAEmD,KAAM;MAAG,CACzD,CAAC,eACF,IAAA1F,WAAA,CAAAgD,GAAA,EAAC6G,kBAAkB;QAClBtJ,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;QACxBkF,KAAK,EAAGmC,SAAS,CAACoC,MAAQ;QAC1BvF,QAAQ,EAAKgB,KAAK,IAAMnD,cAAc,CAAE,QAAQ,EAAEmD,KAAM;MAAG,CAC3D,CAAC;IAAA,CACG,CAAC;EAAA,CACA,CAAC;AAEX;AAEA,SAASmE,kBAAkBA,CAAE;EAAEtJ,KAAK;EAAEmF,KAAK;EAAEhB;AAAS,CAAC,EAAG;EACzD,MAAMwF,aAAa,GAAKC,IAAI,IAAM;IACjC,MAAMC,SAAS,GAAGD,IAAI,KAAK3I,SAAS,IAAI,CAAE6I,KAAK,CAAEC,UAAU,CAAEH,IAAK,CAAE,CAAC;IACrE,MAAMI,SAAS,GAAGH,SAAS,GAAGD,IAAI,GAAG,KAAK;IAC1CzF,QAAQ,CAAE6F,SAAU,CAAC;EACtB,CAAC;EAED,oBACC,IAAAvK,WAAA,CAAAgD,GAAA,EAAC1D,WAAA,CAAAkL,yBAAW;IACXjK,KAAK,EAAGA,KAAO;IACfgF,qBAAqB;IACrBG,KAAK,EAAGA,KAAO;IACfhB,QAAQ,EAAGwF;EAAe,CAC1B,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_blockEditor","_icons","_element","_lockUnlock","_subtitle","_header","_shadowsPanel","_shadowUtils","_jsxRuntime","useGlobalSetting","unlock","blockEditorPrivateApis","Menu","componentsPrivateApis","customShadowMenuItems","label","__","action","presetShadowMenuItems","ShadowsEditPanel","goBack","params","category","slug","useNavigator","shadows","setShadows","useEffect","hasCurrentShadow","some","shadow","baseShadows","undefined","selectedShadow","setSelectedShadow","useState","find","baseSelectedShadow","useMemo","b","isConfirmDialogVisible","setIsConfirmDialogVisible","isRenameModalVisible","setIsRenameModalVisible","shadowName","setShadowName","name","onShadowChange","updatedShadows","map","s","onMenuClick","handleShadowDelete","filter","handleShadowRename","newName","jsx","default","title","jsxs","Fragment","children","__experimentalHStack","justify","FlexItem","__experimentalSpacer","marginTop","marginBottom","paddingX","trigger","Button","size","icon","moreVertical","item","Item","onClick","disabled","ItemLabel","className","ShadowsPreview","ShadowEditor","onChange","__experimentalConfirmDialog","isOpen","onConfirm","onCancel","confirmButtonText","sprintf","Modal","onRequestClose","onSubmit","event","preventDefault","__experimentalInputControl","__next40pxDefaultSize","autoComplete","placeholder","value","Flex","expanded","variant","type","shadowStyle","boxShadow","align","style","shadowParts","getShadowParts","onChangeShadowPart","index","part","newShadowParts","join","onAddShadowPart","defaultShadow","onRemoveShadowPart","p","i","__experimentalVStack","spacing","level","plus","__experimentalItemGroup","isBordered","isSeparated","ShadowItem","canRemove","length","onRemove","popoverProps","placement","offset","shift","shadowObj","shadowStringToObject","newShadow","shadowObjectToString","Dropdown","renderToggle","onToggle","toggleProps","clsx","removeButtonProps","flexGrow","shadowIcon","inset","reset","renderContent","__experimentalDropdownContentWrapper","paddingSize","ShadowPopover","__experimentalIsRenderedInSidebar","enableAlpha","key","ColorPalette","clearable","color","__experimentalToggleGroupControl","__nextHasNoMarginBottom","isBlock","hideLabelFromVision","__experimentalToggleGroupControlOption","__experimentalGrid","columns","gap","ShadowInputControl","x","y","blur","spread","onValueChange","next","isNumeric","isNaN","parseFloat","nextValue","__experimentalUnitControl"],"sources":["@wordpress/edit-site/src/components/global-styles/shadows-edit-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalInputControl as InputControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalGrid as Grid,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\tuseNavigator,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tDropdown,\n\tButton,\n\tFlex,\n\tFlexItem,\n\tColorPalette,\n\tModal,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\tplus,\n\tshadow as shadowIcon,\n\treset,\n\tmoreVertical,\n} from '@wordpress/icons';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport ScreenHeader from './header';\nimport { defaultShadow } from './shadows-panel';\nimport {\n\tgetShadowParts,\n\tshadowStringToObject,\n\tshadowObjectToString,\n} from './shadow-utils';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst { Menu } = unlock( componentsPrivateApis );\n\nconst customShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Rename' ),\n\t\taction: 'rename',\n\t},\n\t{\n\t\tlabel: __( 'Delete' ),\n\t\taction: 'delete',\n\t},\n];\n\nconst presetShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Reset' ),\n\t\taction: 'reset',\n\t},\n];\n\nexport default function ShadowsEditPanel() {\n\tconst {\n\t\tgoBack,\n\t\tparams: { category, slug },\n\t} = useNavigator();\n\tconst [ shadows, setShadows ] = useGlobalSetting(\n\t\t`shadow.presets.${ category }`\n\t);\n\n\tuseEffect( () => {\n\t\tconst hasCurrentShadow = shadows?.some(\n\t\t\t( shadow ) => shadow.slug === slug\n\t\t);\n\t\t// If the shadow being edited doesn't exist anymore in the global styles setting, navigate back\n\t\t// to prevent the user from editing a non-existent shadow entry.\n\t\t// This can happen, for example:\n\t\t// - when the user deletes the shadow\n\t\t// - when the user resets the styles while editing a custom shadow\n\t\t//\n\t\t// The check on the slug is necessary to prevent a double back navigation when the user triggers\n\t\t// a backward navigation by interacting with the screen's UI.\n\t\tif ( !! slug && ! hasCurrentShadow ) {\n\t\t\tgoBack();\n\t\t}\n\t}, [ shadows, slug, goBack ] );\n\n\tconst [ baseShadows ] = useGlobalSetting(\n\t\t`shadow.presets.${ category }`,\n\t\tundefined,\n\t\t'base'\n\t);\n\tconst [ selectedShadow, setSelectedShadow ] = useState( () =>\n\t\t( shadows || [] ).find( ( shadow ) => shadow.slug === slug )\n\t);\n\tconst baseSelectedShadow = useMemo(\n\t\t() => ( baseShadows || [] ).find( ( b ) => b.slug === slug ),\n\t\t[ baseShadows, slug ]\n\t);\n\tconst [ isConfirmDialogVisible, setIsConfirmDialogVisible ] =\n\t\tuseState( false );\n\tconst [ isRenameModalVisible, setIsRenameModalVisible ] = useState( false );\n\tconst [ shadowName, setShadowName ] = useState( selectedShadow.name );\n\n\tif ( ! category || ! slug ) {\n\t\treturn null;\n\t}\n\n\tconst onShadowChange = ( shadow ) => {\n\t\tsetSelectedShadow( { ...selectedShadow, shadow } );\n\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, shadow } : s\n\t\t);\n\t\tsetShadows( updatedShadows );\n\t};\n\n\tconst onMenuClick = ( action ) => {\n\t\tif ( action === 'reset' ) {\n\t\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\t\ts.slug === slug ? baseSelectedShadow : s\n\t\t\t);\n\t\t\tsetSelectedShadow( baseSelectedShadow );\n\t\t\tsetShadows( updatedShadows );\n\t\t} else if ( action === 'delete' ) {\n\t\t\tsetIsConfirmDialogVisible( true );\n\t\t} else if ( action === 'rename' ) {\n\t\t\tsetIsRenameModalVisible( true );\n\t\t}\n\t};\n\n\tconst handleShadowDelete = () => {\n\t\tsetShadows( shadows.filter( ( s ) => s.slug !== slug ) );\n\t};\n\n\tconst handleShadowRename = ( newName ) => {\n\t\tif ( ! newName ) {\n\t\t\treturn;\n\t\t}\n\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, name: newName } : s\n\t\t);\n\t\tsetSelectedShadow( { ...selectedShadow, name: newName } );\n\t\tsetShadows( updatedShadows );\n\t};\n\n\treturn ! selectedShadow ? (\n\t\t<ScreenHeader title=\"\" />\n\t) : (\n\t\t<>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<ScreenHeader title={ selectedShadow.name } />\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Spacer marginTop={ 2 } marginBottom={ 0 } paddingX={ 4 }>\n\t\t\t\t\t\t<Menu\n\t\t\t\t\t\t\ttrigger={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Menu' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ( category === 'custom'\n\t\t\t\t\t\t\t\t? customShadowMenuItems\n\t\t\t\t\t\t\t\t: presetShadowMenuItems\n\t\t\t\t\t\t\t).map( ( item ) => (\n\t\t\t\t\t\t\t\t<Menu.Item\n\t\t\t\t\t\t\t\t\tkey={ item.action }\n\t\t\t\t\t\t\t\t\tonClick={ () => onMenuClick( item.action ) }\n\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\titem.action === 'reset' &&\n\t\t\t\t\t\t\t\t\t\tselectedShadow.shadow ===\n\t\t\t\t\t\t\t\t\t\t\tbaseSelectedShadow.shadow\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\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t{ item.label }\n\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</Menu>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<ShadowsPreview shadow={ selectedShadow.shadow } />\n\t\t\t\t<ShadowEditor\n\t\t\t\t\tshadow={ selectedShadow.shadow }\n\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{ isConfirmDialogVisible && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen\n\t\t\t\t\tonConfirm={ () => {\n\t\t\t\t\t\thandleShadowDelete();\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => {\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %s: Name of the shadow preset. */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Are you sure you want to delete \"%s\" shadow preset?'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tselectedShadow.name\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t\t{ isRenameModalVisible && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Rename' ) }\n\t\t\t\t\tonRequestClose={ () => setIsRenameModalVisible( false ) }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\thandleShadowRename( shadowName );\n\t\t\t\t\t\t\tsetIsRenameModalVisible( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Shadow name' ) }\n\t\t\t\t\t\t\tvalue={ shadowName }\n\t\t\t\t\t\t\tonChange={ ( value ) => setShadowName( value ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer marginBottom={ 6 } />\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tclassName=\"block-editor-shadow-edit-modal__actions\"\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\tsetIsRenameModalVisible( false )\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\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction ShadowsPreview( { shadow } ) {\n\tconst shadowStyle = {\n\t\tboxShadow: shadow,\n\t};\n\n\treturn (\n\t\t<Spacer marginBottom={ 4 } marginTop={ -2 }>\n\t\t\t<HStack\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tclassName=\"edit-site-global-styles__shadow-preview-panel\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadow-preview-block\"\n\t\t\t\t\tstyle={ shadowStyle }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</Spacer>\n\t);\n}\n\nfunction ShadowEditor( { shadow, onChange } ) {\n\tconst shadowParts = useMemo( () => getShadowParts( shadow ), [ shadow ] );\n\n\tconst onChangeShadowPart = ( index, part ) => {\n\t\tconst newShadowParts = [ ...shadowParts ];\n\t\tnewShadowParts[ index ] = part;\n\t\tonChange( newShadowParts.join( ', ' ) );\n\t};\n\n\tconst onAddShadowPart = () => {\n\t\tonChange( [ ...shadowParts, defaultShadow ].join( ', ' ) );\n\t};\n\n\tconst onRemoveShadowPart = ( index ) => {\n\t\tonChange( shadowParts.filter( ( p, i ) => i !== index ).join( ', ' ) );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t<Flex\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel__title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Shadows' ) }</Subtitle>\n\t\t\t\t\t</Flex>\n\t\t\t\t\t<FlexItem className=\"edit-site-global-styles__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonAddShadowPart();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t\t<Spacer />\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t{ shadowParts.map( ( part, index ) => (\n\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tshadow={ part }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonChangeShadowPart( index, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanRemove={ shadowParts.length > 1 }\n\t\t\t\t\t\tonRemove={ () => onRemoveShadowPart( index ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nfunction ShadowItem( { shadow, onChange, canRemove, onRemove } ) {\n\tconst popoverProps = {\n\t\tplacement: 'left-start',\n\t\toffset: 36,\n\t\tshift: true,\n\t};\n\tconst shadowObj = useMemo(\n\t\t() => shadowStringToObject( shadow ),\n\t\t[ shadow ]\n\t);\n\tconst onShadowChange = ( newShadow ) => {\n\t\tonChange( shadowObjectToString( newShadow ) );\n\t};\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName=\"edit-site-global-styles__shadow-editor__dropdown\"\n\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\tconst toggleProps = {\n\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'edit-site-global-styles__shadow-editor__dropdown-toggle',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t};\n\t\t\t\tconst removeButtonProps = {\n\t\t\t\t\tonClick: onRemove,\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'edit-site-global-styles__shadow-editor__remove-button',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\tlabel: __( 'Remove shadow' ),\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<HStack align=\"center\" justify=\"flex-start\" spacing={ 0 }>\n\t\t\t\t\t\t<FlexItem style={ { flexGrow: 1 } }>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\ticon={ shadowIcon }\n\t\t\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ shadowObj.inset\n\t\t\t\t\t\t\t\t\t? __( 'Inner shadow' )\n\t\t\t\t\t\t\t\t\t: __( 'Drop shadow' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t{ canRemove && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\t\t\t\t{ ...removeButtonProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HStack>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => (\n\t\t\t\t<DropdownContentWrapper\n\t\t\t\t\tpaddingSize=\"medium\"\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadow-editor__dropdown-content\"\n\t\t\t\t>\n\t\t\t\t\t<ShadowPopover\n\t\t\t\t\t\tshadowObj={ shadowObj }\n\t\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t\t/>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction ShadowPopover( { shadowObj, onChange } ) {\n\tconst __experimentalIsRenderedInSidebar = true;\n\tconst enableAlpha = true;\n\n\tconst onShadowChange = ( key, value ) => {\n\t\tconst newShadow = {\n\t\t\t...shadowObj,\n\t\t\t[ key ]: value,\n\t\t};\n\t\tonChange( newShadow );\n\t};\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 4 }\n\t\t\tclassName=\"edit-site-global-styles__shadow-editor-panel\"\n\t\t>\n\t\t\t<ColorPalette\n\t\t\t\tclearable={ false }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tvalue={ shadowObj.color }\n\t\t\t\tonChange={ ( value ) => onShadowChange( 'color', value ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ shadowObj.inset ? 'inset' : 'outset' }\n\t\t\t\tisBlock\n\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\tonShadowChange( 'inset', value === 'inset' )\n\t\t\t\t}\n\t\t\t\thideLabelFromVision\n\t\t\t\t__next40pxDefaultSize\n\t\t\t>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"outset\"\n\t\t\t\t\tlabel={ __( 'Outset' ) }\n\t\t\t\t/>\n\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\tvalue=\"inset\"\n\t\t\t\t\tlabel={ __( 'Inset' ) }\n\t\t\t\t/>\n\t\t\t</ToggleGroupControl>\n\t\t\t<Grid columns={ 2 } gap={ 4 }>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'X Position' ) }\n\t\t\t\t\tvalue={ shadowObj.x }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'x', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Y Position' ) }\n\t\t\t\t\tvalue={ shadowObj.y }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'y', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Blur' ) }\n\t\t\t\t\tvalue={ shadowObj.blur }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'blur', value ) }\n\t\t\t\t/>\n\t\t\t\t<ShadowInputControl\n\t\t\t\t\tlabel={ __( 'Spread' ) }\n\t\t\t\t\tvalue={ shadowObj.spread }\n\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'spread', value ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n\nfunction ShadowInputControl( { label, value, onChange } ) {\n\tconst onValueChange = ( next ) => {\n\t\tconst isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : '0px';\n\t\tonChange( nextValue );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ label }\n\t\t\t__next40pxDefaultSize\n\t\t\tvalue={ value }\n\t\t\tonChange={ onValueChange }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAqBA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAMA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAIwB,IAAAW,WAAA,GAAAX,OAAA;AAlDxB;AACA;AACA;;AAGA;AACA;AACA;;AAgCA;AACA;AACA;;AAWA,MAAM;EAAEY;AAAiB,CAAC,GAAG,IAAAC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,IAAI,KAAK5I,SAAS,IAAI,CAAE8I,KAAK,CAAEC,UAAU,CAAEH,IAAK,CAAE,CAAC;IACrE,MAAMI,SAAS,GAAGH,SAAS,GAAGD,IAAI,GAAG,KAAK;IAC1C1F,QAAQ,CAAE8F,SAAU,CAAC;EACtB,CAAC;EAED,oBACC,IAAAxK,WAAA,CAAAgD,GAAA,EAAC1D,WAAA,CAAAmL,yBAAW;IACXlK,KAAK,EAAGA,KAAO;IACfgF,qBAAqB;IACrBG,KAAK,EAAGA,KAAO;IACfhB,QAAQ,EAAGyF;EAAe,CAC1B,CAAC;AAEJ","ignoreList":[]}
@@ -118,9 +118,6 @@ function ShadowItem({
118
118
  }) {
119
119
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_navigationButton.NavigationButtonAsItem, {
120
120
  path: `/shadows/edit/${category}/${shadow.slug}`,
121
- "aria-label":
122
- // translators: %s: name of the shadow
123
- (0, _i18n.sprintf)('Edit shadow %s', shadow.name),
124
121
  icon: _icons.shadow,
125
122
  children: shadow.name
126
123
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_blockEditor","_icons","_lockUnlock","_subtitle","_interopRequireDefault","_navigationButton","_header","_utils","_jsxRuntime","useGlobalSetting","unlock","blockEditorPrivateApis","defaultShadow","exports","ShadowsPanel","defaultShadows","defaultShadowsEnabled","themeShadows","customShadows","setCustomShadows","onCreateShadow","shadow","jsxs","Fragment","children","jsx","default","title","__","description","className","__experimentalVStack","spacing","ShadowList","label","shadows","category","length","canCreate","onCreate","handleAddShadow","newIndex","getNewIndexFromPresets","name","sprintf","slug","__experimentalHStack","justify","Flex","align","level","FlexItem","Button","size","icon","plus","onClick","__experimentalItemGroup","isBordered","isSeparated","map","ShadowItem","NavigationButtonAsItem","path","shadowIcon"],"sources":["@wordpress/edit-site/src/components/global-styles/shadows-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalItemGroup as ItemGroup,\n\tButton,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { plus, shadow as shadowIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport ScreenHeader from './header';\nimport { getNewIndexFromPresets } from './utils';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nexport const defaultShadow = '6px 6px 9px rgba(0, 0, 0, 0.2)';\n\nexport default function ShadowsPanel() {\n\tconst [ defaultShadows ] = useGlobalSetting( 'shadow.presets.default' );\n\tconst [ defaultShadowsEnabled ] = useGlobalSetting(\n\t\t'shadow.defaultPresets'\n\t);\n\tconst [ themeShadows ] = useGlobalSetting( 'shadow.presets.theme' );\n\tconst [ customShadows, setCustomShadows ] = useGlobalSetting(\n\t\t'shadow.presets.custom'\n\t);\n\n\tconst onCreateShadow = ( shadow ) => {\n\t\tsetCustomShadows( [ ...( customShadows || [] ), shadow ] );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Shadows' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage and create shadow styles for use across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel\"\n\t\t\t\t\tspacing={ 7 }\n\t\t\t\t>\n\t\t\t\t\t{ defaultShadowsEnabled && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\tshadows={ defaultShadows || [] }\n\t\t\t\t\t\t\tcategory=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ themeShadows && themeShadows.length > 0 && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\tshadows={ themeShadows || [] }\n\t\t\t\t\t\t\tcategory=\"theme\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<ShadowList\n\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\tshadows={ customShadows || [] }\n\t\t\t\t\t\tcategory=\"custom\"\n\t\t\t\t\t\tcanCreate\n\t\t\t\t\t\tonCreate={ onCreateShadow }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nfunction ShadowList( { label, shadows, category, canCreate, onCreate } ) {\n\tconst handleAddShadow = () => {\n\t\tconst newIndex = getNewIndexFromPresets( shadows, 'shadow-' );\n\t\tonCreate( {\n\t\t\tname: sprintf(\n\t\t\t\t/* translators: %s: is an index for a preset */\n\t\t\t\t__( 'Shadow %s' ),\n\t\t\t\tnewIndex\n\t\t\t),\n\t\t\tshadow: defaultShadow,\n\t\t\tslug: `shadow-${ newIndex }`,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Flex\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel__title\"\n\t\t\t\t>\n\t\t\t\t\t<Subtitle level={ 3 }>{ label }</Subtitle>\n\t\t\t\t</Flex>\n\t\t\t\t{ canCreate && (\n\t\t\t\t\t<FlexItem className=\"edit-site-global-styles__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thandleAddShadow();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ shadows.length > 0 && (\n\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t{ shadows.map( ( shadow ) => (\n\t\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\t\tkey={ shadow.slug }\n\t\t\t\t\t\t\tshadow={ shadow }\n\t\t\t\t\t\t\tcategory={ category }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</ItemGroup>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nfunction ShadowItem( { shadow, category } ) {\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ `/shadows/edit/${ category }/${ shadow.slug }` }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: name of the shadow\n\t\t\t\tsprintf( 'Edit shadow %s', shadow.name )\n\t\t\t}\n\t\t\ticon={ shadowIcon }\n\t\t>\n\t\t\t{ shadow.name }\n\t\t</NavigationButtonAsItem>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAF,sBAAA,CAAAN,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AAAiD,IAAAU,WAAA,GAAAV,OAAA;AAtBjD;AACA;AACA;;AAaA;AACA;AACA;;AAOA,MAAM;EAAEW;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEtD,MAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,gCAAgC;AAE9C,SAASE,YAAYA,CAAA,EAAG;EACtC,MAAM,CAAE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BACV,IAAA9B,WAAA,CAAAiB,GAAA,EAAC5B,WAAA,CAAAsD,QAAQ;QAACrB,SAAS,EAAC,2DAA2D;QAAAN,QAAA,eAC9E,IAAAhB,WAAA,CAAAiB,GAAA,EAAC5B,WAAA,CAAAuD,MAAM;UACNC,IAAI,EAAC,OAAO;UACZC,IAAI,EAAGC,WAAM;UACbrB,KAAK,EAAG,IAAAN,QAAE,EAAE,YAAa,CAAG;UAC5B4B,OAAO,EAAGA,CAAA,KAAM;YACfhB,eAAe,CAAC,CAAC;UAClB;QAAG,CACH;MAAC,CACO,CACV;IAAA,CACM,CAAC,EACPL,OAAO,CAACE,MAAM,GAAG,CAAC,iBACnB,IAAA7B,WAAA,CAAAiB,GAAA,EAAC5B,WAAA,CAAA4D,uBAAS;MAACC,UAAU;MAACC,WAAW;MAAAnC,QAAA,EAC9BW,OAAO,CAACyB,GAAG,CAAIvC,MAAM,iBACtB,IAAAb,WAAA,CAAAiB,GAAA,EAACoC,UAAU;QAEVxC,MAAM,EAAGA,MAAQ;QACjBe,QAAQ,EAAGA;MAAU,GAFff,MAAM,CAACwB,IAGb,CACA;IAAC,CACO,CACX;EAAA,CACM,CAAC;AAEX;AAEA,SAASgB,UAAUA,CAAE;EAAExC,MAAM;EAAEe;AAAS,CAAC,EAAG;EAC3C,oBACC,IAAA5B,WAAA,CAAAiB,GAAA,EAACpB,iBAAA,CAAAyD,sBAAsB;IACtBC,IAAI,EAAG,iBAAkB3B,QAAQ,IAAMf,MAAM,CAACwB,IAAI,EAAK;IACvD;IACC;IACA,IAAAD,aAAO,EAAE,gBAAgB,EAAEvB,MAAM,CAACsB,IAAK,CACvC;IACDW,IAAI,EAAGU,aAAY;IAAAxC,QAAA,EAEjBH,MAAM,CAACsB;EAAI,CACU,CAAC;AAE3B","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_i18n","_blockEditor","_icons","_lockUnlock","_subtitle","_interopRequireDefault","_navigationButton","_header","_utils","_jsxRuntime","useGlobalSetting","unlock","blockEditorPrivateApis","defaultShadow","exports","ShadowsPanel","defaultShadows","defaultShadowsEnabled","themeShadows","customShadows","setCustomShadows","onCreateShadow","shadow","jsxs","Fragment","children","jsx","default","title","__","description","className","__experimentalVStack","spacing","ShadowList","label","shadows","category","length","canCreate","onCreate","handleAddShadow","newIndex","getNewIndexFromPresets","name","sprintf","slug","__experimentalHStack","justify","Flex","align","level","FlexItem","Button","size","icon","plus","onClick","__experimentalItemGroup","isBordered","isSeparated","map","ShadowItem","NavigationButtonAsItem","path","shadowIcon"],"sources":["@wordpress/edit-site/src/components/global-styles/shadows-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalItemGroup as ItemGroup,\n\tButton,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { plus, shadow as shadowIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport ScreenHeader from './header';\nimport { getNewIndexFromPresets } from './utils';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nexport const defaultShadow = '6px 6px 9px rgba(0, 0, 0, 0.2)';\n\nexport default function ShadowsPanel() {\n\tconst [ defaultShadows ] = useGlobalSetting( 'shadow.presets.default' );\n\tconst [ defaultShadowsEnabled ] = useGlobalSetting(\n\t\t'shadow.defaultPresets'\n\t);\n\tconst [ themeShadows ] = useGlobalSetting( 'shadow.presets.theme' );\n\tconst [ customShadows, setCustomShadows ] = useGlobalSetting(\n\t\t'shadow.presets.custom'\n\t);\n\n\tconst onCreateShadow = ( shadow ) => {\n\t\tsetCustomShadows( [ ...( customShadows || [] ), shadow ] );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Shadows' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage and create shadow styles for use across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel\"\n\t\t\t\t\tspacing={ 7 }\n\t\t\t\t>\n\t\t\t\t\t{ defaultShadowsEnabled && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\tshadows={ defaultShadows || [] }\n\t\t\t\t\t\t\tcategory=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ themeShadows && themeShadows.length > 0 && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\tshadows={ themeShadows || [] }\n\t\t\t\t\t\t\tcategory=\"theme\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<ShadowList\n\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\tshadows={ customShadows || [] }\n\t\t\t\t\t\tcategory=\"custom\"\n\t\t\t\t\t\tcanCreate\n\t\t\t\t\t\tonCreate={ onCreateShadow }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nfunction ShadowList( { label, shadows, category, canCreate, onCreate } ) {\n\tconst handleAddShadow = () => {\n\t\tconst newIndex = getNewIndexFromPresets( shadows, 'shadow-' );\n\t\tonCreate( {\n\t\t\tname: sprintf(\n\t\t\t\t/* translators: %s: is an index for a preset */\n\t\t\t\t__( 'Shadow %s' ),\n\t\t\t\tnewIndex\n\t\t\t),\n\t\t\tshadow: defaultShadow,\n\t\t\tslug: `shadow-${ newIndex }`,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Flex\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel__title\"\n\t\t\t\t>\n\t\t\t\t\t<Subtitle level={ 3 }>{ label }</Subtitle>\n\t\t\t\t</Flex>\n\t\t\t\t{ canCreate && (\n\t\t\t\t\t<FlexItem className=\"edit-site-global-styles__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thandleAddShadow();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ shadows.length > 0 && (\n\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t{ shadows.map( ( shadow ) => (\n\t\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\t\tkey={ shadow.slug }\n\t\t\t\t\t\t\tshadow={ shadow }\n\t\t\t\t\t\t\tcategory={ category }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</ItemGroup>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nfunction ShadowItem( { shadow, category } ) {\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ `/shadows/edit/${ category }/${ shadow.slug }` }\n\t\t\ticon={ shadowIcon }\n\t\t>\n\t\t\t{ shadow.name }\n\t\t</NavigationButtonAsItem>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;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BAAsB;IACtBC,IAAI,EAAG,iBAAkB3B,QAAQ,IAAMf,MAAM,CAACwB,IAAI,EAAK;IACvDS,IAAI,EAAGU,aAAY;IAAAxC,QAAA,EAEjBH,MAAM,CAACsB;EAAI,CACU,CAAC;AAE3B","ignoreList":[]}
@@ -40,12 +40,8 @@ function ElementItem({
40
40
  const [fallbackBackgroundColor] = useGlobalStyle('color.background');
41
41
  const [gradientValue] = useGlobalStyle(prefix + 'color.gradient');
42
42
  const [color] = useGlobalStyle(prefix + 'color.text');
43
- const navigationButtonLabel = (0, _i18n.sprintf)(
44
- // translators: %s: is a subset of Typography, e.g., 'text' or 'links'.
45
- (0, _i18n.__)('Typography %s styles'), label);
46
43
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_navigationButton.NavigationButtonAsItem, {
47
44
  path: parentMenu + '/typography/' + element,
48
- "aria-label": navigationButtonLabel,
49
45
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
50
46
  justify: "flex-start",
51
47
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
@@ -58,6 +54,7 @@ function ElementItem({
58
54
  fontWeight,
59
55
  ...extraStyles
60
56
  },
57
+ "aria-hidden": "true",
61
58
  children: (0, _i18n.__)('Aa')
62
59
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
63
60
  children: label
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_blockEditor","_navigationButton","_subtitle","_interopRequireDefault","_lockUnlock","_jsxRuntime","useGlobalStyle","unlock","blockEditorPrivateApis","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","backgroundColor","fallbackBackgroundColor","gradientValue","color","navigationButtonLabel","sprintf","__","jsx","NavigationButtonAsItem","path","children","jsxs","__experimentalHStack","justify","FlexItem","className","style","background","TypographyElements","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-elements.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA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AAA,EAAChC,WAAA,CAAA4C,uBAAS;MAACC,UAAU;MAACC,WAAW;MAAAf,QAAA,gBAChC,IAAAzB,WAAA,CAAAsB,GAAA,EAAClB,WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,MAAM;QACdC,KAAK,EAAG,IAAAc,QAAE,EAAE,MAAO;MAAG,CACtB,CAAC,eACF,IAAArB,WAAA,CAAAsB,GAAA,EAAClB,WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,MAAM;QACdC,KAAK,EAAG,IAAAc,QAAE,EAAE,OAAQ;MAAG,CACvB,CAAC,eACF,IAAArB,WAAA,CAAAsB,GAAA,EAAClB,WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,SAAS;QACjBC,KAAK,EAAG,IAAAc,QAAE,EAAE,UAAW;MAAG,CAC1B,CAAC,eACF,IAAArB,WAAA,CAAAsB,GAAA,EAAClB,WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,SAAS;QACjBC,KAAK,EAAG,IAAAc,QAAE,EAAE,UAAW;MAAG,CAC1B,CAAC,eACF,IAAArB,WAAA,CAAAsB,GAAA,EAAClB,WAAW;QACXC,UAAU,EAAGA,UAAY;QACzBC,OAAO,EAAC,QAAQ;QAChBC,KAAK,EAAG,IAAAc,QAAE,EAAE,SAAU;MAAG,CACzB,CAAC;IAAA,CACQ,CAAC;EAAA,CACL,CAAC;AAEX;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEcH,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_components","_blockEditor","_navigationButton","_subtitle","_interopRequireDefault","_lockUnlock","_jsxRuntime","useGlobalStyle","unlock","blockEditorPrivateApis","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","backgroundColor","fallbackBackgroundColor","gradientValue","color","jsx","NavigationButtonAsItem","path","children","jsxs","__experimentalHStack","justify","FlexItem","className","style","background","__","TypographyElements","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-elements.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\treturn (\n\t\t<NavigationButtonAsItem path={ parentMenu + '/typography/' + element }>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,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