@wordpress/block-library 9.0.0 → 9.0.2

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 (80) hide show
  1. package/build/button/save.js +0 -3
  2. package/build/button/save.js.map +1 -1
  3. package/build/embed/variations.js +0 -10
  4. package/build/embed/variations.js.map +1 -1
  5. package/build/gallery/v1/gallery-image.js +16 -4
  6. package/build/gallery/v1/gallery-image.js.map +1 -1
  7. package/build/lock-unlock.js +1 -1
  8. package/build/lock-unlock.js.map +1 -1
  9. package/build/navigation/view.js +1 -1
  10. package/build/navigation/view.js.map +1 -1
  11. package/build/page-list/convert-to-links-modal.js +1 -0
  12. package/build/page-list/convert-to-links-modal.js.map +1 -1
  13. package/build/page-list/edit.js +1 -0
  14. package/build/page-list/edit.js.map +1 -1
  15. package/build/quote/edit.js +1 -0
  16. package/build/quote/edit.js.map +1 -1
  17. package/build/social-link/edit.js +4 -18
  18. package/build/social-link/edit.js.map +1 -1
  19. package/build/template-part/edit/title-modal.js +1 -1
  20. package/build/template-part/edit/title-modal.js.map +1 -1
  21. package/build/utils/caption.js +2 -1
  22. package/build/utils/caption.js.map +1 -1
  23. package/build-module/button/save.js +0 -3
  24. package/build-module/button/save.js.map +1 -1
  25. package/build-module/embed/variations.js +0 -10
  26. package/build-module/embed/variations.js.map +1 -1
  27. package/build-module/gallery/v1/gallery-image.js +16 -4
  28. package/build-module/gallery/v1/gallery-image.js.map +1 -1
  29. package/build-module/lock-unlock.js +1 -1
  30. package/build-module/lock-unlock.js.map +1 -1
  31. package/build-module/navigation/view.js +1 -1
  32. package/build-module/navigation/view.js.map +1 -1
  33. package/build-module/page-list/convert-to-links-modal.js +1 -0
  34. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  35. package/build-module/page-list/edit.js +1 -0
  36. package/build-module/page-list/edit.js.map +1 -1
  37. package/build-module/quote/edit.js +1 -0
  38. package/build-module/quote/edit.js.map +1 -1
  39. package/build-module/social-link/edit.js +5 -19
  40. package/build-module/social-link/edit.js.map +1 -1
  41. package/build-module/template-part/edit/title-modal.js +1 -1
  42. package/build-module/template-part/edit/title-modal.js.map +1 -1
  43. package/build-module/utils/caption.js +2 -1
  44. package/build-module/utils/caption.js.map +1 -1
  45. package/build-style/common-rtl.css +1 -3
  46. package/build-style/common.css +1 -3
  47. package/build-style/editor-rtl.css +2 -5
  48. package/build-style/editor.css +2 -5
  49. package/build-style/media-text/style-rtl.css +17 -17
  50. package/build-style/media-text/style.css +17 -17
  51. package/build-style/navigation/editor-rtl.css +0 -4
  52. package/build-style/navigation/editor.css +0 -4
  53. package/build-style/query/editor-rtl.css +2 -1
  54. package/build-style/query/editor.css +2 -1
  55. package/build-style/search/style-rtl.css +1 -2
  56. package/build-style/search/style.css +1 -2
  57. package/build-style/style-rtl.css +19 -22
  58. package/build-style/style.css +19 -22
  59. package/package.json +35 -35
  60. package/src/button/index.php +80 -0
  61. package/src/button/save.js +0 -4
  62. package/src/buttons/test/__snapshots__/edit.native.js.snap +30 -10
  63. package/src/buttons/test/edit.native.js +6 -5
  64. package/src/embed/variations.js +0 -8
  65. package/src/gallery/v1/gallery-image.js +8 -0
  66. package/src/lock-unlock.js +1 -1
  67. package/src/media-text/style.scss +16 -15
  68. package/src/navigation/editor.scss +0 -4
  69. package/src/navigation/index.php +8 -8
  70. package/src/navigation/view.js +1 -1
  71. package/src/page-list/convert-to-links-modal.js +1 -0
  72. package/src/page-list/edit.js +1 -0
  73. package/src/query/editor.scss +2 -1
  74. package/src/query-pagination-next/index.php +1 -1
  75. package/src/query-pagination-previous/index.php +1 -1
  76. package/src/quote/edit.js +1 -0
  77. package/src/search/index.php +2 -2
  78. package/src/social-link/edit.js +0 -20
  79. package/src/template-part/edit/title-modal.js +1 -1
  80. package/src/utils/caption.js +5 -1
@@ -2,51 +2,69 @@
2
2
 
3
3
  exports[`Buttons block color customization sets a background color 1`] = `
4
4
  "<!-- wp:buttons -->
5
- <div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"luminous-vivid-amber"} /--></div>
5
+ <div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"luminous-vivid-amber"} -->
6
+ <div class="wp-block-button"><a class="wp-block-button__link has-luminous-vivid-amber-background-color has-background wp-element-button" href=""></a></div>
7
+ <!-- /wp:button --></div>
6
8
  <!-- /wp:buttons -->"
7
9
  `;
8
10
 
9
11
  exports[`Buttons block color customization sets a custom gradient background color 1`] = `
10
12
  "<!-- wp:buttons -->
11
- <div class="wp-block-buttons"><!-- wp:button {"style":{"color":{"gradient":"linear-gradient(200deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)"}}} /--></div>
13
+ <div class="wp-block-buttons"><!-- wp:button {"style":{"color":{"gradient":"linear-gradient(200deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)"}}} -->
14
+ <div class="wp-block-button"><a class="wp-block-button__link has-background wp-element-button" href="" style="background:linear-gradient(200deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)"></a></div>
15
+ <!-- /wp:button --></div>
12
16
  <!-- /wp:buttons -->"
13
17
  `;
14
18
 
15
19
  exports[`Buttons block color customization sets a gradient background color 1`] = `
16
20
  "<!-- wp:buttons -->
17
- <div class="wp-block-buttons"><!-- wp:button {"gradient":"light-green-cyan-to-vivid-green-cyan"} /--></div>
21
+ <div class="wp-block-buttons"><!-- wp:button {"gradient":"light-green-cyan-to-vivid-green-cyan"} -->
22
+ <div class="wp-block-button"><a class="wp-block-button__link has-light-green-cyan-to-vivid-green-cyan-gradient-background has-background wp-element-button" href=""></a></div>
23
+ <!-- /wp:button --></div>
18
24
  <!-- /wp:buttons -->"
19
25
  `;
20
26
 
21
27
  exports[`Buttons block color customization sets a text color 1`] = `
22
28
  "<!-- wp:buttons -->
23
- <div class="wp-block-buttons"><!-- wp:button {"textColor":"pale-pink"} /--></div>
29
+ <div class="wp-block-buttons"><!-- wp:button {"textColor":"pale-pink"} -->
30
+ <div class="wp-block-button"><a class="wp-block-button__link has-pale-pink-color has-text-color wp-element-button" href=""></a></div>
31
+ <!-- /wp:button --></div>
24
32
  <!-- /wp:buttons -->"
25
33
  `;
26
34
 
27
35
  exports[`Buttons block justify content sets Justify items center option 1`] = `
28
36
  "<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"center"}} -->
29
- <div class="wp-block-buttons"><!-- wp:button /--></div>
37
+ <div class="wp-block-buttons"><!-- wp:button -->
38
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button"></a></div>
39
+ <!-- /wp:button --></div>
30
40
  <!-- /wp:buttons -->"
31
41
  `;
32
42
 
33
43
  exports[`Buttons block justify content sets Justify items left option 1`] = `
34
44
  "<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"left"}} -->
35
- <div class="wp-block-buttons"><!-- wp:button /--></div>
45
+ <div class="wp-block-buttons"><!-- wp:button -->
46
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button"></a></div>
47
+ <!-- /wp:button --></div>
36
48
  <!-- /wp:buttons -->"
37
49
  `;
38
50
 
39
51
  exports[`Buttons block justify content sets Justify items right option 1`] = `
40
52
  "<!-- wp:buttons {"layout":{"type":"flex","justifyContent":"right"}} -->
41
- <div class="wp-block-buttons"><!-- wp:button /--></div>
53
+ <div class="wp-block-buttons"><!-- wp:button -->
54
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button"></a></div>
55
+ <!-- /wp:button --></div>
42
56
  <!-- /wp:buttons -->"
43
57
  `;
44
58
 
45
59
  exports[`Buttons block when a button is shown adds another button using the inline appender 1`] = `
46
60
  "<!-- wp:buttons -->
47
- <div class="wp-block-buttons"><!-- wp:button /-->
61
+ <div class="wp-block-buttons"><!-- wp:button -->
62
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href=""></a></div>
63
+ <!-- /wp:button -->
48
64
 
49
- <!-- wp:button /--></div>
65
+ <!-- wp:button -->
66
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href=""></a></div>
67
+ <!-- /wp:button --></div>
50
68
  <!-- /wp:buttons -->
51
69
 
52
70
  <!-- wp:paragraph -->
@@ -56,7 +74,9 @@ exports[`Buttons block when a button is shown adds another button using the inli
56
74
 
57
75
  exports[`Buttons block when a button is shown adds another button using the inserter 1`] = `
58
76
  "<!-- wp:buttons -->
59
- <div class="wp-block-buttons"><!-- wp:button /-->
77
+ <div class="wp-block-buttons"><!-- wp:button -->
78
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href=""></a></div>
79
+ <!-- /wp:button -->
60
80
 
61
81
  <!-- wp:button -->
62
82
  <div class="wp-block-button"><a class="wp-block-button__link wp-element-button">Hello!</a></div>
@@ -21,7 +21,9 @@ import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks';
21
21
  import { registerCoreBlocks } from '@wordpress/block-library';
22
22
 
23
23
  const BUTTONS_HTML = `<!-- wp:buttons -->
24
- <div class="wp-block-buttons"><!-- wp:button /--></div>
24
+ <div class="wp-block-buttons"><!-- wp:button -->
25
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button"></a></div>
26
+ <!-- /wp:button --></div>
25
27
  <!-- /wp:buttons -->`;
26
28
 
27
29
  beforeAll( () => {
@@ -248,10 +250,9 @@ describe( 'Buttons block', () => {
248
250
  'Justify items right',
249
251
  ].forEach( ( justificationOption ) =>
250
252
  it( `sets ${ justificationOption } option`, async () => {
251
- const initialHtml = `<!-- wp:buttons -->
252
- <div class="wp-block-buttons"><!-- wp:button /--></div>
253
- <!-- /wp:buttons -->`;
254
- const screen = await initializeEditor( { initialHtml } );
253
+ const screen = await initializeEditor( {
254
+ initialHtml: BUTTONS_HTML,
255
+ } );
255
256
 
256
257
  const [ block ] = await screen.findAllByLabelText(
257
258
  /Buttons Block\. Row 1/
@@ -259,14 +259,6 @@ const variations = [
259
259
  patterns: [ /^https?:\/\/(www\.)?scribd\.com\/.+/i ],
260
260
  attributes: { providerNameSlug: 'scribd', responsive: true },
261
261
  },
262
- {
263
- name: 'slideshare',
264
- title: 'Slideshare',
265
- icon: embedContentIcon,
266
- description: __( 'Embed Slideshare content.' ),
267
- patterns: [ /^https?:\/\/(.+?\.)?slideshare\.net\/.+/i ],
268
- attributes: { providerNameSlug: 'slideshare', responsive: true },
269
- },
270
262
  {
271
263
  name: 'smugmug',
272
264
  title: 'SmugMug',
@@ -222,6 +222,8 @@ class GalleryImage extends Component {
222
222
  onClick={ isFirstItem ? undefined : onMoveBackward }
223
223
  label={ __( 'Move image backward' ) }
224
224
  aria-disabled={ isFirstItem }
225
+ // Disable reason: Truly disable when image is not selected.
226
+ // eslint-disable-next-line no-restricted-syntax
225
227
  disabled={ ! isSelected }
226
228
  />
227
229
  <Button
@@ -229,6 +231,8 @@ class GalleryImage extends Component {
229
231
  onClick={ isLastItem ? undefined : onMoveForward }
230
232
  label={ __( 'Move image forward' ) }
231
233
  aria-disabled={ isLastItem }
234
+ // Disable reason: Truly disable when image is not selected.
235
+ // eslint-disable-next-line no-restricted-syntax
232
236
  disabled={ ! isSelected }
233
237
  />
234
238
  </ButtonGroup>
@@ -237,12 +241,16 @@ class GalleryImage extends Component {
237
241
  icon={ edit }
238
242
  onClick={ this.onEdit }
239
243
  label={ __( 'Replace image' ) }
244
+ // Disable reason: Truly disable when image is not selected.
245
+ // eslint-disable-next-line no-restricted-syntax
240
246
  disabled={ ! isSelected }
241
247
  />
242
248
  <Button
243
249
  icon={ closeSmall }
244
250
  onClick={ onRemove }
245
251
  label={ __( 'Remove image' ) }
252
+ // Disable reason: Truly disable when image is not selected.
253
+ // eslint-disable-next-line no-restricted-syntax
246
254
  disabled={ ! isSelected }
247
255
  />
248
256
  </ButtonGroup>
@@ -5,6 +5,6 @@ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/pri
5
5
 
6
6
  export const { lock, unlock } =
7
7
  __dangerousOptInToUnstableAPIsOnlyForCoreModules(
8
- 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',
8
+ 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',
9
9
  '@wordpress/block-library'
10
10
  );
@@ -15,27 +15,28 @@
15
15
  }
16
16
 
17
17
  .wp-block-media-text.is-vertically-aligned-top {
18
- .wp-block-media-text__content,
19
- .wp-block-media-text__media {
18
+ > .wp-block-media-text__content,
19
+ > .wp-block-media-text__media {
20
20
  align-self: start;
21
21
  }
22
22
  }
23
+
23
24
  .wp-block-media-text,
24
25
  .wp-block-media-text.is-vertically-aligned-center {
25
- .wp-block-media-text__content,
26
- .wp-block-media-text__media {
26
+ > .wp-block-media-text__content,
27
+ > .wp-block-media-text__media {
27
28
  align-self: center;
28
29
  }
29
30
  }
30
31
 
31
32
  .wp-block-media-text.is-vertically-aligned-bottom {
32
- .wp-block-media-text__content,
33
- .wp-block-media-text__media {
33
+ > .wp-block-media-text__content,
34
+ > .wp-block-media-text__media {
34
35
  align-self: end;
35
36
  }
36
37
  }
37
38
 
38
- .wp-block-media-text .wp-block-media-text__media {
39
+ .wp-block-media-text > .wp-block-media-text__media {
39
40
  /*!rtl:begin:ignore*/
40
41
  grid-column: 1;
41
42
  grid-row: 1;
@@ -43,7 +44,7 @@
43
44
  margin: 0;
44
45
  }
45
46
 
46
- .wp-block-media-text .wp-block-media-text__content {
47
+ .wp-block-media-text > .wp-block-media-text__content {
47
48
  direction: ltr;
48
49
  /*!rtl:begin:ignore*/
49
50
  grid-column: 2;
@@ -53,14 +54,14 @@
53
54
  word-break: break-word;
54
55
  }
55
56
 
56
- .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
57
+ .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__media {
57
58
  /*!rtl:begin:ignore*/
58
59
  grid-column: 2;
59
60
  grid-row: 1;
60
61
  /*!rtl:end:ignore*/
61
62
  }
62
63
 
63
- .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
64
+ .wp-block-media-text.has-media-on-the-right > .wp-block-media-text__content {
64
65
  /*!rtl:begin:ignore*/
65
66
  grid-column: 1;
66
67
  grid-row: 1;
@@ -75,18 +76,18 @@
75
76
  vertical-align: middle;
76
77
  }
77
78
 
78
- .wp-block-media-text.is-image-fill .wp-block-media-text__media {
79
+ .wp-block-media-text.is-image-fill > .wp-block-media-text__media {
79
80
  height: 100%;
80
81
  min-height: 250px;
81
82
  background-size: cover;
82
83
  }
83
84
 
84
- .wp-block-media-text.is-image-fill .wp-block-media-text__media > a {
85
+ .wp-block-media-text.is-image-fill > .wp-block-media-text__media > a {
85
86
  display: block;
86
87
  height: 100%;
87
88
  }
88
89
 
89
- .wp-block-media-text.is-image-fill .wp-block-media-text__media img {
90
+ .wp-block-media-text.is-image-fill > .wp-block-media-text__media img {
90
91
  // The image is visually hidden but accessible to assistive technologies.
91
92
  position: absolute;
92
93
  width: 1px;
@@ -107,11 +108,11 @@
107
108
  @media (max-width: #{ ($break-small) }) {
108
109
  .wp-block-media-text.is-stacked-on-mobile {
109
110
  grid-template-columns: 100% !important;
110
- .wp-block-media-text__media {
111
+ > .wp-block-media-text__media {
111
112
  grid-column: 1;
112
113
  grid-row: 1;
113
114
  }
114
- .wp-block-media-text__content {
115
+ > .wp-block-media-text__content {
115
116
  grid-column: 1;
116
117
  grid-row: 2;
117
118
  }
@@ -468,10 +468,6 @@ $color-control-label-height: 20px;
468
468
  top: $admin-bar-height + $header-height + $block-toolbar-height + $border-width;
469
469
  }
470
470
 
471
- .is-sidebar-opened .wp-block-navigation__responsive-container.is-menu-open {
472
- right: $sidebar-width;
473
- }
474
-
475
471
  // When fullscreen.
476
472
  .is-fullscreen-mode {
477
473
  .wp-block-navigation__responsive-container.is-menu-open {
@@ -495,7 +495,7 @@ class WP_Navigation_Block_Renderer {
495
495
  $close_button_directives = '';
496
496
  if ( $is_interactive ) {
497
497
  $open_button_directives = '
498
- data-wp-on--click="actions.openMenuOnClick"
498
+ data-wp-on-async--click="actions.openMenuOnClick"
499
499
  data-wp-on--keydown="actions.handleMenuKeydown"
500
500
  ';
501
501
  $responsive_container_directives = '
@@ -503,7 +503,7 @@ class WP_Navigation_Block_Renderer {
503
503
  data-wp-class--is-menu-open="state.isMenuOpen"
504
504
  data-wp-watch="callbacks.initMenu"
505
505
  data-wp-on--keydown="actions.handleMenuKeydown"
506
- data-wp-on--focusout="actions.handleMenuFocusout"
506
+ data-wp-on-async--focusout="actions.handleMenuFocusout"
507
507
  tabindex="-1"
508
508
  ';
509
509
  $responsive_dialog_directives = '
@@ -512,7 +512,7 @@ class WP_Navigation_Block_Renderer {
512
512
  data-wp-bind--role="state.roleAttribute"
513
513
  ';
514
514
  $close_button_directives = '
515
- data-wp-on--click="actions.closeMenuOnClick"
515
+ data-wp-on-async--click="actions.closeMenuOnClick"
516
516
  ';
517
517
  $responsive_container_content_directives = '
518
518
  data-wp-watch="callbacks.focusFirstElement"
@@ -826,7 +826,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
826
826
  $tags->set_attribute( 'data-wp-interactive', 'core/navigation' );
827
827
  $tags->set_attribute( 'data-wp-context', '{ "submenuOpenedBy": { "click": false, "hover": false, "focus": false }, "type": "submenu" }' );
828
828
  $tags->set_attribute( 'data-wp-watch', 'callbacks.initMenu' );
829
- $tags->set_attribute( 'data-wp-on--focusout', 'actions.handleMenuFocusout' );
829
+ $tags->set_attribute( 'data-wp-on-async--focusout', 'actions.handleMenuFocusout' );
830
830
  $tags->set_attribute( 'data-wp-on--keydown', 'actions.handleMenuKeydown' );
831
831
 
832
832
  // This is a fix for Safari. Without it, Safari doesn't change the active
@@ -836,8 +836,8 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
836
836
  $tags->set_attribute( 'tabindex', '-1' );
837
837
 
838
838
  if ( ! isset( $block_attributes['openSubmenusOnClick'] ) || false === $block_attributes['openSubmenusOnClick'] ) {
839
- $tags->set_attribute( 'data-wp-on--mouseenter', 'actions.openMenuOnHover' );
840
- $tags->set_attribute( 'data-wp-on--mouseleave', 'actions.closeMenuOnHover' );
839
+ $tags->set_attribute( 'data-wp-on-async--mouseenter', 'actions.openMenuOnHover' );
840
+ $tags->set_attribute( 'data-wp-on-async--mouseleave', 'actions.closeMenuOnHover' );
841
841
  }
842
842
 
843
843
  // Add directives to the toggle submenu button.
@@ -847,7 +847,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
847
847
  'class_name' => 'wp-block-navigation-submenu__toggle',
848
848
  )
849
849
  ) ) {
850
- $tags->set_attribute( 'data-wp-on--click', 'actions.toggleMenuOnClick' );
850
+ $tags->set_attribute( 'data-wp-on-async--click', 'actions.toggleMenuOnClick' );
851
851
  $tags->set_attribute( 'data-wp-bind--aria-expanded', 'state.isMenuOpen' );
852
852
  // The `aria-expanded` attribute for SSR is already added in the submenu block.
853
853
  }
@@ -858,7 +858,7 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
858
858
  'class_name' => 'wp-block-navigation__submenu-container',
859
859
  )
860
860
  ) ) {
861
- $tags->set_attribute( 'data-wp-on--focus', 'actions.openMenuOnFocus' );
861
+ $tags->set_attribute( 'data-wp-on-async--focus', 'actions.openMenuOnFocus' );
862
862
  }
863
863
 
864
864
  // Iterate through subitems if exist.
@@ -143,7 +143,7 @@ const { state, actions } = store(
143
143
  // If focus is outside modal, and in the document, close menu
144
144
  // event.target === The element losing focus
145
145
  // event.relatedTarget === The element receiving focus (if any)
146
- // When focusout is outsite the document,
146
+ // When focusout is outside the document,
147
147
  // `window.document.activeElement` doesn't change.
148
148
 
149
149
  // The event.relatedTarget is null when something outside the navigation menu is clicked. This is only necessary for Safari.
@@ -36,6 +36,7 @@ export function ConvertToLinksModal( { onClick, onClose, disabled } ) {
36
36
  </Button>
37
37
  <Button
38
38
  variant="primary"
39
+ __experimentalIsFocusable
39
40
  disabled={ disabled }
40
41
  onClick={ onClick }
41
42
  >
@@ -338,6 +338,7 @@ export default function PageListEdit( {
338
338
  <p>{ convertDescription }</p>
339
339
  <Button
340
340
  variant="primary"
341
+ __experimentalIsFocusable
341
342
  disabled={ ! hasResolvedPages }
342
343
  onClick={ convertToNavigationLinks }
343
344
  >
@@ -39,7 +39,8 @@
39
39
  position: sticky;
40
40
  top: 0;
41
41
  padding: $grid-unit-20 0;
42
- margin-bottom: 2px;
42
+ transform: translateY(- $grid-unit-05); // Offsets the top padding on the modal content container
43
+ margin-bottom: - $grid-unit-05;
43
44
  z-index: z-index(".block-library-query-pattern__selection-search");
44
45
  }
45
46
  }
@@ -77,7 +77,7 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
77
77
  ) ) {
78
78
  $p->set_attribute( 'data-wp-key', 'query-pagination-next' );
79
79
  $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
80
- $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' );
80
+ $p->set_attribute( 'data-wp-on-async--mouseenter', 'core/query::actions.prefetch' );
81
81
  $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' );
82
82
  $content = $p->get_updated_html();
83
83
  }
@@ -63,7 +63,7 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
63
63
  ) ) {
64
64
  $p->set_attribute( 'data-wp-key', 'query-pagination-previous' );
65
65
  $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
66
- $p->set_attribute( 'data-wp-on--mouseenter', 'core/query::actions.prefetch' );
66
+ $p->set_attribute( 'data-wp-on-async--mouseenter', 'core/query::actions.prefetch' );
67
67
  $p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' );
68
68
  $content = $p->get_updated_html();
69
69
  }
package/src/quote/edit.js CHANGED
@@ -121,6 +121,7 @@ export default function QuoteEdit( {
121
121
  }
122
122
  addLabel={ __( 'Add citation' ) }
123
123
  removeLabel={ __( 'Remove citation' ) }
124
+ excludeElementClassName
124
125
  className="wp-block-quote__citation"
125
126
  insertBlocksAfter={ insertBlocksAfter }
126
127
  { ...( ! isWebPlatform ? { textAlign } : {} ) }
@@ -191,8 +191,8 @@ function render_block_core_search( $attributes ) {
191
191
  data-wp-interactive="core/search"'
192
192
  . $form_context .
193
193
  'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
194
- data-wp-on--keydown="actions.handleSearchKeydown"
195
- data-wp-on--focusout="actions.handleSearchFocusout"
194
+ data-wp-on-async--keydown="actions.handleSearchKeydown"
195
+ data-wp-on-async--focusout="actions.handleSearchFocusout"
196
196
  ';
197
197
  }
198
198
 
@@ -6,15 +6,11 @@ import clsx from 'clsx';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { DELETE, BACKSPACE } from '@wordpress/keycodes';
10
- import { useDispatch } from '@wordpress/data';
11
-
12
9
  import {
13
10
  InspectorControls,
14
11
  URLPopover,
15
12
  URLInput,
16
13
  useBlockProps,
17
- store as blockEditorStore,
18
14
  } from '@wordpress/block-editor';
19
15
  import { useState } from '@wordpress/element';
20
16
  import {
@@ -36,9 +32,7 @@ const SocialLinkURLPopover = ( {
36
32
  setAttributes,
37
33
  setPopover,
38
34
  popoverAnchor,
39
- clientId,
40
35
  } ) => {
41
- const { removeBlock } = useDispatch( blockEditorStore );
42
36
  return (
43
37
  <URLPopover
44
38
  anchor={ popoverAnchor }
@@ -62,18 +56,6 @@ const SocialLinkURLPopover = ( {
62
56
  label={ __( 'Enter social link' ) }
63
57
  hideLabelFromVision
64
58
  disableSuggestions
65
- onKeyDown={ ( event ) => {
66
- if (
67
- !! url ||
68
- event.defaultPrevented ||
69
- ! [ BACKSPACE, DELETE ].includes(
70
- event.keyCode
71
- )
72
- ) {
73
- return;
74
- }
75
- removeBlock( clientId );
76
- } }
77
59
  />
78
60
  </div>
79
61
  <Button
@@ -91,7 +73,6 @@ const SocialLinkEdit = ( {
91
73
  context,
92
74
  isSelected,
93
75
  setAttributes,
94
- clientId,
95
76
  } ) => {
96
77
  const { url, service, label = '', rel } = attributes;
97
78
  const {
@@ -178,7 +159,6 @@ const SocialLinkEdit = ( {
178
159
  setAttributes={ setAttributes }
179
160
  setPopover={ setPopover }
180
161
  popoverAnchor={ popoverAnchor }
181
- clientId={ clientId }
182
162
  />
183
163
  ) }
184
164
  </li>
@@ -43,8 +43,8 @@ export default function TitleModal( { areaLabel, onClose, onSubmit } ) {
43
43
  <Button
44
44
  variant="primary"
45
45
  type="submit"
46
+ __experimentalIsFocusable
46
47
  disabled={ ! title.length }
47
- aria-disabled={ ! title.length }
48
48
  >
49
49
  { __( 'Create' ) }
50
50
  </Button>
@@ -32,6 +32,7 @@ export function Caption( {
32
32
  placeholder = __( 'Add caption' ),
33
33
  label = __( 'Caption text' ),
34
34
  showToolbarButton = true,
35
+ excludeElementClassName,
35
36
  className,
36
37
  readOnly,
37
38
  tagName = 'figcaption',
@@ -70,6 +71,7 @@ export function Caption( {
70
71
  },
71
72
  [ isCaptionEmpty ]
72
73
  );
74
+
73
75
  return (
74
76
  <>
75
77
  { showToolbarButton && (
@@ -96,7 +98,9 @@ export function Caption( {
96
98
  tagName={ tagName }
97
99
  className={ clsx(
98
100
  className,
99
- __experimentalGetElementClassName( 'caption' )
101
+ excludeElementClassName
102
+ ? ''
103
+ : __experimentalGetElementClassName( 'caption' )
100
104
  ) }
101
105
  ref={ ref }
102
106
  aria-label={ label }