@wordpress/edit-site 5.3.6 → 5.3.7
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/build/components/block-editor/editor-canvas.js +2 -1
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/layout/index.js +6 -0
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/index.js +2 -1
- package/build/components/list/index.js.map +1 -1
- package/build/components/routes/link.js +4 -1
- package/build/components/routes/link.js.map +1 -1
- package/build/components/save-button/index.js +2 -5
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +82 -0
- package/build/components/save-hub/index.js.map +1 -0
- package/build/components/sidebar/index.js +2 -4
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +5 -2
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +1 -0
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +9 -14
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +139 -11
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/loader.js +19 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +77 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
- package/build/components/sidebar-navigation-screen-template/index.js +18 -4
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +5 -2
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -3
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +9 -7
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/template-details/index.js +0 -3
- package/build/components/template-details/index.js.map +1 -1
- package/build/components/use-edited-entity-record/index.js +6 -6
- package/build/components/use-edited-entity-record/index.js.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/utils/history.js +8 -2
- package/build/utils/history.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +2 -1
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/layout/index.js +6 -0
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/index.js +2 -1
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/routes/link.js +5 -2
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/save-button/index.js +2 -5
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +68 -0
- package/build-module/components/save-hub/index.js.map +1 -0
- package/build-module/components/sidebar/index.js +2 -4
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +5 -2
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +1 -0
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +13 -18
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +131 -11
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js +11 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +66 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-template/index.js +18 -5
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +5 -2
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +9 -7
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/template-details/index.js +0 -3
- package/build-module/components/template-details/index.js.map +1 -1
- package/build-module/components/use-edited-entity-record/index.js +6 -6
- package/build-module/components/use-edited-entity-record/index.js.map +1 -1
- package/build-module/index.js +4 -1
- package/build-module/index.js.map +1 -1
- package/build-module/utils/history.js +9 -3
- package/build-module/utils/history.js.map +1 -1
- package/build-style/style-rtl.css +80 -67
- package/build-style/style.css +80 -67
- package/package.json +7 -7
- package/src/components/block-editor/editor-canvas.js +2 -1
- package/src/components/layout/index.js +14 -0
- package/src/components/layout/style.scss +1 -3
- package/src/components/list/index.js +3 -1
- package/src/components/routes/link.js +9 -2
- package/src/components/save-button/index.js +2 -2
- package/src/components/save-hub/index.js +78 -0
- package/src/components/save-hub/style.scss +15 -0
- package/src/components/sidebar/index.js +2 -3
- package/src/components/sidebar/style.scss +4 -3
- package/src/components/sidebar-button/style.scss +2 -1
- package/src/components/sidebar-navigation-item/style.scss +0 -20
- package/src/components/sidebar-navigation-screen/index.js +6 -0
- package/src/components/sidebar-navigation-screen/style.scss +15 -0
- package/src/components/sidebar-navigation-screen-main/index.js +3 -0
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +30 -21
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +141 -10
- package/src/components/sidebar-navigation-screen-navigation-menus/loader.js +9 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +78 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +55 -4
- package/src/components/sidebar-navigation-screen-template/index.js +21 -7
- package/src/components/sidebar-navigation-screen-templates/index.js +7 -0
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +12 -1
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +38 -8
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +12 -7
- package/src/components/template-details/index.js +0 -3
- package/src/components/use-edited-entity-record/index.js +26 -18
- package/src/index.js +5 -1
- package/src/style.scss +1 -1
- package/src/utils/history.js +13 -9
- package/build/components/navigation-inspector/index.js +0 -190
- package/build/components/navigation-inspector/index.js.map +0 -1
- package/build/components/navigation-inspector/navigation-menu.js +0 -62
- package/build/components/navigation-inspector/navigation-menu.js.map +0 -1
- package/build-module/components/navigation-inspector/index.js +0 -173
- package/build-module/components/navigation-inspector/index.js.map +0 -1
- package/build-module/components/navigation-inspector/navigation-menu.js +0 -52
- package/build-module/components/navigation-inspector/navigation-menu.js.map +0 -1
- package/src/components/navigation-inspector/index.js +0 -223
- package/src/components/navigation-inspector/navigation-menu.js +0 -66
- package/src/components/navigation-inspector/style.scss +0 -46
|
@@ -1567,46 +1567,6 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1567
1567
|
color: #757575;
|
|
1568
1568
|
}
|
|
1569
1569
|
|
|
1570
|
-
@keyframes loadingpulse {
|
|
1571
|
-
0% {
|
|
1572
|
-
opacity: 1;
|
|
1573
|
-
}
|
|
1574
|
-
50% {
|
|
1575
|
-
opacity: 0.5;
|
|
1576
|
-
}
|
|
1577
|
-
100% {
|
|
1578
|
-
opacity: 1;
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
.edit-site-navigation-inspector .block-editor-list-view-leaf .block-editor-list-view-block-contents {
|
|
1582
|
-
white-space: normal;
|
|
1583
|
-
}
|
|
1584
|
-
.edit-site-navigation-inspector .block-editor-list-view-block__title {
|
|
1585
|
-
margin-top: 3px;
|
|
1586
|
-
}
|
|
1587
|
-
.edit-site-navigation-inspector .block-editor-list-view-block__menu-cell {
|
|
1588
|
-
padding-left: 0;
|
|
1589
|
-
}
|
|
1590
|
-
.edit-site-navigation-inspector .edit-site-navigation-inspector__select-menu {
|
|
1591
|
-
margin-bottom: 8px;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
.edit-site-navigation-inspector__placeholder {
|
|
1595
|
-
padding: 8px;
|
|
1596
|
-
margin: 8px;
|
|
1597
|
-
background-color: #f0f0f0;
|
|
1598
|
-
animation: loadingpulse 1s linear infinite;
|
|
1599
|
-
animation-delay: 0.5s;
|
|
1600
|
-
}
|
|
1601
|
-
.edit-site-navigation-inspector__placeholder.is-child {
|
|
1602
|
-
margin-right: 24px;
|
|
1603
|
-
width: 50%;
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
.edit-site-navigation-inspector__empty-msg {
|
|
1607
|
-
padding: 0 8px;
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
1570
|
.edit-site-sidebar-edit-mode {
|
|
1611
1571
|
width: 280px;
|
|
1612
1572
|
}
|
|
@@ -2180,9 +2140,9 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2180
2140
|
}
|
|
2181
2141
|
|
|
2182
2142
|
.edit-site-layout__content {
|
|
2143
|
+
height: 100%;
|
|
2183
2144
|
flex-grow: 1;
|
|
2184
2145
|
display: flex;
|
|
2185
|
-
overflow: hidden;
|
|
2186
2146
|
}
|
|
2187
2147
|
|
|
2188
2148
|
.edit-site-layout__sidebar {
|
|
@@ -2330,6 +2290,20 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2330
2290
|
}
|
|
2331
2291
|
}
|
|
2332
2292
|
|
|
2293
|
+
.edit-site-save-hub {
|
|
2294
|
+
color: #949494;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
.edit-site-save-hub__button {
|
|
2298
|
+
color: inherit;
|
|
2299
|
+
}
|
|
2300
|
+
.edit-site-save-hub__button[aria-disabled=true] {
|
|
2301
|
+
opacity: 1;
|
|
2302
|
+
}
|
|
2303
|
+
.edit-site-save-hub__button[aria-disabled=true]:hover {
|
|
2304
|
+
color: inherit;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2333
2307
|
@media (min-width: 600px) {
|
|
2334
2308
|
.edit-site-save-panel__modal {
|
|
2335
2309
|
width: 600px;
|
|
@@ -2339,25 +2313,27 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2339
2313
|
.edit-site-sidebar__content {
|
|
2340
2314
|
flex-grow: 1;
|
|
2341
2315
|
overflow-y: auto;
|
|
2316
|
+
}
|
|
2317
|
+
.edit-site-sidebar__content .components-navigator-screen {
|
|
2342
2318
|
visibility: hidden;
|
|
2343
2319
|
scrollbar-color: #757575 #1e1e1e;
|
|
2344
2320
|
scrollbar-width: thin;
|
|
2345
2321
|
scrollbar-gutter: stable;
|
|
2346
2322
|
}
|
|
2347
|
-
.edit-site-sidebar__content::-webkit-scrollbar {
|
|
2323
|
+
.edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar {
|
|
2348
2324
|
width: 12px;
|
|
2349
2325
|
height: 12px;
|
|
2350
2326
|
}
|
|
2351
|
-
.edit-site-sidebar__content::-webkit-scrollbar-track {
|
|
2327
|
+
.edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-track {
|
|
2352
2328
|
background-color: #1e1e1e;
|
|
2353
2329
|
}
|
|
2354
|
-
.edit-site-sidebar__content::-webkit-scrollbar-thumb {
|
|
2330
|
+
.edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-thumb {
|
|
2355
2331
|
background-color: #757575;
|
|
2356
2332
|
border-radius: 8px;
|
|
2357
2333
|
border: 3px solid transparent;
|
|
2358
2334
|
background-clip: padding-box;
|
|
2359
2335
|
}
|
|
2360
|
-
.edit-site-sidebar__content:hover, .edit-site-sidebar__content:focus, .edit-site-sidebar__content > * {
|
|
2336
|
+
.edit-site-sidebar__content .components-navigator-screen:hover, .edit-site-sidebar__content .components-navigator-screen:focus, .edit-site-sidebar__content .components-navigator-screen > * {
|
|
2361
2337
|
visibility: visible;
|
|
2362
2338
|
}
|
|
2363
2339
|
|
|
@@ -2366,8 +2342,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2366
2342
|
flex-shrink: 0;
|
|
2367
2343
|
margin: 0 24px;
|
|
2368
2344
|
padding: 24px 0;
|
|
2369
|
-
display: flex;
|
|
2370
|
-
justify-content: flex-end;
|
|
2371
2345
|
}
|
|
2372
2346
|
|
|
2373
2347
|
.edit-site-sidebar__content.edit-site-sidebar__content {
|
|
@@ -2390,7 +2364,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2390
2364
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
|
2391
2365
|
outline: 3px solid transparent;
|
|
2392
2366
|
}
|
|
2393
|
-
.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 {
|
|
2367
|
+
.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] {
|
|
2394
2368
|
color: #fff;
|
|
2395
2369
|
}
|
|
2396
2370
|
|
|
@@ -2407,20 +2381,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2407
2381
|
background: var(--wp-admin-theme-color);
|
|
2408
2382
|
}
|
|
2409
2383
|
|
|
2410
|
-
.edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button {
|
|
2411
|
-
color: #949494;
|
|
2412
|
-
}
|
|
2413
|
-
.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] {
|
|
2414
|
-
color: #fff;
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
.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] {
|
|
2418
|
-
background: #2f2f2f;
|
|
2419
|
-
}
|
|
2420
|
-
.edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
|
|
2421
|
-
margin-right: -8px;
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
2384
|
.edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button {
|
|
2425
2385
|
cursor: grab;
|
|
2426
2386
|
width: calc(100% - 2px);
|
|
@@ -2439,6 +2399,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2439
2399
|
color: #949494;
|
|
2440
2400
|
}
|
|
2441
2401
|
|
|
2402
|
+
.edit-site-sidebar-navigation-screen__page-link {
|
|
2403
|
+
color: #949494;
|
|
2404
|
+
margin-right: 16px;
|
|
2405
|
+
display: inline-block;
|
|
2406
|
+
}
|
|
2407
|
+
.edit-site-sidebar-navigation-screen__page-link:hover, .edit-site-sidebar-navigation-screen__page-link:focus {
|
|
2408
|
+
color: #fff;
|
|
2409
|
+
}
|
|
2410
|
+
.edit-site-sidebar-navigation-screen__page-link .components-external-link__icon {
|
|
2411
|
+
margin-right: 4px;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2442
2414
|
.edit-site-sidebar-navigation-screen__title-icon {
|
|
2443
2415
|
position: sticky;
|
|
2444
2416
|
top: 0;
|
|
@@ -2492,16 +2464,57 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2492
2464
|
overflow: hidden;
|
|
2493
2465
|
}
|
|
2494
2466
|
|
|
2495
|
-
.edit-site-sidebar-navigation-
|
|
2496
|
-
|
|
2497
|
-
|
|
2467
|
+
.edit-site-sidebar-navigation-screen__description {
|
|
2468
|
+
margin: 0 16px 32px 0;
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__placeholder {
|
|
2472
|
+
padding: 8px;
|
|
2473
|
+
margin: 8px;
|
|
2474
|
+
background-color: #f0f0f0;
|
|
2475
|
+
animation: loadingpulse 1s linear infinite;
|
|
2476
|
+
animation-delay: 0.5s;
|
|
2498
2477
|
}
|
|
2499
|
-
|
|
2478
|
+
|
|
2479
|
+
@keyframes loadingpulse {
|
|
2480
|
+
0% {
|
|
2481
|
+
opacity: 1;
|
|
2482
|
+
}
|
|
2483
|
+
50% {
|
|
2484
|
+
opacity: 0.5;
|
|
2485
|
+
}
|
|
2486
|
+
100% {
|
|
2487
|
+
opacity: 1;
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf {
|
|
2500
2491
|
max-width: calc(100% - 4px);
|
|
2492
|
+
border-radius: 2px;
|
|
2493
|
+
}
|
|
2494
|
+
.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] {
|
|
2495
|
+
background: #2f2f2f;
|
|
2501
2496
|
}
|
|
2502
|
-
.edit-site-sidebar-navigation-screen-navigation-
|
|
2497
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
|
|
2498
|
+
margin-right: -8px;
|
|
2499
|
+
}
|
|
2500
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block__contents-cell {
|
|
2503
2501
|
width: 100%;
|
|
2504
2502
|
}
|
|
2503
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents {
|
|
2504
|
+
white-space: normal;
|
|
2505
|
+
}
|
|
2506
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title {
|
|
2507
|
+
margin-top: 3px;
|
|
2508
|
+
}
|
|
2509
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell {
|
|
2510
|
+
padding-left: 0;
|
|
2511
|
+
}
|
|
2512
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .components-button {
|
|
2513
|
+
color: #949494;
|
|
2514
|
+
}
|
|
2515
|
+
.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] {
|
|
2516
|
+
color: #fff;
|
|
2517
|
+
}
|
|
2505
2518
|
|
|
2506
2519
|
.edit-site-site-icon__icon {
|
|
2507
2520
|
fill: currentColor;
|
package/build-style/style.css
CHANGED
|
@@ -1567,46 +1567,6 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1567
1567
|
color: #757575;
|
|
1568
1568
|
}
|
|
1569
1569
|
|
|
1570
|
-
@keyframes loadingpulse {
|
|
1571
|
-
0% {
|
|
1572
|
-
opacity: 1;
|
|
1573
|
-
}
|
|
1574
|
-
50% {
|
|
1575
|
-
opacity: 0.5;
|
|
1576
|
-
}
|
|
1577
|
-
100% {
|
|
1578
|
-
opacity: 1;
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
.edit-site-navigation-inspector .block-editor-list-view-leaf .block-editor-list-view-block-contents {
|
|
1582
|
-
white-space: normal;
|
|
1583
|
-
}
|
|
1584
|
-
.edit-site-navigation-inspector .block-editor-list-view-block__title {
|
|
1585
|
-
margin-top: 3px;
|
|
1586
|
-
}
|
|
1587
|
-
.edit-site-navigation-inspector .block-editor-list-view-block__menu-cell {
|
|
1588
|
-
padding-right: 0;
|
|
1589
|
-
}
|
|
1590
|
-
.edit-site-navigation-inspector .edit-site-navigation-inspector__select-menu {
|
|
1591
|
-
margin-bottom: 8px;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
.edit-site-navigation-inspector__placeholder {
|
|
1595
|
-
padding: 8px;
|
|
1596
|
-
margin: 8px;
|
|
1597
|
-
background-color: #f0f0f0;
|
|
1598
|
-
animation: loadingpulse 1s linear infinite;
|
|
1599
|
-
animation-delay: 0.5s;
|
|
1600
|
-
}
|
|
1601
|
-
.edit-site-navigation-inspector__placeholder.is-child {
|
|
1602
|
-
margin-left: 24px;
|
|
1603
|
-
width: 50%;
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
.edit-site-navigation-inspector__empty-msg {
|
|
1607
|
-
padding: 0 8px;
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
1570
|
.edit-site-sidebar-edit-mode {
|
|
1611
1571
|
width: 280px;
|
|
1612
1572
|
}
|
|
@@ -2180,9 +2140,9 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2180
2140
|
}
|
|
2181
2141
|
|
|
2182
2142
|
.edit-site-layout__content {
|
|
2143
|
+
height: 100%;
|
|
2183
2144
|
flex-grow: 1;
|
|
2184
2145
|
display: flex;
|
|
2185
|
-
overflow: hidden;
|
|
2186
2146
|
}
|
|
2187
2147
|
|
|
2188
2148
|
.edit-site-layout__sidebar {
|
|
@@ -2330,6 +2290,20 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2330
2290
|
}
|
|
2331
2291
|
}
|
|
2332
2292
|
|
|
2293
|
+
.edit-site-save-hub {
|
|
2294
|
+
color: #949494;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
.edit-site-save-hub__button {
|
|
2298
|
+
color: inherit;
|
|
2299
|
+
}
|
|
2300
|
+
.edit-site-save-hub__button[aria-disabled=true] {
|
|
2301
|
+
opacity: 1;
|
|
2302
|
+
}
|
|
2303
|
+
.edit-site-save-hub__button[aria-disabled=true]:hover {
|
|
2304
|
+
color: inherit;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2333
2307
|
@media (min-width: 600px) {
|
|
2334
2308
|
.edit-site-save-panel__modal {
|
|
2335
2309
|
width: 600px;
|
|
@@ -2339,25 +2313,27 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2339
2313
|
.edit-site-sidebar__content {
|
|
2340
2314
|
flex-grow: 1;
|
|
2341
2315
|
overflow-y: auto;
|
|
2316
|
+
}
|
|
2317
|
+
.edit-site-sidebar__content .components-navigator-screen {
|
|
2342
2318
|
visibility: hidden;
|
|
2343
2319
|
scrollbar-color: #757575 #1e1e1e;
|
|
2344
2320
|
scrollbar-width: thin;
|
|
2345
2321
|
scrollbar-gutter: stable;
|
|
2346
2322
|
}
|
|
2347
|
-
.edit-site-sidebar__content::-webkit-scrollbar {
|
|
2323
|
+
.edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar {
|
|
2348
2324
|
width: 12px;
|
|
2349
2325
|
height: 12px;
|
|
2350
2326
|
}
|
|
2351
|
-
.edit-site-sidebar__content::-webkit-scrollbar-track {
|
|
2327
|
+
.edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-track {
|
|
2352
2328
|
background-color: #1e1e1e;
|
|
2353
2329
|
}
|
|
2354
|
-
.edit-site-sidebar__content::-webkit-scrollbar-thumb {
|
|
2330
|
+
.edit-site-sidebar__content .components-navigator-screen::-webkit-scrollbar-thumb {
|
|
2355
2331
|
background-color: #757575;
|
|
2356
2332
|
border-radius: 8px;
|
|
2357
2333
|
border: 3px solid transparent;
|
|
2358
2334
|
background-clip: padding-box;
|
|
2359
2335
|
}
|
|
2360
|
-
.edit-site-sidebar__content:hover, .edit-site-sidebar__content:focus, .edit-site-sidebar__content > * {
|
|
2336
|
+
.edit-site-sidebar__content .components-navigator-screen:hover, .edit-site-sidebar__content .components-navigator-screen:focus, .edit-site-sidebar__content .components-navigator-screen > * {
|
|
2361
2337
|
visibility: visible;
|
|
2362
2338
|
}
|
|
2363
2339
|
|
|
@@ -2366,8 +2342,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2366
2342
|
flex-shrink: 0;
|
|
2367
2343
|
margin: 0 24px;
|
|
2368
2344
|
padding: 24px 0;
|
|
2369
|
-
display: flex;
|
|
2370
|
-
justify-content: flex-end;
|
|
2371
2345
|
}
|
|
2372
2346
|
|
|
2373
2347
|
.edit-site-sidebar__content.edit-site-sidebar__content {
|
|
@@ -2390,7 +2364,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2390
2364
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
|
|
2391
2365
|
outline: 3px solid transparent;
|
|
2392
2366
|
}
|
|
2393
|
-
.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 {
|
|
2367
|
+
.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] {
|
|
2394
2368
|
color: #fff;
|
|
2395
2369
|
}
|
|
2396
2370
|
|
|
@@ -2407,20 +2381,6 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2407
2381
|
background: var(--wp-admin-theme-color);
|
|
2408
2382
|
}
|
|
2409
2383
|
|
|
2410
|
-
.edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .components-button {
|
|
2411
|
-
color: #949494;
|
|
2412
|
-
}
|
|
2413
|
-
.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] {
|
|
2414
|
-
color: #fff;
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
.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] {
|
|
2418
|
-
background: #2f2f2f;
|
|
2419
|
-
}
|
|
2420
|
-
.edit-site-sidebar-navigation-screen__content .edit-site-navigation-inspector .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
|
|
2421
|
-
margin-left: -8px;
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
2384
|
.edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button {
|
|
2425
2385
|
cursor: grab;
|
|
2426
2386
|
width: calc(100% - 2px);
|
|
@@ -2439,6 +2399,18 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2439
2399
|
color: #949494;
|
|
2440
2400
|
}
|
|
2441
2401
|
|
|
2402
|
+
.edit-site-sidebar-navigation-screen__page-link {
|
|
2403
|
+
color: #949494;
|
|
2404
|
+
margin-left: 16px;
|
|
2405
|
+
display: inline-block;
|
|
2406
|
+
}
|
|
2407
|
+
.edit-site-sidebar-navigation-screen__page-link:hover, .edit-site-sidebar-navigation-screen__page-link:focus {
|
|
2408
|
+
color: #fff;
|
|
2409
|
+
}
|
|
2410
|
+
.edit-site-sidebar-navigation-screen__page-link .components-external-link__icon {
|
|
2411
|
+
margin-left: 4px;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2442
2414
|
.edit-site-sidebar-navigation-screen__title-icon {
|
|
2443
2415
|
position: sticky;
|
|
2444
2416
|
top: 0;
|
|
@@ -2492,16 +2464,57 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
2492
2464
|
overflow: hidden;
|
|
2493
2465
|
}
|
|
2494
2466
|
|
|
2495
|
-
.edit-site-sidebar-navigation-
|
|
2496
|
-
|
|
2497
|
-
|
|
2467
|
+
.edit-site-sidebar-navigation-screen__description {
|
|
2468
|
+
margin: 0 0 32px 16px;
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__placeholder {
|
|
2472
|
+
padding: 8px;
|
|
2473
|
+
margin: 8px;
|
|
2474
|
+
background-color: #f0f0f0;
|
|
2475
|
+
animation: loadingpulse 1s linear infinite;
|
|
2476
|
+
animation-delay: 0.5s;
|
|
2498
2477
|
}
|
|
2499
|
-
|
|
2478
|
+
|
|
2479
|
+
@keyframes loadingpulse {
|
|
2480
|
+
0% {
|
|
2481
|
+
opacity: 1;
|
|
2482
|
+
}
|
|
2483
|
+
50% {
|
|
2484
|
+
opacity: 0.5;
|
|
2485
|
+
}
|
|
2486
|
+
100% {
|
|
2487
|
+
opacity: 1;
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf {
|
|
2500
2491
|
max-width: calc(100% - 4px);
|
|
2492
|
+
border-radius: 2px;
|
|
2493
|
+
}
|
|
2494
|
+
.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] {
|
|
2495
|
+
background: #2f2f2f;
|
|
2501
2496
|
}
|
|
2502
|
-
.edit-site-sidebar-navigation-screen-navigation-
|
|
2497
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .offcanvas-editor-list-view-leaf .block-editor-list-view-block__menu {
|
|
2498
|
+
margin-left: -8px;
|
|
2499
|
+
}
|
|
2500
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block__contents-cell {
|
|
2503
2501
|
width: 100%;
|
|
2504
2502
|
}
|
|
2503
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-leaf .block-editor-list-view-block-contents {
|
|
2504
|
+
white-space: normal;
|
|
2505
|
+
}
|
|
2506
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__title {
|
|
2507
|
+
margin-top: 3px;
|
|
2508
|
+
}
|
|
2509
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .block-editor-list-view-block__menu-cell {
|
|
2510
|
+
padding-right: 0;
|
|
2511
|
+
}
|
|
2512
|
+
.edit-site-sidebar-navigation-screen-navigation-menus__content .components-button {
|
|
2513
|
+
color: #949494;
|
|
2514
|
+
}
|
|
2515
|
+
.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] {
|
|
2516
|
+
color: #fff;
|
|
2517
|
+
}
|
|
2505
2518
|
|
|
2506
2519
|
.edit-site-site-icon__icon {
|
|
2507
2520
|
fill: currentColor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.7",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
30
|
"@wordpress/a11y": "^3.26.1",
|
|
31
31
|
"@wordpress/api-fetch": "^6.23.1",
|
|
32
|
-
"@wordpress/block-editor": "^11.3.
|
|
33
|
-
"@wordpress/block-library": "^8.3.
|
|
32
|
+
"@wordpress/block-editor": "^11.3.7",
|
|
33
|
+
"@wordpress/block-library": "^8.3.7",
|
|
34
34
|
"@wordpress/blocks": "^12.3.3",
|
|
35
35
|
"@wordpress/components": "^23.3.5",
|
|
36
36
|
"@wordpress/compose": "^6.3.3",
|
|
37
37
|
"@wordpress/core-data": "^6.3.3",
|
|
38
38
|
"@wordpress/data": "^8.3.3",
|
|
39
39
|
"@wordpress/deprecated": "^3.26.1",
|
|
40
|
-
"@wordpress/editor": "^13.3.
|
|
40
|
+
"@wordpress/editor": "^13.3.7",
|
|
41
41
|
"@wordpress/element": "^5.3.2",
|
|
42
42
|
"@wordpress/hooks": "^3.26.1",
|
|
43
43
|
"@wordpress/html-entities": "^3.26.1",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@wordpress/plugins": "^5.3.3",
|
|
52
52
|
"@wordpress/preferences": "^3.3.5",
|
|
53
53
|
"@wordpress/private-apis": "^0.8.1",
|
|
54
|
-
"@wordpress/reusable-blocks": "^4.3.
|
|
54
|
+
"@wordpress/reusable-blocks": "^4.3.7",
|
|
55
55
|
"@wordpress/style-engine": "^1.9.1",
|
|
56
56
|
"@wordpress/url": "^3.27.1",
|
|
57
57
|
"@wordpress/viewport": "^5.3.3",
|
|
58
|
-
"@wordpress/widgets": "^3.3.
|
|
58
|
+
"@wordpress/widgets": "^3.3.7",
|
|
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": "
|
|
76
|
+
"gitHead": "d14fea64bd9ad9d2d86047936974dbed39a5b5b3"
|
|
77
77
|
}
|
|
@@ -43,7 +43,8 @@ function EditorCanvas( { enableResizing, settings, children, ...props } ) {
|
|
|
43
43
|
// Forming a "block formatting context" to prevent margin collapsing.
|
|
44
44
|
// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
|
|
45
45
|
`.is-root-container { display: flow-root; }
|
|
46
|
-
body { position: relative;
|
|
46
|
+
body { position: relative;
|
|
47
|
+
${ canvasMode === 'view' ? 'cursor: pointer;' : '' }}}`
|
|
47
48
|
}</style>
|
|
48
49
|
{ enableResizing && (
|
|
49
50
|
<style>
|
|
@@ -277,6 +277,20 @@ export default function Layout() {
|
|
|
277
277
|
{ canvasResizer }
|
|
278
278
|
{ !! canvasSize.width && (
|
|
279
279
|
<motion.div
|
|
280
|
+
whileHover={
|
|
281
|
+
isEditorPage && canvasMode === 'view'
|
|
282
|
+
? {
|
|
283
|
+
scale: 1.01,
|
|
284
|
+
transition: {
|
|
285
|
+
duration:
|
|
286
|
+
disableMotion ||
|
|
287
|
+
isResizing
|
|
288
|
+
? 0
|
|
289
|
+
: 0.2,
|
|
290
|
+
},
|
|
291
|
+
}
|
|
292
|
+
: {}
|
|
293
|
+
}
|
|
280
294
|
initial={ false }
|
|
281
295
|
layout="position"
|
|
282
296
|
className="edit-site-layout__canvas"
|
|
@@ -19,8 +19,10 @@ import useTitle from '../routes/use-title';
|
|
|
19
19
|
|
|
20
20
|
export default function List() {
|
|
21
21
|
const {
|
|
22
|
-
params: {
|
|
22
|
+
params: { path },
|
|
23
23
|
} = useLocation();
|
|
24
|
+
const templateType =
|
|
25
|
+
path === '/wp_template/all' ? 'wp_template' : 'wp_template_part';
|
|
24
26
|
|
|
25
27
|
useRegisterShortcuts();
|
|
26
28
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { addQueryArgs } from '@wordpress/url';
|
|
4
|
+
import { addQueryArgs, getQueryArgs, removeQueryArgs } from '@wordpress/url';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -21,8 +21,15 @@ export function useLink( params = {}, state, shouldReplace = false ) {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
const currentArgs = getQueryArgs( window.location.href );
|
|
25
|
+
const currentUrlWithoutArgs = removeQueryArgs(
|
|
26
|
+
window.location.href,
|
|
27
|
+
...Object.keys( currentArgs )
|
|
28
|
+
);
|
|
29
|
+
const newUrl = addQueryArgs( currentUrlWithoutArgs, params );
|
|
30
|
+
|
|
24
31
|
return {
|
|
25
|
-
href:
|
|
32
|
+
href: newUrl,
|
|
26
33
|
onClick,
|
|
27
34
|
};
|
|
28
35
|
}
|
|
@@ -12,7 +12,7 @@ import { displayShortcut } from '@wordpress/keycodes';
|
|
|
12
12
|
*/
|
|
13
13
|
import { store as editSiteStore } from '../../store';
|
|
14
14
|
|
|
15
|
-
export default function SaveButton(
|
|
15
|
+
export default function SaveButton() {
|
|
16
16
|
const { isDirty, isSaving, isSaveViewOpen } = useSelect( ( select ) => {
|
|
17
17
|
const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =
|
|
18
18
|
select( coreStore );
|
|
@@ -52,7 +52,7 @@ export default function SaveButton( { showTooltip = true } ) {
|
|
|
52
52
|
* of the button that we want to avoid. By setting `showTooltip`,
|
|
53
53
|
& the tooltip is always rendered even when there's no keyboard shortcut.
|
|
54
54
|
*/
|
|
55
|
-
showTooltip
|
|
55
|
+
showTooltip
|
|
56
56
|
>
|
|
57
57
|
{ label }
|
|
58
58
|
</Button>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
5
|
+
import { Button, __experimentalHStack as HStack } from '@wordpress/components';
|
|
6
|
+
import { sprintf, __, _n } from '@wordpress/i18n';
|
|
7
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
8
|
+
import { displayShortcut } from '@wordpress/keycodes';
|
|
9
|
+
import { check } from '@wordpress/icons';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import { store as editSiteStore } from '../../store';
|
|
15
|
+
|
|
16
|
+
export default function SaveButton() {
|
|
17
|
+
const { countUnsavedChanges, isDirty, isSaving, isSaveViewOpen } =
|
|
18
|
+
useSelect( ( select ) => {
|
|
19
|
+
const {
|
|
20
|
+
__experimentalGetDirtyEntityRecords,
|
|
21
|
+
isSavingEntityRecord,
|
|
22
|
+
} = select( coreStore );
|
|
23
|
+
const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
|
|
24
|
+
const { isSaveViewOpened } = select( editSiteStore );
|
|
25
|
+
return {
|
|
26
|
+
isDirty: dirtyEntityRecords.length > 0,
|
|
27
|
+
isSaving: dirtyEntityRecords.some( ( record ) =>
|
|
28
|
+
isSavingEntityRecord( record.kind, record.name, record.key )
|
|
29
|
+
),
|
|
30
|
+
isSaveViewOpen: isSaveViewOpened(),
|
|
31
|
+
countUnsavedChanges: dirtyEntityRecords.length,
|
|
32
|
+
};
|
|
33
|
+
}, [] );
|
|
34
|
+
const { setIsSaveViewOpened } = useDispatch( editSiteStore );
|
|
35
|
+
|
|
36
|
+
const disabled = ! isDirty || isSaving;
|
|
37
|
+
|
|
38
|
+
const label = disabled ? __( 'Saved' ) : __( 'Save' );
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<HStack className="edit-site-save-hub" alignment="right" spacing={ 4 }>
|
|
42
|
+
{ isDirty && (
|
|
43
|
+
<span>
|
|
44
|
+
{ sprintf(
|
|
45
|
+
// translators: %d: number of unsaved changes (number).
|
|
46
|
+
_n(
|
|
47
|
+
'%d unsaved change',
|
|
48
|
+
'%d unsaved changes',
|
|
49
|
+
countUnsavedChanges
|
|
50
|
+
),
|
|
51
|
+
countUnsavedChanges
|
|
52
|
+
) }
|
|
53
|
+
</span>
|
|
54
|
+
) }
|
|
55
|
+
<Button
|
|
56
|
+
className="edit-site-save-hub__button"
|
|
57
|
+
variant={ disabled ? undefined : 'primary' }
|
|
58
|
+
aria-disabled={ disabled }
|
|
59
|
+
aria-expanded={ isSaveViewOpen }
|
|
60
|
+
isBusy={ isSaving }
|
|
61
|
+
onClick={
|
|
62
|
+
disabled ? undefined : () => setIsSaveViewOpened( true )
|
|
63
|
+
}
|
|
64
|
+
label={ label }
|
|
65
|
+
/*
|
|
66
|
+
* We want the tooltip to show the keyboard shortcut only when the
|
|
67
|
+
* button does something, i.e. when it's not disabled.
|
|
68
|
+
*/
|
|
69
|
+
shortcut={
|
|
70
|
+
disabled ? undefined : displayShortcut.primary( 's' )
|
|
71
|
+
}
|
|
72
|
+
icon={ disabled ? check : undefined }
|
|
73
|
+
>
|
|
74
|
+
{ label }
|
|
75
|
+
</Button>
|
|
76
|
+
</HStack>
|
|
77
|
+
);
|
|
78
|
+
}
|