@wordpress/edit-site 5.5.0 → 5.6.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 (224) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/add-new-template/new-template.js +16 -10
  3. package/build/components/add-new-template/new-template.js.map +1 -1
  4. package/build/components/app/index.js +4 -2
  5. package/build/components/app/index.js.map +1 -1
  6. package/build/components/block-editor/editor-canvas.js +2 -1
  7. package/build/components/block-editor/editor-canvas.js.map +1 -1
  8. package/build/components/editor/index.js +2 -4
  9. package/build/components/editor/index.js.map +1 -1
  10. package/build/components/global-styles/border-panel.js +20 -159
  11. package/build/components/global-styles/border-panel.js.map +1 -1
  12. package/build/components/global-styles/context-menu.js +2 -3
  13. package/build/components/global-styles/context-menu.js.map +1 -1
  14. package/build/components/global-styles/hooks.js +11 -26
  15. package/build/components/global-styles/hooks.js.map +1 -1
  16. package/build/components/global-styles/screen-block-list.js +2 -3
  17. package/build/components/global-styles/screen-block-list.js.map +1 -1
  18. package/build/components/global-styles/screen-border.js +13 -5
  19. package/build/components/global-styles/screen-border.js.map +1 -1
  20. package/build/components/global-styles/screen-root.js +2 -1
  21. package/build/components/global-styles/screen-root.js.map +1 -1
  22. package/build/components/global-styles/screen-style-variations.js +2 -1
  23. package/build/components/global-styles/screen-style-variations.js.map +1 -1
  24. package/build/components/layout/index.js +7 -0
  25. package/build/components/layout/index.js.map +1 -1
  26. package/build/components/list/added-by.js +128 -136
  27. package/build/components/list/added-by.js.map +1 -1
  28. package/build/components/list/index.js +2 -1
  29. package/build/components/list/index.js.map +1 -1
  30. package/build/components/list/table.js +6 -5
  31. package/build/components/list/table.js.map +1 -1
  32. package/build/components/routes/link.js +4 -1
  33. package/build/components/routes/link.js.map +1 -1
  34. package/build/components/save-button/index.js +2 -5
  35. package/build/components/save-button/index.js.map +1 -1
  36. package/build/components/save-hub/index.js +82 -0
  37. package/build/components/save-hub/index.js.map +1 -0
  38. package/build/components/sidebar/index.js +2 -4
  39. package/build/components/sidebar/index.js.map +1 -1
  40. package/build/components/sidebar-navigation-screen/index.js +5 -2
  41. package/build/components/sidebar-navigation-screen/index.js.map +1 -1
  42. package/build/components/sidebar-navigation-screen-main/index.js +13 -13
  43. package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
  44. package/build/components/sidebar-navigation-screen-navigation-item/index.js +9 -14
  45. package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  46. package/build/components/sidebar-navigation-screen-navigation-menus/index.js +87 -10
  47. package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  48. package/build/components/sidebar-navigation-screen-navigation-menus/loader.js +19 -0
  49. package/build/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
  50. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +77 -0
  51. package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
  52. package/build/components/sidebar-navigation-screen-template/index.js +59 -10
  53. package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
  54. package/build/components/sidebar-navigation-screen-templates/index.js +5 -2
  55. package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  56. package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -3
  57. package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  58. package/build/components/site-hub/index.js +3 -1
  59. package/build/components/site-hub/index.js.map +1 -1
  60. package/build/components/style-book/index.js +134 -19
  61. package/build/components/style-book/index.js.map +1 -1
  62. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
  63. package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  64. package/build/components/sync-state-with-url/use-sync-path-with-url.js +9 -7
  65. package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  66. package/build/components/template-details/index.js +0 -3
  67. package/build/components/template-details/index.js.map +1 -1
  68. package/build/components/template-part-converter/convert-to-regular.js +8 -12
  69. package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
  70. package/build/components/template-part-converter/convert-to-template-part.js +2 -2
  71. package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
  72. package/build/components/template-part-converter/index.js +19 -14
  73. package/build/components/template-part-converter/index.js.map +1 -1
  74. package/build/components/use-edited-entity-record/index.js +6 -6
  75. package/build/components/use-edited-entity-record/index.js.map +1 -1
  76. package/build/index.js +3 -0
  77. package/build/index.js.map +1 -1
  78. package/build/utils/history.js +8 -2
  79. package/build/utils/history.js.map +1 -1
  80. package/build-module/components/add-new-template/new-template.js +18 -11
  81. package/build-module/components/add-new-template/new-template.js.map +1 -1
  82. package/build-module/components/app/index.js +3 -2
  83. package/build-module/components/app/index.js.map +1 -1
  84. package/build-module/components/block-editor/editor-canvas.js +2 -1
  85. package/build-module/components/block-editor/editor-canvas.js.map +1 -1
  86. package/build-module/components/editor/index.js +2 -3
  87. package/build-module/components/editor/index.js.map +1 -1
  88. package/build-module/components/global-styles/border-panel.js +21 -157
  89. package/build-module/components/global-styles/border-panel.js.map +1 -1
  90. package/build-module/components/global-styles/context-menu.js +2 -2
  91. package/build-module/components/global-styles/context-menu.js.map +1 -1
  92. package/build-module/components/global-styles/hooks.js +11 -26
  93. package/build-module/components/global-styles/hooks.js.map +1 -1
  94. package/build-module/components/global-styles/screen-block-list.js +2 -2
  95. package/build-module/components/global-styles/screen-block-list.js.map +1 -1
  96. package/build-module/components/global-styles/screen-border.js +11 -2
  97. package/build-module/components/global-styles/screen-border.js.map +1 -1
  98. package/build-module/components/global-styles/screen-root.js +2 -1
  99. package/build-module/components/global-styles/screen-root.js.map +1 -1
  100. package/build-module/components/global-styles/screen-style-variations.js +2 -1
  101. package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
  102. package/build-module/components/layout/index.js +7 -0
  103. package/build-module/components/layout/index.js.map +1 -1
  104. package/build-module/components/list/added-by.js +126 -137
  105. package/build-module/components/list/added-by.js.map +1 -1
  106. package/build-module/components/list/index.js +2 -1
  107. package/build-module/components/list/index.js.map +1 -1
  108. package/build-module/components/list/table.js +6 -5
  109. package/build-module/components/list/table.js.map +1 -1
  110. package/build-module/components/routes/link.js +5 -2
  111. package/build-module/components/routes/link.js.map +1 -1
  112. package/build-module/components/save-button/index.js +2 -5
  113. package/build-module/components/save-button/index.js.map +1 -1
  114. package/build-module/components/save-hub/index.js +68 -0
  115. package/build-module/components/save-hub/index.js.map +1 -0
  116. package/build-module/components/sidebar/index.js +2 -4
  117. package/build-module/components/sidebar/index.js.map +1 -1
  118. package/build-module/components/sidebar-navigation-screen/index.js +5 -2
  119. package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
  120. package/build-module/components/sidebar-navigation-screen-main/index.js +13 -13
  121. package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
  122. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +13 -18
  123. package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
  124. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +81 -10
  125. package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
  126. package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js +11 -0
  127. package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
  128. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +66 -0
  129. package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
  130. package/build-module/components/sidebar-navigation-screen-template/index.js +60 -13
  131. package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
  132. package/build-module/components/sidebar-navigation-screen-templates/index.js +5 -2
  133. package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
  134. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -3
  135. package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
  136. package/build-module/components/site-hub/index.js +3 -1
  137. package/build-module/components/site-hub/index.js.map +1 -1
  138. package/build-module/components/style-book/index.js +135 -22
  139. package/build-module/components/style-book/index.js.map +1 -1
  140. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
  141. package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
  142. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +9 -7
  143. package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
  144. package/build-module/components/template-details/index.js +0 -3
  145. package/build-module/components/template-details/index.js.map +1 -1
  146. package/build-module/components/template-part-converter/convert-to-regular.js +9 -13
  147. package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
  148. package/build-module/components/template-part-converter/convert-to-template-part.js +3 -3
  149. package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
  150. package/build-module/components/template-part-converter/index.js +20 -15
  151. package/build-module/components/template-part-converter/index.js.map +1 -1
  152. package/build-module/components/use-edited-entity-record/index.js +6 -6
  153. package/build-module/components/use-edited-entity-record/index.js.map +1 -1
  154. package/build-module/index.js +4 -1
  155. package/build-module/index.js.map +1 -1
  156. package/build-module/utils/history.js +9 -3
  157. package/build-module/utils/history.js.map +1 -1
  158. package/build-style/style-rtl.css +168 -111
  159. package/build-style/style.css +168 -111
  160. package/package.json +31 -31
  161. package/src/components/add-new-template/new-template.js +57 -32
  162. package/src/components/add-new-template/style.scss +12 -1
  163. package/src/components/app/index.js +9 -6
  164. package/src/components/block-editor/editor-canvas.js +2 -1
  165. package/src/components/editor/index.js +61 -65
  166. package/src/components/global-styles/border-panel.js +24 -199
  167. package/src/components/global-styles/context-menu.js +2 -2
  168. package/src/components/global-styles/hooks.js +12 -36
  169. package/src/components/global-styles/screen-block-list.js +2 -2
  170. package/src/components/global-styles/screen-border.js +9 -2
  171. package/src/components/global-styles/screen-root.js +1 -1
  172. package/src/components/global-styles/screen-style-variations.js +5 -1
  173. package/src/components/global-styles/style.scss +10 -0
  174. package/src/components/layout/index.js +15 -0
  175. package/src/components/layout/style.scss +1 -3
  176. package/src/components/list/added-by.js +144 -140
  177. package/src/components/list/index.js +3 -1
  178. package/src/components/list/table.js +7 -4
  179. package/src/components/routes/link.js +9 -2
  180. package/src/components/save-button/index.js +2 -2
  181. package/src/components/save-hub/index.js +78 -0
  182. package/src/components/save-hub/style.scss +15 -0
  183. package/src/components/sidebar/index.js +2 -3
  184. package/src/components/sidebar/style.scss +4 -3
  185. package/src/components/sidebar-button/style.scss +2 -1
  186. package/src/components/sidebar-navigation-item/style.scss +1 -23
  187. package/src/components/sidebar-navigation-screen/index.js +6 -0
  188. package/src/components/sidebar-navigation-screen/style.scss +15 -0
  189. package/src/components/sidebar-navigation-screen-main/index.js +21 -8
  190. package/src/components/sidebar-navigation-screen-navigation-item/index.js +30 -21
  191. package/src/components/sidebar-navigation-screen-navigation-menus/index.js +92 -9
  192. package/src/components/sidebar-navigation-screen-navigation-menus/loader.js +9 -0
  193. package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +78 -0
  194. package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +108 -1
  195. package/src/components/sidebar-navigation-screen-template/index.js +82 -11
  196. package/src/components/sidebar-navigation-screen-template/style.scss +25 -0
  197. package/src/components/sidebar-navigation-screen-templates/index.js +7 -0
  198. package/src/components/sidebar-navigation-screen-templates-browse/index.js +12 -1
  199. package/src/components/site-hub/index.js +5 -1
  200. package/src/components/site-hub/style.scss +5 -1
  201. package/src/components/style-book/index.js +209 -54
  202. package/src/components/style-book/style.scss +1 -45
  203. package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +38 -8
  204. package/src/components/sync-state-with-url/use-sync-path-with-url.js +12 -7
  205. package/src/components/template-details/index.js +0 -3
  206. package/src/components/template-part-converter/convert-to-regular.js +10 -17
  207. package/src/components/template-part-converter/convert-to-template-part.js +9 -16
  208. package/src/components/template-part-converter/index.js +28 -12
  209. package/src/components/use-edited-entity-record/index.js +26 -18
  210. package/src/index.js +5 -1
  211. package/src/store/test/actions.js +0 -2
  212. package/src/style.scss +2 -1
  213. package/src/utils/history.js +13 -9
  214. package/build/components/navigation-inspector/index.js +0 -161
  215. package/build/components/navigation-inspector/index.js.map +0 -1
  216. package/build/components/navigation-inspector/navigation-menu.js +0 -79
  217. package/build/components/navigation-inspector/navigation-menu.js.map +0 -1
  218. package/build-module/components/navigation-inspector/index.js +0 -146
  219. package/build-module/components/navigation-inspector/index.js.map +0 -1
  220. package/build-module/components/navigation-inspector/navigation-menu.js +0 -69
  221. package/build-module/components/navigation-inspector/navigation-menu.js.map +0 -1
  222. package/src/components/navigation-inspector/index.js +0 -191
  223. package/src/components/navigation-inspector/navigation-menu.js +0 -84
  224. package/src/components/navigation-inspector/style.scss +0 -46
@@ -524,6 +524,10 @@ body.is-fullscreen-mode .interface-interface-skeleton {
524
524
  }
525
525
  .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus:not(:disabled) {
526
526
  box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
527
+ outline: 2px solid transparent;
528
+ }
529
+ .interface-preferences__tabs .components-tab-panel__tabs .components-tab-panel__tabs-item:focus-visible::before {
530
+ content: none;
527
531
  }
528
532
  .interface-preferences__tabs .components-tab-panel__tab-content {
529
533
  padding-left: 24px;
@@ -568,10 +572,19 @@ body.is-fullscreen-mode .interface-interface-skeleton {
568
572
  }
569
573
 
570
574
  @media (min-width: 600px) {
571
- .edit-site-new-template-dropdown .edit-site-new-template-dropdown__popover {
575
+ .edit-site-new-template-dropdown .edit-site-new-template-dropdown__menu-groups {
572
576
  min-width: 300px;
573
577
  }
574
578
  }
579
+ .edit-site-new-template-dropdown__menu-item-tooltip.components-tooltip .components-popover__content {
580
+ max-width: 320px;
581
+ padding: 8px 12px;
582
+ border-radius: 2px;
583
+ white-space: pre-wrap;
584
+ min-width: 0;
585
+ width: auto;
586
+ text-align: left;
587
+ }
575
588
 
576
589
  .edit-site-custom-template-modal__contents > .components-button {
577
590
  padding: 24px;
@@ -1167,6 +1180,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1167
1180
  width: 24px;
1168
1181
  }
1169
1182
 
1183
+ .edit-site-global-styles-screen-root.edit-site-global-styles-screen-root,
1184
+ .edit-site-global-styles-screen-style-variations.edit-site-global-styles-screen-style-variations {
1185
+ background: unset;
1186
+ color: inherit;
1187
+ }
1188
+
1189
+ .edit-site-global-styles-sidebar__panel .block-editor-block-icon svg {
1190
+ fill: currentColor;
1191
+ }
1192
+
1170
1193
  .edit-site-header-edit-mode {
1171
1194
  height: 60px;
1172
1195
  align-items: center;
@@ -1571,46 +1594,6 @@ body.is-fullscreen-mode .edit-site-list-header {
1571
1594
  color: #757575;
1572
1595
  }
1573
1596
 
1574
- @keyframes loadingpulse {
1575
- 0% {
1576
- opacity: 1;
1577
- }
1578
- 50% {
1579
- opacity: 0.5;
1580
- }
1581
- 100% {
1582
- opacity: 1;
1583
- }
1584
- }
1585
- .edit-site-navigation-inspector .block-editor-list-view-leaf .block-editor-list-view-block-contents {
1586
- white-space: normal;
1587
- }
1588
- .edit-site-navigation-inspector .block-editor-list-view-block__title {
1589
- margin-top: 3px;
1590
- }
1591
- .edit-site-navigation-inspector .block-editor-list-view-block__menu-cell {
1592
- padding-right: 0;
1593
- }
1594
- .edit-site-navigation-inspector .edit-site-navigation-inspector__select-menu {
1595
- margin-bottom: 8px;
1596
- }
1597
-
1598
- .edit-site-navigation-inspector__placeholder {
1599
- padding: 8px;
1600
- margin: 8px;
1601
- background-color: #f0f0f0;
1602
- animation: loadingpulse 1s linear infinite;
1603
- animation-delay: 0.5s;
1604
- }
1605
- .edit-site-navigation-inspector__placeholder.is-child {
1606
- margin-left: 24px;
1607
- width: 50%;
1608
- }
1609
-
1610
- .edit-site-navigation-inspector__empty-msg {
1611
- padding: 0 8px;
1612
- }
1613
-
1614
1597
  .edit-site-sidebar-edit-mode {
1615
1598
  width: 280px;
1616
1599
  }
@@ -2253,9 +2236,9 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2253
2236
  }
2254
2237
 
2255
2238
  .edit-site-layout__content {
2239
+ height: 100%;
2256
2240
  flex-grow: 1;
2257
2241
  display: flex;
2258
- overflow: hidden;
2259
2242
  }
2260
2243
 
2261
2244
  .edit-site-layout__sidebar {
@@ -2403,6 +2386,20 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2403
2386
  }
2404
2387
  }
2405
2388
 
2389
+ .edit-site-save-hub {
2390
+ color: #949494;
2391
+ }
2392
+
2393
+ .edit-site-save-hub__button {
2394
+ color: inherit;
2395
+ }
2396
+ .edit-site-save-hub__button[aria-disabled=true] {
2397
+ opacity: 1;
2398
+ }
2399
+ .edit-site-save-hub__button[aria-disabled=true]:hover {
2400
+ color: inherit;
2401
+ }
2402
+
2406
2403
  @media (min-width: 600px) {
2407
2404
  .edit-site-save-panel__modal {
2408
2405
  width: 600px;
@@ -2412,25 +2409,27 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2412
2409
  .edit-site-sidebar__content {
2413
2410
  flex-grow: 1;
2414
2411
  overflow-y: auto;
2412
+ }
2413
+ .edit-site-sidebar__content .components-navigator-screen {
2415
2414
  visibility: hidden;
2416
2415
  scrollbar-color: #757575 #1e1e1e;
2417
2416
  scrollbar-width: thin;
2418
2417
  scrollbar-gutter: stable;
2419
2418
  }
2420
- .edit-site-sidebar__content::-webkit-scrollbar {
2419
+ .edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar {
2421
2420
  width: 12px;
2422
2421
  height: 12px;
2423
2422
  }
2424
- .edit-site-sidebar__content::-webkit-scrollbar-track {
2423
+ .edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-track {
2425
2424
  background-color: #1e1e1e;
2426
2425
  }
2427
- .edit-site-sidebar__content::-webkit-scrollbar-thumb {
2426
+ .edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-thumb {
2428
2427
  background-color: #757575;
2429
2428
  border-radius: 8px;
2430
2429
  border: 3px solid transparent;
2431
2430
  background-clip: padding-box;
2432
2431
  }
2433
- .edit-site-sidebar__content:hover, .edit-site-sidebar__content:focus, .edit-site-sidebar__content > * {
2432
+ .edit-site-sidebar__content .components-navigator-screen:hover, .edit-site-sidebar__content .components-navigator-screen:focus, .edit-site-sidebar__content .components-navigator-screen > * {
2434
2433
  visibility: visible;
2435
2434
  }
2436
2435
 
@@ -2439,8 +2438,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2439
2438
  flex-shrink: 0;
2440
2439
  margin: 0 24px;
2441
2440
  padding: 24px 0;
2442
- display: flex;
2443
- justify-content: flex-end;
2444
2441
  }
2445
2442
 
2446
2443
  .edit-site-sidebar__content.edit-site-sidebar__content {
@@ -2463,40 +2460,24 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2463
2460
  box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
2464
2461
  outline: 3px solid transparent;
2465
2462
  }
2466
- .edit-site-sidebar-button:hover, .edit-site-sidebar-button:focus-visible, .edit-site-sidebar-button:focus, .edit-site-sidebar-button:not([aria-disabled=true]):active {
2463
+ .edit-site-sidebar-button:hover, .edit-site-sidebar-button:focus-visible, .edit-site-sidebar-button:focus, .edit-site-sidebar-button:not([aria-disabled=true]):active, .edit-site-sidebar-button[aria-expanded=true] {
2467
2464
  color: #fff;
2468
2465
  }
2469
2466
 
2470
2467
  .edit-site-sidebar-navigation-item.components-item {
2471
2468
  color: #949494;
2472
- border-width: 1.5px;
2469
+ margin: 0 4px;
2473
2470
  }
2474
2471
  .edit-site-sidebar-navigation-item.components-item:hover, .edit-site-sidebar-navigation-item.components-item:focus, .edit-site-sidebar-navigation-item.components-item[aria-current] {
2475
2472
  color: #fff;
2476
2473
  background: #2f2f2f;
2477
- border-width: 1.5px;
2478
2474
  }
2479
2475
  .edit-site-sidebar-navigation-item.components-item[aria-current] {
2480
2476
  background: var(--wp-admin-theme-color);
2481
2477
  }
2482
2478
 
2483
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button {
2484
- color: #949494;
2485
- }
2486
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button:hover, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button:focus, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button[aria-current] {
2487
- color: #fff;
2488
- }
2489
-
2490
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf:hover, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf:focus, .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf[aria-current] {
2491
- background: #2f2f2f;
2492
- }
2493
- .edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
2494
- margin-left: -8px;
2495
- }
2496
-
2497
2479
  .edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button {
2498
2480
  cursor: grab;
2499
- width: calc(100% - 2px);
2500
2481
  padding: 8px;
2501
2482
  }
2502
2483
 
@@ -2512,6 +2493,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2512
2493
  color: #949494;
2513
2494
  }
2514
2495
 
2496
+ .edit-site-sidebar-navigation-screen__page-link {
2497
+ color: #949494;
2498
+ margin-left: 16px;
2499
+ display: inline-block;
2500
+ }
2501
+ .edit-site-sidebar-navigation-screen__page-link:hover, .edit-site-sidebar-navigation-screen__page-link:focus {
2502
+ color: #fff;
2503
+ }
2504
+ .edit-site-sidebar-navigation-screen__page-link .components-external-link__icon {
2505
+ margin-left: 4px;
2506
+ }
2507
+
2515
2508
  .edit-site-sidebar-navigation-screen__title-icon {
2516
2509
  position: sticky;
2517
2510
  top: 0;
@@ -2532,6 +2525,28 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2532
2525
  margin: 0;
2533
2526
  }
2534
2527
 
2528
+ .edit-site-sidebar-navigation-screen-template__added-by-description {
2529
+ display: flex;
2530
+ align-items: center;
2531
+ justify-content: space-between;
2532
+ margin-top: 24px;
2533
+ }
2534
+ .edit-site-sidebar-navigation-screen-template__added-by-description-author {
2535
+ display: inline-flex;
2536
+ align-items: center;
2537
+ }
2538
+ .edit-site-sidebar-navigation-screen-template__added-by-description-author img {
2539
+ border-radius: 12px;
2540
+ }
2541
+ .edit-site-sidebar-navigation-screen-template__added-by-description-author svg {
2542
+ fill: #949494;
2543
+ }
2544
+ .edit-site-sidebar-navigation-screen-template__added-by-description-author-icon {
2545
+ width: 24px;
2546
+ height: 24px;
2547
+ margin-right: 8px;
2548
+ }
2549
+
2535
2550
  .edit-site-sidebar-navigation-screen-templates__see-all {
2536
2551
  /* Overrides the margin that comes from the Item component */
2537
2552
  margin-top: 16px !important;
@@ -2550,7 +2565,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2550
2565
 
2551
2566
  .edit-site-site-hub__view-mode-toggle-container {
2552
2567
  height: 60px;
2553
- width: 64px;
2568
+ width: 60px;
2554
2569
  flex-shrink: 0;
2555
2570
  background: #1e1e1e;
2556
2571
  }
@@ -2565,12 +2580,95 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2565
2580
  overflow: hidden;
2566
2581
  }
2567
2582
 
2568
- .edit-site-sidebar-navigation-screen-navigation-menus .offcanvas-editor-list-view-leaf {
2583
+ .edit-site-site-hub__site-title {
2584
+ margin-left: 4px;
2585
+ }
2586
+
2587
+ .edit-site-sidebar-navigation-screen__description {
2588
+ margin: 0 0 32px 16px;
2589
+ }
2590
+
2591
+ .edit-site-sidebar-navigation-screen-navigation-menus__placeholder {
2592
+ padding: 8px;
2593
+ margin: 8px;
2594
+ background-color: #f0f0f0;
2595
+ animation: loadingpulse 1s linear infinite;
2596
+ animation-delay: 0.5s;
2597
+ }
2598
+
2599
+ @keyframes loadingpulse {
2600
+ 0% {
2601
+ opacity: 1;
2602
+ }
2603
+ 50% {
2604
+ opacity: 0.5;
2605
+ }
2606
+ 100% {
2607
+ opacity: 1;
2608
+ }
2609
+ }
2610
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf {
2569
2611
  max-width: calc(100% - 4px);
2612
+ border-radius: 2px;
2613
+ }
2614
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf:hover, .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf:focus, .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf[aria-current] {
2615
+ background: #2f2f2f;
2616
+ }
2617
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
2618
+ margin-left: -8px;
2619
+ }
2620
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected > td {
2621
+ background: transparent;
2622
+ }
2623
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents {
2624
+ color: inherit;
2625
+ }
2626
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected:not(:hover) .block-editor-list-view-block__menu {
2627
+ opacity: 0;
2628
+ }
2629
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected:hover, .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected:focus {
2630
+ color: #fff;
2631
+ }
2632
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected:hover .block-editor-list-view-block__menu-cell, .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected:focus .block-editor-list-view-block__menu-cell {
2633
+ opacity: 1;
2634
+ }
2635
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected .block-editor-list-view-block__menu {
2636
+ opacity: 1;
2637
+ }
2638
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-selected .block-editor-list-view-block__menu:focus {
2639
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2640
+ }
2641
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf .block-editor-list-view-block-contents:focus::after {
2642
+ box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2643
+ }
2644
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-branch-selected:not(.is-selected):not(.is-synced-branch) {
2645
+ background: transparent;
2570
2646
  }
2571
- .edit-site-sidebar-navigation-screen-navigation-menus .block-editor-list-view-leaf .block-editor-list-view-block__contents-cell {
2647
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf.is-branch-selected:not(.is-selected):not(.is-synced-branch):hover {
2648
+ background: #2f2f2f;
2649
+ }
2650
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block__contents-cell {
2572
2651
  width: 100%;
2573
2652
  }
2653
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents {
2654
+ white-space: normal;
2655
+ }
2656
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title {
2657
+ margin-top: 3px;
2658
+ }
2659
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell {
2660
+ padding-right: 0;
2661
+ }
2662
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button {
2663
+ color: #949494;
2664
+ }
2665
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button:hover, .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button:focus, .edit-site-sidebar-navigation-screen-navigation-menus__content .components-button[aria-current] {
2666
+ color: #fff;
2667
+ }
2668
+
2669
+ .edit-site-sidebar-navigation-screen-navigation-menus__content .popover-slot .wp-block-navigation-submenu {
2670
+ display: none;
2671
+ }
2574
2672
 
2575
2673
  .edit-site-site-icon__icon {
2576
2674
  fill: currentColor;
@@ -2610,53 +2708,12 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2610
2708
  bottom: 0;
2611
2709
  left: 0;
2612
2710
  overflow: auto;
2613
- padding: 32px;
2711
+ padding: 0;
2614
2712
  position: absolute;
2615
2713
  right: 0;
2616
2714
  top: 48px;
2617
2715
  }
2618
2716
 
2619
- .edit-site-style-book__examples {
2620
- max-width: 900px;
2621
- margin: 0 auto;
2622
- }
2623
-
2624
- .edit-site-style-book__example {
2625
- background: none;
2626
- border-radius: 2px;
2627
- border: none;
2628
- color: inherit;
2629
- cursor: pointer;
2630
- display: flex;
2631
- flex-direction: column;
2632
- gap: 40px;
2633
- margin-bottom: 40px;
2634
- padding: 16px;
2635
- width: 100%;
2636
- }
2637
- .edit-site-style-book__example.is-selected {
2638
- box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
2639
- }
2640
- .edit-site-style-book.is-wide .edit-site-style-book__example {
2641
- flex-direction: row;
2642
- }
2643
-
2644
- .edit-site-style-book__example-title {
2645
- font-size: 11px;
2646
- font-weight: 500;
2647
- margin: 0;
2648
- text-align: left;
2649
- text-transform: uppercase;
2650
- }
2651
- .edit-site-style-book.is-wide .edit-site-style-book__example-title {
2652
- text-align: right;
2653
- width: 120px;
2654
- }
2655
-
2656
- .edit-site-style-book__example-preview {
2657
- width: 100%;
2658
- }
2659
-
2660
2717
  .edit-site-push-changes-to-global-styles-control .components-button {
2661
2718
  justify-content: center;
2662
2719
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -27,35 +27,35 @@
27
27
  "react-native": "src/index",
28
28
  "dependencies": {
29
29
  "@babel/runtime": "^7.16.0",
30
- "@wordpress/a11y": "^3.28.0",
31
- "@wordpress/api-fetch": "^6.25.0",
32
- "@wordpress/block-editor": "^11.5.0",
33
- "@wordpress/block-library": "^8.5.0",
34
- "@wordpress/blocks": "^12.5.0",
35
- "@wordpress/components": "^23.5.0",
36
- "@wordpress/compose": "^6.5.0",
37
- "@wordpress/core-data": "^6.5.0",
38
- "@wordpress/data": "^8.5.0",
39
- "@wordpress/deprecated": "^3.28.0",
40
- "@wordpress/editor": "^13.5.0",
41
- "@wordpress/element": "^5.5.0",
42
- "@wordpress/hooks": "^3.28.0",
43
- "@wordpress/html-entities": "^3.28.0",
44
- "@wordpress/i18n": "^4.28.0",
45
- "@wordpress/icons": "^9.19.0",
46
- "@wordpress/interface": "^5.5.0",
47
- "@wordpress/keyboard-shortcuts": "^4.5.0",
48
- "@wordpress/keycodes": "^3.28.0",
49
- "@wordpress/media-utils": "^4.19.0",
50
- "@wordpress/notices": "^3.28.0",
51
- "@wordpress/plugins": "^5.5.0",
52
- "@wordpress/preferences": "^3.5.0",
53
- "@wordpress/private-apis": "^0.10.0",
54
- "@wordpress/reusable-blocks": "^4.5.0",
55
- "@wordpress/style-engine": "^1.11.0",
56
- "@wordpress/url": "^3.29.0",
57
- "@wordpress/viewport": "^5.5.0",
58
- "@wordpress/widgets": "^3.5.0",
30
+ "@wordpress/a11y": "^3.29.0",
31
+ "@wordpress/api-fetch": "^6.26.0",
32
+ "@wordpress/block-editor": "^11.6.0",
33
+ "@wordpress/block-library": "^8.6.0",
34
+ "@wordpress/blocks": "^12.6.0",
35
+ "@wordpress/components": "^23.6.0",
36
+ "@wordpress/compose": "^6.6.0",
37
+ "@wordpress/core-data": "^6.6.0",
38
+ "@wordpress/data": "^8.6.0",
39
+ "@wordpress/deprecated": "^3.29.0",
40
+ "@wordpress/editor": "^13.6.0",
41
+ "@wordpress/element": "^5.6.0",
42
+ "@wordpress/hooks": "^3.29.0",
43
+ "@wordpress/html-entities": "^3.29.0",
44
+ "@wordpress/i18n": "^4.29.0",
45
+ "@wordpress/icons": "^9.20.0",
46
+ "@wordpress/interface": "^5.6.0",
47
+ "@wordpress/keyboard-shortcuts": "^4.6.0",
48
+ "@wordpress/keycodes": "^3.29.0",
49
+ "@wordpress/media-utils": "^4.20.0",
50
+ "@wordpress/notices": "^3.29.0",
51
+ "@wordpress/plugins": "^5.6.0",
52
+ "@wordpress/preferences": "^3.6.0",
53
+ "@wordpress/private-apis": "^0.11.0",
54
+ "@wordpress/reusable-blocks": "^4.6.0",
55
+ "@wordpress/style-engine": "^1.12.0",
56
+ "@wordpress/url": "^3.30.0",
57
+ "@wordpress/viewport": "^5.6.0",
58
+ "@wordpress/widgets": "^3.6.0",
59
59
  "classnames": "^2.3.1",
60
60
  "colord": "^2.9.2",
61
61
  "downloadjs": "^1.4.7",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "d5e03a74b79e3ca84afda24375474a103a063ee4"
76
+ "gitHead": "9534a7b3bbf07c1d40b94fdb7a3d091f297bfb06"
77
77
  }
@@ -5,7 +5,8 @@ import {
5
5
  DropdownMenu,
6
6
  MenuGroup,
7
7
  MenuItem,
8
- NavigableMenu,
8
+ Tooltip,
9
+ VisuallyHidden,
9
10
  } from '@wordpress/components';
10
11
  import { useState } from '@wordpress/element';
11
12
  import { useDispatch } from '@wordpress/data';
@@ -164,6 +165,11 @@ export default function NewTemplate( {
164
165
  if ( ! missingTemplates.length ) {
165
166
  return null;
166
167
  }
168
+
169
+ const customTemplateDescription = __(
170
+ 'A custom template can be manually applied to any post or page.'
171
+ );
172
+
167
173
  return (
168
174
  <>
169
175
  <DropdownMenu
@@ -181,7 +187,7 @@ export default function NewTemplate( {
181
187
  { isCreatingTemplate && (
182
188
  <TemplateActionsLoadingScreen />
183
189
  ) }
184
- <NavigableMenu className="edit-site-new-template-dropdown__popover">
190
+ <div className="edit-site-new-template-dropdown__menu-groups">
185
191
  <MenuGroup label={ postType.labels.add_new_item }>
186
192
  { missingTemplates.map( ( template ) => {
187
193
  const {
@@ -192,44 +198,63 @@ export default function NewTemplate( {
192
198
  icon,
193
199
  } = template;
194
200
  return (
195
- <MenuItem
196
- icon={
197
- icon ||
198
- TEMPLATE_ICONS[ slug ] ||
199
- post
200
- }
201
- iconPosition="left"
202
- info={ description }
201
+ <Tooltip
203
202
  key={ slug }
204
- onClick={ () =>
205
- onClick
206
- ? onClick( template )
207
- : createTemplate( template )
208
- }
203
+ position="top right"
204
+ text={ description }
205
+ className="edit-site-new-template-dropdown__menu-item-tooltip"
209
206
  >
210
- { title }
211
- </MenuItem>
207
+ <MenuItem
208
+ icon={
209
+ icon ||
210
+ TEMPLATE_ICONS[ slug ] ||
211
+ post
212
+ }
213
+ iconPosition="left"
214
+ onClick={ () =>
215
+ onClick
216
+ ? onClick( template )
217
+ : createTemplate(
218
+ template
219
+ )
220
+ }
221
+ >
222
+ { title }
223
+ { /* TODO: This probably won't be needed if the <Tooltip> component is accessible.
224
+ * @see https://github.com/WordPress/gutenberg/issues/48222 */ }
225
+ <VisuallyHidden>
226
+ { description }
227
+ </VisuallyHidden>
228
+ </MenuItem>
229
+ </Tooltip>
212
230
  );
213
231
  } ) }
214
232
  </MenuGroup>
215
233
  <MenuGroup>
216
- <MenuItem
217
- icon={ customGenericTemplateIcon }
218
- iconPosition="left"
219
- info={ __(
220
- 'Custom templates can be applied to any post or page.'
221
- ) }
222
- key="custom-template"
223
- onClick={ () =>
224
- setShowCustomGenericTemplateModal(
225
- true
226
- )
227
- }
234
+ <Tooltip
235
+ position="top right"
236
+ text={ customTemplateDescription }
237
+ className="edit-site-new-template-dropdown__menu-item-tooltip"
228
238
  >
229
- { __( 'Custom template' ) }
230
- </MenuItem>
239
+ <MenuItem
240
+ icon={ customGenericTemplateIcon }
241
+ iconPosition="left"
242
+ onClick={ () =>
243
+ setShowCustomGenericTemplateModal(
244
+ true
245
+ )
246
+ }
247
+ >
248
+ { __( 'Custom template' ) }
249
+ { /* TODO: This probably won't be needed if the <Tooltip> component is accessible.
250
+ * @see https://github.com/WordPress/gutenberg/issues/48222 */ }
251
+ <VisuallyHidden>
252
+ { customTemplateDescription }
253
+ </VisuallyHidden>
254
+ </MenuItem>
255
+ </Tooltip>
231
256
  </MenuGroup>
232
- </NavigableMenu>
257
+ </div>
233
258
  </>
234
259
  ) }
235
260
  </DropdownMenu>
@@ -1,9 +1,20 @@
1
1
  .edit-site-new-template-dropdown {
2
- .edit-site-new-template-dropdown__popover {
2
+ .edit-site-new-template-dropdown__menu-groups {
3
3
  @include break-small() {
4
4
  min-width: 300px;
5
5
  }
6
6
  }
7
+
8
+ // The specificity is needed to override the default tooltip styles.
9
+ &__menu-item-tooltip.components-tooltip .components-popover__content {
10
+ max-width: 320px;
11
+ padding: $grid-unit-10 $grid-unit-15;
12
+ border-radius: 2px;
13
+ white-space: pre-wrap;
14
+ min-width: 0;
15
+ width: auto;
16
+ text-align: left;
17
+ }
7
18
  }
8
19
 
9
20
  .edit-site-custom-template-modal {
@@ -14,6 +14,7 @@ import { PluginArea } from '@wordpress/plugins';
14
14
  */
15
15
  import { Routes } from '../routes';
16
16
  import Layout from '../layout';
17
+ import { GlobalStylesProvider } from '../global-styles/global-styles-provider';
17
18
 
18
19
  export default function App() {
19
20
  const { createErrorNotice } = useDispatch( noticesStore );
@@ -33,12 +34,14 @@ export default function App() {
33
34
  return (
34
35
  <ShortcutProvider style={ { height: '100%' } }>
35
36
  <SlotFillProvider>
36
- <Popover.Slot />
37
- <UnsavedChangesWarning />
38
- <Routes>
39
- <Layout />
40
- <PluginArea onError={ onPluginAreaError } />
41
- </Routes>
37
+ <GlobalStylesProvider>
38
+ <Popover.Slot />
39
+ <UnsavedChangesWarning />
40
+ <Routes>
41
+ <Layout />
42
+ <PluginArea onError={ onPluginAreaError } />
43
+ </Routes>
44
+ </GlobalStylesProvider>
42
45
  </SlotFillProvider>
43
46
  </ShortcutProvider>
44
47
  );
@@ -44,7 +44,8 @@ function EditorCanvas( { enableResizing, settings, children, ...props } ) {
44
44
  // Forming a "block formatting context" to prevent margin collapsing.
45
45
  // @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
46
46
  `.is-root-container { display: flow-root; }
47
- body { position: relative; }`
47
+ body { position: relative;
48
+ ${ canvasMode === 'view' ? 'cursor: pointer;' : '' }}}`
48
49
  }</style>
49
50
  { enableResizing && (
50
51
  <style>