@wordpress/edit-site 5.34.0 → 5.35.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 (371) hide show
  1. package/CHANGELOG.md +9 -3
  2. package/build/components/add-new-template/index.js +2 -2
  3. package/build/components/add-new-template/index.js.map +1 -1
  4. package/build/components/app/index.js +4 -2
  5. package/build/components/app/index.js.map +1 -1
  6. package/build/components/block-editor/editor-canvas.js +4 -18
  7. package/build/components/block-editor/editor-canvas.js.map +1 -1
  8. package/build/components/block-editor/site-editor-canvas.js +2 -2
  9. package/build/components/block-editor/site-editor-canvas.js.map +1 -1
  10. package/build/components/dataviews-actions/index.js +46 -0
  11. package/build/components/dataviews-actions/index.js.map +1 -0
  12. package/build/components/editor/index.js +68 -12
  13. package/build/components/editor/index.js.map +1 -1
  14. package/build/components/global-styles/background-panel.js +13 -1
  15. package/build/components/global-styles/background-panel.js.map +1 -1
  16. package/build/components/global-styles/color-indicator-wrapper.js +2 -2
  17. package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
  18. package/build/components/global-styles/color-palette-panel.js +5 -2
  19. package/build/components/global-styles/color-palette-panel.js.map +1 -1
  20. package/build/components/global-styles/gradients-palette-panel.js +1 -2
  21. package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
  22. package/build/components/global-styles/hooks.js +5 -2
  23. package/build/components/global-styles/hooks.js.map +1 -1
  24. package/build/components/global-styles/icon-with-current-color.js +2 -2
  25. package/build/components/global-styles/icon-with-current-color.js.map +1 -1
  26. package/build/components/global-styles/preset-colors.js +29 -0
  27. package/build/components/global-styles/preset-colors.js.map +1 -0
  28. package/build/components/global-styles/preview-colors.js +3 -7
  29. package/build/components/global-styles/preview-colors.js.map +1 -1
  30. package/build/components/global-styles/screen-color-palette.js +5 -5
  31. package/build/components/global-styles/screen-color-palette.js.map +1 -1
  32. package/build/components/global-styles/screen-colors.js +1 -4
  33. package/build/components/global-styles/screen-colors.js.map +1 -1
  34. package/build/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
  35. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  36. package/build/components/global-styles/typography-example.js +5 -2
  37. package/build/components/global-styles/typography-example.js.map +1 -1
  38. package/build/components/global-styles/ui.js +4 -1
  39. package/build/components/global-styles/ui.js.map +1 -1
  40. package/build/components/global-styles/variations/variation.js +12 -6
  41. package/build/components/global-styles/variations/variation.js.map +1 -1
  42. package/build/components/global-styles/variations/variations-color.js +5 -5
  43. package/build/components/global-styles/variations/variations-color.js.map +1 -1
  44. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -0
  45. package/build/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +8 -5
  46. package/build/components/global-styles-sidebar/index.js.map +1 -0
  47. package/build/components/header-edit-mode/index.js +20 -120
  48. package/build/components/header-edit-mode/index.js.map +1 -1
  49. package/build/components/layout/index.js +3 -6
  50. package/build/components/layout/index.js.map +1 -1
  51. package/build/components/layout/router.js +69 -14
  52. package/build/components/layout/router.js.map +1 -1
  53. package/build/components/page/index.js +2 -2
  54. package/build/components/page/index.js.map +1 -1
  55. package/build/components/page-pages/index.js +4 -15
  56. package/build/components/page-pages/index.js.map +1 -1
  57. package/build/components/page-patterns/dataviews-pattern-actions.js +4 -80
  58. package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  59. package/build/components/page-patterns/index.js +9 -20
  60. package/build/components/page-patterns/index.js.map +1 -1
  61. package/build/components/page-templates/index.js +6 -14
  62. package/build/components/page-templates/index.js.map +1 -1
  63. package/build/components/pagination/index.js +2 -2
  64. package/build/components/pagination/index.js.map +1 -1
  65. package/build/components/resizable-frame/index.js +11 -3
  66. package/build/components/resizable-frame/index.js.map +1 -1
  67. package/build/components/revisions/index.js +5 -2
  68. package/build/components/revisions/index.js.map +1 -1
  69. package/build/components/save-panel/index.js +4 -4
  70. package/build/components/save-panel/index.js.map +1 -1
  71. package/build/components/sidebar/index.js +61 -31
  72. package/build/components/sidebar/index.js.map +1 -1
  73. package/build/components/sidebar-button/index.js +2 -2
  74. package/build/components/sidebar-button/index.js.map +1 -1
  75. package/build/components/sidebar-dataviews/dataview-item.js +2 -2
  76. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  77. package/build/components/sidebar-navigation-item/index.js +5 -3
  78. package/build/components/sidebar-navigation-item/index.js.map +1 -1
  79. package/build/components/sidebar-navigation-screen/index.js +6 -32
  80. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  81. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
  82. package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  83. package/build/components/sidebar-navigation-screen-global-styles/index.js +4 -1
  84. package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  85. package/build/components/sidebar-navigation-screen-navigation-menu/index.js +10 -3
  86. package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  87. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +16 -1
  88. package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  89. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -0
  90. package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  91. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +16 -6
  92. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  93. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +2 -9
  94. package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  95. package/build/components/sidebar-navigation-screen-page/status-label.js +2 -2
  96. package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  97. package/build/components/sidebar-navigation-screen-pattern/index.js +4 -9
  98. package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  99. package/build/components/sidebar-navigation-screen-patterns/index.js +4 -14
  100. package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  101. package/build/components/sidebar-navigation-screen-template/index.js +4 -1
  102. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  103. package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -1
  104. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  105. package/build/components/site-hub/index.js +3 -3
  106. package/build/components/site-hub/index.js.map +1 -1
  107. package/build/components/site-icon/index.js +2 -2
  108. package/build/components/site-icon/index.js.map +1 -1
  109. package/build/components/style-book/index.js +10 -7
  110. package/build/components/style-book/index.js.map +1 -1
  111. package/build/components/template-part-converter/index.js +18 -1
  112. package/build/components/template-part-converter/index.js.map +1 -1
  113. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -2
  114. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  115. package/build/utils/get-is-list-page.js +1 -1
  116. package/build/utils/get-is-list-page.js.map +1 -1
  117. package/build/utils/use-activate-theme.js +9 -6
  118. package/build/utils/use-activate-theme.js.map +1 -1
  119. package/build-module/components/add-new-template/index.js +2 -2
  120. package/build-module/components/add-new-template/index.js.map +1 -1
  121. package/build-module/components/app/index.js +4 -2
  122. package/build-module/components/app/index.js.map +1 -1
  123. package/build-module/components/block-editor/editor-canvas.js +4 -18
  124. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  125. package/build-module/components/block-editor/site-editor-canvas.js +2 -2
  126. package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
  127. package/build-module/components/dataviews-actions/index.js +38 -0
  128. package/build-module/components/dataviews-actions/index.js.map +1 -0
  129. package/build-module/components/editor/index.js +69 -13
  130. package/build-module/components/editor/index.js.map +1 -1
  131. package/build-module/components/global-styles/background-panel.js +12 -1
  132. package/build-module/components/global-styles/background-panel.js.map +1 -1
  133. package/build-module/components/global-styles/color-indicator-wrapper.js +2 -2
  134. package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
  135. package/build-module/components/global-styles/color-palette-panel.js +4 -2
  136. package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
  137. package/build-module/components/global-styles/gradients-palette-panel.js +1 -2
  138. package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
  139. package/build-module/components/global-styles/hooks.js +4 -1
  140. package/build-module/components/global-styles/hooks.js.map +1 -1
  141. package/build-module/components/global-styles/icon-with-current-color.js +2 -2
  142. package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
  143. package/build-module/components/global-styles/preset-colors.js +22 -0
  144. package/build-module/components/global-styles/preset-colors.js.map +1 -0
  145. package/build-module/components/global-styles/preview-colors.js +3 -7
  146. package/build-module/components/global-styles/preview-colors.js.map +1 -1
  147. package/build-module/components/global-styles/screen-color-palette.js +5 -5
  148. package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
  149. package/build-module/components/global-styles/screen-colors.js +1 -4
  150. package/build-module/components/global-styles/screen-colors.js.map +1 -1
  151. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
  152. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  153. package/build-module/components/global-styles/typography-example.js +4 -1
  154. package/build-module/components/global-styles/typography-example.js.map +1 -1
  155. package/build-module/components/global-styles/ui.js +4 -1
  156. package/build-module/components/global-styles/ui.js.map +1 -1
  157. package/build-module/components/global-styles/variations/variation.js +11 -5
  158. package/build-module/components/global-styles/variations/variation.js.map +1 -1
  159. package/build-module/components/global-styles/variations/variations-color.js +6 -6
  160. package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
  161. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -0
  162. package/build-module/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +8 -5
  163. package/build-module/components/global-styles-sidebar/index.js.map +1 -0
  164. package/build-module/components/header-edit-mode/index.js +20 -120
  165. package/build-module/components/header-edit-mode/index.js.map +1 -1
  166. package/build-module/components/layout/index.js +3 -6
  167. package/build-module/components/layout/index.js.map +1 -1
  168. package/build-module/components/layout/router.js +69 -15
  169. package/build-module/components/layout/router.js.map +1 -1
  170. package/build-module/components/page/index.js +2 -2
  171. package/build-module/components/page/index.js.map +1 -1
  172. package/build-module/components/page-pages/index.js +4 -15
  173. package/build-module/components/page-pages/index.js.map +1 -1
  174. package/build-module/components/page-patterns/dataviews-pattern-actions.js +4 -80
  175. package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
  176. package/build-module/components/page-patterns/index.js +10 -21
  177. package/build-module/components/page-patterns/index.js.map +1 -1
  178. package/build-module/components/page-templates/index.js +6 -14
  179. package/build-module/components/page-templates/index.js.map +1 -1
  180. package/build-module/components/pagination/index.js +2 -2
  181. package/build-module/components/pagination/index.js.map +1 -1
  182. package/build-module/components/resizable-frame/index.js +12 -4
  183. package/build-module/components/resizable-frame/index.js.map +1 -1
  184. package/build-module/components/revisions/index.js +4 -1
  185. package/build-module/components/revisions/index.js.map +1 -1
  186. package/build-module/components/save-panel/index.js +4 -4
  187. package/build-module/components/save-panel/index.js.map +1 -1
  188. package/build-module/components/sidebar/index.js +62 -32
  189. package/build-module/components/sidebar/index.js.map +1 -1
  190. package/build-module/components/sidebar-button/index.js +2 -2
  191. package/build-module/components/sidebar-button/index.js.map +1 -1
  192. package/build-module/components/sidebar-dataviews/dataview-item.js +2 -2
  193. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  194. package/build-module/components/sidebar-navigation-item/index.js +5 -3
  195. package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
  196. package/build-module/components/sidebar-navigation-screen/index.js +6 -32
  197. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  198. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
  199. package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
  200. package/build-module/components/sidebar-navigation-screen-global-styles/index.js +4 -1
  201. package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
  202. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +10 -3
  203. package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
  204. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +16 -1
  205. package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
  206. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -0
  207. package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
  208. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +16 -6
  209. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  210. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +2 -9
  211. package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
  212. package/build-module/components/sidebar-navigation-screen-page/status-label.js +2 -2
  213. package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
  214. package/build-module/components/sidebar-navigation-screen-pattern/index.js +4 -9
  215. package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
  216. package/build-module/components/sidebar-navigation-screen-patterns/index.js +4 -14
  217. package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
  218. package/build-module/components/sidebar-navigation-screen-template/index.js +4 -1
  219. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  220. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -1
  221. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  222. package/build-module/components/site-hub/index.js +3 -3
  223. package/build-module/components/site-hub/index.js.map +1 -1
  224. package/build-module/components/site-icon/index.js +2 -2
  225. package/build-module/components/site-icon/index.js.map +1 -1
  226. package/build-module/components/style-book/index.js +9 -6
  227. package/build-module/components/style-book/index.js.map +1 -1
  228. package/build-module/components/template-part-converter/index.js +18 -1
  229. package/build-module/components/template-part-converter/index.js.map +1 -1
  230. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +4 -1
  231. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  232. package/build-module/utils/get-is-list-page.js +1 -1
  233. package/build-module/utils/get-is-list-page.js.map +1 -1
  234. package/build-module/utils/use-activate-theme.js +9 -6
  235. package/build-module/utils/use-activate-theme.js.map +1 -1
  236. package/build-style/style-rtl.css +144 -374
  237. package/build-style/style.css +144 -374
  238. package/package.json +43 -45
  239. package/src/components/add-new-template/index.js +2 -2
  240. package/src/components/app/index.js +5 -2
  241. package/src/components/block-editor/editor-canvas.js +6 -26
  242. package/src/components/block-editor/site-editor-canvas.js +2 -2
  243. package/src/components/block-editor/style.scss +2 -2
  244. package/src/components/dataviews-actions/index.js +38 -0
  245. package/src/components/editor/index.js +76 -16
  246. package/src/components/editor/style.scss +0 -4
  247. package/src/components/global-styles/background-panel.js +17 -2
  248. package/src/components/global-styles/color-indicator-wrapper.js +2 -2
  249. package/src/components/global-styles/color-palette-panel.js +3 -4
  250. package/src/components/global-styles/gradients-palette-panel.js +1 -4
  251. package/src/components/global-styles/hooks.js +2 -1
  252. package/src/components/global-styles/icon-with-current-color.js +2 -2
  253. package/src/components/global-styles/preset-colors.js +18 -0
  254. package/src/components/global-styles/preview-colors.js +4 -7
  255. package/src/components/global-styles/screen-color-palette.js +4 -4
  256. package/src/components/global-styles/screen-colors.js +0 -2
  257. package/src/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
  258. package/src/components/global-styles/stories/index.story.js +2 -1
  259. package/src/components/global-styles/typography-example.js +2 -1
  260. package/src/components/global-styles/ui.js +5 -1
  261. package/src/components/global-styles/variations/style.scss +15 -31
  262. package/src/components/global-styles/variations/variation.js +13 -10
  263. package/src/components/global-styles/variations/variations-color.js +5 -8
  264. package/src/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +7 -2
  265. package/src/components/{sidebar-edit-mode → global-styles-sidebar}/style.scss +0 -11
  266. package/src/components/header-edit-mode/index.js +25 -164
  267. package/src/components/header-edit-mode/style.scss +1 -199
  268. package/src/components/layout/index.js +3 -8
  269. package/src/components/layout/router.js +65 -15
  270. package/src/components/layout/style.scss +2 -1
  271. package/src/components/page/index.js +2 -2
  272. package/src/components/page-pages/index.js +8 -38
  273. package/src/components/page-pages/style.scss +0 -11
  274. package/src/components/page-patterns/dataviews-pattern-actions.js +3 -92
  275. package/src/components/page-patterns/index.js +16 -35
  276. package/src/components/page-templates/index.js +10 -29
  277. package/src/components/pagination/index.js +2 -2
  278. package/src/components/resizable-frame/index.js +16 -4
  279. package/src/components/revisions/index.js +2 -1
  280. package/src/components/save-panel/index.js +4 -4
  281. package/src/components/sidebar/index.js +61 -37
  282. package/src/components/sidebar-button/index.js +2 -5
  283. package/src/components/sidebar-dataviews/dataview-item.js +4 -7
  284. package/src/components/sidebar-navigation-item/index.js +3 -3
  285. package/src/components/sidebar-navigation-screen/index.js +7 -31
  286. package/src/components/sidebar-navigation-screen/style.scss +11 -9
  287. package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
  288. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -1
  289. package/src/components/sidebar-navigation-screen-navigation-menu/index.js +6 -1
  290. package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +18 -1
  291. package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -0
  292. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +8 -4
  293. package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +0 -10
  294. package/src/components/sidebar-navigation-screen-page/status-label.js +2 -2
  295. package/src/components/sidebar-navigation-screen-pattern/index.js +2 -8
  296. package/src/components/sidebar-navigation-screen-patterns/index.js +2 -13
  297. package/src/components/sidebar-navigation-screen-template/index.js +2 -1
  298. package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -1
  299. package/src/components/site-hub/index.js +3 -3
  300. package/src/components/site-icon/index.js +2 -2
  301. package/src/components/style-book/index.js +7 -6
  302. package/src/components/template-part-converter/index.js +16 -3
  303. package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
  304. package/src/style.scss +1 -11
  305. package/src/utils/get-is-list-page.js +1 -3
  306. package/src/utils/use-activate-theme.js +4 -4
  307. package/build/components/global-styles/global-styles-provider.js +0 -129
  308. package/build/components/global-styles/global-styles-provider.js.map +0 -1
  309. package/build/components/header-edit-mode/document-tools/index.js +0 -68
  310. package/build/components/header-edit-mode/document-tools/index.js.map +0 -1
  311. package/build/components/sidebar-edit-mode/default-sidebar.js.map +0 -1
  312. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +0 -1
  313. package/build/components/sidebar-edit-mode/index.js +0 -147
  314. package/build/components/sidebar-edit-mode/index.js.map +0 -1
  315. package/build/components/sidebar-edit-mode/page-panels/index.js +0 -129
  316. package/build/components/sidebar-edit-mode/page-panels/index.js.map +0 -1
  317. package/build/components/sidebar-edit-mode/page-panels/page-content.js +0 -34
  318. package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +0 -1
  319. package/build/components/sidebar-edit-mode/page-panels/page-summary.js +0 -46
  320. package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +0 -1
  321. package/build/components/sidebar-edit-mode/settings-header/index.js +0 -42
  322. package/build/components/sidebar-edit-mode/settings-header/index.js.map +0 -1
  323. package/build/components/sidebar-edit-mode/template-panel/hooks.js +0 -86
  324. package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +0 -1
  325. package/build/components/sidebar-edit-mode/template-panel/index.js +0 -127
  326. package/build/components/sidebar-edit-mode/template-panel/index.js.map +0 -1
  327. package/build/components/start-template-options/index.js +0 -191
  328. package/build/components/start-template-options/index.js.map +0 -1
  329. package/build/utils/math.js +0 -98
  330. package/build/utils/math.js.map +0 -1
  331. package/build-module/components/global-styles/global-styles-provider.js +0 -120
  332. package/build-module/components/global-styles/global-styles-provider.js.map +0 -1
  333. package/build-module/components/header-edit-mode/document-tools/index.js +0 -61
  334. package/build-module/components/header-edit-mode/document-tools/index.js.map +0 -1
  335. package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +0 -1
  336. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +0 -1
  337. package/build-module/components/sidebar-edit-mode/index.js +0 -138
  338. package/build-module/components/sidebar-edit-mode/index.js.map +0 -1
  339. package/build-module/components/sidebar-edit-mode/page-panels/index.js +0 -121
  340. package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +0 -1
  341. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +0 -27
  342. package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +0 -1
  343. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -39
  344. package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +0 -1
  345. package/build-module/components/sidebar-edit-mode/settings-header/index.js +0 -35
  346. package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +0 -1
  347. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +0 -79
  348. package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +0 -1
  349. package/build-module/components/sidebar-edit-mode/template-panel/index.js +0 -119
  350. package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +0 -1
  351. package/build-module/components/start-template-options/index.js +0 -184
  352. package/build-module/components/start-template-options/index.js.map +0 -1
  353. package/build-module/utils/math.js +0 -92
  354. package/build-module/utils/math.js.map +0 -1
  355. package/src/components/global-styles/global-styles-provider.js +0 -162
  356. package/src/components/header-edit-mode/document-tools/index.js +0 -68
  357. package/src/components/sidebar-edit-mode/index.js +0 -173
  358. package/src/components/sidebar-edit-mode/page-panels/index.js +0 -133
  359. package/src/components/sidebar-edit-mode/page-panels/page-content.js +0 -29
  360. package/src/components/sidebar-edit-mode/page-panels/page-summary.js +0 -61
  361. package/src/components/sidebar-edit-mode/settings-header/index.js +0 -43
  362. package/src/components/sidebar-edit-mode/settings-header/style.scss +0 -14
  363. package/src/components/sidebar-edit-mode/template-panel/hooks.js +0 -114
  364. package/src/components/sidebar-edit-mode/template-panel/index.js +0 -134
  365. package/src/components/sidebar-edit-mode/template-panel/style.scss +0 -16
  366. package/src/components/start-template-options/index.js +0 -231
  367. package/src/components/start-template-options/style.scss +0 -55
  368. package/src/utils/math.js +0 -93
  369. /package/build/components/{sidebar-edit-mode → global-styles-sidebar}/default-sidebar.js +0 -0
  370. /package/build-module/components/{sidebar-edit-mode → global-styles-sidebar}/default-sidebar.js +0 -0
  371. /package/src/components/{sidebar-edit-mode → global-styles-sidebar}/default-sidebar.js +0 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -48,7 +48,6 @@ import {
48
48
  } from '../../utils/constants';
49
49
  import {
50
50
  exportJSONaction,
51
- renameAction,
52
51
  resetAction,
53
52
  deleteAction,
54
53
  duplicatePatternAction,
@@ -60,12 +59,13 @@ import usePatterns from './use-patterns';
60
59
  import PatternsHeader from './header';
61
60
  import { useLink } from '../routes/link';
62
61
  import { useAddedBy } from '../page-templates/hooks';
62
+ import { useEditPostAction } from '../dataviews-actions';
63
63
 
64
64
  const { ExperimentalBlockEditorProvider, useGlobalStyle } = unlock(
65
65
  blockEditorPrivateApis
66
66
  );
67
67
  const { usePostActions } = unlock( editorPrivateApis );
68
- const { useHistory, useLocation } = unlock( routerPrivateApis );
68
+ const { useLocation } = unlock( routerPrivateApis );
69
69
 
70
70
  const EMPTY_ARRAY = [];
71
71
  const defaultConfigPerViewType = {
@@ -177,12 +177,9 @@ function Author( { item, viewType } ) {
177
177
  <HStack alignment="left" spacing={ 1 }>
178
178
  { withIcon && imageUrl && (
179
179
  <div
180
- className={ classnames(
181
- 'page-templates-author-field__avatar',
182
- {
183
- 'is-loaded': isImageLoaded,
184
- }
185
- ) }
180
+ className={ clsx( 'page-templates-author-field__avatar', {
181
+ 'is-loaded': isImageLoaded,
182
+ } ) }
186
183
  >
187
184
  <img
188
185
  onLoad={ () => setIsImageLoaded( true ) }
@@ -378,45 +375,29 @@ export default function DataviewsPatterns() {
378
375
  return filterSortAndPaginate( patterns, viewWithoutFilters, fields );
379
376
  }, [ patterns, view, fields, type ] );
380
377
 
381
- const history = useHistory();
382
- const onActionPerformed = useCallback(
383
- ( actionId, items ) => {
384
- if ( actionId === 'edit-post' ) {
385
- const post = items[ 0 ];
386
- history.push( {
387
- postId: post.id,
388
- postType: post.type,
389
- categoryId,
390
- categoryType: type,
391
- canvas: 'edit',
392
- } );
393
- }
394
- },
395
- [ history, categoryId, type ]
396
- );
397
- const [ editAction, viewRevisionsAction ] = usePostActions(
398
- onActionPerformed,
399
- [ 'edit-post', 'view-post-revisions' ]
400
- );
378
+ const templatePartActions = usePostActions( TEMPLATE_PART_POST_TYPE );
379
+ const patternActions = usePostActions( PATTERN_TYPES.user );
380
+ const editAction = useEditPostAction();
381
+
401
382
  const actions = useMemo( () => {
402
383
  if ( type === TEMPLATE_PART_POST_TYPE ) {
403
384
  return [
404
385
  editAction,
405
- renameAction,
386
+ ...templatePartActions,
406
387
  duplicateTemplatePartAction,
407
- viewRevisionsAction,
408
388
  resetAction,
409
389
  deleteAction,
410
- ];
390
+ ].filter( Boolean );
411
391
  }
412
392
  return [
413
- renameAction,
393
+ editAction,
394
+ ...patternActions,
414
395
  duplicatePatternAction,
415
396
  exportJSONaction,
416
397
  resetAction,
417
398
  deleteAction,
418
- ];
419
- }, [ type, editAction, viewRevisionsAction ] );
399
+ ].filter( Boolean );
400
+ }, [ editAction, type, templatePartActions, patternActions ] );
420
401
  const onChangeView = useCallback(
421
402
  ( newView ) => {
422
403
  if ( newView.type !== view.type ) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -43,6 +43,7 @@ import {
43
43
 
44
44
  import usePatternSettings from '../page-patterns/use-pattern-settings';
45
45
  import { unlock } from '../../lock-unlock';
46
+ import { useEditPostAction } from '../dataviews-actions';
46
47
 
47
48
  const { usePostActions } = unlock( editorPrivateApis );
48
49
 
@@ -111,12 +112,9 @@ function AuthorField( { item, viewType } ) {
111
112
  <HStack alignment="left" spacing={ 1 }>
112
113
  { withIcon && imageUrl && (
113
114
  <div
114
- className={ classnames(
115
- 'page-templates-author-field__avatar',
116
- {
117
- 'is-loaded': isImageLoaded,
118
- }
119
- ) }
115
+ className={ clsx( 'page-templates-author-field__avatar', {
116
+ 'is-loaded': isImageLoaded,
117
+ } ) }
120
118
  >
121
119
  <img
122
120
  onLoad={ () => setIsImageLoaded( true ) }
@@ -186,14 +184,6 @@ function Preview( { item, viewType } ) {
186
184
  );
187
185
  }
188
186
 
189
- const TEMPLATE_ACTIONS = [
190
- 'edit-post',
191
- 'reset-template',
192
- 'rename-template',
193
- 'view-post-revisions',
194
- 'delete-template',
195
- ];
196
-
197
187
  export default function PageTemplates() {
198
188
  const { params } = useLocation();
199
189
  const { activeView = 'all', layout } = params;
@@ -333,22 +323,13 @@ export default function PageTemplates() {
333
323
  return filterSortAndPaginate( records, view, fields );
334
324
  }, [ records, view, fields ] );
335
325
 
336
- const onActionPerformed = useCallback(
337
- ( actionId, items ) => {
338
- if ( actionId === 'edit-post' ) {
339
- const post = items[ 0 ];
340
- history.push( {
341
- postId: post.id,
342
- postType: post.type,
343
- canvas: 'edit',
344
- } );
345
- }
346
- },
347
- [ history ]
326
+ const postTypeActions = usePostActions( TEMPLATE_POST_TYPE );
327
+ const editAction = useEditPostAction();
328
+ const actions = useMemo(
329
+ () => [ editAction, ...postTypeActions ],
330
+ [ postTypeActions, editAction ]
348
331
  );
349
332
 
350
- const actions = usePostActions( onActionPerformed, TEMPLATE_ACTIONS );
351
-
352
333
  const onChangeView = useCallback(
353
334
  ( newView ) => {
354
335
  if ( newView.type !== view.type ) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -30,7 +30,7 @@ export default function Pagination( {
30
30
  aria-label={ label }
31
31
  spacing={ 3 }
32
32
  justify="flex-start"
33
- className={ classnames( 'edit-site-pagination', className ) }
33
+ className={ clsx( 'edit-site-pagination', className ) }
34
34
  >
35
35
  <Text variant="muted" className="edit-site-pagination__total">
36
36
  {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -12,7 +12,7 @@ import {
12
12
  Tooltip,
13
13
  __unstableMotion as motion,
14
14
  } from '@wordpress/components';
15
- import { useInstanceId } from '@wordpress/compose';
15
+ import { useInstanceId, useReducedMotion } from '@wordpress/compose';
16
16
  import { useDispatch, useSelect } from '@wordpress/data';
17
17
  import { __ } from '@wordpress/i18n';
18
18
 
@@ -86,6 +86,7 @@ function ResizableFrame( {
86
86
  defaultSize,
87
87
  innerContentStyle,
88
88
  } ) {
89
+ const disableMotion = useReducedMotion();
89
90
  const [ frameSize, setFrameSize ] = useState( INITIAL_FRAME_SIZE );
90
91
  // The width of the resizable frame when a new resize gesture starts.
91
92
  const [ startingWidth, setStartingWidth ] = useState();
@@ -230,6 +231,17 @@ function ResizableFrame( {
230
231
  setFrameSize( { width: '100%', height: '100%' } );
231
232
  }
232
233
  } }
234
+ whileHover={
235
+ canvasMode === 'view'
236
+ ? {
237
+ scale: 1.005,
238
+ transition: {
239
+ duration: disableMotion ? 0 : 0.5,
240
+ ease: 'easeOut',
241
+ },
242
+ }
243
+ : {}
244
+ }
233
245
  transition={ FRAME_TRANSITION }
234
246
  size={ frameSize }
235
247
  enable={ {
@@ -266,7 +278,7 @@ function ResizableFrame( {
266
278
  key="handle"
267
279
  role="separator"
268
280
  aria-orientation="vertical"
269
- className={ classnames(
281
+ className={ clsx(
270
282
  'edit-site-resizable-frame__handle',
271
283
  { 'is-resizing': isResizing }
272
284
  ) }
@@ -298,7 +310,7 @@ function ResizableFrame( {
298
310
  onResizeStart={ handleResizeStart }
299
311
  onResize={ handleResize }
300
312
  onResizeStop={ handleResizeStop }
301
- className={ classnames( 'edit-site-resizable-frame__inner', {
313
+ className={ clsx( 'edit-site-resizable-frame__inner', {
302
314
  'is-resizing': isResizing,
303
315
  } ) }
304
316
  showHandle={ false } // Do not show the default handle, as we're using a custom one.
@@ -10,6 +10,7 @@ import {
10
10
  __unstableEditorStyles as EditorStyles,
11
11
  __unstableIframe as Iframe,
12
12
  } from '@wordpress/block-editor';
13
+ import { privateApis as editorPrivateApis } from '@wordpress/editor';
13
14
  import { useSelect } from '@wordpress/data';
14
15
  import { useContext, useMemo } from '@wordpress/element';
15
16
 
@@ -18,7 +19,6 @@ import { useContext, useMemo } from '@wordpress/element';
18
19
  */
19
20
 
20
21
  import { unlock } from '../../lock-unlock';
21
- import { mergeBaseAndUserConfigs } from '../global-styles/global-styles-provider';
22
22
  import EditorCanvasContainer from '../editor-canvas-container';
23
23
 
24
24
  const {
@@ -26,6 +26,7 @@ const {
26
26
  GlobalStylesContext,
27
27
  useGlobalStylesOutputWithConfig,
28
28
  } = unlock( blockEditorPrivateApis );
29
+ const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
29
30
 
30
31
  function isObjectEmpty( object ) {
31
32
  return ! object || Object.keys( object ).length === 0;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -139,19 +139,19 @@ export default function SavePanel() {
139
139
  const disabled = isSaving || ! activateSaveEnabled;
140
140
  return (
141
141
  <NavigableRegion
142
- className={ classnames( 'edit-site-layout__actions', {
142
+ className={ clsx( 'edit-site-layout__actions', {
143
143
  'is-entity-save-view-open': isSaveViewOpen,
144
144
  } ) }
145
145
  ariaLabel={ __( 'Save panel' ) }
146
146
  >
147
147
  <div
148
- className={ classnames( 'edit-site-editor__toggle-save-panel', {
148
+ className={ clsx( 'edit-site-editor__toggle-save-panel', {
149
149
  'screen-reader-text': isSaveViewOpen,
150
150
  } ) }
151
151
  >
152
152
  <Button
153
153
  variant="secondary"
154
- className={ classnames(
154
+ className={ clsx(
155
155
  'edit-site-editor__toggle-save-panel-button'
156
156
  ) }
157
157
  onClick={ () => setIsSaveViewOpened( true ) }
@@ -1,68 +1,92 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
9
  import {
10
- useCallback,
11
10
  createContext,
11
+ useContext,
12
12
  useState,
13
13
  useRef,
14
- useEffect,
14
+ useLayoutEffect,
15
15
  } from '@wordpress/element';
16
16
  import { focus } from '@wordpress/dom';
17
17
 
18
18
  export const SidebarNavigationContext = createContext( () => {} );
19
+ // Focus a sidebar element after a navigation. The element to focus is either
20
+ // specified by `focusSelector` (when navigating back) or it is the first
21
+ // tabbable element (usually the "Back" button).
22
+ function focusSidebarElement( el, direction, focusSelector ) {
23
+ let elementToFocus;
24
+ if ( direction === 'back' && focusSelector ) {
25
+ elementToFocus = el.querySelector( focusSelector );
26
+ }
27
+ if ( direction !== null && ! elementToFocus ) {
28
+ const [ firstTabbable ] = focus.tabbable.find( el );
29
+ elementToFocus = firstTabbable ?? el;
30
+ }
31
+ elementToFocus?.focus();
32
+ }
19
33
 
20
- export default function SidebarContent( { routeKey, children } ) {
21
- const [ navState, setNavState ] = useState( {
34
+ // Navigation state that is updated when navigating back or forward. Helps us
35
+ // manage the animations and also focus.
36
+ function createNavState() {
37
+ let state = {
22
38
  direction: null,
23
39
  focusSelector: null,
24
- } );
40
+ };
25
41
 
26
- const navigate = useCallback( ( direction, focusSelector = null ) => {
27
- setNavState( ( prevState ) => ( {
28
- direction,
29
- focusSelector:
30
- direction === 'forward' && focusSelector
31
- ? focusSelector
32
- : prevState.focusSelector,
33
- } ) );
34
- }, [] );
42
+ return {
43
+ get() {
44
+ return state;
45
+ },
46
+ navigate( direction, focusSelector = null ) {
47
+ state = {
48
+ direction,
49
+ focusSelector:
50
+ direction === 'forward' && focusSelector
51
+ ? focusSelector
52
+ : state.focusSelector,
53
+ };
54
+ },
55
+ };
56
+ }
35
57
 
58
+ function SidebarContentWrapper( { children } ) {
59
+ const navState = useContext( SidebarNavigationContext );
36
60
  const wrapperRef = useRef();
37
- useEffect( () => {
38
- let elementToFocus;
39
- if ( navState.direction === 'back' && navState.focusSelector ) {
40
- elementToFocus = wrapperRef.current.querySelector(
41
- navState.focusSelector
42
- );
43
- }
44
- if ( navState.direction !== null && ! elementToFocus ) {
45
- const [ firstTabbable ] = focus.tabbable.find( wrapperRef.current );
46
- elementToFocus = firstTabbable ?? wrapperRef.current;
47
- }
48
- elementToFocus?.focus();
61
+ const [ navAnimation, setNavAnimation ] = useState( null );
62
+
63
+ useLayoutEffect( () => {
64
+ const { direction, focusSelector } = navState.get();
65
+ focusSidebarElement( wrapperRef.current, direction, focusSelector );
66
+ setNavAnimation( direction );
49
67
  }, [ navState ] );
50
68
 
51
- const wrapperCls = classnames( 'edit-site-sidebar__screen-wrapper', {
52
- 'slide-from-left': navState.direction === 'back',
53
- 'slide-from-right': navState.direction === 'forward',
69
+ const wrapperCls = clsx( 'edit-site-sidebar__screen-wrapper', {
70
+ 'slide-from-left': navAnimation === 'back',
71
+ 'slide-from-right': navAnimation === 'forward',
54
72
  } );
55
73
 
56
74
  return (
57
- <SidebarNavigationContext.Provider value={ navigate }>
75
+ <div ref={ wrapperRef } className={ wrapperCls }>
76
+ { children }
77
+ </div>
78
+ );
79
+ }
80
+
81
+ export default function SidebarContent( { routeKey, children } ) {
82
+ const [ navState ] = useState( createNavState );
83
+
84
+ return (
85
+ <SidebarNavigationContext.Provider value={ navState }>
58
86
  <div className="edit-site-sidebar__content">
59
- <div
60
- ref={ wrapperRef }
61
- key={ routeKey }
62
- className={ wrapperCls }
63
- >
87
+ <SidebarContentWrapper key={ routeKey }>
64
88
  { children }
65
- </div>
89
+ </SidebarContentWrapper>
66
90
  </div>
67
91
  </SidebarNavigationContext.Provider>
68
92
  );
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -12,10 +12,7 @@ export default function SidebarButton( props ) {
12
12
  return (
13
13
  <Button
14
14
  { ...props }
15
- className={ classnames(
16
- 'edit-site-sidebar-button',
17
- props.className
18
- ) }
15
+ className={ clsx( 'edit-site-sidebar-button', props.className ) }
19
16
  />
20
17
  );
21
18
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -44,12 +44,9 @@ export default function DataViewItem( {
44
44
  return (
45
45
  <HStack
46
46
  justify="flex-start"
47
- className={ classnames(
48
- 'edit-site-sidebar-dataviews-dataview-item',
49
- {
50
- 'is-selected': isActive,
51
- }
52
- ) }
47
+ className={ clsx( 'edit-site-sidebar-dataviews-dataview-item', {
48
+ 'is-selected': isActive,
49
+ } ) }
53
50
  >
54
51
  <SidebarNavigationItem
55
52
  icon={ iconToUse }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -35,7 +35,7 @@ export default function SidebarNavigationItem( {
35
35
  ...props
36
36
  } ) {
37
37
  const history = useHistory();
38
- const navigate = useContext( SidebarNavigationContext );
38
+ const { navigate } = useContext( SidebarNavigationContext );
39
39
 
40
40
  // If there is no custom click handler, create one that navigates to `path`.
41
41
  function handleClick( e ) {
@@ -51,7 +51,7 @@ export default function SidebarNavigationItem( {
51
51
 
52
52
  return (
53
53
  <Item
54
- className={ classnames(
54
+ className={ clsx(
55
55
  'edit-site-sidebar-navigation-item',
56
56
  { 'with-suffix': ! withChevron && suffix },
57
57
  className
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -32,25 +32,6 @@ import { SidebarNavigationContext } from '../sidebar';
32
32
 
33
33
  const { useHistory, useLocation } = unlock( routerPrivateApis );
34
34
 
35
- function getBackPath( params ) {
36
- // From a data view path we navigate back to root
37
- if ( params.path ) {
38
- return {};
39
- }
40
-
41
- // From edit screen for a post we navigate back to post-type specific data view
42
- if ( params.postType === 'page' ) {
43
- return { path: '/page', postId: params.postId };
44
- } else if ( params.postType === 'wp_template' ) {
45
- return { path: '/wp_template', postId: params.postId };
46
- } else if ( params.postType === 'wp_navigation' ) {
47
- return { path: '/navigation', postId: params.postId };
48
- }
49
-
50
- // Go back to root by default
51
- return {};
52
- }
53
-
54
35
  export default function SidebarNavigationScreen( {
55
36
  isRoot,
56
37
  title,
@@ -81,17 +62,16 @@ export default function SidebarNavigationScreen( {
81
62
  );
82
63
  const location = useLocation();
83
64
  const history = useHistory();
84
- const navigate = useContext( SidebarNavigationContext );
65
+ const { navigate } = useContext( SidebarNavigationContext );
66
+ const backPath = backPathProp ?? location.state?.backPath;
85
67
  const icon = isRTL() ? chevronRight : chevronLeft;
68
+
86
69
  return (
87
70
  <>
88
71
  <VStack
89
- className={ classnames(
90
- 'edit-site-sidebar-navigation-screen__main',
91
- {
92
- 'has-footer': !! footer,
93
- }
94
- ) }
72
+ className={ clsx( 'edit-site-sidebar-navigation-screen__main', {
73
+ 'has-footer': !! footer,
74
+ } ) }
95
75
  spacing={ 0 }
96
76
  justify="flex-start"
97
77
  >
@@ -103,10 +83,6 @@ export default function SidebarNavigationScreen( {
103
83
  { ! isRoot && (
104
84
  <SidebarButton
105
85
  onClick={ () => {
106
- const backPath =
107
- backPathProp ??
108
- location.state?.backPath ??
109
- getBackPath( location.params );
110
86
  history.push( backPath );
111
87
  navigate( 'back' );
112
88
  } }
@@ -99,20 +99,22 @@
99
99
  }
100
100
 
101
101
  .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-variations_item {
102
+
103
+ // Use a white outline to provide contrast with the dark background.
102
104
  .edit-site-global-styles-variations_item-preview {
103
- box-shadow: 0 0 0 $border-width $gray-900;
105
+ outline-color: rgba($white, 0.05);
104
106
  }
105
107
 
106
- &:focus .edit-site-global-styles-variations_item-preview,
107
- &.is-active .edit-site-global-styles-variations_item-preview {
108
- box-shadow: inset 0 0 0 $border-width $gray-900, 0 0 0 var(--wp-admin-border-width-focus) $white;
108
+ &:not(.is-active):hover .edit-site-global-styles-variations_item-preview {
109
+ outline-color: rgba($white, 0.15);
110
+ }
109
111
 
110
- // Shown in Windows 10 high contrast mode.
111
- outline-width: 3px;
112
+ &.is-active .edit-site-global-styles-variations_item-preview {
113
+ outline-color: $white;
114
+ }
112
115
 
113
- &::after {
114
- box-shadow: inset 0 0 0 1px $gray-900;
115
- }
116
+ &:focus-visible .edit-site-global-styles-variations_item-preview {
117
+ outline-color: var(--wp-admin-theme-color);
116
118
  }
117
119
  }
118
120
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import classnames from 'classnames';
4
+ import clsx from 'clsx';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -19,7 +19,7 @@ export default function SidebarNavigationScreenDetailsPanelRow( {
19
19
  key={ label }
20
20
  spacing={ 5 }
21
21
  alignment="left"
22
- className={ classnames(
22
+ className={ clsx(
23
23
  'edit-site-sidebar-navigation-details-screen-panel__row',
24
24
  className
25
25
  ) }
@@ -103,7 +103,7 @@ function SidebarNavigationScreenGlobalStylesContent() {
103
103
  );
104
104
  }
105
105
 
106
- export default function SidebarNavigationScreenGlobalStyles() {
106
+ export default function SidebarNavigationScreenGlobalStyles( { backPath } ) {
107
107
  const { revisions, isLoading: isLoadingRevisions } =
108
108
  useGlobalStylesRevisions();
109
109
  const { openGeneralSidebar } = useDispatch( editSiteStore );
@@ -179,6 +179,7 @@ export default function SidebarNavigationScreenGlobalStyles() {
179
179
  description={ __(
180
180
  'Choose a different style combination for the theme styles.'
181
181
  ) }
182
+ backPath={ backPath }
182
183
  content={ <SidebarNavigationScreenGlobalStylesContent /> }
183
184
  footer={
184
185
  shouldShowGlobalStylesFooter && (