@wordpress/block-library 9.25.0 → 9.26.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 +2 -0
- package/build/avatar/edit.js +84 -39
- package/build/avatar/edit.js.map +1 -1
- package/build/avatar/user-control.js +32 -17
- package/build/avatar/user-control.js.map +1 -1
- package/build/embed/variations.js +0 -10
- package/build/embed/variations.js.map +1 -1
- package/build/form/edit.js +0 -1
- package/build/form/edit.js.map +1 -1
- package/build/form/index.js +3 -3
- package/build/form/index.js.map +1 -1
- package/build/form-input/index.js +2 -1
- package/build/form-input/index.js.map +1 -1
- package/build/form-submission-notification/index.js +2 -1
- package/build/form-submission-notification/index.js.map +1 -1
- package/build/form-submit-button/index.js +2 -1
- package/build/form-submit-button/index.js.map +1 -1
- package/build/image/image.js +1 -0
- package/build/image/image.js.map +1 -1
- package/build/image/view.js +0 -3
- package/build/image/view.js.map +1 -1
- package/build/navigation-link/edit.js +11 -0
- package/build/navigation-link/edit.js.map +1 -1
- package/build/post-author/edit.js +75 -18
- package/build/post-author/edit.js.map +1 -1
- package/build/post-navigation-link/edit.js +72 -33
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/site-logo/edit.js +53 -19
- package/build/site-logo/edit.js.map +1 -1
- package/build/social-link/edit.js +21 -5
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/edit.native.js +13 -5
- package/build/social-link/edit.native.js.map +1 -1
- package/build/social-link/social-list.js +17 -25
- package/build/social-link/social-list.js.map +1 -1
- package/build/social-links/edit.js +8 -5
- package/build/social-links/edit.js.map +1 -1
- package/build/video/tracks-editor.js +23 -9
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/avatar/edit.js +83 -38
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/avatar/user-control.js +33 -18
- package/build-module/avatar/user-control.js.map +1 -1
- package/build-module/embed/variations.js +0 -10
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/form/edit.js +0 -1
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form/index.js +3 -3
- package/build-module/form/index.js.map +1 -1
- package/build-module/form-input/index.js +2 -1
- package/build-module/form-input/index.js.map +1 -1
- package/build-module/form-submission-notification/index.js +2 -1
- package/build-module/form-submission-notification/index.js.map +1 -1
- package/build-module/form-submit-button/index.js +2 -1
- package/build-module/form-submit-button/index.js.map +1 -1
- package/build-module/image/image.js +1 -0
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/view.js +0 -3
- package/build-module/image/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +11 -0
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/post-author/edit.js +76 -19
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +73 -34
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +54 -20
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/social-link/edit.js +24 -8
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/edit.native.js +15 -6
- package/build-module/social-link/edit.native.js.map +1 -1
- package/build-module/social-link/social-list.js +16 -21
- package/build-module/social-link/social-list.js.map +1 -1
- package/build-module/social-links/edit.js +8 -5
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/video/tracks-editor.js +24 -10
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/calendar/style-rtl.css +7 -7
- package/build-style/calendar/style.css +7 -7
- package/build-style/comments-pagination/editor-rtl.css +0 -12
- package/build-style/comments-pagination/editor.css +0 -14
- package/build-style/comments-pagination/style-rtl.css +0 -7
- package/build-style/comments-pagination/style.css +0 -9
- package/build-style/editor-rtl.css +0 -17
- package/build-style/editor.css +0 -19
- package/build-style/navigation/style-rtl.css +4 -0
- package/build-style/navigation/style.css +4 -0
- package/build-style/style-rtl.css +11 -14
- package/build-style/style.css +11 -16
- package/package.json +35 -35
- package/src/avatar/edit.js +99 -51
- package/src/avatar/user-control.js +34 -29
- package/src/calendar/style.scss +10 -10
- package/src/comments-pagination/editor.scss +0 -15
- package/src/comments-pagination/style.scss +0 -8
- package/src/editor.scss +0 -1
- package/src/embed/variations.js +0 -8
- package/src/form/block.json +1 -2
- package/src/form/edit.js +0 -1
- package/src/form/index.js +1 -0
- package/src/form-input/index.js +1 -0
- package/src/form-submission-notification/index.js +1 -0
- package/src/form-submit-button/index.js +1 -0
- package/src/image/image.js +1 -0
- package/src/image/index.php +4 -1
- package/src/image/view.js +0 -3
- package/src/navigation/style.scss +8 -0
- package/src/navigation-link/edit.js +14 -1
- package/src/post-author/edit.js +91 -27
- package/src/post-navigation-link/edit.js +96 -51
- package/src/site-logo/edit.js +69 -26
- package/src/social-link/edit.js +18 -7
- package/src/social-link/edit.native.js +10 -4
- package/src/social-link/index.php +13 -0
- package/src/social-link/social-list.js +15 -20
- package/src/social-links/edit.js +6 -7
- package/src/video/tracks-editor.js +18 -6
- package/build-style/post-author/editor-rtl.css +0 -140
- package/build-style/post-author/editor.css +0 -140
- package/src/post-author/editor.scss +0 -7
package/build-style/editor.css
CHANGED
|
@@ -417,26 +417,12 @@ html :where(.wp-block-column) {
|
|
|
417
417
|
:where(.editor-styles-wrapper) .wp-block-comments-pagination {
|
|
418
418
|
max-width: 100%;
|
|
419
419
|
}
|
|
420
|
-
:where(.editor-styles-wrapper) .wp-block-comments-pagination.block-editor-block-list__layout {
|
|
421
|
-
margin: 0;
|
|
422
|
-
}
|
|
423
420
|
|
|
424
421
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next,
|
|
425
422
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous,
|
|
426
423
|
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
|
427
|
-
margin-left: 0;
|
|
428
|
-
margin-top: 0.5em;
|
|
429
|
-
/*rtl:ignore*/
|
|
430
|
-
margin-right: 0.5em;
|
|
431
|
-
margin-bottom: 0.5em;
|
|
432
424
|
font-size: inherit;
|
|
433
425
|
}
|
|
434
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
435
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
436
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers:last-child {
|
|
437
|
-
/*rtl:ignore*/
|
|
438
|
-
margin-right: 0;
|
|
439
|
-
}
|
|
440
426
|
|
|
441
427
|
.wp-block-comments-pagination-numbers a {
|
|
442
428
|
text-decoration: underline;
|
|
@@ -2171,11 +2157,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2171
2157
|
opacity: 0;
|
|
2172
2158
|
}
|
|
2173
2159
|
|
|
2174
|
-
.wp-block-post-author__inspector-settings .components-base-control,
|
|
2175
|
-
.wp-block-post-author__inspector-settings .components-base-control:last-child {
|
|
2176
|
-
margin-bottom: 0;
|
|
2177
|
-
}
|
|
2178
|
-
|
|
2179
2160
|
.wp-block-post-excerpt .wp-block-post-excerpt__excerpt.is-inline {
|
|
2180
2161
|
display: inline;
|
|
2181
2162
|
}
|
|
@@ -344,6 +344,10 @@ button.wp-block-navigation-item__content {
|
|
|
344
344
|
.wp-block-navigation-submenu__toggle {
|
|
345
345
|
cursor: pointer;
|
|
346
346
|
}
|
|
347
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] + .wp-block-navigation__submenu-icon > svg,
|
|
348
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] > svg {
|
|
349
|
+
transform: rotate(-180deg);
|
|
350
|
+
}
|
|
347
351
|
|
|
348
352
|
.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
|
|
349
353
|
padding-right: 0;
|
|
@@ -344,6 +344,10 @@ button.wp-block-navigation-item__content {
|
|
|
344
344
|
.wp-block-navigation-submenu__toggle {
|
|
345
345
|
cursor: pointer;
|
|
346
346
|
}
|
|
347
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] + .wp-block-navigation__submenu-icon > svg,
|
|
348
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] > svg {
|
|
349
|
+
transform: rotate(180deg);
|
|
350
|
+
}
|
|
347
351
|
|
|
348
352
|
.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
|
|
349
353
|
padding-left: 0;
|
|
@@ -331,19 +331,19 @@
|
|
|
331
331
|
width: 100%;
|
|
332
332
|
border-collapse: collapse;
|
|
333
333
|
}
|
|
334
|
-
.wp-block-calendar table:where(:not(.has-text-color)) {
|
|
335
|
-
color: #40464d;
|
|
336
|
-
}
|
|
337
|
-
.wp-block-calendar table:where(:not(.has-text-color)) th,
|
|
338
|
-
.wp-block-calendar table:where(:not(.has-text-color)) td {
|
|
339
|
-
border-color: #ddd;
|
|
340
|
-
}
|
|
341
334
|
.wp-block-calendar table.has-background th {
|
|
342
335
|
background-color: inherit;
|
|
343
336
|
}
|
|
344
337
|
.wp-block-calendar table.has-text-color th {
|
|
345
338
|
color: inherit;
|
|
346
339
|
}
|
|
340
|
+
.wp-block-calendar :where(table:not(.has-text-color)) {
|
|
341
|
+
color: #40464d;
|
|
342
|
+
}
|
|
343
|
+
.wp-block-calendar :where(table:not(.has-text-color)) th,
|
|
344
|
+
.wp-block-calendar :where(table:not(.has-text-color)) td {
|
|
345
|
+
border-color: #ddd;
|
|
346
|
+
}
|
|
347
347
|
|
|
348
348
|
:where(.wp-block-calendar table:not(.has-background) th) {
|
|
349
349
|
background: #ddd;
|
|
@@ -580,15 +580,8 @@
|
|
|
580
580
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next,
|
|
581
581
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous,
|
|
582
582
|
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
|
583
|
-
margin-right: 0.5em;
|
|
584
|
-
margin-bottom: 0.5em;
|
|
585
583
|
font-size: inherit;
|
|
586
584
|
}
|
|
587
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
588
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
589
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers:last-child {
|
|
590
|
-
margin-right: 0;
|
|
591
|
-
}
|
|
592
585
|
.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow {
|
|
593
586
|
margin-left: 1ch;
|
|
594
587
|
display: inline-block;
|
|
@@ -2469,6 +2462,10 @@ button.wp-block-navigation-item__content {
|
|
|
2469
2462
|
.wp-block-navigation-submenu__toggle {
|
|
2470
2463
|
cursor: pointer;
|
|
2471
2464
|
}
|
|
2465
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] + .wp-block-navigation__submenu-icon > svg,
|
|
2466
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] > svg {
|
|
2467
|
+
transform: rotate(-180deg);
|
|
2468
|
+
}
|
|
2472
2469
|
|
|
2473
2470
|
.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
|
|
2474
2471
|
padding-right: 0;
|
package/build-style/style.css
CHANGED
|
@@ -332,19 +332,19 @@
|
|
|
332
332
|
width: 100%;
|
|
333
333
|
border-collapse: collapse;
|
|
334
334
|
}
|
|
335
|
-
.wp-block-calendar table:where(:not(.has-text-color)) {
|
|
336
|
-
color: #40464d;
|
|
337
|
-
}
|
|
338
|
-
.wp-block-calendar table:where(:not(.has-text-color)) th,
|
|
339
|
-
.wp-block-calendar table:where(:not(.has-text-color)) td {
|
|
340
|
-
border-color: #ddd;
|
|
341
|
-
}
|
|
342
335
|
.wp-block-calendar table.has-background th {
|
|
343
336
|
background-color: inherit;
|
|
344
337
|
}
|
|
345
338
|
.wp-block-calendar table.has-text-color th {
|
|
346
339
|
color: inherit;
|
|
347
340
|
}
|
|
341
|
+
.wp-block-calendar :where(table:not(.has-text-color)) {
|
|
342
|
+
color: #40464d;
|
|
343
|
+
}
|
|
344
|
+
.wp-block-calendar :where(table:not(.has-text-color)) th,
|
|
345
|
+
.wp-block-calendar :where(table:not(.has-text-color)) td {
|
|
346
|
+
border-color: #ddd;
|
|
347
|
+
}
|
|
348
348
|
|
|
349
349
|
:where(.wp-block-calendar table:not(.has-background) th) {
|
|
350
350
|
background: #ddd;
|
|
@@ -585,17 +585,8 @@
|
|
|
585
585
|
.wp-block-comments-pagination > .wp-block-comments-pagination-next,
|
|
586
586
|
.wp-block-comments-pagination > .wp-block-comments-pagination-previous,
|
|
587
587
|
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
|
588
|
-
/*rtl:ignore*/
|
|
589
|
-
margin-right: 0.5em;
|
|
590
|
-
margin-bottom: 0.5em;
|
|
591
588
|
font-size: inherit;
|
|
592
589
|
}
|
|
593
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
|
594
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
|
595
|
-
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers:last-child {
|
|
596
|
-
/*rtl:ignore*/
|
|
597
|
-
margin-right: 0;
|
|
598
|
-
}
|
|
599
590
|
.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow {
|
|
600
591
|
margin-right: 1ch;
|
|
601
592
|
display: inline-block;
|
|
@@ -2501,6 +2492,10 @@ button.wp-block-navigation-item__content {
|
|
|
2501
2492
|
.wp-block-navigation-submenu__toggle {
|
|
2502
2493
|
cursor: pointer;
|
|
2503
2494
|
}
|
|
2495
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] + .wp-block-navigation__submenu-icon > svg,
|
|
2496
|
+
.wp-block-navigation-submenu__toggle[aria-expanded=true] > svg {
|
|
2497
|
+
transform: rotate(180deg);
|
|
2498
|
+
}
|
|
2504
2499
|
|
|
2505
2500
|
.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
|
|
2506
2501
|
padding-left: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.26.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -41,39 +41,39 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@babel/runtime": "7.25.7",
|
|
44
|
-
"@wordpress/a11y": "^4.
|
|
45
|
-
"@wordpress/api-fetch": "^7.
|
|
46
|
-
"@wordpress/autop": "^4.
|
|
47
|
-
"@wordpress/blob": "^4.
|
|
48
|
-
"@wordpress/block-editor": "^14.
|
|
49
|
-
"@wordpress/blocks": "^14.
|
|
50
|
-
"@wordpress/components": "^29.
|
|
51
|
-
"@wordpress/compose": "^7.
|
|
52
|
-
"@wordpress/core-data": "^7.
|
|
53
|
-
"@wordpress/data": "^10.
|
|
54
|
-
"@wordpress/date": "^5.
|
|
55
|
-
"@wordpress/deprecated": "^4.
|
|
56
|
-
"@wordpress/dom": "^4.
|
|
57
|
-
"@wordpress/element": "^6.
|
|
58
|
-
"@wordpress/escape-html": "^3.
|
|
59
|
-
"@wordpress/hooks": "^4.
|
|
60
|
-
"@wordpress/html-entities": "^4.
|
|
61
|
-
"@wordpress/i18n": "^5.
|
|
62
|
-
"@wordpress/icons": "^10.
|
|
63
|
-
"@wordpress/interactivity": "^6.
|
|
64
|
-
"@wordpress/interactivity-router": "^2.
|
|
65
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
66
|
-
"@wordpress/keycodes": "^4.
|
|
67
|
-
"@wordpress/notices": "^5.
|
|
68
|
-
"@wordpress/patterns": "^2.
|
|
69
|
-
"@wordpress/primitives": "^4.
|
|
70
|
-
"@wordpress/private-apis": "^1.
|
|
71
|
-
"@wordpress/reusable-blocks": "^5.
|
|
72
|
-
"@wordpress/rich-text": "^7.
|
|
73
|
-
"@wordpress/server-side-render": "^6.
|
|
74
|
-
"@wordpress/url": "^4.
|
|
75
|
-
"@wordpress/viewport": "^6.
|
|
76
|
-
"@wordpress/wordcount": "^4.
|
|
44
|
+
"@wordpress/a11y": "^4.26.0",
|
|
45
|
+
"@wordpress/api-fetch": "^7.26.0",
|
|
46
|
+
"@wordpress/autop": "^4.26.0",
|
|
47
|
+
"@wordpress/blob": "^4.26.0",
|
|
48
|
+
"@wordpress/block-editor": "^14.21.0",
|
|
49
|
+
"@wordpress/blocks": "^14.15.0",
|
|
50
|
+
"@wordpress/components": "^29.12.0",
|
|
51
|
+
"@wordpress/compose": "^7.26.0",
|
|
52
|
+
"@wordpress/core-data": "^7.26.0",
|
|
53
|
+
"@wordpress/data": "^10.26.0",
|
|
54
|
+
"@wordpress/date": "^5.26.0",
|
|
55
|
+
"@wordpress/deprecated": "^4.26.0",
|
|
56
|
+
"@wordpress/dom": "^4.26.0",
|
|
57
|
+
"@wordpress/element": "^6.26.0",
|
|
58
|
+
"@wordpress/escape-html": "^3.26.0",
|
|
59
|
+
"@wordpress/hooks": "^4.26.0",
|
|
60
|
+
"@wordpress/html-entities": "^4.26.0",
|
|
61
|
+
"@wordpress/i18n": "^5.26.0",
|
|
62
|
+
"@wordpress/icons": "^10.26.0",
|
|
63
|
+
"@wordpress/interactivity": "^6.26.0",
|
|
64
|
+
"@wordpress/interactivity-router": "^2.26.0",
|
|
65
|
+
"@wordpress/keyboard-shortcuts": "^5.26.0",
|
|
66
|
+
"@wordpress/keycodes": "^4.26.0",
|
|
67
|
+
"@wordpress/notices": "^5.26.0",
|
|
68
|
+
"@wordpress/patterns": "^2.26.0",
|
|
69
|
+
"@wordpress/primitives": "^4.26.0",
|
|
70
|
+
"@wordpress/private-apis": "^1.26.0",
|
|
71
|
+
"@wordpress/reusable-blocks": "^5.26.0",
|
|
72
|
+
"@wordpress/rich-text": "^7.26.0",
|
|
73
|
+
"@wordpress/server-side-render": "^6.2.0",
|
|
74
|
+
"@wordpress/url": "^4.26.0",
|
|
75
|
+
"@wordpress/viewport": "^6.26.0",
|
|
76
|
+
"@wordpress/wordcount": "^4.26.0",
|
|
77
77
|
"change-case": "^4.1.2",
|
|
78
78
|
"clsx": "^2.1.1",
|
|
79
79
|
"colord": "^2.7.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "35e26942820d8237771af0c58e45b4303f0497f1"
|
|
95
95
|
}
|
package/src/avatar/edit.js
CHANGED
|
@@ -12,10 +12,11 @@ import {
|
|
|
12
12
|
__experimentalUseBorderProps as useBorderProps,
|
|
13
13
|
} from '@wordpress/block-editor';
|
|
14
14
|
import {
|
|
15
|
-
PanelBody,
|
|
16
15
|
RangeControl,
|
|
17
16
|
ResizableBox,
|
|
18
17
|
ToggleControl,
|
|
18
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
19
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
19
20
|
} from '@wordpress/components';
|
|
20
21
|
import { __, isRTL } from '@wordpress/i18n';
|
|
21
22
|
import { addQueryArgs, removeQueryArgs } from '@wordpress/url';
|
|
@@ -23,7 +24,8 @@ import { addQueryArgs, removeQueryArgs } from '@wordpress/url';
|
|
|
23
24
|
/**
|
|
24
25
|
* Internal dependencies
|
|
25
26
|
*/
|
|
26
|
-
import {
|
|
27
|
+
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
28
|
+
import { useCommentAvatar, useUserAvatar } from './hooks';
|
|
27
29
|
import UserControl from './user-control';
|
|
28
30
|
|
|
29
31
|
const AvatarInspectorControls = ( {
|
|
@@ -31,56 +33,102 @@ const AvatarInspectorControls = ( {
|
|
|
31
33
|
avatar,
|
|
32
34
|
attributes,
|
|
33
35
|
selectUser,
|
|
34
|
-
} ) =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
onChange={ ( newSize ) =>
|
|
36
|
+
} ) => {
|
|
37
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
38
|
+
return (
|
|
39
|
+
<InspectorControls>
|
|
40
|
+
<ToolsPanel
|
|
41
|
+
label={ __( 'Settings' ) }
|
|
42
|
+
resetAll={ () => {
|
|
42
43
|
setAttributes( {
|
|
43
|
-
size:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
setAttributes( {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
44
|
+
size: 96,
|
|
45
|
+
isLink: false,
|
|
46
|
+
linkTarget: '_self',
|
|
47
|
+
userId: undefined,
|
|
48
|
+
} );
|
|
49
|
+
} }
|
|
50
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
51
|
+
>
|
|
52
|
+
<ToolsPanelItem
|
|
53
|
+
label={ __( 'Image size' ) }
|
|
54
|
+
isShownByDefault
|
|
55
|
+
hasValue={ () => attributes?.size !== 96 }
|
|
56
|
+
onDeselect={ () => setAttributes( { size: 96 } ) }
|
|
57
|
+
>
|
|
58
|
+
<RangeControl
|
|
59
|
+
__nextHasNoMarginBottom
|
|
60
|
+
__next40pxDefaultSize
|
|
61
|
+
label={ __( 'Image size' ) }
|
|
62
|
+
onChange={ ( newSize ) =>
|
|
63
|
+
setAttributes( {
|
|
64
|
+
size: newSize,
|
|
65
|
+
} )
|
|
66
|
+
}
|
|
67
|
+
min={ avatar.minSize }
|
|
68
|
+
max={ avatar.maxSize }
|
|
69
|
+
initialPosition={ attributes?.size }
|
|
70
|
+
value={ attributes?.size }
|
|
71
|
+
/>
|
|
72
|
+
</ToolsPanelItem>
|
|
73
|
+
<ToolsPanelItem
|
|
74
|
+
label={ __( 'Link to user profile' ) }
|
|
75
|
+
isShownByDefault
|
|
76
|
+
hasValue={ () => attributes?.isLink }
|
|
77
|
+
onDeselect={ () => setAttributes( { isLink: false } ) }
|
|
78
|
+
>
|
|
79
|
+
<ToggleControl
|
|
80
|
+
__nextHasNoMarginBottom
|
|
81
|
+
label={ __( 'Link to user profile' ) }
|
|
82
|
+
onChange={ () =>
|
|
83
|
+
setAttributes( { isLink: ! attributes.isLink } )
|
|
84
|
+
}
|
|
85
|
+
checked={ attributes.isLink }
|
|
86
|
+
/>
|
|
87
|
+
</ToolsPanelItem>
|
|
88
|
+
{ attributes.isLink && (
|
|
89
|
+
<ToolsPanelItem
|
|
90
|
+
label={ __( 'Open in new tab' ) }
|
|
91
|
+
isShownByDefault
|
|
92
|
+
hasValue={ () => attributes?.linkTarget !== '_self' }
|
|
93
|
+
onDeselect={ () =>
|
|
94
|
+
setAttributes( { linkTarget: '_self' } )
|
|
95
|
+
}
|
|
96
|
+
>
|
|
97
|
+
<ToggleControl
|
|
98
|
+
__nextHasNoMarginBottom
|
|
99
|
+
label={ __( 'Open in new tab' ) }
|
|
100
|
+
onChange={ ( value ) =>
|
|
101
|
+
setAttributes( {
|
|
102
|
+
linkTarget: value ? '_blank' : '_self',
|
|
103
|
+
} )
|
|
104
|
+
}
|
|
105
|
+
checked={ attributes.linkTarget === '_blank' }
|
|
106
|
+
/>
|
|
107
|
+
</ToolsPanelItem>
|
|
108
|
+
) }
|
|
109
|
+
{ selectUser && (
|
|
110
|
+
<ToolsPanelItem
|
|
111
|
+
label={ __( 'User' ) }
|
|
112
|
+
isShownByDefault
|
|
113
|
+
hasValue={ () => !! attributes?.userId }
|
|
114
|
+
onDeselect={ () =>
|
|
115
|
+
setAttributes( { userId: undefined } )
|
|
116
|
+
}
|
|
117
|
+
>
|
|
118
|
+
<UserControl
|
|
119
|
+
value={ attributes?.userId }
|
|
120
|
+
onChange={ ( value ) => {
|
|
121
|
+
setAttributes( {
|
|
122
|
+
userId: value,
|
|
123
|
+
} );
|
|
124
|
+
} }
|
|
125
|
+
/>
|
|
126
|
+
</ToolsPanelItem>
|
|
127
|
+
) }
|
|
128
|
+
</ToolsPanel>
|
|
129
|
+
</InspectorControls>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
84
132
|
|
|
85
133
|
const ResizableAvatar = ( {
|
|
86
134
|
setAttributes,
|
|
@@ -5,31 +5,45 @@ import { __ } from '@wordpress/i18n';
|
|
|
5
5
|
import { ComboboxControl } from '@wordpress/components';
|
|
6
6
|
import { useSelect } from '@wordpress/data';
|
|
7
7
|
import { store as coreStore } from '@wordpress/core-data';
|
|
8
|
-
import { useState } from '@wordpress/element';
|
|
8
|
+
import { useMemo, useState } from '@wordpress/element';
|
|
9
|
+
import { debounce } from '@wordpress/compose';
|
|
10
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
9
11
|
|
|
10
12
|
const AUTHORS_QUERY = {
|
|
11
13
|
who: 'authors',
|
|
12
|
-
per_page:
|
|
14
|
+
per_page: 100,
|
|
13
15
|
_fields: 'id,name',
|
|
14
16
|
context: 'view',
|
|
15
17
|
};
|
|
16
18
|
|
|
17
|
-
function UserControl( { value, onChange } ) {
|
|
18
|
-
const [
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, [] );
|
|
23
|
-
if ( ! authorsList ) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
19
|
+
export default function UserControl( { value, onChange } ) {
|
|
20
|
+
const [ filterValue, setFilterValue ] = useState( '' );
|
|
21
|
+
const { authors, isLoading } = useSelect(
|
|
22
|
+
( select ) => {
|
|
23
|
+
const { getUsers, isResolving } = select( coreStore );
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
const query = { ...AUTHORS_QUERY };
|
|
26
|
+
if ( filterValue ) {
|
|
27
|
+
query.search = filterValue;
|
|
28
|
+
query.search_columns = [ 'name' ];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
authors: getUsers( query ),
|
|
33
|
+
isLoading: isResolving( 'getUsers', [ query ] ),
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
[ filterValue ]
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const options = useMemo( () => {
|
|
40
|
+
return ( authors ?? [] ).map( ( author ) => {
|
|
41
|
+
return {
|
|
42
|
+
value: author.id,
|
|
43
|
+
label: decodeEntities( author.name ),
|
|
44
|
+
};
|
|
45
|
+
} );
|
|
46
|
+
}, [ authors ] );
|
|
33
47
|
|
|
34
48
|
return (
|
|
35
49
|
<ComboboxControl
|
|
@@ -41,18 +55,9 @@ function UserControl( { value, onChange } ) {
|
|
|
41
55
|
) }
|
|
42
56
|
value={ value }
|
|
43
57
|
onChange={ onChange }
|
|
44
|
-
options={
|
|
45
|
-
onFilterValueChange={ (
|
|
46
|
-
|
|
47
|
-
options.filter( ( option ) =>
|
|
48
|
-
option.label
|
|
49
|
-
.toLowerCase()
|
|
50
|
-
.startsWith( inputValue.toLowerCase() )
|
|
51
|
-
)
|
|
52
|
-
)
|
|
53
|
-
}
|
|
58
|
+
options={ options }
|
|
59
|
+
onFilterValueChange={ debounce( setFilterValue, 300 ) }
|
|
60
|
+
isLoading={ isLoading }
|
|
54
61
|
/>
|
|
55
62
|
);
|
|
56
63
|
}
|
|
57
|
-
|
|
58
|
-
export default UserControl;
|
package/src/calendar/style.scss
CHANGED
|
@@ -19,16 +19,6 @@
|
|
|
19
19
|
width: 100%;
|
|
20
20
|
border-collapse: collapse;
|
|
21
21
|
|
|
22
|
-
&:where(:not(.has-text-color)) {
|
|
23
|
-
color: #40464d;
|
|
24
|
-
|
|
25
|
-
// Keep the hard-coded border color for backward compatibility.
|
|
26
|
-
th,
|
|
27
|
-
td {
|
|
28
|
-
border-color: $gray-300;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
22
|
&.has-background th {
|
|
33
23
|
background-color: inherit;
|
|
34
24
|
}
|
|
@@ -37,6 +27,16 @@
|
|
|
37
27
|
color: inherit;
|
|
38
28
|
}
|
|
39
29
|
}
|
|
30
|
+
|
|
31
|
+
:where(table:not(.has-text-color)) {
|
|
32
|
+
color: #40464d;
|
|
33
|
+
|
|
34
|
+
// Keep the hard-coded border color for backward compatibility.
|
|
35
|
+
th,
|
|
36
|
+
td {
|
|
37
|
+
border-color: $gray-300;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// Keep the hard-coded header background color for backward compatibility.
|
|
@@ -8,9 +8,6 @@ $pagination-margin: 0.5em;
|
|
|
8
8
|
:where(.editor-styles-wrapper) {
|
|
9
9
|
.wp-block-comments-pagination {
|
|
10
10
|
max-width: 100%;
|
|
11
|
-
&.block-editor-block-list__layout {
|
|
12
|
-
margin: 0;
|
|
13
|
-
}
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
13
|
|
|
@@ -18,18 +15,6 @@ $pagination-margin: 0.5em;
|
|
|
18
15
|
> .wp-block-comments-pagination-next,
|
|
19
16
|
> .wp-block-comments-pagination-previous,
|
|
20
17
|
> .wp-block-comments-pagination-numbers {
|
|
21
|
-
// Override editor auto block margins.
|
|
22
|
-
margin-left: 0;
|
|
23
|
-
margin-top: $pagination-margin;
|
|
24
|
-
|
|
25
|
-
/*rtl:ignore*/
|
|
26
|
-
margin-right: $pagination-margin;
|
|
27
|
-
margin-bottom: $pagination-margin;
|
|
28
|
-
|
|
29
18
|
font-size: inherit;
|
|
30
|
-
&:last-child {
|
|
31
|
-
/*rtl:ignore*/
|
|
32
|
-
margin-right: 0;
|
|
33
|
-
}
|
|
34
19
|
}
|
|
35
20
|
}
|
|
@@ -4,15 +4,7 @@ $pagination-margin: 0.5em;
|
|
|
4
4
|
> .wp-block-comments-pagination-next,
|
|
5
5
|
> .wp-block-comments-pagination-previous,
|
|
6
6
|
> .wp-block-comments-pagination-numbers {
|
|
7
|
-
/*rtl:ignore*/
|
|
8
|
-
margin-right: $pagination-margin;
|
|
9
|
-
margin-bottom: $pagination-margin;
|
|
10
|
-
|
|
11
7
|
font-size: inherit;
|
|
12
|
-
&:last-child {
|
|
13
|
-
/*rtl:ignore*/
|
|
14
|
-
margin-right: 0;
|
|
15
|
-
}
|
|
16
8
|
}
|
|
17
9
|
.wp-block-comments-pagination-previous-arrow {
|
|
18
10
|
margin-right: 1ch;
|
package/src/editor.scss
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
@import "./nextpage/editor.scss";
|
|
32
32
|
@import "./page-list/editor.scss";
|
|
33
33
|
@import "./paragraph/editor.scss";
|
|
34
|
-
@import "./post-author/editor.scss";
|
|
35
34
|
@import "./post-excerpt/editor.scss";
|
|
36
35
|
@import "./pullquote/editor.scss";
|
|
37
36
|
@import "./rss/editor.scss";
|
package/src/embed/variations.js
CHANGED
|
@@ -251,14 +251,6 @@ const variations = [
|
|
|
251
251
|
patterns: [ /^https?:\/\/(www\.)?reverbnation\.com\/.+/i ],
|
|
252
252
|
attributes: { providerNameSlug: 'reverbnation', responsive: true },
|
|
253
253
|
},
|
|
254
|
-
{
|
|
255
|
-
name: 'screencast',
|
|
256
|
-
title: getTitle( 'Screencast' ),
|
|
257
|
-
icon: embedVideoIcon,
|
|
258
|
-
description: __( 'Embed Screencast content.' ),
|
|
259
|
-
patterns: [ /^https?:\/\/(www\.)?screencast\.com\/.+/i ],
|
|
260
|
-
attributes: { providerNameSlug: 'screencast', responsive: true },
|
|
261
|
-
},
|
|
262
254
|
{
|
|
263
255
|
name: 'scribd',
|
|
264
256
|
title: getTitle( 'Scribd' ),
|
package/src/form/block.json
CHANGED
package/src/form/edit.js
CHANGED
package/src/form/index.js
CHANGED
package/src/form-input/index.js
CHANGED