@wordpress/block-library 8.19.3 → 8.19.4
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.
- package/CHANGELOG.md +7 -0
- package/build/cover/edit/inspector-controls.js +1 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/embed/edit.js +17 -0
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js +17 -0
- package/build/embed/edit.native.js.map +1 -1
- package/build/image/image.js +1 -1
- package/build/image/image.js.map +1 -1
- package/build/image/view.js +14 -4
- package/build/image/view.js.map +1 -1
- package/build/latest-posts/edit.js +6 -2
- package/build/latest-posts/edit.js.map +1 -1
- package/build/media-text/edit.js +1 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/navigation/edit/deleted-navigation-warning.js +6 -4
- package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build/navigation/edit/index.js +3 -2
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +2 -1
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +1 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/embed/edit.js +17 -0
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +17 -0
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/image/image.js +1 -1
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/view.js +14 -4
- package/build-module/image/view.js.map +1 -1
- package/build-module/latest-posts/edit.js +6 -2
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/media-text/edit.js +1 -1
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/navigation/edit/deleted-navigation-warning.js +7 -4
- package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build-module/navigation/edit/index.js +3 -2
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +2 -1
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-style/image/style-rtl.css +17 -2
- package/build-style/image/style.css +17 -2
- package/build-style/post-featured-image/style-rtl.css +3 -0
- package/build-style/post-featured-image/style.css +3 -0
- package/build-style/post-template/style-rtl.css +25 -0
- package/build-style/post-template/style.css +25 -0
- package/build-style/style-rtl.css +46 -2
- package/build-style/style.css +46 -2
- package/package.json +32 -32
- package/src/cover/edit/inspector-controls.js +1 -1
- package/src/embed/edit.js +15 -0
- package/src/embed/edit.native.js +15 -0
- package/src/image/image.js +1 -1
- package/src/image/index.php +64 -46
- package/src/image/style.scss +23 -2
- package/src/image/view.js +14 -4
- package/src/latest-posts/edit.js +10 -2
- package/src/latest-posts/index.php +18 -8
- package/src/media-text/edit.js +1 -1
- package/src/navigation/edit/deleted-navigation-warning.js +9 -4
- package/src/navigation/edit/index.js +26 -17
- package/src/navigation/edit/inner-blocks.js +1 -0
- package/src/post-featured-image/style.scss +4 -0
- package/src/post-template/style.scss +20 -0
|
@@ -4,14 +4,19 @@
|
|
|
4
4
|
import { Warning } from '@wordpress/block-editor';
|
|
5
5
|
import { Button } from '@wordpress/components';
|
|
6
6
|
import { __ } from '@wordpress/i18n';
|
|
7
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
7
8
|
|
|
8
9
|
function DeletedNavigationWarning( { onCreateNew } ) {
|
|
9
10
|
return (
|
|
10
11
|
<Warning>
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
{ createInterpolateElement(
|
|
13
|
+
__(
|
|
14
|
+
'Navigation menu has been deleted or is unavailable. <button>Create a new menu?</button>'
|
|
15
|
+
),
|
|
16
|
+
{
|
|
17
|
+
button: <Button onClick={ onCreateNew } variant="link" />,
|
|
18
|
+
}
|
|
19
|
+
) }
|
|
15
20
|
</Warning>
|
|
16
21
|
);
|
|
17
22
|
}
|
|
@@ -93,6 +93,7 @@ function Navigation( {
|
|
|
93
93
|
// navigation block settings.
|
|
94
94
|
hasSubmenuIndicatorSetting = true,
|
|
95
95
|
customPlaceholder: CustomPlaceholder = null,
|
|
96
|
+
__unstableLayoutClassNames: layoutClassNames,
|
|
96
97
|
} ) {
|
|
97
98
|
const {
|
|
98
99
|
openSubmenusOnClick,
|
|
@@ -293,23 +294,31 @@ function Navigation( {
|
|
|
293
294
|
const isResponsive = 'never' !== overlayMenu;
|
|
294
295
|
const blockProps = useBlockProps( {
|
|
295
296
|
ref: navRef,
|
|
296
|
-
className: classnames(
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
297
|
+
className: classnames(
|
|
298
|
+
className,
|
|
299
|
+
{
|
|
300
|
+
'items-justified-right': justifyContent === 'right',
|
|
301
|
+
'items-justified-space-between':
|
|
302
|
+
justifyContent === 'space-between',
|
|
303
|
+
'items-justified-left': justifyContent === 'left',
|
|
304
|
+
'items-justified-center': justifyContent === 'center',
|
|
305
|
+
'is-vertical': orientation === 'vertical',
|
|
306
|
+
'no-wrap': flexWrap === 'nowrap',
|
|
307
|
+
'is-responsive': isResponsive,
|
|
308
|
+
'has-text-color': !! textColor.color || !! textColor?.class,
|
|
309
|
+
[ getColorClassName( 'color', textColor?.slug ) ]:
|
|
310
|
+
!! textColor?.slug,
|
|
311
|
+
'has-background':
|
|
312
|
+
!! backgroundColor.color || backgroundColor.class,
|
|
313
|
+
[ getColorClassName(
|
|
314
|
+
'background-color',
|
|
315
|
+
backgroundColor?.slug
|
|
316
|
+
) ]: !! backgroundColor?.slug,
|
|
317
|
+
[ `has-text-decoration-${ textDecoration }` ]: textDecoration,
|
|
318
|
+
'block-editor-block-content-overlay': hasBlockOverlay,
|
|
319
|
+
},
|
|
320
|
+
layoutClassNames
|
|
321
|
+
),
|
|
313
322
|
style: {
|
|
314
323
|
color: ! textColor?.slug && textColor?.color,
|
|
315
324
|
backgroundColor: ! backgroundColor?.slug && backgroundColor?.color,
|
|
@@ -37,3 +37,23 @@
|
|
|
37
37
|
grid-template-columns: 1fr;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
.wp-block-post-template-is-layout-constrained > li > .alignright,
|
|
42
|
+
.wp-block-post-template-is-layout-flow > li > .alignright {
|
|
43
|
+
float: right;
|
|
44
|
+
margin-inline-start: 2em;
|
|
45
|
+
margin-inline-end: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.wp-block-post-template-is-layout-constrained > li > .alignleft,
|
|
49
|
+
.wp-block-post-template-is-layout-flow > li > .alignleft {
|
|
50
|
+
float: left;
|
|
51
|
+
margin-inline-start: 0;
|
|
52
|
+
margin-inline-end: 2em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.wp-block-post-template-is-layout-constrained > li > .aligncenter,
|
|
56
|
+
.wp-block-post-template-is-layout-flow > li > .aligncenter {
|
|
57
|
+
margin-inline-start: auto;
|
|
58
|
+
margin-inline-end: auto;
|
|
59
|
+
}
|