@wordpress/block-library 7.6.0 → 7.7.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 (152) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/button/deprecated.js +175 -35
  3. package/build/button/deprecated.js.map +1 -1
  4. package/build/button/edit.js +1 -1
  5. package/build/button/edit.js.map +1 -1
  6. package/build/button/save.js +1 -1
  7. package/build/button/save.js.map +1 -1
  8. package/build/columns/index.js +3 -1
  9. package/build/columns/index.js.map +1 -1
  10. package/build/cover/deprecated.js +212 -207
  11. package/build/cover/deprecated.js.map +1 -1
  12. package/build/cover/edit/index.js +13 -3
  13. package/build/cover/edit/index.js.map +1 -1
  14. package/build/cover/save.js +18 -5
  15. package/build/cover/save.js.map +1 -1
  16. package/build/cover/shared.js +14 -17
  17. package/build/cover/shared.js.map +1 -1
  18. package/build/file/edit.js +1 -1
  19. package/build/file/edit.js.map +1 -1
  20. package/build/file/save.js +9 -1
  21. package/build/file/save.js.map +1 -1
  22. package/build/gallery/gap-styles.js +14 -4
  23. package/build/gallery/gap-styles.js.map +1 -1
  24. package/build/gallery/index.js +1 -1
  25. package/build/image/edit.js +5 -59
  26. package/build/image/edit.js.map +1 -1
  27. package/build/image/edit.native.js +56 -3
  28. package/build/image/edit.native.js.map +1 -1
  29. package/build/image/image.js +3 -13
  30. package/build/image/image.js.map +1 -1
  31. package/build/list-item/hooks/use-split.js +17 -3
  32. package/build/list-item/hooks/use-split.js.map +1 -1
  33. package/build/navigation-link/edit.js +31 -5
  34. package/build/navigation-link/edit.js.map +1 -1
  35. package/build/post-author-name/index.js +3 -0
  36. package/build/post-author-name/index.js.map +1 -1
  37. package/build/post-author-name/transforms.js +41 -0
  38. package/build/post-author-name/transforms.js.map +1 -0
  39. package/build/post-comments-form/form.js +11 -1
  40. package/build/post-comments-form/form.js.map +1 -1
  41. package/build/post-date/edit.js +13 -7
  42. package/build/post-date/edit.js.map +1 -1
  43. package/build/search/edit.js +1 -1
  44. package/build/search/edit.js.map +1 -1
  45. package/build/search/index.js +4 -0
  46. package/build/search/index.js.map +1 -1
  47. package/build/shortcode/edit.native.js +16 -13
  48. package/build/shortcode/edit.native.js.map +1 -1
  49. package/build/social-links/edit.js +2 -2
  50. package/build/social-links/edit.js.map +1 -1
  51. package/build/table-of-contents/edit.js +11 -3
  52. package/build/table-of-contents/edit.js.map +1 -1
  53. package/build-module/button/deprecated.js +175 -35
  54. package/build-module/button/deprecated.js.map +1 -1
  55. package/build-module/button/edit.js +2 -2
  56. package/build-module/button/edit.js.map +1 -1
  57. package/build-module/button/save.js +2 -2
  58. package/build-module/button/save.js.map +1 -1
  59. package/build-module/columns/index.js +3 -1
  60. package/build-module/columns/index.js.map +1 -1
  61. package/build-module/cover/deprecated.js +206 -198
  62. package/build-module/cover/deprecated.js.map +1 -1
  63. package/build-module/cover/edit/index.js +14 -4
  64. package/build-module/cover/edit/index.js.map +1 -1
  65. package/build-module/cover/save.js +19 -6
  66. package/build-module/cover/save.js.map +1 -1
  67. package/build-module/cover/shared.js +11 -12
  68. package/build-module/cover/shared.js.map +1 -1
  69. package/build-module/file/edit.js +2 -2
  70. package/build-module/file/edit.js.map +1 -1
  71. package/build-module/file/save.js +7 -2
  72. package/build-module/file/save.js.map +1 -1
  73. package/build-module/gallery/gap-styles.js +14 -4
  74. package/build-module/gallery/gap-styles.js.map +1 -1
  75. package/build-module/gallery/index.js +1 -1
  76. package/build-module/image/edit.js +5 -56
  77. package/build-module/image/edit.js.map +1 -1
  78. package/build-module/image/edit.native.js +57 -5
  79. package/build-module/image/edit.native.js.map +1 -1
  80. package/build-module/image/image.js +4 -14
  81. package/build-module/image/image.js.map +1 -1
  82. package/build-module/list-item/hooks/use-split.js +19 -5
  83. package/build-module/list-item/hooks/use-split.js.map +1 -1
  84. package/build-module/navigation-link/edit.js +31 -6
  85. package/build-module/navigation-link/edit.js.map +1 -1
  86. package/build-module/post-author-name/index.js +2 -0
  87. package/build-module/post-author-name/index.js.map +1 -1
  88. package/build-module/post-author-name/transforms.js +32 -0
  89. package/build-module/post-author-name/transforms.js.map +1 -0
  90. package/build-module/post-comments-form/form.js +7 -1
  91. package/build-module/post-comments-form/form.js.map +1 -1
  92. package/build-module/post-date/edit.js +15 -9
  93. package/build-module/post-date/edit.js.map +1 -1
  94. package/build-module/search/edit.js +2 -2
  95. package/build-module/search/edit.js.map +1 -1
  96. package/build-module/search/index.js +4 -0
  97. package/build-module/search/index.js.map +1 -1
  98. package/build-module/shortcode/edit.native.js +17 -13
  99. package/build-module/shortcode/edit.native.js.map +1 -1
  100. package/build-module/social-links/edit.js +2 -2
  101. package/build-module/social-links/edit.js.map +1 -1
  102. package/build-module/table-of-contents/edit.js +12 -4
  103. package/build-module/table-of-contents/edit.js.map +1 -1
  104. package/build-style/cover/style-rtl.css +32 -23
  105. package/build-style/cover/style.css +32 -23
  106. package/build-style/site-logo/style-rtl.css +4 -0
  107. package/build-style/site-logo/style.css +4 -0
  108. package/build-style/style-rtl.css +36 -23
  109. package/build-style/style.css +36 -23
  110. package/package.json +28 -28
  111. package/src/button/deprecated.js +145 -0
  112. package/src/button/edit.js +3 -1
  113. package/src/button/save.js +3 -1
  114. package/src/buttons/test/__snapshots__/edit.native.js.snap +1 -1
  115. package/src/buttons/test/edit.native.js +1 -1
  116. package/src/columns/block.json +3 -1
  117. package/src/cover/deprecated.js +230 -183
  118. package/src/cover/edit/index.js +25 -13
  119. package/src/cover/save.js +26 -13
  120. package/src/cover/shared.js +5 -7
  121. package/src/cover/style.scss +27 -22
  122. package/src/file/edit.js +5 -1
  123. package/src/file/save.js +14 -2
  124. package/src/gallery/block.json +1 -1
  125. package/src/gallery/gap-styles.js +21 -6
  126. package/src/gallery/index.php +23 -12
  127. package/src/image/edit.js +1 -53
  128. package/src/image/edit.native.js +65 -3
  129. package/src/image/image.js +2 -11
  130. package/src/image/styles.native.scss +11 -0
  131. package/src/list-item/hooks/use-split.js +18 -9
  132. package/src/navigation-link/edit.js +35 -5
  133. package/src/navigation-link/test/edit.js +0 -20
  134. package/src/post-author/index.php +3 -2
  135. package/src/post-author-name/index.js +2 -0
  136. package/src/post-author-name/index.php +1 -1
  137. package/src/post-author-name/transforms.js +25 -0
  138. package/src/post-comments/index.php +1 -1
  139. package/src/post-comments-form/form.js +11 -1
  140. package/src/post-comments-form/index.php +1 -1
  141. package/src/post-date/edit.js +4 -3
  142. package/src/query-pagination/index.php +0 -1
  143. package/src/search/block.json +4 -0
  144. package/src/search/edit.js +3 -1
  145. package/src/search/index.php +28 -15
  146. package/src/shortcode/edit.native.js +29 -15
  147. package/src/shortcode/style.native.scss +11 -4
  148. package/src/shortcode/test/__snapshots__/edit.native.js.snap +9 -0
  149. package/src/shortcode/test/edit.native.js +58 -40
  150. package/src/site-logo/style.scss +6 -0
  151. package/src/social-links/edit.js +11 -10
  152. package/src/table-of-contents/edit.js +19 -6
@@ -84,6 +84,10 @@
84
84
  width: 120px;
85
85
  height: auto;
86
86
  }
87
+ .wp-block-site-logo img {
88
+ height: auto;
89
+ max-width: 100%;
90
+ }
87
91
  .wp-block-site-logo a,
88
92
  .wp-block-site-logo img {
89
93
  border-radius: inherit;
@@ -413,27 +413,6 @@
413
413
  * - Issue with alternative fix: https://github.com/WordPress/gutenberg/issues/26545
414
414
  */
415
415
  }
416
- .wp-block-cover-image.has-parallax,
417
- .wp-block-cover.has-parallax {
418
- background-attachment: fixed;
419
- }
420
- @supports (-webkit-touch-callout: inherit) {
421
- .wp-block-cover-image.has-parallax,
422
- .wp-block-cover.has-parallax {
423
- background-attachment: scroll;
424
- }
425
- }
426
- @media (prefers-reduced-motion: reduce) {
427
- .wp-block-cover-image.has-parallax,
428
- .wp-block-cover.has-parallax {
429
- background-attachment: scroll;
430
- }
431
- }
432
- .wp-block-cover-image.is-repeated,
433
- .wp-block-cover.is-repeated {
434
- background-repeat: repeat;
435
- background-size: auto;
436
- }
437
416
  .wp-block-cover-image.has-background-dim:not([class*=-background-color]),
438
417
  .wp-block-cover-image .has-background-dim:not([class*=-background-color]),
439
418
  .wp-block-cover.has-background-dim:not([class*=-background-color]),
@@ -710,9 +689,9 @@
710
689
  margin: 0;
711
690
  width: auto;
712
691
  }
713
- .wp-block-cover-image img.wp-block-cover__image-background,
692
+ .wp-block-cover-image .wp-block-cover__image-background,
714
693
  .wp-block-cover-image video.wp-block-cover__video-background,
715
- .wp-block-cover img.wp-block-cover__image-background,
694
+ .wp-block-cover .wp-block-cover__image-background,
716
695
  .wp-block-cover video.wp-block-cover__video-background {
717
696
  position: absolute;
718
697
  top: 0;
@@ -732,6 +711,36 @@
732
711
  box-shadow: none;
733
712
  }
734
713
 
714
+ .wp-block-cover-image.has-parallax,
715
+ .wp-block-cover.has-parallax,
716
+ .wp-block-cover__image-background.has-parallax,
717
+ video.wp-block-cover__video-background.has-parallax {
718
+ background-attachment: fixed;
719
+ }
720
+ @supports (-webkit-overflow-scrolling: touch) {
721
+ .wp-block-cover-image.has-parallax,
722
+ .wp-block-cover.has-parallax,
723
+ .wp-block-cover__image-background.has-parallax,
724
+ video.wp-block-cover__video-background.has-parallax {
725
+ background-attachment: scroll;
726
+ }
727
+ }
728
+ @media (prefers-reduced-motion: reduce) {
729
+ .wp-block-cover-image.has-parallax,
730
+ .wp-block-cover.has-parallax,
731
+ .wp-block-cover__image-background.has-parallax,
732
+ video.wp-block-cover__video-background.has-parallax {
733
+ background-attachment: scroll;
734
+ }
735
+ }
736
+ .wp-block-cover-image.is-repeated,
737
+ .wp-block-cover.is-repeated,
738
+ .wp-block-cover__image-background.is-repeated,
739
+ video.wp-block-cover__video-background.is-repeated {
740
+ background-repeat: repeat;
741
+ background-size: auto;
742
+ }
743
+
735
744
  .wp-block-cover__video-background {
736
745
  z-index: 0;
737
746
  }
@@ -2623,6 +2632,10 @@ ul.wp-block-rss.is-grid li {
2623
2632
  width: 120px;
2624
2633
  height: auto;
2625
2634
  }
2635
+ .wp-block-site-logo img {
2636
+ height: auto;
2637
+ max-width: 100%;
2638
+ }
2626
2639
  .wp-block-site-logo a,
2627
2640
  .wp-block-site-logo img {
2628
2641
  border-radius: inherit;
@@ -418,27 +418,6 @@
418
418
  * - Issue with alternative fix: https://github.com/WordPress/gutenberg/issues/26545
419
419
  */
420
420
  }
421
- .wp-block-cover-image.has-parallax,
422
- .wp-block-cover.has-parallax {
423
- background-attachment: fixed;
424
- }
425
- @supports (-webkit-touch-callout: inherit) {
426
- .wp-block-cover-image.has-parallax,
427
- .wp-block-cover.has-parallax {
428
- background-attachment: scroll;
429
- }
430
- }
431
- @media (prefers-reduced-motion: reduce) {
432
- .wp-block-cover-image.has-parallax,
433
- .wp-block-cover.has-parallax {
434
- background-attachment: scroll;
435
- }
436
- }
437
- .wp-block-cover-image.is-repeated,
438
- .wp-block-cover.is-repeated {
439
- background-repeat: repeat;
440
- background-size: auto;
441
- }
442
421
  .wp-block-cover-image.has-background-dim:not([class*=-background-color]),
443
422
  .wp-block-cover-image .has-background-dim:not([class*=-background-color]),
444
423
  .wp-block-cover.has-background-dim:not([class*=-background-color]),
@@ -715,9 +694,9 @@
715
694
  margin: 0;
716
695
  width: auto;
717
696
  }
718
- .wp-block-cover-image img.wp-block-cover__image-background,
697
+ .wp-block-cover-image .wp-block-cover__image-background,
719
698
  .wp-block-cover-image video.wp-block-cover__video-background,
720
- .wp-block-cover img.wp-block-cover__image-background,
699
+ .wp-block-cover .wp-block-cover__image-background,
721
700
  .wp-block-cover video.wp-block-cover__video-background {
722
701
  position: absolute;
723
702
  top: 0;
@@ -737,6 +716,36 @@
737
716
  box-shadow: none;
738
717
  }
739
718
 
719
+ .wp-block-cover-image.has-parallax,
720
+ .wp-block-cover.has-parallax,
721
+ .wp-block-cover__image-background.has-parallax,
722
+ video.wp-block-cover__video-background.has-parallax {
723
+ background-attachment: fixed;
724
+ }
725
+ @supports (-webkit-overflow-scrolling: touch) {
726
+ .wp-block-cover-image.has-parallax,
727
+ .wp-block-cover.has-parallax,
728
+ .wp-block-cover__image-background.has-parallax,
729
+ video.wp-block-cover__video-background.has-parallax {
730
+ background-attachment: scroll;
731
+ }
732
+ }
733
+ @media (prefers-reduced-motion: reduce) {
734
+ .wp-block-cover-image.has-parallax,
735
+ .wp-block-cover.has-parallax,
736
+ .wp-block-cover__image-background.has-parallax,
737
+ video.wp-block-cover__video-background.has-parallax {
738
+ background-attachment: scroll;
739
+ }
740
+ }
741
+ .wp-block-cover-image.is-repeated,
742
+ .wp-block-cover.is-repeated,
743
+ .wp-block-cover__image-background.is-repeated,
744
+ video.wp-block-cover__video-background.is-repeated {
745
+ background-repeat: repeat;
746
+ background-size: auto;
747
+ }
748
+
740
749
  .wp-block-cover__video-background {
741
750
  z-index: 0;
742
751
  }
@@ -2654,6 +2663,10 @@ ul.wp-block-rss.is-grid li {
2654
2663
  width: 120px;
2655
2664
  height: auto;
2656
2665
  }
2666
+ .wp-block-site-logo img {
2667
+ height: auto;
2668
+ max-width: 100%;
2669
+ }
2657
2670
  .wp-block-site-logo a,
2658
2671
  .wp-block-site-logo img {
2659
2672
  border-radius: inherit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "7.6.0",
3
+ "version": "7.7.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -34,32 +34,32 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.16.0",
37
- "@wordpress/a11y": "^3.9.0",
38
- "@wordpress/api-fetch": "^6.6.0",
39
- "@wordpress/autop": "^3.9.0",
40
- "@wordpress/blob": "^3.9.0",
41
- "@wordpress/block-editor": "^9.1.0",
42
- "@wordpress/blocks": "^11.8.0",
43
- "@wordpress/components": "^19.11.0",
44
- "@wordpress/compose": "^5.7.0",
45
- "@wordpress/core-data": "^4.7.0",
46
- "@wordpress/data": "^6.9.0",
47
- "@wordpress/date": "^4.9.0",
48
- "@wordpress/deprecated": "^3.9.0",
49
- "@wordpress/dom": "^3.9.0",
50
- "@wordpress/element": "^4.7.0",
51
- "@wordpress/hooks": "^3.9.0",
52
- "@wordpress/html-entities": "^3.9.0",
53
- "@wordpress/i18n": "^4.9.0",
54
- "@wordpress/icons": "^9.0.0",
55
- "@wordpress/keycodes": "^3.9.0",
56
- "@wordpress/notices": "^3.9.0",
57
- "@wordpress/primitives": "^3.7.0",
58
- "@wordpress/reusable-blocks": "^3.7.0",
59
- "@wordpress/rich-text": "^5.7.0",
60
- "@wordpress/server-side-render": "^3.7.0",
61
- "@wordpress/url": "^3.10.0",
62
- "@wordpress/viewport": "^4.7.0",
37
+ "@wordpress/a11y": "^3.10.0",
38
+ "@wordpress/api-fetch": "^6.7.0",
39
+ "@wordpress/autop": "^3.10.0",
40
+ "@wordpress/blob": "^3.10.0",
41
+ "@wordpress/block-editor": "^9.2.0",
42
+ "@wordpress/blocks": "^11.9.0",
43
+ "@wordpress/components": "^19.12.0",
44
+ "@wordpress/compose": "^5.8.0",
45
+ "@wordpress/core-data": "^4.8.0",
46
+ "@wordpress/data": "^6.10.0",
47
+ "@wordpress/date": "^4.10.0",
48
+ "@wordpress/deprecated": "^3.10.0",
49
+ "@wordpress/dom": "^3.10.0",
50
+ "@wordpress/element": "^4.8.0",
51
+ "@wordpress/hooks": "^3.10.0",
52
+ "@wordpress/html-entities": "^3.10.0",
53
+ "@wordpress/i18n": "^4.10.0",
54
+ "@wordpress/icons": "^9.1.0",
55
+ "@wordpress/keycodes": "^3.10.0",
56
+ "@wordpress/notices": "^3.10.0",
57
+ "@wordpress/primitives": "^3.8.0",
58
+ "@wordpress/reusable-blocks": "^3.8.0",
59
+ "@wordpress/rich-text": "^5.8.0",
60
+ "@wordpress/server-side-render": "^3.8.0",
61
+ "@wordpress/url": "^3.11.0",
62
+ "@wordpress/viewport": "^4.8.0",
63
63
  "classnames": "^2.3.1",
64
64
  "colord": "^2.7.0",
65
65
  "fast-average-color": "4.3.0",
@@ -75,5 +75,5 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "198fa129cf1af8dc615918987ea6795cd40ab7df"
78
+ "gitHead": "a3e0b62091e8a8bdf5e2518e42d60d7098af48cc"
79
79
  }
@@ -119,6 +119,150 @@ const blockAttributes = {
119
119
  },
120
120
  };
121
121
 
122
+ const v11 = {
123
+ attributes: {
124
+ url: {
125
+ type: 'string',
126
+ source: 'attribute',
127
+ selector: 'a',
128
+ attribute: 'href',
129
+ },
130
+ title: {
131
+ type: 'string',
132
+ source: 'attribute',
133
+ selector: 'a',
134
+ attribute: 'title',
135
+ },
136
+ text: {
137
+ type: 'string',
138
+ source: 'html',
139
+ selector: 'a',
140
+ },
141
+ linkTarget: {
142
+ type: 'string',
143
+ source: 'attribute',
144
+ selector: 'a',
145
+ attribute: 'target',
146
+ },
147
+ rel: {
148
+ type: 'string',
149
+ source: 'attribute',
150
+ selector: 'a',
151
+ attribute: 'rel',
152
+ },
153
+ placeholder: {
154
+ type: 'string',
155
+ },
156
+ backgroundColor: {
157
+ type: 'string',
158
+ },
159
+ textColor: {
160
+ type: 'string',
161
+ },
162
+ gradient: {
163
+ type: 'string',
164
+ },
165
+ width: {
166
+ type: 'number',
167
+ },
168
+ },
169
+ supports: {
170
+ anchor: true,
171
+ align: true,
172
+ alignWide: false,
173
+ color: {
174
+ __experimentalSkipSerialization: true,
175
+ gradients: true,
176
+ __experimentalDefaultControls: {
177
+ background: true,
178
+ text: true,
179
+ },
180
+ },
181
+ typography: {
182
+ fontSize: true,
183
+ __experimentalFontFamily: true,
184
+ __experimentalDefaultControls: {
185
+ fontSize: true,
186
+ },
187
+ },
188
+ reusable: false,
189
+ spacing: {
190
+ __experimentalSkipSerialization: true,
191
+ padding: [ 'horizontal', 'vertical' ],
192
+ __experimentalDefaultControls: {
193
+ padding: true,
194
+ },
195
+ },
196
+ __experimentalBorder: {
197
+ radius: true,
198
+ __experimentalSkipSerialization: true,
199
+ __experimentalDefaultControls: {
200
+ radius: true,
201
+ },
202
+ },
203
+ __experimentalSelector: '.wp-block-button__link',
204
+ },
205
+ save( { attributes, className } ) {
206
+ const {
207
+ fontSize,
208
+ linkTarget,
209
+ rel,
210
+ style,
211
+ text,
212
+ title,
213
+ url,
214
+ width,
215
+ } = attributes;
216
+
217
+ if ( ! text ) {
218
+ return null;
219
+ }
220
+
221
+ const borderProps = getBorderClassesAndStyles( attributes );
222
+ const colorProps = getColorClassesAndStyles( attributes );
223
+ const spacingProps = getSpacingClassesAndStyles( attributes );
224
+ const buttonClasses = classnames(
225
+ 'wp-block-button__link',
226
+ colorProps.className,
227
+ borderProps.className,
228
+ {
229
+ // For backwards compatibility add style that isn't provided via
230
+ // block support.
231
+ 'no-border-radius': style?.border?.radius === 0,
232
+ }
233
+ );
234
+ const buttonStyle = {
235
+ ...borderProps.style,
236
+ ...colorProps.style,
237
+ ...spacingProps.style,
238
+ };
239
+
240
+ // The use of a `title` attribute here is soft-deprecated, but still applied
241
+ // if it had already been assigned, for the sake of backward-compatibility.
242
+ // A title will no longer be assigned for new or updated button block links.
243
+
244
+ const wrapperClasses = classnames( className, {
245
+ [ `has-custom-width wp-block-button__width-${ width }` ]: width,
246
+ [ `has-custom-font-size` ]: fontSize || style?.typography?.fontSize,
247
+ } );
248
+
249
+ return (
250
+ <div { ...useBlockProps.save( { className: wrapperClasses } ) }>
251
+ <RichText.Content
252
+ tagName="a"
253
+ className={ buttonClasses }
254
+ href={ url }
255
+ title={ title }
256
+ style={ buttonStyle }
257
+ value={ text }
258
+ target={ linkTarget }
259
+ rel={ rel }
260
+ />
261
+ </div>
262
+ );
263
+ },
264
+ };
265
+
122
266
  const v10 = {
123
267
  attributes: {
124
268
  url: {
@@ -258,6 +402,7 @@ const v10 = {
258
402
  };
259
403
 
260
404
  const deprecated = [
405
+ v11,
261
406
  v10,
262
407
  {
263
408
  supports: {
@@ -25,6 +25,7 @@ import {
25
25
  __experimentalUseColorProps as useColorProps,
26
26
  __experimentalGetSpacingClassesAndStyles as useSpacingProps,
27
27
  __experimentalLinkControl as LinkControl,
28
+ __experimentalElementButtonClassName,
28
29
  } from '@wordpress/block-editor';
29
30
  import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
30
31
  import { link, linkOff } from '@wordpress/icons';
@@ -176,7 +177,8 @@ function ButtonEdit( props ) {
176
177
  // For backwards compatibility add style that isn't
177
178
  // provided via block support.
178
179
  'no-border-radius': style?.border?.radius === 0,
179
- }
180
+ },
181
+ __experimentalElementButtonClassName
180
182
  ) }
181
183
  style={ {
182
184
  ...borderProps.style,
@@ -12,6 +12,7 @@ import {
12
12
  __experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
13
13
  __experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
14
14
  __experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,
15
+ __experimentalElementButtonClassName,
15
16
  } from '@wordpress/block-editor';
16
17
 
17
18
  export default function save( { attributes, className } ) {
@@ -41,7 +42,8 @@ export default function save( { attributes, className } ) {
41
42
  // For backwards compatibility add style that isn't provided via
42
43
  // block support.
43
44
  'no-border-radius': style?.border?.radius === 0,
44
- }
45
+ },
46
+ __experimentalElementButtonClassName
45
47
  );
46
48
  const buttonStyle = {
47
49
  ...borderProps.style,
@@ -21,7 +21,7 @@ exports[`Buttons block justify content sets Justify items right option 1`] = `
21
21
  exports[`Buttons block when a button is shown adjusts the border radius 1`] = `
22
22
  "<!-- wp:buttons -->
23
23
  <div class=\\"wp-block-buttons\\"><!-- wp:button {\\"style\\":{\\"border\\":{\\"radius\\":\\"6px\\"}}} -->
24
- <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link\\" href=\\"\\" style=\\"border-radius:6px\\">Hello</a></div>
24
+ <div class=\\"wp-block-button\\"><a class=\\"wp-block-button__link wp-element-button\\" href=\\"\\" style=\\"border-radius:6px\\">Hello</a></div>
25
25
  <!-- /wp:button --></div>
26
26
  <!-- /wp:buttons -->"
27
27
  `;
@@ -32,7 +32,7 @@ describe( 'Buttons block', () => {
32
32
  it( 'adjusts the border radius', async () => {
33
33
  const initialHtml = `<!-- wp:buttons -->
34
34
  <div class="wp-block-buttons"><!-- wp:button {"style":{"border":{"radius":"5px"}}} -->
35
- <div class="wp-block-button"><a class="wp-block-button__link" style="border-radius:5px" >Hello</a></div>
35
+ <div class="wp-block-button"><a class="wp-block-button__link wp-element-button" style="border-radius:5px" >Hello</a></div>
36
36
  <!-- /wp:button --></div>
37
37
  <!-- /wp:buttons -->`;
38
38
  const { getByA11yLabel } = await initializeEditor( {
@@ -28,7 +28,9 @@
28
28
  }
29
29
  },
30
30
  "spacing": {
31
- "blockGap": true,
31
+ "blockGap": {
32
+ "__experimentalDefault": "2em"
33
+ },
32
34
  "margin": [ "top", "bottom" ],
33
35
  "padding": true,
34
36
  "__experimentalDefaultControls": {