@wordpress/edit-site 3.0.24 → 4.0.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 +12 -0
- package/LICENSE.md +1 -1
- package/README.md +7 -1
- package/build/components/block-editor/resizable-editor.js +1 -0
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/code-editor/code-editor-text-area.js +95 -0
- package/build/components/code-editor/code-editor-text-area.js.map +1 -0
- package/build/components/code-editor/index.js +79 -0
- package/build/components/code-editor/index.js.map +1 -0
- package/build/components/editor/index.js +39 -9
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/border-panel.js +81 -22
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/context-menu.js +4 -6
- package/build/components/global-styles/context-menu.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +1 -0
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/header.js +2 -7
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +35 -12
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +3 -3
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +46 -15
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/screen-background-color.js +9 -12
- package/build/components/global-styles/screen-background-color.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +2 -3
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +0 -1
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +0 -2
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +5 -6
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +0 -2
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-link-color.js +6 -12
- package/build/components/global-styles/screen-link-color.js.map +1 -1
- package/build/components/global-styles/screen-root.js +22 -3
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +138 -0
- package/build/components/global-styles/screen-style-variations.js.map +1 -0
- package/build/components/global-styles/screen-text-color.js +6 -12
- package/build/components/global-styles/screen-text-color.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +0 -2
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +2 -3
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/ui.js +31 -14
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/header/index.js +12 -4
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/mode-switcher/index.js +78 -0
- package/build/components/header/mode-switcher/index.js.map +1 -0
- package/build/components/header/more-menu/copy-content-menu-item.js +74 -0
- package/build/components/header/more-menu/copy-content-menu-item.js.map +1 -0
- package/build/components/header/more-menu/index.js +72 -39
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/{plugins → components/header/more-menu}/site-export.js +0 -0
- package/build/components/header/more-menu/site-export.js.map +1 -0
- package/build/{plugins → components/header/more-menu}/welcome-guide-menu-item.js +1 -1
- package/build/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build/components/header/tools-more-menu-group/index.js +1 -5
- package/build/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +45 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -0
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +56 -0
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
- package/build/components/keyboard-shortcut-help-modal/index.js +137 -0
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -0
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +65 -0
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
- package/build/components/keyboard-shortcuts/index.js +26 -1
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/list/actions/index.js +5 -4
- package/build/components/list/actions/index.js.map +1 -1
- package/build/components/list/actions/rename-menu-item.js +3 -3
- package/build/components/list/actions/rename-menu-item.js.map +1 -1
- package/build/components/list/added-by.js +51 -50
- package/build/components/list/added-by.js.map +1 -1
- package/build/components/routes/redirect-to-homepage.js +87 -0
- package/build/components/routes/redirect-to-homepage.js.map +1 -0
- package/build/components/secondary-sidebar/inserter-sidebar.js +13 -3
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +7 -5
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/default-sidebar.js +4 -2
- package/build/components/sidebar/default-sidebar.js.map +1 -1
- package/build/components/sidebar/global-styles-sidebar.js +1 -0
- package/build/components/sidebar/global-styles-sidebar.js.map +1 -1
- package/build/components/url-query-controller/index.js +1 -38
- package/build/components/url-query-controller/index.js.map +1 -1
- package/build/index.js +10 -5
- package/build/index.js.map +1 -1
- package/build/store/actions.js +29 -27
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +2 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/reducer.js +11 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +13 -0
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js +1 -0
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/code-editor/code-editor-text-area.js +83 -0
- package/build-module/components/code-editor/code-editor-text-area.js.map +1 -0
- package/build-module/components/code-editor/index.js +62 -0
- package/build-module/components/code-editor/index.js.map +1 -0
- package/build-module/components/editor/index.js +38 -10
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +82 -23
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/context-menu.js +1 -1
- package/build-module/components/global-styles/context-menu.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +1 -1
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/header.js +2 -5
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +35 -10
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +2 -2
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview.js +45 -15
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/screen-background-color.js +9 -13
- package/build-module/components/global-styles/screen-background-color.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +1 -2
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +0 -1
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +0 -2
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +2 -3
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +0 -2
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-link-color.js +7 -13
- package/build-module/components/global-styles/screen-link-color.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +21 -4
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +119 -0
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -0
- package/build-module/components/global-styles/screen-text-color.js +7 -13
- package/build-module/components/global-styles/screen-text-color.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +0 -2
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +1 -2
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/ui.js +29 -14
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/header/index.js +13 -5
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/mode-switcher/index.js +65 -0
- package/build-module/components/header/mode-switcher/index.js.map +1 -0
- package/build-module/components/header/more-menu/copy-content-menu-item.js +59 -0
- package/build-module/components/header/more-menu/copy-content-menu-item.js.map +1 -0
- package/build-module/components/header/more-menu/index.js +67 -40
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/{plugins → components/header/more-menu}/site-export.js +0 -0
- package/build-module/components/header/more-menu/site-export.js.map +1 -0
- package/build-module/{plugins → components/header/more-menu}/welcome-guide-menu-item.js +1 -1
- package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build-module/components/header/tools-more-menu-group/index.js +2 -5
- package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +36 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -0
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +44 -0
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -0
- package/build-module/components/keyboard-shortcut-help-modal/index.js +120 -0
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -0
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -0
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -0
- package/build-module/components/keyboard-shortcuts/index.js +26 -1
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/list/actions/index.js +5 -4
- package/build-module/components/list/actions/index.js.map +1 -1
- package/build-module/components/list/actions/rename-menu-item.js +3 -3
- package/build-module/components/list/actions/rename-menu-item.js.map +1 -1
- package/build-module/components/list/added-by.js +52 -51
- package/build-module/components/list/added-by.js.map +1 -1
- package/build-module/components/routes/redirect-to-homepage.js +75 -0
- package/build-module/components/routes/redirect-to-homepage.js.map +1 -0
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +14 -4
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +7 -5
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/default-sidebar.js +4 -2
- package/build-module/components/sidebar/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar/global-styles-sidebar.js +1 -0
- package/build-module/components/sidebar/global-styles-sidebar.js.map +1 -1
- package/build-module/components/url-query-controller/index.js +3 -40
- package/build-module/components/url-query-controller/index.js.map +1 -1
- package/build-module/index.js +9 -4
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +25 -25
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +2 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/reducer.js +11 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +11 -0
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +202 -72
- package/build-style/style.css +202 -72
- package/package.json +28 -30
- package/src/components/block-editor/resizable-editor.js +1 -0
- package/src/components/block-editor/style.scss +15 -23
- package/src/components/code-editor/code-editor-text-area.js +79 -0
- package/src/components/code-editor/index.js +65 -0
- package/src/components/code-editor/style.scss +100 -0
- package/src/components/editor/index.js +55 -10
- package/src/components/global-styles/border-panel.js +106 -42
- package/src/components/global-styles/context-menu.js +1 -1
- package/src/components/global-styles/global-styles-provider.js +1 -2
- package/src/components/global-styles/header.js +3 -5
- package/src/components/global-styles/navigation-button.js +31 -10
- package/src/components/global-styles/palette.js +6 -2
- package/src/components/global-styles/preview.js +46 -18
- package/src/components/global-styles/screen-background-color.js +7 -12
- package/src/components/global-styles/screen-block-list.js +1 -2
- package/src/components/global-styles/screen-block.js +1 -1
- package/src/components/global-styles/screen-color-palette.js +0 -2
- package/src/components/global-styles/screen-colors.js +2 -3
- package/src/components/global-styles/screen-layout.js +1 -5
- package/src/components/global-styles/screen-link-color.js +6 -16
- package/src/components/global-styles/screen-root.js +32 -3
- package/src/components/global-styles/screen-style-variations.js +130 -0
- package/src/components/global-styles/screen-text-color.js +6 -16
- package/src/components/global-styles/screen-typography-element.js +0 -4
- package/src/components/global-styles/screen-typography.js +2 -3
- package/src/components/global-styles/style.scss +24 -25
- package/src/components/global-styles/ui.js +55 -25
- package/src/components/header/document-actions/style.scss +1 -9
- package/src/components/header/index.js +10 -2
- package/src/components/header/mode-switcher/index.js +67 -0
- package/src/components/header/more-menu/copy-content-menu-item.js +53 -0
- package/src/components/header/more-menu/index.js +107 -44
- package/src/{plugins → components/header/more-menu}/site-export.js +0 -0
- package/src/{plugins → components/header/more-menu}/welcome-guide-menu-item.js +1 -1
- package/src/components/header/style.scss +2 -1
- package/src/components/header/tools-more-menu-group/index.js +2 -7
- package/src/components/keyboard-shortcut-help-modal/config.js +27 -0
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +41 -0
- package/src/components/keyboard-shortcut-help-modal/index.js +135 -0
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +73 -0
- package/src/components/keyboard-shortcut-help-modal/style.scss +66 -0
- package/src/components/keyboard-shortcuts/index.js +27 -1
- package/src/components/list/actions/index.js +5 -4
- package/src/components/list/actions/rename-menu-item.js +3 -3
- package/src/components/list/added-by.js +57 -63
- package/src/components/routes/redirect-to-homepage.js +71 -0
- package/src/components/secondary-sidebar/inserter-sidebar.js +14 -3
- package/src/components/secondary-sidebar/list-view-sidebar.js +12 -5
- package/src/components/secondary-sidebar/style.scss +0 -4
- package/src/components/sidebar/default-sidebar.js +2 -0
- package/src/components/sidebar/global-styles-sidebar.js +1 -0
- package/src/components/sidebar/style.scss +21 -14
- package/src/components/url-query-controller/index.js +3 -35
- package/src/index.js +10 -3
- package/src/store/actions.js +24 -37
- package/src/store/defaults.js +1 -0
- package/src/store/reducer.js +6 -0
- package/src/store/selectors.js +11 -0
- package/src/store/test/actions.js +2 -92
- package/src/style.scss +2 -0
- package/build/plugins/index.js +0 -28
- package/build/plugins/index.js.map +0 -1
- package/build/plugins/site-export.js.map +0 -1
- package/build/plugins/welcome-guide-menu-item.js.map +0 -1
- package/build-module/plugins/index.js +0 -20
- package/build-module/plugins/index.js.map +0 -1
- package/build-module/plugins/site-export.js.map +0 -1
- package/build-module/plugins/welcome-guide-menu-item.js.map +0 -1
- package/src/plugins/index.js +0 -24
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
} from './hooks';
|
|
18
18
|
|
|
19
19
|
function ScreenBackgroundColor( { name } ) {
|
|
20
|
-
const parentMenu = name === undefined ? '' : '/blocks/' + name;
|
|
21
20
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
22
21
|
const [ solids ] = useSetting( 'color.palette', name );
|
|
23
22
|
const [ gradients ] = useSetting( 'color.gradients', name );
|
|
@@ -55,7 +54,6 @@ function ScreenBackgroundColor( { name } ) {
|
|
|
55
54
|
return null;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
|
-
const settings = [];
|
|
59
57
|
let backgroundSettings = {};
|
|
60
58
|
if ( hasBackgroundColor ) {
|
|
61
59
|
backgroundSettings = {
|
|
@@ -79,25 +77,21 @@ function ScreenBackgroundColor( { name } ) {
|
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
const controlProps = {
|
|
83
81
|
...backgroundSettings,
|
|
84
82
|
...gradientSettings,
|
|
85
|
-
|
|
86
|
-
} );
|
|
83
|
+
};
|
|
87
84
|
|
|
88
85
|
return (
|
|
89
86
|
<>
|
|
90
87
|
<ScreenHeader
|
|
91
|
-
back={ parentMenu + '/colors' }
|
|
92
88
|
title={ __( 'Background' ) }
|
|
93
89
|
description={ __(
|
|
94
|
-
'Set a background color or gradient for the whole
|
|
90
|
+
'Set a background color or gradient for the whole site.'
|
|
95
91
|
) }
|
|
96
92
|
/>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
title={ __( 'Color' ) }
|
|
100
|
-
settings={ settings }
|
|
93
|
+
<ColorGradientControl
|
|
94
|
+
className="edit-site-screen-background-color__control"
|
|
101
95
|
colors={ colorsPerOrigin }
|
|
102
96
|
gradients={ gradientsPerOrigin }
|
|
103
97
|
disableCustomColors={ ! areCustomSolidsEnabled }
|
|
@@ -106,6 +100,7 @@ function ScreenBackgroundColor( { name } ) {
|
|
|
106
100
|
showTitle={ false }
|
|
107
101
|
enableAlpha
|
|
108
102
|
__experimentalIsRenderedInSidebar
|
|
103
|
+
{ ...controlProps }
|
|
109
104
|
/>
|
|
110
105
|
</>
|
|
111
106
|
);
|
|
@@ -17,7 +17,7 @@ import { useHasColorPanel } from './color-utils';
|
|
|
17
17
|
import { useHasDimensionsPanel } from './dimensions-panel';
|
|
18
18
|
import { useHasTypographyPanel } from './typography-panel';
|
|
19
19
|
import ScreenHeader from './header';
|
|
20
|
-
import NavigationButton from './navigation-button';
|
|
20
|
+
import { NavigationButton } from './navigation-button';
|
|
21
21
|
|
|
22
22
|
function BlockMenuItem( { block } ) {
|
|
23
23
|
const hasTypographyPanel = useHasTypographyPanel( block.name );
|
|
@@ -48,7 +48,6 @@ function ScreenBlockList() {
|
|
|
48
48
|
return (
|
|
49
49
|
<>
|
|
50
50
|
<ScreenHeader
|
|
51
|
-
back="/"
|
|
52
51
|
title={ __( 'Blocks' ) }
|
|
53
52
|
description={ __(
|
|
54
53
|
'Customize the appearance of specific blocks and for the whole site.'
|
|
@@ -17,12 +17,10 @@ import ScreenHeader from './header';
|
|
|
17
17
|
|
|
18
18
|
function ScreenColorPalette( { name } ) {
|
|
19
19
|
const [ currentTab, setCurrentTab ] = useState( 'solid' );
|
|
20
|
-
const parentMenu = name === undefined ? '' : '/blocks/' + name;
|
|
21
20
|
|
|
22
21
|
return (
|
|
23
22
|
<>
|
|
24
23
|
<ScreenHeader
|
|
25
|
-
back={ parentMenu + '/colors' }
|
|
26
24
|
title={ __( 'Palette' ) }
|
|
27
25
|
description={ __(
|
|
28
26
|
'Palettes are used to provide default color options for blocks and various design tools. Here you can edit the colors with their labels.'
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
*/
|
|
16
16
|
import ScreenHeader from './header';
|
|
17
17
|
import Palette from './palette';
|
|
18
|
-
import NavigationButton from './navigation-button';
|
|
18
|
+
import { NavigationButton } from './navigation-button';
|
|
19
19
|
import { getSupportedGlobalStylesPanels, useStyle } from './hooks';
|
|
20
20
|
import Subtitle from './subtitle';
|
|
21
21
|
|
|
@@ -93,10 +93,9 @@ function ScreenColors( { name } ) {
|
|
|
93
93
|
return (
|
|
94
94
|
<>
|
|
95
95
|
<ScreenHeader
|
|
96
|
-
back={ parentMenu ? parentMenu : '/' }
|
|
97
96
|
title={ __( 'Colors' ) }
|
|
98
97
|
description={ __(
|
|
99
|
-
'Manage palettes and the default color of different global elements on the
|
|
98
|
+
'Manage palettes and the default color of different global elements on the site.'
|
|
100
99
|
) }
|
|
101
100
|
/>
|
|
102
101
|
|
|
@@ -11,16 +11,12 @@ import DimensionsPanel, { useHasDimensionsPanel } from './dimensions-panel';
|
|
|
11
11
|
import ScreenHeader from './header';
|
|
12
12
|
|
|
13
13
|
function ScreenLayout( { name } ) {
|
|
14
|
-
const parentMenu = name === undefined ? '' : '/blocks/' + name;
|
|
15
14
|
const hasBorderPanel = useHasBorderPanel( name );
|
|
16
15
|
const hasDimensionsPanel = useHasDimensionsPanel( name );
|
|
17
16
|
|
|
18
17
|
return (
|
|
19
18
|
<>
|
|
20
|
-
<ScreenHeader
|
|
21
|
-
back={ parentMenu ? parentMenu : '/' }
|
|
22
|
-
title={ __( 'Layout' ) }
|
|
23
|
-
/>
|
|
19
|
+
<ScreenHeader title={ __( 'Layout' ) } />
|
|
24
20
|
{ hasDimensionsPanel && <DimensionsPanel name={ name } /> }
|
|
25
21
|
{ hasBorderPanel && <BorderPanel name={ name } /> }
|
|
26
22
|
</>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
} from './hooks';
|
|
17
17
|
|
|
18
18
|
function ScreenLinkColor( { name } ) {
|
|
19
|
-
const parentMenu = name === undefined ? '' : '/blocks/' + name;
|
|
20
19
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
21
20
|
const [ solids ] = useSetting( 'color.palette', name );
|
|
22
21
|
const [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );
|
|
@@ -44,34 +43,25 @@ function ScreenLinkColor( { name } ) {
|
|
|
44
43
|
return null;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
const settings = [
|
|
48
|
-
{
|
|
49
|
-
colorValue: linkColor,
|
|
50
|
-
onColorChange: setLinkColor,
|
|
51
|
-
label: __( 'Link color' ),
|
|
52
|
-
clearable: linkColor === userLinkColor,
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
|
|
56
46
|
return (
|
|
57
47
|
<>
|
|
58
48
|
<ScreenHeader
|
|
59
|
-
back={ parentMenu + '/colors' }
|
|
60
49
|
title={ __( 'Links' ) }
|
|
61
50
|
description={ __(
|
|
62
51
|
'Set the default color used for links across the site.'
|
|
63
52
|
) }
|
|
64
53
|
/>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
title={ __( 'Color' ) }
|
|
68
|
-
settings={ settings }
|
|
54
|
+
<ColorGradientControl
|
|
55
|
+
className="edit-site-screen-link-color__control"
|
|
69
56
|
colors={ colorsPerOrigin }
|
|
70
57
|
disableCustomColors={ ! areCustomSolidsEnabled }
|
|
71
58
|
__experimentalHasMultipleOrigins
|
|
72
59
|
showTitle={ false }
|
|
73
60
|
enableAlpha
|
|
74
61
|
__experimentalIsRenderedInSidebar
|
|
62
|
+
colorValue={ linkColor }
|
|
63
|
+
onColorChange={ setLinkColor }
|
|
64
|
+
clearable={ linkColor === userLinkColor }
|
|
75
65
|
/>
|
|
76
66
|
</>
|
|
77
67
|
);
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
__experimentalItemGroup as ItemGroup,
|
|
6
6
|
__experimentalItem as Item,
|
|
7
7
|
__experimentalHStack as HStack,
|
|
8
|
+
__experimentalVStack as VStack,
|
|
8
9
|
FlexItem,
|
|
9
10
|
CardBody,
|
|
10
11
|
Card,
|
|
@@ -12,19 +13,47 @@ import {
|
|
|
12
13
|
} from '@wordpress/components';
|
|
13
14
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
14
15
|
import { chevronLeft, chevronRight, Icon } from '@wordpress/icons';
|
|
16
|
+
import { useSelect } from '@wordpress/data';
|
|
17
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
20
|
* Internal dependencies
|
|
18
21
|
*/
|
|
19
|
-
import
|
|
20
|
-
import NavigationButton from './navigation-button';
|
|
22
|
+
import { NavigationButton } from './navigation-button';
|
|
21
23
|
import ContextMenu from './context-menu';
|
|
24
|
+
import StylesPreview from './preview';
|
|
22
25
|
|
|
23
26
|
function ScreenRoot() {
|
|
27
|
+
const { variations } = useSelect( ( select ) => {
|
|
28
|
+
return {
|
|
29
|
+
variations: select(
|
|
30
|
+
coreStore
|
|
31
|
+
).__experimentalGetCurrentThemeGlobalStylesVariations(),
|
|
32
|
+
};
|
|
33
|
+
}, [] );
|
|
34
|
+
|
|
24
35
|
return (
|
|
25
36
|
<Card size="small">
|
|
26
37
|
<CardBody>
|
|
27
|
-
<
|
|
38
|
+
<VStack spacing={ 2 }>
|
|
39
|
+
<Card>
|
|
40
|
+
<StylesPreview />
|
|
41
|
+
</Card>
|
|
42
|
+
{ !! variations?.length && (
|
|
43
|
+
<NavigationButton path="/variations">
|
|
44
|
+
<HStack justify="space-between">
|
|
45
|
+
<FlexItem>{ __( 'Other styles' ) }</FlexItem>
|
|
46
|
+
<FlexItem>
|
|
47
|
+
<Icon
|
|
48
|
+
icon={
|
|
49
|
+
isRTL() ? chevronLeft : chevronRight
|
|
50
|
+
}
|
|
51
|
+
/>
|
|
52
|
+
</FlexItem>
|
|
53
|
+
</HStack>
|
|
54
|
+
</NavigationButton>
|
|
55
|
+
) }
|
|
56
|
+
</VStack>
|
|
28
57
|
</CardBody>
|
|
29
58
|
|
|
30
59
|
<CardBody>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { isEqual } from 'lodash';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* WordPress dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
11
|
+
import { useSelect } from '@wordpress/data';
|
|
12
|
+
import { useMemo, useContext } from '@wordpress/element';
|
|
13
|
+
import { ENTER } from '@wordpress/keycodes';
|
|
14
|
+
import {
|
|
15
|
+
__experimentalGrid as Grid,
|
|
16
|
+
Card,
|
|
17
|
+
CardBody,
|
|
18
|
+
} from '@wordpress/components';
|
|
19
|
+
import { __ } from '@wordpress/i18n';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Internal dependencies
|
|
23
|
+
*/
|
|
24
|
+
import { mergeBaseAndUserConfigs } from './global-styles-provider';
|
|
25
|
+
import { GlobalStylesContext } from './context';
|
|
26
|
+
import StylesPreview from './preview';
|
|
27
|
+
import ScreenHeader from './header';
|
|
28
|
+
|
|
29
|
+
function compareVariations( a, b ) {
|
|
30
|
+
return isEqual( a.styles, b.styles ) && isEqual( a.settings, b.settings );
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function Variation( { variation } ) {
|
|
34
|
+
const { base, user, setUserConfig } = useContext( GlobalStylesContext );
|
|
35
|
+
const context = useMemo( () => {
|
|
36
|
+
return {
|
|
37
|
+
user: {
|
|
38
|
+
settings: variation.settings ?? {},
|
|
39
|
+
styles: variation.styles ?? {},
|
|
40
|
+
},
|
|
41
|
+
base,
|
|
42
|
+
merged: mergeBaseAndUserConfigs( base, variation ),
|
|
43
|
+
setUserConfig: () => {},
|
|
44
|
+
};
|
|
45
|
+
}, [ variation, base ] );
|
|
46
|
+
|
|
47
|
+
const selectVariation = () => {
|
|
48
|
+
setUserConfig( () => {
|
|
49
|
+
return {
|
|
50
|
+
settings: variation.settings,
|
|
51
|
+
styles: variation.styles,
|
|
52
|
+
};
|
|
53
|
+
} );
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const selectOnEnter = ( event ) => {
|
|
57
|
+
if ( event.keyCode === ENTER ) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
selectVariation();
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const isActive = useMemo( () => {
|
|
64
|
+
return compareVariations( user, variation );
|
|
65
|
+
}, [ user, variation ] );
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<GlobalStylesContext.Provider value={ context }>
|
|
69
|
+
<div
|
|
70
|
+
className={ classnames(
|
|
71
|
+
'edit-site-global-styles-variations_item',
|
|
72
|
+
{
|
|
73
|
+
'is-active': isActive,
|
|
74
|
+
}
|
|
75
|
+
) }
|
|
76
|
+
role="button"
|
|
77
|
+
onClick={ selectVariation }
|
|
78
|
+
onKeyDown={ selectOnEnter }
|
|
79
|
+
tabIndex="0"
|
|
80
|
+
>
|
|
81
|
+
<StylesPreview height={ 100 } />
|
|
82
|
+
</div>
|
|
83
|
+
</GlobalStylesContext.Provider>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function ScreenStyleVariations() {
|
|
88
|
+
const { variations } = useSelect( ( select ) => {
|
|
89
|
+
return {
|
|
90
|
+
variations: select(
|
|
91
|
+
coreStore
|
|
92
|
+
).__experimentalGetCurrentThemeGlobalStylesVariations(),
|
|
93
|
+
};
|
|
94
|
+
}, [] );
|
|
95
|
+
|
|
96
|
+
const withEmptyVariation = useMemo( () => {
|
|
97
|
+
return [
|
|
98
|
+
{
|
|
99
|
+
name: __( 'Default' ),
|
|
100
|
+
settings: {},
|
|
101
|
+
styles: {},
|
|
102
|
+
},
|
|
103
|
+
...variations,
|
|
104
|
+
];
|
|
105
|
+
}, [ variations ] );
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<>
|
|
109
|
+
<ScreenHeader
|
|
110
|
+
back="/"
|
|
111
|
+
title={ __( 'Other styles' ) }
|
|
112
|
+
description={ __(
|
|
113
|
+
'Choose a different style combination for the theme styles'
|
|
114
|
+
) }
|
|
115
|
+
/>
|
|
116
|
+
|
|
117
|
+
<Card size="small" isBorderless>
|
|
118
|
+
<CardBody>
|
|
119
|
+
<Grid columns={ 2 }>
|
|
120
|
+
{ withEmptyVariation?.map( ( variation, index ) => (
|
|
121
|
+
<Variation key={ index } variation={ variation } />
|
|
122
|
+
) ) }
|
|
123
|
+
</Grid>
|
|
124
|
+
</CardBody>
|
|
125
|
+
</Card>
|
|
126
|
+
</>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export default ScreenStyleVariations;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import {
|
|
5
|
+
import { __experimentalColorGradientControl as ColorGradientControl } from '@wordpress/block-editor';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
} from './hooks';
|
|
17
17
|
|
|
18
18
|
function ScreenTextColor( { name } ) {
|
|
19
|
-
const parentMenu = name === undefined ? '' : '/blocks/' + name;
|
|
20
19
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
21
20
|
const [ solids ] = useSetting( 'color.palette', name );
|
|
22
21
|
const [ areCustomSolidsEnabled ] = useSetting( 'color.custom', name );
|
|
@@ -36,34 +35,25 @@ function ScreenTextColor( { name } ) {
|
|
|
36
35
|
return null;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
const settings = [
|
|
40
|
-
{
|
|
41
|
-
colorValue: color,
|
|
42
|
-
onColorChange: setColor,
|
|
43
|
-
label: __( 'Text color' ),
|
|
44
|
-
clearable: color === userColor,
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
|
|
48
38
|
return (
|
|
49
39
|
<>
|
|
50
40
|
<ScreenHeader
|
|
51
|
-
back={ parentMenu + '/colors' }
|
|
52
41
|
title={ __( 'Text' ) }
|
|
53
42
|
description={ __(
|
|
54
43
|
'Set the default color used for text across the site.'
|
|
55
44
|
) }
|
|
56
45
|
/>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
title={ __( 'Color' ) }
|
|
60
|
-
settings={ settings }
|
|
46
|
+
<ColorGradientControl
|
|
47
|
+
className="edit-site-screen-text-color__control"
|
|
61
48
|
colors={ colorsPerOrigin }
|
|
62
49
|
disableCustomColors={ ! areCustomSolidsEnabled }
|
|
63
50
|
__experimentalHasMultipleOrigins
|
|
64
51
|
showTitle={ false }
|
|
65
52
|
enableAlpha
|
|
66
53
|
__experimentalIsRenderedInSidebar
|
|
54
|
+
colorValue={ color }
|
|
55
|
+
onColorChange={ setColor }
|
|
56
|
+
clearable={ color === userColor }
|
|
67
57
|
/>
|
|
68
58
|
</>
|
|
69
59
|
);
|
|
@@ -21,13 +21,9 @@ const elements = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
function ScreenTypographyElement( { name, element } ) {
|
|
24
|
-
const parentMenu =
|
|
25
|
-
name === undefined ? '/typography' : '/blocks/' + name + '/typography';
|
|
26
|
-
|
|
27
24
|
return (
|
|
28
25
|
<>
|
|
29
26
|
<ScreenHeader
|
|
30
|
-
back={ parentMenu }
|
|
31
27
|
title={ elements[ element ].title }
|
|
32
28
|
description={ elements[ element ].description }
|
|
33
29
|
/>
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
* Internal dependencies
|
|
14
14
|
*/
|
|
15
15
|
import ScreenHeader from './header';
|
|
16
|
-
import NavigationButton from './navigation-button';
|
|
16
|
+
import { NavigationButton } from './navigation-button';
|
|
17
17
|
import { useStyle } from './hooks';
|
|
18
18
|
import Subtitle from './subtitle';
|
|
19
19
|
import TypographyPanel from './typography-panel';
|
|
@@ -72,7 +72,6 @@ function ScreenTypography( { name } ) {
|
|
|
72
72
|
return (
|
|
73
73
|
<>
|
|
74
74
|
<ScreenHeader
|
|
75
|
-
back={ parentMenu ? parentMenu : '/' }
|
|
76
75
|
title={ __( 'Typography' ) }
|
|
77
76
|
description={ __(
|
|
78
77
|
'Manage the typography settings for different elements.'
|
|
@@ -101,7 +100,7 @@ function ScreenTypography( { name } ) {
|
|
|
101
100
|
</div>
|
|
102
101
|
) }
|
|
103
102
|
|
|
104
|
-
{ /* no
|
|
103
|
+
{ /* no typography elements support yet for blocks */ }
|
|
105
104
|
{ !! name && <TypographyPanel name={ name } element="text" /> }
|
|
106
105
|
</>
|
|
107
106
|
);
|
|
@@ -2,17 +2,13 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
|
-
min-height: 152px;
|
|
6
5
|
line-height: 1;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
height: 36px;
|
|
12
|
-
width: 36px;
|
|
13
|
-
margin-left: 0;
|
|
14
|
-
padding: 0;
|
|
15
|
-
}
|
|
9
|
+
.edit-site-global-styles-preview__iframe {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
display: block;
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
.edit-site-typography-panel__preview {
|
|
@@ -43,14 +39,6 @@
|
|
|
43
39
|
margin: $grid-unit-20;
|
|
44
40
|
|
|
45
41
|
.component-color-indicator {
|
|
46
|
-
margin-left: 0;
|
|
47
|
-
display: block;
|
|
48
|
-
border-radius: 50%;
|
|
49
|
-
height: 24px;
|
|
50
|
-
width: 24px;
|
|
51
|
-
padding: 0;
|
|
52
|
-
border: $border-width solid $gray-300;
|
|
53
|
-
|
|
54
42
|
// Show a diagonal line (crossed out) for empty swatches.
|
|
55
43
|
background: linear-gradient(-45deg, transparent 48%, $gray-300 48%, $gray-300 52%, transparent 52%);
|
|
56
44
|
}
|
|
@@ -77,16 +65,27 @@
|
|
|
77
65
|
}
|
|
78
66
|
}
|
|
79
67
|
|
|
80
|
-
h2.edit-site-global-styles-gradient-palette-panel__duotone-heading.components-heading {
|
|
81
|
-
text-transform: uppercase;
|
|
82
|
-
line-height: $grid-unit-30;
|
|
83
|
-
font-weight: 500;
|
|
84
|
-
font-size: 11px;
|
|
85
|
-
margin-bottom: $grid-unit-10;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
68
|
.edit-site-screen-text-color__control,
|
|
89
69
|
.edit-site-screen-link-color__control,
|
|
90
70
|
.edit-site-screen-background-color__control {
|
|
91
71
|
padding: $grid-unit-20;
|
|
92
72
|
}
|
|
73
|
+
|
|
74
|
+
.edit-site-global-styles-variations_item {
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
padding: $border-width * 2;
|
|
77
|
+
border-radius: $radius-block-ui;
|
|
78
|
+
border: $gray-200 $border-width solid;
|
|
79
|
+
|
|
80
|
+
&.is-active {
|
|
81
|
+
border: $gray-900 $border-width solid;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:hover {
|
|
85
|
+
border: var(--wp-admin-theme-color) $border-width solid;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:focus {
|
|
89
|
+
border: var(--wp-admin-theme-color) $border-width solid;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -21,47 +21,70 @@ import ScreenBackgroundColor from './screen-background-color';
|
|
|
21
21
|
import ScreenTextColor from './screen-text-color';
|
|
22
22
|
import ScreenLinkColor from './screen-link-color';
|
|
23
23
|
import ScreenLayout from './screen-layout';
|
|
24
|
+
import ScreenStyleVariations from './screen-style-variations';
|
|
25
|
+
|
|
26
|
+
function GlobalStylesNavigationScreen( { className, ...props } ) {
|
|
27
|
+
return (
|
|
28
|
+
<NavigatorScreen
|
|
29
|
+
className={ [
|
|
30
|
+
'edit-site-global-styles-sidebar__navigator-screen',
|
|
31
|
+
className,
|
|
32
|
+
]
|
|
33
|
+
.filter( Boolean )
|
|
34
|
+
.join( ' ' ) }
|
|
35
|
+
{ ...props }
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
24
39
|
|
|
25
40
|
function ContextScreens( { name } ) {
|
|
26
41
|
const parentMenu = name === undefined ? '' : '/blocks/' + name;
|
|
27
42
|
|
|
28
43
|
return (
|
|
29
44
|
<>
|
|
30
|
-
<
|
|
45
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/typography' }>
|
|
31
46
|
<ScreenTypography name={ name } />
|
|
32
|
-
</
|
|
47
|
+
</GlobalStylesNavigationScreen>
|
|
33
48
|
|
|
34
|
-
<
|
|
49
|
+
<GlobalStylesNavigationScreen
|
|
50
|
+
path={ parentMenu + '/typography/text' }
|
|
51
|
+
>
|
|
35
52
|
<ScreenTypographyElement name={ name } element="text" />
|
|
36
|
-
</
|
|
53
|
+
</GlobalStylesNavigationScreen>
|
|
37
54
|
|
|
38
|
-
<
|
|
55
|
+
<GlobalStylesNavigationScreen
|
|
56
|
+
path={ parentMenu + '/typography/link' }
|
|
57
|
+
>
|
|
39
58
|
<ScreenTypographyElement name={ name } element="link" />
|
|
40
|
-
</
|
|
59
|
+
</GlobalStylesNavigationScreen>
|
|
41
60
|
|
|
42
|
-
<
|
|
61
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/colors' }>
|
|
43
62
|
<ScreenColors name={ name } />
|
|
44
|
-
</
|
|
63
|
+
</GlobalStylesNavigationScreen>
|
|
45
64
|
|
|
46
|
-
<
|
|
65
|
+
<GlobalStylesNavigationScreen
|
|
66
|
+
path={ parentMenu + '/colors/palette' }
|
|
67
|
+
>
|
|
47
68
|
<ScreenColorPalette name={ name } />
|
|
48
|
-
</
|
|
69
|
+
</GlobalStylesNavigationScreen>
|
|
49
70
|
|
|
50
|
-
<
|
|
71
|
+
<GlobalStylesNavigationScreen
|
|
72
|
+
path={ parentMenu + '/colors/background' }
|
|
73
|
+
>
|
|
51
74
|
<ScreenBackgroundColor name={ name } />
|
|
52
|
-
</
|
|
75
|
+
</GlobalStylesNavigationScreen>
|
|
53
76
|
|
|
54
|
-
<
|
|
77
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/colors/text' }>
|
|
55
78
|
<ScreenTextColor name={ name } />
|
|
56
|
-
</
|
|
79
|
+
</GlobalStylesNavigationScreen>
|
|
57
80
|
|
|
58
|
-
<
|
|
81
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/colors/link' }>
|
|
59
82
|
<ScreenLinkColor name={ name } />
|
|
60
|
-
</
|
|
83
|
+
</GlobalStylesNavigationScreen>
|
|
61
84
|
|
|
62
|
-
<
|
|
85
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/layout' }>
|
|
63
86
|
<ScreenLayout name={ name } />
|
|
64
|
-
</
|
|
87
|
+
</GlobalStylesNavigationScreen>
|
|
65
88
|
</>
|
|
66
89
|
);
|
|
67
90
|
}
|
|
@@ -70,22 +93,29 @@ function GlobalStylesUI() {
|
|
|
70
93
|
const blocks = getBlockTypes();
|
|
71
94
|
|
|
72
95
|
return (
|
|
73
|
-
<NavigatorProvider
|
|
74
|
-
|
|
96
|
+
<NavigatorProvider
|
|
97
|
+
className="edit-site-global-styles-sidebar__navigator-provider"
|
|
98
|
+
initialPath="/"
|
|
99
|
+
>
|
|
100
|
+
<GlobalStylesNavigationScreen path="/">
|
|
75
101
|
<ScreenRoot />
|
|
76
|
-
</
|
|
102
|
+
</GlobalStylesNavigationScreen>
|
|
103
|
+
|
|
104
|
+
<GlobalStylesNavigationScreen path="/variations">
|
|
105
|
+
<ScreenStyleVariations />
|
|
106
|
+
</GlobalStylesNavigationScreen>
|
|
77
107
|
|
|
78
|
-
<
|
|
108
|
+
<GlobalStylesNavigationScreen path="/blocks">
|
|
79
109
|
<ScreenBlockList />
|
|
80
|
-
</
|
|
110
|
+
</GlobalStylesNavigationScreen>
|
|
81
111
|
|
|
82
112
|
{ blocks.map( ( block ) => (
|
|
83
|
-
<
|
|
113
|
+
<GlobalStylesNavigationScreen
|
|
84
114
|
key={ 'menu-block-' + block.name }
|
|
85
115
|
path={ '/blocks/' + block.name }
|
|
86
116
|
>
|
|
87
117
|
<ScreenBlock name={ block.name } />
|
|
88
|
-
</
|
|
118
|
+
</GlobalStylesNavigationScreen>
|
|
89
119
|
) ) }
|
|
90
120
|
|
|
91
121
|
<ContextScreens />
|