@wordpress/edit-site 6.7.1-next.1f6eadc42.0 → 6.8.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.
Files changed (113) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/editor/index.js +1 -5
  3. package/build/components/editor/index.js.map +1 -1
  4. package/build/components/editor-canvas-container/index.js +6 -17
  5. package/build/components/editor-canvas-container/index.js.map +1 -1
  6. package/build/components/global-styles/font-library-modal/font-card.js +2 -4
  7. package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
  8. package/build/components/global-styles/font-library-modal/font-collection.js +2 -4
  9. package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  10. package/build/components/global-styles/font-library-modal/index.js +28 -28
  11. package/build/components/global-styles/font-library-modal/index.js.map +1 -1
  12. package/build/components/global-styles/font-library-modal/installed-fonts.js +4 -8
  13. package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  14. package/build/components/global-styles/font-library-modal/upload-fonts.js +2 -4
  15. package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  16. package/build/components/global-styles/palette.js +2 -4
  17. package/build/components/global-styles/palette.js.map +1 -1
  18. package/build/components/global-styles/root-menu.js +12 -1
  19. package/build/components/global-styles/root-menu.js.map +1 -1
  20. package/build/components/global-styles/screen-background.js +40 -0
  21. package/build/components/global-styles/screen-background.js.map +1 -0
  22. package/build/components/global-styles/screen-layout.js +1 -8
  23. package/build/components/global-styles/screen-layout.js.map +1 -1
  24. package/build/components/global-styles/screen-revisions/revisions-buttons.js +2 -4
  25. package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  26. package/build/components/global-styles/screen-root.js +3 -0
  27. package/build/components/global-styles/screen-root.js.map +1 -1
  28. package/build/components/global-styles/shadows-edit-panel.js +14 -58
  29. package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
  30. package/build/components/global-styles/ui.js +4 -0
  31. package/build/components/global-styles/ui.js.map +1 -1
  32. package/build/components/post-list/index.js +35 -2
  33. package/build/components/post-list/index.js.map +1 -1
  34. package/build/components/sidebar-dataviews/dataview-item.js +3 -1
  35. package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
  36. package/build/components/sidebar-dataviews/default-views.js +79 -47
  37. package/build/components/sidebar-dataviews/default-views.js.map +1 -1
  38. package/build/components/sidebar-dataviews/index.js +4 -1
  39. package/build/components/sidebar-dataviews/index.js.map +1 -1
  40. package/build/hooks/push-changes-to-global-styles/index.js +1 -0
  41. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  42. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -0
  43. package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  44. package/build-module/components/editor/index.js +2 -6
  45. package/build-module/components/editor/index.js.map +1 -1
  46. package/build-module/components/editor-canvas-container/index.js +7 -18
  47. package/build-module/components/editor-canvas-container/index.js.map +1 -1
  48. package/build-module/components/global-styles/font-library-modal/font-card.js +2 -4
  49. package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
  50. package/build-module/components/global-styles/font-library-modal/font-collection.js +2 -4
  51. package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
  52. package/build-module/components/global-styles/font-library-modal/index.js +28 -28
  53. package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
  54. package/build-module/components/global-styles/font-library-modal/installed-fonts.js +4 -8
  55. package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
  56. package/build-module/components/global-styles/font-library-modal/upload-fonts.js +2 -4
  57. package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
  58. package/build-module/components/global-styles/palette.js +2 -4
  59. package/build-module/components/global-styles/palette.js.map +1 -1
  60. package/build-module/components/global-styles/root-menu.js +13 -2
  61. package/build-module/components/global-styles/root-menu.js.map +1 -1
  62. package/build-module/components/global-styles/screen-background.js +34 -0
  63. package/build-module/components/global-styles/screen-background.js.map +1 -0
  64. package/build-module/components/global-styles/screen-layout.js +1 -8
  65. package/build-module/components/global-styles/screen-layout.js.map +1 -1
  66. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +2 -4
  67. package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
  68. package/build-module/components/global-styles/screen-root.js +3 -0
  69. package/build-module/components/global-styles/screen-root.js.map +1 -1
  70. package/build-module/components/global-styles/shadows-edit-panel.js +17 -61
  71. package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
  72. package/build-module/components/global-styles/ui.js +4 -0
  73. package/build-module/components/global-styles/ui.js.map +1 -1
  74. package/build-module/components/post-list/index.js +35 -2
  75. package/build-module/components/post-list/index.js.map +1 -1
  76. package/build-module/components/sidebar-dataviews/dataview-item.js +3 -1
  77. package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
  78. package/build-module/components/sidebar-dataviews/default-views.js +79 -48
  79. package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
  80. package/build-module/components/sidebar-dataviews/index.js +5 -2
  81. package/build-module/components/sidebar-dataviews/index.js.map +1 -1
  82. package/build-module/hooks/push-changes-to-global-styles/index.js +1 -0
  83. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  84. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +1 -0
  85. package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
  86. package/build-style/posts-rtl.css +5 -5
  87. package/build-style/posts.css +5 -5
  88. package/build-style/style-rtl.css +15 -19
  89. package/build-style/style.css +15 -19
  90. package/package.json +41 -41
  91. package/src/components/editor/index.js +2 -4
  92. package/src/components/editor-canvas-container/index.js +7 -18
  93. package/src/components/global-styles/font-library-modal/font-card.js +1 -2
  94. package/src/components/global-styles/font-library-modal/font-collection.js +1 -2
  95. package/src/components/global-styles/font-library-modal/index.js +26 -26
  96. package/src/components/global-styles/font-library-modal/installed-fonts.js +2 -4
  97. package/src/components/global-styles/font-library-modal/style.scss +19 -12
  98. package/src/components/global-styles/font-library-modal/upload-fonts.js +1 -2
  99. package/src/components/global-styles/palette.js +1 -2
  100. package/src/components/global-styles/root-menu.js +16 -0
  101. package/src/components/global-styles/screen-background.js +37 -0
  102. package/src/components/global-styles/screen-layout.js +3 -13
  103. package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -2
  104. package/src/components/global-styles/screen-root.js +7 -3
  105. package/src/components/global-styles/shadows-edit-panel.js +11 -70
  106. package/src/components/global-styles/style.scss +8 -0
  107. package/src/components/global-styles/ui.js +5 -0
  108. package/src/components/post-list/index.js +48 -2
  109. package/src/components/sidebar-dataviews/dataview-item.js +2 -0
  110. package/src/components/sidebar-dataviews/default-views.js +92 -58
  111. package/src/components/sidebar-dataviews/index.js +7 -2
  112. package/src/components/sidebar-dataviews/style.scss +4 -0
  113. package/src/style.scss +0 -16
@@ -578,7 +578,7 @@
578
578
  margin: 0;
579
579
  }
580
580
 
581
- .dataviews-view-config {
581
+ .dataviews-view-config .components-popover__content {
582
582
  width: 320px;
583
583
  /* stylelint-disable-next-line property-no-unknown -- the linter needs to be updated to accepted the container-type property */
584
584
  container-type: inline-size;
@@ -1575,6 +1575,10 @@ ul.dataviews-view-list {
1575
1575
  fill: currentColor;
1576
1576
  }
1577
1577
 
1578
+ .edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile, .edit-site-global-styles-screen-root__active-style-tile.edit-site-global-styles-screen-root__active-style-tile .edit-site-global-styles-screen-root__active-style-tile-preview {
1579
+ border-radius: 2px;
1580
+ }
1581
+
1578
1582
  .edit-site-global-styles-screen-revisions__revisions-list {
1579
1583
  list-style: none;
1580
1584
  margin: 0 16px 16px 16px;
@@ -2529,7 +2533,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2529
2533
  contain: content;
2530
2534
  }
2531
2535
 
2532
- @keyframes _g2zts_slide-from-right {
2536
+ @keyframes _hn47y_slide-from-right {
2533
2537
  from {
2534
2538
  transform: translateX(50px);
2535
2539
  opacity: 0;
@@ -2539,7 +2543,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2539
2543
  opacity: 1;
2540
2544
  }
2541
2545
  }
2542
- @keyframes _g2zts_slide-from-left {
2546
+ @keyframes _hn47y_slide-from-left {
2543
2547
  from {
2544
2548
  transform: translateX(-50px);
2545
2549
  opacity: 0;
@@ -2595,10 +2599,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2595
2599
  }
2596
2600
  }
2597
2601
  .edit-site-sidebar__screen-wrapper.slide-from-left {
2598
- animation-name: _g2zts_slide-from-left;
2602
+ animation-name: _hn47y_slide-from-left;
2599
2603
  }
2600
2604
  .edit-site-sidebar__screen-wrapper.slide-from-right {
2601
- animation-name: _g2zts_slide-from-right;
2605
+ animation-name: _hn47y_slide-from-right;
2602
2606
  }
2603
2607
 
2604
2608
  .edit-site-sidebar-button {
@@ -2862,6 +2866,9 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
2862
2866
  .edit-site-sidebar-dataviews-dataview-item .edit-site-sidebar-dataviews-dataview-item__dropdown-menu {
2863
2867
  min-width: initial;
2864
2868
  }
2869
+ .edit-site-sidebar-dataviews-dataview-item .edit-site-sidebar-navigation-item.with-suffix {
2870
+ padding-right: 8px;
2871
+ }
2865
2872
  .edit-site-sidebar-dataviews-dataview-item:hover, .edit-site-sidebar-dataviews-dataview-item:focus, .edit-site-sidebar-dataviews-dataview-item[aria-current] {
2866
2873
  color: #e0e0e0;
2867
2874
  background: #2f2f2f;
@@ -3286,7 +3293,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
3286
3293
  .font-library-modal__font-card {
3287
3294
  border: 1px solid #e0e0e0;
3288
3295
  width: 100%;
3289
- height: auto;
3296
+ height: auto !important;
3290
3297
  padding: 16px;
3291
3298
  margin-top: -1px;
3292
3299
  /* To collapse the margin with the previous element */
@@ -3322,7 +3329,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
3322
3329
  padding-bottom: 16px;
3323
3330
  }
3324
3331
 
3325
- .font-library-modal__tabs [role=tablist] {
3332
+ .font-library-modal__tablist {
3326
3333
  position: sticky;
3327
3334
  top: 0;
3328
3335
  border-bottom: 1px solid #ddd;
@@ -3336,7 +3343,7 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
3336
3343
  align-items: center;
3337
3344
  display: flex;
3338
3345
  justify-content: center;
3339
- height: 256px;
3346
+ height: 256px !important;
3340
3347
  width: 100%;
3341
3348
  }
3342
3349
 
@@ -3514,17 +3521,6 @@ body.js.site-editor-php {
3514
3521
  top: 0;
3515
3522
  }
3516
3523
 
3517
- /**
3518
- * Animations
3519
- */
3520
- @keyframes edit-post__fade-in-animation {
3521
- from {
3522
- opacity: 0;
3523
- }
3524
- to {
3525
- opacity: 1;
3526
- }
3527
- }
3528
3524
  body.admin-color-light {
3529
3525
  --wp-admin-theme-color: #0085ba;
3530
3526
  --wp-admin-theme-color--rgb: 0, 133, 186;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "6.7.1-next.1f6eadc42.0",
3
+ "version": "6.8.0",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,45 +29,45 @@
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.16.0",
31
31
  "@react-spring/web": "^9.4.5",
32
- "@wordpress/a11y": "^4.7.1-next.1f6eadc42.0",
33
- "@wordpress/api-fetch": "^7.7.1-next.1f6eadc42.0",
34
- "@wordpress/blob": "^4.7.1-next.1f6eadc42.0",
35
- "@wordpress/block-editor": "^14.2.1-next.1f6eadc42.0",
36
- "@wordpress/block-library": "^9.7.1-next.1f6eadc42.0",
37
- "@wordpress/blocks": "^13.7.1-next.1f6eadc42.0",
38
- "@wordpress/commands": "^1.7.1-next.1f6eadc42.0",
39
- "@wordpress/components": "^28.8.1-next.1f6eadc42.0",
40
- "@wordpress/compose": "^7.8.1-next.1f6eadc42.0",
41
- "@wordpress/core-commands": "^1.7.1-next.1f6eadc42.0",
42
- "@wordpress/core-data": "^7.7.1-next.1f6eadc42.0",
43
- "@wordpress/data": "^10.7.1-next.1f6eadc42.0",
44
- "@wordpress/dataviews": "^4.3.1-next.1f6eadc42.0",
45
- "@wordpress/date": "^5.7.1-next.1f6eadc42.0",
46
- "@wordpress/deprecated": "^4.7.1-next.1f6eadc42.0",
47
- "@wordpress/dom": "^4.7.1-next.1f6eadc42.0",
48
- "@wordpress/editor": "^14.7.1-next.1f6eadc42.0",
49
- "@wordpress/element": "^6.7.1-next.1f6eadc42.0",
50
- "@wordpress/escape-html": "^3.7.1-next.1f6eadc42.0",
51
- "@wordpress/hooks": "^4.7.1-next.1f6eadc42.0",
52
- "@wordpress/html-entities": "^4.7.1-next.1f6eadc42.0",
53
- "@wordpress/i18n": "^5.7.1-next.1f6eadc42.0",
54
- "@wordpress/icons": "^10.7.1-next.1f6eadc42.0",
55
- "@wordpress/keyboard-shortcuts": "^5.7.1-next.1f6eadc42.0",
56
- "@wordpress/keycodes": "^4.7.1-next.1f6eadc42.0",
57
- "@wordpress/notices": "^5.7.1-next.1f6eadc42.0",
58
- "@wordpress/patterns": "^2.7.1-next.1f6eadc42.0",
59
- "@wordpress/plugins": "^7.7.1-next.1f6eadc42.0",
60
- "@wordpress/preferences": "^4.7.1-next.1f6eadc42.0",
61
- "@wordpress/primitives": "^4.7.1-next.1f6eadc42.0",
62
- "@wordpress/priority-queue": "^3.7.1-next.1f6eadc42.0",
63
- "@wordpress/private-apis": "^1.7.1-next.1f6eadc42.0",
64
- "@wordpress/reusable-blocks": "^5.7.1-next.1f6eadc42.0",
65
- "@wordpress/router": "^1.7.1-next.1f6eadc42.0",
66
- "@wordpress/style-engine": "^2.7.1-next.1f6eadc42.0",
67
- "@wordpress/url": "^4.7.1-next.1f6eadc42.0",
68
- "@wordpress/viewport": "^6.7.1-next.1f6eadc42.0",
69
- "@wordpress/widgets": "^4.7.1-next.1f6eadc42.0",
70
- "@wordpress/wordcount": "^4.7.1-next.1f6eadc42.0",
32
+ "@wordpress/a11y": "^4.8.0",
33
+ "@wordpress/api-fetch": "^7.8.0",
34
+ "@wordpress/blob": "^4.8.0",
35
+ "@wordpress/block-editor": "^14.3.0",
36
+ "@wordpress/block-library": "^9.8.0",
37
+ "@wordpress/blocks": "^13.8.0",
38
+ "@wordpress/commands": "^1.8.0",
39
+ "@wordpress/components": "^28.8.0",
40
+ "@wordpress/compose": "^7.8.0",
41
+ "@wordpress/core-commands": "^1.8.0",
42
+ "@wordpress/core-data": "^7.8.0",
43
+ "@wordpress/data": "^10.8.0",
44
+ "@wordpress/dataviews": "^4.4.0",
45
+ "@wordpress/date": "^5.8.0",
46
+ "@wordpress/deprecated": "^4.8.0",
47
+ "@wordpress/dom": "^4.8.0",
48
+ "@wordpress/editor": "^14.8.0",
49
+ "@wordpress/element": "^6.8.0",
50
+ "@wordpress/escape-html": "^3.8.0",
51
+ "@wordpress/hooks": "^4.8.0",
52
+ "@wordpress/html-entities": "^4.8.0",
53
+ "@wordpress/i18n": "^5.8.0",
54
+ "@wordpress/icons": "^10.8.0",
55
+ "@wordpress/keyboard-shortcuts": "^5.8.0",
56
+ "@wordpress/keycodes": "^4.8.0",
57
+ "@wordpress/notices": "^5.8.0",
58
+ "@wordpress/patterns": "^2.8.0",
59
+ "@wordpress/plugins": "^7.8.0",
60
+ "@wordpress/preferences": "^4.8.0",
61
+ "@wordpress/primitives": "^4.8.0",
62
+ "@wordpress/priority-queue": "^3.8.0",
63
+ "@wordpress/private-apis": "^1.8.0",
64
+ "@wordpress/reusable-blocks": "^5.8.0",
65
+ "@wordpress/router": "^1.8.0",
66
+ "@wordpress/style-engine": "^2.8.0",
67
+ "@wordpress/url": "^4.8.0",
68
+ "@wordpress/viewport": "^6.8.0",
69
+ "@wordpress/widgets": "^4.8.0",
70
+ "@wordpress/wordcount": "^4.8.0",
71
71
  "change-case": "^4.1.2",
72
72
  "clsx": "^2.1.1",
73
73
  "colord": "^2.9.2",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "960a22b909c9fdbc90e7435b7ba8947b9218837a"
85
+ "gitHead": "cecf5e14d317aa67407f77a7e5c8b6a43016bd42"
86
86
  }
@@ -37,7 +37,7 @@ import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
37
37
  import GlobalStylesSidebar from '../global-styles-sidebar';
38
38
  import { isPreviewingTheme } from '../../utils/is-previewing-theme';
39
39
  import {
40
- getEditorCanvasContainerTitleAndIcon,
40
+ getEditorCanvasContainerTitle,
41
41
  useHasEditorCanvasContainer,
42
42
  } from '../editor-canvas-container';
43
43
  import SaveButton from '../save-button';
@@ -204,8 +204,7 @@ export default function EditSiteEditor( { isPostsList = false } ) {
204
204
  );
205
205
 
206
206
  // Replace the title and icon displayed in the DocumentBar when there's an overlay visible.
207
- const { title, icon } =
208
- getEditorCanvasContainerTitleAndIcon( editorCanvasView );
207
+ const title = getEditorCanvasContainerTitle( editorCanvasView );
209
208
 
210
209
  const isReady = ! isLoading;
211
210
  const transition = {
@@ -238,7 +237,6 @@ export default function EditSiteEditor( { isPostsList = false } ) {
238
237
  customSavePanel={ _isPreviewingTheme && <SavePanel /> }
239
238
  forceDisableBlockTools={ ! hasDefaultEditorCanvasView }
240
239
  title={ title }
241
- icon={ icon }
242
240
  iframeProps={ iframeProps }
243
241
  onActionPerformed={ onActionPerformed }
244
242
  extraSidebarPanels={
@@ -9,7 +9,7 @@ import {
9
9
  import { ESCAPE } from '@wordpress/keycodes';
10
10
  import { __ } from '@wordpress/i18n';
11
11
  import { useDispatch, useSelect } from '@wordpress/data';
12
- import { backup, closeSmall, seen } from '@wordpress/icons';
12
+ import { closeSmall } from '@wordpress/icons';
13
13
  import { useFocusOnMount, useFocusReturn } from '@wordpress/compose';
14
14
  import { store as preferencesStore } from '@wordpress/preferences';
15
15
  import {
@@ -32,24 +32,15 @@ const { EditorContentSlotFill, ResizableEditor } = unlock( editorPrivateApis );
32
32
  *
33
33
  * @return {Object} Translated string for the view title and associated icon, both defaulting to ''.
34
34
  */
35
- function getEditorCanvasContainerTitleAndIcon( view ) {
35
+ function getEditorCanvasContainerTitle( view ) {
36
36
  switch ( view ) {
37
37
  case 'style-book':
38
- return {
39
- title: __( 'Style Book' ),
40
- icon: seen,
41
- };
38
+ return __( 'Style Book' );
42
39
  case 'global-styles-revisions':
43
40
  case 'global-styles-revisions:style-book':
44
- return {
45
- title: __( 'Style Revisions' ),
46
- icon: backup,
47
- };
41
+ return __( 'Style Revisions' );
48
42
  default:
49
- return {
50
- title: '',
51
- icon: '',
52
- };
43
+ return '';
53
44
  }
54
45
  }
55
46
 
@@ -118,9 +109,7 @@ function EditorCanvasContainer( {
118
109
  return null;
119
110
  }
120
111
 
121
- const { title } = getEditorCanvasContainerTitleAndIcon(
122
- editorCanvasContainerView
123
- );
112
+ const title = getEditorCanvasContainerTitle( editorCanvasContainerView );
124
113
  const shouldShowCloseButton = onClose || closeButtonLabel;
125
114
 
126
115
  return (
@@ -158,4 +147,4 @@ function useHasEditorCanvasContainer() {
158
147
  }
159
148
 
160
149
  export default EditorCanvasContainer;
161
- export { useHasEditorCanvasContainer, getEditorCanvasContainerTitleAndIcon };
150
+ export { useHasEditorCanvasContainer, getEditorCanvasContainerTitle };
@@ -28,8 +28,7 @@ function FontCard( { font, onClick, variantsText, navigatorPath } ) {
28
28
 
29
29
  return (
30
30
  <Button
31
- // TODO: Switch to `true` (40px size) if possible
32
- __next40pxDefaultSize={ false }
31
+ __next40pxDefaultSize
33
32
  onClick={ () => {
34
33
  onClick();
35
34
  if ( navigatorPath ) {
@@ -472,8 +472,7 @@ function FontCollection( { slug } ) {
472
472
  className="font-library-modal__footer"
473
473
  >
474
474
  <Button
475
- // TODO: Switch to `true` (40px size) if possible
476
- __next40pxDefaultSize={ false }
475
+ __next40pxDefaultSize
477
476
  variant="primary"
478
477
  onClick={ handleInstall }
479
478
  isBusy={ isInstalling }
@@ -66,8 +66,8 @@ function FontLibraryModal( {
66
66
  isFullScreen
67
67
  className="font-library-modal"
68
68
  >
69
- <div className="font-library-modal__tabs">
70
- <Tabs defaultTabId={ defaultTabId }>
69
+ <Tabs defaultTabId={ defaultTabId }>
70
+ <div className="font-library-modal__tablist">
71
71
  <Tabs.TabList>
72
72
  { tabs.map( ( { id, title } ) => (
73
73
  <Tabs.Tab key={ id } tabId={ id }>
@@ -75,30 +75,30 @@ function FontLibraryModal( {
75
75
  </Tabs.Tab>
76
76
  ) ) }
77
77
  </Tabs.TabList>
78
- { tabs.map( ( { id } ) => {
79
- let contents;
80
- switch ( id ) {
81
- case 'upload-fonts':
82
- contents = <UploadFonts />;
83
- break;
84
- case 'installed-fonts':
85
- contents = <InstalledFonts />;
86
- break;
87
- default:
88
- contents = <FontCollection slug={ id } />;
89
- }
90
- return (
91
- <Tabs.TabPanel
92
- key={ id }
93
- tabId={ id }
94
- focusable={ false }
95
- >
96
- { contents }
97
- </Tabs.TabPanel>
98
- );
99
- } ) }
100
- </Tabs>
101
- </div>
78
+ </div>
79
+ { tabs.map( ( { id } ) => {
80
+ let contents;
81
+ switch ( id ) {
82
+ case 'upload-fonts':
83
+ contents = <UploadFonts />;
84
+ break;
85
+ case 'installed-fonts':
86
+ contents = <InstalledFonts />;
87
+ break;
88
+ default:
89
+ contents = <FontCollection slug={ id } />;
90
+ }
91
+ return (
92
+ <Tabs.TabPanel
93
+ key={ id }
94
+ tabId={ id }
95
+ focusable={ false }
96
+ >
97
+ { contents }
98
+ </Tabs.TabPanel>
99
+ );
100
+ } ) }
101
+ </Tabs>
102
102
  </Modal>
103
103
  );
104
104
  }
@@ -437,8 +437,7 @@ function InstalledFonts() {
437
437
  { isInstalling && <ProgressBar /> }
438
438
  { shouldDisplayDeleteButton && (
439
439
  <Button
440
- // TODO: Switch to `true` (40px size) if possible
441
- __next40pxDefaultSize={ false }
440
+ __next40pxDefaultSize
442
441
  isDestructive
443
442
  variant="tertiary"
444
443
  onClick={ handleUninstallClick }
@@ -447,8 +446,7 @@ function InstalledFonts() {
447
446
  </Button>
448
447
  ) }
449
448
  <Button
450
- // TODO: Switch to `true` (40px size) if possible
451
- __next40pxDefaultSize={ false }
449
+ __next40pxDefaultSize
452
450
  variant="primary"
453
451
  onClick={ handleUpdate }
454
452
  disabled={ ! fontFamiliesHasChanges }
@@ -94,7 +94,11 @@ $footer-height: 70px;
94
94
  .font-library-modal__font-card {
95
95
  border: $border-width solid $gray-200;
96
96
  width: 100%;
97
- height: auto;
97
+
98
+ // Override the default 40px height set by the Button component.
99
+ // Ref - https://github.com/WordPress/gutenberg/pull/65258#discussion_r1756147260
100
+ height: auto !important;
101
+
98
102
  padding: $grid-unit-20;
99
103
  margin-top: -1px; /* To collapse the margin with the previous element */
100
104
 
@@ -129,23 +133,26 @@ $footer-height: 70px;
129
133
  padding-bottom: $grid-unit-20;
130
134
  }
131
135
 
132
- .font-library-modal__tabs {
133
- [role="tablist"] {
134
- position: sticky;
135
- top: 0;
136
- border-bottom: 1px solid $gray-300;
137
- background: $white;
138
- margin: 0 #{$grid-unit-40 * -1};
139
- padding: 0 $grid-unit-20;
140
- z-index: 1;
141
- }
136
+ .font-library-modal__tablist {
137
+ position: sticky;
138
+ top: 0;
139
+ border-bottom: 1px solid $gray-300;
140
+ background: $white;
141
+ margin: 0 #{$grid-unit-40 * -1};
142
+ padding: 0 $grid-unit-20;
143
+ z-index: 1;
142
144
  }
143
145
 
146
+
144
147
  .font-library-modal__upload-area {
145
148
  align-items: center;
146
149
  display: flex;
147
150
  justify-content: center;
148
- height: $grid-unit-80 * 4; // 256px
151
+
152
+ // Override the default 40px height set by the Button component.
153
+ // Ref - https://github.com/WordPress/gutenberg/pull/65258#discussion_r1756155039
154
+ height: $grid-unit-80 * 4 !important; // 256px
155
+
149
156
  width: 100%;
150
157
  }
151
158
 
@@ -230,8 +230,7 @@ function UploadFonts() {
230
230
  onChange={ onFilesUpload }
231
231
  render={ ( { openFileDialog } ) => (
232
232
  <Button
233
- // TODO: Switch to `true` (40px size) if possible
234
- __next40pxDefaultSize={ false }
233
+ __next40pxDefaultSize
235
234
  className="font-library-modal__upload-area"
236
235
  onClick={ openFileDialog }
237
236
  >
@@ -87,8 +87,7 @@ function Palette( { name } ) {
87
87
  { window.__experimentalEnableColorRandomizer &&
88
88
  themeColors?.length > 0 && (
89
89
  <Button
90
- // TODO: Switch to `true` (40px size) if possible
91
- __next40pxDefaultSize={ false }
90
+ __next40pxDefaultSize
92
91
  variant="secondary"
93
92
  icon={ shuffle }
94
93
  onClick={ randomizeThemeColors }
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
5
5
  import {
6
+ background,
6
7
  typography,
7
8
  color,
8
9
  layout,
@@ -23,11 +24,17 @@ const {
23
24
  useHasColorPanel,
24
25
  useGlobalSetting,
25
26
  useSettingsForBlockElement,
27
+ useHasBackgroundPanel,
26
28
  } = unlock( blockEditorPrivateApis );
27
29
 
28
30
  function RootMenu() {
29
31
  const [ rawSettings ] = useGlobalSetting( '' );
30
32
  const settings = useSettingsForBlockElement( rawSettings );
33
+ /*
34
+ * Use the raw settings to determine if the background panel should be displayed,
35
+ * as the background panel is not dependent on the block element settings.
36
+ */
37
+ const hasBackgroundPanel = useHasBackgroundPanel( rawSettings );
31
38
  const hasTypographyPanel = useHasTypographyPanel( settings );
32
39
  const hasColorPanel = useHasColorPanel( settings );
33
40
  const hasShadowPanel = true; // useHasShadowPanel( settings );
@@ -55,6 +62,15 @@ function RootMenu() {
55
62
  { __( 'Colors' ) }
56
63
  </NavigationButtonAsItem>
57
64
  ) }
65
+ { hasBackgroundPanel && (
66
+ <NavigationButtonAsItem
67
+ icon={ background }
68
+ path="/background"
69
+ aria-label={ __( 'Background styles' ) }
70
+ >
71
+ { __( 'Background' ) }
72
+ </NavigationButtonAsItem>
73
+ ) }
58
74
  { hasShadowPanel && (
59
75
  <NavigationButtonAsItem
60
76
  icon={ shadowIcon }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
6
+ import { __experimentalText as Text } from '@wordpress/components';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import BackgroundPanel from './background-panel';
12
+ import ScreenHeader from './header';
13
+ import { unlock } from '../../lock-unlock';
14
+
15
+ const { useHasBackgroundPanel, useGlobalSetting } = unlock(
16
+ blockEditorPrivateApis
17
+ );
18
+
19
+ function ScreenBackground() {
20
+ const [ settings ] = useGlobalSetting( '' );
21
+ const hasBackgroundPanel = useHasBackgroundPanel( settings );
22
+ return (
23
+ <>
24
+ <ScreenHeader
25
+ title={ __( 'Background' ) }
26
+ description={
27
+ <Text>
28
+ { __( 'Set styles for the site’s background.' ) }
29
+ </Text>
30
+ }
31
+ />
32
+ { hasBackgroundPanel && <BackgroundPanel /> }
33
+ </>
34
+ );
35
+ }
36
+
37
+ export default ScreenBackground;
@@ -8,31 +8,21 @@ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
8
  * Internal dependencies
9
9
  */
10
10
  import DimensionsPanel from './dimensions-panel';
11
- import BackgroundPanel from './background-panel';
12
11
  import ScreenHeader from './header';
13
12
  import { unlock } from '../../lock-unlock';
14
13
 
15
- const {
16
- useHasBackgroundPanel,
17
- useHasDimensionsPanel,
18
- useGlobalSetting,
19
- useSettingsForBlockElement,
20
- } = unlock( blockEditorPrivateApis );
14
+ const { useHasDimensionsPanel, useGlobalSetting, useSettingsForBlockElement } =
15
+ unlock( blockEditorPrivateApis );
21
16
 
22
17
  function ScreenLayout() {
23
18
  const [ rawSettings ] = useGlobalSetting( '' );
24
19
  const settings = useSettingsForBlockElement( rawSettings );
25
20
  const hasDimensionsPanel = useHasDimensionsPanel( settings );
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 );
21
+
31
22
  return (
32
23
  <>
33
24
  <ScreenHeader title={ __( 'Layout' ) } />
34
25
  { hasDimensionsPanel && <DimensionsPanel /> }
35
- { hasBackgroundPanel && <BackgroundPanel /> }
36
26
  </>
37
27
  );
38
28
  }
@@ -162,8 +162,7 @@ function RevisionsButtons( {
162
162
  aria-current={ isSelected }
163
163
  >
164
164
  <Button
165
- // TODO: Switch to `true` (40px size) if possible
166
- __next40pxDefaultSize={ false }
165
+ __next40pxDefaultSize
167
166
  className="edit-site-global-styles-screen-revisions__revision-button"
168
167
  accessibleWhenDisabled
169
168
  disabled={ isSelected }
@@ -53,11 +53,15 @@ function ScreenRoot() {
53
53
  }, [] );
54
54
 
55
55
  return (
56
- <Card size="small" className="edit-site-global-styles-screen-root">
56
+ <Card
57
+ size="small"
58
+ className="edit-site-global-styles-screen-root"
59
+ isRounded={ false }
60
+ >
57
61
  <CardBody>
58
62
  <VStack spacing={ 4 }>
59
- <Card>
60
- <CardMedia>
63
+ <Card className="edit-site-global-styles-screen-root__active-style-tile">
64
+ <CardMedia className="edit-site-global-styles-screen-root__active-style-tile-preview">
61
65
  <PreviewStyles />
62
66
  </CardMedia>
63
67
  </Card>