@wordpress/editor 13.9.0 → 13.10.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 (30) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/entities-saved-states/index.js +47 -6
  3. package/build/components/entities-saved-states/index.js.map +1 -1
  4. package/build/components/post-featured-image/index.js +24 -29
  5. package/build/components/post-featured-image/index.js.map +1 -1
  6. package/build/components/post-saved-state/index.js +0 -8
  7. package/build/components/post-saved-state/index.js.map +1 -1
  8. package/build/components/post-switch-to-draft-button/index.js +9 -4
  9. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  10. package/build-module/components/entities-saved-states/index.js +48 -7
  11. package/build-module/components/entities-saved-states/index.js.map +1 -1
  12. package/build-module/components/post-featured-image/index.js +26 -32
  13. package/build-module/components/post-featured-image/index.js.map +1 -1
  14. package/build-module/components/post-saved-state/index.js +0 -7
  15. package/build-module/components/post-saved-state/index.js.map +1 -1
  16. package/build-module/components/post-switch-to-draft-button/index.js +12 -7
  17. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  18. package/build-style/style-rtl.css +37 -15
  19. package/build-style/style.css +37 -15
  20. package/package.json +30 -30
  21. package/src/components/entities-saved-states/index.js +57 -15
  22. package/src/components/post-featured-image/index.js +26 -35
  23. package/src/components/post-featured-image/style.scss +38 -14
  24. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +1 -1
  25. package/src/components/post-saved-state/index.js +0 -7
  26. package/src/components/post-saved-state/test/__snapshots__/index.js.snap +0 -9
  27. package/src/components/post-saved-state/test/index.js +0 -10
  28. package/src/components/post-switch-to-draft-button/index.js +7 -6
  29. package/src/components/post-taxonomies/style.scss +4 -4
  30. package/src/components/post-trash/style.scss +1 -3
@@ -3,11 +3,12 @@
3
3
  */
4
4
  import {
5
5
  Button,
6
+ FlexItem,
6
7
  __experimentalConfirmDialog as ConfirmDialog,
7
8
  } from '@wordpress/components';
8
9
  import { __ } from '@wordpress/i18n';
9
10
  import { withSelect, withDispatch } from '@wordpress/data';
10
- import { compose, useViewportMatch } from '@wordpress/compose';
11
+ import { compose } from '@wordpress/compose';
11
12
  import { useState } from '@wordpress/element';
12
13
 
13
14
  /**
@@ -21,7 +22,6 @@ function PostSwitchToDraftButton( {
21
22
  isScheduled,
22
23
  onClick,
23
24
  } ) {
24
- const isMobileViewport = useViewportMatch( 'small', '<' );
25
25
  const [ showConfirmDialog, setShowConfirmDialog ] = useState( false );
26
26
 
27
27
  if ( ! isPublished && ! isScheduled ) {
@@ -41,16 +41,17 @@ function PostSwitchToDraftButton( {
41
41
  };
42
42
 
43
43
  return (
44
- <>
44
+ <FlexItem isBlock>
45
45
  <Button
46
46
  className="editor-post-switch-to-draft"
47
47
  onClick={ () => {
48
48
  setShowConfirmDialog( true );
49
49
  } }
50
50
  disabled={ isSaving }
51
- variant="tertiary"
51
+ variant="secondary"
52
+ style={ { width: '100%', display: 'block' } }
52
53
  >
53
- { isMobileViewport ? __( 'Draft' ) : __( 'Switch to draft' ) }
54
+ { __( 'Switch to draft' ) }
54
55
  </Button>
55
56
  <ConfirmDialog
56
57
  isOpen={ showConfirmDialog }
@@ -59,7 +60,7 @@ function PostSwitchToDraftButton( {
59
60
  >
60
61
  { alertMessage }
61
62
  </ConfirmDialog>
62
- </>
63
+ </FlexItem>
63
64
  );
64
65
  }
65
66
 
@@ -3,10 +3,10 @@
3
3
  overflow: auto;
4
4
 
5
5
  // Extra left padding prevents checkbox focus borders from being cut off.
6
- margin-left: -$border-width * 4 - $border-width-focus;
7
- padding-left: $border-width * 4 + $border-width-focus;
8
- margin-top: -$border-width * 4 - $border-width-focus;
9
- padding-top: $border-width * 4 + $border-width-focus;
6
+ margin-left: -$border-width * 4 - $border-width-focus-fallback;
7
+ padding-left: $border-width * 4 + $border-width-focus-fallback;
8
+ margin-top: -$border-width * 4 - $border-width-focus-fallback;
9
+ padding-top: $border-width * 4 + $border-width-focus-fallback;
10
10
  }
11
11
 
12
12
  .editor-post-taxonomies__hierarchical-terms-choice {
@@ -1,6 +1,4 @@
1
1
  .editor-post-trash.components-button {
2
- display: flex;
3
- justify-content: center;
4
- margin-top: $grid-unit-05;
5
2
  width: 100%;
3
+ display: block;
6
4
  }