@wordpress/fields 0.36.1-next.v.202604201441.0 → 0.37.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/actions/delete-post.cjs.map +2 -2
- package/build/actions/permanently-delete-post.cjs.map +2 -2
- package/build/actions/reset-post.cjs.map +2 -2
- package/build/actions/trash-post.cjs.map +2 -2
- package/build/components/media-edit/index.cjs +3 -2
- package/build/components/media-edit/index.cjs.map +3 -3
- package/build/fields/excerpt/index.cjs.map +3 -3
- package/build/fields/page-title/view.cjs +2 -2
- package/build/fields/page-title/view.cjs.map +2 -2
- package/build/fields/post-content-info/post-content-info-view.cjs.map +3 -3
- package/build-module/actions/delete-post.mjs +2 -2
- package/build-module/actions/delete-post.mjs.map +2 -2
- package/build-module/actions/permanently-delete-post.mjs +2 -2
- package/build-module/actions/permanently-delete-post.mjs.map +2 -2
- package/build-module/actions/reset-post.mjs +2 -2
- package/build-module/actions/reset-post.mjs.map +2 -2
- package/build-module/actions/trash-post.mjs +2 -2
- package/build-module/actions/trash-post.mjs.map +2 -2
- package/build-module/components/media-edit/index.mjs +5 -5
- package/build-module/components/media-edit/index.mjs.map +2 -2
- package/build-module/fields/excerpt/index.mjs +2 -2
- package/build-module/fields/excerpt/index.mjs.map +2 -2
- package/build-module/fields/page-title/view.mjs +2 -2
- package/build-module/fields/page-title/view.mjs.map +2 -2
- package/build-module/fields/post-content-info/post-content-info-view.mjs +3 -3
- package/build-module/fields/post-content-info/post-content-info-view.mjs.map +2 -2
- package/package.json +27 -26
- package/src/actions/delete-post.tsx +3 -3
- package/src/actions/permanently-delete-post.tsx +3 -3
- package/src/actions/reset-post.tsx +3 -3
- package/src/actions/trash-post.tsx +3 -3
- package/src/components/media-edit/index.tsx +5 -5
- package/src/fields/excerpt/index.tsx +3 -3
- package/src/fields/page-title/view.tsx +3 -3
- package/src/fields/post-content-info/post-content-info-view.tsx +4 -4
|
@@ -13,7 +13,7 @@ import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
|
13
13
|
import type { CommonPost } from '../../types';
|
|
14
14
|
import { BaseTitleView } from '../title/view';
|
|
15
15
|
import { unlock } from '../../lock-unlock';
|
|
16
|
-
const { Badge } = unlock( componentsPrivateApis );
|
|
16
|
+
const { Badge: WCBadge } = unlock( componentsPrivateApis );
|
|
17
17
|
|
|
18
18
|
export default function PageTitleView( { item }: { item: CommonPost } ) {
|
|
19
19
|
const { frontPageId, postsPageId } = useSelect( ( select ) => {
|
|
@@ -30,11 +30,11 @@ export default function PageTitleView( { item }: { item: CommonPost } ) {
|
|
|
30
30
|
return (
|
|
31
31
|
<BaseTitleView item={ item } className="fields-field__page-title">
|
|
32
32
|
{ [ frontPageId, postsPageId ].includes( item.id as number ) && (
|
|
33
|
-
<
|
|
33
|
+
<WCBadge>
|
|
34
34
|
{ item.id === frontPageId
|
|
35
35
|
? __( 'Homepage' )
|
|
36
36
|
: __( 'Posts Page' ) }
|
|
37
|
-
</
|
|
37
|
+
</WCBadge>
|
|
38
38
|
) }
|
|
39
39
|
</BaseTitleView>
|
|
40
40
|
);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
|
-
__experimentalText as
|
|
5
|
+
__experimentalText as WCText,
|
|
6
6
|
__experimentalVStack as VStack,
|
|
7
7
|
} from '@wordpress/components';
|
|
8
8
|
import { __, _x, _n, sprintf } from '@wordpress/i18n';
|
|
@@ -78,16 +78,16 @@ export default function PostContentInfoView( {
|
|
|
78
78
|
return (
|
|
79
79
|
<VStack spacing={ 1 }>
|
|
80
80
|
{ contentInfoText && (
|
|
81
|
-
<
|
|
81
|
+
<WCText variant="muted">{ contentInfoText }</WCText>
|
|
82
82
|
) }
|
|
83
83
|
{ modified && (
|
|
84
|
-
<
|
|
84
|
+
<WCText variant="muted">
|
|
85
85
|
{ sprintf(
|
|
86
86
|
// translators: %s: Human-readable time difference, e.g. "2 days ago".
|
|
87
87
|
__( 'Last edited %s.' ),
|
|
88
88
|
humanTimeDiff( modified )
|
|
89
89
|
) }
|
|
90
|
-
</
|
|
90
|
+
</WCText>
|
|
91
91
|
) }
|
|
92
92
|
</VStack>
|
|
93
93
|
);
|