@wordpress/edit-site 4.3.10 → 4.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.
- package/CHANGELOG.md +6 -0
- package/build/components/add-new-template/new-template.js +2 -2
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/global-styles/border-panel.js +95 -79
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/context-menu.js +3 -3
- package/build/components/global-styles/context-menu.js.map +1 -1
- package/build/components/global-styles/header.js +15 -11
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +4 -4
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +1 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +1 -1
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +3 -3
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-root.js +13 -3
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +1 -1
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +19 -14
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/list/table.js +1 -1
- package/build/components/list/table.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/constants.js +2 -2
- package/build/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
- package/build/components/preferences-modal/index.js +5 -1
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/routes/use-title.js +3 -1
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +1 -5
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar/navigation-menu-sidebar/index.js +4 -2
- package/build/components/sidebar/navigation-menu-sidebar/index.js.map +1 -1
- package/build/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -5
- package/build/components/sidebar/navigation-menu-sidebar/navigation-menu.js.map +1 -1
- package/build/index.js +11 -3
- package/build/index.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +2 -2
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +98 -80
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/context-menu.js +4 -4
- package/build-module/components/global-styles/context-menu.js.map +1 -1
- package/build-module/components/global-styles/header.js +16 -11
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +3 -3
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +2 -2
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +2 -2
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +4 -4
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +15 -5
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +2 -2
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +18 -14
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/list/table.js +1 -1
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/constants.js +2 -2
- package/build-module/components/navigation-sidebar/navigation-panel/constants.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +5 -1
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/routes/use-title.js +2 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -5
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/navigation-menu-sidebar/index.js +4 -2
- package/build-module/components/sidebar/navigation-menu-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -5
- package/build-module/components/sidebar/navigation-menu-sidebar/navigation-menu.js.map +1 -1
- package/build-module/index.js +10 -3
- package/build-module/index.js.map +1 -1
- package/build-style/style-rtl.css +25 -34
- package/build-style/style.css +25 -34
- package/package.json +29 -29
- package/src/components/add-new-template/new-template.js +2 -2
- package/src/components/global-styles/border-panel.js +102 -109
- package/src/components/global-styles/context-menu.js +7 -7
- package/src/components/global-styles/header.js +20 -17
- package/src/components/global-styles/navigation-button.js +3 -3
- package/src/components/global-styles/palette.js +3 -3
- package/src/components/global-styles/screen-block-list.js +3 -3
- package/src/components/global-styles/screen-colors.js +7 -7
- package/src/components/global-styles/screen-root.js +34 -24
- package/src/components/global-styles/screen-typography.js +3 -3
- package/src/components/global-styles/test/use-global-styles-output.js +1 -0
- package/src/components/global-styles/use-global-styles-output.js +31 -11
- package/src/components/header/document-actions/style.scss +1 -1
- package/src/components/header/style.scss +14 -29
- package/src/components/list/style.scss +1 -0
- package/src/components/list/table.js +1 -4
- package/src/components/navigation-sidebar/navigation-panel/constants.js +2 -2
- package/src/components/preferences-modal/index.js +8 -1
- package/src/components/routes/use-title.js +3 -2
- package/src/components/secondary-sidebar/list-view-sidebar.js +1 -5
- package/src/components/sidebar/index.js +2 -0
- package/src/components/sidebar/navigation-menu-sidebar/index.js +4 -1
- package/src/components/sidebar/navigation-menu-sidebar/navigation-menu.js +1 -7
- package/src/components/sidebar/style.scss +7 -0
- package/src/index.js +17 -1
|
@@ -416,7 +416,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
416
416
|
}
|
|
417
417
|
@media (min-width: 480px) {
|
|
418
418
|
.interface-more-menu-dropdown__content .components-popover__content {
|
|
419
|
-
width: auto;
|
|
420
419
|
max-width: 480px;
|
|
421
420
|
}
|
|
422
421
|
}
|
|
@@ -430,6 +429,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
430
429
|
|
|
431
430
|
.interface-pinned-items {
|
|
432
431
|
display: flex;
|
|
432
|
+
gap: 4px;
|
|
433
|
+
margin-left: -4px;
|
|
433
434
|
}
|
|
434
435
|
.interface-pinned-items .components-button:not(:first-child) {
|
|
435
436
|
display: none;
|
|
@@ -440,7 +441,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
440
441
|
}
|
|
441
442
|
}
|
|
442
443
|
.interface-pinned-items .components-button {
|
|
443
|
-
margin
|
|
444
|
+
margin: 0;
|
|
444
445
|
}
|
|
445
446
|
.interface-pinned-items .components-button svg {
|
|
446
447
|
max-width: 24px;
|
|
@@ -900,42 +901,30 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
900
901
|
}
|
|
901
902
|
|
|
902
903
|
/**
|
|
903
|
-
* Buttons
|
|
904
|
+
* Buttons on the right side
|
|
904
905
|
*/
|
|
905
906
|
.edit-site-header__actions {
|
|
906
907
|
display: inline-flex;
|
|
907
908
|
align-items: center;
|
|
908
909
|
padding-left: 4px;
|
|
910
|
+
gap: 4px;
|
|
909
911
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
@media (min-width: 782px) {
|
|
914
|
-
.edit-site-header__actions .interface-pinned-items {
|
|
915
|
-
display: inline-flex;
|
|
912
|
+
@media (min-width: 600px) {
|
|
913
|
+
.edit-site-header__actions {
|
|
914
|
+
padding-left: 10px;
|
|
916
915
|
}
|
|
917
916
|
}
|
|
918
|
-
.edit-site-header__actions .editor-post-saved-state,
|
|
919
|
-
.edit-site-header__actions .components-button.components-button {
|
|
920
|
-
margin-left: 4px;
|
|
921
|
-
}
|
|
922
917
|
@media (min-width: 600px) {
|
|
923
|
-
.edit-site-header__actions
|
|
924
|
-
|
|
925
|
-
margin-left: 12px;
|
|
918
|
+
.edit-site-header__actions {
|
|
919
|
+
gap: 8px;
|
|
926
920
|
}
|
|
927
921
|
}
|
|
928
|
-
.edit-site-header__actions .
|
|
929
|
-
|
|
930
|
-
padding: 0 6px;
|
|
931
|
-
}
|
|
932
|
-
.edit-site-header__actions .edit-site-more-menu .components-button,
|
|
933
|
-
.edit-site-header__actions .interface-pinned-items .components-button {
|
|
934
|
-
margin-left: 0;
|
|
922
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
923
|
+
display: none;
|
|
935
924
|
}
|
|
936
|
-
@media (min-width:
|
|
937
|
-
.edit-site-header__actions {
|
|
938
|
-
|
|
925
|
+
@media (min-width: 782px) {
|
|
926
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
927
|
+
display: inline-flex;
|
|
939
928
|
}
|
|
940
929
|
}
|
|
941
930
|
|
|
@@ -974,10 +963,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
974
963
|
.show-icon-labels .edit-site-header .edit-site-save-button__button {
|
|
975
964
|
padding-right: 6px;
|
|
976
965
|
padding-left: 6px;
|
|
977
|
-
margin-left: 4px;
|
|
978
|
-
}
|
|
979
|
-
.show-icon-labels .edit-site-header .block-editor-post-preview__button-toggle {
|
|
980
|
-
margin-left: 4px;
|
|
981
966
|
}
|
|
982
967
|
.show-icon-labels .edit-site-header .edit-site-header-toolbar__inserter-toggle.edit-site-header-toolbar__inserter-toggle,
|
|
983
968
|
.show-icon-labels .edit-site-header .edit-site-document-actions__get-info.edit-site-document-actions__get-info.edit-site-document-actions__get-info {
|
|
@@ -1045,7 +1030,7 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
1045
1030
|
margin-right: 6px;
|
|
1046
1031
|
}
|
|
1047
1032
|
|
|
1048
|
-
.edit-site-document-actions__info-dropdown > .components-popover__content
|
|
1033
|
+
.edit-site-document-actions__info-dropdown > .components-popover__content {
|
|
1049
1034
|
padding: 0;
|
|
1050
1035
|
min-width: 240px;
|
|
1051
1036
|
}
|
|
@@ -1368,6 +1353,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1368
1353
|
}
|
|
1369
1354
|
.edit-site-list-table tr .edit-site-list-table-column:nth-child(2) {
|
|
1370
1355
|
width: calc(40% - 18px);
|
|
1356
|
+
word-break: break-word;
|
|
1371
1357
|
}
|
|
1372
1358
|
.edit-site-list-table tr .edit-site-list-table-column:nth-child(3) {
|
|
1373
1359
|
min-width: 36px;
|
|
@@ -1542,6 +1528,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1542
1528
|
padding: 16px;
|
|
1543
1529
|
}
|
|
1544
1530
|
|
|
1531
|
+
.edit-site-navigation-sidebar__beta,
|
|
1545
1532
|
.edit-site-global-styles-sidebar__beta {
|
|
1546
1533
|
display: inline-flex;
|
|
1547
1534
|
margin-right: 8px;
|
|
@@ -1555,6 +1542,10 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1555
1542
|
line-height: 1;
|
|
1556
1543
|
}
|
|
1557
1544
|
|
|
1545
|
+
.edit-site-global-styles-sidebar hr {
|
|
1546
|
+
margin: 0;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1558
1549
|
.components-panel__header.edit-site-sidebar__panel-tabs {
|
|
1559
1550
|
justify-content: flex-start;
|
|
1560
1551
|
padding-right: 0;
|
|
@@ -1603,7 +1594,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1603
1594
|
visibility: hidden;
|
|
1604
1595
|
}
|
|
1605
1596
|
.components-button.edit-site-sidebar__panel-tab.is-active {
|
|
1606
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -
|
|
1597
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
|
|
1607
1598
|
position: relative;
|
|
1608
1599
|
z-index: 1;
|
|
1609
1600
|
}
|
|
@@ -1614,7 +1605,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1614
1605
|
bottom: 1px;
|
|
1615
1606
|
left: 0;
|
|
1616
1607
|
right: 0;
|
|
1617
|
-
border-bottom:
|
|
1608
|
+
border-bottom: 1.5px solid transparent;
|
|
1618
1609
|
}
|
|
1619
1610
|
.components-button.edit-site-sidebar__panel-tab:focus {
|
|
1620
1611
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -1622,7 +1613,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1622
1613
|
z-index: 1;
|
|
1623
1614
|
}
|
|
1624
1615
|
.components-button.edit-site-sidebar__panel-tab.is-active:focus {
|
|
1625
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -
|
|
1616
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
|
|
1626
1617
|
}
|
|
1627
1618
|
|
|
1628
1619
|
@keyframes loadingpulse {
|
package/build-style/style.css
CHANGED
|
@@ -416,7 +416,6 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
416
416
|
}
|
|
417
417
|
@media (min-width: 480px) {
|
|
418
418
|
.interface-more-menu-dropdown__content .components-popover__content {
|
|
419
|
-
width: auto;
|
|
420
419
|
max-width: 480px;
|
|
421
420
|
}
|
|
422
421
|
}
|
|
@@ -430,6 +429,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
430
429
|
|
|
431
430
|
.interface-pinned-items {
|
|
432
431
|
display: flex;
|
|
432
|
+
gap: 4px;
|
|
433
|
+
margin-right: -4px;
|
|
433
434
|
}
|
|
434
435
|
.interface-pinned-items .components-button:not(:first-child) {
|
|
435
436
|
display: none;
|
|
@@ -440,7 +441,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
440
441
|
}
|
|
441
442
|
}
|
|
442
443
|
.interface-pinned-items .components-button {
|
|
443
|
-
margin
|
|
444
|
+
margin: 0;
|
|
444
445
|
}
|
|
445
446
|
.interface-pinned-items .components-button svg {
|
|
446
447
|
max-width: 24px;
|
|
@@ -900,42 +901,30 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
900
901
|
}
|
|
901
902
|
|
|
902
903
|
/**
|
|
903
|
-
* Buttons
|
|
904
|
+
* Buttons on the right side
|
|
904
905
|
*/
|
|
905
906
|
.edit-site-header__actions {
|
|
906
907
|
display: inline-flex;
|
|
907
908
|
align-items: center;
|
|
908
909
|
padding-right: 4px;
|
|
910
|
+
gap: 4px;
|
|
909
911
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
@media (min-width: 782px) {
|
|
914
|
-
.edit-site-header__actions .interface-pinned-items {
|
|
915
|
-
display: inline-flex;
|
|
912
|
+
@media (min-width: 600px) {
|
|
913
|
+
.edit-site-header__actions {
|
|
914
|
+
padding-right: 10px;
|
|
916
915
|
}
|
|
917
916
|
}
|
|
918
|
-
.edit-site-header__actions .editor-post-saved-state,
|
|
919
|
-
.edit-site-header__actions .components-button.components-button {
|
|
920
|
-
margin-right: 4px;
|
|
921
|
-
}
|
|
922
917
|
@media (min-width: 600px) {
|
|
923
|
-
.edit-site-header__actions
|
|
924
|
-
|
|
925
|
-
margin-right: 12px;
|
|
918
|
+
.edit-site-header__actions {
|
|
919
|
+
gap: 8px;
|
|
926
920
|
}
|
|
927
921
|
}
|
|
928
|
-
.edit-site-header__actions .
|
|
929
|
-
|
|
930
|
-
padding: 0 6px;
|
|
931
|
-
}
|
|
932
|
-
.edit-site-header__actions .edit-site-more-menu .components-button,
|
|
933
|
-
.edit-site-header__actions .interface-pinned-items .components-button {
|
|
934
|
-
margin-right: 0;
|
|
922
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
923
|
+
display: none;
|
|
935
924
|
}
|
|
936
|
-
@media (min-width:
|
|
937
|
-
.edit-site-header__actions {
|
|
938
|
-
|
|
925
|
+
@media (min-width: 782px) {
|
|
926
|
+
.edit-site-header__actions .interface-pinned-items {
|
|
927
|
+
display: inline-flex;
|
|
939
928
|
}
|
|
940
929
|
}
|
|
941
930
|
|
|
@@ -974,10 +963,6 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
974
963
|
.show-icon-labels .edit-site-header .edit-site-save-button__button {
|
|
975
964
|
padding-left: 6px;
|
|
976
965
|
padding-right: 6px;
|
|
977
|
-
margin-right: 4px;
|
|
978
|
-
}
|
|
979
|
-
.show-icon-labels .edit-site-header .block-editor-post-preview__button-toggle {
|
|
980
|
-
margin-right: 4px;
|
|
981
966
|
}
|
|
982
967
|
.show-icon-labels .edit-site-header .edit-site-header-toolbar__inserter-toggle.edit-site-header-toolbar__inserter-toggle,
|
|
983
968
|
.show-icon-labels .edit-site-header .edit-site-document-actions__get-info.edit-site-document-actions__get-info.edit-site-document-actions__get-info {
|
|
@@ -1045,7 +1030,7 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
1045
1030
|
margin-left: 6px;
|
|
1046
1031
|
}
|
|
1047
1032
|
|
|
1048
|
-
.edit-site-document-actions__info-dropdown > .components-popover__content
|
|
1033
|
+
.edit-site-document-actions__info-dropdown > .components-popover__content {
|
|
1049
1034
|
padding: 0;
|
|
1050
1035
|
min-width: 240px;
|
|
1051
1036
|
}
|
|
@@ -1368,6 +1353,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1368
1353
|
}
|
|
1369
1354
|
.edit-site-list-table tr .edit-site-list-table-column:nth-child(2) {
|
|
1370
1355
|
width: calc(40% - 18px);
|
|
1356
|
+
word-break: break-word;
|
|
1371
1357
|
}
|
|
1372
1358
|
.edit-site-list-table tr .edit-site-list-table-column:nth-child(3) {
|
|
1373
1359
|
min-width: 36px;
|
|
@@ -1542,6 +1528,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1542
1528
|
padding: 16px;
|
|
1543
1529
|
}
|
|
1544
1530
|
|
|
1531
|
+
.edit-site-navigation-sidebar__beta,
|
|
1545
1532
|
.edit-site-global-styles-sidebar__beta {
|
|
1546
1533
|
display: inline-flex;
|
|
1547
1534
|
margin-left: 8px;
|
|
@@ -1555,6 +1542,10 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1555
1542
|
line-height: 1;
|
|
1556
1543
|
}
|
|
1557
1544
|
|
|
1545
|
+
.edit-site-global-styles-sidebar hr {
|
|
1546
|
+
margin: 0;
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1558
1549
|
.components-panel__header.edit-site-sidebar__panel-tabs {
|
|
1559
1550
|
justify-content: flex-start;
|
|
1560
1551
|
padding-left: 0;
|
|
@@ -1603,7 +1594,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1603
1594
|
visibility: hidden;
|
|
1604
1595
|
}
|
|
1605
1596
|
.components-button.edit-site-sidebar__panel-tab.is-active {
|
|
1606
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -
|
|
1597
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
|
|
1607
1598
|
position: relative;
|
|
1608
1599
|
z-index: 1;
|
|
1609
1600
|
}
|
|
@@ -1614,7 +1605,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1614
1605
|
bottom: 1px;
|
|
1615
1606
|
right: 0;
|
|
1616
1607
|
left: 0;
|
|
1617
|
-
border-bottom:
|
|
1608
|
+
border-bottom: 1.5px solid transparent;
|
|
1618
1609
|
}
|
|
1619
1610
|
.components-button.edit-site-sidebar__panel-tab:focus {
|
|
1620
1611
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
@@ -1622,7 +1613,7 @@ body.is-fullscreen-mode .edit-site-list-header {
|
|
|
1622
1613
|
z-index: 1;
|
|
1623
1614
|
}
|
|
1624
1615
|
.components-button.edit-site-sidebar__panel-tab.is-active:focus {
|
|
1625
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -
|
|
1616
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
|
|
1626
1617
|
}
|
|
1627
1618
|
|
|
1628
1619
|
@keyframes loadingpulse {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.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,33 +27,33 @@
|
|
|
27
27
|
"react-native": "src/index",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.16.0",
|
|
30
|
-
"@wordpress/a11y": "^3.
|
|
31
|
-
"@wordpress/api-fetch": "^6.
|
|
32
|
-
"@wordpress/block-editor": "^
|
|
33
|
-
"@wordpress/block-library": "^7.
|
|
34
|
-
"@wordpress/blocks": "^11.
|
|
35
|
-
"@wordpress/components": "^19.
|
|
36
|
-
"@wordpress/compose": "^5.
|
|
37
|
-
"@wordpress/core-data": "^4.
|
|
38
|
-
"@wordpress/data": "^6.
|
|
39
|
-
"@wordpress/deprecated": "^3.
|
|
40
|
-
"@wordpress/editor": "^12.
|
|
41
|
-
"@wordpress/element": "^4.
|
|
42
|
-
"@wordpress/hooks": "^3.
|
|
43
|
-
"@wordpress/html-entities": "^3.
|
|
44
|
-
"@wordpress/i18n": "^4.
|
|
45
|
-
"@wordpress/icons": "^
|
|
46
|
-
"@wordpress/interface": "^4.
|
|
47
|
-
"@wordpress/keyboard-shortcuts": "^3.
|
|
48
|
-
"@wordpress/keycodes": "^3.
|
|
49
|
-
"@wordpress/media-utils": "^
|
|
50
|
-
"@wordpress/notices": "^3.
|
|
51
|
-
"@wordpress/plugins": "^4.
|
|
52
|
-
"@wordpress/preferences": "^1.
|
|
53
|
-
"@wordpress/reusable-blocks": "^3.
|
|
54
|
-
"@wordpress/style-engine": "^0.
|
|
55
|
-
"@wordpress/url": "^3.
|
|
56
|
-
"@wordpress/viewport": "^4.
|
|
30
|
+
"@wordpress/a11y": "^3.9.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.6.0",
|
|
32
|
+
"@wordpress/block-editor": "^9.1.0",
|
|
33
|
+
"@wordpress/block-library": "^7.6.0",
|
|
34
|
+
"@wordpress/blocks": "^11.8.0",
|
|
35
|
+
"@wordpress/components": "^19.11.0",
|
|
36
|
+
"@wordpress/compose": "^5.7.0",
|
|
37
|
+
"@wordpress/core-data": "^4.7.0",
|
|
38
|
+
"@wordpress/data": "^6.9.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.9.0",
|
|
40
|
+
"@wordpress/editor": "^12.8.0",
|
|
41
|
+
"@wordpress/element": "^4.7.0",
|
|
42
|
+
"@wordpress/hooks": "^3.9.0",
|
|
43
|
+
"@wordpress/html-entities": "^3.9.0",
|
|
44
|
+
"@wordpress/i18n": "^4.9.0",
|
|
45
|
+
"@wordpress/icons": "^9.0.0",
|
|
46
|
+
"@wordpress/interface": "^4.8.0",
|
|
47
|
+
"@wordpress/keyboard-shortcuts": "^3.7.0",
|
|
48
|
+
"@wordpress/keycodes": "^3.9.0",
|
|
49
|
+
"@wordpress/media-utils": "^4.0.0",
|
|
50
|
+
"@wordpress/notices": "^3.9.0",
|
|
51
|
+
"@wordpress/plugins": "^4.7.0",
|
|
52
|
+
"@wordpress/preferences": "^2.1.0",
|
|
53
|
+
"@wordpress/reusable-blocks": "^3.7.0",
|
|
54
|
+
"@wordpress/style-engine": "^0.8.0",
|
|
55
|
+
"@wordpress/url": "^3.10.0",
|
|
56
|
+
"@wordpress/viewport": "^4.7.0",
|
|
57
57
|
"classnames": "^2.3.1",
|
|
58
58
|
"downloadjs": "^1.4.7",
|
|
59
59
|
"history": "^5.1.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "198fa129cf1af8dc615918987ea6795cd40ab7df"
|
|
72
72
|
}
|
|
@@ -41,7 +41,7 @@ import { store as editSiteStore } from '../../store';
|
|
|
41
41
|
|
|
42
42
|
const DEFAULT_TEMPLATE_SLUGS = [
|
|
43
43
|
'front-page',
|
|
44
|
-
'single
|
|
44
|
+
'single',
|
|
45
45
|
'page',
|
|
46
46
|
'index',
|
|
47
47
|
'archive',
|
|
@@ -56,7 +56,7 @@ const DEFAULT_TEMPLATE_SLUGS = [
|
|
|
56
56
|
|
|
57
57
|
const TEMPLATE_ICONS = {
|
|
58
58
|
'front-page': home,
|
|
59
|
-
|
|
59
|
+
single: post,
|
|
60
60
|
page,
|
|
61
61
|
archive,
|
|
62
62
|
search,
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
+
import { __experimentalBorderRadiusControl as BorderRadiusControl } from '@wordpress/block-editor';
|
|
4
5
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from '@wordpress/block-editor';
|
|
9
|
-
import {
|
|
6
|
+
__experimentalBorderBoxControl as BorderBoxControl,
|
|
7
|
+
__experimentalHasSplitBorders as hasSplitBorders,
|
|
8
|
+
__experimentalIsDefinedBorder as isDefinedBorder,
|
|
10
9
|
__experimentalToolsPanel as ToolsPanel,
|
|
11
10
|
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
12
|
-
__experimentalUnitControl as UnitControl,
|
|
13
|
-
__experimentalUseCustomUnits as useCustomUnits,
|
|
14
11
|
} from '@wordpress/components';
|
|
12
|
+
import { useCallback } from '@wordpress/element';
|
|
15
13
|
import { __ } from '@wordpress/i18n';
|
|
16
14
|
|
|
17
15
|
/**
|
|
@@ -24,8 +22,6 @@ import {
|
|
|
24
22
|
useStyle,
|
|
25
23
|
} from './hooks';
|
|
26
24
|
|
|
27
|
-
const MIN_BORDER_WIDTH = 0;
|
|
28
|
-
|
|
29
25
|
export function useHasBorderPanel( name ) {
|
|
30
26
|
const controls = [
|
|
31
27
|
useHasBorderColorControl( name ),
|
|
@@ -69,63 +65,45 @@ function useHasBorderWidthControl( name ) {
|
|
|
69
65
|
);
|
|
70
66
|
}
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const createHasValueCallback = ( feature ) => () =>
|
|
77
|
-
!! userBorderStyles?.[ feature ];
|
|
68
|
+
function applyFallbackStyle( border ) {
|
|
69
|
+
if ( ! border ) {
|
|
70
|
+
return border;
|
|
71
|
+
}
|
|
78
72
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
setStyle( value || undefined );
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const units = useCustomUnits( {
|
|
86
|
-
availableUnits: useSetting( 'spacing.units' )[ 0 ] || [
|
|
87
|
-
'px',
|
|
88
|
-
'em',
|
|
89
|
-
'rem',
|
|
90
|
-
],
|
|
91
|
-
} );
|
|
92
|
-
|
|
93
|
-
// Border width.
|
|
94
|
-
const showBorderWidth = useHasBorderWidthControl( name );
|
|
95
|
-
const [ borderWidthValue, setBorderWidth ] = useStyle(
|
|
96
|
-
'border.width',
|
|
97
|
-
name
|
|
98
|
-
);
|
|
73
|
+
if ( ! border.style && ( border.color || border.width ) ) {
|
|
74
|
+
return { ...border, style: 'solid' };
|
|
75
|
+
}
|
|
99
76
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const [ borderStyle, setBorderStyle ] = useStyle( 'border.style', name );
|
|
77
|
+
return border;
|
|
78
|
+
}
|
|
103
79
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
80
|
+
function applyAllFallbackStyles( border ) {
|
|
81
|
+
if ( ! border ) {
|
|
82
|
+
return border;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if ( hasSplitBorders( border ) ) {
|
|
86
|
+
return {
|
|
87
|
+
top: applyFallbackStyle( border.top ),
|
|
88
|
+
right: applyFallbackStyle( border.right ),
|
|
89
|
+
bottom: applyFallbackStyle( border.bottom ),
|
|
90
|
+
left: applyFallbackStyle( border.left ),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return applyFallbackStyle( border );
|
|
95
|
+
}
|
|
110
96
|
|
|
111
|
-
|
|
112
|
-
|
|
97
|
+
export default function BorderPanel( { name } ) {
|
|
98
|
+
// To better reflect if the user has customized a value we need to
|
|
99
|
+
// ensure the style value being checked is from the `user` origin.
|
|
100
|
+
const [ userBorderStyles ] = useStyle( 'border', name, 'user' );
|
|
101
|
+
const [ border, setBorder ] = useStyle( 'border', name );
|
|
102
|
+
const colors = useColorsPerOrigin( name );
|
|
113
103
|
|
|
114
|
-
// Border color.
|
|
115
104
|
const showBorderColor = useHasBorderColorControl( name );
|
|
116
|
-
const
|
|
117
|
-
const
|
|
118
|
-
const disableCustomGradients = ! useSetting( 'color.customGradient' )[ 0 ];
|
|
119
|
-
|
|
120
|
-
const borderColorSettings = [
|
|
121
|
-
{
|
|
122
|
-
label: __( 'Color' ),
|
|
123
|
-
colors: useColorsPerOrigin( name ),
|
|
124
|
-
colorValue: borderColor,
|
|
125
|
-
onColorChange: handleOnChangeWithStyle( setBorderColor ),
|
|
126
|
-
clearable: false,
|
|
127
|
-
},
|
|
128
|
-
];
|
|
105
|
+
const showBorderStyle = useHasBorderStyleControl( name );
|
|
106
|
+
const showBorderWidth = useHasBorderWidthControl( name );
|
|
129
107
|
|
|
130
108
|
// Border radius.
|
|
131
109
|
const showBorderRadius = useHasBorderRadiusControl( name );
|
|
@@ -141,60 +119,73 @@ export default function BorderPanel( { name } ) {
|
|
|
141
119
|
return !! borderValues;
|
|
142
120
|
};
|
|
143
121
|
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
122
|
+
const resetBorder = () => {
|
|
123
|
+
if ( hasBorderRadius() ) {
|
|
124
|
+
return setBorder( { radius: userBorderStyles.radius } );
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
setBorder( undefined );
|
|
149
128
|
};
|
|
150
129
|
|
|
130
|
+
const resetAll = useCallback( () => setBorder( undefined ), [ setBorder ] );
|
|
131
|
+
const onBorderChange = useCallback(
|
|
132
|
+
( newBorder ) => {
|
|
133
|
+
// Ensure we have a visible border style when a border width or
|
|
134
|
+
// color is being selected.
|
|
135
|
+
const newBorderWithStyle = applyAllFallbackStyles( newBorder );
|
|
136
|
+
|
|
137
|
+
// As we can't conditionally generate styles based on if other
|
|
138
|
+
// style properties have been set we need to force split border
|
|
139
|
+
// definitions for user set border styles. Border radius is derived
|
|
140
|
+
// from the same property i.e. `border.radius` if it is a string
|
|
141
|
+
// that is used. The longhand border radii styles are only generated
|
|
142
|
+
// if that property is an object.
|
|
143
|
+
//
|
|
144
|
+
// For borders (color, style, and width) those are all properties on
|
|
145
|
+
// the `border` style property. This means if the theme.json defined
|
|
146
|
+
// split borders and the user condenses them into a flat border or
|
|
147
|
+
// vice-versa we'd get both sets of styles which would conflict.
|
|
148
|
+
const updatedBorder = ! hasSplitBorders( newBorderWithStyle )
|
|
149
|
+
? {
|
|
150
|
+
top: newBorderWithStyle,
|
|
151
|
+
right: newBorderWithStyle,
|
|
152
|
+
bottom: newBorderWithStyle,
|
|
153
|
+
left: newBorderWithStyle,
|
|
154
|
+
}
|
|
155
|
+
: {
|
|
156
|
+
color: null,
|
|
157
|
+
style: null,
|
|
158
|
+
width: null,
|
|
159
|
+
...newBorderWithStyle,
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// As radius is maintained separately to color, style, and width
|
|
163
|
+
// maintain its value. Undefined values here will be cleaned when
|
|
164
|
+
// global styles are saved.
|
|
165
|
+
setBorder( { radius: border?.radius, ...updatedBorder } );
|
|
166
|
+
},
|
|
167
|
+
[ setBorder ]
|
|
168
|
+
);
|
|
169
|
+
|
|
151
170
|
return (
|
|
152
171
|
<ToolsPanel label={ __( 'Border' ) } resetAll={ resetAll }>
|
|
153
|
-
{ showBorderWidth && (
|
|
154
|
-
<ToolsPanelItem
|
|
155
|
-
className="single-column"
|
|
156
|
-
hasValue={ createHasValueCallback( 'width' ) }
|
|
157
|
-
label={ __( 'Width' ) }
|
|
158
|
-
onDeselect={ createResetCallback( setBorderWidth ) }
|
|
159
|
-
isShownByDefault={ true }
|
|
160
|
-
>
|
|
161
|
-
<UnitControl
|
|
162
|
-
value={ borderWidthValue }
|
|
163
|
-
label={ __( 'Width' ) }
|
|
164
|
-
min={ MIN_BORDER_WIDTH }
|
|
165
|
-
onChange={ handleOnChangeWithStyle( setBorderWidth ) }
|
|
166
|
-
units={ units }
|
|
167
|
-
/>
|
|
168
|
-
</ToolsPanelItem>
|
|
169
|
-
) }
|
|
170
|
-
{ showBorderStyle && (
|
|
171
|
-
<ToolsPanelItem
|
|
172
|
-
className="single-column"
|
|
173
|
-
hasValue={ createHasValueCallback( 'style' ) }
|
|
174
|
-
label={ __( 'Style' ) }
|
|
175
|
-
onDeselect={ createResetCallback( setBorderStyle ) }
|
|
176
|
-
isShownByDefault={ true }
|
|
177
|
-
>
|
|
178
|
-
<BorderStyleControl
|
|
179
|
-
value={ borderStyle }
|
|
180
|
-
onChange={ handleOnChange( setBorderStyle ) }
|
|
181
|
-
/>
|
|
182
|
-
</ToolsPanelItem>
|
|
183
|
-
) }
|
|
184
|
-
{ showBorderColor && (
|
|
172
|
+
{ ( showBorderWidth || showBorderColor ) && (
|
|
185
173
|
<ToolsPanelItem
|
|
186
|
-
hasValue={
|
|
187
|
-
label={ __( '
|
|
188
|
-
onDeselect={
|
|
174
|
+
hasValue={ () => isDefinedBorder( userBorderStyles ) }
|
|
175
|
+
label={ __( 'Border' ) }
|
|
176
|
+
onDeselect={ () => resetBorder() }
|
|
189
177
|
isShownByDefault={ true }
|
|
190
178
|
>
|
|
191
|
-
<
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
179
|
+
<BorderBoxControl
|
|
180
|
+
colors={ colors }
|
|
181
|
+
enableAlpha={ true }
|
|
182
|
+
onChange={ onBorderChange }
|
|
183
|
+
showStyle={ showBorderStyle }
|
|
184
|
+
value={ border }
|
|
185
|
+
popoverPlacement="left-start"
|
|
186
|
+
popoverOffset={ 40 }
|
|
187
|
+
__experimentalHasMultipleOrigins={ true }
|
|
188
|
+
__experimentalIsRenderedInSidebar={ true }
|
|
198
189
|
/>
|
|
199
190
|
</ToolsPanelItem>
|
|
200
191
|
) }
|
|
@@ -202,12 +193,14 @@ export default function BorderPanel( { name } ) {
|
|
|
202
193
|
<ToolsPanelItem
|
|
203
194
|
hasValue={ hasBorderRadius }
|
|
204
195
|
label={ __( 'Radius' ) }
|
|
205
|
-
onDeselect={
|
|
196
|
+
onDeselect={ () => setBorderRadius( undefined ) }
|
|
206
197
|
isShownByDefault={ true }
|
|
207
198
|
>
|
|
208
199
|
<BorderRadiusControl
|
|
209
200
|
values={ borderRadiusValues }
|
|
210
|
-
onChange={
|
|
201
|
+
onChange={ ( value ) => {
|
|
202
|
+
setBorderRadius( value || undefined );
|
|
203
|
+
} }
|
|
211
204
|
/>
|
|
212
205
|
</ToolsPanelItem>
|
|
213
206
|
) }
|