@wordpress/block-library 9.29.1-next.f34ab90e9.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 (168) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/accordion/edit.js +18 -1
  3. package/build/accordion/edit.js.map +1 -1
  4. package/build/accordion/index.js +0 -3
  5. package/build/accordion/index.js.map +1 -1
  6. package/build/accordion-content/edit.js +8 -8
  7. package/build/accordion-content/edit.js.map +1 -1
  8. package/build/accordion-content/index.js +2 -5
  9. package/build/accordion-content/index.js.map +1 -1
  10. package/build/accordion-header/index.js +0 -4
  11. package/build/accordion-header/index.js.map +1 -1
  12. package/build/accordion-panel/edit.js +5 -30
  13. package/build/accordion-panel/edit.js.map +1 -1
  14. package/build/accordion-panel/index.js +2 -5
  15. package/build/accordion-panel/index.js.map +1 -1
  16. package/build/accordion-panel/save.js +3 -29
  17. package/build/accordion-panel/save.js.map +1 -1
  18. package/build/audio/edit.js +3 -1
  19. package/build/audio/edit.js.map +1 -1
  20. package/build/gallery/index.js +2 -1
  21. package/build/gallery/index.js.map +1 -1
  22. package/build/group/variations.js +0 -12
  23. package/build/group/variations.js.map +1 -1
  24. package/build/image/image.js +1 -1
  25. package/build/image/image.js.map +1 -1
  26. package/build/navigation/constants.js +5 -1
  27. package/build/navigation/constants.js.map +1 -1
  28. package/build/navigation/edit/index.js +45 -1
  29. package/build/navigation/edit/index.js.map +1 -1
  30. package/build/navigation/edit/leaf-more-menu.js +0 -1
  31. package/build/navigation/edit/leaf-more-menu.js.map +1 -1
  32. package/build/navigation/edit/menu-inspector-controls.js +40 -5
  33. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  34. package/build/navigation-link/block-inserter.js +69 -0
  35. package/build/navigation-link/block-inserter.js.map +1 -0
  36. package/build/navigation-link/dialog-wrapper.js +80 -0
  37. package/build/navigation-link/dialog-wrapper.js.map +1 -0
  38. package/build/navigation-link/link-ui.js +80 -116
  39. package/build/navigation-link/link-ui.js.map +1 -1
  40. package/build/navigation-link/page-creator.js +137 -0
  41. package/build/navigation-link/page-creator.js.map +1 -0
  42. package/build/query/edit/index.js.map +1 -1
  43. package/build/query/edit/query-content.js +7 -6
  44. package/build/query/edit/query-content.js.map +1 -1
  45. package/build/query/edit/query-placeholder.js +30 -9
  46. package/build/query/edit/query-placeholder.js.map +1 -1
  47. package/build/query/edit/query-toolbar.js +4 -2
  48. package/build/query/edit/query-toolbar.js.map +1 -1
  49. package/build/search/edit.js +22 -14
  50. package/build/search/edit.js.map +1 -1
  51. package/build/template-part/edit/placeholder.js +2 -1
  52. package/build/template-part/edit/placeholder.js.map +1 -1
  53. package/build/video/edit.js +3 -1
  54. package/build/video/edit.js.map +1 -1
  55. package/build-module/accordion/edit.js +20 -3
  56. package/build-module/accordion/edit.js.map +1 -1
  57. package/build-module/accordion/index.js +0 -3
  58. package/build-module/accordion/index.js.map +1 -1
  59. package/build-module/accordion-content/edit.js +8 -8
  60. package/build-module/accordion-content/edit.js.map +1 -1
  61. package/build-module/accordion-content/index.js +2 -5
  62. package/build-module/accordion-content/index.js.map +1 -1
  63. package/build-module/accordion-header/index.js +0 -4
  64. package/build-module/accordion-header/index.js.map +1 -1
  65. package/build-module/accordion-panel/edit.js +6 -29
  66. package/build-module/accordion-panel/edit.js.map +1 -1
  67. package/build-module/accordion-panel/index.js +2 -5
  68. package/build-module/accordion-panel/index.js.map +1 -1
  69. package/build-module/accordion-panel/save.js +4 -28
  70. package/build-module/accordion-panel/save.js.map +1 -1
  71. package/build-module/audio/edit.js +4 -2
  72. package/build-module/audio/edit.js.map +1 -1
  73. package/build-module/gallery/index.js +2 -1
  74. package/build-module/gallery/index.js.map +1 -1
  75. package/build-module/group/variations.js +0 -12
  76. package/build-module/group/variations.js.map +1 -1
  77. package/build-module/image/image.js +1 -1
  78. package/build-module/image/image.js.map +1 -1
  79. package/build-module/navigation/constants.js +5 -1
  80. package/build-module/navigation/constants.js.map +1 -1
  81. package/build-module/navigation/edit/index.js +50 -4
  82. package/build-module/navigation/edit/index.js.map +1 -1
  83. package/build-module/navigation/edit/leaf-more-menu.js +0 -1
  84. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
  85. package/build-module/navigation/edit/menu-inspector-controls.js +40 -5
  86. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  87. package/build-module/navigation-link/block-inserter.js +61 -0
  88. package/build-module/navigation-link/block-inserter.js.map +1 -0
  89. package/build-module/navigation-link/dialog-wrapper.js +75 -0
  90. package/build-module/navigation-link/dialog-wrapper.js.map +1 -0
  91. package/build-module/navigation-link/link-ui.js +85 -121
  92. package/build-module/navigation-link/link-ui.js.map +1 -1
  93. package/build-module/navigation-link/page-creator.js +130 -0
  94. package/build-module/navigation-link/page-creator.js.map +1 -0
  95. package/build-module/query/edit/index.js.map +1 -1
  96. package/build-module/query/edit/query-content.js +8 -7
  97. package/build-module/query/edit/query-content.js.map +1 -1
  98. package/build-module/query/edit/query-placeholder.js +30 -10
  99. package/build-module/query/edit/query-placeholder.js.map +1 -1
  100. package/build-module/query/edit/query-toolbar.js +4 -2
  101. package/build-module/query/edit/query-toolbar.js.map +1 -1
  102. package/build-module/search/edit.js +22 -14
  103. package/build-module/search/edit.js.map +1 -1
  104. package/build-module/template-part/edit/placeholder.js +2 -1
  105. package/build-module/template-part/edit/placeholder.js.map +1 -1
  106. package/build-module/video/edit.js +4 -2
  107. package/build-module/video/edit.js.map +1 -1
  108. package/build-style/accordion/style-rtl.css +8 -18
  109. package/build-style/accordion/style.css +8 -18
  110. package/build-style/editor-rtl.css +18 -0
  111. package/build-style/editor.css +18 -0
  112. package/build-style/form-input/style-rtl.css +4 -3
  113. package/build-style/form-input/style.css +4 -3
  114. package/build-style/navigation-link/editor-rtl.css +14 -0
  115. package/build-style/navigation-link/editor.css +14 -0
  116. package/build-style/navigation-link/style-rtl.css +1 -1
  117. package/build-style/navigation-link/style.css +1 -1
  118. package/build-style/post-comments-form/style-rtl.css +8 -5
  119. package/build-style/post-comments-form/style.css +8 -5
  120. package/build-style/query/editor-rtl.css +4 -0
  121. package/build-style/query/editor.css +4 -0
  122. package/build-style/search/style-rtl.css +11 -12
  123. package/build-style/search/style.css +11 -12
  124. package/build-style/style-rtl.css +32 -40
  125. package/build-style/style.css +32 -40
  126. package/package.json +35 -35
  127. package/src/accordion/block.json +0 -3
  128. package/src/accordion/edit.js +20 -0
  129. package/src/accordion/style.scss +12 -21
  130. package/src/accordion-content/block.json +2 -4
  131. package/src/accordion-content/edit.js +21 -27
  132. package/src/accordion-content/index.js +0 -1
  133. package/src/accordion-header/block.json +0 -3
  134. package/src/accordion-header/index.js +0 -1
  135. package/src/accordion-panel/block.json +2 -4
  136. package/src/accordion-panel/edit.js +11 -51
  137. package/src/accordion-panel/index.js +0 -1
  138. package/src/accordion-panel/save.js +4 -45
  139. package/src/audio/edit.js +6 -1
  140. package/src/cover/test/edit.js +1 -5
  141. package/src/form-input/style.scss +3 -2
  142. package/src/gallery/block.json +2 -1
  143. package/src/gallery/index.php +1 -1
  144. package/src/gallery/test/helpers.native.js +3 -3
  145. package/src/group/variations.js +0 -12
  146. package/src/image/image.js +2 -1
  147. package/src/navigation/constants.js +4 -0
  148. package/src/navigation/edit/index.js +50 -1
  149. package/src/navigation/edit/leaf-more-menu.js +0 -1
  150. package/src/navigation/edit/menu-inspector-controls.js +40 -5
  151. package/src/navigation-link/block-inserter.js +65 -0
  152. package/src/navigation-link/dialog-wrapper.js +74 -0
  153. package/src/navigation-link/editor.scss +17 -0
  154. package/src/navigation-link/link-ui.js +108 -158
  155. package/src/navigation-link/page-creator.js +157 -0
  156. package/src/navigation-link/style.scss +1 -1
  157. package/src/post-comments-form/style.scss +11 -11
  158. package/src/post-date/index.php +2 -1
  159. package/src/query/edit/index.js +1 -0
  160. package/src/query/edit/query-content.js +8 -4
  161. package/src/query/edit/query-placeholder.js +47 -17
  162. package/src/query/edit/query-toolbar.js +10 -2
  163. package/src/query/editor.scss +6 -1
  164. package/src/search/edit.js +44 -13
  165. package/src/search/index.php +16 -2
  166. package/src/search/style.scss +15 -16
  167. package/src/template-part/edit/placeholder.js +2 -1
  168. package/src/video/edit.js +6 -1
@@ -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
 
@@ -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
 
@@ -186,4 +186,8 @@
186
186
  }
187
187
  .block-editor-block-settings-menu__popover .block-editor-block-patterns-list__list-item {
188
188
  margin-bottom: 0;
189
+ }
190
+
191
+ .wp-block-query > .block-editor-media-placeholder.is-small {
192
+ min-height: 60px;
189
193
  }
@@ -186,4 +186,8 @@
186
186
  }
187
187
  .block-editor-block-settings-menu__popover .block-editor-block-patterns-list__list-item {
188
188
  margin-bottom: 0;
189
+ }
190
+
191
+ .wp-block-query > .block-editor-media-placeholder.is-small {
192
+ min-height: 60px;
189
193
  }
@@ -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
  }
@@ -143,10 +143,8 @@
143
143
  .wp-block-accordion-content.is-open {
144
144
  grid-template-rows: max-content 1fr;
145
145
  }
146
-
147
- .accordion-content__heading {
148
- margin-block-start: 0;
149
- margin-block-end: 0;
146
+ .wp-block-accordion-content.is-open > .wp-block-accordion-header .accordion-content__toggle-icon.has-icon-plus {
147
+ transform: rotate(-45deg);
150
148
  }
151
149
 
152
150
  .accordion-content__toggle {
@@ -164,6 +162,7 @@
164
162
  padding: var(--wp--preset--spacing--20, 1em) 0;
165
163
  cursor: pointer;
166
164
  outline: none;
165
+ overflow: hidden;
167
166
  display: flex;
168
167
  align-items: center;
169
168
  text-align: inherit;
@@ -178,7 +177,11 @@
178
177
  .is-layout-flow > .wp-block-accordion-panel,
179
178
  .wp-block-accordion-panel {
180
179
  overflow: hidden;
181
- margin: 0;
180
+ }
181
+
182
+ .wp-block-accordion-panel[inert],
183
+ .wp-block-accordion-panel[aria-hidden=true] {
184
+ margin-block-start: 0;
182
185
  }
183
186
 
184
187
  .accordion-panel__wrapper {
@@ -195,16 +198,6 @@
195
198
  flex-direction: row-reverse;
196
199
  }
197
200
 
198
- /* RTL language support */
199
- [dir=rtl] .wp-block-accordion-header:not(.icon-position-left) .accordion-content__toggle {
200
- /* stylelint-disable-next-line declaration-property-value-allowed-list -- Automatically adjust icon position for RTL languages. */
201
- flex-direction: row-reverse;
202
- }
203
-
204
- [dir=rtl] .wp-block-accordion-header.icon-position-left .accordion-content__toggle {
205
- flex-direction: row;
206
- }
207
-
208
201
  .accordion-content__toggle:focus-visible {
209
202
  outline: 2px solid -webkit-focus-ring-color;
210
203
  outline-offset: 2px;
@@ -219,10 +212,6 @@
219
212
  transition: grid-template-rows 0.3s ease-out;
220
213
  }
221
214
  }
222
- .is-open .accordion-content__toggle-icon.has-icon-plus {
223
- transform: rotate(-45deg);
224
- }
225
-
226
215
  .wp-block-archives {
227
216
  box-sizing: border-box;
228
217
  }
@@ -1306,15 +1295,16 @@ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-blo
1306
1295
  width: fit-content;
1307
1296
  }
1308
1297
 
1309
- .wp-block-form-input__input {
1298
+ :where(.wp-block-form-input__input) {
1310
1299
  padding: 0 0.5em;
1311
1300
  font-size: 1em;
1312
1301
  margin-bottom: 0.5em;
1313
1302
  }
1314
- .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] {
1315
1304
  min-height: 2em;
1316
1305
  line-height: 2;
1317
- border: 1px solid;
1306
+ border-width: 1px;
1307
+ border-style: solid;
1318
1308
  }
1319
1309
 
1320
1310
  textarea.wp-block-form-input__input {
@@ -2880,7 +2870,7 @@ html.has-modal-open {
2880
2870
  }
2881
2871
 
2882
2872
  .link-ui-tools {
2883
- border-top: 1px solid #f0f0f0;
2873
+ outline: 1px solid #f0f0f0;
2884
2874
  padding: 8px;
2885
2875
  }
2886
2876
 
@@ -2987,14 +2977,17 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
2987
2977
  box-sizing: border-box;
2988
2978
  }
2989
2979
 
2990
- :where(.wp-block-post-comments-form) textarea,
2991
- :where(.wp-block-post-comments-form) input:not([type=submit]) {
2992
- 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;
2993
2985
  font-size: 1em;
2994
2986
  font-family: inherit;
2995
2987
  }
2996
- :where(.wp-block-post-comments-form) textarea,
2997
- :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]))) {
2998
2991
  padding: calc(0.667em + 2px);
2999
2992
  }
3000
2993
 
@@ -3483,17 +3476,6 @@ ul.wp-block-rss.is-grid li {
3483
3476
  width: 100%;
3484
3477
  }
3485
3478
 
3486
- .wp-block-search__input {
3487
- padding: 8px;
3488
- flex-grow: 1;
3489
- margin-right: 0;
3490
- margin-left: 0;
3491
- min-width: 3rem;
3492
- border: 1px solid #949494;
3493
- text-decoration: unset !important;
3494
- appearance: initial;
3495
- }
3496
-
3497
3479
  .wp-block-search.wp-block-search__button-only .wp-block-search__button {
3498
3480
  margin-right: 0;
3499
3481
  flex-shrink: 0;
@@ -3536,11 +3518,21 @@ ul.wp-block-rss.is-grid li {
3536
3518
  letter-spacing: inherit;
3537
3519
  text-transform: inherit;
3538
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;
3539
3529
  }
3540
3530
 
3541
3531
  :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
3542
3532
  padding: 4px;
3543
- border: 1px solid #949494;
3533
+ border-width: 1px;
3534
+ border-style: solid;
3535
+ border-color: #949494;
3544
3536
  background-color: #fff;
3545
3537
  box-sizing: border-box;
3546
3538
  }
@@ -143,10 +143,8 @@
143
143
  .wp-block-accordion-content.is-open {
144
144
  grid-template-rows: max-content 1fr;
145
145
  }
146
-
147
- .accordion-content__heading {
148
- margin-block-start: 0;
149
- margin-block-end: 0;
146
+ .wp-block-accordion-content.is-open > .wp-block-accordion-header .accordion-content__toggle-icon.has-icon-plus {
147
+ transform: rotate(45deg);
150
148
  }
151
149
 
152
150
  .accordion-content__toggle {
@@ -164,6 +162,7 @@
164
162
  padding: var(--wp--preset--spacing--20, 1em) 0;
165
163
  cursor: pointer;
166
164
  outline: none;
165
+ overflow: hidden;
167
166
  display: flex;
168
167
  align-items: center;
169
168
  text-align: inherit;
@@ -178,7 +177,11 @@
178
177
  .is-layout-flow > .wp-block-accordion-panel,
179
178
  .wp-block-accordion-panel {
180
179
  overflow: hidden;
181
- margin: 0;
180
+ }
181
+
182
+ .wp-block-accordion-panel[inert],
183
+ .wp-block-accordion-panel[aria-hidden=true] {
184
+ margin-block-start: 0;
182
185
  }
183
186
 
184
187
  .accordion-panel__wrapper {
@@ -195,16 +198,6 @@
195
198
  flex-direction: row-reverse;
196
199
  }
197
200
 
198
- /* RTL language support */
199
- [dir=rtl] .wp-block-accordion-header:not(.icon-position-left) .accordion-content__toggle {
200
- /* stylelint-disable-next-line declaration-property-value-allowed-list -- Automatically adjust icon position for RTL languages. */
201
- flex-direction: row-reverse;
202
- }
203
-
204
- [dir=rtl] .wp-block-accordion-header.icon-position-left .accordion-content__toggle {
205
- flex-direction: row;
206
- }
207
-
208
201
  .accordion-content__toggle:focus-visible {
209
202
  outline: 2px solid -webkit-focus-ring-color;
210
203
  outline-offset: 2px;
@@ -219,10 +212,6 @@
219
212
  transition: grid-template-rows 0.3s ease-out;
220
213
  }
221
214
  }
222
- .is-open .accordion-content__toggle-icon.has-icon-plus {
223
- transform: rotate(45deg);
224
- }
225
-
226
215
  .wp-block-archives {
227
216
  box-sizing: border-box;
228
217
  }
@@ -1314,15 +1303,16 @@ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-blo
1314
1303
  width: fit-content;
1315
1304
  }
1316
1305
 
1317
- .wp-block-form-input__input {
1306
+ :where(.wp-block-form-input__input) {
1318
1307
  padding: 0 0.5em;
1319
1308
  font-size: 1em;
1320
1309
  margin-bottom: 0.5em;
1321
1310
  }
1322
- .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] {
1323
1312
  min-height: 2em;
1324
1313
  line-height: 2;
1325
- border: 1px solid;
1314
+ border-width: 1px;
1315
+ border-style: solid;
1326
1316
  }
1327
1317
 
1328
1318
  textarea.wp-block-form-input__input {
@@ -2910,7 +2900,7 @@ html.has-modal-open {
2910
2900
  }
2911
2901
 
2912
2902
  .link-ui-tools {
2913
- border-top: 1px solid #f0f0f0;
2903
+ outline: 1px solid #f0f0f0;
2914
2904
  padding: 8px;
2915
2905
  }
2916
2906
 
@@ -3017,14 +3007,17 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"] {
3017
3007
  box-sizing: border-box;
3018
3008
  }
3019
3009
 
3020
- :where(.wp-block-post-comments-form) textarea,
3021
- :where(.wp-block-post-comments-form) input:not([type=submit]) {
3022
- 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;
3023
3015
  font-size: 1em;
3024
3016
  font-family: inherit;
3025
3017
  }
3026
- :where(.wp-block-post-comments-form) textarea,
3027
- :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]))) {
3028
3021
  padding: calc(0.667em + 2px);
3029
3022
  }
3030
3023
 
@@ -3515,17 +3508,6 @@ ul.wp-block-rss.is-grid li {
3515
3508
  width: 100%;
3516
3509
  }
3517
3510
 
3518
- .wp-block-search__input {
3519
- padding: 8px;
3520
- flex-grow: 1;
3521
- margin-left: 0;
3522
- margin-right: 0;
3523
- min-width: 3rem;
3524
- border: 1px solid #949494;
3525
- text-decoration: unset !important;
3526
- appearance: initial;
3527
- }
3528
-
3529
3511
  .wp-block-search.wp-block-search__button-only .wp-block-search__button {
3530
3512
  margin-left: 0;
3531
3513
  flex-shrink: 0;
@@ -3568,11 +3550,21 @@ ul.wp-block-rss.is-grid li {
3568
3550
  letter-spacing: inherit;
3569
3551
  text-transform: inherit;
3570
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;
3571
3561
  }
3572
3562
 
3573
3563
  :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
3574
3564
  padding: 4px;
3575
- border: 1px solid #949494;
3565
+ border-width: 1px;
3566
+ border-style: solid;
3567
+ border-color: #949494;
3576
3568
  background-color: #fff;
3577
3569
  box-sizing: border-box;
3578
3570
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.29.1-next.f34ab90e9.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.29.1-next.f34ab90e9.0",
46
- "@wordpress/api-fetch": "^7.29.1-next.f34ab90e9.0",
47
- "@wordpress/autop": "^4.29.1-next.f34ab90e9.0",
48
- "@wordpress/blob": "^4.29.1-next.f34ab90e9.0",
49
- "@wordpress/block-editor": "^15.2.1-next.f34ab90e9.0",
50
- "@wordpress/blocks": "^15.2.1-next.f34ab90e9.0",
51
- "@wordpress/components": "^30.2.1-next.f34ab90e9.0",
52
- "@wordpress/compose": "^7.29.1-next.f34ab90e9.0",
53
- "@wordpress/core-data": "^7.29.1-next.f34ab90e9.0",
54
- "@wordpress/data": "^10.29.1-next.f34ab90e9.0",
55
- "@wordpress/date": "^5.29.1-next.f34ab90e9.0",
56
- "@wordpress/deprecated": "^4.29.1-next.f34ab90e9.0",
57
- "@wordpress/dom": "^4.29.1-next.f34ab90e9.0",
58
- "@wordpress/element": "^6.29.1-next.f34ab90e9.0",
59
- "@wordpress/escape-html": "^3.29.1-next.f34ab90e9.0",
60
- "@wordpress/hooks": "^4.29.1-next.f34ab90e9.0",
61
- "@wordpress/html-entities": "^4.29.1-next.f34ab90e9.0",
62
- "@wordpress/i18n": "^6.2.1-next.f34ab90e9.0",
63
- "@wordpress/icons": "^10.29.1-next.f34ab90e9.0",
64
- "@wordpress/interactivity": "^6.29.1-next.f34ab90e9.0",
65
- "@wordpress/interactivity-router": "^2.29.1-next.f34ab90e9.0",
66
- "@wordpress/keyboard-shortcuts": "^5.29.1-next.f34ab90e9.0",
67
- "@wordpress/keycodes": "^4.29.1-next.f34ab90e9.0",
68
- "@wordpress/notices": "^5.29.1-next.f34ab90e9.0",
69
- "@wordpress/patterns": "^2.29.1-next.f34ab90e9.0",
70
- "@wordpress/primitives": "^4.29.1-next.f34ab90e9.0",
71
- "@wordpress/private-apis": "^1.29.1-next.f34ab90e9.0",
72
- "@wordpress/reusable-blocks": "^5.29.1-next.f34ab90e9.0",
73
- "@wordpress/rich-text": "^7.29.1-next.f34ab90e9.0",
74
- "@wordpress/server-side-render": "^6.5.1-next.f34ab90e9.0",
75
- "@wordpress/url": "^4.29.1-next.f34ab90e9.0",
76
- "@wordpress/viewport": "^6.29.1-next.f34ab90e9.0",
77
- "@wordpress/wordcount": "^4.29.1-next.f34ab90e9.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": "91f58004986ec6faf118825f925ac7873d171986"
95
+ "gitHead": "c8637da9df499cd7b6b07c9fad918f6d45f4de3d"
96
96
  }
@@ -54,9 +54,6 @@
54
54
  "autoclose": {
55
55
  "type": "boolean",
56
56
  "default": false
57
- },
58
- "allowedBlocks": {
59
- "type": "array"
60
57
  }
61
58
  },
62
59
  "providesContext": {
@@ -5,6 +5,8 @@ import {
5
5
  useBlockProps,
6
6
  useInnerBlocksProps,
7
7
  InspectorControls,
8
+ BlockControls,
9
+ store as blockEditorStore,
8
10
  } from '@wordpress/block-editor';
9
11
  import { __ } from '@wordpress/i18n';
10
12
  import {
@@ -13,7 +15,10 @@ import {
13
15
  __experimentalToggleGroupControlOption as ToggleGroupControlOption,
14
16
  __experimentalToolsPanel as ToolsPanel,
15
17
  __experimentalToolsPanelItem as ToolsPanelItem,
18
+ ToolbarButton,
16
19
  } from '@wordpress/components';
20
+ import { useDispatch } from '@wordpress/data';
21
+ import { createBlock } from '@wordpress/blocks';
17
22
 
18
23
  /**
19
24
  * Internal dependencies
@@ -27,10 +32,12 @@ const ACCORDION_BLOCK = {
27
32
 
28
33
  export default function Edit( {
29
34
  attributes: { autoclose, iconPosition, showIcon },
35
+ clientId,
30
36
  setAttributes,
31
37
  } ) {
32
38
  const blockProps = useBlockProps();
33
39
  const dropdownMenuProps = useToolsPanelDropdownMenuProps();
40
+ const { insertBlock } = useDispatch( blockEditorStore );
34
41
 
35
42
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
36
43
  template: [ [ ACCORDION_BLOCK_NAME ], [ ACCORDION_BLOCK_NAME ] ],
@@ -39,8 +46,21 @@ export default function Edit( {
39
46
  templateInsertUpdatesSelection: true,
40
47
  } );
41
48
 
49
+ const addAccordionContentBlock = () => {
50
+ const newAccordionContent = createBlock( ACCORDION_BLOCK_NAME );
51
+ insertBlock( newAccordionContent, undefined, clientId );
52
+ };
53
+
42
54
  return (
43
55
  <>
56
+ <BlockControls group="other">
57
+ <ToolbarButton
58
+ label={ __( 'Add accordion content block' ) }
59
+ onClick={ addAccordionContentBlock }
60
+ >
61
+ { __( 'Add' ) }
62
+ </ToolbarButton>
63
+ </BlockControls>
44
64
  <InspectorControls key="setting">
45
65
  <ToolsPanel
46
66
  label={ __( 'Settings' ) }
@@ -5,11 +5,12 @@
5
5
 
6
6
  .wp-block-accordion-content.is-open {
7
7
  grid-template-rows: max-content 1fr;
8
- }
9
8
 
10
- .accordion-content__heading {
11
- margin-block-start: 0;
12
- margin-block-end: 0;
9
+ > .wp-block-accordion-header {
10
+ .accordion-content__toggle-icon.has-icon-plus {
11
+ transform: rotate(45deg);
12
+ }
13
+ }
13
14
  }
14
15
 
15
16
  .accordion-content__toggle {
@@ -27,6 +28,7 @@
27
28
  padding: var(--wp--preset--spacing--20, 1em) 0;
28
29
  cursor: pointer;
29
30
  outline: none;
31
+ overflow: hidden;
30
32
  display: flex;
31
33
  align-items: center;
32
34
  text-align: inherit;
@@ -41,7 +43,12 @@
41
43
  .is-layout-flow > .wp-block-accordion-panel,
42
44
  .wp-block-accordion-panel {
43
45
  overflow: hidden;
44
- 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;
45
52
  }
46
53
 
47
54
  .accordion-panel__wrapper {
@@ -58,16 +65,6 @@
58
65
  flex-direction: row-reverse;
59
66
  }
60
67
 
61
- /* RTL language support */
62
- [dir="rtl"] .wp-block-accordion-header:not(.icon-position-left) .accordion-content__toggle {
63
- /* stylelint-disable-next-line declaration-property-value-allowed-list -- Automatically adjust icon position for RTL languages. */
64
- flex-direction: row-reverse;
65
- }
66
-
67
- [dir="rtl"] .wp-block-accordion-header.icon-position-left .accordion-content__toggle {
68
- flex-direction: row;
69
- }
70
-
71
68
  .accordion-content__toggle:focus-visible {
72
69
  outline: 2px solid -webkit-focus-ring-color;
73
70
  outline-offset: 2px;
@@ -83,9 +80,3 @@
83
80
  transition: grid-template-rows 0.3s ease-out;
84
81
  }
85
82
  }
86
-
87
- .is-open {
88
- .accordion-content__toggle-icon.has-icon-plus {
89
- transform: rotate(45deg);
90
- }
91
- }