@wordpress/block-library 9.35.1-next.dc3f6d3c1.0 → 9.36.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 (262) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/accordion/view.js +46 -4
  3. package/build/accordion/view.js.map +2 -2
  4. package/build/accordion-heading/block.json +1 -1
  5. package/build/accordion-heading/deprecated.js +1 -1
  6. package/build/accordion-heading/deprecated.js.map +2 -2
  7. package/build/accordion-panel/block.json +1 -1
  8. package/build/audio/index.js +12 -9
  9. package/build/audio/index.js.map +3 -3
  10. package/build/button/index.js +13 -10
  11. package/build/button/index.js.map +3 -3
  12. package/build/code/index.js +9 -6
  13. package/build/code/index.js.map +3 -3
  14. package/build/cover/edit/block-controls.js +37 -3
  15. package/build/cover/edit/block-controls.js.map +3 -3
  16. package/build/cover/edit/cover-placeholder.js +0 -1
  17. package/build/cover/edit/cover-placeholder.js.map +2 -2
  18. package/build/cover/edit/embed-video-url-input.js +83 -0
  19. package/build/cover/edit/embed-video-url-input.js.map +7 -0
  20. package/build/cover/edit/index.js +60 -0
  21. package/build/cover/edit/index.js.map +2 -2
  22. package/build/cover/embed-video-utils.js +151 -0
  23. package/build/cover/embed-video-utils.js.map +7 -0
  24. package/build/cover/index.js +10 -4
  25. package/build/cover/index.js.map +3 -3
  26. package/build/cover/save.js +12 -0
  27. package/build/cover/save.js.map +2 -2
  28. package/build/cover/shared.js +3 -0
  29. package/build/cover/shared.js.map +2 -2
  30. package/build/details/index.js +9 -6
  31. package/build/details/index.js.map +3 -3
  32. package/build/file/index.js +14 -14
  33. package/build/file/index.js.map +3 -3
  34. package/build/freeform/block.json +1 -1
  35. package/build/gallery/edit.js +0 -2
  36. package/build/gallery/edit.js.map +2 -2
  37. package/build/heading/index.js +9 -6
  38. package/build/heading/index.js.map +3 -3
  39. package/build/html/modal.js +127 -118
  40. package/build/html/modal.js.map +3 -3
  41. package/build/image/edit.js +0 -1
  42. package/build/image/edit.js.map +2 -2
  43. package/build/image/image.js +0 -1
  44. package/build/image/image.js.map +2 -2
  45. package/build/image/index.js +18 -18
  46. package/build/image/index.js.map +3 -3
  47. package/build/list-item/index.js +8 -6
  48. package/build/list-item/index.js.map +3 -3
  49. package/build/math/block.json +28 -1
  50. package/build/math/edit.js +4 -1
  51. package/build/math/edit.js.map +2 -2
  52. package/build/media-text/index.js +15 -8
  53. package/build/media-text/index.js.map +3 -3
  54. package/build/media-text/media-container.js +0 -2
  55. package/build/media-text/media-container.js.map +2 -2
  56. package/build/missing/block.json +1 -1
  57. package/build/missing/edit.js +2 -2
  58. package/build/missing/edit.js.map +1 -1
  59. package/build/more/index.js +9 -6
  60. package/build/more/index.js.map +3 -3
  61. package/build/navigation-link/edit.js +36 -11
  62. package/build/navigation-link/edit.js.map +2 -2
  63. package/build/navigation-link/index.js +11 -8
  64. package/build/navigation-link/index.js.map +3 -3
  65. package/build/navigation-submenu/index.js +11 -8
  66. package/build/navigation-submenu/index.js.map +3 -3
  67. package/build/paragraph/deprecated-attributes.js +68 -0
  68. package/build/paragraph/deprecated-attributes.js.map +7 -0
  69. package/build/paragraph/edit.js +2 -0
  70. package/build/paragraph/edit.js.map +3 -3
  71. package/build/paragraph/index.js +9 -6
  72. package/build/paragraph/index.js.map +3 -3
  73. package/build/pattern/block.json +1 -1
  74. package/build/preformatted/index.js +9 -6
  75. package/build/preformatted/index.js.map +3 -3
  76. package/build/pullquote/index.js +11 -11
  77. package/build/pullquote/index.js.map +3 -3
  78. package/build/search/index.js +14 -16
  79. package/build/search/index.js.map +3 -3
  80. package/build/social-link/index.js +11 -8
  81. package/build/social-link/index.js.map +3 -3
  82. package/build/template-part/edit/index.js +37 -7
  83. package/build/template-part/edit/index.js.map +2 -2
  84. package/build/template-part/edit/utils/hooks.js +2 -3
  85. package/build/template-part/edit/utils/hooks.js.map +2 -2
  86. package/build/term-count/index.js +1 -0
  87. package/build/term-count/index.js.map +2 -2
  88. package/build/term-name/index.js +1 -0
  89. package/build/term-name/index.js.map +2 -2
  90. package/build/verse/index.js +9 -6
  91. package/build/verse/index.js.map +3 -3
  92. package/build/video/index.js +12 -9
  93. package/build/video/index.js.map +3 -3
  94. package/build-module/accordion/view.js +46 -4
  95. package/build-module/accordion/view.js.map +2 -2
  96. package/build-module/accordion-heading/block.json +1 -1
  97. package/build-module/accordion-heading/deprecated.js +1 -1
  98. package/build-module/accordion-heading/deprecated.js.map +2 -2
  99. package/build-module/accordion-panel/block.json +1 -1
  100. package/build-module/audio/index.js +12 -9
  101. package/build-module/audio/index.js.map +2 -2
  102. package/build-module/button/index.js +13 -10
  103. package/build-module/button/index.js.map +2 -2
  104. package/build-module/code/index.js +9 -6
  105. package/build-module/code/index.js.map +2 -2
  106. package/build-module/cover/edit/block-controls.js +27 -3
  107. package/build-module/cover/edit/block-controls.js.map +2 -2
  108. package/build-module/cover/edit/cover-placeholder.js +0 -1
  109. package/build-module/cover/edit/cover-placeholder.js.map +2 -2
  110. package/build-module/cover/edit/embed-video-url-input.js +67 -0
  111. package/build-module/cover/edit/embed-video-url-input.js.map +7 -0
  112. package/build-module/cover/edit/index.js +61 -0
  113. package/build-module/cover/edit/index.js.map +2 -2
  114. package/build-module/cover/embed-video-utils.js +122 -0
  115. package/build-module/cover/embed-video-utils.js.map +7 -0
  116. package/build-module/cover/index.js +10 -4
  117. package/build-module/cover/index.js.map +2 -2
  118. package/build-module/cover/save.js +13 -0
  119. package/build-module/cover/save.js.map +2 -2
  120. package/build-module/cover/shared.js +2 -0
  121. package/build-module/cover/shared.js.map +2 -2
  122. package/build-module/details/index.js +9 -6
  123. package/build-module/details/index.js.map +2 -2
  124. package/build-module/file/index.js +14 -14
  125. package/build-module/file/index.js.map +2 -2
  126. package/build-module/freeform/block.json +1 -1
  127. package/build-module/gallery/edit.js +0 -2
  128. package/build-module/gallery/edit.js.map +2 -2
  129. package/build-module/heading/index.js +9 -6
  130. package/build-module/heading/index.js.map +2 -2
  131. package/build-module/html/modal.js +128 -119
  132. package/build-module/html/modal.js.map +2 -2
  133. package/build-module/image/edit.js +0 -1
  134. package/build-module/image/edit.js.map +2 -2
  135. package/build-module/image/image.js +0 -1
  136. package/build-module/image/image.js.map +2 -2
  137. package/build-module/image/index.js +18 -18
  138. package/build-module/image/index.js.map +2 -2
  139. package/build-module/list-item/index.js +8 -6
  140. package/build-module/list-item/index.js.map +2 -2
  141. package/build-module/math/block.json +28 -1
  142. package/build-module/math/edit.js +4 -1
  143. package/build-module/math/edit.js.map +2 -2
  144. package/build-module/media-text/index.js +15 -8
  145. package/build-module/media-text/index.js.map +2 -2
  146. package/build-module/media-text/media-container.js +0 -2
  147. package/build-module/media-text/media-container.js.map +2 -2
  148. package/build-module/missing/block.json +1 -1
  149. package/build-module/missing/edit.js +2 -2
  150. package/build-module/missing/edit.js.map +1 -1
  151. package/build-module/more/index.js +9 -6
  152. package/build-module/more/index.js.map +2 -2
  153. package/build-module/navigation-link/edit.js +37 -12
  154. package/build-module/navigation-link/edit.js.map +2 -2
  155. package/build-module/navigation-link/index.js +11 -8
  156. package/build-module/navigation-link/index.js.map +2 -2
  157. package/build-module/navigation-submenu/index.js +11 -8
  158. package/build-module/navigation-submenu/index.js.map +2 -2
  159. package/build-module/paragraph/deprecated-attributes.js +37 -0
  160. package/build-module/paragraph/deprecated-attributes.js.map +7 -0
  161. package/build-module/paragraph/edit.js +2 -0
  162. package/build-module/paragraph/edit.js.map +2 -2
  163. package/build-module/paragraph/index.js +9 -6
  164. package/build-module/paragraph/index.js.map +2 -2
  165. package/build-module/pattern/block.json +1 -1
  166. package/build-module/preformatted/index.js +9 -6
  167. package/build-module/preformatted/index.js.map +2 -2
  168. package/build-module/pullquote/index.js +11 -11
  169. package/build-module/pullquote/index.js.map +2 -2
  170. package/build-module/search/index.js +14 -16
  171. package/build-module/search/index.js.map +2 -2
  172. package/build-module/social-link/index.js +11 -8
  173. package/build-module/social-link/index.js.map +2 -2
  174. package/build-module/template-part/edit/index.js +37 -7
  175. package/build-module/template-part/edit/index.js.map +2 -2
  176. package/build-module/template-part/edit/utils/hooks.js +2 -3
  177. package/build-module/template-part/edit/utils/hooks.js.map +2 -2
  178. package/build-module/term-count/index.js +1 -0
  179. package/build-module/term-count/index.js.map +2 -2
  180. package/build-module/term-name/index.js +1 -0
  181. package/build-module/term-name/index.js.map +2 -2
  182. package/build-module/verse/index.js +9 -6
  183. package/build-module/verse/index.js.map +2 -2
  184. package/build-module/video/index.js +12 -9
  185. package/build-module/video/index.js.map +2 -2
  186. package/build-style/accordion/style-rtl.css +3 -0
  187. package/build-style/accordion/style.css +3 -0
  188. package/build-style/accordion-heading/style-rtl.css +1 -2
  189. package/build-style/accordion-heading/style.css +1 -2
  190. package/build-style/accordion-item/style-rtl.css +0 -7
  191. package/build-style/accordion-item/style.css +0 -7
  192. package/build-style/accordion-panel/style-rtl.css +1 -4
  193. package/build-style/accordion-panel/style.css +1 -4
  194. package/build-style/cover/style-rtl.css +47 -0
  195. package/build-style/cover/style.css +47 -0
  196. package/build-style/editor-rtl.css +11 -13
  197. package/build-style/editor.css +11 -13
  198. package/build-style/html/editor-rtl.css +11 -13
  199. package/build-style/html/editor.css +11 -13
  200. package/build-style/style-rtl.css +52 -12
  201. package/build-style/style.css +52 -12
  202. package/package.json +37 -37
  203. package/src/accordion/style.scss +4 -0
  204. package/src/accordion/view.js +60 -3
  205. package/src/accordion-heading/block.json +1 -1
  206. package/src/accordion-heading/deprecated.js +1 -1
  207. package/src/accordion-heading/style.scss +1 -9
  208. package/src/accordion-item/index.php +1 -0
  209. package/src/accordion-item/style.scss +2 -9
  210. package/src/accordion-panel/block.json +1 -1
  211. package/src/accordion-panel/style.scss +1 -5
  212. package/src/audio/index.js +13 -9
  213. package/src/breadcrumbs/index.php +71 -82
  214. package/src/button/index.js +14 -10
  215. package/src/code/index.js +10 -6
  216. package/src/cover/edit/block-controls.js +26 -2
  217. package/src/cover/edit/cover-placeholder.js +0 -1
  218. package/src/cover/edit/embed-video-url-input.js +74 -0
  219. package/src/cover/edit/index.js +81 -0
  220. package/src/cover/embed-video-utils.js +196 -0
  221. package/src/cover/index.js +11 -4
  222. package/src/cover/index.php +106 -0
  223. package/src/cover/save.js +14 -0
  224. package/src/cover/shared.js +1 -0
  225. package/src/cover/style.scss +47 -0
  226. package/src/details/index.js +10 -6
  227. package/src/file/index.js +15 -14
  228. package/src/freeform/block.json +1 -1
  229. package/src/gallery/edit.js +0 -2
  230. package/src/heading/index.js +10 -6
  231. package/src/html/editor.scss +10 -15
  232. package/src/html/modal.js +15 -10
  233. package/src/image/edit.js +0 -1
  234. package/src/image/image.js +0 -1
  235. package/src/image/index.js +19 -18
  236. package/src/image/index.php +1 -0
  237. package/src/list-item/index.js +9 -6
  238. package/src/math/block.json +28 -1
  239. package/src/math/edit.js +4 -1
  240. package/src/media-text/index.js +16 -8
  241. package/src/media-text/media-container.js +0 -2
  242. package/src/missing/block.json +1 -1
  243. package/src/missing/edit.js +2 -2
  244. package/src/more/index.js +10 -6
  245. package/src/navigation-link/edit.js +72 -26
  246. package/src/navigation-link/index.js +12 -8
  247. package/src/navigation-submenu/index.js +12 -8
  248. package/src/paragraph/deprecated-attributes.js +45 -0
  249. package/src/paragraph/edit.js +2 -0
  250. package/src/paragraph/index.js +10 -6
  251. package/src/pattern/block.json +1 -1
  252. package/src/preformatted/index.js +10 -6
  253. package/src/pullquote/index.js +12 -11
  254. package/src/search/index.js +14 -15
  255. package/src/social-link/index.js +12 -8
  256. package/src/style.scss +1 -0
  257. package/src/template-part/edit/index.js +44 -6
  258. package/src/template-part/edit/utils/hooks.js +2 -4
  259. package/src/term-count/index.js +1 -0
  260. package/src/term-name/index.js +1 -0
  261. package/src/verse/index.js +10 -6
  262. package/src/video/index.js +13 -9
@@ -1,7 +1,4 @@
1
- .wp-block-accordion-panel.wp-block-accordion-panel {
2
- min-width: 100%;
3
- }
4
- .wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
1
+ .wp-block-accordion-panel[inert], .wp-block-accordion-panel[aria-hidden=true] {
5
2
  display: none;
6
3
  margin-block-start: 0;
7
4
  }
@@ -337,6 +337,50 @@
337
337
  border: none;
338
338
  box-shadow: none;
339
339
  }
340
+ .wp-block-cover-image .wp-block-cover__embed-background,
341
+ .wp-block-cover .wp-block-cover__embed-background {
342
+ position: absolute;
343
+ top: 0;
344
+ right: 0;
345
+ left: 0;
346
+ bottom: 0;
347
+ margin: 0;
348
+ padding: 0;
349
+ width: 100%;
350
+ height: 100%;
351
+ max-width: none;
352
+ max-height: none;
353
+ outline: none;
354
+ border: none;
355
+ box-shadow: none;
356
+ pointer-events: none;
357
+ }
358
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper,
359
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper {
360
+ position: absolute;
361
+ top: 0;
362
+ right: 0;
363
+ left: 0;
364
+ bottom: 0;
365
+ margin: 0;
366
+ padding: 0;
367
+ width: 100%;
368
+ height: 100%;
369
+ }
370
+ .wp-block-cover-image .wp-block-cover__embed-background iframe,
371
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper iframe,
372
+ .wp-block-cover .wp-block-cover__embed-background iframe,
373
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper iframe {
374
+ position: absolute;
375
+ top: 50%;
376
+ right: 50%;
377
+ width: 100vw;
378
+ height: 100vh;
379
+ min-width: 100%;
380
+ min-height: 100%;
381
+ transform: translate(50%, -50%);
382
+ pointer-events: none;
383
+ }
340
384
 
341
385
  .wp-block-cover-image.has-parallax,
342
386
  .wp-block-cover.has-parallax,
@@ -446,6 +490,9 @@ section.wp-block-cover-image > h2,
446
490
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__video-background {
447
491
  z-index: 0;
448
492
  }
493
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__embed-background {
494
+ z-index: 0;
495
+ }
449
496
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__image-background {
450
497
  z-index: 0;
451
498
  }
@@ -339,6 +339,50 @@
339
339
  border: none;
340
340
  box-shadow: none;
341
341
  }
342
+ .wp-block-cover-image .wp-block-cover__embed-background,
343
+ .wp-block-cover .wp-block-cover__embed-background {
344
+ position: absolute;
345
+ top: 0;
346
+ left: 0;
347
+ right: 0;
348
+ bottom: 0;
349
+ margin: 0;
350
+ padding: 0;
351
+ width: 100%;
352
+ height: 100%;
353
+ max-width: none;
354
+ max-height: none;
355
+ outline: none;
356
+ border: none;
357
+ box-shadow: none;
358
+ pointer-events: none;
359
+ }
360
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper,
361
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper {
362
+ position: absolute;
363
+ top: 0;
364
+ left: 0;
365
+ right: 0;
366
+ bottom: 0;
367
+ margin: 0;
368
+ padding: 0;
369
+ width: 100%;
370
+ height: 100%;
371
+ }
372
+ .wp-block-cover-image .wp-block-cover__embed-background iframe,
373
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper iframe,
374
+ .wp-block-cover .wp-block-cover__embed-background iframe,
375
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper iframe {
376
+ position: absolute;
377
+ top: 50%;
378
+ left: 50%;
379
+ width: 100vw;
380
+ height: 100vh;
381
+ min-width: 100%;
382
+ min-height: 100%;
383
+ transform: translate(-50%, -50%);
384
+ pointer-events: none;
385
+ }
342
386
 
343
387
  .wp-block-cover-image.has-parallax,
344
388
  .wp-block-cover.has-parallax,
@@ -448,6 +492,9 @@ section.wp-block-cover-image > h2,
448
492
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__video-background {
449
493
  z-index: 0;
450
494
  }
495
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__embed-background {
496
+ z-index: 0;
497
+ }
451
498
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__image-background {
452
499
  z-index: 0;
453
500
  }
@@ -1113,19 +1113,20 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
1113
1113
  right: 0;
1114
1114
  }
1115
1115
 
1116
- .block-library-html__modal .components-modal__content {
1117
- display: flex;
1118
- flex-direction: column;
1119
- padding: 0;
1120
- min-height: 70vh;
1116
+ .block-library-html__modal {
1117
+ height: 100%;
1121
1118
  }
1122
1119
  .block-library-html__modal .components-modal__children-container {
1123
1120
  height: 100%;
1124
- padding: 16px;
1125
1121
  }
1126
1122
 
1127
1123
  .block-library-html__modal-tabs {
1128
- height: 100%;
1124
+ overflow-y: auto;
1125
+ }
1126
+
1127
+ .block-library-html__modal-content {
1128
+ flex: 1;
1129
+ min-height: 0;
1129
1130
  }
1130
1131
 
1131
1132
  .block-library-html__modal-tab {
@@ -1165,12 +1166,9 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
1165
1166
  display: flex;
1166
1167
  align-items: center;
1167
1168
  justify-content: center;
1168
- padding: 48px;
1169
- }
1170
-
1171
- .block-library-html__modal-actions {
1172
- margin-top: 16px;
1173
- padding: 0 32px 32px;
1169
+ padding: 16px;
1170
+ flex: 1;
1171
+ min-height: 0;
1174
1172
  }
1175
1173
 
1176
1174
  .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small {
@@ -1119,19 +1119,20 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
1119
1119
  left: 0;
1120
1120
  }
1121
1121
 
1122
- .block-library-html__modal .components-modal__content {
1123
- display: flex;
1124
- flex-direction: column;
1125
- padding: 0;
1126
- min-height: 70vh;
1122
+ .block-library-html__modal {
1123
+ height: 100%;
1127
1124
  }
1128
1125
  .block-library-html__modal .components-modal__children-container {
1129
1126
  height: 100%;
1130
- padding: 16px;
1131
1127
  }
1132
1128
 
1133
1129
  .block-library-html__modal-tabs {
1134
- height: 100%;
1130
+ overflow-y: auto;
1131
+ }
1132
+
1133
+ .block-library-html__modal-content {
1134
+ flex: 1;
1135
+ min-height: 0;
1135
1136
  }
1136
1137
 
1137
1138
  .block-library-html__modal-tab {
@@ -1172,12 +1173,9 @@ div[data-type="core/freeform"].is-selected .block-library-classic__toolbar {
1172
1173
  display: flex;
1173
1174
  align-items: center;
1174
1175
  justify-content: center;
1175
- padding: 48px;
1176
- }
1177
-
1178
- .block-library-html__modal-actions {
1179
- margin-top: 16px;
1180
- padding: 0 32px 32px;
1176
+ padding: 16px;
1177
+ flex: 1;
1178
+ min-height: 0;
1181
1179
  }
1182
1180
 
1183
1181
  .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small {
@@ -91,19 +91,20 @@
91
91
  right: 0;
92
92
  }
93
93
 
94
- .block-library-html__modal .components-modal__content {
95
- display: flex;
96
- flex-direction: column;
97
- padding: 0;
98
- min-height: 70vh;
94
+ .block-library-html__modal {
95
+ height: 100%;
99
96
  }
100
97
  .block-library-html__modal .components-modal__children-container {
101
98
  height: 100%;
102
- padding: 16px;
103
99
  }
104
100
 
105
101
  .block-library-html__modal-tabs {
106
- height: 100%;
102
+ overflow-y: auto;
103
+ }
104
+
105
+ .block-library-html__modal-content {
106
+ flex: 1;
107
+ min-height: 0;
107
108
  }
108
109
 
109
110
  .block-library-html__modal-tab {
@@ -143,10 +144,7 @@
143
144
  display: flex;
144
145
  align-items: center;
145
146
  justify-content: center;
146
- padding: 48px;
147
- }
148
-
149
- .block-library-html__modal-actions {
150
- margin-top: 16px;
151
- padding: 0 32px 32px;
147
+ padding: 16px;
148
+ flex: 1;
149
+ min-height: 0;
152
150
  }
@@ -91,19 +91,20 @@
91
91
  left: 0;
92
92
  }
93
93
 
94
- .block-library-html__modal .components-modal__content {
95
- display: flex;
96
- flex-direction: column;
97
- padding: 0;
98
- min-height: 70vh;
94
+ .block-library-html__modal {
95
+ height: 100%;
99
96
  }
100
97
  .block-library-html__modal .components-modal__children-container {
101
98
  height: 100%;
102
- padding: 16px;
103
99
  }
104
100
 
105
101
  .block-library-html__modal-tabs {
106
- height: 100%;
102
+ overflow-y: auto;
103
+ }
104
+
105
+ .block-library-html__modal-content {
106
+ flex: 1;
107
+ min-height: 0;
107
108
  }
108
109
 
109
110
  .block-library-html__modal-tab {
@@ -144,10 +145,7 @@
144
145
  display: flex;
145
146
  align-items: center;
146
147
  justify-content: center;
147
- padding: 48px;
148
- }
149
-
150
- .block-library-html__modal-actions {
151
- margin-top: 16px;
152
- padding: 0 32px 32px;
148
+ padding: 16px;
149
+ flex: 1;
150
+ min-height: 0;
153
151
  }
@@ -1,11 +1,8 @@
1
1
  @charset "UTF-8";
2
- .wp-block-accordion-item {
3
- display: grid;
4
- grid-template-rows: max-content 0fr;
5
- }
6
- .wp-block-accordion-item.is-open {
7
- grid-template-rows: max-content 1fr;
2
+ .wp-block-accordion {
3
+ box-sizing: border-box;
8
4
  }
5
+
9
6
  .wp-block-accordion-item.is-open > .wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
10
7
  transform: rotate(-45deg);
11
8
  }
@@ -21,8 +18,7 @@
21
18
  }
22
19
  }
23
20
 
24
- .wp-block-accordion-heading.wp-block-accordion-heading {
25
- min-width: 100%;
21
+ .wp-block-accordion-heading {
26
22
  margin: 0;
27
23
  }
28
24
 
@@ -78,10 +74,7 @@
78
74
  justify-content: center;
79
75
  }
80
76
 
81
- .wp-block-accordion-panel.wp-block-accordion-panel {
82
- min-width: 100%;
83
- }
84
- .wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
77
+ .wp-block-accordion-panel[inert], .wp-block-accordion-panel[aria-hidden=true] {
85
78
  display: none;
86
79
  margin-block-start: 0;
87
80
  }
@@ -1018,6 +1011,50 @@
1018
1011
  border: none;
1019
1012
  box-shadow: none;
1020
1013
  }
1014
+ .wp-block-cover-image .wp-block-cover__embed-background,
1015
+ .wp-block-cover .wp-block-cover__embed-background {
1016
+ position: absolute;
1017
+ top: 0;
1018
+ right: 0;
1019
+ left: 0;
1020
+ bottom: 0;
1021
+ margin: 0;
1022
+ padding: 0;
1023
+ width: 100%;
1024
+ height: 100%;
1025
+ max-width: none;
1026
+ max-height: none;
1027
+ outline: none;
1028
+ border: none;
1029
+ box-shadow: none;
1030
+ pointer-events: none;
1031
+ }
1032
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper,
1033
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper {
1034
+ position: absolute;
1035
+ top: 0;
1036
+ right: 0;
1037
+ left: 0;
1038
+ bottom: 0;
1039
+ margin: 0;
1040
+ padding: 0;
1041
+ width: 100%;
1042
+ height: 100%;
1043
+ }
1044
+ .wp-block-cover-image .wp-block-cover__embed-background iframe,
1045
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper iframe,
1046
+ .wp-block-cover .wp-block-cover__embed-background iframe,
1047
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper iframe {
1048
+ position: absolute;
1049
+ top: 50%;
1050
+ right: 50%;
1051
+ width: 100vw;
1052
+ height: 100vh;
1053
+ min-width: 100%;
1054
+ min-height: 100%;
1055
+ transform: translate(50%, -50%);
1056
+ pointer-events: none;
1057
+ }
1021
1058
 
1022
1059
  .wp-block-cover-image.has-parallax,
1023
1060
  .wp-block-cover.has-parallax,
@@ -1127,6 +1164,9 @@ section.wp-block-cover-image > h2,
1127
1164
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__video-background {
1128
1165
  z-index: 0;
1129
1166
  }
1167
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__embed-background {
1168
+ z-index: 0;
1169
+ }
1130
1170
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__image-background {
1131
1171
  z-index: 0;
1132
1172
  }
@@ -1,11 +1,8 @@
1
1
  @charset "UTF-8";
2
- .wp-block-accordion-item {
3
- display: grid;
4
- grid-template-rows: max-content 0fr;
5
- }
6
- .wp-block-accordion-item.is-open {
7
- grid-template-rows: max-content 1fr;
2
+ .wp-block-accordion {
3
+ box-sizing: border-box;
8
4
  }
5
+
9
6
  .wp-block-accordion-item.is-open > .wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
10
7
  transform: rotate(45deg);
11
8
  }
@@ -21,8 +18,7 @@
21
18
  }
22
19
  }
23
20
 
24
- .wp-block-accordion-heading.wp-block-accordion-heading {
25
- min-width: 100%;
21
+ .wp-block-accordion-heading {
26
22
  margin: 0;
27
23
  }
28
24
 
@@ -78,10 +74,7 @@
78
74
  justify-content: center;
79
75
  }
80
76
 
81
- .wp-block-accordion-panel.wp-block-accordion-panel {
82
- min-width: 100%;
83
- }
84
- .wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
77
+ .wp-block-accordion-panel[inert], .wp-block-accordion-panel[aria-hidden=true] {
85
78
  display: none;
86
79
  margin-block-start: 0;
87
80
  }
@@ -1025,6 +1018,50 @@
1025
1018
  border: none;
1026
1019
  box-shadow: none;
1027
1020
  }
1021
+ .wp-block-cover-image .wp-block-cover__embed-background,
1022
+ .wp-block-cover .wp-block-cover__embed-background {
1023
+ position: absolute;
1024
+ top: 0;
1025
+ left: 0;
1026
+ right: 0;
1027
+ bottom: 0;
1028
+ margin: 0;
1029
+ padding: 0;
1030
+ width: 100%;
1031
+ height: 100%;
1032
+ max-width: none;
1033
+ max-height: none;
1034
+ outline: none;
1035
+ border: none;
1036
+ box-shadow: none;
1037
+ pointer-events: none;
1038
+ }
1039
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper,
1040
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper {
1041
+ position: absolute;
1042
+ top: 0;
1043
+ left: 0;
1044
+ right: 0;
1045
+ bottom: 0;
1046
+ margin: 0;
1047
+ padding: 0;
1048
+ width: 100%;
1049
+ height: 100%;
1050
+ }
1051
+ .wp-block-cover-image .wp-block-cover__embed-background iframe,
1052
+ .wp-block-cover-image .wp-block-cover__embed-background .wp-block-embed__wrapper iframe,
1053
+ .wp-block-cover .wp-block-cover__embed-background iframe,
1054
+ .wp-block-cover .wp-block-cover__embed-background .wp-block-embed__wrapper iframe {
1055
+ position: absolute;
1056
+ top: 50%;
1057
+ left: 50%;
1058
+ width: 100vw;
1059
+ height: 100vh;
1060
+ min-width: 100%;
1061
+ min-height: 100%;
1062
+ transform: translate(-50%, -50%);
1063
+ pointer-events: none;
1064
+ }
1028
1065
 
1029
1066
  .wp-block-cover-image.has-parallax,
1030
1067
  .wp-block-cover.has-parallax,
@@ -1134,6 +1171,9 @@ section.wp-block-cover-image > h2,
1134
1171
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__video-background {
1135
1172
  z-index: 0;
1136
1173
  }
1174
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__embed-background {
1175
+ z-index: 0;
1176
+ }
1137
1177
  body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__image-background {
1138
1178
  z-index: 0;
1139
1179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.35.1-next.dc3f6d3c1.0",
3
+ "version": "9.36.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -82,41 +82,41 @@
82
82
  "{src,build,build-module}/*/init.js"
83
83
  ],
84
84
  "dependencies": {
85
- "@wordpress/a11y": "^4.35.1-next.dc3f6d3c1.0",
86
- "@wordpress/api-fetch": "^7.35.1-next.dc3f6d3c1.0",
87
- "@wordpress/autop": "^4.35.1-next.dc3f6d3c1.0",
88
- "@wordpress/base-styles": "^6.11.1-next.dc3f6d3c1.0",
89
- "@wordpress/blob": "^4.35.1-next.dc3f6d3c1.0",
90
- "@wordpress/block-editor": "^15.8.1-next.dc3f6d3c1.0",
91
- "@wordpress/blocks": "^15.8.1-next.dc3f6d3c1.0",
92
- "@wordpress/components": "^30.8.2-next.dc3f6d3c1.0",
93
- "@wordpress/compose": "^7.35.1-next.dc3f6d3c1.0",
94
- "@wordpress/core-data": "^7.35.1-next.dc3f6d3c1.0",
95
- "@wordpress/data": "^10.35.1-next.dc3f6d3c1.0",
96
- "@wordpress/date": "^5.35.1-next.dc3f6d3c1.0",
97
- "@wordpress/deprecated": "^4.35.1-next.dc3f6d3c1.0",
98
- "@wordpress/dom": "^4.35.1-next.dc3f6d3c1.0",
99
- "@wordpress/element": "^6.35.1-next.dc3f6d3c1.0",
100
- "@wordpress/escape-html": "^3.35.1-next.dc3f6d3c1.0",
101
- "@wordpress/hooks": "^4.35.1-next.dc3f6d3c1.0",
102
- "@wordpress/html-entities": "^4.35.1-next.dc3f6d3c1.0",
103
- "@wordpress/i18n": "^6.8.1-next.dc3f6d3c1.0",
104
- "@wordpress/icons": "^11.2.1-next.dc3f6d3c1.0",
105
- "@wordpress/interactivity": "^6.35.1-next.dc3f6d3c1.0",
106
- "@wordpress/interactivity-router": "^2.35.1-next.dc3f6d3c1.0",
107
- "@wordpress/keyboard-shortcuts": "^5.35.1-next.dc3f6d3c1.0",
108
- "@wordpress/keycodes": "^4.35.1-next.dc3f6d3c1.0",
109
- "@wordpress/latex-to-mathml": "^1.3.1-next.dc3f6d3c1.0",
110
- "@wordpress/notices": "^5.35.1-next.dc3f6d3c1.0",
111
- "@wordpress/patterns": "^2.35.1-next.dc3f6d3c1.0",
112
- "@wordpress/primitives": "^4.35.1-next.dc3f6d3c1.0",
113
- "@wordpress/private-apis": "^1.35.1-next.dc3f6d3c1.0",
114
- "@wordpress/reusable-blocks": "^5.35.1-next.dc3f6d3c1.0",
115
- "@wordpress/rich-text": "^7.35.1-next.dc3f6d3c1.0",
116
- "@wordpress/server-side-render": "^6.11.1-next.dc3f6d3c1.0",
117
- "@wordpress/url": "^4.35.1-next.dc3f6d3c1.0",
118
- "@wordpress/viewport": "^6.35.1-next.dc3f6d3c1.0",
119
- "@wordpress/wordcount": "^4.35.1-next.dc3f6d3c1.0",
85
+ "@wordpress/a11y": "^4.36.0",
86
+ "@wordpress/api-fetch": "^7.36.0",
87
+ "@wordpress/autop": "^4.36.0",
88
+ "@wordpress/base-styles": "^6.12.0",
89
+ "@wordpress/blob": "^4.36.0",
90
+ "@wordpress/block-editor": "^15.9.0",
91
+ "@wordpress/blocks": "^15.9.0",
92
+ "@wordpress/components": "^30.9.0",
93
+ "@wordpress/compose": "^7.36.0",
94
+ "@wordpress/core-data": "^7.36.0",
95
+ "@wordpress/data": "^10.36.0",
96
+ "@wordpress/date": "^5.36.0",
97
+ "@wordpress/deprecated": "^4.36.0",
98
+ "@wordpress/dom": "^4.36.0",
99
+ "@wordpress/element": "^6.36.0",
100
+ "@wordpress/escape-html": "^3.36.0",
101
+ "@wordpress/hooks": "^4.36.0",
102
+ "@wordpress/html-entities": "^4.36.0",
103
+ "@wordpress/i18n": "^6.9.0",
104
+ "@wordpress/icons": "^11.3.0",
105
+ "@wordpress/interactivity": "^6.36.0",
106
+ "@wordpress/interactivity-router": "^2.36.0",
107
+ "@wordpress/keyboard-shortcuts": "^5.36.0",
108
+ "@wordpress/keycodes": "^4.36.0",
109
+ "@wordpress/latex-to-mathml": "^1.4.0",
110
+ "@wordpress/notices": "^5.36.0",
111
+ "@wordpress/patterns": "^2.36.0",
112
+ "@wordpress/primitives": "^4.36.0",
113
+ "@wordpress/private-apis": "^1.36.0",
114
+ "@wordpress/reusable-blocks": "^5.36.0",
115
+ "@wordpress/rich-text": "^7.36.0",
116
+ "@wordpress/server-side-render": "^6.12.0",
117
+ "@wordpress/url": "^4.36.0",
118
+ "@wordpress/viewport": "^6.36.0",
119
+ "@wordpress/wordcount": "^4.36.0",
120
120
  "change-case": "^4.1.2",
121
121
  "clsx": "^2.1.1",
122
122
  "colord": "^2.7.0",
@@ -134,5 +134,5 @@
134
134
  "publishConfig": {
135
135
  "access": "public"
136
136
  },
137
- "gitHead": "f73b5e69b34fbaccfb8c47783f4f993059ff1a41"
137
+ "gitHead": "b35cf1a2dce04665e99fd6b9c2891c0b336361b9"
138
138
  }
@@ -0,0 +1,4 @@
1
+ .wp-block-accordion {
2
+ // This block has customizable padding, border-box makes that more predictable.
3
+ box-sizing: border-box;
4
+ }
@@ -3,7 +3,11 @@
3
3
  */
4
4
  import { store, getContext, withSyncEvent } from '@wordpress/interactivity';
5
5
 
6
- store(
6
+ // Whether the hash has been handled for the current page load.
7
+ // This is used to prevent the hash from being handled multiple times.
8
+ let hashHandled = false;
9
+
10
+ const { actions } = store(
7
11
  'core/accordion',
8
12
  {
9
13
  state: {
@@ -75,15 +79,68 @@ store(
75
79
  nextButton.focus();
76
80
  }
77
81
  } ),
82
+ openPanelByHash: () => {
83
+ if ( hashHandled || ! window.location?.hash?.length ) {
84
+ return;
85
+ }
86
+
87
+ const context = getContext();
88
+ const { id, accordionItems, autoclose } = context;
89
+ const hash = decodeURIComponent(
90
+ window.location.hash.slice( 1 )
91
+ );
92
+ const targetElement = window.document.getElementById( hash );
93
+
94
+ if ( ! targetElement ) {
95
+ return;
96
+ }
97
+
98
+ const panelElement = window.document.querySelector(
99
+ '.wp-block-accordion-panel[aria-labelledby="' + id + '"]'
100
+ );
101
+
102
+ if (
103
+ ! panelElement ||
104
+ ! panelElement.contains( targetElement )
105
+ ) {
106
+ return;
107
+ }
108
+
109
+ hashHandled = true;
110
+
111
+ if ( autoclose ) {
112
+ accordionItems.forEach( ( item ) => {
113
+ item.isOpen = item.id === id;
114
+ } );
115
+ } else {
116
+ const targetItem = accordionItems.find(
117
+ ( item ) => item.id === id
118
+ );
119
+
120
+ if ( targetItem ) {
121
+ targetItem.isOpen = true;
122
+ }
123
+ }
124
+
125
+ // Wait for the panel to be opened before scrolling to it.
126
+ window.setTimeout( () => {
127
+ targetElement.scrollIntoView();
128
+ }, 0 );
129
+ },
78
130
  },
79
131
  callbacks: {
80
132
  initAccordionItems: () => {
81
133
  const context = getContext();
82
- const { id, openByDefault } = context;
83
- context.accordionItems.push( {
134
+ const { id, openByDefault, accordionItems } = context;
135
+ accordionItems.push( {
84
136
  id,
85
137
  isOpen: openByDefault,
86
138
  } );
139
+ actions.openPanelByHash();
140
+ },
141
+ hashChange: () => {
142
+ hashHandled = false;
143
+ actions.openPanelByHash();
87
144
  },
88
145
  },
89
146
  },
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  "shadow": true,
60
- "blockVisibility": false,
60
+ "visibility": false,
61
61
  "lock": false
62
62
  },
63
63
  "selectors": {