@wordpress/edit-post 6.18.0 → 7.0.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 +12 -0
- package/build/components/block-manager/category.js +3 -11
- package/build/components/block-manager/category.js.map +1 -1
- package/build/components/block-manager/checklist.js +4 -3
- package/build/components/block-manager/checklist.js.map +1 -1
- package/build/components/block-manager/index.js +3 -10
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.js +2 -2
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/index.js +2 -2
- package/build/components/header/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +12 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +68 -0
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/layout/index.js +3 -2
- package/build/components/layout/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -1
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js +1 -1
- package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +4 -4
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +1 -1
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-template/index.js +2 -4
- package/build/components/sidebar/post-template/index.js.map +1 -1
- package/build/components/sidebar/settings-sidebar/index.js +7 -7
- package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build/editor.native.js +8 -2
- package/build/editor.native.js.map +1 -1
- package/build/hooks/validate-multiple-use/index.js +1 -7
- package/build/hooks/validate-multiple-use/index.js.map +1 -1
- package/build/plugins/index.js +3 -1
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/navigation-list-view-menu-item.js +48 -0
- package/build/plugins/navigation-list-view-menu-item.js.map +1 -0
- package/build/store/actions.js +1 -7
- package/build/store/actions.js.map +1 -1
- package/build-module/components/block-manager/category.js +3 -11
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +5 -4
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +3 -9
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js +2 -2
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/index.js +2 -2
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +12 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +67 -0
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/layout/index.js +3 -2
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -1
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preferences-modal/meta-boxes-section.js +2 -2
- package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +4 -4
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +1 -1
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-template/index.js +2 -4
- package/build-module/components/sidebar/post-template/index.js.map +1 -1
- package/build-module/components/sidebar/settings-sidebar/index.js +5 -5
- package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
- package/build-module/editor.native.js +7 -2
- package/build-module/editor.native.js.map +1 -1
- package/build-module/hooks/validate-multiple-use/index.js +1 -6
- package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
- package/build-module/plugins/index.js +2 -1
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/navigation-list-view-menu-item.js +40 -0
- package/build-module/plugins/navigation-list-view-menu-item.js.map +1 -0
- package/build-module/store/actions.js +1 -6
- package/build-module/store/actions.js.map +1 -1
- package/build-style/classic-rtl.css +14 -0
- package/build-style/classic.css +14 -0
- package/build-style/style-rtl.css +102 -66
- package/build-style/style.css +102 -66
- package/package.json +29 -29
- package/src/components/block-manager/category.js +3 -10
- package/src/components/block-manager/checklist.js +3 -6
- package/src/components/block-manager/index.js +6 -10
- package/src/components/block-manager/style.scss +4 -15
- package/src/components/header/header-toolbar/index.js +2 -2
- package/src/components/header/index.js +3 -3
- package/src/components/header/style.scss +3 -8
- package/src/components/keyboard-shortcut-help-modal/config.js +10 -0
- package/src/components/keyboard-shortcut-help-modal/test/__snapshots__/index.js.snap +70 -0
- package/src/components/keyboard-shortcuts/index.js +71 -0
- package/src/components/layout/index.js +4 -2
- package/src/components/layout/style.scss +12 -1
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/preferences-modal/meta-boxes-section.js +2 -3
- package/src/components/preferences-modal/options/test/__snapshots__/enable-custom-fields.js.snap +56 -4
- package/src/components/preferences-modal/test/__snapshots__/index.js.snap +43 -18
- package/src/components/preferences-modal/test/__snapshots__/meta-boxes-section.js.snap +51 -6
- package/src/components/secondary-sidebar/list-view-sidebar.js +4 -4
- package/src/components/secondary-sidebar/style.scss +3 -3
- package/src/components/sidebar/plugin-pre-publish-panel/test/index.js +8 -6
- package/src/components/sidebar/post-schedule/style.scss +2 -1
- package/src/components/sidebar/post-status/index.js +1 -1
- package/src/components/sidebar/post-template/index.js +8 -3
- package/src/components/sidebar/post-template/style.scss +2 -0
- package/src/components/sidebar/post-url/style.scss +3 -0
- package/src/components/sidebar/post-visibility/style.scss +2 -0
- package/src/components/sidebar/settings-header/style.scss +47 -34
- package/src/components/sidebar/settings-sidebar/index.js +5 -5
- package/src/components/visual-editor/test/index.native.js +24 -13
- package/src/editor.native.js +14 -11
- package/src/hooks/validate-multiple-use/index.js +1 -7
- package/src/plugins/index.js +2 -0
- package/src/plugins/navigation-list-view-menu-item.js +56 -0
- package/src/store/actions.js +6 -15
- package/src/components/sidebar/plugin-pre-publish-panel/test/__snapshots__/index.js.snap +0 -3
package/build-style/style.css
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a hex value into the rgb equivalent.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
5
|
+
* @return {string} comma separated rgb values
|
|
6
|
+
*/
|
|
1
7
|
/**
|
|
2
8
|
* Colors
|
|
3
9
|
*/
|
|
@@ -11,6 +17,12 @@
|
|
|
11
17
|
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
12
18
|
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
13
19
|
*/
|
|
20
|
+
/**
|
|
21
|
+
* Converts a hex value into the rgb equivalent.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
24
|
+
* @return {string} comma separated rgb values
|
|
25
|
+
*/
|
|
14
26
|
/**
|
|
15
27
|
* Colors
|
|
16
28
|
*/
|
|
@@ -82,6 +94,8 @@
|
|
|
82
94
|
--wp-admin-theme-color-darker-20: #005a87;
|
|
83
95
|
--wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
|
|
84
96
|
--wp-admin-border-width-focus: 2px;
|
|
97
|
+
--wp-block-synced-color: #7a00df;
|
|
98
|
+
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
85
99
|
}
|
|
86
100
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
87
101
|
:root {
|
|
@@ -306,10 +320,14 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
306
320
|
overflow: auto;
|
|
307
321
|
z-index: 20;
|
|
308
322
|
}
|
|
323
|
+
.interface-interface-skeleton__content .interface-navigable-region__stacker {
|
|
324
|
+
flex-grow: 1;
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-direction: column;
|
|
327
|
+
}
|
|
309
328
|
|
|
310
329
|
.interface-interface-skeleton__secondary-sidebar,
|
|
311
330
|
.interface-interface-skeleton__sidebar {
|
|
312
|
-
display: block;
|
|
313
331
|
flex-shrink: 0;
|
|
314
332
|
position: absolute;
|
|
315
333
|
z-index: 100000;
|
|
@@ -324,9 +342,12 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
324
342
|
.interface-interface-skeleton__secondary-sidebar,
|
|
325
343
|
.interface-interface-skeleton__sidebar {
|
|
326
344
|
position: relative !important;
|
|
327
|
-
z-index: 90;
|
|
328
345
|
width: auto;
|
|
329
346
|
}
|
|
347
|
+
.is-sidebar-opened .interface-interface-skeleton__secondary-sidebar,
|
|
348
|
+
.is-sidebar-opened .interface-interface-skeleton__sidebar {
|
|
349
|
+
z-index: 90;
|
|
350
|
+
}
|
|
330
351
|
}
|
|
331
352
|
|
|
332
353
|
.interface-interface-skeleton__sidebar {
|
|
@@ -338,6 +359,9 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
338
359
|
}
|
|
339
360
|
}
|
|
340
361
|
|
|
362
|
+
.interface-interface-skeleton__secondary-sidebar .interface-navigable-region__stacker {
|
|
363
|
+
height: 100%;
|
|
364
|
+
}
|
|
341
365
|
@media (min-width: 782px) {
|
|
342
366
|
.interface-interface-skeleton__secondary-sidebar {
|
|
343
367
|
border-right: 1px solid #e0e0e0;
|
|
@@ -390,7 +414,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
390
414
|
width: 280px;
|
|
391
415
|
color: #1e1e1e;
|
|
392
416
|
}
|
|
393
|
-
.interface-interface-skeleton__actions:focus {
|
|
417
|
+
.interface-interface-skeleton__actions:focus, .interface-interface-skeleton__actions:focus-within {
|
|
394
418
|
top: auto;
|
|
395
419
|
bottom: 0;
|
|
396
420
|
}
|
|
@@ -683,17 +707,13 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
683
707
|
}
|
|
684
708
|
}
|
|
685
709
|
.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft::after,
|
|
710
|
+
.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state::after,
|
|
686
711
|
.show-icon-labels .edit-post-header .editor-post-save-draft.editor-post-save-draft::after,
|
|
687
|
-
.edit-post-
|
|
712
|
+
.show-icon-labels .edit-post-header .editor-post-saved-state.editor-post-saved-state::after,
|
|
713
|
+
.edit-post-header__dropdown .editor-post-save-draft.editor-post-save-draft::after,
|
|
714
|
+
.edit-post-header__dropdown .editor-post-saved-state.editor-post-saved-state::after {
|
|
688
715
|
content: none;
|
|
689
716
|
}
|
|
690
|
-
@media (min-width: 600px) {
|
|
691
|
-
.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft::after,
|
|
692
|
-
.show-icon-labels .edit-post-header .editor-post-save-draft.editor-post-save-draft::after,
|
|
693
|
-
.edit-post-header__dropdown .editor-post-save-draft.editor-post-save-draft::after {
|
|
694
|
-
content: attr(aria-label);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
717
|
|
|
698
718
|
.edit-post-header__dropdown .components-menu-item__button.components-menu-item__button,
|
|
699
719
|
.edit-post-header__dropdown .components-button.editor-history__undo,
|
|
@@ -747,7 +767,7 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
747
767
|
.is-distraction-free .edit-post-header > .edit-post-header__settings > .editor-post-preview {
|
|
748
768
|
visibility: hidden;
|
|
749
769
|
}
|
|
750
|
-
.is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-toolbar__inserter-toggle, .is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-
|
|
770
|
+
.is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-toolbar__inserter-toggle, .is-distraction-free .edit-post-header > .edit-post-header__toolbar .edit-post-header-toolbar__document-overview-toggle, .is-distraction-free .edit-post-header > .edit-post-header__settings > .block-editor-post-preview__dropdown, .is-distraction-free .edit-post-header > .edit-post-header__settings > .interface-pinned-items {
|
|
751
771
|
display: none;
|
|
752
772
|
}
|
|
753
773
|
.is-distraction-free .interface-interface-skeleton__header:focus-within {
|
|
@@ -822,7 +842,8 @@ body.is-fullscreen-mode .interface-interface-skeleton {
|
|
|
822
842
|
width: 36px;
|
|
823
843
|
height: 36px;
|
|
824
844
|
border-radius: 2px;
|
|
825
|
-
object-fit: cover;
|
|
845
|
+
-o-object-fit: cover;
|
|
846
|
+
object-fit: cover;
|
|
826
847
|
margin-top: -1px;
|
|
827
848
|
}
|
|
828
849
|
|
|
@@ -1176,6 +1197,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1176
1197
|
bottom: auto;
|
|
1177
1198
|
left: auto;
|
|
1178
1199
|
right: 0;
|
|
1200
|
+
box-sizing: border-box;
|
|
1179
1201
|
width: 280px;
|
|
1180
1202
|
background-color: #fff;
|
|
1181
1203
|
border: 1px dotted #ddd;
|
|
@@ -1184,11 +1206,15 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1184
1206
|
display: flex;
|
|
1185
1207
|
justify-content: center;
|
|
1186
1208
|
}
|
|
1187
|
-
|
|
1188
|
-
.interface-interface-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1209
|
+
|
|
1210
|
+
.interface-interface-skeleton__sidebar:focus .edit-post-layout__toggle-sidebar-panel, .interface-interface-skeleton__sidebar:focus-within .edit-post-layout__toggle-sidebar-panel {
|
|
1211
|
+
top: auto;
|
|
1212
|
+
bottom: 0;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-entities-saved-states-panel, .interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-entities-saved-states-panel,
|
|
1216
|
+
.interface-interface-skeleton__actions:focus .edit-post-layout__toggle-publish-panel,
|
|
1217
|
+
.interface-interface-skeleton__actions:focus-within .edit-post-layout__toggle-publish-panel {
|
|
1192
1218
|
top: auto;
|
|
1193
1219
|
bottom: 0;
|
|
1194
1220
|
}
|
|
@@ -1242,27 +1268,17 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1242
1268
|
.edit-post-block-manager__checklist-item {
|
|
1243
1269
|
border-bottom: 1px solid #ddd;
|
|
1244
1270
|
}
|
|
1245
|
-
.edit-post-block-manager__category-title .components-base-control__field,
|
|
1246
|
-
.edit-post-block-manager__checklist-item .components-base-control__field {
|
|
1247
|
-
align-items: center;
|
|
1248
|
-
display: flex;
|
|
1249
|
-
margin: 0;
|
|
1250
|
-
}
|
|
1251
1271
|
|
|
1252
1272
|
.edit-post-block-manager__checklist-item {
|
|
1273
|
+
display: flex;
|
|
1274
|
+
justify-content: space-between;
|
|
1275
|
+
align-items: center;
|
|
1253
1276
|
margin-bottom: 0;
|
|
1254
|
-
padding
|
|
1277
|
+
padding: 8px 0 8px 16px;
|
|
1255
1278
|
}
|
|
1256
1279
|
.components-modal__content .edit-post-block-manager__checklist-item.components-checkbox-control__input-container {
|
|
1257
1280
|
margin: 0 8px;
|
|
1258
1281
|
}
|
|
1259
|
-
.edit-post-block-manager__checklist-item .components-checkbox-control__label {
|
|
1260
|
-
display: flex;
|
|
1261
|
-
align-items: center;
|
|
1262
|
-
justify-content: space-between;
|
|
1263
|
-
flex-grow: 1;
|
|
1264
|
-
padding: 8px 0;
|
|
1265
|
-
}
|
|
1266
1282
|
.edit-post-block-manager__checklist-item .block-editor-block-icon {
|
|
1267
1283
|
margin-right: 10px;
|
|
1268
1284
|
fill: #1e1e1e;
|
|
@@ -1366,16 +1382,16 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1366
1382
|
}
|
|
1367
1383
|
|
|
1368
1384
|
.edit-post-editor__inserter-panel,
|
|
1369
|
-
.edit-post-
|
|
1385
|
+
.edit-post-editor__document-overview-panel {
|
|
1370
1386
|
height: 100%;
|
|
1371
1387
|
display: flex;
|
|
1372
1388
|
flex-direction: column;
|
|
1373
1389
|
}
|
|
1374
1390
|
|
|
1375
|
-
.edit-post-
|
|
1391
|
+
.edit-post-editor__document-overview-panel {
|
|
1376
1392
|
width: 350px;
|
|
1377
1393
|
}
|
|
1378
|
-
.edit-post-
|
|
1394
|
+
.edit-post-editor__document-overview-panel .edit-post-sidebar__panel-tabs {
|
|
1379
1395
|
flex-direction: row-reverse;
|
|
1380
1396
|
}
|
|
1381
1397
|
|
|
@@ -1395,7 +1411,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1395
1411
|
}
|
|
1396
1412
|
}
|
|
1397
1413
|
|
|
1398
|
-
.edit-post-
|
|
1414
|
+
.edit-post-editor__document-overview-panel-header {
|
|
1399
1415
|
border-bottom: 1px solid #ddd;
|
|
1400
1416
|
display: flex;
|
|
1401
1417
|
justify-content: space-between;
|
|
@@ -1403,17 +1419,17 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1403
1419
|
padding-left: 16px;
|
|
1404
1420
|
padding-right: 4px;
|
|
1405
1421
|
}
|
|
1406
|
-
.edit-post-
|
|
1422
|
+
.edit-post-editor__document-overview-panel-header ul {
|
|
1407
1423
|
width: calc(100% - 40px);
|
|
1408
1424
|
}
|
|
1409
|
-
.edit-post-
|
|
1425
|
+
.edit-post-editor__document-overview-panel-header li {
|
|
1410
1426
|
width: 50%;
|
|
1411
1427
|
}
|
|
1412
|
-
.edit-post-
|
|
1428
|
+
.edit-post-editor__document-overview-panel-header li button {
|
|
1413
1429
|
width: 100%;
|
|
1414
1430
|
text-align: initial;
|
|
1415
1431
|
}
|
|
1416
|
-
.edit-post-
|
|
1432
|
+
.edit-post-editor__document-overview-panel-header li:only-child {
|
|
1417
1433
|
width: 100%;
|
|
1418
1434
|
}
|
|
1419
1435
|
|
|
@@ -1519,12 +1535,12 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1519
1535
|
display: block;
|
|
1520
1536
|
width: 45%;
|
|
1521
1537
|
flex-shrink: 0;
|
|
1538
|
+
padding: 6px 0;
|
|
1522
1539
|
}
|
|
1523
1540
|
|
|
1524
1541
|
.components-button.edit-post-post-schedule__toggle {
|
|
1525
1542
|
text-align: left;
|
|
1526
1543
|
white-space: normal;
|
|
1527
|
-
height: auto;
|
|
1528
1544
|
}
|
|
1529
1545
|
.components-button.edit-post-post-schedule__toggle span {
|
|
1530
1546
|
width: 0;
|
|
@@ -1553,6 +1569,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1553
1569
|
.edit-post-post-template span {
|
|
1554
1570
|
display: block;
|
|
1555
1571
|
width: 45%;
|
|
1572
|
+
padding: 6px 0;
|
|
1556
1573
|
}
|
|
1557
1574
|
|
|
1558
1575
|
.edit-post-post-template__dropdown {
|
|
@@ -1584,11 +1601,13 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1584
1601
|
.edit-post-post-url {
|
|
1585
1602
|
width: 100%;
|
|
1586
1603
|
justify-content: flex-start;
|
|
1604
|
+
align-items: flex-start;
|
|
1587
1605
|
}
|
|
1588
1606
|
.edit-post-post-url span {
|
|
1589
1607
|
display: block;
|
|
1590
1608
|
width: 45%;
|
|
1591
1609
|
flex-shrink: 0;
|
|
1610
|
+
padding: 6px 0;
|
|
1592
1611
|
}
|
|
1593
1612
|
|
|
1594
1613
|
.components-button.edit-post-post-url__toggle {
|
|
@@ -1610,6 +1629,7 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1610
1629
|
.edit-post-post-visibility span {
|
|
1611
1630
|
display: block;
|
|
1612
1631
|
width: 45%;
|
|
1632
|
+
padding: 6px 0;
|
|
1613
1633
|
}
|
|
1614
1634
|
|
|
1615
1635
|
.edit-post-post-visibility__dialog .editor-post-visibility {
|
|
@@ -1618,47 +1638,62 @@ body.is-fullscreen-mode .edit-post-layout .components-editor-notices__snackbar {
|
|
|
1618
1638
|
}
|
|
1619
1639
|
|
|
1620
1640
|
.components-button.edit-post-sidebar__panel-tab {
|
|
1641
|
+
position: relative;
|
|
1621
1642
|
border-radius: 0;
|
|
1622
1643
|
height: 48px;
|
|
1623
1644
|
background: transparent;
|
|
1624
1645
|
border: none;
|
|
1625
1646
|
box-shadow: none;
|
|
1626
1647
|
cursor: pointer;
|
|
1627
|
-
|
|
1628
|
-
padding: 3px 15px;
|
|
1648
|
+
padding: 3px 16px;
|
|
1629
1649
|
margin-left: 0;
|
|
1630
1650
|
font-weight: 500;
|
|
1631
1651
|
}
|
|
1632
|
-
.components-button.edit-post-sidebar__panel-tab
|
|
1633
|
-
content: attr(data-label);
|
|
1634
|
-
display: block;
|
|
1635
|
-
font-weight: 600;
|
|
1636
|
-
height: 0;
|
|
1637
|
-
overflow: hidden;
|
|
1638
|
-
speak: none;
|
|
1639
|
-
visibility: hidden;
|
|
1640
|
-
}
|
|
1641
|
-
.components-button.edit-post-sidebar__panel-tab.is-active {
|
|
1642
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) transparent, inset 0 -1.5px 0 0 var(--wp-admin-theme-color);
|
|
1652
|
+
.components-button.edit-post-sidebar__panel-tab:focus:not(:disabled) {
|
|
1643
1653
|
position: relative;
|
|
1644
|
-
|
|
1654
|
+
box-shadow: none;
|
|
1645
1655
|
}
|
|
1646
|
-
.components-button.edit-post-sidebar__panel-tab
|
|
1656
|
+
.components-button.edit-post-sidebar__panel-tab::after {
|
|
1647
1657
|
content: "";
|
|
1648
1658
|
position: absolute;
|
|
1649
|
-
top: 0;
|
|
1650
|
-
bottom: 1px;
|
|
1651
1659
|
right: 0;
|
|
1660
|
+
bottom: 0;
|
|
1652
1661
|
left: 0;
|
|
1653
|
-
|
|
1662
|
+
pointer-events: none;
|
|
1663
|
+
background: var(--wp-admin-theme-color);
|
|
1664
|
+
height: calc(0 * var(--wp-admin-border-width-focus));
|
|
1665
|
+
border-radius: 0;
|
|
1666
|
+
transition: all 0.1s linear;
|
|
1654
1667
|
}
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1668
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1669
|
+
.components-button.edit-post-sidebar__panel-tab::after {
|
|
1670
|
+
transition-duration: 0s;
|
|
1671
|
+
transition-delay: 0s;
|
|
1672
|
+
}
|
|
1659
1673
|
}
|
|
1660
|
-
.components-button.edit-post-sidebar__panel-tab.is-active
|
|
1661
|
-
|
|
1674
|
+
.components-button.edit-post-sidebar__panel-tab.is-active::after {
|
|
1675
|
+
height: calc(1 * var(--wp-admin-border-width-focus));
|
|
1676
|
+
}
|
|
1677
|
+
.components-button.edit-post-sidebar__panel-tab::before {
|
|
1678
|
+
content: "";
|
|
1679
|
+
position: absolute;
|
|
1680
|
+
top: 12px;
|
|
1681
|
+
right: 12px;
|
|
1682
|
+
bottom: 12px;
|
|
1683
|
+
left: 12px;
|
|
1684
|
+
pointer-events: none;
|
|
1685
|
+
box-shadow: 0 0 0 0 transparent;
|
|
1686
|
+
border-radius: 2px;
|
|
1687
|
+
transition: all 0.1s linear;
|
|
1688
|
+
}
|
|
1689
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1690
|
+
.components-button.edit-post-sidebar__panel-tab::before {
|
|
1691
|
+
transition-duration: 0s;
|
|
1692
|
+
transition-delay: 0s;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
.components-button.edit-post-sidebar__panel-tab:focus-visible::before {
|
|
1696
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1662
1697
|
}
|
|
1663
1698
|
|
|
1664
1699
|
h2.edit-post-template-summary__title {
|
|
@@ -1793,7 +1828,8 @@ h2.edit-post-template-summary__title {
|
|
|
1793
1828
|
.edit-template-welcome-guide__image > img {
|
|
1794
1829
|
display: block;
|
|
1795
1830
|
max-width: 100%;
|
|
1796
|
-
object-fit: cover;
|
|
1831
|
+
-o-object-fit: cover;
|
|
1832
|
+
object-fit: cover;
|
|
1797
1833
|
}
|
|
1798
1834
|
.edit-post-welcome-guide__heading,
|
|
1799
1835
|
.edit-template-welcome-guide__heading {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-post",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Edit Post module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -27,42 +27,42 @@
|
|
|
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": "^
|
|
34
|
-
"@wordpress/blocks": "^
|
|
35
|
-
"@wordpress/components": "^
|
|
36
|
-
"@wordpress/compose": "^
|
|
37
|
-
"@wordpress/core-data": "^
|
|
38
|
-
"@wordpress/data": "^
|
|
39
|
-
"@wordpress/deprecated": "^3.
|
|
40
|
-
"@wordpress/editor": "^
|
|
41
|
-
"@wordpress/element": "^
|
|
42
|
-
"@wordpress/hooks": "^3.
|
|
43
|
-
"@wordpress/i18n": "^4.
|
|
44
|
-
"@wordpress/icons": "^9.
|
|
45
|
-
"@wordpress/interface": "^
|
|
46
|
-
"@wordpress/keyboard-shortcuts": "^
|
|
47
|
-
"@wordpress/keycodes": "^3.
|
|
48
|
-
"@wordpress/media-utils": "^4.
|
|
49
|
-
"@wordpress/notices": "^3.
|
|
50
|
-
"@wordpress/plugins": "^
|
|
51
|
-
"@wordpress/preferences": "^
|
|
52
|
-
"@wordpress/url": "^3.
|
|
53
|
-
"@wordpress/viewport": "^
|
|
54
|
-
"@wordpress/warning": "^2.
|
|
30
|
+
"@wordpress/a11y": "^3.23.0",
|
|
31
|
+
"@wordpress/api-fetch": "^6.20.0",
|
|
32
|
+
"@wordpress/block-editor": "^11.0.0",
|
|
33
|
+
"@wordpress/block-library": "^8.0.0",
|
|
34
|
+
"@wordpress/blocks": "^12.0.0",
|
|
35
|
+
"@wordpress/components": "^23.0.0",
|
|
36
|
+
"@wordpress/compose": "^6.0.0",
|
|
37
|
+
"@wordpress/core-data": "^6.0.0",
|
|
38
|
+
"@wordpress/data": "^8.0.0",
|
|
39
|
+
"@wordpress/deprecated": "^3.23.0",
|
|
40
|
+
"@wordpress/editor": "^13.0.0",
|
|
41
|
+
"@wordpress/element": "^5.0.0",
|
|
42
|
+
"@wordpress/hooks": "^3.23.0",
|
|
43
|
+
"@wordpress/i18n": "^4.23.0",
|
|
44
|
+
"@wordpress/icons": "^9.14.0",
|
|
45
|
+
"@wordpress/interface": "^5.0.0",
|
|
46
|
+
"@wordpress/keyboard-shortcuts": "^4.0.0",
|
|
47
|
+
"@wordpress/keycodes": "^3.23.0",
|
|
48
|
+
"@wordpress/media-utils": "^4.14.0",
|
|
49
|
+
"@wordpress/notices": "^3.23.0",
|
|
50
|
+
"@wordpress/plugins": "^5.0.0",
|
|
51
|
+
"@wordpress/preferences": "^3.0.0",
|
|
52
|
+
"@wordpress/url": "^3.24.0",
|
|
53
|
+
"@wordpress/viewport": "^5.0.0",
|
|
54
|
+
"@wordpress/warning": "^2.23.0",
|
|
55
55
|
"classnames": "^2.3.1",
|
|
56
56
|
"lodash": "^4.17.21",
|
|
57
57
|
"memize": "^1.1.0",
|
|
58
58
|
"rememo": "^4.0.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"react": "^
|
|
62
|
-
"react-dom": "^
|
|
61
|
+
"react": "^18.0.0",
|
|
62
|
+
"react-dom": "^18.0.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "1eb65aabe6738097f4c062e78f69ae8f05879848"
|
|
68
68
|
}
|
|
@@ -71,15 +71,7 @@ function BlockManagerCategory( { title, blockTypes } ) {
|
|
|
71
71
|
const titleId = 'edit-post-block-manager__category-title-' + instanceId;
|
|
72
72
|
|
|
73
73
|
const isAllChecked = checkedBlockNames.length === filteredBlockTypes.length;
|
|
74
|
-
|
|
75
|
-
let ariaChecked;
|
|
76
|
-
if ( isAllChecked ) {
|
|
77
|
-
ariaChecked = 'true';
|
|
78
|
-
} else if ( checkedBlockNames.length > 0 ) {
|
|
79
|
-
ariaChecked = 'mixed';
|
|
80
|
-
} else {
|
|
81
|
-
ariaChecked = 'false';
|
|
82
|
-
}
|
|
74
|
+
const isIndeterminate = ! isAllChecked && checkedBlockNames.length > 0;
|
|
83
75
|
|
|
84
76
|
return (
|
|
85
77
|
<div
|
|
@@ -88,10 +80,11 @@ function BlockManagerCategory( { title, blockTypes } ) {
|
|
|
88
80
|
className="edit-post-block-manager__category"
|
|
89
81
|
>
|
|
90
82
|
<CheckboxControl
|
|
83
|
+
__nextHasNoMarginBottom
|
|
91
84
|
checked={ isAllChecked }
|
|
92
85
|
onChange={ toggleAllVisible }
|
|
93
86
|
className="edit-post-block-manager__category-title"
|
|
94
|
-
|
|
87
|
+
indeterminate={ isIndeterminate }
|
|
95
88
|
label={ <span id={ titleId }>{ title }</span> }
|
|
96
89
|
/>
|
|
97
90
|
<BlockTypesChecklist
|
|
@@ -13,17 +13,14 @@ function BlockTypesChecklist( { blockTypes, value, onItemChange } ) {
|
|
|
13
13
|
className="edit-post-block-manager__checklist-item"
|
|
14
14
|
>
|
|
15
15
|
<CheckboxControl
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{ blockType.title }
|
|
19
|
-
<BlockIcon icon={ blockType.icon } />
|
|
20
|
-
</>
|
|
21
|
-
}
|
|
16
|
+
__nextHasNoMarginBottom
|
|
17
|
+
label={ blockType.title }
|
|
22
18
|
checked={ value.includes( blockType.name ) }
|
|
23
19
|
onChange={ ( ...args ) =>
|
|
24
20
|
onItemChange( blockType.name, ...args )
|
|
25
21
|
}
|
|
26
22
|
/>
|
|
23
|
+
<BlockIcon icon={ blockType.icon } />
|
|
27
24
|
</li>
|
|
28
25
|
) ) }
|
|
29
26
|
</ul>
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { filter } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* WordPress dependencies
|
|
8
3
|
*/
|
|
@@ -71,6 +66,7 @@ function BlockManager( {
|
|
|
71
66
|
</div>
|
|
72
67
|
) }
|
|
73
68
|
<SearchControl
|
|
69
|
+
__nextHasNoMarginBottom
|
|
74
70
|
label={ __( 'Search for a block' ) }
|
|
75
71
|
placeholder={ __( 'Search for a block' ) }
|
|
76
72
|
value={ search }
|
|
@@ -92,15 +88,15 @@ function BlockManager( {
|
|
|
92
88
|
<BlockManagerCategory
|
|
93
89
|
key={ category.slug }
|
|
94
90
|
title={ category.title }
|
|
95
|
-
blockTypes={ filter(
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
blockTypes={ blockTypes.filter(
|
|
92
|
+
( blockType ) =>
|
|
93
|
+
blockType.category === category.slug
|
|
94
|
+
) }
|
|
98
95
|
/>
|
|
99
96
|
) ) }
|
|
100
97
|
<BlockManagerCategory
|
|
101
98
|
title={ __( 'Uncategorized' ) }
|
|
102
|
-
blockTypes={ filter(
|
|
103
|
-
blockTypes,
|
|
99
|
+
blockTypes={ blockTypes.filter(
|
|
104
100
|
( { category } ) => ! category
|
|
105
101
|
) }
|
|
106
102
|
/>
|
|
@@ -51,30 +51,19 @@
|
|
|
51
51
|
.edit-post-block-manager__category-title,
|
|
52
52
|
.edit-post-block-manager__checklist-item {
|
|
53
53
|
border-bottom: 1px solid $gray-300;
|
|
54
|
-
|
|
55
|
-
.components-base-control__field {
|
|
56
|
-
align-items: center;
|
|
57
|
-
display: flex;
|
|
58
|
-
margin: 0;
|
|
59
|
-
}
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
.edit-post-block-manager__checklist-item {
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
align-items: center;
|
|
63
60
|
margin-bottom: 0;
|
|
64
|
-
padding
|
|
61
|
+
padding: $grid-unit-10 0 $grid-unit-10 $grid-unit-20;
|
|
65
62
|
|
|
66
63
|
.components-modal__content &.components-checkbox-control__input-container {
|
|
67
64
|
margin: 0 $grid-unit-10;
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
.components-checkbox-control__label {
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: space-between;
|
|
74
|
-
flex-grow: 1;
|
|
75
|
-
padding: $grid-unit-10 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
67
|
.block-editor-block-icon {
|
|
79
68
|
margin-right: 10px;
|
|
80
69
|
fill: $gray-900;
|
|
@@ -78,12 +78,12 @@ function HeaderToolbar() {
|
|
|
78
78
|
<>
|
|
79
79
|
<ToolbarItem
|
|
80
80
|
as={ Button }
|
|
81
|
-
className="edit-post-header-
|
|
81
|
+
className="edit-post-header-toolbar__document-overview-toggle"
|
|
82
82
|
icon={ listView }
|
|
83
83
|
disabled={ isTextModeEnabled }
|
|
84
84
|
isPressed={ isListViewOpen }
|
|
85
85
|
/* translators: button label text should, if possible, be under 16 characters. */
|
|
86
|
-
label={ __( '
|
|
86
|
+
label={ __( 'Document Overview' ) }
|
|
87
87
|
onClick={ toggleListView }
|
|
88
88
|
shortcut={ listViewShortcut }
|
|
89
89
|
showTooltip={ ! showIconLabels }
|
|
@@ -25,6 +25,7 @@ import { store as editPostStore } from '../../store';
|
|
|
25
25
|
import TemplateTitle from './template-title';
|
|
26
26
|
|
|
27
27
|
function Header( { setEntitiesSavedStatesCallback } ) {
|
|
28
|
+
const isLargeViewport = useViewportMatch( 'large' );
|
|
28
29
|
const {
|
|
29
30
|
hasActiveMetaboxes,
|
|
30
31
|
isPublishSidebarOpened,
|
|
@@ -40,13 +41,12 @@ function Header( { setEntitiesSavedStatesCallback } ) {
|
|
|
40
41
|
showIconLabels:
|
|
41
42
|
select( editPostStore ).isFeatureActive( 'showIconLabels' ),
|
|
42
43
|
isDistractionFree:
|
|
43
|
-
select( editPostStore ).isFeatureActive( 'distractionFree' )
|
|
44
|
+
select( editPostStore ).isFeatureActive( 'distractionFree' ) &&
|
|
45
|
+
isLargeViewport,
|
|
44
46
|
} ),
|
|
45
47
|
[]
|
|
46
48
|
);
|
|
47
49
|
|
|
48
|
-
const isLargeViewport = useViewportMatch( 'large' );
|
|
49
|
-
|
|
50
50
|
const classes = classnames( 'edit-post-header' );
|
|
51
51
|
|
|
52
52
|
const slideY = {
|
|
@@ -146,16 +146,11 @@
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
.editor-post-
|
|
149
|
+
.editor-post-save-draft.editor-post-save-draft,
|
|
150
|
+
.editor-post-saved-state.editor-post-saved-state {
|
|
151
151
|
&::after {
|
|
152
152
|
content: none;
|
|
153
153
|
}
|
|
154
|
-
@include break-small {
|
|
155
|
-
&::after {
|
|
156
|
-
content: attr(aria-label);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
154
|
}
|
|
160
155
|
}
|
|
161
156
|
|
|
@@ -220,7 +215,7 @@
|
|
|
220
215
|
}
|
|
221
216
|
|
|
222
217
|
& > .edit-post-header__toolbar .edit-post-header-toolbar__inserter-toggle,
|
|
223
|
-
& > .edit-post-header__toolbar .edit-post-header-
|
|
218
|
+
& > .edit-post-header__toolbar .edit-post-header-toolbar__document-overview-toggle,
|
|
224
219
|
& > .edit-post-header__settings > .block-editor-post-preview__dropdown,
|
|
225
220
|
& > .edit-post-header__settings > .interface-pinned-items {
|
|
226
221
|
display: none;
|
|
@@ -36,4 +36,14 @@ export const textFormattingShortcuts = [
|
|
|
36
36
|
keyCombination: { modifier: 'access', character: 'x' },
|
|
37
37
|
description: __( 'Make the selected text inline code.' ),
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
keyCombination: { modifier: 'access', character: '0' },
|
|
41
|
+
description: __( 'Convert the current heading to a paragraph.' ),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
keyCombination: { modifier: 'access', character: '1-6' },
|
|
45
|
+
description: __(
|
|
46
|
+
'Convert the current paragraph or heading to a heading of level 1 to 6.'
|
|
47
|
+
),
|
|
48
|
+
},
|
|
39
49
|
];
|