@wordpress/block-library 9.36.1-next.738bb1424.0 → 9.36.2-next.8fd3f8831.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 +4 -0
  2. package/build/accordion-heading/deprecated.cjs +120 -1
  3. package/build/accordion-heading/deprecated.cjs.map +2 -2
  4. package/build/accordion-heading/edit.cjs +9 -1
  5. package/build/accordion-heading/edit.cjs.map +3 -3
  6. package/build/accordion-heading/save.cjs +1 -0
  7. package/build/accordion-heading/save.cjs.map +2 -2
  8. package/build/accordion-item/block.json +3 -0
  9. package/build/accordion-item/edit.cjs +3 -37
  10. package/build/accordion-item/edit.cjs.map +2 -2
  11. package/build/accordion-panel/block.json +1 -4
  12. package/build/accordion-panel/edit.cjs +3 -2
  13. package/build/accordion-panel/edit.cjs.map +2 -2
  14. package/build/breadcrumbs/block.json +1 -2
  15. package/build/breadcrumbs/edit.cjs +2 -1
  16. package/build/breadcrumbs/edit.cjs.map +2 -2
  17. package/build/button/index.cjs +9 -1
  18. package/build/button/index.cjs.map +2 -2
  19. package/build/buttons/block.json +1 -0
  20. package/build/comment-author-name/block.json +1 -3
  21. package/build/comment-author-name/deprecated.cjs +57 -1
  22. package/build/comment-author-name/deprecated.cjs.map +3 -3
  23. package/build/comment-author-name/edit.cjs +9 -19
  24. package/build/comment-author-name/edit.cjs.map +3 -3
  25. package/build/freeform/edit.cjs +48 -174
  26. package/build/freeform/edit.cjs.map +2 -2
  27. package/build/freeform/modal.cjs +51 -67
  28. package/build/freeform/modal.cjs.map +2 -2
  29. package/build/index.cjs +2 -2
  30. package/build/index.cjs.map +2 -2
  31. package/build/list/block.json +2 -1
  32. package/build/query/edit/query-content.cjs +4 -3
  33. package/build/query/edit/query-content.cjs.map +2 -2
  34. package/build/query/edit/query-placeholder.cjs +4 -3
  35. package/build/query/edit/query-placeholder.cjs.map +2 -2
  36. package/build/query/edit/query-toolbar.cjs +19 -7
  37. package/build/query/edit/query-toolbar.cjs.map +3 -3
  38. package/build/social-links/block.json +2 -1
  39. package/build-module/accordion-heading/deprecated.js +122 -2
  40. package/build-module/accordion-heading/deprecated.js.map +2 -2
  41. package/build-module/accordion-heading/edit.js +11 -2
  42. package/build-module/accordion-heading/edit.js.map +2 -2
  43. package/build-module/accordion-heading/save.js +1 -0
  44. package/build-module/accordion-heading/save.js.map +2 -2
  45. package/build-module/accordion-item/block.json +3 -0
  46. package/build-module/accordion-item/edit.js +3 -37
  47. package/build-module/accordion-item/edit.js.map +2 -2
  48. package/build-module/accordion-panel/block.json +1 -4
  49. package/build-module/accordion-panel/edit.js +3 -2
  50. package/build-module/accordion-panel/edit.js.map +2 -2
  51. package/build-module/breadcrumbs/block.json +1 -2
  52. package/build-module/breadcrumbs/edit.js +2 -1
  53. package/build-module/breadcrumbs/edit.js.map +2 -2
  54. package/build-module/button/index.js +9 -1
  55. package/build-module/button/index.js.map +2 -2
  56. package/build-module/buttons/block.json +1 -0
  57. package/build-module/comment-author-name/block.json +1 -3
  58. package/build-module/comment-author-name/deprecated.js +57 -1
  59. package/build-module/comment-author-name/deprecated.js.map +2 -2
  60. package/build-module/comment-author-name/edit.js +10 -25
  61. package/build-module/comment-author-name/edit.js.map +2 -2
  62. package/build-module/freeform/edit.js +56 -176
  63. package/build-module/freeform/edit.js.map +2 -2
  64. package/build-module/freeform/modal.js +55 -78
  65. package/build-module/freeform/modal.js.map +2 -2
  66. package/build-module/index.js +2 -2
  67. package/build-module/index.js.map +2 -2
  68. package/build-module/list/block.json +2 -1
  69. package/build-module/query/edit/query-content.js +5 -5
  70. package/build-module/query/edit/query-content.js.map +2 -2
  71. package/build-module/query/edit/query-placeholder.js +4 -4
  72. package/build-module/query/edit/query-placeholder.js.map +2 -2
  73. package/build-module/query/edit/query-toolbar.js +22 -7
  74. package/build-module/query/edit/query-toolbar.js.map +2 -2
  75. package/build-module/social-links/block.json +2 -1
  76. package/build-style/audio/style-rtl.css +4 -0
  77. package/build-style/audio/style.css +4 -0
  78. package/build-style/audio/theme-rtl.css +4 -0
  79. package/build-style/audio/theme.css +4 -0
  80. package/build-style/columns/style-rtl.css +4 -0
  81. package/build-style/columns/style.css +4 -0
  82. package/build-style/common-rtl.css +4 -0
  83. package/build-style/common.css +4 -0
  84. package/build-style/editor-rtl.css +9 -324
  85. package/build-style/editor.css +9 -328
  86. package/build-style/embed/style-rtl.css +4 -0
  87. package/build-style/embed/style.css +4 -0
  88. package/build-style/embed/theme-rtl.css +4 -0
  89. package/build-style/embed/theme.css +4 -0
  90. package/build-style/freeform/editor-rtl.css +10 -330
  91. package/build-style/freeform/editor.css +10 -334
  92. package/build-style/gallery/editor-rtl.css +4 -0
  93. package/build-style/gallery/editor.css +4 -0
  94. package/build-style/gallery/style-rtl.css +4 -0
  95. package/build-style/gallery/style.css +4 -0
  96. package/build-style/gallery/theme-rtl.css +4 -0
  97. package/build-style/gallery/theme.css +4 -0
  98. package/build-style/html/editor-rtl.css +4 -0
  99. package/build-style/html/editor.css +4 -0
  100. package/build-style/image/editor-rtl.css +4 -0
  101. package/build-style/image/editor.css +4 -0
  102. package/build-style/image/style-rtl.css +4 -0
  103. package/build-style/image/style.css +4 -0
  104. package/build-style/image/theme-rtl.css +4 -0
  105. package/build-style/image/theme.css +4 -0
  106. package/build-style/latest-posts/style-rtl.css +4 -0
  107. package/build-style/latest-posts/style.css +4 -0
  108. package/build-style/navigation/editor-rtl.css +4 -0
  109. package/build-style/navigation/editor.css +4 -0
  110. package/build-style/navigation/style-rtl.css +4 -0
  111. package/build-style/navigation/style.css +4 -0
  112. package/build-style/navigation-submenu/editor-rtl.css +4 -0
  113. package/build-style/navigation-submenu/editor.css +4 -0
  114. package/build-style/page-list/editor-rtl.css +4 -0
  115. package/build-style/page-list/editor.css +4 -0
  116. package/build-style/paragraph/editor-rtl.css +5 -0
  117. package/build-style/paragraph/editor.css +5 -0
  118. package/build-style/post-template/style-rtl.css +4 -0
  119. package/build-style/post-template/style.css +4 -0
  120. package/build-style/query/editor-rtl.css +4 -0
  121. package/build-style/query/editor.css +4 -0
  122. package/build-style/rss/style-rtl.css +4 -0
  123. package/build-style/rss/style.css +4 -0
  124. package/build-style/shortcode/editor-rtl.css +4 -0
  125. package/build-style/shortcode/editor.css +4 -0
  126. package/build-style/style-rtl.css +4 -0
  127. package/build-style/style.css +4 -0
  128. package/build-style/table/editor-rtl.css +4 -0
  129. package/build-style/table/editor.css +4 -0
  130. package/build-style/table/theme-rtl.css +4 -0
  131. package/build-style/table/theme.css +4 -0
  132. package/build-style/template-part/editor-rtl.css +4 -0
  133. package/build-style/template-part/editor.css +4 -0
  134. package/build-style/theme-rtl.css +4 -0
  135. package/build-style/theme.css +4 -0
  136. package/build-style/video/style-rtl.css +4 -0
  137. package/build-style/video/style.css +4 -0
  138. package/build-style/video/theme-rtl.css +4 -0
  139. package/build-style/video/theme.css +4 -0
  140. package/package.json +37 -37
  141. package/src/accordion-heading/deprecated.js +122 -1
  142. package/src/accordion-heading/edit.js +11 -1
  143. package/src/accordion-heading/save.js +1 -0
  144. package/src/accordion-item/block.json +3 -0
  145. package/src/accordion-item/edit.js +4 -38
  146. package/src/accordion-panel/block.json +1 -4
  147. package/src/accordion-panel/edit.js +3 -4
  148. package/src/breadcrumbs/block.json +1 -2
  149. package/src/breadcrumbs/edit.js +2 -1
  150. package/src/breadcrumbs/index.php +23 -1
  151. package/src/button/index.js +12 -0
  152. package/src/button/test/get-experimental-label.js +50 -0
  153. package/src/buttons/block.json +1 -0
  154. package/src/comment-author-name/block.json +1 -3
  155. package/src/comment-author-name/deprecated.js +61 -1
  156. package/src/comment-author-name/edit.js +10 -34
  157. package/src/freeform/edit.js +60 -245
  158. package/src/freeform/editor.scss +1 -382
  159. package/src/freeform/modal.js +47 -80
  160. package/src/index.js +1 -1
  161. package/src/list/block.json +2 -1
  162. package/src/paragraph/editor.scss +8 -0
  163. package/src/post-date/index.php +4 -7
  164. package/src/query/edit/query-content.js +3 -3
  165. package/src/query/edit/query-placeholder.js +3 -3
  166. package/src/query/edit/query-toolbar.js +47 -31
  167. package/src/social-links/block.json +2 -1
  168. package/src/term-template/index.php +1 -1
@@ -1,386 +1,5 @@
1
- @use "sass:math";
2
- @use "@wordpress/base-styles/colors" as *;
3
- @use "@wordpress/base-styles/mixins" as *;
4
1
  @use "@wordpress/base-styles/variables" as *;
5
- @use "@wordpress/base-styles/z-index" as *;
6
-
7
- .wp-block-freeform.block-library-rich-text__tinymce {
8
- height: auto; /* Allow height of embed iframes to be calculated properly */
9
- p,
10
- li {
11
- line-height: $editor-line-height;
12
- }
13
-
14
- ul,
15
- ol {
16
- padding-left: 2.5em;
17
- margin-left: 0;
18
- }
19
-
20
- blockquote {
21
- margin: 0;
22
- box-shadow: inset 0 0 0 0 $gray-300;
23
- border-left: 4px solid $black;
24
- padding-left: 1em;
25
- }
26
-
27
- pre {
28
- white-space: pre-wrap;
29
- font-family: $editor-html-font;
30
- font-size: $text-editor-font-size;
31
- color: $gray-900;
32
- }
33
-
34
- > *:first-child {
35
- margin-top: 0;
36
- }
37
-
38
- > *:last-child {
39
- margin-bottom: 0;
40
- }
41
-
42
- &.mce-edit-focus {
43
- outline: none;
44
- }
45
-
46
- a {
47
- color: var(--wp-admin-theme-color);
48
- }
49
-
50
- &:focus a[data-mce-selected] {
51
- padding: 0 2px;
52
- margin: 0 -2px;
53
- border-radius: 2px;
54
- box-shadow: 0 0 0 $border-width #e5f5fa;
55
- background: #e5f5fa;
56
- }
57
-
58
- code {
59
- padding: 2px;
60
- border-radius: 2px;
61
- color: $gray-900;
62
- background: $gray-100;
63
- font-family: $editor-html-font;
64
- font-size: 14px;
65
- }
66
-
67
- &:focus code[data-mce-selected] {
68
- background: $gray-300;
69
- }
70
-
71
- .alignright {
72
- /*rtl:ignore*/
73
- float: right;
74
- /*rtl:ignore*/
75
- margin: 0.5em 0 0.5em 1em;
76
- }
77
-
78
- .alignleft {
79
- /*rtl:ignore*/
80
- float: left;
81
- /*rtl:ignore*/
82
- margin: 0.5em 1em 0.5em 0;
83
- }
84
-
85
- .aligncenter {
86
- display: block;
87
- margin-left: auto;
88
- margin-right: auto;
89
- }
90
-
91
- .wp-more-tag {
92
- width: 96%;
93
- height: 20px;
94
- display: block;
95
- margin: 15px auto;
96
- outline: 0;
97
- cursor: default;
98
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAADtgAAAAoBAMAAAA86gLBAAAAJFBMVEVMaXG7u7vBwcHDw8POzs68vLzGxsbMzMy+vr7AwMDQ0NDGxsYKLGzpAAAADHRSTlMA///zWf+/f///TMxNVGuqAAABwklEQVR4Ae3dMXLaQBTH4bfj8UCpx8hq0vgKvgFNemhT6Qo6gg6R+0ZahM2QLmyBJ99XWP9V5+o3jIUcLQEAAAAAAAAAAAAAAAAAAAAAAABQ8j0WL9lfTtlt18uNXAUA8O/KVtfa1tdcrOdSh9gCQAMlh1hMNbZZ1bsrsQWABsrhLRbz7z5in/32UbfUMUbkMQCAh5RfGYv82UdMdZ6HS2wjT2ILAI8r3XmM2B3WvM59vfO2xXYW2yYAENuPU8S+X/N67mKxzy225yaxBQCxLV392UdcvwV0jPVUj98ntkBWT7C7+9u2/V/vGtvXIWJ6/4rtbottWa6Ri0NUT/u72LYttrb97LHdvUXMxxrb8TO2W2TF1rYbbLG1bbGNjMi4+2Sbi1FsbbvNFlvbFtt5fDnE3d9sP1/XeIyV2Nr2U2/guZUuptNrH/dPI9eLB6SaAEBs6wPJf3/PNk9tYgsAYrv/8TFuzx/fvkFqGtrEFgDEdpcZUb7ejXy6ntrEFgDENvL6gsas4vbdyKt4DACI7TxElJv/Z7udpqFNbAFAbKduy2uU2trttM/x28UWAAAAAAAAAAAAAAAAAAAAAAAAAADgDyPwGmGTCZp7AAAAAElFTkSuQmCC);
99
- background-size: 1900px 20px;
100
- background-repeat: no-repeat;
101
- background-position: center;
102
- }
103
-
104
- /* Remove blue highlighting of selected images in WebKit */
105
- img::selection {
106
- background-color: transparent;
107
- }
108
-
109
- div.mceTemp {
110
- -ms-user-select: element;
111
- }
112
-
113
- /* Image captions */
114
- dl.wp-caption {
115
- margin: 0; /* dl browser reset */
116
- max-width: 100%;
117
-
118
- a,
119
- img {
120
- display: block;
121
- }
122
-
123
- &,
124
- & * {
125
- -webkit-user-drag: none;
126
- }
127
-
128
- .wp-caption-dd {
129
- padding-top: 0.5em;
130
- margin: 0; /* browser dd reset */
131
- }
132
- }
133
-
134
- /* WP Views */
135
- .wpview {
136
- width: 99.99%; /* All IE need hasLayout, incl. 11 (ugh, not again!!) */
137
- position: relative;
138
- clear: both;
139
- margin-bottom: 16px;
140
- border: 1px solid transparent;
141
-
142
- iframe {
143
- display: block;
144
- max-width: 100%;
145
- background: transparent;
146
- }
147
-
148
- .mce-shim {
149
- position: absolute;
150
- top: 0;
151
- right: 0;
152
- bottom: 0;
153
- left: 0;
154
- }
155
-
156
- &[data-mce-selected="2"] .mce-shim {
157
- display: none;
158
- }
159
-
160
- .loading-placeholder {
161
- border: 1px dashed $gray-300;
162
- padding: 10px;
163
- }
164
-
165
- .wpview-error {
166
- border: 1px solid $gray-300;
167
- padding: 1em 0;
168
- margin: 0;
169
- word-wrap: break-word;
170
-
171
- p {
172
- margin: 0;
173
- text-align: center;
174
- }
175
- }
176
-
177
- &[data-mce-selected] .loading-placeholder,
178
- &[data-mce-selected] .wpview-error {
179
- border-color: transparent;
180
- }
181
-
182
- .dashicons {
183
- display: block;
184
- margin: 0 auto;
185
- width: 32px;
186
- height: 32px;
187
- font-size: 32px;
188
- }
189
-
190
- // The following gallery styles were replicated
191
- // from the styles applied in the tinymce skin,
192
- // /wp-includes/js/tinymce/skins/wordpress/wp-content.css.
193
- &.wpview-type-gallery::after {
194
- content: "";
195
- display: table;
196
- clear: both;
197
- }
198
- }
199
-
200
- .gallery img[data-mce-selected]:focus {
201
- outline: none;
202
- }
203
-
204
- .gallery a {
205
- cursor: default;
206
- }
207
-
208
- .gallery {
209
- margin: auto -6px;
210
- padding: 6px 0;
211
- line-height: 1;
212
- overflow-x: hidden;
213
- }
214
-
215
- .gallery .gallery-item {
216
- float: left;
217
- margin: 0;
218
- text-align: center;
219
- padding: 6px;
220
- box-sizing: border-box;
221
- }
222
-
223
- .gallery .gallery-caption,
224
- .gallery .gallery-icon {
225
- margin: 0;
226
- }
227
-
228
- .gallery .gallery-caption {
229
- font-size: 13px;
230
- margin: 4px 0;
231
- }
232
-
233
- @for $i from 1 through 9 {
234
- .gallery-columns-#{ $i } .gallery-item {
235
- width: #{ math.div(100, $i) + "%" };
236
- }
237
- }
238
-
239
- .gallery img {
240
- max-width: 100%;
241
- height: auto;
242
- border: none;
243
- padding: 0;
244
- }
245
- }
246
-
247
- div[data-type="core/freeform"] {
248
- &::before {
249
- border: $border-width solid $gray-300;
250
- // Windows High Contrast mode will show this outline.
251
- outline: $border-width solid transparent;
252
-
253
- @media not (prefers-reduced-motion) {
254
- transition: border-color 0.1s linear, box-shadow 0.1s linear;
255
- }
256
- }
257
-
258
- &.is-selected::before {
259
- border-color: $gray-900;
260
- }
261
-
262
- .block-editor-block-contextual-toolbar + div {
263
- margin-top: 0;
264
- padding-top: 0;
265
- }
266
-
267
- // Ensure aligned blocks at end are within the selected block.
268
- &.is-selected .block-library-rich-text__tinymce::after {
269
- content: "";
270
- display: table;
271
- clear: both;
272
- }
273
- }
274
-
275
- // mce global styles: the toolbars may get appended to <body>
276
- .mce-toolbar-grp {
277
- // Not sure why this is necessary, there seems to be a skin file that
278
- // overrides this upstream.
279
- .mce-btn.mce-active button,
280
- .mce-btn.mce-active:hover button,
281
- .mce-btn.mce-active i,
282
- .mce-btn.mce-active:hover i {
283
- color: $gray-900;
284
- }
285
-
286
- // Prevent toolbar clipping on heading style in RTL languages
287
- .mce-rtl .mce-flow-layout-item.mce-last {
288
- margin-right: 0;
289
- margin-left: 8px;
290
- }
291
-
292
- // Prevent i tags in buttons from picking up theme editor styles.
293
- .mce-btn i {
294
- font-style: normal;
295
- }
296
- }
297
-
298
- .block-library-classic__toolbar {
299
- // Only display the classic toolbar when the classic block is selected or when the
300
- // block is empty or loading and the placeholder should be displayed.
301
- display: none;
302
- width: auto;
303
- margin: 0;
304
- position: sticky;
305
- z-index: z-index(".block-library-classic__toolbar");
306
- top: 0;
307
- border: $border-width solid $gray-300;
308
- border-bottom: none;
309
- border-radius: $radius-small;
310
- margin-bottom: $grid-unit-10;
311
-
312
- // On mobile, toolbars go edge to edge.
313
- padding: 0;
314
-
315
- // By using the `data-type` attribute in this selector it ensures these
316
- // styles only appear when the block itself is selected, without it they
317
- // would also show when a parent block is selected.
318
- div[data-type="core/freeform"].is-selected & {
319
- display: block;
320
- border-color: $gray-900;
321
- }
322
-
323
- // Remove the box shadow to mimic other Gutenberg UI.
324
- .mce-tinymce {
325
- box-shadow: none;
326
- }
327
-
328
- @include break-small() {
329
- padding: 0;
330
- }
331
-
332
- &:empty {
333
- display: block;
334
- background: #f5f5f5;
335
- border-bottom: $border-width solid #e2e4e7;
336
-
337
- &::before {
338
- font-family: $default-font;
339
- font-size: $default-font-size;
340
- content: attr(data-placeholder);
341
- color: #555d66;
342
- line-height: 37px;
343
- padding: $block-padding;
344
- }
345
- }
346
-
347
- div.mce-toolbar-grp {
348
- border-bottom: 1px solid $gray-900;
349
- }
350
-
351
- // Overwrite inline styles.
352
- .mce-tinymce-inline,
353
- .mce-tinymce-inline > div,
354
- div.mce-toolbar-grp,
355
- div.mce-toolbar-grp > div,
356
- .mce-menubar,
357
- .mce-menubar > div {
358
- height: auto !important;
359
- width: 100% !important;
360
- }
361
-
362
- .mce-container-body.mce-abs-layout {
363
- overflow: visible;
364
- }
365
-
366
- .mce-menubar,
367
- div.mce-toolbar-grp {
368
- position: static;
369
- }
370
-
371
- // Adjust padding to not cause a jump.
372
- .mce-toolbar-grp > div {
373
- padding: 1px 3px;
374
- }
375
-
376
- .mce-toolbar-grp .mce-toolbar:not(:first-child) {
377
- display: none;
378
- }
379
-
380
- &.has-advanced-toolbar .mce-toolbar-grp .mce-toolbar {
381
- display: block;
382
- }
383
- }
2
+ @use "@wordpress/base-styles/mixins" as *;
384
3
 
385
4
  .block-editor-freeform-modal {
386
5
  .block-editor-freeform-modal__content {
@@ -1,16 +1,9 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { BlockControls, store } from '@wordpress/block-editor';
5
- import {
6
- ToolbarGroup,
7
- ToolbarButton,
8
- Modal,
9
- Button,
10
- Flex,
11
- FlexItem,
12
- } from '@wordpress/components';
13
- import { useEffect, useState, RawHTML } from '@wordpress/element';
4
+ import { store } from '@wordpress/block-editor';
5
+ import { Modal, Button, Flex, FlexItem } from '@wordpress/components';
6
+ import { useEffect, useState } from '@wordpress/element';
14
7
  import { __ } from '@wordpress/i18n';
15
8
  import { useSelect } from '@wordpress/data';
16
9
  import { fullscreen } from '@wordpress/icons';
@@ -74,81 +67,55 @@ function ClassicEdit( props ) {
74
67
  return <textarea { ...props } />;
75
68
  }
76
69
 
77
- export default function ModalEdit( props ) {
78
- const {
79
- clientId,
80
- attributes: { content },
81
- setAttributes,
82
- onReplace,
83
- } = props;
84
- const [ isOpen, setOpen ] = useState( false );
70
+ export default function ModalEdit( { clientId, content, onClose, onChange } ) {
85
71
  const [ isModalFullScreen, setIsModalFullScreen ] = useState( false );
86
72
  const id = `editor-${ clientId }`;
87
73
 
88
- const onClose = () => ( content ? setOpen( false ) : onReplace( [] ) );
89
-
90
74
  return (
91
- <>
92
- <BlockControls>
93
- <ToolbarGroup>
94
- <ToolbarButton onClick={ () => setOpen( true ) }>
95
- { __( 'Edit' ) }
96
- </ToolbarButton>
97
- </ToolbarGroup>
98
- </BlockControls>
99
- { content && <RawHTML>{ content }</RawHTML> }
100
- { ( isOpen || ! content ) && (
101
- <Modal
102
- title={ __( 'Classic Editor' ) }
103
- onRequestClose={ onClose }
104
- shouldCloseOnClickOutside={ false }
105
- overlayClassName="block-editor-freeform-modal"
106
- isFullScreen={ isModalFullScreen }
107
- className="block-editor-freeform-modal__content"
108
- headerActions={
109
- <ModalAuxiliaryActions
110
- onClick={ () =>
111
- setIsModalFullScreen( ! isModalFullScreen )
112
- }
113
- isModalFullScreen={ isModalFullScreen }
114
- />
75
+ <Modal
76
+ title={ __( 'Classic Editor' ) }
77
+ onRequestClose={ onClose }
78
+ shouldCloseOnClickOutside={ false }
79
+ overlayClassName="block-editor-freeform-modal"
80
+ isFullScreen={ isModalFullScreen }
81
+ className="block-editor-freeform-modal__content"
82
+ headerActions={
83
+ <ModalAuxiliaryActions
84
+ onClick={ () =>
85
+ setIsModalFullScreen( ! isModalFullScreen )
115
86
  }
116
- >
117
- <ClassicEdit id={ id } defaultValue={ content } />
118
- <Flex
119
- className="block-editor-freeform-modal__actions"
120
- justify="flex-end"
121
- expanded={ false }
87
+ isModalFullScreen={ isModalFullScreen }
88
+ />
89
+ }
90
+ >
91
+ <ClassicEdit id={ id } defaultValue={ content } />
92
+ <Flex
93
+ className="block-editor-freeform-modal__actions"
94
+ justify="flex-end"
95
+ expanded={ false }
96
+ >
97
+ <FlexItem>
98
+ <Button
99
+ __next40pxDefaultSize
100
+ variant="tertiary"
101
+ onClick={ onClose }
102
+ >
103
+ { __( 'Cancel' ) }
104
+ </Button>
105
+ </FlexItem>
106
+ <FlexItem>
107
+ <Button
108
+ __next40pxDefaultSize
109
+ variant="primary"
110
+ onClick={ () => {
111
+ onChange( window.wp.oldEditor.getContent( id ) );
112
+ onClose();
113
+ } }
122
114
  >
123
- <FlexItem>
124
- <Button
125
- __next40pxDefaultSize
126
- variant="tertiary"
127
- onClick={ onClose }
128
- >
129
- { __( 'Cancel' ) }
130
- </Button>
131
- </FlexItem>
132
- <FlexItem>
133
- <Button
134
- __next40pxDefaultSize
135
- variant="primary"
136
- onClick={ () => {
137
- setAttributes( {
138
- content:
139
- window.wp.oldEditor.getContent(
140
- id
141
- ),
142
- } );
143
- setOpen( false );
144
- } }
145
- >
146
- { __( 'Save' ) }
147
- </Button>
148
- </FlexItem>
149
- </Flex>
150
- </Modal>
151
- ) }
152
- </>
115
+ { __( 'Save' ) }
116
+ </Button>
117
+ </FlexItem>
118
+ </Flex>
119
+ </Modal>
153
120
  );
154
121
  }
package/src/index.js CHANGED
@@ -262,10 +262,10 @@ const getAllBlocks = () => {
262
262
  termTemplate,
263
263
  queryTitle,
264
264
  postAuthorBiography,
265
+ breadcrumbs,
265
266
  ];
266
267
 
267
268
  if ( window?.__experimentalEnableBlockExperiments ) {
268
- blocks.push( breadcrumbs );
269
269
  blocks.push( tab );
270
270
  blocks.push( tabs );
271
271
  }
@@ -78,7 +78,8 @@
78
78
  "__experimentalSlashInserter": true,
79
79
  "interactivity": {
80
80
  "clientNavigation": true
81
- }
81
+ },
82
+ "listView": true
82
83
  },
83
84
  "selectors": {
84
85
  "border": ".wp-block-list:not(.wp-block-list .wp-block-list)"
@@ -29,3 +29,11 @@
29
29
  opacity: 0;
30
30
  }
31
31
  }
32
+
33
+ // This is the equivalent of the `body.rtl` style.scss rule for RTL,
34
+ // but it's applied to the html element instead of the body element
35
+ // since the `body.rtl` style is not applied to the iframe in the editor.
36
+ html[dir="rtl"] .has-drop-cap:not(:focus)::first-letter {
37
+ float: initial;
38
+ margin-left: 0.1em;
39
+ }
@@ -81,16 +81,13 @@ function render_block_core_post_date( $attributes, $content, $block ) {
81
81
 
82
82
  $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
83
83
 
84
+ $time_tag = sprintf( '<time datetime="%1$s">%2$s</time>', $unformatted_date, $formatted_date );
85
+
84
86
  if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $block->context['postId'] ) ) {
85
- $formatted_date = sprintf( '<a href="%1s">%2s</a>', get_the_permalink( $block->context['postId'] ), $formatted_date );
87
+ $time_tag = sprintf( '<a href="%1s">%2s</a>', get_the_permalink( $block->context['postId'] ), $time_tag );
86
88
  }
87
89
 
88
- return sprintf(
89
- '<div %1$s><time datetime="%2$s">%3$s</time></div>',
90
- $wrapper_attributes,
91
- $unformatted_date,
92
- $formatted_date
93
- );
90
+ return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, $time_tag );
94
91
  }
95
92
 
96
93
  /**
@@ -10,7 +10,6 @@ import {
10
10
  store as blockEditorStore,
11
11
  useInnerBlocksProps,
12
12
  privateApis as blockEditorPrivateApis,
13
- BlockControls,
14
13
  } from '@wordpress/block-editor';
15
14
  import { __ } from '@wordpress/i18n';
16
15
  import { store as coreStore } from '@wordpress/core-data';
@@ -36,6 +35,7 @@ export default function QueryContent( {
36
35
  clientId,
37
36
  context,
38
37
  name,
38
+ isSelected,
39
39
  } ) {
40
40
  const {
41
41
  queryId,
@@ -130,13 +130,13 @@ export default function QueryContent( {
130
130
 
131
131
  return (
132
132
  <>
133
- <BlockControls group="other">
133
+ { isSelected && (
134
134
  <QueryToolbar
135
135
  clientId={ clientId }
136
136
  attributes={ attributes }
137
137
  hasInnerBlocks
138
138
  />
139
- </BlockControls>
139
+ ) }
140
140
  <EnhancedPaginationModal
141
141
  attributes={ attributes }
142
142
  setAttributes={ setAttributes }
@@ -10,7 +10,6 @@ import { useState } from '@wordpress/element';
10
10
  import {
11
11
  store as blockEditorStore,
12
12
  __experimentalBlockVariationPicker,
13
- BlockControls,
14
13
  useBlockProps,
15
14
  } from '@wordpress/block-editor';
16
15
  import { Button, Placeholder } from '@wordpress/components';
@@ -29,6 +28,7 @@ export default function QueryPlaceholder( {
29
28
  clientId,
30
29
  name,
31
30
  openPatternSelectionModal,
31
+ isSelected,
32
32
  } ) {
33
33
  const [ isStartingBlank, setIsStartingBlank ] = useState( false );
34
34
  const [ containerWidth, setContainerWidth ] = useState( 0 );
@@ -79,13 +79,13 @@ export default function QueryPlaceholder( {
79
79
  }
80
80
  return (
81
81
  <div { ...blockProps }>
82
- <BlockControls>
82
+ { isSelected && (
83
83
  <QueryToolbar
84
84
  clientId={ clientId }
85
85
  attributes={ attributes }
86
86
  hasInnerBlocks={ false }
87
87
  />
88
- </BlockControls>
88
+ ) }
89
89
  <Placeholder
90
90
  className="block-editor-media-placeholder"
91
91
  icon={ ! isSmallContainer && icon }