@wordpress/edit-site 6.48.1 → 6.49.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/CHANGELOG.md +2 -0
- package/build/components/add-new-post/index.cjs +0 -1
- package/build/components/add-new-post/index.cjs.map +2 -2
- package/build/components/add-new-template/add-custom-generic-template-modal-content.cjs +0 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs +0 -1
- package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs.map +2 -2
- 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 +30 -11
- package/build/components/layout/index.cjs.map +3 -3
- package/build/components/page-patterns/fields.cjs +2 -51
- package/build/components/page-patterns/fields.cjs.map +3 -3
- package/build/components/page-patterns/index.cjs +12 -23
- package/build/components/page-patterns/index.cjs.map +2 -2
- package/build/components/page-templates/index-legacy.cjs +8 -27
- 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-dataviews/index.cjs +3 -1
- package/build/components/sidebar-dataviews/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-item/index.cjs +17 -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 +49 -56
- package/build/components/sidebar-navigation-screen-main/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.cjs +0 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/index.cjs +6 -3
- 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/add-new-post/index.mjs +0 -1
- package/build-module/components/add-new-post/index.mjs.map +2 -2
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.mjs +0 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs +0 -1
- package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs.map +2 -2
- 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 +26 -7
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/page-patterns/fields.mjs +2 -40
- package/build-module/components/page-patterns/fields.mjs.map +2 -2
- package/build-module/components/page-patterns/index.mjs +14 -29
- package/build-module/components/page-patterns/index.mjs.map +2 -2
- package/build-module/components/page-templates/index-legacy.mjs +9 -28
- 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-dataviews/index.mjs +3 -1
- package/build-module/components/sidebar-dataviews/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-item/index.mjs +18 -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 +50 -57
- package/build-module/components/sidebar-navigation-screen-main/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.mjs +0 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +6 -3
- 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 +250 -273
- package/build-style/style.css +250 -273
- package/package.json +48 -48
- package/src/components/add-new-post/index.js +0 -1
- package/src/components/add-new-template/add-custom-generic-template-modal-content.js +0 -1
- package/src/components/add-new-template-legacy/add-custom-generic-template-modal-content.js +0 -1
- package/src/components/layout/index.js +21 -11
- package/src/components/layout/style.scss +19 -12
- package/src/components/page-patterns/fields.js +1 -48
- package/src/components/page-patterns/index.js +17 -29
- package/src/components/page-patterns/style.scss +1 -1
- package/src/components/page-templates/index-legacy.js +9 -28
- 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-dataviews/index.js +3 -0
- package/src/components/sidebar-global-styles/style.scss +1 -1
- package/src/components/sidebar-navigation-item/index.js +22 -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 +49 -54
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +0 -1
- 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/index.js +4 -0
- 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
|
@@ -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,9 +19,20 @@ 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( {
|
|
25
|
+
isHidden = false,
|
|
26
|
+
...props
|
|
27
|
+
} ) {
|
|
28
|
+
if ( isHidden ) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return <SidebarNavigationItemContent { ...props } />;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function SidebarNavigationItemContent( {
|
|
28
36
|
className,
|
|
29
37
|
icon,
|
|
30
38
|
withChevron = false,
|
|
@@ -32,11 +40,16 @@ export default function SidebarNavigationItem( {
|
|
|
32
40
|
uid,
|
|
33
41
|
to,
|
|
34
42
|
onClick,
|
|
43
|
+
activeOnRouteName,
|
|
35
44
|
children,
|
|
36
45
|
...props
|
|
37
46
|
} ) {
|
|
38
47
|
const history = useHistory();
|
|
48
|
+
const linkProps = useLink( to );
|
|
49
|
+
const { name } = useLocation();
|
|
39
50
|
const { navigate } = useContext( SidebarNavigationContext );
|
|
51
|
+
|
|
52
|
+
const isActive = activeOnRouteName && name === activeOnRouteName;
|
|
40
53
|
// If there is no custom click handler, create one that navigates to `params`.
|
|
41
54
|
function handleClick( e ) {
|
|
42
55
|
if ( onClick ) {
|
|
@@ -48,7 +61,6 @@ export default function SidebarNavigationItem( {
|
|
|
48
61
|
navigate( 'forward', `[id="${ uid }"]` );
|
|
49
62
|
}
|
|
50
63
|
}
|
|
51
|
-
const linkProps = useLink( to );
|
|
52
64
|
|
|
53
65
|
return (
|
|
54
66
|
<Item
|
|
@@ -60,9 +72,10 @@ export default function SidebarNavigationItem( {
|
|
|
60
72
|
id={ uid }
|
|
61
73
|
onClick={ handleClick }
|
|
62
74
|
href={ to ? linkProps.href : undefined }
|
|
75
|
+
aria-current={ isActive ? true : undefined }
|
|
63
76
|
{ ...props }
|
|
64
77
|
>
|
|
65
|
-
<
|
|
78
|
+
<Stack direction="row" align="center" justify="start" gap="sm">
|
|
66
79
|
{ icon && (
|
|
67
80
|
<Icon
|
|
68
81
|
style={ { fill: 'currentcolor' } }
|
|
@@ -79,7 +92,7 @@ export default function SidebarNavigationItem( {
|
|
|
79
92
|
/>
|
|
80
93
|
) }
|
|
81
94
|
{ ! withChevron && suffix }
|
|
82
|
-
</
|
|
95
|
+
</Stack>
|
|
83
96
|
</Item>
|
|
84
97
|
);
|
|
85
98
|
}
|
|
@@ -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
|
|
@@ -19,64 +19,50 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
19
19
|
*/
|
|
20
20
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
21
21
|
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
22
|
-
import { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';
|
|
23
|
-
import { SidebarNavigationItemIdentity } from '../sidebar-navigation-screen-identity';
|
|
24
22
|
|
|
25
23
|
export function MainSidebarNavigationContent( { isBlockBasedTheme = true } ) {
|
|
26
24
|
return (
|
|
27
25
|
<ItemGroup className="edit-site-sidebar-navigation-screen-main">
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
</>
|
|
69
|
-
) }
|
|
70
|
-
{ ! isBlockBasedTheme && (
|
|
71
|
-
<SidebarNavigationItem
|
|
72
|
-
uid="stylebook-navigation-item"
|
|
73
|
-
to="/stylebook"
|
|
74
|
-
withChevron
|
|
75
|
-
icon={ styles }
|
|
76
|
-
>
|
|
77
|
-
{ __( 'Styles' ) }
|
|
78
|
-
</SidebarNavigationItem>
|
|
79
|
-
) }
|
|
26
|
+
<SidebarNavigationItem
|
|
27
|
+
to="/identity"
|
|
28
|
+
uid="identity-navigation-item"
|
|
29
|
+
icon={ siteLogo }
|
|
30
|
+
activeOnRouteName="identity"
|
|
31
|
+
isHidden={ ! isBlockBasedTheme }
|
|
32
|
+
>
|
|
33
|
+
{ _x( 'Identity', 'site identity' ) }
|
|
34
|
+
</SidebarNavigationItem>
|
|
35
|
+
<SidebarNavigationItem
|
|
36
|
+
to={ isBlockBasedTheme ? '/styles' : '/stylebook' }
|
|
37
|
+
uid={
|
|
38
|
+
isBlockBasedTheme
|
|
39
|
+
? 'global-styles-navigation-item'
|
|
40
|
+
: 'stylebook-navigation-item'
|
|
41
|
+
}
|
|
42
|
+
icon={ styles }
|
|
43
|
+
activeOnRouteName={ isBlockBasedTheme ? 'styles' : undefined }
|
|
44
|
+
withChevron={ ! isBlockBasedTheme }
|
|
45
|
+
>
|
|
46
|
+
{ __( 'Styles' ) }
|
|
47
|
+
</SidebarNavigationItem>
|
|
48
|
+
<SidebarNavigationItem
|
|
49
|
+
uid="page-navigation-item"
|
|
50
|
+
to="/page"
|
|
51
|
+
withChevron
|
|
52
|
+
icon={ page }
|
|
53
|
+
isHidden={ ! isBlockBasedTheme }
|
|
54
|
+
>
|
|
55
|
+
{ __( 'Pages' ) }
|
|
56
|
+
</SidebarNavigationItem>
|
|
57
|
+
<SidebarNavigationItem
|
|
58
|
+
uid="navigation-navigation-item"
|
|
59
|
+
to="/navigation"
|
|
60
|
+
withChevron
|
|
61
|
+
icon={ navigation }
|
|
62
|
+
isHidden={ ! isBlockBasedTheme }
|
|
63
|
+
>
|
|
64
|
+
{ __( 'Navigation' ) }
|
|
65
|
+
</SidebarNavigationItem>
|
|
80
66
|
<SidebarNavigationItem
|
|
81
67
|
uid="patterns-navigation-item"
|
|
82
68
|
to="/pattern"
|
|
@@ -85,6 +71,15 @@ export function MainSidebarNavigationContent( { isBlockBasedTheme = true } ) {
|
|
|
85
71
|
>
|
|
86
72
|
{ __( 'Patterns' ) }
|
|
87
73
|
</SidebarNavigationItem>
|
|
74
|
+
<SidebarNavigationItem
|
|
75
|
+
uid="template-navigation-item"
|
|
76
|
+
to="/template"
|
|
77
|
+
withChevron
|
|
78
|
+
icon={ layout }
|
|
79
|
+
isHidden={ ! isBlockBasedTheme }
|
|
80
|
+
>
|
|
81
|
+
{ __( 'Templates' ) }
|
|
82
|
+
</SidebarNavigationItem>
|
|
88
83
|
</ItemGroup>
|
|
89
84
|
);
|
|
90
85
|
}
|
|
@@ -31,7 +31,6 @@ export default function RenameModal( { menuTitle, onClose, onSave } ) {
|
|
|
31
31
|
<form className="sidebar-navigation__rename-modal-form">
|
|
32
32
|
<VStack spacing="3">
|
|
33
33
|
<TextControl
|
|
34
|
-
__next40pxDefaultSize
|
|
35
34
|
value={ editedMenuTitle }
|
|
36
35
|
placeholder={ __( 'Navigation title' ) }
|
|
37
36
|
onChange={ setEditedMenuTitle }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.sidebar-navigation__more-menu {
|
|
2
2
|
.components-button {
|
|
3
|
-
color: var(--wpds-color-
|
|
3
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
4
4
|
&:hover,
|
|
5
5
|
&:focus,
|
|
6
6
|
&[aria-current] {
|
|
7
|
-
color: var(--wpds-color-
|
|
7
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.block-editor-list-view-block-select-button {
|
|
26
|
-
color: var(--wpds-color-
|
|
26
|
+
color: var(--wpds-color-foreground-interactive-neutral-weak);
|
|
27
27
|
&:hover,
|
|
28
28
|
&:focus,
|
|
29
29
|
&[aria-current] {
|
|
30
|
-
color: var(--wpds-color-
|
|
30
|
+
color: var(--wpds-color-foreground-interactive-neutral-active);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.block-editor-list-view-block__menu {
|
|
35
|
-
color: var(--wpds-color-
|
|
35
|
+
color: var(--wpds-color-foreground-interactive-neutral-weak);
|
|
36
36
|
&:hover,
|
|
37
37
|
&:focus {
|
|
38
|
-
color: var(--wpds-color-
|
|
38
|
+
color: var(--wpds-color-foreground-interactive-neutral-active);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.block-editor-inserter__toggle {
|
|
43
|
-
background: var(--wpds-color-
|
|
44
|
-
color: var(--wpds-color-
|
|
43
|
+
background: var(--wpds-color-background-interactive-brand-strong);
|
|
44
|
+
color: var(--wpds-color-foreground-interactive-brand-strong);
|
|
45
45
|
|
|
46
46
|
&:hover,
|
|
47
47
|
&:focus {
|
|
48
|
-
background: var(--wpds-color-
|
|
49
|
-
color: var(--wpds-color-
|
|
48
|
+
background: var(--wpds-color-background-interactive-brand-strong-active);
|
|
49
|
+
color: var(--wpds-color-foreground-interactive-brand-strong-active);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -27,6 +27,8 @@ import usePatternCategories from './use-pattern-categories';
|
|
|
27
27
|
import useTemplatePartAreas from './use-template-part-areas';
|
|
28
28
|
import { unlock } from '../../lock-unlock';
|
|
29
29
|
|
|
30
|
+
const VIEW_CONFIG_FIELDS = [ 'view_list' ];
|
|
31
|
+
|
|
30
32
|
const { useLocation } = unlock( routerPrivateApis );
|
|
31
33
|
|
|
32
34
|
function CategoriesGroup( {
|
|
@@ -89,10 +91,12 @@ export default function SidebarNavigationScreenPatterns( { backPath } ) {
|
|
|
89
91
|
const { view_list: templatePartViews } = useViewConfig( {
|
|
90
92
|
kind: 'postType',
|
|
91
93
|
name: TEMPLATE_PART_POST_TYPE,
|
|
94
|
+
fields: VIEW_CONFIG_FIELDS,
|
|
92
95
|
} );
|
|
93
96
|
const { view_list: patternViews } = useViewConfig( {
|
|
94
97
|
kind: 'postType',
|
|
95
98
|
name: PATTERN_TYPES.user,
|
|
99
|
+
fields: VIEW_CONFIG_FIELDS,
|
|
96
100
|
} );
|
|
97
101
|
|
|
98
102
|
const { templatePartAreas, isLoading, hasTemplateParts } =
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.edit-site-site-hub__title .components-button {
|
|
27
|
-
color: var(--wpds-color-
|
|
27
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
28
28
|
display: block;
|
|
29
29
|
flex-grow: 1;
|
|
30
30
|
font-size: 15px;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
&:hover,
|
|
44
44
|
&:focus,
|
|
45
45
|
&:active {
|
|
46
|
-
color: var(--wpds-color-
|
|
46
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&:focus {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
&:focus-visible {
|
|
56
56
|
// Push the shadow away from the title.
|
|
57
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-
|
|
57
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-background-surface-neutral-weak), 0 0 0 calc(2 * var(--wp-admin-border-width-focus)) var(--wp-admin-theme-color);
|
|
58
58
|
|
|
59
59
|
// Windows High Contrast mode will show this outline, but not the box-shadow.
|
|
60
60
|
outline: 2px solid transparent;
|
|
@@ -81,12 +81,12 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.edit-site-site-hub_toggle-command-center {
|
|
84
|
-
color: var(--wpds-color-
|
|
84
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
85
85
|
|
|
86
86
|
&:hover,
|
|
87
87
|
&:active {
|
|
88
88
|
svg {
|
|
89
|
-
fill: var(--wpds-color-
|
|
89
|
+
fill: var(--wpds-color-foreground-interactive-neutral-active);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -58,7 +58,7 @@ export default function WelcomeGuidePage() {
|
|
|
58
58
|
<p className="edit-site-welcome-guide__text">
|
|
59
59
|
{ __(
|
|
60
60
|
// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
|
|
61
|
-
'It’s now possible to edit page content in the site editor. To
|
|
61
|
+
'It’s now possible to edit page content in the site editor. To customize other parts of the page like the header and footer switch to editing the template using the settings sidebar.'
|
|
62
62
|
) }
|
|
63
63
|
</p>
|
|
64
64
|
</>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// Styles for the experimental admin bar in editor.
|
|
2
2
|
|
|
3
|
+
@use "@wordpress/base-styles/variables" as *;
|
|
4
|
+
|
|
3
5
|
body.has-admin-bar-in-editor {
|
|
4
6
|
margin-top: 0;
|
|
5
7
|
height: 100%;
|
|
@@ -22,7 +24,7 @@ body.has-admin-bar-in-editor {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
.edit-site-sidebar-navigation-screen__title-icon {
|
|
25
|
-
padding-top:
|
|
27
|
+
padding-top: $grid-unit-40;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
.edit-site-layout__content,
|
package/src/style.scss
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@use "./components/resizable-frame/style.scss" as *;
|
|
32
32
|
@use "./components/pagination/style.scss" as *;
|
|
33
33
|
@use "./components/sidebar-global-styles/style.scss" as *;
|
|
34
|
-
@use "./experimental-
|
|
34
|
+
@use "./experimental-omnibar.scss" as *;
|
|
35
35
|
|
|
36
36
|
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
37
37
|
::view-transition-image-pair(root) {
|
|
@@ -61,7 +61,7 @@ body.js.site-editor-php {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
body.js.site-editor-php {
|
|
64
|
-
background: var(--wpds-color-
|
|
64
|
+
background: var(--wpds-color-background-surface-neutral-weak);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.edit-site {
|