@wordpress/block-library 9.30.0 → 9.30.1-next.6870dfe5b.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/build/accordion-content/edit.js +8 -8
- package/build/accordion-content/edit.js.map +1 -1
- package/build/accordion-content/index.js +2 -1
- package/build/accordion-content/index.js.map +1 -1
- package/build/accordion-panel/index.js +2 -1
- package/build/accordion-panel/index.js.map +1 -1
- package/build/navigation/constants.js +5 -1
- package/build/navigation/constants.js.map +1 -1
- package/build/navigation/edit/index.js +45 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/leaf-more-menu.js +0 -1
- package/build/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +40 -5
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation-link/block-inserter.js +69 -0
- package/build/navigation-link/block-inserter.js.map +1 -0
- package/build/navigation-link/dialog-wrapper.js +80 -0
- package/build/navigation-link/dialog-wrapper.js.map +1 -0
- package/build/navigation-link/link-ui.js +80 -120
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-link/page-creator.js +137 -0
- package/build/navigation-link/page-creator.js.map +1 -0
- package/build/search/edit.js +22 -14
- package/build/search/edit.js.map +1 -1
- package/build-module/accordion-content/edit.js +8 -8
- package/build-module/accordion-content/edit.js.map +1 -1
- package/build-module/accordion-content/index.js +2 -1
- package/build-module/accordion-content/index.js.map +1 -1
- package/build-module/accordion-panel/index.js +2 -1
- package/build-module/accordion-panel/index.js.map +1 -1
- package/build-module/navigation/constants.js +5 -1
- package/build-module/navigation/constants.js.map +1 -1
- package/build-module/navigation/edit/index.js +50 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/leaf-more-menu.js +0 -1
- package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +40 -5
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation-link/block-inserter.js +61 -0
- package/build-module/navigation-link/block-inserter.js.map +1 -0
- package/build-module/navigation-link/dialog-wrapper.js +75 -0
- package/build-module/navigation-link/dialog-wrapper.js.map +1 -0
- package/build-module/navigation-link/link-ui.js +85 -125
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-link/page-creator.js +130 -0
- package/build-module/navigation-link/page-creator.js.map +1 -0
- package/build-module/search/edit.js +22 -14
- package/build-module/search/edit.js.map +1 -1
- package/build-style/accordion/style-rtl.css +5 -6
- package/build-style/accordion/style.css +5 -6
- package/build-style/editor-rtl.css +14 -0
- package/build-style/editor.css +14 -0
- package/build-style/form-input/style-rtl.css +4 -3
- package/build-style/form-input/style.css +4 -3
- package/build-style/navigation-link/editor-rtl.css +14 -0
- package/build-style/navigation-link/editor.css +14 -0
- package/build-style/navigation-link/style-rtl.css +1 -1
- package/build-style/navigation-link/style.css +1 -1
- package/build-style/post-comments-form/style-rtl.css +8 -5
- package/build-style/post-comments-form/style.css +8 -5
- package/build-style/search/style-rtl.css +11 -12
- package/build-style/search/style.css +11 -12
- package/build-style/style-rtl.css +29 -27
- package/build-style/style.css +29 -27
- package/package.json +35 -35
- package/src/accordion/style.scss +6 -6
- package/src/accordion-content/block.json +2 -1
- package/src/accordion-content/edit.js +21 -27
- package/src/accordion-panel/block.json +2 -1
- package/src/cover/test/edit.js +1 -5
- package/src/form-input/style.scss +3 -2
- package/src/navigation/constants.js +4 -0
- package/src/navigation/edit/index.js +50 -1
- package/src/navigation/edit/leaf-more-menu.js +0 -1
- package/src/navigation/edit/menu-inspector-controls.js +40 -5
- package/src/navigation-link/block-inserter.js +65 -0
- package/src/navigation-link/dialog-wrapper.js +74 -0
- package/src/navigation-link/editor.scss +17 -0
- package/src/navigation-link/link-ui.js +108 -164
- package/src/navigation-link/page-creator.js +157 -0
- package/src/navigation-link/style.scss +1 -1
- package/src/post-comments-form/style.scss +11 -11
- package/src/search/edit.js +44 -13
- package/src/search/index.php +16 -2
- package/src/search/style.scss +15 -16
|
@@ -134,14 +134,17 @@
|
|
|
134
134
|
/**
|
|
135
135
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
136
136
|
*/
|
|
137
|
-
:where(.wp-block-post-comments-form
|
|
138
|
-
:where(.wp-block-post-comments-form
|
|
139
|
-
border: 1px
|
|
137
|
+
:where(.wp-block-post-comments-form textarea),
|
|
138
|
+
:where(.wp-block-post-comments-form input:not([type=submit])) {
|
|
139
|
+
border-width: 1px;
|
|
140
|
+
border-style: solid;
|
|
141
|
+
border-color: #949494;
|
|
140
142
|
font-size: 1em;
|
|
141
143
|
font-family: inherit;
|
|
142
144
|
}
|
|
143
|
-
|
|
144
|
-
:where(.wp-block-post-comments-form
|
|
145
|
+
|
|
146
|
+
:where(.wp-block-post-comments-form textarea),
|
|
147
|
+
:where(.wp-block-post-comments-form input:where(:not([type=submit]):not([type=checkbox]))) {
|
|
145
148
|
padding: calc(0.667em + 2px);
|
|
146
149
|
}
|
|
147
150
|
|
|
@@ -166,17 +166,6 @@
|
|
|
166
166
|
width: 100%;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
.wp-block-search__input {
|
|
170
|
-
padding: 8px;
|
|
171
|
-
flex-grow: 1;
|
|
172
|
-
margin-right: 0;
|
|
173
|
-
margin-left: 0;
|
|
174
|
-
min-width: 3rem;
|
|
175
|
-
border: 1px solid #949494;
|
|
176
|
-
text-decoration: unset !important;
|
|
177
|
-
appearance: initial;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
169
|
.wp-block-search.wp-block-search__button-only .wp-block-search__button {
|
|
181
170
|
margin-right: 0;
|
|
182
171
|
flex-shrink: 0;
|
|
@@ -219,11 +208,21 @@
|
|
|
219
208
|
letter-spacing: inherit;
|
|
220
209
|
text-transform: inherit;
|
|
221
210
|
font-style: inherit;
|
|
211
|
+
padding: 8px;
|
|
212
|
+
flex-grow: 1;
|
|
213
|
+
margin-right: 0;
|
|
214
|
+
margin-left: 0;
|
|
215
|
+
min-width: 3rem;
|
|
216
|
+
border: 1px solid #949494;
|
|
217
|
+
text-decoration: unset !important;
|
|
218
|
+
appearance: initial;
|
|
222
219
|
}
|
|
223
220
|
|
|
224
221
|
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
|
|
225
222
|
padding: 4px;
|
|
226
|
-
border: 1px
|
|
223
|
+
border-width: 1px;
|
|
224
|
+
border-style: solid;
|
|
225
|
+
border-color: #949494;
|
|
227
226
|
background-color: #fff;
|
|
228
227
|
box-sizing: border-box;
|
|
229
228
|
}
|
|
@@ -166,17 +166,6 @@
|
|
|
166
166
|
width: 100%;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
.wp-block-search__input {
|
|
170
|
-
padding: 8px;
|
|
171
|
-
flex-grow: 1;
|
|
172
|
-
margin-left: 0;
|
|
173
|
-
margin-right: 0;
|
|
174
|
-
min-width: 3rem;
|
|
175
|
-
border: 1px solid #949494;
|
|
176
|
-
text-decoration: unset !important;
|
|
177
|
-
appearance: initial;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
169
|
.wp-block-search.wp-block-search__button-only .wp-block-search__button {
|
|
181
170
|
margin-left: 0;
|
|
182
171
|
flex-shrink: 0;
|
|
@@ -219,11 +208,21 @@
|
|
|
219
208
|
letter-spacing: inherit;
|
|
220
209
|
text-transform: inherit;
|
|
221
210
|
font-style: inherit;
|
|
211
|
+
padding: 8px;
|
|
212
|
+
flex-grow: 1;
|
|
213
|
+
margin-left: 0;
|
|
214
|
+
margin-right: 0;
|
|
215
|
+
min-width: 3rem;
|
|
216
|
+
border: 1px solid #949494;
|
|
217
|
+
text-decoration: unset !important;
|
|
218
|
+
appearance: initial;
|
|
222
219
|
}
|
|
223
220
|
|
|
224
221
|
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
|
|
225
222
|
padding: 4px;
|
|
226
|
-
border: 1px
|
|
223
|
+
border-width: 1px;
|
|
224
|
+
border-style: solid;
|
|
225
|
+
border-color: #949494;
|
|
227
226
|
background-color: #fff;
|
|
228
227
|
box-sizing: border-box;
|
|
229
228
|
}
|
|
@@ -147,11 +147,6 @@
|
|
|
147
147
|
transform: rotate(-45deg);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.accordion-content__heading {
|
|
151
|
-
margin-block-start: 0;
|
|
152
|
-
margin-block-end: 0;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
150
|
.accordion-content__toggle {
|
|
156
151
|
font-family: inherit;
|
|
157
152
|
font-size: inherit;
|
|
@@ -182,7 +177,11 @@
|
|
|
182
177
|
.is-layout-flow > .wp-block-accordion-panel,
|
|
183
178
|
.wp-block-accordion-panel {
|
|
184
179
|
overflow: hidden;
|
|
185
|
-
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.wp-block-accordion-panel[inert],
|
|
183
|
+
.wp-block-accordion-panel[aria-hidden=true] {
|
|
184
|
+
margin-block-start: 0;
|
|
186
185
|
}
|
|
187
186
|
|
|
188
187
|
.accordion-panel__wrapper {
|
|
@@ -1296,15 +1295,16 @@ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-blo
|
|
|
1296
1295
|
width: fit-content;
|
|
1297
1296
|
}
|
|
1298
1297
|
|
|
1299
|
-
.wp-block-form-input__input {
|
|
1298
|
+
:where(.wp-block-form-input__input) {
|
|
1300
1299
|
padding: 0 0.5em;
|
|
1301
1300
|
font-size: 1em;
|
|
1302
1301
|
margin-bottom: 0.5em;
|
|
1303
1302
|
}
|
|
1304
|
-
.wp-block-form-input__input[type=text], .wp-block-form-input__input[type=password], .wp-block-form-input__input[type=date], .wp-block-form-input__input[type=datetime], .wp-block-form-input__input[type=datetime-local], .wp-block-form-input__input[type=email], .wp-block-form-input__input[type=month], .wp-block-form-input__input[type=number], .wp-block-form-input__input[type=search], .wp-block-form-input__input[type=tel], .wp-block-form-input__input[type=time], .wp-block-form-input__input[type=url], .wp-block-form-input__input[type=week] {
|
|
1303
|
+
:where(.wp-block-form-input__input)[type=text], :where(.wp-block-form-input__input)[type=password], :where(.wp-block-form-input__input)[type=date], :where(.wp-block-form-input__input)[type=datetime], :where(.wp-block-form-input__input)[type=datetime-local], :where(.wp-block-form-input__input)[type=email], :where(.wp-block-form-input__input)[type=month], :where(.wp-block-form-input__input)[type=number], :where(.wp-block-form-input__input)[type=search], :where(.wp-block-form-input__input)[type=tel], :where(.wp-block-form-input__input)[type=time], :where(.wp-block-form-input__input)[type=url], :where(.wp-block-form-input__input)[type=week] {
|
|
1305
1304
|
min-height: 2em;
|
|
1306
1305
|
line-height: 2;
|
|
1307
|
-
border: 1px
|
|
1306
|
+
border-width: 1px;
|
|
1307
|
+
border-style: solid;
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
1310
1310
|
textarea.wp-block-form-input__input {
|
|
@@ -2870,7 +2870,7 @@ html.has-modal-open {
|
|
|
2870
2870
|
}
|
|
2871
2871
|
|
|
2872
2872
|
.link-ui-tools {
|
|
2873
|
-
|
|
2873
|
+
outline: 1px solid #f0f0f0;
|
|
2874
2874
|
padding: 8px;
|
|
2875
2875
|
}
|
|
2876
2876
|
|
|
@@ -2977,14 +2977,17 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
2977
2977
|
box-sizing: border-box;
|
|
2978
2978
|
}
|
|
2979
2979
|
|
|
2980
|
-
:where(.wp-block-post-comments-form
|
|
2981
|
-
:where(.wp-block-post-comments-form
|
|
2982
|
-
border: 1px
|
|
2980
|
+
:where(.wp-block-post-comments-form textarea),
|
|
2981
|
+
:where(.wp-block-post-comments-form input:not([type=submit])) {
|
|
2982
|
+
border-width: 1px;
|
|
2983
|
+
border-style: solid;
|
|
2984
|
+
border-color: #949494;
|
|
2983
2985
|
font-size: 1em;
|
|
2984
2986
|
font-family: inherit;
|
|
2985
2987
|
}
|
|
2986
|
-
|
|
2987
|
-
:where(.wp-block-post-comments-form
|
|
2988
|
+
|
|
2989
|
+
:where(.wp-block-post-comments-form textarea),
|
|
2990
|
+
:where(.wp-block-post-comments-form input:where(:not([type=submit]):not([type=checkbox]))) {
|
|
2988
2991
|
padding: calc(0.667em + 2px);
|
|
2989
2992
|
}
|
|
2990
2993
|
|
|
@@ -3473,17 +3476,6 @@ ul.wp-block-rss.is-grid li {
|
|
|
3473
3476
|
width: 100%;
|
|
3474
3477
|
}
|
|
3475
3478
|
|
|
3476
|
-
.wp-block-search__input {
|
|
3477
|
-
padding: 8px;
|
|
3478
|
-
flex-grow: 1;
|
|
3479
|
-
margin-right: 0;
|
|
3480
|
-
margin-left: 0;
|
|
3481
|
-
min-width: 3rem;
|
|
3482
|
-
border: 1px solid #949494;
|
|
3483
|
-
text-decoration: unset !important;
|
|
3484
|
-
appearance: initial;
|
|
3485
|
-
}
|
|
3486
|
-
|
|
3487
3479
|
.wp-block-search.wp-block-search__button-only .wp-block-search__button {
|
|
3488
3480
|
margin-right: 0;
|
|
3489
3481
|
flex-shrink: 0;
|
|
@@ -3526,11 +3518,21 @@ ul.wp-block-rss.is-grid li {
|
|
|
3526
3518
|
letter-spacing: inherit;
|
|
3527
3519
|
text-transform: inherit;
|
|
3528
3520
|
font-style: inherit;
|
|
3521
|
+
padding: 8px;
|
|
3522
|
+
flex-grow: 1;
|
|
3523
|
+
margin-right: 0;
|
|
3524
|
+
margin-left: 0;
|
|
3525
|
+
min-width: 3rem;
|
|
3526
|
+
border: 1px solid #949494;
|
|
3527
|
+
text-decoration: unset !important;
|
|
3528
|
+
appearance: initial;
|
|
3529
3529
|
}
|
|
3530
3530
|
|
|
3531
3531
|
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
|
|
3532
3532
|
padding: 4px;
|
|
3533
|
-
border: 1px
|
|
3533
|
+
border-width: 1px;
|
|
3534
|
+
border-style: solid;
|
|
3535
|
+
border-color: #949494;
|
|
3534
3536
|
background-color: #fff;
|
|
3535
3537
|
box-sizing: border-box;
|
|
3536
3538
|
}
|
package/build-style/style.css
CHANGED
|
@@ -147,11 +147,6 @@
|
|
|
147
147
|
transform: rotate(45deg);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.accordion-content__heading {
|
|
151
|
-
margin-block-start: 0;
|
|
152
|
-
margin-block-end: 0;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
150
|
.accordion-content__toggle {
|
|
156
151
|
font-family: inherit;
|
|
157
152
|
font-size: inherit;
|
|
@@ -182,7 +177,11 @@
|
|
|
182
177
|
.is-layout-flow > .wp-block-accordion-panel,
|
|
183
178
|
.wp-block-accordion-panel {
|
|
184
179
|
overflow: hidden;
|
|
185
|
-
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.wp-block-accordion-panel[inert],
|
|
183
|
+
.wp-block-accordion-panel[aria-hidden=true] {
|
|
184
|
+
margin-block-start: 0;
|
|
186
185
|
}
|
|
187
186
|
|
|
188
187
|
.accordion-panel__wrapper {
|
|
@@ -1304,15 +1303,16 @@ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-blo
|
|
|
1304
1303
|
width: fit-content;
|
|
1305
1304
|
}
|
|
1306
1305
|
|
|
1307
|
-
.wp-block-form-input__input {
|
|
1306
|
+
:where(.wp-block-form-input__input) {
|
|
1308
1307
|
padding: 0 0.5em;
|
|
1309
1308
|
font-size: 1em;
|
|
1310
1309
|
margin-bottom: 0.5em;
|
|
1311
1310
|
}
|
|
1312
|
-
.wp-block-form-input__input[type=text], .wp-block-form-input__input[type=password], .wp-block-form-input__input[type=date], .wp-block-form-input__input[type=datetime], .wp-block-form-input__input[type=datetime-local], .wp-block-form-input__input[type=email], .wp-block-form-input__input[type=month], .wp-block-form-input__input[type=number], .wp-block-form-input__input[type=search], .wp-block-form-input__input[type=tel], .wp-block-form-input__input[type=time], .wp-block-form-input__input[type=url], .wp-block-form-input__input[type=week] {
|
|
1311
|
+
:where(.wp-block-form-input__input)[type=text], :where(.wp-block-form-input__input)[type=password], :where(.wp-block-form-input__input)[type=date], :where(.wp-block-form-input__input)[type=datetime], :where(.wp-block-form-input__input)[type=datetime-local], :where(.wp-block-form-input__input)[type=email], :where(.wp-block-form-input__input)[type=month], :where(.wp-block-form-input__input)[type=number], :where(.wp-block-form-input__input)[type=search], :where(.wp-block-form-input__input)[type=tel], :where(.wp-block-form-input__input)[type=time], :where(.wp-block-form-input__input)[type=url], :where(.wp-block-form-input__input)[type=week] {
|
|
1313
1312
|
min-height: 2em;
|
|
1314
1313
|
line-height: 2;
|
|
1315
|
-
border: 1px
|
|
1314
|
+
border-width: 1px;
|
|
1315
|
+
border-style: solid;
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
1318
1318
|
textarea.wp-block-form-input__input {
|
|
@@ -2900,7 +2900,7 @@ html.has-modal-open {
|
|
|
2900
2900
|
}
|
|
2901
2901
|
|
|
2902
2902
|
.link-ui-tools {
|
|
2903
|
-
|
|
2903
|
+
outline: 1px solid #f0f0f0;
|
|
2904
2904
|
padding: 8px;
|
|
2905
2905
|
}
|
|
2906
2906
|
|
|
@@ -3007,14 +3007,17 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
|
|
|
3007
3007
|
box-sizing: border-box;
|
|
3008
3008
|
}
|
|
3009
3009
|
|
|
3010
|
-
:where(.wp-block-post-comments-form
|
|
3011
|
-
:where(.wp-block-post-comments-form
|
|
3012
|
-
border: 1px
|
|
3010
|
+
:where(.wp-block-post-comments-form textarea),
|
|
3011
|
+
:where(.wp-block-post-comments-form input:not([type=submit])) {
|
|
3012
|
+
border-width: 1px;
|
|
3013
|
+
border-style: solid;
|
|
3014
|
+
border-color: #949494;
|
|
3013
3015
|
font-size: 1em;
|
|
3014
3016
|
font-family: inherit;
|
|
3015
3017
|
}
|
|
3016
|
-
|
|
3017
|
-
:where(.wp-block-post-comments-form
|
|
3018
|
+
|
|
3019
|
+
:where(.wp-block-post-comments-form textarea),
|
|
3020
|
+
:where(.wp-block-post-comments-form input:where(:not([type=submit]):not([type=checkbox]))) {
|
|
3018
3021
|
padding: calc(0.667em + 2px);
|
|
3019
3022
|
}
|
|
3020
3023
|
|
|
@@ -3505,17 +3508,6 @@ ul.wp-block-rss.is-grid li {
|
|
|
3505
3508
|
width: 100%;
|
|
3506
3509
|
}
|
|
3507
3510
|
|
|
3508
|
-
.wp-block-search__input {
|
|
3509
|
-
padding: 8px;
|
|
3510
|
-
flex-grow: 1;
|
|
3511
|
-
margin-left: 0;
|
|
3512
|
-
margin-right: 0;
|
|
3513
|
-
min-width: 3rem;
|
|
3514
|
-
border: 1px solid #949494;
|
|
3515
|
-
text-decoration: unset !important;
|
|
3516
|
-
appearance: initial;
|
|
3517
|
-
}
|
|
3518
|
-
|
|
3519
3511
|
.wp-block-search.wp-block-search__button-only .wp-block-search__button {
|
|
3520
3512
|
margin-left: 0;
|
|
3521
3513
|
flex-shrink: 0;
|
|
@@ -3558,11 +3550,21 @@ ul.wp-block-rss.is-grid li {
|
|
|
3558
3550
|
letter-spacing: inherit;
|
|
3559
3551
|
text-transform: inherit;
|
|
3560
3552
|
font-style: inherit;
|
|
3553
|
+
padding: 8px;
|
|
3554
|
+
flex-grow: 1;
|
|
3555
|
+
margin-left: 0;
|
|
3556
|
+
margin-right: 0;
|
|
3557
|
+
min-width: 3rem;
|
|
3558
|
+
border: 1px solid #949494;
|
|
3559
|
+
text-decoration: unset !important;
|
|
3560
|
+
appearance: initial;
|
|
3561
3561
|
}
|
|
3562
3562
|
|
|
3563
3563
|
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
|
|
3564
3564
|
padding: 4px;
|
|
3565
|
-
border: 1px
|
|
3565
|
+
border-width: 1px;
|
|
3566
|
+
border-style: solid;
|
|
3567
|
+
border-color: #949494;
|
|
3566
3568
|
background-color: #fff;
|
|
3567
3569
|
box-sizing: border-box;
|
|
3568
3570
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.30.0",
|
|
3
|
+
"version": "9.30.1-next.6870dfe5b.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,39 +42,39 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@babel/runtime": "7.25.7",
|
|
45
|
-
"@wordpress/a11y": "^4.30.0",
|
|
46
|
-
"@wordpress/api-fetch": "^7.30.0",
|
|
47
|
-
"@wordpress/autop": "^4.30.0",
|
|
48
|
-
"@wordpress/blob": "^4.30.0",
|
|
49
|
-
"@wordpress/block-editor": "^15.3.0",
|
|
50
|
-
"@wordpress/blocks": "^15.3.0",
|
|
51
|
-
"@wordpress/components": "^30.3.0",
|
|
52
|
-
"@wordpress/compose": "^7.30.0",
|
|
53
|
-
"@wordpress/core-data": "^7.30.0",
|
|
54
|
-
"@wordpress/data": "^10.30.0",
|
|
55
|
-
"@wordpress/date": "^5.30.0",
|
|
56
|
-
"@wordpress/deprecated": "^4.30.0",
|
|
57
|
-
"@wordpress/dom": "^4.30.0",
|
|
58
|
-
"@wordpress/element": "^6.30.0",
|
|
59
|
-
"@wordpress/escape-html": "^3.30.0",
|
|
60
|
-
"@wordpress/hooks": "^4.30.0",
|
|
61
|
-
"@wordpress/html-entities": "^4.30.0",
|
|
62
|
-
"@wordpress/i18n": "^6.3.0",
|
|
63
|
-
"@wordpress/icons": "^10.30.0",
|
|
64
|
-
"@wordpress/interactivity": "^6.30.0",
|
|
65
|
-
"@wordpress/interactivity-router": "^2.30.0",
|
|
66
|
-
"@wordpress/keyboard-shortcuts": "^5.30.0",
|
|
67
|
-
"@wordpress/keycodes": "^4.30.0",
|
|
68
|
-
"@wordpress/notices": "^5.30.0",
|
|
69
|
-
"@wordpress/patterns": "^2.30.0",
|
|
70
|
-
"@wordpress/primitives": "^4.30.0",
|
|
71
|
-
"@wordpress/private-apis": "^1.30.0",
|
|
72
|
-
"@wordpress/reusable-blocks": "^5.30.0",
|
|
73
|
-
"@wordpress/rich-text": "^7.30.0",
|
|
74
|
-
"@wordpress/server-side-render": "^6.6.0",
|
|
75
|
-
"@wordpress/url": "^4.30.0",
|
|
76
|
-
"@wordpress/viewport": "^6.30.0",
|
|
77
|
-
"@wordpress/wordcount": "^4.30.0",
|
|
45
|
+
"@wordpress/a11y": "^4.30.1-next.6870dfe5b.0",
|
|
46
|
+
"@wordpress/api-fetch": "^7.30.1-next.6870dfe5b.0",
|
|
47
|
+
"@wordpress/autop": "^4.30.1-next.6870dfe5b.0",
|
|
48
|
+
"@wordpress/blob": "^4.30.1-next.6870dfe5b.0",
|
|
49
|
+
"@wordpress/block-editor": "^15.3.1-next.6870dfe5b.0",
|
|
50
|
+
"@wordpress/blocks": "^15.3.1-next.6870dfe5b.0",
|
|
51
|
+
"@wordpress/components": "^30.3.2-next.6870dfe5b.0",
|
|
52
|
+
"@wordpress/compose": "^7.30.1-next.6870dfe5b.0",
|
|
53
|
+
"@wordpress/core-data": "^7.30.1-next.6870dfe5b.0",
|
|
54
|
+
"@wordpress/data": "^10.30.1-next.6870dfe5b.0",
|
|
55
|
+
"@wordpress/date": "^5.30.1-next.6870dfe5b.0",
|
|
56
|
+
"@wordpress/deprecated": "^4.30.1-next.6870dfe5b.0",
|
|
57
|
+
"@wordpress/dom": "^4.30.1-next.6870dfe5b.0",
|
|
58
|
+
"@wordpress/element": "^6.30.1-next.6870dfe5b.0",
|
|
59
|
+
"@wordpress/escape-html": "^3.30.1-next.6870dfe5b.0",
|
|
60
|
+
"@wordpress/hooks": "^4.30.1-next.6870dfe5b.0",
|
|
61
|
+
"@wordpress/html-entities": "^4.30.1-next.6870dfe5b.0",
|
|
62
|
+
"@wordpress/i18n": "^6.3.1-next.6870dfe5b.0",
|
|
63
|
+
"@wordpress/icons": "^10.30.1-next.6870dfe5b.0",
|
|
64
|
+
"@wordpress/interactivity": "^6.30.1-next.6870dfe5b.0",
|
|
65
|
+
"@wordpress/interactivity-router": "^2.30.1-next.6870dfe5b.0",
|
|
66
|
+
"@wordpress/keyboard-shortcuts": "^5.30.1-next.6870dfe5b.0",
|
|
67
|
+
"@wordpress/keycodes": "^4.30.1-next.6870dfe5b.0",
|
|
68
|
+
"@wordpress/notices": "^5.30.1-next.6870dfe5b.0",
|
|
69
|
+
"@wordpress/patterns": "^2.30.1-next.6870dfe5b.0",
|
|
70
|
+
"@wordpress/primitives": "^4.30.1-next.6870dfe5b.0",
|
|
71
|
+
"@wordpress/private-apis": "^1.30.1-next.6870dfe5b.0",
|
|
72
|
+
"@wordpress/reusable-blocks": "^5.30.1-next.6870dfe5b.0",
|
|
73
|
+
"@wordpress/rich-text": "^7.30.1-next.6870dfe5b.0",
|
|
74
|
+
"@wordpress/server-side-render": "^6.6.1-next.6870dfe5b.0",
|
|
75
|
+
"@wordpress/url": "^4.30.1-next.6870dfe5b.0",
|
|
76
|
+
"@wordpress/viewport": "^6.30.1-next.6870dfe5b.0",
|
|
77
|
+
"@wordpress/wordcount": "^4.30.1-next.6870dfe5b.0",
|
|
78
78
|
"change-case": "^4.1.2",
|
|
79
79
|
"clsx": "^2.1.1",
|
|
80
80
|
"colord": "^2.7.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "c8637da9df499cd7b6b07c9fad918f6d45f4de3d"
|
|
96
96
|
}
|
package/src/accordion/style.scss
CHANGED
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.accordion-content__heading {
|
|
17
|
-
margin-block-start: 0;
|
|
18
|
-
margin-block-end: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
16
|
.accordion-content__toggle {
|
|
22
17
|
font-family: inherit;
|
|
23
18
|
font-size: inherit;
|
|
@@ -48,7 +43,12 @@
|
|
|
48
43
|
.is-layout-flow > .wp-block-accordion-panel,
|
|
49
44
|
.wp-block-accordion-panel {
|
|
50
45
|
overflow: hidden;
|
|
51
|
-
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Prevent blockGap from Accordion Content block from adding extra margin between accordions.
|
|
49
|
+
.wp-block-accordion-panel[inert],
|
|
50
|
+
.wp-block-accordion-panel[aria-hidden="true"] {
|
|
51
|
+
margin-block-start: 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.accordion-panel__wrapper {
|
|
@@ -25,11 +25,8 @@ import clsx from 'clsx';
|
|
|
25
25
|
*/
|
|
26
26
|
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
|
|
27
27
|
|
|
28
|
-
export default function Edit( {
|
|
29
|
-
|
|
30
|
-
clientId,
|
|
31
|
-
setAttributes,
|
|
32
|
-
} ) {
|
|
28
|
+
export default function Edit( { attributes, clientId, setAttributes } ) {
|
|
29
|
+
const { openByDefault } = attributes;
|
|
33
30
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
34
31
|
|
|
35
32
|
const { isSelected, getBlockOrder } = useSelect(
|
|
@@ -67,29 +64,26 @@ export default function Edit( {
|
|
|
67
64
|
updateBlockAttributes,
|
|
68
65
|
] );
|
|
69
66
|
|
|
70
|
-
const blockProps = useBlockProps(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
openByDefault,
|
|
85
|
-
},
|
|
86
|
-
],
|
|
67
|
+
const blockProps = useBlockProps( {
|
|
68
|
+
className: clsx( {
|
|
69
|
+
'is-open': openByDefault || isSelected,
|
|
70
|
+
} ),
|
|
71
|
+
} );
|
|
72
|
+
|
|
73
|
+
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
74
|
+
template: [
|
|
75
|
+
[ 'core/accordion-header', {} ],
|
|
76
|
+
[
|
|
77
|
+
'core/accordion-panel',
|
|
78
|
+
{
|
|
79
|
+
openByDefault,
|
|
80
|
+
},
|
|
87
81
|
],
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
);
|
|
82
|
+
],
|
|
83
|
+
templateLock: 'all',
|
|
84
|
+
directInsert: true,
|
|
85
|
+
templateInsertUpdatesSelection: true,
|
|
86
|
+
} );
|
|
93
87
|
|
|
94
88
|
return (
|
|
95
89
|
<>
|
package/src/cover/test/edit.js
CHANGED
|
@@ -51,11 +51,7 @@ async function createAndSelectBlock() {
|
|
|
51
51
|
name: 'Black',
|
|
52
52
|
} )
|
|
53
53
|
);
|
|
54
|
-
await
|
|
55
|
-
screen.getByRole( 'button', {
|
|
56
|
-
name: 'Select parent block: Cover',
|
|
57
|
-
} )
|
|
58
|
-
);
|
|
54
|
+
await selectBlock( 'Block: Cover' );
|
|
59
55
|
}
|
|
60
56
|
|
|
61
57
|
describe( 'Cover block', () => {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
width: fit-content;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.wp-block-form-input__input {
|
|
37
|
+
:where(.wp-block-form-input__input) {
|
|
38
38
|
padding: 0 0.5em;
|
|
39
39
|
font-size: 1em;
|
|
40
40
|
margin-bottom: 0.5em;
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
&[type="week"] {
|
|
55
55
|
min-height: 2em;
|
|
56
56
|
line-height: 2;
|
|
57
|
-
border: 1px
|
|
57
|
+
border-width: 1px;
|
|
58
|
+
border-style: solid;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,
|
|
27
27
|
__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,
|
|
28
28
|
useBlockEditingMode,
|
|
29
|
+
BlockControls,
|
|
29
30
|
} from '@wordpress/block-editor';
|
|
30
31
|
import { EntityProvider, store as coreStore } from '@wordpress/core-data';
|
|
31
32
|
|
|
@@ -40,10 +41,13 @@ import {
|
|
|
40
41
|
Button,
|
|
41
42
|
Spinner,
|
|
42
43
|
Notice,
|
|
44
|
+
ToolbarButton,
|
|
45
|
+
ToolbarGroup,
|
|
43
46
|
} from '@wordpress/components';
|
|
44
47
|
import { __ } from '@wordpress/i18n';
|
|
45
48
|
import { speak } from '@wordpress/a11y';
|
|
46
|
-
import { close, Icon } from '@wordpress/icons';
|
|
49
|
+
import { close, Icon, page } from '@wordpress/icons';
|
|
50
|
+
import { createBlock } from '@wordpress/blocks';
|
|
47
51
|
import { useInstanceId } from '@wordpress/compose';
|
|
48
52
|
|
|
49
53
|
/**
|
|
@@ -75,6 +79,48 @@ import AccessibleDescription from './accessible-description';
|
|
|
75
79
|
import AccessibleMenuDescription from './accessible-menu-description';
|
|
76
80
|
import { unlock } from '../../lock-unlock';
|
|
77
81
|
import { useToolsPanelDropdownMenuProps } from '../../utils/hooks';
|
|
82
|
+
import { DEFAULT_BLOCK } from '../constants';
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Component that renders the Add page button for the Navigation block.
|
|
86
|
+
*
|
|
87
|
+
* @param {Object} props Component props.
|
|
88
|
+
* @param {string} props.clientId Block client ID.
|
|
89
|
+
* @return {JSX.Element|null} The Add page button component or null if not applicable.
|
|
90
|
+
*/
|
|
91
|
+
function NavigationAddPageButton( { clientId } ) {
|
|
92
|
+
const { insertBlock } = useDispatch( blockEditorStore );
|
|
93
|
+
const { getBlockCount } = useSelect( blockEditorStore );
|
|
94
|
+
|
|
95
|
+
const onAddPage = useCallback( () => {
|
|
96
|
+
// Get the current number of blocks to insert at the end
|
|
97
|
+
const blockCount = getBlockCount( clientId );
|
|
98
|
+
|
|
99
|
+
// Create a new navigation link block (default block)
|
|
100
|
+
const newBlock = createBlock( DEFAULT_BLOCK.name, {
|
|
101
|
+
kind: DEFAULT_BLOCK.attributes.kind,
|
|
102
|
+
type: DEFAULT_BLOCK.attributes.type,
|
|
103
|
+
} );
|
|
104
|
+
|
|
105
|
+
// Insert the block at the end of the navigation
|
|
106
|
+
insertBlock( newBlock, blockCount, clientId );
|
|
107
|
+
}, [ clientId, insertBlock, getBlockCount ] );
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<BlockControls>
|
|
111
|
+
<ToolbarGroup>
|
|
112
|
+
<ToolbarButton
|
|
113
|
+
name="add-page"
|
|
114
|
+
icon={ page }
|
|
115
|
+
title={ __( 'Add page' ) }
|
|
116
|
+
onClick={ onAddPage }
|
|
117
|
+
>
|
|
118
|
+
{ __( 'Add page' ) }
|
|
119
|
+
</ToolbarButton>
|
|
120
|
+
</ToolbarGroup>
|
|
121
|
+
</BlockControls>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
78
124
|
|
|
79
125
|
function ColorTools( {
|
|
80
126
|
textColor,
|
|
@@ -937,6 +983,9 @@ function Navigation( {
|
|
|
937
983
|
blockEditingMode={ blockEditingMode }
|
|
938
984
|
/>
|
|
939
985
|
{ blockEditingMode === 'default' && stylingInspectorControls }
|
|
986
|
+
{ blockEditingMode === 'contentOnly' && isEntityAvailable && (
|
|
987
|
+
<NavigationAddPageButton clientId={ clientId } />
|
|
988
|
+
) }
|
|
940
989
|
{ blockEditingMode === 'default' && isEntityAvailable && (
|
|
941
990
|
<InspectorControls group="advanced">
|
|
942
991
|
{ hasResolvedCanUserUpdateNavigationMenu &&
|