@wordpress/edit-site 6.48.1 → 6.48.2-next.v.202606191442.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 (86) hide show
  1. package/build/components/editor/use-editor-title.cjs +1 -1
  2. package/build/components/editor/use-editor-title.cjs.map +2 -2
  3. package/build/components/layout/index.cjs +25 -5
  4. package/build/components/layout/index.cjs.map +2 -2
  5. package/build/components/page-templates/index-legacy.cjs +12 -8
  6. package/build/components/page-templates/index-legacy.cjs.map +2 -2
  7. package/build/components/resizable-frame/index.cjs.map +2 -2
  8. package/build/components/routes/use-title.cjs +1 -1
  9. package/build/components/routes/use-title.cjs.map +2 -2
  10. package/build/components/save-button/index.cjs +2 -2
  11. package/build/components/save-button/index.cjs.map +1 -1
  12. package/build/components/save-hub/index.cjs +3 -3
  13. package/build/components/save-hub/index.cjs.map +3 -3
  14. package/build/components/sidebar-navigation-item/index.cjs +8 -3
  15. package/build/components/sidebar-navigation-item/index.cjs.map +3 -3
  16. package/build/components/sidebar-navigation-screen-global-styles/index.cjs +2 -18
  17. package/build/components/sidebar-navigation-screen-global-styles/index.cjs.map +3 -3
  18. package/build/components/sidebar-navigation-screen-identity/index.cjs +0 -19
  19. package/build/components/sidebar-navigation-screen-identity/index.cjs.map +3 -3
  20. package/build/components/sidebar-navigation-screen-main/index.cjs +25 -25
  21. package/build/components/sidebar-navigation-screen-main/index.cjs.map +2 -2
  22. package/build/components/sidebar-navigation-screen-patterns/index.cjs +1 -1
  23. package/build/components/sidebar-navigation-screen-patterns/index.cjs.map +2 -2
  24. package/build/components/welcome-guide/editor.cjs +1 -1
  25. package/build/components/welcome-guide/editor.cjs.map +1 -1
  26. package/build/components/welcome-guide/page.cjs +1 -1
  27. package/build/components/welcome-guide/page.cjs.map +1 -1
  28. package/build/components/welcome-guide/template.cjs +1 -1
  29. package/build/components/welcome-guide/template.cjs.map +1 -1
  30. package/build-module/components/editor/use-editor-title.mjs +1 -1
  31. package/build-module/components/editor/use-editor-title.mjs.map +2 -2
  32. package/build-module/components/layout/index.mjs +25 -5
  33. package/build-module/components/layout/index.mjs.map +2 -2
  34. package/build-module/components/page-templates/index-legacy.mjs +13 -9
  35. package/build-module/components/page-templates/index-legacy.mjs.map +2 -2
  36. package/build-module/components/resizable-frame/index.mjs.map +2 -2
  37. package/build-module/components/routes/use-title.mjs +1 -1
  38. package/build-module/components/routes/use-title.mjs.map +2 -2
  39. package/build-module/components/save-button/index.mjs +2 -2
  40. package/build-module/components/save-button/index.mjs.map +1 -1
  41. package/build-module/components/save-hub/index.mjs +3 -3
  42. package/build-module/components/save-hub/index.mjs.map +2 -2
  43. package/build-module/components/sidebar-navigation-item/index.mjs +9 -8
  44. package/build-module/components/sidebar-navigation-item/index.mjs.map +2 -2
  45. package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs +2 -14
  46. package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs.map +2 -2
  47. package/build-module/components/sidebar-navigation-screen-identity/index.mjs +0 -15
  48. package/build-module/components/sidebar-navigation-screen-identity/index.mjs.map +2 -2
  49. package/build-module/components/sidebar-navigation-screen-main/index.mjs +25 -25
  50. package/build-module/components/sidebar-navigation-screen-main/index.mjs.map +2 -2
  51. package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +1 -1
  52. package/build-module/components/sidebar-navigation-screen-patterns/index.mjs.map +2 -2
  53. package/build-module/components/welcome-guide/editor.mjs +1 -1
  54. package/build-module/components/welcome-guide/editor.mjs.map +1 -1
  55. package/build-module/components/welcome-guide/page.mjs +1 -1
  56. package/build-module/components/welcome-guide/page.mjs.map +1 -1
  57. package/build-module/components/welcome-guide/template.mjs +1 -1
  58. package/build-module/components/welcome-guide/template.mjs.map +1 -1
  59. package/build-style/{experimental-admin-bar-in-editor-rtl.css → experimental-omnibar-rtl.css} +46 -1
  60. package/build-style/{experimental-admin-bar-in-editor.css → experimental-omnibar.css} +46 -1
  61. package/build-style/style-rtl.css +222 -241
  62. package/build-style/style.css +222 -241
  63. package/package.json +48 -48
  64. package/src/components/layout/index.js +20 -9
  65. package/src/components/layout/style.scss +19 -12
  66. package/src/components/page-patterns/style.scss +1 -1
  67. package/src/components/page-templates/index-legacy.js +17 -9
  68. package/src/components/page-templates/style.scss +0 -5
  69. package/src/components/resizable-frame/index.js +0 -1
  70. package/src/components/save-hub/index.js +4 -4
  71. package/src/components/save-hub/style.scss +3 -3
  72. package/src/components/sidebar-button/style.scss +2 -2
  73. package/src/components/sidebar-global-styles/style.scss +1 -1
  74. package/src/components/sidebar-navigation-item/index.js +11 -9
  75. package/src/components/sidebar-navigation-item/style.scss +6 -6
  76. package/src/components/sidebar-navigation-screen/style.scss +8 -8
  77. package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -15
  78. package/src/components/sidebar-navigation-screen-identity/index.js +0 -15
  79. package/src/components/sidebar-navigation-screen-main/index.js +24 -22
  80. package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -2
  81. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +8 -8
  82. package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
  83. package/src/components/site-hub/style.scss +5 -5
  84. package/src/components/welcome-guide/page.js +1 -1
  85. package/src/{experimental-admin-bar-in-editor.scss → experimental-omnibar.scss} +3 -1
  86. package/src/style.scss +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "6.48.1",
3
+ "version": "6.48.2-next.v.202606191442.0+17fe7db8a",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -47,52 +47,52 @@
47
47
  ],
48
48
  "dependencies": {
49
49
  "@react-spring/web": "^9.4.5",
50
- "@wordpress/a11y": "^4.48.1",
51
- "@wordpress/admin-ui": "^2.3.1",
52
- "@wordpress/api-fetch": "^7.48.1",
53
- "@wordpress/base-styles": "^10.0.1",
54
- "@wordpress/blob": "^4.48.1",
55
- "@wordpress/block-editor": "^15.21.1",
56
- "@wordpress/block-library": "^9.48.1",
57
- "@wordpress/blocks": "^15.21.1",
58
- "@wordpress/commands": "^1.48.1",
59
- "@wordpress/components": "^35.0.1",
60
- "@wordpress/compose": "^8.1.1",
61
- "@wordpress/core-data": "^7.48.1",
62
- "@wordpress/data": "^10.48.1",
63
- "@wordpress/dataviews": "^16.0.1",
64
- "@wordpress/date": "^5.48.1",
65
- "@wordpress/deprecated": "^4.48.1",
66
- "@wordpress/dom": "^4.48.1",
67
- "@wordpress/editor": "^14.48.1",
68
- "@wordpress/element": "^8.0.1",
69
- "@wordpress/escape-html": "^3.48.1",
70
- "@wordpress/fields": "^0.40.1",
71
- "@wordpress/global-styles-engine": "^1.15.1",
72
- "@wordpress/global-styles-ui": "^1.15.1",
73
- "@wordpress/hooks": "^4.48.1",
74
- "@wordpress/html-entities": "^4.48.1",
75
- "@wordpress/i18n": "^6.21.1",
76
- "@wordpress/icons": "^14.0.1",
77
- "@wordpress/keyboard-shortcuts": "^5.48.1",
78
- "@wordpress/keycodes": "^4.48.1",
79
- "@wordpress/media-utils": "^5.48.1",
80
- "@wordpress/notices": "^5.48.1",
81
- "@wordpress/patterns": "^2.48.1",
82
- "@wordpress/plugins": "^7.48.1",
83
- "@wordpress/preferences": "^4.48.1",
84
- "@wordpress/primitives": "^4.48.1",
85
- "@wordpress/private-apis": "^1.48.1",
86
- "@wordpress/reusable-blocks": "^5.48.1",
87
- "@wordpress/router": "^1.48.1",
88
- "@wordpress/style-engine": "^2.48.1",
89
- "@wordpress/theme": "^0.15.1",
90
- "@wordpress/ui": "^0.15.1",
91
- "@wordpress/url": "^4.48.1",
92
- "@wordpress/viewport": "^6.48.1",
93
- "@wordpress/views": "^1.15.1",
94
- "@wordpress/widgets": "^4.48.1",
95
- "@wordpress/wordcount": "^4.48.1",
50
+ "@wordpress/a11y": "^4.48.2-next.v.202606191442.0+17fe7db8a",
51
+ "@wordpress/admin-ui": "^2.3.2-next.v.202606191442.0+17fe7db8a",
52
+ "@wordpress/api-fetch": "^7.48.2-next.v.202606191442.0+17fe7db8a",
53
+ "@wordpress/base-styles": "^10.0.2-next.v.202606191442.0+17fe7db8a",
54
+ "@wordpress/blob": "^4.48.2-next.v.202606191442.0+17fe7db8a",
55
+ "@wordpress/block-editor": "^15.22.1-next.v.202606191442.0+17fe7db8a",
56
+ "@wordpress/block-library": "^10.0.1-next.v.202606191442.0+17fe7db8a",
57
+ "@wordpress/blocks": "^15.21.3-next.v.202606191442.0+17fe7db8a",
58
+ "@wordpress/commands": "^1.48.2-next.v.202606191442.0+17fe7db8a",
59
+ "@wordpress/components": "^35.1.1-next.v.202606191442.0+17fe7db8a",
60
+ "@wordpress/compose": "^8.1.2-next.v.202606191442.0+17fe7db8a",
61
+ "@wordpress/core-data": "^7.48.2-next.v.202606191442.0+17fe7db8a",
62
+ "@wordpress/data": "^10.48.2-next.v.202606191442.0+17fe7db8a",
63
+ "@wordpress/dataviews": "^17.0.1-next.v.202606191442.0+17fe7db8a",
64
+ "@wordpress/date": "^5.48.2-next.v.202606191442.0+17fe7db8a",
65
+ "@wordpress/deprecated": "^4.48.2-next.v.202606191442.0+17fe7db8a",
66
+ "@wordpress/dom": "^4.48.2-next.v.202606191442.0+17fe7db8a",
67
+ "@wordpress/editor": "^14.48.2-next.v.202606191442.0+17fe7db8a",
68
+ "@wordpress/element": "^8.0.2-next.v.202606191442.0+17fe7db8a",
69
+ "@wordpress/escape-html": "^3.48.2-next.v.202606191442.0+17fe7db8a",
70
+ "@wordpress/fields": "^0.40.2-next.v.202606191442.0+17fe7db8a",
71
+ "@wordpress/global-styles-engine": "^1.15.2-next.v.202606191442.0+17fe7db8a",
72
+ "@wordpress/global-styles-ui": "^1.15.2-next.v.202606191442.0+17fe7db8a",
73
+ "@wordpress/hooks": "^4.48.2-next.v.202606191442.0+17fe7db8a",
74
+ "@wordpress/html-entities": "^4.48.2-next.v.202606191442.0+17fe7db8a",
75
+ "@wordpress/i18n": "^6.21.2-next.v.202606191442.0+17fe7db8a",
76
+ "@wordpress/icons": "^14.0.2-next.v.202606191442.0+17fe7db8a",
77
+ "@wordpress/keyboard-shortcuts": "^5.48.2-next.v.202606191442.0+17fe7db8a",
78
+ "@wordpress/keycodes": "^4.48.2-next.v.202606191442.0+17fe7db8a",
79
+ "@wordpress/media-utils": "^5.48.2-next.v.202606191442.0+17fe7db8a",
80
+ "@wordpress/notices": "^5.48.2-next.v.202606191442.0+17fe7db8a",
81
+ "@wordpress/patterns": "^2.48.2-next.v.202606191442.0+17fe7db8a",
82
+ "@wordpress/plugins": "^7.48.2-next.v.202606191442.0+17fe7db8a",
83
+ "@wordpress/preferences": "^4.48.2-next.v.202606191442.0+17fe7db8a",
84
+ "@wordpress/primitives": "^4.48.2-next.v.202606191442.0+17fe7db8a",
85
+ "@wordpress/private-apis": "^1.48.2-next.v.202606191442.0+17fe7db8a",
86
+ "@wordpress/reusable-blocks": "^5.48.2-next.v.202606191442.0+17fe7db8a",
87
+ "@wordpress/router": "^1.48.2-next.v.202606191442.0+17fe7db8a",
88
+ "@wordpress/style-engine": "^2.49.1-next.v.202606191442.0+17fe7db8a",
89
+ "@wordpress/theme": "^0.16.1-next.v.202606191442.0+17fe7db8a",
90
+ "@wordpress/ui": "^0.16.1-next.v.202606191442.0+17fe7db8a",
91
+ "@wordpress/url": "^4.48.2-next.v.202606191442.0+17fe7db8a",
92
+ "@wordpress/viewport": "^6.48.2-next.v.202606191442.0+17fe7db8a",
93
+ "@wordpress/views": "^1.15.2-next.v.202606191442.0+17fe7db8a",
94
+ "@wordpress/widgets": "^4.48.2-next.v.202606191442.0+17fe7db8a",
95
+ "@wordpress/wordcount": "^4.48.2-next.v.202606191442.0+17fe7db8a",
96
96
  "change-case": "^4.1.2",
97
97
  "clsx": "^2.1.1",
98
98
  "colord": "^2.9.3",
@@ -107,5 +107,5 @@
107
107
  "publishConfig": {
108
108
  "access": "public"
109
109
  },
110
- "gitHead": "99df7432c5c7cb83ba41146fd1f57f3c19004305"
110
+ "gitHead": "1b6a19222df5a88f161880b5789efb3171d8f425"
111
111
  }
@@ -32,7 +32,6 @@ import { PluginArea } from '@wordpress/plugins';
32
32
  import { SnackbarNotices, store as noticesStore } from '@wordpress/notices';
33
33
  import { useDispatch, useSelect } from '@wordpress/data';
34
34
  import { store as preferencesStore } from '@wordpress/preferences';
35
- // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
36
35
  import { Tooltip } from '@wordpress/ui';
37
36
 
38
37
  /**
@@ -184,10 +183,18 @@ function Layout() {
184
183
  }
185
184
  />
186
185
  ) }
187
- <SidebarContent routeKey={ routeKey }>
188
- { areas.mobileContent ? (
189
- <ThemeProvider
190
- color={ CONTENT_COLOR }
186
+ { areas.mobileContent ? (
187
+ /*
188
+ * ThemeProvider wraps SidebarContent (rather than
189
+ * just the content) so the scroll wrapper it renders
190
+ * inherits the content background tokens. See
191
+ * `.edit-site-sidebar__screen-wrapper` in style.scss.
192
+ */
193
+ <ThemeProvider
194
+ color={ CONTENT_COLOR }
195
+ >
196
+ <SidebarContent
197
+ routeKey={ routeKey }
191
198
  >
192
199
  <div className="edit-site-layout__mobile-content">
193
200
  <ErrorBoundary>
@@ -196,13 +203,17 @@ function Layout() {
196
203
  }
197
204
  </ErrorBoundary>
198
205
  </div>
199
- </ThemeProvider>
200
- ) : (
206
+ </SidebarContent>
207
+ </ThemeProvider>
208
+ ) : (
209
+ <SidebarContent
210
+ routeKey={ routeKey }
211
+ >
201
212
  <ErrorBoundary>
202
213
  { areas.mobileSidebar }
203
214
  </ErrorBoundary>
204
- ) }
205
- </SidebarContent>
215
+ </SidebarContent>
216
+ ) }
206
217
  <SaveHub />
207
218
  <SavePanel />
208
219
  </>
@@ -4,14 +4,14 @@
4
4
 
5
5
  .edit-site-layout {
6
6
  height: 100%;
7
- background: var(--wpds-color-bg-surface-neutral-weak);
8
- color: var(--wpds-color-fg-content-neutral);
7
+ background: var(--wpds-color-background-surface-neutral-weak);
8
+ color: var(--wpds-color-foreground-content-neutral);
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
 
12
12
  // Show a dark background in "frame" mode to avoid edge artifacts.
13
13
  &:not(.is-full-canvas) .editor-visual-editor {
14
- background: var(--wpds-color-bg-surface-neutral-weak);
14
+ background: var(--wpds-color-background-surface-neutral-weak);
15
15
  }
16
16
  }
17
17
 
@@ -84,7 +84,14 @@
84
84
  display: flex;
85
85
  flex-direction: column;
86
86
  flex-grow: 1;
87
- background: var(--wpds-color-bg-surface-neutral);
87
+ }
88
+
89
+ // On mobile, the content surface lives on the scroll wrapper
90
+ // (not the inner content element) so it also covers the wrapper's
91
+ // reserved scrollbar gutter, preventing the theme background color from
92
+ // bleeding through.
93
+ .edit-site-sidebar__screen-wrapper:has(.edit-site-layout__mobile-content) {
94
+ background: var(--wpds-color-background-surface-neutral);
88
95
  }
89
96
 
90
97
  .edit-site-layout__canvas-container {
@@ -110,7 +117,7 @@
110
117
  }
111
118
 
112
119
  .edit-site-resizable-frame__inner {
113
- color: var(--wpds-color-fg-content-neutral);
120
+ color: var(--wpds-color-foreground-content-neutral);
114
121
  }
115
122
 
116
123
  @include break-medium {
@@ -128,7 +135,7 @@
128
135
  }
129
136
 
130
137
  .edit-site-layout:not(.is-full-canvas) & {
131
- border-radius: $radius-large;
138
+ border-radius: var(--wpds-border-radius-xl);
132
139
  }
133
140
 
134
141
  &:hover {
@@ -179,7 +186,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
179
186
  view-transition-name: toggle;
180
187
  /* stylelint-enable */
181
188
  position: relative;
182
- color: var(--wpds-color-fg-interactive-neutral);
189
+ color: var(--wpds-color-foreground-interactive-neutral);
183
190
  height: $header-height;
184
191
  width: $header-height;
185
192
  overflow: hidden;
@@ -187,12 +194,12 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
187
194
  display: flex;
188
195
  align-items: center;
189
196
  justify-content: center;
190
- background: var(--wpds-color-bg-surface-neutral-weak);
197
+ background: var(--wpds-color-background-surface-neutral-weak);
191
198
  border-radius: 0;
192
199
 
193
200
  &:hover,
194
201
  &:active {
195
- color: var(--wpds-color-fg-interactive-neutral-active);
202
+ color: var(--wpds-color-foreground-interactive-neutral-active);
196
203
  }
197
204
 
198
205
  &:focus-visible,
@@ -235,8 +242,8 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
235
242
  left: auto;
236
243
  right: 0;
237
244
  width: $sidebar-width;
238
- color: var(--wpds-color-fg-content-neutral);
239
- background: var(--wpds-color-bg-surface-neutral-strong);
245
+ color: var(--wpds-color-foreground-content-neutral);
246
+ background: var(--wpds-color-background-surface-neutral-strong);
240
247
 
241
248
  &:focus,
242
249
  &:focus-within {
@@ -264,7 +271,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
264
271
  overflow: hidden;
265
272
  box-shadow: $elevation-x-small;
266
273
  @include break-medium() {
267
- border-radius: 8px;
274
+ border-radius: var(--wpds-border-radius-xl);
268
275
  margin: $canvas-padding $canvas-padding $canvas-padding 0;
269
276
  }
270
277
  }
@@ -92,7 +92,7 @@
92
92
  box-shadow: 0 0 0.5px 0.5px var(--wp-admin-theme-color);
93
93
  box-sizing: border-box;
94
94
  z-index: 1;
95
- background-color: var(--wpds-color-bg-surface-neutral-strong);
95
+ background-color: var(--wpds-color-background-surface-neutral-strong);
96
96
  width: calc(100% + 2px); // Account for the border width of the token field.
97
97
  left: -1px;
98
98
  min-width: initial;
@@ -19,9 +19,9 @@ import AddNewTemplate from '../add-new-template-legacy';
19
19
  import { TEMPLATE_POST_TYPE } from '../../utils/constants';
20
20
  import { unlock } from '../../lock-unlock';
21
21
  import { useEditPostAction } from '../dataviews-actions';
22
- import { authorField, descriptionField, previewField } from './fields';
22
+ import { authorField, previewField } from './fields';
23
23
 
24
- const { usePostActions, templateTitleField } = unlock( editorPrivateApis );
24
+ const { usePostActions, usePostFields } = unlock( editorPrivateApis );
25
25
  const { useHistory, useLocation } = unlock( routerPrivateApis );
26
26
  const { useEntityRecordsWithPermissions } = unlock( corePrivateApis );
27
27
 
@@ -97,18 +97,26 @@ export default function PageTemplates() {
97
97
  } ) );
98
98
  }, [ records ] );
99
99
 
100
- const fields = useMemo(
101
- () => [
100
+ const postFields = usePostFields( { postType: TEMPLATE_POST_TYPE } );
101
+ const fields = useMemo( () => {
102
+ const __fields = [
102
103
  previewField,
103
- templateTitleField,
104
- descriptionField,
105
104
  {
106
105
  ...authorField,
107
106
  elements: authors,
108
107
  },
109
- ],
110
- [ authors ]
111
- );
108
+ ];
109
+ // TODO: Only `description` and `title` are sourced from the shared
110
+ // `@wordpress/fields` registry so far. The remaining local fields
111
+ // (e.g. `previewField`, `authorField`) should also be evaluated for
112
+ // migration to the shared registry.
113
+ return [
114
+ ...__fields,
115
+ ...( postFields || [] ).filter( ( field ) =>
116
+ [ 'description', 'title' ].includes( field.id )
117
+ ),
118
+ ];
119
+ }, [ authors, postFields ] );
112
120
 
113
121
  const { data, paginationInfo } = useMemo( () => {
114
122
  return filterSortAndPaginate( records, view, fields );
@@ -35,9 +35,4 @@
35
35
  .edit-site-list__rename-modal {
36
36
  // The rename dropdown popover is open at the same time as the rename modal. The latter has to be higher.
37
37
  z-index: z-index(".edit-site-list__rename-modal");
38
- .components-base-control {
39
- @include break-medium() {
40
- width: $grid-unit * 40;
41
- }
42
- }
43
38
  }
@@ -17,7 +17,6 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
17
17
  import { useSelect } from '@wordpress/data';
18
18
  import { store as coreStore } from '@wordpress/core-data';
19
19
  import { addQueryArgs } from '@wordpress/url';
20
- // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
21
20
  import { Tooltip } from '@wordpress/ui';
22
21
 
23
22
  /**
@@ -2,7 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useSelect } from '@wordpress/data';
5
- import { __experimentalHStack as HStack } from '@wordpress/components';
5
+ import { Stack } from '@wordpress/ui';
6
6
  import { store as coreStore } from '@wordpress/core-data';
7
7
  import { check } from '@wordpress/icons';
8
8
 
@@ -28,15 +28,15 @@ export default function SaveHub() {
28
28
  };
29
29
  }, [] );
30
30
  return (
31
- <HStack className="edit-site-save-hub" alignment="right" spacing={ 4 }>
31
+ <Stack className="edit-site-save-hub" gap="lg">
32
32
  <SaveButton
33
33
  className="edit-site-save-hub__button"
34
- variant={ isDisabled ? null : 'primary' }
34
+ variant={ isDisabled && ! isSaving ? null : 'primary' }
35
35
  showTooltip={ false }
36
36
  icon={ isDisabled && ! isSaving ? check : null }
37
37
  showReviewMessage
38
38
  __next40pxDefaultSize
39
39
  />
40
- </HStack>
40
+ </Stack>
41
41
  );
42
42
  }
@@ -1,11 +1,11 @@
1
1
  @use "@wordpress/base-styles/variables" as *;
2
2
 
3
3
  .edit-site-save-hub {
4
- color: var(--wpds-color-fg-content-neutral);
4
+ color: var(--wpds-color-foreground-content-neutral);
5
5
  border-top: 1px solid var(--wpds-color-stroke-surface-neutral);
6
6
  flex-shrink: 0;
7
7
  margin: 0;
8
- padding: $grid-unit-20 $canvas-padding;
8
+ padding: $grid-unit-20;
9
9
  }
10
10
 
11
11
  .edit-site-save-hub__button {
@@ -25,7 +25,7 @@
25
25
  &:not(.is-primary) {
26
26
  &.is-busy,
27
27
  &.is-busy[aria-disabled="true"]:hover {
28
- color: var(--wpds-color-fg-interactive-neutral);
28
+ color: var(--wpds-color-foreground-interactive-neutral);
29
29
  }
30
30
  }
31
31
  }
@@ -1,5 +1,5 @@
1
1
  .edit-site-sidebar-button {
2
- color: var(--wpds-color-fg-interactive-neutral);
2
+ color: var(--wpds-color-foreground-interactive-neutral);
3
3
  flex-shrink: 0;
4
4
 
5
5
  // Focus (resets default button focus and use focus-visible).
@@ -19,6 +19,6 @@
19
19
  &:focus,
20
20
  &:not(:disabled,[aria-disabled="true"]):active,
21
21
  &[aria-expanded="true"] {
22
- color: var(--wpds-color-fg-interactive-neutral-active);
22
+ color: var(--wpds-color-foreground-interactive-neutral-active);
23
23
  }
24
24
  }
@@ -24,7 +24,7 @@
24
24
  }
25
25
  }
26
26
  .edit-site-sidebar-button {
27
- color: var(--wpds-color-fg-interactive-neutral);
27
+ color: var(--wpds-color-foreground-interactive-neutral);
28
28
  }
29
29
  }
30
30
 
@@ -6,11 +6,8 @@ import clsx from 'clsx';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import {
10
- __experimentalItem as Item,
11
- __experimentalHStack as HStack,
12
- FlexBlock,
13
- } from '@wordpress/components';
9
+ import { __experimentalItem as Item, FlexBlock } from '@wordpress/components';
10
+ import { Stack } from '@wordpress/ui';
14
11
  import { isRTL } from '@wordpress/i18n';
15
12
  import { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';
16
13
  import { privateApis as routerPrivateApis } from '@wordpress/router';
@@ -22,7 +19,7 @@ import { useContext } from '@wordpress/element';
22
19
  import { unlock } from '../../lock-unlock';
23
20
  import { SidebarNavigationContext } from '../sidebar';
24
21
 
25
- const { useHistory, useLink } = unlock( routerPrivateApis );
22
+ const { useHistory, useLink, useLocation } = unlock( routerPrivateApis );
26
23
 
27
24
  export default function SidebarNavigationItem( {
28
25
  className,
@@ -32,11 +29,16 @@ export default function SidebarNavigationItem( {
32
29
  uid,
33
30
  to,
34
31
  onClick,
32
+ activeOnRouteName,
35
33
  children,
36
34
  ...props
37
35
  } ) {
38
36
  const history = useHistory();
37
+ const linkProps = useLink( to );
38
+ const { name } = useLocation();
39
39
  const { navigate } = useContext( SidebarNavigationContext );
40
+
41
+ const isActive = activeOnRouteName && name === activeOnRouteName;
40
42
  // If there is no custom click handler, create one that navigates to `params`.
41
43
  function handleClick( e ) {
42
44
  if ( onClick ) {
@@ -48,7 +50,6 @@ export default function SidebarNavigationItem( {
48
50
  navigate( 'forward', `[id="${ uid }"]` );
49
51
  }
50
52
  }
51
- const linkProps = useLink( to );
52
53
 
53
54
  return (
54
55
  <Item
@@ -60,9 +61,10 @@ export default function SidebarNavigationItem( {
60
61
  id={ uid }
61
62
  onClick={ handleClick }
62
63
  href={ to ? linkProps.href : undefined }
64
+ aria-current={ isActive ? true : undefined }
63
65
  { ...props }
64
66
  >
65
- <HStack justify="flex-start">
67
+ <Stack direction="row" align="center" justify="start" gap="sm">
66
68
  { icon && (
67
69
  <Icon
68
70
  style={ { fill: 'currentcolor' } }
@@ -79,7 +81,7 @@ export default function SidebarNavigationItem( {
79
81
  />
80
82
  ) }
81
83
  { ! withChevron && suffix }
82
- </HStack>
84
+ </Stack>
83
85
  </Item>
84
86
  );
85
87
  }
@@ -1,7 +1,7 @@
1
1
  @use "@wordpress/base-styles/variables" as *;
2
2
 
3
3
  .edit-site-sidebar-navigation-item.components-item {
4
- color: var(--wpds-color-fg-interactive-neutral-weak);
4
+ color: var(--wpds-color-foreground-interactive-neutral-weak);
5
5
  // 6px right padding to align with + button
6
6
  padding: $grid-unit-10 6px $grid-unit-10 $grid-unit-20;
7
7
  border: none;
@@ -10,16 +10,16 @@
10
10
  &:hover,
11
11
  &:focus,
12
12
  &[aria-current="true"] {
13
- color: var(--wpds-color-fg-interactive-neutral-active);
13
+ color: var(--wpds-color-foreground-interactive-neutral-active);
14
14
 
15
15
  .edit-site-sidebar-navigation-item__drilldown-indicator {
16
- fill: var(--wpds-color-fg-interactive-neutral-active);
16
+ fill: var(--wpds-color-foreground-interactive-neutral-active);
17
17
  }
18
18
  }
19
19
 
20
20
  &[aria-current="true"] {
21
- background: var(--wpds-color-bg-interactive-neutral-weak-active);
22
- color: var(--wpds-color-fg-interactive-neutral-active);
21
+ background: var(--wpds-color-background-interactive-neutral-weak-active);
22
+ color: var(--wpds-color-foreground-interactive-neutral-active);
23
23
  font-weight: $font-weight-medium;
24
24
  }
25
25
 
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  .edit-site-sidebar-navigation-item__drilldown-indicator {
32
- fill: var(--wpds-color-fg-interactive-neutral-weak);
32
+ fill: var(--wpds-color-foreground-interactive-neutral-weak);
33
33
  }
34
34
 
35
35
  &.with-suffix {
@@ -23,7 +23,7 @@
23
23
  padding: 0 $grid-unit-20;
24
24
 
25
25
  .components-text {
26
- color: var(--wpds-color-fg-content-neutral);
26
+ color: var(--wpds-color-foreground-content-neutral);
27
27
  }
28
28
 
29
29
  .components-heading {
@@ -34,7 +34,7 @@
34
34
  .edit-site-sidebar-navigation-screen__title-icon {
35
35
  position: sticky;
36
36
  top: 0;
37
- background: var(--wpds-color-bg-surface-neutral-weak);
37
+ background: var(--wpds-color-background-surface-neutral-weak);
38
38
  padding-top: $grid-unit-60;
39
39
  margin-bottom: $grid-unit-10;
40
40
  padding-bottom: $grid-unit-10;
@@ -95,7 +95,7 @@
95
95
  .edit-site-sidebar-navigation-screen__footer {
96
96
  position: sticky;
97
97
  bottom: 0;
98
- background-color: var(--wpds-color-bg-surface-neutral-weak);
98
+ background-color: var(--wpds-color-background-surface-neutral-weak);
99
99
  gap: 0;
100
100
  padding: $grid-unit-10 $grid-unit-20;
101
101
  margin: $grid-unit-20 0 0;
@@ -116,20 +116,20 @@
116
116
  .edit-site-sidebar-navigation-screen__input-control {
117
117
  width: 100%;
118
118
  .components-input-control__container {
119
- background: var(--wpds-color-bg-interactive-neutral-weak);
119
+ background: var(--wpds-color-background-interactive-neutral-weak);
120
120
 
121
121
  .components-button {
122
- color: var(--wpds-color-fg-interactive-neutral) !important;
122
+ color: var(--wpds-color-foreground-interactive-neutral) !important;
123
123
  }
124
124
  }
125
125
  .components-input-control__input {
126
- color: var(--wpds-color-fg-interactive-neutral) !important;
127
- background: var(--wpds-color-bg-interactive-neutral-weak) !important;
126
+ color: var(--wpds-color-foreground-interactive-neutral) !important;
127
+ background: var(--wpds-color-background-interactive-neutral-weak) !important;
128
128
  }
129
129
  .components-input-control__backdrop {
130
130
  border: 4px !important;
131
131
  }
132
132
  .components-base-control__help {
133
- color: var(--wpds-color-fg-content-neutral-weak);
133
+ color: var(--wpds-color-foreground-content-neutral-weak);
134
134
  }
135
135
  }
@@ -8,6 +8,7 @@ import { store as preferencesStore } from '@wordpress/preferences';
8
8
  import { store as editorStore } from '@wordpress/editor';
9
9
  import { privateApis as routerPrivateApis } from '@wordpress/router';
10
10
  import { addQueryArgs } from '@wordpress/url';
11
+ import { useGlobalStylesRevisions } from '@wordpress/global-styles-ui';
11
12
 
12
13
  /**
13
14
  * Internal dependencies
@@ -15,23 +16,11 @@ import { addQueryArgs } from '@wordpress/url';
15
16
  import SidebarNavigationScreen from '../sidebar-navigation-screen';
16
17
  import { unlock } from '../../lock-unlock';
17
18
  import { store as editSiteStore } from '../../store';
18
- import SidebarNavigationItem from '../sidebar-navigation-item';
19
- import { useGlobalStylesRevisions } from '@wordpress/global-styles-ui';
20
19
  import SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';
21
20
  import { MainSidebarNavigationContent } from '../sidebar-navigation-screen-main';
22
21
 
23
22
  const { useLocation, useHistory } = unlock( routerPrivateApis );
24
23
 
25
- export function SidebarNavigationItemGlobalStyles( props ) {
26
- const { name } = useLocation();
27
- return (
28
- <SidebarNavigationItem
29
- { ...props }
30
- aria-current={ name === 'styles' }
31
- />
32
- );
33
- }
34
-
35
24
  export default function SidebarNavigationScreenGlobalStyles() {
36
25
  const history = useHistory();
37
26
  const { path } = useLocation();
@@ -73,9 +62,7 @@ export default function SidebarNavigationScreenGlobalStyles() {
73
62
  description={ __(
74
63
  'Customize the appearance of your website using the block editor.'
75
64
  ) }
76
- content={
77
- <MainSidebarNavigationContent activeItem="styles-navigation-item" />
78
- }
65
+ content={ <MainSidebarNavigationContent /> }
79
66
  footer={
80
67
  shouldShowGlobalStylesFooter && (
81
68
  <SidebarNavigationScreenDetailsFooter
@@ -2,28 +2,13 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
- import { privateApis as routerPrivateApis } from '@wordpress/router';
6
5
 
7
6
  /**
8
7
  * Internal dependencies
9
8
  */
10
9
  import SidebarNavigationScreen from '../sidebar-navigation-screen';
11
- import { unlock } from '../../lock-unlock';
12
- import SidebarNavigationItem from '../sidebar-navigation-item';
13
10
  import { MainSidebarNavigationContent } from '../sidebar-navigation-screen-main';
14
11
 
15
- const { useLocation } = unlock( routerPrivateApis );
16
-
17
- export function SidebarNavigationItemIdentity( props ) {
18
- const { name } = useLocation();
19
- return (
20
- <SidebarNavigationItem
21
- { ...props }
22
- aria-current={ name === 'identity' }
23
- />
24
- );
25
- }
26
-
27
12
  export default function SidebarNavigationScreenIdentity() {
28
13
  return (
29
14
  <SidebarNavigationScreen