@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.
Files changed (65) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/cover/edit/inspector-controls.js +1 -1
  3. package/build/cover/edit/inspector-controls.js.map +1 -1
  4. package/build/embed/edit.js +17 -0
  5. package/build/embed/edit.js.map +1 -1
  6. package/build/embed/edit.native.js +17 -0
  7. package/build/embed/edit.native.js.map +1 -1
  8. package/build/image/image.js +1 -1
  9. package/build/image/image.js.map +1 -1
  10. package/build/image/view.js +14 -4
  11. package/build/image/view.js.map +1 -1
  12. package/build/latest-posts/edit.js +6 -2
  13. package/build/latest-posts/edit.js.map +1 -1
  14. package/build/media-text/edit.js +1 -1
  15. package/build/media-text/edit.js.map +1 -1
  16. package/build/navigation/edit/deleted-navigation-warning.js +6 -4
  17. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  18. package/build/navigation/edit/index.js +3 -2
  19. package/build/navigation/edit/index.js.map +1 -1
  20. package/build/navigation/edit/inner-blocks.js +2 -1
  21. package/build/navigation/edit/inner-blocks.js.map +1 -1
  22. package/build-module/cover/edit/inspector-controls.js +1 -1
  23. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  24. package/build-module/embed/edit.js +17 -0
  25. package/build-module/embed/edit.js.map +1 -1
  26. package/build-module/embed/edit.native.js +17 -0
  27. package/build-module/embed/edit.native.js.map +1 -1
  28. package/build-module/image/image.js +1 -1
  29. package/build-module/image/image.js.map +1 -1
  30. package/build-module/image/view.js +14 -4
  31. package/build-module/image/view.js.map +1 -1
  32. package/build-module/latest-posts/edit.js +6 -2
  33. package/build-module/latest-posts/edit.js.map +1 -1
  34. package/build-module/media-text/edit.js +1 -1
  35. package/build-module/media-text/edit.js.map +1 -1
  36. package/build-module/navigation/edit/deleted-navigation-warning.js +7 -4
  37. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  38. package/build-module/navigation/edit/index.js +3 -2
  39. package/build-module/navigation/edit/index.js.map +1 -1
  40. package/build-module/navigation/edit/inner-blocks.js +2 -1
  41. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  42. package/build-style/image/style-rtl.css +17 -2
  43. package/build-style/image/style.css +17 -2
  44. package/build-style/post-featured-image/style-rtl.css +3 -0
  45. package/build-style/post-featured-image/style.css +3 -0
  46. package/build-style/post-template/style-rtl.css +25 -0
  47. package/build-style/post-template/style.css +25 -0
  48. package/build-style/style-rtl.css +46 -2
  49. package/build-style/style.css +46 -2
  50. package/package.json +32 -32
  51. package/src/cover/edit/inspector-controls.js +1 -1
  52. package/src/embed/edit.js +15 -0
  53. package/src/embed/edit.native.js +15 -0
  54. package/src/image/image.js +1 -1
  55. package/src/image/index.php +64 -46
  56. package/src/image/style.scss +23 -2
  57. package/src/image/view.js +14 -4
  58. package/src/latest-posts/edit.js +10 -2
  59. package/src/latest-posts/index.php +18 -8
  60. package/src/media-text/edit.js +1 -1
  61. package/src/navigation/edit/deleted-navigation-warning.js +9 -4
  62. package/src/navigation/edit/index.js +26 -17
  63. package/src/navigation/edit/inner-blocks.js +1 -0
  64. package/src/post-featured-image/style.scss +4 -0
  65. 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
- { __( 'Navigation menu has been deleted or is unavailable. ' ) }
12
- <Button onClick={ onCreateNew } variant="link">
13
- { __( 'Create a new menu?' ) }
14
- </Button>
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( className, {
297
- 'items-justified-right': justifyContent === 'right',
298
- 'items-justified-space-between': justifyContent === 'space-between',
299
- 'items-justified-left': justifyContent === 'left',
300
- 'items-justified-center': justifyContent === 'center',
301
- 'is-vertical': orientation === 'vertical',
302
- 'no-wrap': flexWrap === 'nowrap',
303
- 'is-responsive': isResponsive,
304
- 'has-text-color': !! textColor.color || !! textColor?.class,
305
- [ getColorClassName( 'color', textColor?.slug ) ]:
306
- !! textColor?.slug,
307
- 'has-background': !! backgroundColor.color || backgroundColor.class,
308
- [ getColorClassName( 'background-color', backgroundColor?.slug ) ]:
309
- !! backgroundColor?.slug,
310
- [ `has-text-decoration-${ textDecoration }` ]: textDecoration,
311
- 'block-editor-block-content-overlay': hasBlockOverlay,
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,
@@ -118,6 +118,7 @@ export default function NavigationInnerBlocks( {
118
118
  : false,
119
119
  placeholder: showPlaceholder ? placeholder : undefined,
120
120
  __experimentalCaptureToolbars: true,
121
+ __unstableDisableLayoutClassNames: true,
121
122
  }
122
123
  );
123
124
 
@@ -39,4 +39,8 @@
39
39
  }
40
40
  }
41
41
  }
42
+
43
+ &:where(.alignleft, .alignright) {
44
+ width: 100%;
45
+ }
42
46
  }
@@ -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
+ }