@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.
- package/CHANGELOG.md +2 -0
- package/build/components/entities-saved-states/index.js +47 -6
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/post-featured-image/index.js +24 -29
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-saved-state/index.js +0 -8
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +9 -4
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +48 -7
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +26 -32
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +0 -7
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +12 -7
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-style/style-rtl.css +37 -15
- package/build-style/style.css +37 -15
- package/package.json +30 -30
- package/src/components/entities-saved-states/index.js +57 -15
- package/src/components/post-featured-image/index.js +26 -35
- package/src/components/post-featured-image/style.scss +38 -14
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +1 -1
- package/src/components/post-saved-state/index.js +0 -7
- package/src/components/post-saved-state/test/__snapshots__/index.js.snap +0 -9
- package/src/components/post-saved-state/test/index.js +0 -10
- package/src/components/post-switch-to-draft-button/index.js +7 -6
- package/src/components/post-taxonomies/style.scss +4 -4
- 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
|
|
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="
|
|
51
|
+
variant="secondary"
|
|
52
|
+
style={ { width: '100%', display: 'block' } }
|
|
52
53
|
>
|
|
53
|
-
{
|
|
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 {
|