@wordpress/edit-site 6.1.0 → 6.3.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 +10 -6
- package/build/components/add-new-pattern/index.js +31 -16
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/{add-new-page → add-new-post}/index.js +28 -16
- package/build/components/add-new-post/index.js.map +1 -0
- package/build/components/block-editor/use-site-editor-settings.js +5 -3
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/editor/index.js +32 -7
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +18 -7
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +0 -5
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +17 -17
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +2 -2
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +13 -30
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/hooks.js +0 -40
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/preview-typography.js +47 -0
- package/build/components/global-styles/preview-typography.js.map +1 -0
- package/build/components/global-styles/screen-block.js +14 -0
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +5 -1
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +1 -2
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +5 -5
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/typography-elements.js +0 -2
- package/build/components/global-styles/typography-elements.js.map +1 -1
- package/build/components/global-styles/variations/variation.js +28 -22
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +5 -3
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +14 -27
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +2 -2
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/layout/index.js +16 -8
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +20 -41
- package/build/components/layout/router.js.map +1 -1
- package/build/components/page-patterns/index.js +51 -41
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.js +3 -1
- package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +29 -4
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +22 -55
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/index.js +27 -21
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/pagination/index.js +4 -4
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/posts-app/index.js +11 -17
- package/build/components/posts-app/index.js.map +1 -1
- package/build/components/{page-pages/index.js → posts-app/posts-list.js} +165 -38
- package/build/components/posts-app/posts-list.js.map +1 -0
- package/build/components/posts-app/router.js +85 -0
- package/build/components/posts-app/router.js.map +1 -0
- package/build/components/revisions/index.js +10 -7
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/save-panel/index.js +1 -1
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js +4 -1
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +98 -84
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +4 -1
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +3 -3
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +5 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/site-hub/index.js +81 -1
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/deprecated.js +11 -0
- package/build/deprecated.js.map +1 -1
- package/build/hooks/commands/use-set-command-context.js +11 -0
- package/build/hooks/commands/use-set-command-context.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +65 -42
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +6 -0
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/posts.js +57 -2
- package/build/posts.js.map +1 -1
- package/build/store/private-actions.js +7 -2
- package/build/store/private-actions.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +31 -16
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/{add-new-page → add-new-post}/index.js +28 -16
- package/build-module/components/add-new-post/index.js.map +1 -0
- package/build-module/components/block-editor/use-site-editor-settings.js +5 -3
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/editor/index.js +33 -8
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +19 -8
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +0 -5
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +18 -18
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +2 -2
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +14 -31
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +0 -38
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/preview-typography.js +39 -0
- package/build-module/components/global-styles/preview-typography.js.map +1 -0
- package/build-module/components/global-styles/screen-block.js +15 -0
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +5 -1
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +1 -2
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +6 -6
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/typography-elements.js +0 -2
- package/build-module/components/global-styles/typography-elements.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js +29 -23
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +5 -3
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +16 -28
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +2 -2
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/layout/index.js +14 -8
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +20 -41
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/page-patterns/index.js +52 -42
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js +3 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +28 -4
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +23 -56
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/index.js +27 -21
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/pagination/index.js +4 -4
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/posts-app/index.js +11 -17
- package/build-module/components/posts-app/index.js.map +1 -1
- package/build-module/components/{page-pages/index.js → posts-app/posts-list.js} +164 -37
- package/build-module/components/posts-app/posts-list.js.map +1 -0
- package/build-module/components/posts-app/router.js +77 -0
- package/build-module/components/posts-app/router.js.map +1 -0
- package/build-module/components/revisions/index.js +10 -7
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +1 -1
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +4 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +97 -84
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +5 -2
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +3 -3
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +5 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/site-hub/index.js +81 -1
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/deprecated.js +11 -0
- package/build-module/deprecated.js.map +1 -1
- package/build-module/hooks/commands/use-set-command-context.js +11 -0
- package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +61 -38
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +7 -2
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/posts.js +57 -2
- package/build-module/posts.js.map +1 -1
- package/build-module/store/private-actions.js +7 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-style/posts-rtl.css +108 -28
- package/build-style/posts.css +108 -28
- package/build-style/style-rtl.css +127 -157
- package/build-style/style.css +127 -157
- package/lib/inflate.js +3188 -3937
- package/lib/lib-font.browser.js +32 -2
- package/lib/unbrotli.js +1818 -2458
- package/package.json +41 -41
- package/src/components/add-new-pattern/index.js +38 -23
- package/src/components/{add-new-page → add-new-post}/index.js +42 -18
- package/src/components/block-editor/style.scss +0 -11
- package/src/components/block-editor/use-site-editor-settings.js +33 -28
- package/src/components/editor/index.js +34 -20
- package/src/components/editor-canvas-container/index.js +20 -8
- package/src/components/global-styles/background-panel.js +0 -8
- package/src/components/global-styles/font-families.js +28 -19
- package/src/components/global-styles/font-library-modal/context.js +2 -2
- package/src/components/global-styles/font-library-modal/font-collection.js +17 -32
- package/src/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/src/components/global-styles/font-library-modal/style.scss +17 -10
- package/src/components/global-styles/hooks.js +0 -41
- package/src/components/global-styles/preview-typography.js +39 -0
- package/src/components/global-styles/screen-block.js +22 -0
- package/src/components/global-styles/screen-layout.js +5 -1
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/src/components/global-styles/shadows-edit-panel.js +1 -2
- package/src/components/global-styles/style-variations-container.js +10 -7
- package/src/components/global-styles/style.scss +2 -1
- package/src/components/global-styles/typography-elements.js +0 -4
- package/src/components/global-styles/variations/variation.js +41 -26
- package/src/components/global-styles/variations/variations-color.js +6 -3
- package/src/components/global-styles/variations/variations-typography.js +16 -32
- package/src/components/global-styles-sidebar/index.js +2 -2
- package/src/components/layout/index.js +13 -4
- package/src/components/layout/router.js +20 -36
- package/src/components/layout/style.scss +12 -0
- package/src/components/page-patterns/index.js +55 -58
- package/src/components/page-patterns/rename-category-menu-item.js +2 -0
- package/src/components/page-patterns/search-items.js +37 -3
- package/src/components/page-patterns/style.scss +1 -8
- package/src/components/page-patterns/use-patterns.js +43 -82
- package/src/components/page-templates/index.js +26 -21
- package/src/components/page-templates/style.scss +1 -6
- package/src/components/pagination/index.js +4 -4
- package/src/components/posts-app/index.js +9 -11
- package/src/components/{page-pages/index.js → posts-app/posts-list.js} +163 -42
- package/src/components/posts-app/router.js +69 -0
- package/src/components/{page-pages → posts-app}/style.scss +22 -8
- package/src/components/revisions/index.js +9 -1
- package/src/components/save-panel/index.js +1 -1
- package/src/components/sidebar/style.scss +6 -0
- package/src/components/sidebar-dataviews/add-new-view.js +2 -1
- package/src/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
- package/src/components/sidebar-dataviews/default-views.js +119 -98
- package/src/components/sidebar-dataviews/index.js +3 -3
- package/src/components/sidebar-navigation-screen-global-styles/index.js +7 -6
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +8 -2
- package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +10 -2
- package/src/components/site-hub/index.js +84 -1
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -2
- package/src/deprecated.js +14 -0
- package/src/hooks/commands/use-set-command-context.js +12 -0
- package/src/hooks/push-changes-to-global-styles/index.js +1 -1
- package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +28 -24
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +72 -47
- package/src/index.js +8 -1
- package/src/lock-unlock.js +1 -1
- package/src/posts.js +63 -2
- package/src/posts.scss +9 -0
- package/src/store/private-actions.js +7 -3
- package/src/style.scss +14 -2
- package/build/components/add-new-page/index.js.map +0 -1
- package/build/components/page-pages/index.js.map +0 -1
- package/build/components/table/index.js +0 -35
- package/build/components/table/index.js.map +0 -1
- package/build-module/components/add-new-page/index.js.map +0 -1
- package/build-module/components/page-pages/index.js.map +0 -1
- package/build-module/components/table/index.js +0 -30
- package/build-module/components/table/index.js.map +0 -1
- package/src/components/table/index.js +0 -33
- package/src/components/table/style.scss +0 -38
|
@@ -5,11 +5,9 @@ import { __ } from '@wordpress/i18n';
|
|
|
5
5
|
import {
|
|
6
6
|
__experimentalItemGroup as ItemGroup,
|
|
7
7
|
__experimentalVStack as VStack,
|
|
8
|
-
__experimentalHStack as HStack,
|
|
9
8
|
Button,
|
|
10
9
|
} from '@wordpress/components';
|
|
11
10
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
12
|
-
import { settings } from '@wordpress/icons';
|
|
13
11
|
import { useContext } from '@wordpress/element';
|
|
14
12
|
|
|
15
13
|
/**
|
|
@@ -51,30 +49,41 @@ function FontFamilies() {
|
|
|
51
49
|
) }
|
|
52
50
|
|
|
53
51
|
<VStack spacing={ 2 }>
|
|
54
|
-
<
|
|
55
|
-
<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
|
|
56
|
-
<Button
|
|
57
|
-
onClick={ () => setModalTabOpen( 'installed-fonts' ) }
|
|
58
|
-
label={ __( 'Manage fonts' ) }
|
|
59
|
-
icon={ settings }
|
|
60
|
-
size="small"
|
|
61
|
-
/>
|
|
62
|
-
</HStack>
|
|
52
|
+
<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>
|
|
63
53
|
{ hasFonts ? (
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
54
|
+
<>
|
|
55
|
+
<ItemGroup isBordered isSeparated>
|
|
56
|
+
{ customFonts.map( ( font ) => (
|
|
57
|
+
<FontFamilyItem
|
|
58
|
+
key={ font.slug }
|
|
59
|
+
font={ font }
|
|
60
|
+
/>
|
|
61
|
+
) ) }
|
|
62
|
+
{ themeFonts.map( ( font ) => (
|
|
63
|
+
<FontFamilyItem
|
|
64
|
+
key={ font.slug }
|
|
65
|
+
font={ font }
|
|
66
|
+
/>
|
|
67
|
+
) ) }
|
|
68
|
+
</ItemGroup>
|
|
69
|
+
<Button
|
|
70
|
+
className="edit-site-global-styles-font-families__manage-fonts"
|
|
71
|
+
variant="secondary"
|
|
72
|
+
__next40pxDefaultSize
|
|
73
|
+
onClick={ () =>
|
|
74
|
+
setModalTabOpen( 'installed-fonts' )
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
{ __( 'Manage fonts' ) }
|
|
78
|
+
</Button>
|
|
79
|
+
</>
|
|
72
80
|
) : (
|
|
73
81
|
<>
|
|
74
82
|
{ __( 'No fonts installed.' ) }
|
|
75
83
|
<Button
|
|
76
84
|
className="edit-site-global-styles-font-families__add-fonts"
|
|
77
85
|
variant="secondary"
|
|
86
|
+
__next40pxDefaultSize
|
|
78
87
|
onClick={ () => setModalTabOpen( 'upload-fonts' ) }
|
|
79
88
|
>
|
|
80
89
|
{ __( 'Add fonts' ) }
|
|
@@ -451,13 +451,13 @@ function FontLibraryProvider( { children } ) {
|
|
|
451
451
|
);
|
|
452
452
|
|
|
453
453
|
if ( isFaceActivated ) {
|
|
454
|
+
unloadFontFaceInBrowser( face, 'all' );
|
|
455
|
+
} else {
|
|
454
456
|
loadFontFaceInBrowser(
|
|
455
457
|
face,
|
|
456
458
|
getDisplaySrcFromFontFace( face?.src ),
|
|
457
459
|
'all'
|
|
458
460
|
);
|
|
459
|
-
} else {
|
|
460
|
-
unloadFontFaceInBrowser( face, 'all' );
|
|
461
461
|
}
|
|
462
462
|
};
|
|
463
463
|
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from '@wordpress/components';
|
|
29
29
|
import { debounce } from '@wordpress/compose';
|
|
30
30
|
import { sprintf, __, _x } from '@wordpress/i18n';
|
|
31
|
-
import { moreVertical, chevronLeft } from '@wordpress/icons';
|
|
31
|
+
import { moreVertical, chevronLeft, chevronRight } from '@wordpress/icons';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Internal dependencies
|
|
@@ -429,7 +429,7 @@ function FontCollection( { slug } ) {
|
|
|
429
429
|
{ selectedFont && (
|
|
430
430
|
<Flex
|
|
431
431
|
justify="flex-end"
|
|
432
|
-
className="font-library-
|
|
432
|
+
className="font-library-modal__footer"
|
|
433
433
|
>
|
|
434
434
|
<Button
|
|
435
435
|
variant="primary"
|
|
@@ -438,7 +438,7 @@ function FontCollection( { slug } ) {
|
|
|
438
438
|
disabled={
|
|
439
439
|
fontsToInstall.length === 0 || isInstalling
|
|
440
440
|
}
|
|
441
|
-
|
|
441
|
+
accessibleWhenDisabled
|
|
442
442
|
>
|
|
443
443
|
{ __( 'Install' ) }
|
|
444
444
|
</Button>
|
|
@@ -446,32 +446,26 @@ function FontCollection( { slug } ) {
|
|
|
446
446
|
) }
|
|
447
447
|
|
|
448
448
|
{ ! selectedFont && (
|
|
449
|
-
<
|
|
449
|
+
<HStack
|
|
450
|
+
spacing={ 4 }
|
|
450
451
|
justify="center"
|
|
451
|
-
className="font-library-
|
|
452
|
+
className="font-library-modal__footer"
|
|
452
453
|
>
|
|
453
|
-
<Button
|
|
454
|
-
label={ __( 'First page' ) }
|
|
455
|
-
size="compact"
|
|
456
|
-
onClick={ () => setPage( 1 ) }
|
|
457
|
-
disabled={ page === 1 }
|
|
458
|
-
__experimentalIsFocusable
|
|
459
|
-
>
|
|
460
|
-
<span>«</span>
|
|
461
|
-
</Button>
|
|
462
454
|
<Button
|
|
463
455
|
label={ __( 'Previous page' ) }
|
|
464
456
|
size="compact"
|
|
465
457
|
onClick={ () => setPage( page - 1 ) }
|
|
466
458
|
disabled={ page === 1 }
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
459
|
+
showTooltip
|
|
460
|
+
accessibleWhenDisabled
|
|
461
|
+
icon={ chevronLeft }
|
|
462
|
+
tooltipPosition="top"
|
|
463
|
+
/>
|
|
471
464
|
<HStack
|
|
472
465
|
justify="flex-start"
|
|
473
466
|
expanded={ false }
|
|
474
467
|
spacing={ 2 }
|
|
468
|
+
className="font-library-modal__page-selection"
|
|
475
469
|
>
|
|
476
470
|
{ createInterpolateElement(
|
|
477
471
|
sprintf(
|
|
@@ -514,20 +508,11 @@ function FontCollection( { slug } ) {
|
|
|
514
508
|
size="compact"
|
|
515
509
|
onClick={ () => setPage( page + 1 ) }
|
|
516
510
|
disabled={ page === totalPages }
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
label={ __( 'Last page' ) }
|
|
523
|
-
size="compact"
|
|
524
|
-
onClick={ () => setPage( totalPages ) }
|
|
525
|
-
disabled={ page === totalPages }
|
|
526
|
-
__experimentalIsFocusable
|
|
527
|
-
>
|
|
528
|
-
<span>»</span>
|
|
529
|
-
</Button>
|
|
530
|
-
</Flex>
|
|
511
|
+
accessibleWhenDisabled
|
|
512
|
+
icon={ chevronRight }
|
|
513
|
+
tooltipPosition="top"
|
|
514
|
+
/>
|
|
515
|
+
</HStack>
|
|
531
516
|
) }
|
|
532
517
|
</>
|
|
533
518
|
) }
|
|
@@ -311,7 +311,7 @@ function InstalledFonts() {
|
|
|
311
311
|
|
|
312
312
|
<HStack
|
|
313
313
|
justify="flex-end"
|
|
314
|
-
className="font-library-
|
|
314
|
+
className="font-library-modal__footer"
|
|
315
315
|
>
|
|
316
316
|
{ isInstalling && <ProgressBar /> }
|
|
317
317
|
{ shouldDisplayDeleteButton && (
|
|
@@ -329,7 +329,7 @@ function InstalledFonts() {
|
|
|
329
329
|
saveFontFamilies( fontFamilies );
|
|
330
330
|
} }
|
|
331
331
|
disabled={ ! fontFamiliesHasChanges }
|
|
332
|
-
|
|
332
|
+
accessibleWhenDisabled
|
|
333
333
|
>
|
|
334
334
|
{ __( 'Update' ) }
|
|
335
335
|
</Button>
|
|
@@ -49,17 +49,24 @@ $footer-height: 70px;
|
|
|
49
49
|
// It should be 120px (72px modal header height + 48px tab height)
|
|
50
50
|
padding-top: $header-height + $grid-unit-15 + $grid-unit-60;
|
|
51
51
|
}
|
|
52
|
+
}
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
.font-library-modal__footer {
|
|
55
|
+
border-top: 1px solid $gray-300;
|
|
56
|
+
margin: 0 #{$grid-unit-40 * -1} #{$grid-unit-40 * -1};
|
|
57
|
+
padding: $grid-unit-20 $grid-unit-40;
|
|
58
|
+
position: absolute;
|
|
59
|
+
bottom: $grid-unit-40;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: $footer-height;
|
|
62
|
+
background-color: $white;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.font-library-modal__page-selection {
|
|
66
|
+
font-size: 11px;
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
color: $gray-900;
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
.font-library-modal__tabpanel-layout .components-base-control__field {
|
|
@@ -9,12 +9,10 @@ import a11yPlugin from 'colord/plugins/a11y';
|
|
|
9
9
|
*/
|
|
10
10
|
import { store as blocksStore } from '@wordpress/blocks';
|
|
11
11
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
12
|
-
import { __ } from '@wordpress/i18n';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Internal dependencies
|
|
16
15
|
*/
|
|
17
|
-
import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
|
|
18
16
|
import { unlock } from '../../lock-unlock';
|
|
19
17
|
import { useSelect } from '@wordpress/data';
|
|
20
18
|
|
|
@@ -111,42 +109,3 @@ export function useSupportedStyles( name, element ) {
|
|
|
111
109
|
|
|
112
110
|
return supportedPanels;
|
|
113
111
|
}
|
|
114
|
-
|
|
115
|
-
export function useColorVariations() {
|
|
116
|
-
const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig( {
|
|
117
|
-
property: 'color',
|
|
118
|
-
} );
|
|
119
|
-
/*
|
|
120
|
-
* Filter out variations with no settings or styles.
|
|
121
|
-
*/
|
|
122
|
-
return colorVariations?.length
|
|
123
|
-
? colorVariations.filter( ( variation ) => {
|
|
124
|
-
const { settings, styles, title } = variation;
|
|
125
|
-
return (
|
|
126
|
-
title === __( 'Default' ) || // Always preseve the default variation.
|
|
127
|
-
Object.keys( settings ).length > 0 ||
|
|
128
|
-
Object.keys( styles ).length > 0
|
|
129
|
-
);
|
|
130
|
-
} )
|
|
131
|
-
: [];
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export function useTypographyVariations() {
|
|
135
|
-
const typographyVariations =
|
|
136
|
-
useCurrentMergeThemeStyleVariationsWithUserConfig( {
|
|
137
|
-
property: 'typography',
|
|
138
|
-
} );
|
|
139
|
-
/*
|
|
140
|
-
* Filter out variations with no settings or styles.
|
|
141
|
-
*/
|
|
142
|
-
return typographyVariations?.length
|
|
143
|
-
? typographyVariations.filter( ( variation ) => {
|
|
144
|
-
const { settings, styles, title } = variation;
|
|
145
|
-
return (
|
|
146
|
-
title === __( 'Default' ) || // Always preseve the default variation.
|
|
147
|
-
Object.keys( settings ).length > 0 ||
|
|
148
|
-
Object.keys( styles ).length > 0
|
|
149
|
-
);
|
|
150
|
-
} )
|
|
151
|
-
: [];
|
|
152
|
-
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __experimentalHStack as HStack } from '@wordpress/components';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import TypographyExample from './typography-example';
|
|
10
|
+
import PreviewIframe from './preview-iframe';
|
|
11
|
+
|
|
12
|
+
const StylesPreviewTypography = ( { variation, isFocused, withHoverView } ) => {
|
|
13
|
+
return (
|
|
14
|
+
<PreviewIframe
|
|
15
|
+
label={ variation.title }
|
|
16
|
+
isFocused={ isFocused }
|
|
17
|
+
withHoverView={ withHoverView }
|
|
18
|
+
>
|
|
19
|
+
{ ( { ratio, key } ) => (
|
|
20
|
+
<HStack
|
|
21
|
+
key={ key }
|
|
22
|
+
spacing={ 10 * ratio }
|
|
23
|
+
justify="center"
|
|
24
|
+
style={ {
|
|
25
|
+
height: '100%',
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
} }
|
|
28
|
+
>
|
|
29
|
+
<TypographyExample
|
|
30
|
+
variation={ variation }
|
|
31
|
+
fontSize={ 85 * ratio }
|
|
32
|
+
/>
|
|
33
|
+
</HStack>
|
|
34
|
+
) }
|
|
35
|
+
</PreviewIframe>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default StylesPreviewTypography;
|
|
@@ -25,6 +25,11 @@ import {
|
|
|
25
25
|
VariationsPanel,
|
|
26
26
|
} from './variations/variations-panel';
|
|
27
27
|
|
|
28
|
+
// Initial control values where no block style is set.
|
|
29
|
+
const BACKGROUND_BLOCK_DEFAULT_VALUES = {
|
|
30
|
+
backgroundSize: 'cover',
|
|
31
|
+
};
|
|
32
|
+
|
|
28
33
|
function applyFallbackStyle( border ) {
|
|
29
34
|
if ( ! border ) {
|
|
30
35
|
return border;
|
|
@@ -70,6 +75,8 @@ const {
|
|
|
70
75
|
useHasFiltersPanel,
|
|
71
76
|
useHasImageSettingsPanel,
|
|
72
77
|
useGlobalStyle,
|
|
78
|
+
useHasBackgroundPanel,
|
|
79
|
+
BackgroundPanel: StylesBackgroundPanel,
|
|
73
80
|
BorderPanel: StylesBorderPanel,
|
|
74
81
|
ColorPanel: StylesColorPanel,
|
|
75
82
|
TypographyPanel: StylesTypographyPanel,
|
|
@@ -121,6 +128,7 @@ function ScreenBlock( { name, variation } ) {
|
|
|
121
128
|
}
|
|
122
129
|
|
|
123
130
|
const blockVariations = useBlockVariations( name );
|
|
131
|
+
const hasBackgroundPanel = useHasBackgroundPanel( settings );
|
|
124
132
|
const hasTypographyPanel = useHasTypographyPanel( settings );
|
|
125
133
|
const hasColorPanel = useHasColorPanel( settings );
|
|
126
134
|
const hasBorderPanel = useHasBorderPanel( settings );
|
|
@@ -296,6 +304,20 @@ function ScreenBlock( { name, variation } ) {
|
|
|
296
304
|
/>
|
|
297
305
|
) }
|
|
298
306
|
|
|
307
|
+
{ hasBackgroundPanel && (
|
|
308
|
+
<StylesBackgroundPanel
|
|
309
|
+
inheritedValue={ inheritedStyle }
|
|
310
|
+
value={ style }
|
|
311
|
+
onChange={ setStyle }
|
|
312
|
+
settings={ settings }
|
|
313
|
+
defaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }
|
|
314
|
+
defaultControls={
|
|
315
|
+
blockType?.supports?.background
|
|
316
|
+
?.__experimentalDefaultControls
|
|
317
|
+
}
|
|
318
|
+
/>
|
|
319
|
+
) }
|
|
320
|
+
|
|
299
321
|
{ canEditCSS && (
|
|
300
322
|
<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>
|
|
301
323
|
<p>
|
|
@@ -23,7 +23,11 @@ function ScreenLayout() {
|
|
|
23
23
|
const [ rawSettings ] = useGlobalSetting( '' );
|
|
24
24
|
const settings = useSettingsForBlockElement( rawSettings );
|
|
25
25
|
const hasDimensionsPanel = useHasDimensionsPanel( settings );
|
|
26
|
-
|
|
26
|
+
/*
|
|
27
|
+
* Use the raw settings to determine if the background panel should be displayed,
|
|
28
|
+
* as the background panel is not dependent on the block element settings.
|
|
29
|
+
*/
|
|
30
|
+
const hasBackgroundPanel = useHasBackgroundPanel( rawSettings );
|
|
27
31
|
return (
|
|
28
32
|
<>
|
|
29
33
|
<ScreenHeader title={ __( 'Layout' ) } />
|
|
@@ -163,7 +163,7 @@ function RevisionsButtons( {
|
|
|
163
163
|
>
|
|
164
164
|
<Button
|
|
165
165
|
className="edit-site-global-styles-screen-revisions__revision-button"
|
|
166
|
-
|
|
166
|
+
accessibleWhenDisabled
|
|
167
167
|
disabled={ isSelected }
|
|
168
168
|
onClick={ () => {
|
|
169
169
|
onChange( revision );
|
|
@@ -371,8 +371,7 @@ function ShadowItem( { shadow, onChange, canRemove, onRemove } ) {
|
|
|
371
371
|
'edit-site-global-styles__shadow-editor__remove-button',
|
|
372
372
|
{ 'is-open': isOpen }
|
|
373
373
|
),
|
|
374
|
-
|
|
375
|
-
tooltip: __( 'Remove shadow' ),
|
|
374
|
+
label: __( 'Remove shadow' ),
|
|
376
375
|
};
|
|
377
376
|
|
|
378
377
|
return (
|
|
@@ -13,7 +13,7 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
|
13
13
|
*/
|
|
14
14
|
import PreviewStyles from './preview-styles';
|
|
15
15
|
import Variation from './variations/variation';
|
|
16
|
-
import {
|
|
16
|
+
import { isVariationWithProperties } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
|
|
17
17
|
import { unlock } from '../../lock-unlock';
|
|
18
18
|
|
|
19
19
|
const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
|
|
@@ -33,11 +33,14 @@ export default function StyleVariationsContainer( { gap = 2 } ) {
|
|
|
33
33
|
).__experimentalGetCurrentThemeGlobalStylesVariations();
|
|
34
34
|
}, [] );
|
|
35
35
|
|
|
36
|
-
// Filter out variations that are
|
|
37
|
-
const
|
|
36
|
+
// Filter out variations that are color or typography variations.
|
|
37
|
+
const fullStyleVariations = variations?.filter( ( variation ) => {
|
|
38
38
|
return (
|
|
39
|
-
!
|
|
40
|
-
!
|
|
39
|
+
! isVariationWithProperties( variation, [ 'color' ] ) &&
|
|
40
|
+
! isVariationWithProperties( variation, [
|
|
41
|
+
'typography',
|
|
42
|
+
'spacing',
|
|
43
|
+
] )
|
|
41
44
|
);
|
|
42
45
|
} );
|
|
43
46
|
|
|
@@ -48,7 +51,7 @@ export default function StyleVariationsContainer( { gap = 2 } ) {
|
|
|
48
51
|
settings: {},
|
|
49
52
|
styles: {},
|
|
50
53
|
},
|
|
51
|
-
...(
|
|
54
|
+
...( fullStyleVariations ?? [] ),
|
|
52
55
|
];
|
|
53
56
|
return [
|
|
54
57
|
...withEmptyVariation.map( ( variation ) => {
|
|
@@ -105,7 +108,7 @@ export default function StyleVariationsContainer( { gap = 2 } ) {
|
|
|
105
108
|
};
|
|
106
109
|
} ),
|
|
107
110
|
];
|
|
108
|
-
}, [
|
|
111
|
+
}, [ fullStyleVariations, userStyles?.blocks, userStyles?.css ] );
|
|
109
112
|
|
|
110
113
|
return (
|
|
111
114
|
<Grid
|
|
@@ -31,9 +31,6 @@ function ElementItem( { parentMenu, element, label } ) {
|
|
|
31
31
|
const [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );
|
|
32
32
|
const [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );
|
|
33
33
|
const [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );
|
|
34
|
-
const [ letterSpacing ] = useGlobalStyle(
|
|
35
|
-
prefix + 'typography.letterSpacing'
|
|
36
|
-
);
|
|
37
34
|
const [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );
|
|
38
35
|
const [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );
|
|
39
36
|
const [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );
|
|
@@ -62,7 +59,6 @@ function ElementItem( { parentMenu, element, label } ) {
|
|
|
62
59
|
color,
|
|
63
60
|
fontStyle,
|
|
64
61
|
fontWeight,
|
|
65
|
-
letterSpacing,
|
|
66
62
|
...extraStyles,
|
|
67
63
|
} }
|
|
68
64
|
>
|
|
@@ -6,6 +6,7 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
+
import { Tooltip } from '@wordpress/components';
|
|
9
10
|
import { useMemo, useContext, useState } from '@wordpress/element';
|
|
10
11
|
import { ENTER } from '@wordpress/keycodes';
|
|
11
12
|
import { __, sprintf } from '@wordpress/i18n';
|
|
@@ -15,7 +16,7 @@ import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
|
15
16
|
/**
|
|
16
17
|
* Internal dependencies
|
|
17
18
|
*/
|
|
18
|
-
import {
|
|
19
|
+
import { filterObjectByProperties } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
|
|
19
20
|
import { unlock } from '../../../lock-unlock';
|
|
20
21
|
|
|
21
22
|
const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
|
|
@@ -23,14 +24,20 @@ const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
|
|
|
23
24
|
blockEditorPrivateApis
|
|
24
25
|
);
|
|
25
26
|
|
|
26
|
-
export default function Variation( {
|
|
27
|
+
export default function Variation( {
|
|
28
|
+
variation,
|
|
29
|
+
children,
|
|
30
|
+
isPill,
|
|
31
|
+
properties,
|
|
32
|
+
showTooltip,
|
|
33
|
+
} ) {
|
|
27
34
|
const [ isFocused, setIsFocused ] = useState( false );
|
|
28
35
|
const { base, user, setUserConfig } = useContext( GlobalStylesContext );
|
|
29
36
|
|
|
30
37
|
const context = useMemo( () => {
|
|
31
38
|
let merged = mergeBaseAndUserConfigs( base, variation );
|
|
32
|
-
if (
|
|
33
|
-
merged =
|
|
39
|
+
if ( properties ) {
|
|
40
|
+
merged = filterObjectByProperties( merged, properties );
|
|
34
41
|
}
|
|
35
42
|
return {
|
|
36
43
|
user: variation,
|
|
@@ -38,7 +45,7 @@ export default function Variation( { variation, children, isPill, property } ) {
|
|
|
38
45
|
merged,
|
|
39
46
|
setUserConfig: () => {},
|
|
40
47
|
};
|
|
41
|
-
}, [ variation, base,
|
|
48
|
+
}, [ variation, base, properties ] );
|
|
42
49
|
|
|
43
50
|
const selectVariation = () => setUserConfig( variation );
|
|
44
51
|
|
|
@@ -64,30 +71,38 @@ export default function Variation( { variation, children, isPill, property } ) {
|
|
|
64
71
|
);
|
|
65
72
|
}
|
|
66
73
|
|
|
67
|
-
|
|
68
|
-
<
|
|
74
|
+
const content = (
|
|
75
|
+
<div
|
|
76
|
+
className={ clsx( 'edit-site-global-styles-variations_item', {
|
|
77
|
+
'is-active': isActive,
|
|
78
|
+
} ) }
|
|
79
|
+
role="button"
|
|
80
|
+
onClick={ selectVariation }
|
|
81
|
+
onKeyDown={ selectOnEnter }
|
|
82
|
+
tabIndex="0"
|
|
83
|
+
aria-label={ label }
|
|
84
|
+
aria-current={ isActive }
|
|
85
|
+
onFocus={ () => setIsFocused( true ) }
|
|
86
|
+
onBlur={ () => setIsFocused( false ) }
|
|
87
|
+
>
|
|
69
88
|
<div
|
|
70
|
-
className={ clsx(
|
|
71
|
-
'
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
onClick={ selectVariation }
|
|
75
|
-
onKeyDown={ selectOnEnter }
|
|
76
|
-
tabIndex="0"
|
|
77
|
-
aria-label={ label }
|
|
78
|
-
aria-current={ isActive }
|
|
79
|
-
onFocus={ () => setIsFocused( true ) }
|
|
80
|
-
onBlur={ () => setIsFocused( false ) }
|
|
89
|
+
className={ clsx(
|
|
90
|
+
'edit-site-global-styles-variations_item-preview',
|
|
91
|
+
{ 'is-pill': isPill }
|
|
92
|
+
) }
|
|
81
93
|
>
|
|
82
|
-
|
|
83
|
-
className={ clsx(
|
|
84
|
-
'edit-site-global-styles-variations_item-preview',
|
|
85
|
-
{ 'is-pill': isPill }
|
|
86
|
-
) }
|
|
87
|
-
>
|
|
88
|
-
{ children( isFocused ) }
|
|
89
|
-
</div>
|
|
94
|
+
{ children( isFocused ) }
|
|
90
95
|
</div>
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<GlobalStylesContext.Provider value={ context }>
|
|
101
|
+
{ showTooltip ? (
|
|
102
|
+
<Tooltip text={ variation?.title }>{ content }</Tooltip>
|
|
103
|
+
) : (
|
|
104
|
+
content
|
|
105
|
+
) }
|
|
91
106
|
</GlobalStylesContext.Provider>
|
|
92
107
|
);
|
|
93
108
|
}
|
|
@@ -10,12 +10,14 @@ import {
|
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
12
|
import StylesPreviewColors from '../preview-colors';
|
|
13
|
-
import {
|
|
13
|
+
import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
|
|
14
14
|
import Subtitle from '../subtitle';
|
|
15
15
|
import Variation from './variation';
|
|
16
16
|
|
|
17
17
|
export default function ColorVariations( { title, gap = 2 } ) {
|
|
18
|
-
const
|
|
18
|
+
const propertiesToFilter = [ 'color' ];
|
|
19
|
+
const colorVariations =
|
|
20
|
+
useCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );
|
|
19
21
|
|
|
20
22
|
// Return null if there is only one variation (the default).
|
|
21
23
|
if ( colorVariations?.length <= 1 ) {
|
|
@@ -31,7 +33,8 @@ export default function ColorVariations( { title, gap = 2 } ) {
|
|
|
31
33
|
key={ index }
|
|
32
34
|
variation={ variation }
|
|
33
35
|
isPill
|
|
34
|
-
|
|
36
|
+
properties={ propertiesToFilter }
|
|
37
|
+
showTooltip
|
|
35
38
|
>
|
|
36
39
|
{ () => <StylesPreviewColors /> }
|
|
37
40
|
</Variation>
|