@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.
Files changed (85) hide show
  1. package/build/accordion-content/edit.js +8 -8
  2. package/build/accordion-content/edit.js.map +1 -1
  3. package/build/accordion-content/index.js +2 -1
  4. package/build/accordion-content/index.js.map +1 -1
  5. package/build/accordion-panel/index.js +2 -1
  6. package/build/accordion-panel/index.js.map +1 -1
  7. package/build/navigation/constants.js +5 -1
  8. package/build/navigation/constants.js.map +1 -1
  9. package/build/navigation/edit/index.js +45 -1
  10. package/build/navigation/edit/index.js.map +1 -1
  11. package/build/navigation/edit/leaf-more-menu.js +0 -1
  12. package/build/navigation/edit/leaf-more-menu.js.map +1 -1
  13. package/build/navigation/edit/menu-inspector-controls.js +40 -5
  14. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  15. package/build/navigation-link/block-inserter.js +69 -0
  16. package/build/navigation-link/block-inserter.js.map +1 -0
  17. package/build/navigation-link/dialog-wrapper.js +80 -0
  18. package/build/navigation-link/dialog-wrapper.js.map +1 -0
  19. package/build/navigation-link/link-ui.js +80 -120
  20. package/build/navigation-link/link-ui.js.map +1 -1
  21. package/build/navigation-link/page-creator.js +137 -0
  22. package/build/navigation-link/page-creator.js.map +1 -0
  23. package/build/search/edit.js +22 -14
  24. package/build/search/edit.js.map +1 -1
  25. package/build-module/accordion-content/edit.js +8 -8
  26. package/build-module/accordion-content/edit.js.map +1 -1
  27. package/build-module/accordion-content/index.js +2 -1
  28. package/build-module/accordion-content/index.js.map +1 -1
  29. package/build-module/accordion-panel/index.js +2 -1
  30. package/build-module/accordion-panel/index.js.map +1 -1
  31. package/build-module/navigation/constants.js +5 -1
  32. package/build-module/navigation/constants.js.map +1 -1
  33. package/build-module/navigation/edit/index.js +50 -4
  34. package/build-module/navigation/edit/index.js.map +1 -1
  35. package/build-module/navigation/edit/leaf-more-menu.js +0 -1
  36. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
  37. package/build-module/navigation/edit/menu-inspector-controls.js +40 -5
  38. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  39. package/build-module/navigation-link/block-inserter.js +61 -0
  40. package/build-module/navigation-link/block-inserter.js.map +1 -0
  41. package/build-module/navigation-link/dialog-wrapper.js +75 -0
  42. package/build-module/navigation-link/dialog-wrapper.js.map +1 -0
  43. package/build-module/navigation-link/link-ui.js +85 -125
  44. package/build-module/navigation-link/link-ui.js.map +1 -1
  45. package/build-module/navigation-link/page-creator.js +130 -0
  46. package/build-module/navigation-link/page-creator.js.map +1 -0
  47. package/build-module/search/edit.js +22 -14
  48. package/build-module/search/edit.js.map +1 -1
  49. package/build-style/accordion/style-rtl.css +5 -6
  50. package/build-style/accordion/style.css +5 -6
  51. package/build-style/editor-rtl.css +14 -0
  52. package/build-style/editor.css +14 -0
  53. package/build-style/form-input/style-rtl.css +4 -3
  54. package/build-style/form-input/style.css +4 -3
  55. package/build-style/navigation-link/editor-rtl.css +14 -0
  56. package/build-style/navigation-link/editor.css +14 -0
  57. package/build-style/navigation-link/style-rtl.css +1 -1
  58. package/build-style/navigation-link/style.css +1 -1
  59. package/build-style/post-comments-form/style-rtl.css +8 -5
  60. package/build-style/post-comments-form/style.css +8 -5
  61. package/build-style/search/style-rtl.css +11 -12
  62. package/build-style/search/style.css +11 -12
  63. package/build-style/style-rtl.css +29 -27
  64. package/build-style/style.css +29 -27
  65. package/package.json +35 -35
  66. package/src/accordion/style.scss +6 -6
  67. package/src/accordion-content/block.json +2 -1
  68. package/src/accordion-content/edit.js +21 -27
  69. package/src/accordion-panel/block.json +2 -1
  70. package/src/cover/test/edit.js +1 -5
  71. package/src/form-input/style.scss +3 -2
  72. package/src/navigation/constants.js +4 -0
  73. package/src/navigation/edit/index.js +50 -1
  74. package/src/navigation/edit/leaf-more-menu.js +0 -1
  75. package/src/navigation/edit/menu-inspector-controls.js +40 -5
  76. package/src/navigation-link/block-inserter.js +65 -0
  77. package/src/navigation-link/dialog-wrapper.js +74 -0
  78. package/src/navigation-link/editor.scss +17 -0
  79. package/src/navigation-link/link-ui.js +108 -164
  80. package/src/navigation-link/page-creator.js +157 -0
  81. package/src/navigation-link/style.scss +1 -1
  82. package/src/post-comments-form/style.scss +11 -11
  83. package/src/search/edit.js +44 -13
  84. package/src/search/index.php +16 -2
  85. 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) textarea,
138
- :where(.wp-block-post-comments-form) input:not([type=submit]) {
139
- border: 1px solid #949494;
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
- :where(.wp-block-post-comments-form) textarea,
144
- :where(.wp-block-post-comments-form) input:where(:not([type=submit]):not([type=checkbox])) {
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 solid #949494;
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 solid #949494;
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
- margin: 0;
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 solid;
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
- border-top: 1px solid #f0f0f0;
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) textarea,
2981
- :where(.wp-block-post-comments-form) input:not([type=submit]) {
2982
- border: 1px solid #949494;
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
- :where(.wp-block-post-comments-form) textarea,
2987
- :where(.wp-block-post-comments-form) input:where(:not([type=submit]):not([type=checkbox])) {
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 solid #949494;
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
  }
@@ -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
- margin: 0;
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 solid;
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
- border-top: 1px solid #f0f0f0;
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) textarea,
3011
- :where(.wp-block-post-comments-form) input:not([type=submit]) {
3012
- border: 1px solid #949494;
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
- :where(.wp-block-post-comments-form) textarea,
3017
- :where(.wp-block-post-comments-form) input:where(:not([type=submit]):not([type=checkbox])) {
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 solid #949494;
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": "c66cb089eed19d4f4956962fa7b4c81abe6dd513"
95
+ "gitHead": "c8637da9df499cd7b6b07c9fad918f6d45f4de3d"
96
96
  }
@@ -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
- margin: 0;
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 {
@@ -30,7 +30,8 @@
30
30
  "width": true
31
31
  }
32
32
  },
33
- "shadow": true
33
+ "shadow": true,
34
+ "layout": true
34
35
  },
35
36
  "attributes": {
36
37
  "openByDefault": {
@@ -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
- attributes: { openByDefault },
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
- const innerBlocksProps = useInnerBlocksProps(
72
- {
73
- ...blockProps,
74
- className: clsx( blockProps.className, {
75
- 'is-open': openByDefault || isSelected,
76
- } ),
77
- },
78
- {
79
- template: [
80
- [ 'core/accordion-header', {} ],
81
- [
82
- 'core/accordion-panel',
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
- templateLock: 'all',
89
- directInsert: true,
90
- templateInsertUpdatesSelection: true,
91
- }
92
- );
82
+ ],
83
+ templateLock: 'all',
84
+ directInsert: true,
85
+ templateInsertUpdatesSelection: true,
86
+ } );
93
87
 
94
88
  return (
95
89
  <>
@@ -47,7 +47,8 @@
47
47
  "fontSize": true
48
48
  }
49
49
  },
50
- "shadow": true
50
+ "shadow": true,
51
+ "layout": true
51
52
  },
52
53
  "attributes": {
53
54
  "allowedBlocks": {
@@ -51,11 +51,7 @@ async function createAndSelectBlock() {
51
51
  name: 'Black',
52
52
  } )
53
53
  );
54
- await userEvent.click(
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 solid;
57
+ border-width: 1px;
58
+ border-style: solid;
58
59
  }
59
60
  }
60
61
 
@@ -1,5 +1,9 @@
1
1
  export const DEFAULT_BLOCK = {
2
2
  name: 'core/navigation-link',
3
+ attributes: {
4
+ kind: 'post-type',
5
+ type: 'page',
6
+ },
3
7
  };
4
8
 
5
9
  export const PRIORITIZED_INSERTER_BLOCKS = [
@@ -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 &&
@@ -146,7 +146,6 @@ export default function LeafMoreMenu( props ) {
146
146
  <AddSubmenuItem
147
147
  block={ block }
148
148
  onClose={ onClose }
149
- expanded
150
149
  expandedState={ props.expandedState }
151
150
  expand={ props.expand }
152
151
  setInsertedBlock={ props.setInsertedBlock }