@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.
- package/build/components/editor/use-editor-title.cjs +1 -1
- package/build/components/editor/use-editor-title.cjs.map +2 -2
- package/build/components/layout/index.cjs +25 -5
- package/build/components/layout/index.cjs.map +2 -2
- package/build/components/page-templates/index-legacy.cjs +12 -8
- package/build/components/page-templates/index-legacy.cjs.map +2 -2
- package/build/components/resizable-frame/index.cjs.map +2 -2
- package/build/components/routes/use-title.cjs +1 -1
- package/build/components/routes/use-title.cjs.map +2 -2
- package/build/components/save-button/index.cjs +2 -2
- package/build/components/save-button/index.cjs.map +1 -1
- package/build/components/save-hub/index.cjs +3 -3
- package/build/components/save-hub/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-item/index.cjs +8 -3
- package/build/components/sidebar-navigation-item/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-global-styles/index.cjs +2 -18
- package/build/components/sidebar-navigation-screen-global-styles/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-identity/index.cjs +0 -19
- package/build/components/sidebar-navigation-screen-identity/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-main/index.cjs +25 -25
- package/build/components/sidebar-navigation-screen-main/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.cjs.map +2 -2
- package/build/components/welcome-guide/editor.cjs +1 -1
- package/build/components/welcome-guide/editor.cjs.map +1 -1
- package/build/components/welcome-guide/page.cjs +1 -1
- package/build/components/welcome-guide/page.cjs.map +1 -1
- package/build/components/welcome-guide/template.cjs +1 -1
- package/build/components/welcome-guide/template.cjs.map +1 -1
- package/build-module/components/editor/use-editor-title.mjs +1 -1
- package/build-module/components/editor/use-editor-title.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +25 -5
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/page-templates/index-legacy.mjs +13 -9
- package/build-module/components/page-templates/index-legacy.mjs.map +2 -2
- package/build-module/components/resizable-frame/index.mjs.map +2 -2
- package/build-module/components/routes/use-title.mjs +1 -1
- package/build-module/components/routes/use-title.mjs.map +2 -2
- package/build-module/components/save-button/index.mjs +2 -2
- package/build-module/components/save-button/index.mjs.map +1 -1
- package/build-module/components/save-hub/index.mjs +3 -3
- package/build-module/components/save-hub/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-item/index.mjs +9 -8
- package/build-module/components/sidebar-navigation-item/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs +2 -14
- package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-identity/index.mjs +0 -15
- package/build-module/components/sidebar-navigation-screen-identity/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-main/index.mjs +25 -25
- package/build-module/components/sidebar-navigation-screen-main/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs.map +2 -2
- package/build-module/components/welcome-guide/editor.mjs +1 -1
- package/build-module/components/welcome-guide/editor.mjs.map +1 -1
- package/build-module/components/welcome-guide/page.mjs +1 -1
- package/build-module/components/welcome-guide/page.mjs.map +1 -1
- package/build-module/components/welcome-guide/template.mjs +1 -1
- package/build-module/components/welcome-guide/template.mjs.map +1 -1
- package/build-style/{experimental-admin-bar-in-editor-rtl.css → experimental-omnibar-rtl.css} +46 -1
- package/build-style/{experimental-admin-bar-in-editor.css → experimental-omnibar.css} +46 -1
- package/build-style/style-rtl.css +222 -241
- package/build-style/style.css +222 -241
- package/package.json +48 -48
- package/src/components/layout/index.js +20 -9
- package/src/components/layout/style.scss +19 -12
- package/src/components/page-patterns/style.scss +1 -1
- package/src/components/page-templates/index-legacy.js +17 -9
- package/src/components/page-templates/style.scss +0 -5
- package/src/components/resizable-frame/index.js +0 -1
- package/src/components/save-hub/index.js +4 -4
- package/src/components/save-hub/style.scss +3 -3
- package/src/components/sidebar-button/style.scss +2 -2
- package/src/components/sidebar-global-styles/style.scss +1 -1
- package/src/components/sidebar-navigation-item/index.js +11 -9
- package/src/components/sidebar-navigation-item/style.scss +6 -6
- package/src/components/sidebar-navigation-screen/style.scss +8 -8
- package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -15
- package/src/components/sidebar-navigation-screen-identity/index.js +0 -15
- package/src/components/sidebar-navigation-screen-main/index.js +24 -22
- package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +2 -2
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +8 -8
- package/src/components/sidebar-navigation-screen-patterns/style.scss +1 -1
- package/src/components/site-hub/style.scss +5 -5
- package/src/components/welcome-guide/page.js +1 -1
- package/src/{experimental-admin-bar-in-editor.scss → experimental-omnibar.scss} +3 -1
- 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.
|
|
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.
|
|
51
|
-
"@wordpress/admin-ui": "^2.3.
|
|
52
|
-
"@wordpress/api-fetch": "^7.48.
|
|
53
|
-
"@wordpress/base-styles": "^10.0.
|
|
54
|
-
"@wordpress/blob": "^4.48.
|
|
55
|
-
"@wordpress/block-editor": "^15.
|
|
56
|
-
"@wordpress/block-library": "^
|
|
57
|
-
"@wordpress/blocks": "^15.21.
|
|
58
|
-
"@wordpress/commands": "^1.48.
|
|
59
|
-
"@wordpress/components": "^35.
|
|
60
|
-
"@wordpress/compose": "^8.1.
|
|
61
|
-
"@wordpress/core-data": "^7.48.
|
|
62
|
-
"@wordpress/data": "^10.48.
|
|
63
|
-
"@wordpress/dataviews": "^
|
|
64
|
-
"@wordpress/date": "^5.48.
|
|
65
|
-
"@wordpress/deprecated": "^4.48.
|
|
66
|
-
"@wordpress/dom": "^4.48.
|
|
67
|
-
"@wordpress/editor": "^14.48.
|
|
68
|
-
"@wordpress/element": "^8.0.
|
|
69
|
-
"@wordpress/escape-html": "^3.48.
|
|
70
|
-
"@wordpress/fields": "^0.40.
|
|
71
|
-
"@wordpress/global-styles-engine": "^1.15.
|
|
72
|
-
"@wordpress/global-styles-ui": "^1.15.
|
|
73
|
-
"@wordpress/hooks": "^4.48.
|
|
74
|
-
"@wordpress/html-entities": "^4.48.
|
|
75
|
-
"@wordpress/i18n": "^6.21.
|
|
76
|
-
"@wordpress/icons": "^14.0.
|
|
77
|
-
"@wordpress/keyboard-shortcuts": "^5.48.
|
|
78
|
-
"@wordpress/keycodes": "^4.48.
|
|
79
|
-
"@wordpress/media-utils": "^5.48.
|
|
80
|
-
"@wordpress/notices": "^5.48.
|
|
81
|
-
"@wordpress/patterns": "^2.48.
|
|
82
|
-
"@wordpress/plugins": "^7.48.
|
|
83
|
-
"@wordpress/preferences": "^4.48.
|
|
84
|
-
"@wordpress/primitives": "^4.48.
|
|
85
|
-
"@wordpress/private-apis": "^1.48.
|
|
86
|
-
"@wordpress/reusable-blocks": "^5.48.
|
|
87
|
-
"@wordpress/router": "^1.48.
|
|
88
|
-
"@wordpress/style-engine": "^2.
|
|
89
|
-
"@wordpress/theme": "^0.
|
|
90
|
-
"@wordpress/ui": "^0.
|
|
91
|
-
"@wordpress/url": "^4.48.
|
|
92
|
-
"@wordpress/viewport": "^6.48.
|
|
93
|
-
"@wordpress/views": "^1.15.
|
|
94
|
-
"@wordpress/widgets": "^4.48.
|
|
95
|
-
"@wordpress/wordcount": "^4.48.
|
|
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": "
|
|
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
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
-
</
|
|
200
|
-
|
|
206
|
+
</SidebarContent>
|
|
207
|
+
</ThemeProvider>
|
|
208
|
+
) : (
|
|
209
|
+
<SidebarContent
|
|
210
|
+
routeKey={ routeKey }
|
|
211
|
+
>
|
|
201
212
|
<ErrorBoundary>
|
|
202
213
|
{ areas.mobileSidebar }
|
|
203
214
|
</ErrorBoundary>
|
|
204
|
-
|
|
205
|
-
|
|
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-
|
|
8
|
-
color: var(--wpds-color-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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:
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
239
|
-
background: var(--wpds-color-
|
|
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:
|
|
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-
|
|
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,
|
|
22
|
+
import { authorField, previewField } from './fields';
|
|
23
23
|
|
|
24
|
-
const { usePostActions,
|
|
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
|
|
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
|
-
|
|
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 {
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
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-
|
|
22
|
+
color: var(--wpds-color-foreground-interactive-neutral-active);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -6,11 +6,8 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
22
|
-
color: var(--wpds-color-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
119
|
+
background: var(--wpds-color-background-interactive-neutral-weak);
|
|
120
120
|
|
|
121
121
|
.components-button {
|
|
122
|
-
color: var(--wpds-color-
|
|
122
|
+
color: var(--wpds-color-foreground-interactive-neutral) !important;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
.components-input-control__input {
|
|
126
|
-
color: var(--wpds-color-
|
|
127
|
-
background: var(--wpds-color-
|
|
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-
|
|
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
|