@automattic/launchpad 1.0.1 → 1.1.0-rc.2
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/dist/cjs/action-components/share-site-modal/index.js +2 -3
- package/dist/cjs/action-components/share-site-modal/index.js.map +1 -1
- package/dist/cjs/checklist-item/index.js +2 -3
- package/dist/cjs/checklist-item/index.js.map +1 -1
- package/dist/esm/action-components/share-site-modal/index.js +2 -3
- package/dist/esm/action-components/share-site-modal/index.js.map +1 -1
- package/dist/esm/checklist-item/index.js +2 -3
- package/dist/esm/checklist-item/index.js.map +1 -1
- package/dist/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/action-components/share-site-modal/index.d.ts.map +1 -1
- package/dist/types/checklist-item/index.d.ts.map +1 -1
- package/package.json +10 -3
- package/src/action-components/share-site-modal/index.tsx +10 -6
- package/src/checklist-item/index.tsx +4 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/action-components/share-site-modal/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,cAAc,CAAC;AAEtB,UAAU,mBAAmB;IAC5B,cAAc,EAAE,CAAE,MAAM,EAAE,OAAO,KAAM,IAAI,CAAC;IAC5C,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;CACzB;AAED,QAAA,MAAM,cAAc,6BAA+B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/action-components/share-site-modal/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,cAAc,CAAC;AAEtB,UAAU,mBAAmB;IAC5B,cAAc,EAAE,CAAE,MAAM,EAAE,OAAO,KAAM,IAAI,CAAC;IAC5C,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;CACzB;AAED,QAAA,MAAM,cAAc,6BAA+B,mBAAmB,4CAqFrE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/checklist-item/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,cAAc,CAAC;AAEtB,UAAU,KAAK;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,IAAI,CAAC;IACX,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/checklist-item/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,cAAc,CAAC;AAEtB,UAAU,KAAK;IACd,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,IAAI,CAAC;IACX,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,aAAa,EAAE,EAAE,CAAE,KAAK,CAuG7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,EAQzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/launchpad",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-rc.2",
|
|
4
4
|
"description": "Launchpad components.",
|
|
5
5
|
"homepage": "https://github.com/Automattic/wp-calypso",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,10 +30,17 @@
|
|
|
30
30
|
"storybook": "sb dev"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@automattic/
|
|
34
|
-
"@automattic/
|
|
33
|
+
"@automattic/calypso-analytics": "^1.1.2",
|
|
34
|
+
"@automattic/components": "^2.2.0-rc.1",
|
|
35
|
+
"@automattic/data-stores": "^3.1.0-rc.2",
|
|
35
36
|
"@automattic/i18n-utils": "^1.2.3",
|
|
37
|
+
"@automattic/typography": "^1.0.0",
|
|
38
|
+
"@automattic/viewport": "^1.1.0",
|
|
39
|
+
"@tanstack/react-query": "^5.15.5",
|
|
40
|
+
"@wordpress/base-styles": "^5.8.0",
|
|
36
41
|
"@wordpress/components": "^28.8.0",
|
|
42
|
+
"@wordpress/icons": "^10.8.0",
|
|
43
|
+
"@wordpress/url": "^4.8.0",
|
|
37
44
|
"clsx": "^2.1.1",
|
|
38
45
|
"tslib": "^2.3.0",
|
|
39
46
|
"utility-types": "^3.10.0",
|
|
@@ -2,8 +2,8 @@ import { Popover } from '@automattic/components';
|
|
|
2
2
|
import { updateLaunchpadSettings } from '@automattic/data-stores';
|
|
3
3
|
import { useQueryClient } from '@tanstack/react-query';
|
|
4
4
|
import { Button, Modal } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
5
6
|
import { Icon, link } from '@wordpress/icons';
|
|
6
|
-
import { useTranslate } from 'i18n-calypso';
|
|
7
7
|
import { useState, useRef } from 'react';
|
|
8
8
|
import type { SiteDetails } from '@automattic/data-stores';
|
|
9
9
|
|
|
@@ -15,7 +15,6 @@ interface ShareSiteModalProps {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const ShareSiteModal = ( { setModalIsOpen, site }: ShareSiteModalProps ) => {
|
|
18
|
-
const translate = useTranslate();
|
|
19
18
|
const queryClient = useQueryClient();
|
|
20
19
|
const getSiteSlug = ( site: SiteDetails | null ): string | null => {
|
|
21
20
|
if ( ! site ) {
|
|
@@ -57,9 +56,14 @@ const ShareSiteModal = ( { setModalIsOpen, site }: ShareSiteModalProps ) => {
|
|
|
57
56
|
>
|
|
58
57
|
<div className="share-site-modal__modal-content">
|
|
59
58
|
<div className="share-site-modal__modal-text">
|
|
60
|
-
<h1 className="share-site-modal__modal-heading">
|
|
59
|
+
<h1 className="share-site-modal__modal-heading">
|
|
60
|
+
{ __( 'Share your site', 'launchpad' ) }
|
|
61
|
+
</h1>
|
|
61
62
|
<p className="share-site-modal__modal-body">
|
|
62
|
-
{
|
|
63
|
+
{ __(
|
|
64
|
+
'Now you can head over to your site and share it with the world.',
|
|
65
|
+
'launchpad'
|
|
66
|
+
) }
|
|
63
67
|
</p>
|
|
64
68
|
</div>
|
|
65
69
|
<div className="share-site-modal__modal-actions">
|
|
@@ -75,7 +79,7 @@ const ShareSiteModal = ( { setModalIsOpen, site }: ShareSiteModalProps ) => {
|
|
|
75
79
|
context={ clipboardTextEl.current }
|
|
76
80
|
position="top"
|
|
77
81
|
>
|
|
78
|
-
{
|
|
82
|
+
{ __( 'Copied to clipboard!', 'launchpad' ) }
|
|
79
83
|
</Popover>
|
|
80
84
|
</div>
|
|
81
85
|
|
|
@@ -86,7 +90,7 @@ const ShareSiteModal = ( { setModalIsOpen, site }: ShareSiteModalProps ) => {
|
|
|
86
90
|
>
|
|
87
91
|
<Icon icon={ link } size={ 22 } />
|
|
88
92
|
<span className="share-site-modal__modal-view-site-text">
|
|
89
|
-
{
|
|
93
|
+
{ __( 'Copy', 'launchpad' ) }
|
|
90
94
|
</span>
|
|
91
95
|
</Button>
|
|
92
96
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Badge, Gridicon } from '@automattic/components';
|
|
2
2
|
import { Button } from '@wordpress/components';
|
|
3
|
+
import { __, isRTL } from '@wordpress/i18n';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
|
-
import { translate, useRtl } from 'i18n-calypso';
|
|
5
5
|
import type { Task, Expandable } from '../types';
|
|
6
6
|
import type { FC, Key } from 'react';
|
|
7
7
|
|
|
@@ -16,7 +16,6 @@ interface Props {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const ChecklistItem: FC< Props > = ( { task, isPrimaryAction, expandable, onClick } ) => {
|
|
19
|
-
const isRtl = useRtl();
|
|
20
19
|
const { id, completed, disabled = false, title, subtitle, actionDispatch } = task;
|
|
21
20
|
|
|
22
21
|
// If the task says we should use the Calypso path, ensure we use that link for the button's href.
|
|
@@ -79,7 +78,7 @@ const ChecklistItem: FC< Props > = ( { task, isPrimaryAction, expandable, onClic
|
|
|
79
78
|
// show checkmark for completed tasks regardless if they are disabled or kept active
|
|
80
79
|
<div className="checklist-item__checkmark-container">
|
|
81
80
|
<Gridicon
|
|
82
|
-
aria-label={
|
|
81
|
+
aria-label={ __( 'Task complete', 'launchpad' ) }
|
|
83
82
|
className="checklist-item__checkmark"
|
|
84
83
|
icon="checkmark"
|
|
85
84
|
size={ 18 }
|
|
@@ -95,9 +94,9 @@ const ChecklistItem: FC< Props > = ( { task, isPrimaryAction, expandable, onClic
|
|
|
95
94
|
) }
|
|
96
95
|
{ shouldDisplayChevron && (
|
|
97
96
|
<Gridicon
|
|
98
|
-
aria-label={
|
|
97
|
+
aria-label={ __( 'Task enabled', 'launchpad' ) }
|
|
99
98
|
className="checklist-item__chevron"
|
|
100
|
-
icon={ `chevron-${
|
|
99
|
+
icon={ `chevron-${ isRTL() ? 'left' : 'right' }` }
|
|
101
100
|
size={ 18 }
|
|
102
101
|
/>
|
|
103
102
|
) }
|