@wordpress/edit-site 5.4.0 → 5.5.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 (244) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-template/add-custom-template-modal.js +12 -3
  3. package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
  4. package/build/components/add-new-template/new-template-part.js +8 -7
  5. package/build/components/add-new-template/new-template-part.js.map +1 -1
  6. package/build/components/add-new-template/new-template.js +3 -6
  7. package/build/components/add-new-template/new-template.js.map +1 -1
  8. package/build/components/editor/index.js +3 -3
  9. package/build/components/editor/index.js.map +1 -1
  10. package/build/components/global-styles/border-panel.js +1 -1
  11. package/build/components/global-styles/border-panel.js.map +1 -1
  12. package/build/components/global-styles/context-menu.js +11 -8
  13. package/build/components/global-styles/context-menu.js.map +1 -1
  14. package/build/components/global-styles/dimensions-panel.js +41 -487
  15. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  16. package/build/components/global-styles/duotone-panel.js +78 -0
  17. package/build/components/global-styles/duotone-panel.js.map +1 -0
  18. package/build/components/global-styles/filter-utils.js +17 -0
  19. package/build/components/global-styles/filter-utils.js.map +1 -0
  20. package/build/components/global-styles/preview.js +9 -5
  21. package/build/components/global-styles/preview.js.map +1 -1
  22. package/build/components/global-styles/screen-block-list.js +4 -8
  23. package/build/components/global-styles/screen-block-list.js.map +1 -1
  24. package/build/components/global-styles/screen-border.js +1 -1
  25. package/build/components/global-styles/screen-border.js.map +1 -1
  26. package/build/components/global-styles/screen-filters.js +46 -0
  27. package/build/components/global-styles/screen-filters.js.map +1 -0
  28. package/build/components/global-styles/screen-layout.js +13 -5
  29. package/build/components/global-styles/screen-layout.js.map +1 -1
  30. package/build/components/global-styles/screen-variations.js +1 -1
  31. package/build/components/global-styles/screen-variations.js.map +1 -1
  32. package/build/components/global-styles/shadow-panel.js +6 -4
  33. package/build/components/global-styles/shadow-panel.js.map +1 -1
  34. package/build/components/global-styles/typography-panel.js +2 -5
  35. package/build/components/global-styles/typography-panel.js.map +1 -1
  36. package/build/components/global-styles/ui.js +7 -1
  37. package/build/components/global-styles/ui.js.map +1 -1
  38. package/build/components/keyboard-shortcut-help-modal/config.js +12 -0
  39. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  40. package/build/components/keyboard-shortcuts/edit-mode.js +124 -0
  41. package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -0
  42. package/build/components/keyboard-shortcuts/global.js +48 -0
  43. package/build/components/keyboard-shortcuts/global.js.map +1 -0
  44. package/build/components/keyboard-shortcuts/index.js +67 -0
  45. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  46. package/build/components/keyboard-shortcuts/register.js +153 -0
  47. package/build/components/keyboard-shortcuts/register.js.map +1 -0
  48. package/build/components/layout/index.js +5 -1
  49. package/build/components/layout/index.js.map +1 -1
  50. package/build/components/list/added-by.js +41 -42
  51. package/build/components/list/added-by.js.map +1 -1
  52. package/build/components/list/table.js +3 -2
  53. package/build/components/list/table.js.map +1 -1
  54. package/build/components/navigation-inspector/navigation-menu.js +22 -5
  55. package/build/components/navigation-inspector/navigation-menu.js.map +1 -1
  56. package/build/components/save-button/index.js +5 -2
  57. package/build/components/save-button/index.js.map +1 -1
  58. package/build/components/save-panel/index.js +11 -1
  59. package/build/components/save-panel/index.js.map +1 -1
  60. package/build/components/sidebar/index.js +28 -16
  61. package/build/components/sidebar/index.js.map +1 -1
  62. package/build/components/sidebar-button/index.js +30 -0
  63. package/build/components/sidebar-button/index.js.map +1 -0
  64. package/build/components/sidebar-edit-mode/global-styles-sidebar.js +8 -2
  65. package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  66. package/build/components/sidebar-navigation-screen/index.js +10 -10
  67. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  68. package/build/components/sidebar-navigation-screen-main/index.js +3 -3
  69. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  70. package/build/components/sidebar-navigation-screen-navigation-item/index.js +17 -16
  71. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  72. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +10 -4
  73. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  74. package/build/components/sidebar-navigation-screen-template/index.js +9 -19
  75. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  76. package/build/components/sidebar-navigation-screen-templates/index.js +25 -15
  77. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  78. package/build/components/sidebar-navigation-screen-templates-browse/index.js +8 -7
  79. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  80. package/build/components/style-book/index.js +17 -2
  81. package/build/components/style-book/index.js.map +1 -1
  82. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +36 -34
  83. package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  84. package/build/components/sync-state-with-url/use-sync-path-with-url.js +65 -18
  85. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  86. package/build/components/template-details/index.js +7 -9
  87. package/build/components/template-details/index.js.map +1 -1
  88. package/build/index.js +10 -22
  89. package/build/index.js.map +1 -1
  90. package/build/store/actions.js +2 -2
  91. package/build/store/actions.js.map +1 -1
  92. package/build/utils/get-is-list-page.js +1 -1
  93. package/build/utils/get-is-list-page.js.map +1 -1
  94. package/build-module/components/add-new-template/add-custom-template-modal.js +13 -4
  95. package/build-module/components/add-new-template/add-custom-template-modal.js.map +1 -1
  96. package/build-module/components/add-new-template/new-template-part.js +8 -7
  97. package/build-module/components/add-new-template/new-template-part.js.map +1 -1
  98. package/build-module/components/add-new-template/new-template.js +3 -6
  99. package/build-module/components/add-new-template/new-template.js.map +1 -1
  100. package/build-module/components/editor/index.js +3 -3
  101. package/build-module/components/editor/index.js.map +1 -1
  102. package/build-module/components/global-styles/border-panel.js +1 -1
  103. package/build-module/components/global-styles/border-panel.js.map +1 -1
  104. package/build-module/components/global-styles/context-menu.js +12 -9
  105. package/build-module/components/global-styles/context-menu.js.map +1 -1
  106. package/build-module/components/global-styles/dimensions-panel.js +43 -480
  107. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  108. package/build-module/components/global-styles/duotone-panel.js +67 -0
  109. package/build-module/components/global-styles/duotone-panel.js.map +1 -0
  110. package/build-module/components/global-styles/filter-utils.js +9 -0
  111. package/build-module/components/global-styles/filter-utils.js.map +1 -0
  112. package/build-module/components/global-styles/preview.js +10 -6
  113. package/build-module/components/global-styles/preview.js.map +1 -1
  114. package/build-module/components/global-styles/screen-block-list.js +4 -6
  115. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  116. package/build-module/components/global-styles/screen-border.js +1 -1
  117. package/build-module/components/global-styles/screen-border.js.map +1 -1
  118. package/build-module/components/global-styles/screen-filters.js +33 -0
  119. package/build-module/components/global-styles/screen-filters.js.map +1 -0
  120. package/build-module/components/global-styles/screen-layout.js +11 -2
  121. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  122. package/build-module/components/global-styles/screen-variations.js +1 -1
  123. package/build-module/components/global-styles/screen-variations.js.map +1 -1
  124. package/build-module/components/global-styles/shadow-panel.js +6 -4
  125. package/build-module/components/global-styles/shadow-panel.js.map +1 -1
  126. package/build-module/components/global-styles/typography-panel.js +2 -5
  127. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  128. package/build-module/components/global-styles/ui.js +6 -1
  129. package/build-module/components/global-styles/ui.js.map +1 -1
  130. package/build-module/components/keyboard-shortcut-help-modal/config.js +12 -0
  131. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  132. package/build-module/components/keyboard-shortcuts/edit-mode.js +108 -0
  133. package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -0
  134. package/build-module/components/keyboard-shortcuts/global.js +37 -0
  135. package/build-module/components/keyboard-shortcuts/global.js.map +1 -0
  136. package/build-module/components/keyboard-shortcuts/index.js +65 -0
  137. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  138. package/build-module/components/keyboard-shortcuts/register.js +141 -0
  139. package/build-module/components/keyboard-shortcuts/register.js.map +1 -0
  140. package/build-module/components/layout/index.js +3 -1
  141. package/build-module/components/layout/index.js.map +1 -1
  142. package/build-module/components/list/added-by.js +43 -44
  143. package/build-module/components/list/added-by.js.map +1 -1
  144. package/build-module/components/list/table.js +3 -2
  145. package/build-module/components/list/table.js.map +1 -1
  146. package/build-module/components/navigation-inspector/navigation-menu.js +25 -8
  147. package/build-module/components/navigation-inspector/navigation-menu.js.map +1 -1
  148. package/build-module/components/save-button/index.js +5 -2
  149. package/build-module/components/save-button/index.js.map +1 -1
  150. package/build-module/components/save-panel/index.js +8 -1
  151. package/build-module/components/save-panel/index.js.map +1 -1
  152. package/build-module/components/sidebar/index.js +25 -18
  153. package/build-module/components/sidebar/index.js.map +1 -1
  154. package/build-module/components/sidebar-button/index.js +18 -0
  155. package/build-module/components/sidebar-button/index.js.map +1 -0
  156. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +8 -2
  157. package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
  158. package/build-module/components/sidebar-navigation-screen/index.js +8 -11
  159. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  160. package/build-module/components/sidebar-navigation-screen-main/index.js +3 -3
  161. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  162. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +16 -17
  163. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  164. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +10 -4
  165. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  166. package/build-module/components/sidebar-navigation-screen-template/index.js +8 -18
  167. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  168. package/build-module/components/sidebar-navigation-screen-templates/index.js +23 -16
  169. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  170. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +7 -7
  171. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  172. package/build-module/components/style-book/index.js +17 -3
  173. package/build-module/components/style-book/index.js.map +1 -1
  174. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +36 -34
  175. package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
  176. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +63 -18
  177. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  178. package/build-module/components/template-details/index.js +7 -8
  179. package/build-module/components/template-details/index.js.map +1 -1
  180. package/build-module/index.js +12 -22
  181. package/build-module/index.js.map +1 -1
  182. package/build-module/store/actions.js +2 -2
  183. package/build-module/store/actions.js.map +1 -1
  184. package/build-module/utils/get-is-list-page.js +1 -1
  185. package/build-module/utils/get-is-list-page.js.map +1 -1
  186. package/build-style/style-rtl.css +41 -38
  187. package/build-style/style.css +41 -38
  188. package/package.json +31 -31
  189. package/src/components/add-new-template/add-custom-template-modal.js +14 -10
  190. package/src/components/add-new-template/new-template-part.js +7 -9
  191. package/src/components/add-new-template/new-template.js +3 -6
  192. package/src/components/add-new-template/style.scss +0 -5
  193. package/src/components/block-editor/style.scss +1 -1
  194. package/src/components/editor/index.js +4 -3
  195. package/src/components/editor/style.scss +0 -6
  196. package/src/components/global-styles/border-panel.js +1 -1
  197. package/src/components/global-styles/context-menu.js +16 -10
  198. package/src/components/global-styles/dimensions-panel.js +43 -577
  199. package/src/components/global-styles/duotone-panel.js +82 -0
  200. package/src/components/global-styles/filter-utils.js +9 -0
  201. package/src/components/global-styles/preview.js +155 -140
  202. package/src/components/global-styles/screen-block-list.js +4 -9
  203. package/src/components/global-styles/screen-border.js +1 -1
  204. package/src/components/global-styles/screen-filters.js +27 -0
  205. package/src/components/global-styles/screen-layout.js +9 -2
  206. package/src/components/global-styles/screen-variations.js +0 -1
  207. package/src/components/global-styles/shadow-panel.js +4 -3
  208. package/src/components/global-styles/typography-panel.js +5 -7
  209. package/src/components/global-styles/ui.js +6 -1
  210. package/src/components/keyboard-shortcut-help-modal/config.js +10 -0
  211. package/src/components/keyboard-shortcuts/edit-mode.js +116 -0
  212. package/src/components/keyboard-shortcuts/global.js +35 -0
  213. package/src/components/keyboard-shortcuts/index.js +70 -0
  214. package/src/components/keyboard-shortcuts/register.js +157 -0
  215. package/src/components/layout/index.js +4 -0
  216. package/src/components/layout/style.scss +8 -1
  217. package/src/components/list/added-by.js +48 -55
  218. package/src/components/list/style.scss +5 -13
  219. package/src/components/list/table.js +4 -5
  220. package/src/components/navigation-inspector/navigation-menu.js +24 -6
  221. package/src/components/save-button/index.js +2 -2
  222. package/src/components/save-panel/index.js +8 -1
  223. package/src/components/sidebar/index.js +32 -14
  224. package/src/components/sidebar-button/index.js +21 -0
  225. package/src/components/sidebar-button/style.scss +23 -0
  226. package/src/components/sidebar-edit-mode/global-styles-sidebar.js +3 -7
  227. package/src/components/sidebar-edit-mode/style.scss +16 -0
  228. package/src/components/sidebar-navigation-screen/index.js +31 -38
  229. package/src/components/sidebar-navigation-screen/style.scss +1 -9
  230. package/src/components/sidebar-navigation-screen-main/index.js +3 -3
  231. package/src/components/sidebar-navigation-screen-navigation-item/index.js +24 -20
  232. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +7 -3
  233. package/src/components/sidebar-navigation-screen-template/index.js +7 -19
  234. package/src/components/sidebar-navigation-screen-templates/index.js +22 -14
  235. package/src/components/sidebar-navigation-screen-templates/style.scss +0 -5
  236. package/src/components/sidebar-navigation-screen-templates-browse/index.js +6 -11
  237. package/src/components/style-book/index.js +25 -1
  238. package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +28 -23
  239. package/src/components/sync-state-with-url/use-sync-path-with-url.js +72 -17
  240. package/src/components/template-details/index.js +5 -6
  241. package/src/index.js +6 -21
  242. package/src/store/actions.js +2 -2
  243. package/src/style.scss +1 -0
  244. package/src/utils/get-is-list-page.js +1 -1
@@ -413,15 +413,18 @@ body.is-fullscreen-mode .interface-interface-skeleton {
413
413
  }
414
414
  }
415
415
  .interface-interface-skeleton__actions:focus, .interface-interface-skeleton__actions:focus-within {
416
- top: 46px;
416
+ top: auto;
417
417
  bottom: 0;
418
418
  }
419
+ .is-entity-save-view-open .interface-interface-skeleton__actions:focus, .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within {
420
+ top: 46px;
421
+ }
419
422
  @media (min-width: 782px) {
420
- .interface-interface-skeleton__actions:focus, .interface-interface-skeleton__actions:focus-within {
423
+ .is-entity-save-view-open .interface-interface-skeleton__actions:focus, .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within {
421
424
  border-left: 1px solid #ddd;
422
425
  top: 32px;
423
426
  }
424
- .is-fullscreen-mode .interface-interface-skeleton__actions:focus, .is-fullscreen-mode .interface-interface-skeleton__actions:focus-within {
427
+ .is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus, .is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within {
425
428
  top: 0;
426
429
  }
427
430
  }
@@ -615,9 +618,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
615
618
  }
616
619
  }
617
620
 
618
- .edit-site-custom-template-modal__suggestions_list {
619
- margin-top: 16px;
620
- }
621
621
  @media (min-width: 600px) {
622
622
  .edit-site-custom-template-modal__suggestions_list {
623
623
  height: 232px;
@@ -668,8 +668,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
668
668
  border: 1px solid #ccc;
669
669
  border-radius: 2px;
670
670
  padding: 16px;
671
- margin-bottom: 0;
672
- margin-top: 16px;
673
671
  }
674
672
 
675
673
  @media (min-width: 782px) {
@@ -716,7 +714,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
716
714
  height: 100%;
717
715
  display: block;
718
716
  overflow: hidden;
719
- background-color: #2f2f2f;
717
+ background-color: #1e1e1e;
720
718
  align-items: center;
721
719
  /*
722
720
  Temporary to hide the contextual toolbar in view mode.
@@ -1531,7 +1529,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1531
1529
  .edit-site-list-added-by__icon {
1532
1530
  display: flex;
1533
1531
  flex-shrink: 0;
1534
- position: relative;
1535
1532
  align-items: center;
1536
1533
  justify-content: center;
1537
1534
  width: 32px;
@@ -1542,17 +1539,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1542
1539
  .edit-site-list-added-by__icon svg {
1543
1540
  fill: #fff;
1544
1541
  }
1545
- .edit-site-list-added-by__icon.is-customized::after {
1546
- position: absolute;
1547
- content: "";
1548
- background: var(--wp-admin-theme-color);
1549
- height: 8px;
1550
- width: 8px;
1551
- outline: 2px solid #fff;
1552
- border-radius: 100%;
1553
- top: -1px;
1554
- right: -1px;
1555
- }
1556
1542
 
1557
1543
  .edit-site-list-added-by__avatar {
1558
1544
  flex-shrink: 0;
@@ -1580,6 +1566,11 @@ body.is-fullscreen-mode .edit-site-list-header {
1580
1566
  opacity: 1;
1581
1567
  }
1582
1568
 
1569
+ .edit-site-list-added-by__customized-info {
1570
+ display: block;
1571
+ color: #757575;
1572
+ }
1573
+
1583
1574
  @keyframes loadingpulse {
1584
1575
  0% {
1585
1576
  opacity: 1;
@@ -1698,6 +1689,14 @@ body.is-fullscreen-mode .edit-site-list-header {
1698
1689
  margin: 0;
1699
1690
  }
1700
1691
 
1692
+ .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon svg {
1693
+ display: none;
1694
+ }
1695
+ .show-icon-labels .edit-site-global-styles-sidebar__header .components-button.has-icon::after {
1696
+ content: attr(aria-label);
1697
+ font-size: 12px;
1698
+ }
1699
+
1701
1700
  .components-panel__header.edit-site-sidebar-edit-mode__panel-tabs {
1702
1701
  justify-content: flex-start;
1703
1702
  padding-left: 0;
@@ -1855,10 +1854,6 @@ h3.edit-site-template-card__template-areas-title {
1855
1854
  display: flex;
1856
1855
  justify-content: center;
1857
1856
  }
1858
- .edit-site-layout__actions:focus .edit-site-editor__toggle-save-panel, .edit-site-layout__actions:focus-within .edit-site-editor__toggle-save-panel {
1859
- top: auto;
1860
- bottom: 0;
1861
- }
1862
1857
 
1863
1858
  .edit-site .components-editor-notices__snackbar {
1864
1859
  position: fixed;
@@ -2396,9 +2391,12 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2396
2391
  background: #fff;
2397
2392
  }
2398
2393
  .edit-site-layout__actions:focus, .edit-site-layout__actions:focus-within {
2399
- top: 0;
2394
+ top: auto;
2400
2395
  bottom: 0;
2401
2396
  }
2397
+ .edit-site-layout__actions.is-entity-save-view-open:focus, .edit-site-layout__actions.is-entity-save-view-open:focus-within {
2398
+ top: 0;
2399
+ }
2402
2400
  @media (min-width: 782px) {
2403
2401
  .edit-site-layout__actions {
2404
2402
  border-left: 1px solid #ddd;
@@ -2453,6 +2451,22 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2453
2451
  padding: 0 12px;
2454
2452
  }
2455
2453
 
2454
+ .edit-site-sidebar-button {
2455
+ color: #e0e0e0;
2456
+ flex-shrink: 0;
2457
+ }
2458
+ .edit-site-sidebar-button:focus:not(:disabled) {
2459
+ box-shadow: none;
2460
+ outline: none;
2461
+ }
2462
+ .edit-site-sidebar-button:focus-visible:not(:disabled) {
2463
+ box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
2464
+ outline: 3px solid transparent;
2465
+ }
2466
+ .edit-site-sidebar-button:hover, .edit-site-sidebar-button:focus-visible, .edit-site-sidebar-button:focus, .edit-site-sidebar-button:not([aria-disabled=true]):active {
2467
+ color: #fff;
2468
+ }
2469
+
2456
2470
  .edit-site-sidebar-navigation-item.components-item {
2457
2471
  color: #949494;
2458
2472
  border-width: 1.5px;
@@ -2511,29 +2525,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2511
2525
 
2512
2526
  .edit-site-sidebar-navigation-screen__title {
2513
2527
  font-size: calc(1.56 * 13px);
2528
+ line-height: normal;
2514
2529
  font-weight: 500;
2515
2530
  flex-grow: 1;
2516
2531
  color: #fff;
2517
2532
  margin: 0;
2518
2533
  }
2519
2534
 
2520
- .edit-site-sidebar-navigation-screen__back {
2521
- color: #e0e0e0;
2522
- }
2523
- .edit-site-sidebar-navigation-screen__back:hover, .edit-site-sidebar-navigation-screen__back:not([aria-disabled=true]):active {
2524
- color: #fff;
2525
- }
2526
-
2527
2535
  .edit-site-sidebar-navigation-screen-templates__see-all {
2528
2536
  /* Overrides the margin that comes from the Item component */
2529
2537
  margin-top: 16px !important;
2530
2538
  }
2531
2539
 
2532
- .edit-site-sidebar-navigation-screen-templates__add-button {
2533
- /* Overrides the color for all states of the button */
2534
- color: inherit !important;
2535
- }
2536
-
2537
2540
  .edit-site-site-hub {
2538
2541
  display: flex;
2539
2542
  align-items: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,35 +27,35 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.27.0",
31
- "@wordpress/api-fetch": "^6.24.0",
32
- "@wordpress/block-editor": "^11.4.0",
33
- "@wordpress/block-library": "^8.4.0",
34
- "@wordpress/blocks": "^12.4.0",
35
- "@wordpress/components": "^23.4.0",
36
- "@wordpress/compose": "^6.4.0",
37
- "@wordpress/core-data": "^6.4.0",
38
- "@wordpress/data": "^8.4.0",
39
- "@wordpress/deprecated": "^3.27.0",
40
- "@wordpress/editor": "^13.4.0",
41
- "@wordpress/element": "^5.4.0",
42
- "@wordpress/hooks": "^3.27.0",
43
- "@wordpress/html-entities": "^3.27.0",
44
- "@wordpress/i18n": "^4.27.0",
45
- "@wordpress/icons": "^9.18.0",
46
- "@wordpress/interface": "^5.4.0",
47
- "@wordpress/keyboard-shortcuts": "^4.4.0",
48
- "@wordpress/keycodes": "^3.27.0",
49
- "@wordpress/media-utils": "^4.18.0",
50
- "@wordpress/notices": "^3.27.0",
51
- "@wordpress/plugins": "^5.4.0",
52
- "@wordpress/preferences": "^3.4.0",
53
- "@wordpress/private-apis": "^0.9.0",
54
- "@wordpress/reusable-blocks": "^4.4.0",
55
- "@wordpress/style-engine": "^1.10.0",
56
- "@wordpress/url": "^3.28.0",
57
- "@wordpress/viewport": "^5.4.0",
58
- "@wordpress/widgets": "^3.4.0",
30
+ "@wordpress/a11y": "^3.28.0",
31
+ "@wordpress/api-fetch": "^6.25.0",
32
+ "@wordpress/block-editor": "^11.5.0",
33
+ "@wordpress/block-library": "^8.5.0",
34
+ "@wordpress/blocks": "^12.5.0",
35
+ "@wordpress/components": "^23.5.0",
36
+ "@wordpress/compose": "^6.5.0",
37
+ "@wordpress/core-data": "^6.5.0",
38
+ "@wordpress/data": "^8.5.0",
39
+ "@wordpress/deprecated": "^3.28.0",
40
+ "@wordpress/editor": "^13.5.0",
41
+ "@wordpress/element": "^5.5.0",
42
+ "@wordpress/hooks": "^3.28.0",
43
+ "@wordpress/html-entities": "^3.28.0",
44
+ "@wordpress/i18n": "^4.28.0",
45
+ "@wordpress/icons": "^9.19.0",
46
+ "@wordpress/interface": "^5.5.0",
47
+ "@wordpress/keyboard-shortcuts": "^4.5.0",
48
+ "@wordpress/keycodes": "^3.28.0",
49
+ "@wordpress/media-utils": "^4.19.0",
50
+ "@wordpress/notices": "^3.28.0",
51
+ "@wordpress/plugins": "^5.5.0",
52
+ "@wordpress/preferences": "^3.5.0",
53
+ "@wordpress/private-apis": "^0.10.0",
54
+ "@wordpress/reusable-blocks": "^4.5.0",
55
+ "@wordpress/style-engine": "^1.11.0",
56
+ "@wordpress/url": "^3.29.0",
57
+ "@wordpress/viewport": "^5.5.0",
58
+ "@wordpress/widgets": "^3.5.0",
59
59
  "classnames": "^2.3.1",
60
60
  "colord": "^2.9.2",
61
61
  "downloadjs": "^1.4.7",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "c25ff895413bad4354c55c0c2d732552618b0d56"
76
+ "gitHead": "d5e03a74b79e3ca84afda24375474a103a063ee4"
77
77
  }
@@ -11,6 +11,7 @@ import {
11
11
  SearchControl,
12
12
  TextHighlight,
13
13
  __experimentalText as Text,
14
+ __experimentalVStack as VStack,
14
15
  __unstableComposite as Composite,
15
16
  __unstableUseCompositeState as useCompositeState,
16
17
  __unstableCompositeItem as CompositeItem,
@@ -158,9 +159,12 @@ function SuggestionList( { entityForSuggestions, onSelect } ) {
158
159
  </Composite>
159
160
  ) }
160
161
  { debouncedSearch && ! suggestions?.length && (
161
- <p className="edit-site-custom-template-modal__no-results">
162
+ <Text
163
+ as="p"
164
+ className="edit-site-custom-template-modal__no-results"
165
+ >
162
166
  { labels.not_found }
163
- </p>
167
+ </Text>
164
168
  ) }
165
169
  </>
166
170
  );
@@ -188,12 +192,12 @@ function AddCustomTemplateModal( {
188
192
  >
189
193
  { isCreatingTemplate && <TemplateActionsLoadingScreen /> }
190
194
  { ! showSearchEntities && (
191
- <>
192
- <p>
195
+ <VStack spacing={ 4 }>
196
+ <Text as="p">
193
197
  { __(
194
198
  'Select whether to create a single template for all items or a specific one.'
195
199
  ) }
196
- </p>
200
+ </Text>
197
201
  <Flex
198
202
  className={ `${ baseCssClass }__contents` }
199
203
  gap="4"
@@ -245,20 +249,20 @@ function AddCustomTemplateModal( {
245
249
  </Text>
246
250
  </FlexItem>
247
251
  </Flex>
248
- </>
252
+ </VStack>
249
253
  ) }
250
254
  { showSearchEntities && (
251
- <>
252
- <p>
255
+ <VStack spacing={ 4 }>
256
+ <Text as="p">
253
257
  { __(
254
258
  'This template will be used only for the specific item chosen.'
255
259
  ) }
256
- </p>
260
+ </Text>
257
261
  <SuggestionList
258
262
  entityForSuggestions={ entityForSuggestions }
259
263
  onSelect={ onSelect }
260
264
  />
261
- </>
265
+ </VStack>
262
266
  ) }
263
267
  </Modal>
264
268
  );
@@ -67,12 +67,9 @@ export default function NewTemplatePart( {
67
67
  setCanvasMode( 'edit' );
68
68
 
69
69
  // Navigate to the created template part editor.
70
- window.queueMicrotask( () => {
71
- history.push( {
72
- postId: templatePart.id,
73
- postType: 'wp_template_part',
74
- path: '/template-parts/single',
75
- } );
70
+ history.push( {
71
+ postId: templatePart.id,
72
+ postType: 'wp_template_part',
76
73
  } );
77
74
 
78
75
  // TODO: Add a success notice?
@@ -89,11 +86,12 @@ export default function NewTemplatePart( {
89
86
  setIsModalOpen( false );
90
87
  }
91
88
  }
89
+ const { as: Toggle = Button, ...restToggleProps } = toggleProps ?? {};
92
90
 
93
91
  return (
94
92
  <>
95
- <Button
96
- { ...toggleProps }
93
+ <Toggle
94
+ { ...restToggleProps }
97
95
  onClick={ () => {
98
96
  setIsModalOpen( true );
99
97
  } }
@@ -101,7 +99,7 @@ export default function NewTemplatePart( {
101
99
  label={ postType.labels.add_new }
102
100
  >
103
101
  { showIcon ? null : postType.labels.add_new }
104
- </Button>
102
+ </Toggle>
105
103
  { isModalOpen && (
106
104
  <CreateTemplatePartModal
107
105
  closeModal={ () => setIsModalOpen( false ) }
@@ -128,12 +128,9 @@ export default function NewTemplate( {
128
128
  setCanvasMode( 'edit' );
129
129
 
130
130
  // Navigate to the created template editor.
131
- window.queueMicrotask( () => {
132
- history.push( {
133
- postId: newTemplate.id,
134
- postType: newTemplate.type,
135
- path: '/templates/single',
136
- } );
131
+ history.push( {
132
+ postId: newTemplate.id,
133
+ postType: newTemplate.type,
137
134
  } );
138
135
 
139
136
  createSuccessNotice(
@@ -69,8 +69,6 @@
69
69
  }
70
70
 
71
71
  .edit-site-custom-template-modal__suggestions_list {
72
- margin-top: $grid-unit-20;
73
-
74
72
  @include break-small() {
75
73
  height: 232px;
76
74
  overflow: scroll;
@@ -130,11 +128,8 @@
130
128
  border: 1px solid $gray-400;
131
129
  border-radius: $radius-block-ui;
132
130
  padding: $grid-unit-20;
133
- margin-bottom: 0;
134
- margin-top: $grid-unit-20;
135
131
  }
136
132
 
137
-
138
133
  .edit-site-custom-generic-template__modal {
139
134
  .components-base-control {
140
135
  @include break-medium() {
@@ -17,7 +17,7 @@
17
17
  height: 100%;
18
18
  display: block;
19
19
  overflow: hidden;
20
- background-color: $gray-800;
20
+ background-color: $gray-900;
21
21
  // Centralize the editor horizontally (flex-direction is column).
22
22
  align-items: center;
23
23
 
@@ -25,7 +25,7 @@ import { __, sprintf } from '@wordpress/i18n';
25
25
  import { SidebarComplementaryAreaFills } from '../sidebar-edit-mode';
26
26
  import BlockEditor from '../block-editor';
27
27
  import CodeEditor from '../code-editor';
28
- import KeyboardShortcuts from '../keyboard-shortcuts';
28
+ import KeyboardShortcutsEditMode from '../keyboard-shortcuts/edit-mode';
29
29
  import InserterSidebar from '../secondary-sidebar/inserter-sidebar';
30
30
  import ListViewSidebar from '../secondary-sidebar/list-view-sidebar';
31
31
  import WelcomeGuide from '../welcome-guide';
@@ -151,7 +151,6 @@ export default function Editor() {
151
151
  return (
152
152
  <>
153
153
  { isEditMode && <WelcomeGuide /> }
154
- <KeyboardShortcuts.Register />
155
154
  <EntityProvider kind="root" type="site">
156
155
  <EntityProvider
157
156
  kind="postType"
@@ -188,7 +187,9 @@ export default function Editor() {
188
187
  ) }
189
188
  </Notice>
190
189
  ) }
191
- { isEditMode && <KeyboardShortcuts /> }
190
+ { isEditMode && (
191
+ <KeyboardShortcutsEditMode />
192
+ ) }
192
193
  </>
193
194
  }
194
195
  secondarySidebar={
@@ -6,12 +6,6 @@
6
6
  padding: $grid-unit-30;
7
7
  display: flex;
8
8
  justify-content: center;
9
-
10
- .edit-site-layout__actions:focus &,
11
- .edit-site-layout__actions:focus-within & {
12
- top: auto;
13
- bottom: 0;
14
- }
15
9
  }
16
10
 
17
11
  // Adjust the position of the notices
@@ -170,7 +170,7 @@ export default function BorderPanel( { name, variation = '' } ) {
170
170
  // global styles are saved.
171
171
  setBorder( { radius: border?.radius, ...updatedBorder } );
172
172
  },
173
- [ setBorder ]
173
+ [ setBorder, border?.radius ]
174
174
  );
175
175
 
176
176
  return (
@@ -12,6 +12,7 @@ import {
12
12
  import {
13
13
  typography,
14
14
  border,
15
+ filter,
15
16
  shadow,
16
17
  color,
17
18
  layout,
@@ -22,40 +23,36 @@ import { isRTL, __ } from '@wordpress/i18n';
22
23
  import { useSelect } from '@wordpress/data';
23
24
  import { store as coreStore } from '@wordpress/core-data';
24
25
  import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
25
- import { useMemo } from '@wordpress/element';
26
26
 
27
27
  /**
28
28
  * Internal dependencies
29
29
  */
30
30
  import { useHasBorderPanel } from './border-panel';
31
31
  import { useHasColorPanel } from './color-utils';
32
- import { useHasDimensionsPanel } from './dimensions-panel';
32
+ import { useHasFilterPanel } from './filter-utils';
33
33
  import { useHasVariationsPanel } from './variations-panel';
34
34
  import { NavigationButtonAsItem } from './navigation-button';
35
35
  import { IconWithCurrentColor } from './icon-with-current-color';
36
36
  import { ScreenVariations } from './screen-variations';
37
37
  import { useHasShadowControl } from './shadow-panel';
38
38
  import { unlock } from '../../private-apis';
39
- import { useSupportedStyles } from './hooks';
40
39
 
41
40
  const {
41
+ useHasDimensionsPanel,
42
42
  useHasTypographyPanel,
43
43
  useGlobalSetting,
44
- overrideSettingsWithSupports,
44
+ useSettingsForBlockElement,
45
45
  } = unlock( blockEditorPrivateApis );
46
46
 
47
47
  function ContextMenu( { name, parentMenu = '' } ) {
48
48
  const [ rawSettings ] = useGlobalSetting( '', name );
49
- const supports = useSupportedStyles( name );
50
- const settings = useMemo(
51
- () => overrideSettingsWithSupports( rawSettings, supports ),
52
- [ rawSettings, supports ]
53
- );
49
+ const settings = useSettingsForBlockElement( rawSettings, name );
54
50
  const hasTypographyPanel = useHasTypographyPanel( settings );
55
51
  const hasColorPanel = useHasColorPanel( name );
56
52
  const hasBorderPanel = useHasBorderPanel( name );
57
53
  const hasEffectsPanel = useHasShadowControl( name );
58
- const hasDimensionsPanel = useHasDimensionsPanel( name );
54
+ const hasFilterPanel = useHasFilterPanel( name );
55
+ const hasDimensionsPanel = useHasDimensionsPanel( settings );
59
56
  const hasLayoutPanel = hasDimensionsPanel;
60
57
  const hasVariationsPanel = useHasVariationsPanel( name, parentMenu );
61
58
 
@@ -117,6 +114,15 @@ function ContextMenu( { name, parentMenu = '' } ) {
117
114
  { __( 'Shadow' ) }
118
115
  </NavigationButtonAsItem>
119
116
  ) }
117
+ { hasFilterPanel && (
118
+ <NavigationButtonAsItem
119
+ icon={ filter }
120
+ path={ parentMenu + '/filters' }
121
+ aria-label={ __( 'Filters styles' ) }
122
+ >
123
+ { __( 'Filters' ) }
124
+ </NavigationButtonAsItem>
125
+ ) }
120
126
  { hasLayoutPanel && (
121
127
  <NavigationButtonAsItem
122
128
  icon={ layout }