@wordpress/edit-site 5.31.0 → 5.32.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/block-editor/editor-canvas.js +8 -1
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +15 -4
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/editor/index.js +12 -3
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +1 -2
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +38 -0
- package/build/components/global-styles/background-panel.js.map +1 -0
- package/build/components/global-styles/font-families.js +1 -1
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +38 -9
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/index.js +20 -2
- package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build/components/global-styles/palette.js +3 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview-colors.js +2 -2
- package/build/components/global-styles/preview-colors.js.map +1 -1
- package/build/components/global-styles/root-menu.js +8 -2
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-background.js +34 -0
- package/build/components/global-styles/screen-background.js.map +1 -0
- package/build/components/global-styles/screen-color-palette.js +2 -2
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +6 -4
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +3 -37
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +6 -6
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +5 -2
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/ui.js +4 -1
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +10 -3
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +9 -2
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +3 -0
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/layout/animation.js +129 -0
- package/build/components/layout/animation.js.map +1 -0
- package/build/components/layout/index.js +9 -17
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +21 -18
- package/build/components/layout/router.js.map +1 -1
- package/build/components/page-pages/index.js +19 -17
- package/build/components/page-pages/index.js.map +1 -1
- package/build/components/page-patterns/index.js +18 -28
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/search-items.js +16 -58
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-templates-template-parts/actions.js +54 -41
- package/build/components/page-templates-template-parts/actions.js.map +1 -1
- package/build/components/page-templates-template-parts/index.js +26 -59
- package/build/components/page-templates-template-parts/index.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +12 -1
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/save-button/index.js +45 -16
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +8 -112
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/sidebar/index.js +1 -5
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +1 -1
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +1 -1
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +1 -2
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +5 -15
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +10 -16
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +5 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +10 -5
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +1 -5
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/style-book/index.js +1 -1
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -2
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/store/selectors.js +1 -9
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +8 -1
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +15 -4
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build-module/components/editor/index.js +13 -4
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +1 -2
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +31 -0
- package/build-module/components/global-styles/background-panel.js.map +1 -0
- package/build-module/components/global-styles/font-families.js +1 -1
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +38 -9
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js +20 -2
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build-module/components/global-styles/palette.js +3 -1
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview-colors.js +2 -2
- package/build-module/components/global-styles/preview-colors.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +9 -3
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-background.js +26 -0
- package/build-module/components/global-styles/screen-background.js.map +1 -0
- package/build-module/components/global-styles/screen-color-palette.js +2 -2
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +6 -4
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +4 -38
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +6 -6
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +5 -2
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/ui.js +4 -1
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +10 -3
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +9 -2
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +3 -0
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/layout/animation.js +122 -0
- package/build-module/components/layout/animation.js.map +1 -0
- package/build-module/components/layout/index.js +9 -17
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +21 -18
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/page-pages/index.js +19 -17
- package/build-module/components/page-pages/index.js.map +1 -1
- package/build-module/components/page-patterns/index.js +20 -30
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +14 -55
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-templates-template-parts/actions.js +54 -40
- package/build-module/components/page-templates-template-parts/actions.js.map +1 -1
- package/build-module/components/page-templates-template-parts/index.js +29 -62
- package/build-module/components/page-templates-template-parts/index.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +12 -1
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/save-button/index.js +46 -17
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +10 -114
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +1 -5
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +1 -1
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +1 -2
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +8 -18
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +11 -17
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +5 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +10 -5
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +1 -5
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/style-book/index.js +1 -1
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -2
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/hooks/index.js +0 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/store/selectors.js +1 -9
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +116 -104
- package/build-style/style.css +116 -104
- package/package.json +44 -44
- package/src/components/block-editor/editor-canvas.js +14 -2
- package/src/components/block-editor/site-editor-canvas.js +10 -7
- package/src/components/editor/index.js +11 -4
- package/src/components/editor-canvas-container/index.js +0 -1
- package/src/components/global-styles/background-panel.js +34 -0
- package/src/components/global-styles/font-families.js +1 -1
- package/src/components/global-styles/font-library-modal/context.js +43 -14
- package/src/components/global-styles/font-library-modal/style.scss +1 -1
- package/src/components/global-styles/font-library-modal/utils/index.js +17 -4
- package/src/components/global-styles/palette.js +3 -1
- package/src/components/global-styles/preview-colors.js +2 -2
- package/src/components/global-styles/root-menu.js +12 -1
- package/src/components/global-styles/screen-background.js +29 -0
- package/src/components/global-styles/screen-color-palette.js +2 -2
- package/src/components/global-styles/screen-colors.js +4 -4
- package/src/components/global-styles/screen-style-variations.js +4 -36
- package/src/components/global-styles/screen-typography.js +6 -9
- package/src/components/global-styles/style-variations-container.js +2 -1
- package/src/components/global-styles/style.scss +14 -12
- package/src/components/global-styles/ui.js +5 -0
- package/src/components/global-styles/variations/style.scss +32 -17
- package/src/components/global-styles/variations/variations-color.js +4 -2
- package/src/components/global-styles/variations/variations-typography.js +4 -1
- package/src/components/header-edit-mode/style.scss +28 -17
- package/src/components/keyboard-shortcut-help-modal/index.js +4 -0
- package/src/components/layout/animation.js +122 -0
- package/src/components/layout/index.js +12 -27
- package/src/components/layout/router.js +25 -19
- package/src/components/layout/style.scss +2 -0
- package/src/components/page-pages/index.js +27 -43
- package/src/components/page-patterns/index.js +20 -28
- package/src/components/page-patterns/search-items.js +13 -58
- package/src/components/page-templates-template-parts/actions.js +106 -91
- package/src/components/page-templates-template-parts/index.js +34 -78
- package/src/components/page-templates-template-parts/style.scss +5 -0
- package/src/components/plugin-template-setting-panel/index.js +14 -1
- package/src/components/save-button/index.js +55 -26
- package/src/components/save-hub/index.js +20 -164
- package/src/components/sidebar/index.js +0 -5
- package/src/components/sidebar-dataviews/default-views.js +1 -1
- package/src/components/sidebar-dataviews/index.js +1 -1
- package/src/components/sidebar-edit-mode/index.js +0 -2
- package/src/components/sidebar-edit-mode/page-panels/index.js +29 -60
- package/src/components/sidebar-edit-mode/page-panels/page-content.js +10 -10
- package/src/components/sidebar-edit-mode/template-panel/index.js +23 -33
- package/src/components/sidebar-edit-mode/template-panel/style.scss +1 -29
- package/src/components/sidebar-navigation-screen/style.scss +12 -9
- package/src/components/sidebar-navigation-screen-details-footer/index.js +6 -2
- package/src/components/sidebar-navigation-screen-global-styles/index.js +7 -13
- package/src/components/sidebar-navigation-screen-patterns/index.js +0 -7
- package/src/components/style-book/index.js +1 -3
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -2
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +1 -1
- package/src/hooks/index.js +0 -1
- package/src/store/selectors.js +3 -15
- package/src/style.scss +0 -1
- package/build/components/actions/index.js +0 -319
- package/build/components/actions/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/sidebar-card/index.js +0 -48
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js +0 -70
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pages/index.js +0 -175
- package/build/components/sidebar-navigation-screen-pages/index.js.map +0 -1
- package/build/hooks/template-part-edit.js +0 -82
- package/build/hooks/template-part-edit.js.map +0 -1
- package/build/store/utils.js +0 -71
- package/build/store/utils.js.map +0 -1
- package/build-module/components/actions/index.js +0 -308
- package/build-module/components/actions/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +0 -40
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +0 -63
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pages/index.js +0 -167
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +0 -1
- package/build-module/hooks/template-part-edit.js +0 -75
- package/build-module/hooks/template-part-edit.js.map +0 -1
- package/build-module/store/utils.js +0 -64
- package/build-module/store/utils.js.map +0 -1
- package/src/components/actions/index.js +0 -409
- package/src/components/sidebar-edit-mode/sidebar-card/index.js +0 -53
- package/src/components/sidebar-edit-mode/sidebar-card/style.scss +0 -36
- package/src/components/sidebar-edit-mode/template-panel/template-areas.js +0 -86
- package/src/components/sidebar-navigation-screen-pages/index.js +0 -238
- package/src/hooks/template-part-edit.js +0 -89
- package/src/store/test/utils.js +0 -191
- package/src/store/utils.js +0 -69
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { unlock } from '../../lock-unlock';
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
useGlobalStyle,
|
|
13
|
+
useGlobalSetting,
|
|
14
|
+
BackgroundPanel: StylesBackgroundPanel,
|
|
15
|
+
} = unlock( blockEditorPrivateApis );
|
|
16
|
+
|
|
17
|
+
export default function BackgroundPanel() {
|
|
18
|
+
const [ style ] = useGlobalStyle( '', undefined, 'user', {
|
|
19
|
+
shouldDecodeEncode: false,
|
|
20
|
+
} );
|
|
21
|
+
const [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {
|
|
22
|
+
shouldDecodeEncode: false,
|
|
23
|
+
} );
|
|
24
|
+
const [ settings ] = useGlobalSetting( '' );
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<StylesBackgroundPanel
|
|
28
|
+
inheritedValue={ inheritedStyle }
|
|
29
|
+
value={ style }
|
|
30
|
+
onChange={ setStyle }
|
|
31
|
+
settings={ settings }
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -105,18 +105,31 @@ function FontLibraryProvider( { children } ) {
|
|
|
105
105
|
const [ modalTabOpen, setModalTabOpen ] = useState( false );
|
|
106
106
|
const [ libraryFontSelected, setLibraryFontSelected ] = useState( null );
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
? baseFontFamilies.theme
|
|
110
|
-
.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )
|
|
111
|
-
.sort( ( a, b ) => a.name.localeCompare( b.name ) )
|
|
112
|
-
: [];
|
|
113
|
-
|
|
108
|
+
// Themes Fonts are the fonts defined in the global styles (database persisted theme.json data).
|
|
114
109
|
const themeFonts = fontFamilies?.theme
|
|
115
110
|
? fontFamilies.theme
|
|
116
111
|
.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )
|
|
117
112
|
.sort( ( a, b ) => a.name.localeCompare( b.name ) )
|
|
118
113
|
: [];
|
|
119
114
|
|
|
115
|
+
const themeFontsSlugs = new Set( themeFonts.map( ( f ) => f.slug ) );
|
|
116
|
+
|
|
117
|
+
/*
|
|
118
|
+
* Base Theme Fonts are the fonts defined in the theme.json *file*.
|
|
119
|
+
*
|
|
120
|
+
* Uses the fonts from global styles + the ones from the theme.json file that hasn't repeated slugs.
|
|
121
|
+
* Avoids incosistencies with the fonts listed in the font library modal as base (unactivated).
|
|
122
|
+
* These inconsistencies can happen when the active theme fonts in global styles aren't defined in theme.json file as when a theme style variation is applied.
|
|
123
|
+
*/
|
|
124
|
+
const baseThemeFonts = baseFontFamilies?.theme
|
|
125
|
+
? themeFonts.concat(
|
|
126
|
+
baseFontFamilies.theme
|
|
127
|
+
.filter( ( f ) => ! themeFontsSlugs.has( f.slug ) )
|
|
128
|
+
.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )
|
|
129
|
+
.sort( ( a, b ) => a.name.localeCompare( b.name ) )
|
|
130
|
+
)
|
|
131
|
+
: [];
|
|
132
|
+
|
|
120
133
|
const customFonts = fontFamilies?.custom
|
|
121
134
|
? fontFamilies.custom
|
|
122
135
|
.map( ( f ) => setUIValuesNeeded( f, { source: 'custom' } ) )
|
|
@@ -144,8 +157,7 @@ function FontLibraryProvider( { children } ) {
|
|
|
144
157
|
return;
|
|
145
158
|
}
|
|
146
159
|
|
|
147
|
-
const fonts =
|
|
148
|
-
font.source === 'theme' ? baseThemeFonts : baseCustomFonts;
|
|
160
|
+
const fonts = font.source === 'theme' ? themeFonts : baseCustomFonts;
|
|
149
161
|
|
|
150
162
|
// Tries to find the font in the installed fonts
|
|
151
163
|
const fontSelected = fonts.find( ( f ) => f.slug === font.slug );
|
|
@@ -269,11 +281,13 @@ function FontLibraryProvider( { children } ) {
|
|
|
269
281
|
sucessfullyInstalledFontFaces?.length > 0 ||
|
|
270
282
|
alreadyInstalledFontFaces?.length > 0
|
|
271
283
|
) {
|
|
272
|
-
|
|
284
|
+
// Use font data from REST API not from client to ensure
|
|
285
|
+
// correct font information is used.
|
|
286
|
+
installedFontFamily.fontFace = [
|
|
273
287
|
...sucessfullyInstalledFontFaces,
|
|
274
|
-
...alreadyInstalledFontFaces,
|
|
275
288
|
];
|
|
276
|
-
|
|
289
|
+
|
|
290
|
+
fontFamiliesToActivate.push( installedFontFamily );
|
|
277
291
|
}
|
|
278
292
|
|
|
279
293
|
// If it's a system font but was installed successfully, activate it.
|
|
@@ -390,14 +404,29 @@ function FontLibraryProvider( { children } ) {
|
|
|
390
404
|
};
|
|
391
405
|
|
|
392
406
|
const activateCustomFontFamilies = ( fontsToAdd ) => {
|
|
393
|
-
//
|
|
407
|
+
// Removes the id from the families and faces to avoid saving that to global styles post content.
|
|
408
|
+
const fontsToActivate = fontsToAdd.map(
|
|
409
|
+
( { id: _familyDbId, fontFace, ...font } ) => ( {
|
|
410
|
+
...font,
|
|
411
|
+
...( fontFace && fontFace.length > 0
|
|
412
|
+
? {
|
|
413
|
+
fontFace: fontFace.map(
|
|
414
|
+
( { id: _faceDbId, ...face } ) => face
|
|
415
|
+
),
|
|
416
|
+
}
|
|
417
|
+
: {} ),
|
|
418
|
+
} )
|
|
419
|
+
);
|
|
420
|
+
|
|
394
421
|
// Activate the fonts by set the new custom fonts array.
|
|
395
422
|
setFontFamilies( {
|
|
396
423
|
...fontFamilies,
|
|
397
|
-
|
|
424
|
+
// Merge the existing custom fonts with the new fonts.
|
|
425
|
+
custom: mergeFontFamilies( fontFamilies?.custom, fontsToActivate ),
|
|
398
426
|
} );
|
|
427
|
+
|
|
399
428
|
// Add custom fonts to the browser.
|
|
400
|
-
|
|
429
|
+
fontsToActivate.forEach( ( font ) => {
|
|
401
430
|
if ( font.fontFace ) {
|
|
402
431
|
font.fontFace.forEach( ( face ) => {
|
|
403
432
|
// Load font faces just in the iframe because they already are in the document.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.font-library-modal {
|
|
2
|
-
// @todo
|
|
2
|
+
// @todo If a new prop is added to the Modal component that constrains
|
|
3
3
|
// the content width, we should use that prop instead of this style.
|
|
4
4
|
// see https://github.com/WordPress/gutenberg/issues/54471.
|
|
5
5
|
&.font-library-modal {
|
|
@@ -234,10 +234,23 @@ export function makeFontFacesFormData( font ) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
export async function batchInstallFontFaces( fontFamilyId, fontFacesData ) {
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
const responses = [];
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* Uses the same response format as Promise.allSettled, but executes requests in sequence to work
|
|
241
|
+
* around a race condition that can cause an error when the fonts directory doesn't exist yet.
|
|
242
|
+
*/
|
|
243
|
+
for ( const faceData of fontFacesData ) {
|
|
244
|
+
try {
|
|
245
|
+
const response = await fetchInstallFontFace(
|
|
246
|
+
fontFamilyId,
|
|
247
|
+
faceData
|
|
248
|
+
);
|
|
249
|
+
responses.push( { status: 'fulfilled', value: response } );
|
|
250
|
+
} catch ( error ) {
|
|
251
|
+
responses.push( { status: 'rejected', reason: error } );
|
|
252
|
+
}
|
|
253
|
+
}
|
|
241
254
|
|
|
242
255
|
const results = {
|
|
243
256
|
errors: [],
|
|
@@ -87,7 +87,9 @@ function Palette( { name } ) {
|
|
|
87
87
|
</ColorIndicatorWrapper>
|
|
88
88
|
) ) }
|
|
89
89
|
</ZStack>
|
|
90
|
-
<FlexItem
|
|
90
|
+
<FlexItem className="edit-site-global-styles-screen-colors__palette-count">
|
|
91
|
+
{ paletteButtonText }
|
|
92
|
+
</FlexItem>
|
|
91
93
|
</HStack>
|
|
92
94
|
</NavigationButtonAsItem>
|
|
93
95
|
</ItemGroup>
|
|
@@ -40,7 +40,7 @@ const StylesPreviewColors = ( { label, isFocused, withHoverView } ) => {
|
|
|
40
40
|
} }
|
|
41
41
|
>
|
|
42
42
|
<HStack
|
|
43
|
-
spacing={
|
|
43
|
+
spacing={ 5 * ratio }
|
|
44
44
|
justify="center"
|
|
45
45
|
style={ {
|
|
46
46
|
height: '100%',
|
|
@@ -48,7 +48,7 @@ const StylesPreviewColors = ( { label, isFocused, withHoverView } ) => {
|
|
|
48
48
|
} }
|
|
49
49
|
>
|
|
50
50
|
<HighlightedColors
|
|
51
|
-
normalizedColorSwatchSize={
|
|
51
|
+
normalizedColorSwatchSize={ 56 }
|
|
52
52
|
ratio={ ratio }
|
|
53
53
|
/>
|
|
54
54
|
</HStack>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
|
|
5
|
-
import { typography, color, layout } from '@wordpress/icons';
|
|
5
|
+
import { typography, color, layout, image } from '@wordpress/icons';
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
7
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
8
8
|
|
|
@@ -18,6 +18,7 @@ const {
|
|
|
18
18
|
useHasColorPanel,
|
|
19
19
|
useGlobalSetting,
|
|
20
20
|
useSettingsForBlockElement,
|
|
21
|
+
useHasBackgroundPanel,
|
|
21
22
|
} = unlock( blockEditorPrivateApis );
|
|
22
23
|
|
|
23
24
|
function RootMenu() {
|
|
@@ -27,6 +28,7 @@ function RootMenu() {
|
|
|
27
28
|
const hasColorPanel = useHasColorPanel( settings );
|
|
28
29
|
const hasDimensionsPanel = useHasDimensionsPanel( settings );
|
|
29
30
|
const hasLayoutPanel = hasDimensionsPanel;
|
|
31
|
+
const hasBackgroundPanel = useHasBackgroundPanel( settings );
|
|
30
32
|
|
|
31
33
|
return (
|
|
32
34
|
<>
|
|
@@ -58,6 +60,15 @@ function RootMenu() {
|
|
|
58
60
|
{ __( 'Layout' ) }
|
|
59
61
|
</NavigationButtonAsItem>
|
|
60
62
|
) }
|
|
63
|
+
{ hasBackgroundPanel && (
|
|
64
|
+
<NavigationButtonAsItem
|
|
65
|
+
icon={ image }
|
|
66
|
+
path="/background"
|
|
67
|
+
aria-label={ __( 'Background styles' ) }
|
|
68
|
+
>
|
|
69
|
+
{ __( 'Background' ) }
|
|
70
|
+
</NavigationButtonAsItem>
|
|
71
|
+
) }
|
|
61
72
|
</ItemGroup>
|
|
62
73
|
</>
|
|
63
74
|
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import BackgroundPanel from './background-panel';
|
|
11
|
+
import ScreenHeader from './header';
|
|
12
|
+
import { unlock } from '../../lock-unlock';
|
|
13
|
+
|
|
14
|
+
const { useHasBackgroundPanel, useGlobalSetting } = unlock(
|
|
15
|
+
blockEditorPrivateApis
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
function ScreenBackground() {
|
|
19
|
+
const [ settings ] = useGlobalSetting( '' );
|
|
20
|
+
const hasBackgroundPanel = useHasBackgroundPanel( settings );
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<ScreenHeader title={ __( 'Background' ) } />
|
|
24
|
+
{ hasBackgroundPanel && <BackgroundPanel /> }
|
|
25
|
+
</>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default ScreenBackground;
|
|
@@ -25,8 +25,8 @@ function ScreenColorPalette( { name } ) {
|
|
|
25
25
|
/>
|
|
26
26
|
<Tabs>
|
|
27
27
|
<Tabs.TabList>
|
|
28
|
-
<Tabs.Tab tabId="solid">Solid</Tabs.Tab>
|
|
29
|
-
<Tabs.Tab tabId="gradient">Gradient</Tabs.Tab>
|
|
28
|
+
<Tabs.Tab tabId="solid">{ __( 'Solid' ) }</Tabs.Tab>
|
|
29
|
+
<Tabs.Tab tabId="gradient">{ __( 'Gradient' ) }</Tabs.Tab>
|
|
30
30
|
</Tabs.TabList>
|
|
31
31
|
<Tabs.TabPanel tabId="solid" focusable={ false }>
|
|
32
32
|
<ColorPalettePanel name={ name } />
|
|
@@ -35,12 +35,12 @@ function ScreenColors() {
|
|
|
35
35
|
<ScreenHeader
|
|
36
36
|
title={ __( 'Colors' ) }
|
|
37
37
|
description={ __(
|
|
38
|
-
'
|
|
38
|
+
'Palette colors and the application of those colors on site elements.'
|
|
39
39
|
) }
|
|
40
40
|
/>
|
|
41
|
-
<div className="edit-site-global-styles-screen
|
|
42
|
-
<VStack spacing={
|
|
43
|
-
<ColorVariations />
|
|
41
|
+
<div className="edit-site-global-styles-screen">
|
|
42
|
+
<VStack spacing={ 7 }>
|
|
43
|
+
<ColorVariations title={ __( 'Presets' ) } />
|
|
44
44
|
<Palette />
|
|
45
45
|
<StylesColorPanel
|
|
46
46
|
inheritedValue={ inheritedStyle }
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Card, CardBody } from '@wordpress/components';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
|
-
import {
|
|
7
|
-
import { useEffect, useRef } from '@wordpress/element';
|
|
8
|
-
import { useSelect, useDispatch } from '@wordpress/data';
|
|
6
|
+
import { useZoomOut } from '@wordpress/block-editor';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* Internal dependencies
|
|
@@ -14,43 +12,13 @@ import ScreenHeader from './header';
|
|
|
14
12
|
import StyleVariationsContainer from './style-variations-container';
|
|
15
13
|
|
|
16
14
|
function ScreenStyleVariations() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
}, [] );
|
|
22
|
-
|
|
23
|
-
const shouldRevertInitialMode = useRef( null );
|
|
24
|
-
useEffect( () => {
|
|
25
|
-
// ignore changes to zoom-out mode as we explictily change to it on mount.
|
|
26
|
-
if ( mode !== 'zoom-out' ) {
|
|
27
|
-
shouldRevertInitialMode.current = false;
|
|
28
|
-
}
|
|
29
|
-
}, [ mode ] );
|
|
30
|
-
|
|
31
|
-
// Intentionality left without any dependency.
|
|
32
|
-
// This effect should only run the first time the component is rendered.
|
|
33
|
-
// The effect opens the zoom-out view if it is not open before when applying a style variation.
|
|
34
|
-
useEffect( () => {
|
|
35
|
-
if ( mode !== 'zoom-out' ) {
|
|
36
|
-
__unstableSetEditorMode( 'zoom-out' );
|
|
37
|
-
shouldRevertInitialMode.current = true;
|
|
38
|
-
return () => {
|
|
39
|
-
// if there were not mode changes revert to the initial mode when unmounting.
|
|
40
|
-
if ( shouldRevertInitialMode.current ) {
|
|
41
|
-
__unstableSetEditorMode( mode );
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
|
-
}, [] );
|
|
47
|
-
|
|
48
|
-
const { __unstableSetEditorMode } = useDispatch( blockEditorStore );
|
|
15
|
+
// Move to zoom out mode when this component is mounted
|
|
16
|
+
// and back to the previous mode when unmounted.
|
|
17
|
+
useZoomOut();
|
|
49
18
|
|
|
50
19
|
return (
|
|
51
20
|
<>
|
|
52
21
|
<ScreenHeader
|
|
53
|
-
back="/"
|
|
54
22
|
title={ __( 'Browse styles' ) }
|
|
55
23
|
description={ __(
|
|
56
24
|
'Choose a variation to change the look of the site.'
|
|
@@ -26,17 +26,14 @@ function ScreenTypography() {
|
|
|
26
26
|
<ScreenHeader
|
|
27
27
|
title={ __( 'Typography' ) }
|
|
28
28
|
description={ __(
|
|
29
|
-
'
|
|
29
|
+
'Typography styles and the application of those styles on site elements.'
|
|
30
30
|
) }
|
|
31
31
|
/>
|
|
32
|
-
<div className="edit-site-global-styles-screen
|
|
33
|
-
<VStack spacing={
|
|
34
|
-
<TypographyVariations />
|
|
35
|
-
{ ! window.__experimentalDisableFontLibrary &&
|
|
36
|
-
<
|
|
37
|
-
{ fontLibraryEnabled && <FontFamilies /> }
|
|
38
|
-
</VStack>
|
|
39
|
-
) }
|
|
32
|
+
<div className="edit-site-global-styles-screen">
|
|
33
|
+
<VStack spacing={ 7 }>
|
|
34
|
+
<TypographyVariations title={ __( 'Presets' ) } />
|
|
35
|
+
{ ! window.__experimentalDisableFontLibrary &&
|
|
36
|
+
fontLibraryEnabled && <FontFamilies /> }
|
|
40
37
|
<TypographyElements />
|
|
41
38
|
</VStack>
|
|
42
39
|
</div>
|
|
@@ -13,7 +13,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
13
13
|
import PreviewStyles from './preview-styles';
|
|
14
14
|
import Variation from './variations/variation';
|
|
15
15
|
|
|
16
|
-
export default function StyleVariationsContainer() {
|
|
16
|
+
export default function StyleVariationsContainer( { gap = 2 } ) {
|
|
17
17
|
const variations = useSelect( ( select ) => {
|
|
18
18
|
return select(
|
|
19
19
|
coreStore
|
|
@@ -39,6 +39,7 @@ export default function StyleVariationsContainer() {
|
|
|
39
39
|
<Grid
|
|
40
40
|
columns={ 2 }
|
|
41
41
|
className="edit-site-global-styles-style-variations-container"
|
|
42
|
+
gap={ gap }
|
|
42
43
|
>
|
|
43
44
|
{ withEmptyVariation.map( ( variation, index ) => (
|
|
44
45
|
<Variation key={ index } variation={ variation }>
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.edit-site-global-styles-preview__iframe {
|
|
10
|
-
border-radius: $radius-block-ui;
|
|
11
|
-
display: block;
|
|
10
|
+
border-radius: $radius-block-ui + 1px; // Visually resembles the $radius-block-ui.
|
|
12
11
|
max-width: 100%;
|
|
12
|
+
display: block;
|
|
13
13
|
width: 100%;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -29,9 +29,8 @@
|
|
|
29
29
|
max-width: 100%;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.edit-site-global-styles-screen
|
|
33
|
-
|
|
34
|
-
margin: $grid-unit-20;
|
|
32
|
+
.edit-site-global-styles-screen {
|
|
33
|
+
margin: $grid-unit-15 $grid-unit-20 $grid-unit-20;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
.edit-site-global-styles-screen-typography__indicator {
|
|
@@ -52,14 +51,16 @@
|
|
|
52
51
|
justify-content: center;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
.edit-site-global-styles-screen-
|
|
56
|
-
|
|
54
|
+
.edit-site-global-styles-screen .color-block-support-panel {
|
|
55
|
+
padding-left: 0;
|
|
56
|
+
padding-right: 0;
|
|
57
|
+
padding-top: 0;
|
|
58
|
+
border-top: none;
|
|
59
|
+
row-gap: calc(#{$grid-unit-05} * 3);
|
|
60
|
+
}
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
padding-right: 0;
|
|
61
|
-
border-top: none;
|
|
62
|
-
}
|
|
62
|
+
.edit-site-global-styles-screen-colors__palette-count {
|
|
63
|
+
color: $gray-700;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
.edit-site-global-styles-header__description {
|
|
@@ -115,6 +116,7 @@
|
|
|
115
116
|
flex: 1 1 auto;
|
|
116
117
|
display: flex;
|
|
117
118
|
flex-direction: column;
|
|
119
|
+
margin: $grid-unit-20;
|
|
118
120
|
|
|
119
121
|
.components-v-stack {
|
|
120
122
|
flex: 1 1 auto;
|
|
@@ -40,6 +40,7 @@ import ScreenStyleVariations from './screen-style-variations';
|
|
|
40
40
|
import StyleBook from '../style-book';
|
|
41
41
|
import ScreenCSS from './screen-css';
|
|
42
42
|
import ScreenRevisions from './screen-revisions';
|
|
43
|
+
import ScreenBackground from './screen-background';
|
|
43
44
|
import { unlock } from '../../lock-unlock';
|
|
44
45
|
import { store as editSiteStore } from '../../store';
|
|
45
46
|
|
|
@@ -344,6 +345,10 @@ function GlobalStylesUI() {
|
|
|
344
345
|
<ScreenRevisions />
|
|
345
346
|
</GlobalStylesNavigationScreen>
|
|
346
347
|
|
|
348
|
+
<GlobalStylesNavigationScreen path={ '/background' }>
|
|
349
|
+
<ScreenBackground />
|
|
350
|
+
</GlobalStylesNavigationScreen>
|
|
351
|
+
|
|
347
352
|
{ blocks.map( ( block ) => (
|
|
348
353
|
<GlobalStylesNavigationScreen
|
|
349
354
|
key={ 'menu-block-' + block.name }
|
|
@@ -5,34 +5,49 @@
|
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
|
|
7
7
|
.edit-site-global-styles-variations_item-preview {
|
|
8
|
-
padding: $border-width * 2;
|
|
9
8
|
border-radius: $radius-block-ui;
|
|
10
|
-
box-shadow: 0 0 0 $border-width $gray-200;
|
|
11
9
|
// Shown in Windows 10 high contrast mode.
|
|
12
10
|
outline: 1px solid transparent;
|
|
11
|
+
position: relative;
|
|
12
|
+
// Add the same transition that block style variations and other buttons have.
|
|
13
|
+
transition: box-shadow 0.1s linear;
|
|
14
|
+
@include reduce-motion("transition");
|
|
15
|
+
|
|
16
|
+
&::after {
|
|
17
|
+
content: "";
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: -$border-width;
|
|
20
|
+
left: -$border-width;
|
|
21
|
+
bottom: -$border-width;
|
|
22
|
+
right: -$border-width;
|
|
23
|
+
// Visually resembles the $radius-block-ui.
|
|
24
|
+
border-radius: $radius-block-ui + $border-width;
|
|
25
|
+
box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.2);
|
|
26
|
+
// Show a thin outline in Windows high contrast mode, otherwise the button is invisible.
|
|
27
|
+
border: $border-width solid transparent;
|
|
28
|
+
box-sizing: inherit;
|
|
29
|
+
// Add the same transition that block style variations and other buttons have.
|
|
30
|
+
transition: box-shadow 0.1s linear;
|
|
31
|
+
@include reduce-motion("transition");
|
|
32
|
+
}
|
|
13
33
|
|
|
14
34
|
.edit-site-global-styles-color-variations & {
|
|
15
35
|
padding: $grid-unit-10;
|
|
16
36
|
}
|
|
17
37
|
}
|
|
18
38
|
|
|
19
|
-
|
|
20
|
-
box-shadow: 0 0 0 $border-width
|
|
21
|
-
// Shown in Windows 10 high contrast mode.
|
|
22
|
-
outline-width: 3px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:hover .edit-site-global-styles-variations_item-preview {
|
|
26
|
-
box-shadow: 0 0 0 $border-width var(--wp-admin-theme-color);
|
|
39
|
+
&:not(.is-active):hover .edit-site-global-styles-variations_item-preview::after {
|
|
40
|
+
box-shadow: inset 0 0 0 $border-width rgba(0, 0, 0, 0.4);
|
|
27
41
|
}
|
|
28
42
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
&:focus-visible {
|
|
43
|
+
&.is-active .edit-site-global-styles-variations_item-preview,
|
|
44
|
+
&:focus-visible .edit-site-global-styles-variations_item-preview {
|
|
45
|
+
box-shadow: inset 0 0 0 $border-width $white, 0 0 0 var(--wp-admin-border-width-focus) $gray-900;
|
|
34
46
|
// Shown in Windows 10 high contrast mode.
|
|
35
|
-
outline: 3px
|
|
36
|
-
|
|
47
|
+
outline-width: 3px;
|
|
48
|
+
|
|
49
|
+
&::after {
|
|
50
|
+
box-shadow: inset 0 0 0 1px $white;
|
|
51
|
+
}
|
|
37
52
|
}
|
|
38
53
|
}
|
|
@@ -12,8 +12,9 @@ import {
|
|
|
12
12
|
import Variation from './variation';
|
|
13
13
|
import StylesPreviewColors from '../preview-colors';
|
|
14
14
|
import { useColorVariations } from '../hooks';
|
|
15
|
+
import Subtitle from '../subtitle';
|
|
15
16
|
|
|
16
|
-
export default function ColorVariations() {
|
|
17
|
+
export default function ColorVariations( { title, gap = 2 } ) {
|
|
17
18
|
const colorVariations = useColorVariations();
|
|
18
19
|
|
|
19
20
|
if ( ! colorVariations?.length ) {
|
|
@@ -22,7 +23,8 @@ export default function ColorVariations() {
|
|
|
22
23
|
|
|
23
24
|
return (
|
|
24
25
|
<VStack spacing={ 3 }>
|
|
25
|
-
<
|
|
26
|
+
{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }
|
|
27
|
+
<Grid columns={ 3 } gap={ gap }>
|
|
26
28
|
{ colorVariations.map( ( variation, index ) => (
|
|
27
29
|
<Variation key={ index } variation={ variation }>
|
|
28
30
|
{ () => <StylesPreviewColors /> }
|
|
@@ -14,8 +14,9 @@ import { useTypographyVariations } from '../hooks';
|
|
|
14
14
|
import TypographyExample from '../typography-example';
|
|
15
15
|
import PreviewIframe from '../preview-iframe';
|
|
16
16
|
import Variation from './variation';
|
|
17
|
+
import Subtitle from '../subtitle';
|
|
17
18
|
|
|
18
|
-
export default function TypographyVariations() {
|
|
19
|
+
export default function TypographyVariations( { title, gap = 2 } ) {
|
|
19
20
|
const typographyVariations = useTypographyVariations();
|
|
20
21
|
|
|
21
22
|
if ( ! typographyVariations?.length ) {
|
|
@@ -24,8 +25,10 @@ export default function TypographyVariations() {
|
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<VStack spacing={ 3 }>
|
|
28
|
+
{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }
|
|
27
29
|
<Grid
|
|
28
30
|
columns={ 3 }
|
|
31
|
+
gap={ gap }
|
|
29
32
|
className="edit-site-global-styles-style-variations-container"
|
|
30
33
|
>
|
|
31
34
|
{ typographyVariations &&
|