@automattic/launchpad 1.1.0 → 1.1.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.
Files changed (105) hide show
  1. package/dist/cjs/action-components/index.js +2 -1
  2. package/dist/cjs/action-components/index.js.map +1 -1
  3. package/dist/cjs/action-components/share-site-modal/index.js +132 -21
  4. package/dist/cjs/action-components/share-site-modal/index.js.map +1 -1
  5. package/dist/cjs/action-components/share-site-modal/style.scss +23 -116
  6. package/dist/cjs/checklist/index.js +11 -3
  7. package/dist/cjs/checklist/index.js.map +1 -1
  8. package/dist/cjs/checklist-item/index.js +25 -4
  9. package/dist/cjs/checklist-item/index.js.map +1 -1
  10. package/dist/cjs/checklist-item/index.stories.js +2 -5
  11. package/dist/cjs/checklist-item/index.stories.js.map +1 -1
  12. package/dist/cjs/checklist-item/style.scss +14 -29
  13. package/dist/cjs/launchpad-internal.js +2 -2
  14. package/dist/cjs/launchpad-internal.js.map +1 -1
  15. package/dist/cjs/launchpad-internal.stories.js +1 -1
  16. package/dist/cjs/launchpad-internal.stories.js.map +1 -1
  17. package/dist/cjs/launchpad.js +7 -5
  18. package/dist/cjs/launchpad.js.map +1 -1
  19. package/dist/cjs/msw/resolver.js +1 -7
  20. package/dist/cjs/msw/resolver.js.map +1 -1
  21. package/dist/cjs/msw/setup-free.js +1 -1
  22. package/dist/cjs/msw/setup-free.js.map +1 -1
  23. package/dist/cjs/setup-actions.js +4 -9
  24. package/dist/cjs/setup-actions.js.map +1 -1
  25. package/dist/cjs/use-tracking/index.js +4 -0
  26. package/dist/cjs/use-tracking/index.js.map +1 -1
  27. package/dist/esm/action-components/share-site-modal/index.js +137 -26
  28. package/dist/esm/action-components/share-site-modal/index.js.map +1 -1
  29. package/dist/esm/action-components/share-site-modal/style.scss +23 -116
  30. package/dist/esm/checklist/index.js +11 -3
  31. package/dist/esm/checklist/index.js.map +1 -1
  32. package/dist/esm/checklist-item/index.js +28 -7
  33. package/dist/esm/checklist-item/index.js.map +1 -1
  34. package/dist/esm/checklist-item/index.stories.js +3 -6
  35. package/dist/esm/checklist-item/index.stories.js.map +1 -1
  36. package/dist/esm/checklist-item/style.scss +14 -29
  37. package/dist/esm/launchpad-internal.js +2 -2
  38. package/dist/esm/launchpad-internal.js.map +1 -1
  39. package/dist/esm/launchpad-internal.stories.js +1 -1
  40. package/dist/esm/launchpad-internal.stories.js.map +1 -1
  41. package/dist/esm/launchpad.js +9 -7
  42. package/dist/esm/launchpad.js.map +1 -1
  43. package/dist/esm/msw/resolver.js +1 -7
  44. package/dist/esm/msw/resolver.js.map +1 -1
  45. package/dist/esm/msw/setup-free.js +1 -1
  46. package/dist/esm/msw/setup-free.js.map +1 -1
  47. package/dist/esm/setup-actions.js +4 -9
  48. package/dist/esm/setup-actions.js.map +1 -1
  49. package/dist/esm/use-tracking/index.js +4 -0
  50. package/dist/esm/use-tracking/index.js.map +1 -1
  51. package/dist/tsconfig-cjs.tsbuildinfo +1 -1
  52. package/dist/tsconfig.tsbuildinfo +1 -1
  53. package/dist/types/action-components/share-site-modal/index.d.ts +3 -1
  54. package/dist/types/action-components/share-site-modal/index.d.ts.map +1 -1
  55. package/dist/types/checklist/index.d.ts +1 -0
  56. package/dist/types/checklist/index.d.ts.map +1 -1
  57. package/dist/types/checklist-item/index.d.ts +1 -0
  58. package/dist/types/checklist-item/index.d.ts.map +1 -1
  59. package/dist/types/checklist-item/index.stories.d.ts.map +1 -1
  60. package/dist/types/launchpad-internal.d.ts +1 -0
  61. package/dist/types/launchpad-internal.d.ts.map +1 -1
  62. package/dist/types/launchpad.d.ts +2 -1
  63. package/dist/types/launchpad.d.ts.map +1 -1
  64. package/dist/types/msw/resolver.d.ts.map +1 -1
  65. package/dist/types/setup-actions.d.ts.map +1 -1
  66. package/dist/types/types.d.ts +1 -7
  67. package/dist/types/types.d.ts.map +1 -1
  68. package/dist/types/use-tracking/index.d.ts.map +1 -1
  69. package/package.json +29 -23
  70. package/src/action-components/share-site-modal/index.tsx +239 -76
  71. package/src/action-components/share-site-modal/style.scss +23 -116
  72. package/src/checklist/index.tsx +15 -3
  73. package/src/checklist/test/test-checklist.tsx +38 -0
  74. package/src/checklist-item/index.stories.tsx +11 -5
  75. package/src/checklist-item/index.tsx +55 -29
  76. package/src/checklist-item/style.scss +14 -29
  77. package/src/checklist-item/test/index.tsx +1 -20
  78. package/src/launchpad-internal.stories.tsx +1 -1
  79. package/src/launchpad-internal.tsx +6 -1
  80. package/src/launchpad.tsx +15 -7
  81. package/src/msw/resolver.ts +1 -10
  82. package/src/msw/setup-free.ts +1 -1
  83. package/src/setup-actions.ts +4 -9
  84. package/src/test/launchpad.tsx +1 -1
  85. package/src/test/lib/fixtures.ts +7 -7
  86. package/src/types.ts +1 -8
  87. package/src/use-tracking/index.tsx +4 -0
  88. package/dist/cjs/badge/index.js +0 -13
  89. package/dist/cjs/badge/index.js.map +0 -1
  90. package/dist/cjs/badge/style.scss +0 -50
  91. package/dist/cjs/msw/link-in-bio.js +0 -68
  92. package/dist/cjs/msw/link-in-bio.js.map +0 -1
  93. package/dist/esm/badge/index.js +0 -10
  94. package/dist/esm/badge/index.js.map +0 -1
  95. package/dist/esm/badge/style.scss +0 -50
  96. package/dist/esm/msw/link-in-bio.js +0 -66
  97. package/dist/esm/msw/link-in-bio.js.map +0 -1
  98. package/dist/types/badge/index.d.ts +0 -10
  99. package/dist/types/badge/index.d.ts.map +0 -1
  100. package/dist/types/msw/link-in-bio.d.ts +0 -35
  101. package/dist/types/msw/link-in-bio.d.ts.map +0 -1
  102. package/src/badge/index.tsx +0 -25
  103. package/src/badge/style.scss +0 -50
  104. package/src/msw/link-in-bio.ts +0 -66
  105. package/src/test/badge.tsx +0 -50
@@ -8,12 +8,12 @@ import type { LaunchpadTaskActionsProps, Task } from './types';
8
8
 
9
9
  const TASKS_TO_COMPLETE_ON_CLICK = [
10
10
  'add_about_page',
11
+ 'add_first_subscribers',
11
12
  'manage_paid_newsletter_plan',
12
13
  'earn_money',
13
14
  'manage_subscribers',
14
15
  'connect_social_media',
15
16
  'drive_traffic',
16
- 'site_monitoring_page',
17
17
  'front_page_updated',
18
18
  'post_sharing_enabled',
19
19
  'mobile_app_installed',
@@ -28,7 +28,7 @@ export const setUpActionsForTasks = ( {
28
28
  uiContext = 'calypso',
29
29
  }: LaunchpadTaskActionsProps ): Task[] => {
30
30
  const { recordTracksEvent, checklistSlug, launchpadContext } = tracksData;
31
- const { setShareSiteModalIsOpen, setActiveChecklist } = extraActions;
31
+ const { setShareSiteModalIsOpen } = extraActions;
32
32
  const { onSiteLaunched, onTaskClick } = eventHandlers || {};
33
33
 
34
34
  // Add actions to the tasks.
@@ -101,7 +101,7 @@ export const setUpActionsForTasks = ( {
101
101
  case 'customize_welcome_message':
102
102
  logMissingCalypsoPath = true;
103
103
  task.calypso_path = config.isEnabled( 'settings/newsletter-settings-page' )
104
- ? `/settings/newsletter/${ siteSlug }`
104
+ ? `/settings/newsletter/${ siteSlug }#messages`
105
105
  : `/settings/reading/${ siteSlug }#newsletter-settings`;
106
106
  break;
107
107
 
@@ -112,8 +112,6 @@ export const setUpActionsForTasks = ( {
112
112
 
113
113
  case 'site_launched':
114
114
  case 'blog_launched':
115
- case 'videopress_launched':
116
- case 'link_in_bio_launched':
117
115
  action = async () => {
118
116
  await wpcomRequest( {
119
117
  path: `/sites/${ siteSlug }/launch`,
@@ -140,7 +138,7 @@ export const setUpActionsForTasks = ( {
140
138
  action = () => {
141
139
  window.open(
142
140
  localizeUrl(
143
- `https://wordpress.com/support/domains/connect-existing-domain/#step-2-connect-your-domain`
141
+ 'https://wordpress.com/support/domains/connect-existing-domain/#step-2-connect-your-domain'
144
142
  ),
145
143
  '_blank'
146
144
  );
@@ -165,9 +163,6 @@ export const setUpActionsForTasks = ( {
165
163
  }
166
164
 
167
165
  const actionDispatch = () => {
168
- if ( siteSlug && setActiveChecklist && config.isEnabled( 'launchpad/navigator' ) ) {
169
- setActiveChecklist( siteSlug, checklistSlug );
170
- }
171
166
  onTaskClick?.( task );
172
167
  action?.();
173
168
  };
@@ -46,7 +46,7 @@ describe( 'LaunchpadInternal', () => {
46
46
  renderComponent();
47
47
 
48
48
  jest.clearAllMocks();
49
- await userEvent.click( screen.getByRole( 'button', { name: /Task 1/ } ) );
49
+ await userEvent.click( screen.getByRole( 'button', { name: /Select to task 1/ } ) );
50
50
 
51
51
  await waitFor( () => {
52
52
  expect( recordTracksEvent ).toHaveBeenCalledWith( 'calypso_launchpad_task_clicked', {
@@ -3,10 +3,10 @@ import { Task } from '../../types';
3
3
 
4
4
  export const defaultSiteDetails: SiteDetails = {
5
5
  ID: 211078228,
6
- title: 'Test Link In Bio',
7
- name: 'testLinkInBio',
8
- description: 'test link in bio',
9
- URL: 'https://testlinkinbio.wordpress.com',
6
+ title: 'Test Newsletter',
7
+ name: 'testNewsletter',
8
+ description: 'test newsletter',
9
+ URL: 'https://testnewsletter.wordpress.com',
10
10
  domain: '',
11
11
  locale: '',
12
12
  slug: '',
@@ -30,7 +30,6 @@ export const defaultSiteDetails: SiteDetails = {
30
30
  delete_users: false,
31
31
  remove_users: true,
32
32
  own_site: true,
33
- view_hosting: true,
34
33
  view_stats: true,
35
34
  activate_plugins: true,
36
35
  },
@@ -139,7 +138,7 @@ export const defaultSiteDetails: SiteDetails = {
139
138
  was_created_with_blank_canvas_design: false,
140
139
  videopress_storage_used: 0,
141
140
  is_difm_lite_in_progress: false,
142
- site_intent: 'link-in-bio',
141
+ site_intent: 'newsletter',
143
142
  site_vertical_id: null,
144
143
  launchpad_screen: 'full',
145
144
  launchpad_checklist_tasks_statuses: {
@@ -252,6 +251,8 @@ export const defaultDomainResponse: any = {
252
251
  isDnssecSupported: false,
253
252
  isEligibleForInboundTransfer: false,
254
253
  isGravatarDomain: false,
254
+ isGravatarRestrictedDomain: false,
255
+ isHundredsYearDomain: false,
255
256
  isIcannVerificationSuspended: false,
256
257
  isLocked: false,
257
258
  isPendingIcannVerification: false,
@@ -273,7 +274,6 @@ export const defaultDomainResponse: any = {
273
274
  owner: '',
274
275
  partnerDomain: false,
275
276
  pendingRegistration: false,
276
- pendingRegistrationTime: '',
277
277
  pointsToWpcom: false,
278
278
  privacyAvailable: false,
279
279
  privateDomain: false,
package/src/types.ts CHANGED
@@ -22,22 +22,16 @@ export interface Task {
22
22
  actionUrl?: string;
23
23
  }
24
24
 
25
- export interface ExpandableAction {
26
- label: string;
27
- onClick: () => void;
28
- }
29
-
30
25
  export interface Expandable {
31
26
  isOpen: boolean;
32
27
  content: JSX.Element;
33
- action?: ExpandableAction;
34
28
  }
35
29
 
36
30
  export type LaunchpadChecklist = Task[];
37
31
 
38
32
  export type LaunchpadTracksData = {
39
33
  checklistSlug: string;
40
- launchpadContext: string;
34
+ launchpadContext: string | null;
41
35
  recordTracksEvent: ( event: string, properties: Record< string, unknown > ) => void;
42
36
  tasklistCompleted: boolean;
43
37
  };
@@ -67,7 +61,6 @@ export interface LaunchpadStatuses {
67
61
 
68
62
  export interface PermittedActions {
69
63
  setShareSiteModalIsOpen?: ( isOpen: boolean ) => void;
70
- setActiveChecklist: ( siteSlug: string, activeChecklistSlug: string ) => void;
71
64
  }
72
65
 
73
66
  export type EventHandlers = {
@@ -29,6 +29,7 @@ export const useTracking = ( params: Params ) => {
29
29
  const isCheckListCompleted = completedSteps.length === tasks.length;
30
30
  const isSiteAvailable = !! site;
31
31
  const hasNoTask = tasks.length === 0;
32
+ const goals = site?.options?.site_goals?.join( ',' );
32
33
 
33
34
  // We skip the view events until we have fetched the site details to avoid sending incomplete data
34
35
  const shoulSkipTracking = hasNoTask || ! isSiteAvailable;
@@ -49,6 +50,7 @@ export const useTracking = ( params: Params ) => {
49
50
  context: context,
50
51
  site_intent: siteIntent,
51
52
  flow,
53
+ goals,
52
54
  } );
53
55
 
54
56
  tasks.forEach( ( task: Task ) => {
@@ -60,6 +62,7 @@ export const useTracking = ( params: Params ) => {
60
62
  order: task.order,
61
63
  site_intent: siteIntent,
62
64
  flow,
65
+ goals,
63
66
  } );
64
67
  } );
65
68
  // Array of tasks requires deep comparison
@@ -78,6 +81,7 @@ export const useTracking = ( params: Params ) => {
78
81
  task_id: task.id,
79
82
  flow,
80
83
  order: task.order,
84
+ goals,
81
85
  } );
82
86
  };
83
87
 
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
6
- require("./style.scss");
7
- const Badge = (props) => {
8
- const className = props.className;
9
- const type = props.type || 'warning';
10
- return (0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(`badge badge--${type}`, className), children: props.children });
11
- };
12
- exports.default = Badge;
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/badge/index.tsx"],"names":[],"mappings":";;;;AAAA,wDAAwB;AAExB,wBAAsB;AAgBtB,MAAM,KAAK,GAA0C,CAAE,KAAK,EAAG,EAAE;IAChE,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,SAAS,CAAC;IACrC,OAAO,gCAAK,SAAS,EAAG,IAAA,cAAI,EAAE,gBAAiB,IAAK,EAAE,EAAE,SAAS,CAAE,YAAK,KAAK,CAAC,QAAQ,GAAQ,CAAC;AAChG,CAAC,CAAC;AAEF,kBAAe,KAAK,CAAC"}
@@ -1,50 +0,0 @@
1
- .badge {
2
- display: inline-block;
3
- // A number large enough to exceed height of any badge to make it look like a pill
4
- border-radius: 1000px; /* stylelint-disable-line scales/radii */
5
- padding: $badge-padding-y $badge-padding-x;
6
- font-size: $font-body-small;
7
- line-height: 17px;
8
- height: 18px;
9
- }
10
-
11
- .badge--warning-clear {
12
- color: var(--color-warning);
13
- border: 1px solid var(--color-warning);
14
- border-radius: 12px; /* stylelint-disable-line scales/radii */
15
- }
16
-
17
- .badge--warning {
18
- color: var(--color-warning-80);
19
- background-color: var(--color-warning-20);
20
- }
21
-
22
- .badge--success {
23
- color: var(--color-text-inverted);
24
- background-color: var(--color-success);
25
- }
26
-
27
- .badge--info {
28
- color: var(--color-neutral-70);
29
- background-color: var(--color-neutral-5);
30
- }
31
-
32
- .badge--info-blue {
33
- background-color: var(--studio-blue-50);
34
- color: var(--color-text-inverted);
35
- }
36
-
37
- .badge--info-green {
38
- color: var(--studio-green-80);
39
- background-color: rgba(184, 230, 191, 0.64);
40
- }
41
-
42
- .badge--info-purple {
43
- color: var(--studio-woocommerce-purple-80);
44
- background-color: var(--studio-woocommerce-purple-5);
45
- }
46
-
47
- .badge--error {
48
- background-color: var(--color-error);
49
- color: var(--color-text-inverted);
50
- }
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- site_intent: 'free',
5
- launchpad_screen: 'full',
6
- checklist_statuses: {
7
- setup_free: true,
8
- setup_general: true,
9
- design_completed: true,
10
- site_theme_selected: true,
11
- },
12
- checklist: [
13
- {
14
- id: 'design_selected',
15
- title: 'Select a design',
16
- completed: true,
17
- disabled: false,
18
- subtitle: '',
19
- badge_text: '',
20
- isLaunchTask: false,
21
- calypso_path: '/setup/update-design/designSetup?siteSlug=site62798.wordpress.com',
22
- },
23
- {
24
- id: 'setup_link_in_bio',
25
- title: 'Personalize Link in Bio',
26
- completed: true,
27
- disabled: false,
28
- subtitle: '',
29
- badge_text: '',
30
- isLaunchTask: false,
31
- calypso_path: '/setup/link-in-bio-post-setup/linkInBioPostSetup?siteSlug=site62798.wordpress.com',
32
- },
33
- {
34
- id: 'plan_selected',
35
- title: 'Choose a plan',
36
- completed: true,
37
- disabled: false,
38
- subtitle: '',
39
- badge_text: '',
40
- isLaunchTask: false,
41
- calypso_path: '/plans/site62798.wordpress.com',
42
- },
43
- {
44
- id: 'links_added',
45
- title: 'Add links',
46
- completed: false,
47
- disabled: false,
48
- subtitle: '',
49
- badge_text: '',
50
- isLaunchTask: false,
51
- calypso_path: '/site-editor/site62798.wordpress.com',
52
- },
53
- {
54
- id: 'link_in_bio_launched',
55
- title: 'Launch your site',
56
- completed: false,
57
- disabled: true,
58
- subtitle: '',
59
- badge_text: '',
60
- isLaunchTask: false,
61
- },
62
- ],
63
- is_enabled: true,
64
- is_dismissed: false,
65
- is_dismissible: false,
66
- title: 'Next steps for your site',
67
- };
68
- //# sourceMappingURL=link-in-bio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-in-bio.js","sourceRoot":"","sources":["../../../src/msw/link-in-bio.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACd,WAAW,EAAE,MAAM;IACnB,gBAAgB,EAAE,MAAM;IACxB,kBAAkB,EAAE;QACnB,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,IAAI;QACnB,gBAAgB,EAAE,IAAI;QACtB,mBAAmB,EAAE,IAAI;KACzB;IACD,SAAS,EAAE;QACV;YACC,EAAE,EAAE,iBAAiB;YACrB,KAAK,EAAE,iBAAiB;YACxB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,mEAAmE;SACjF;QACD;YACC,EAAE,EAAE,mBAAmB;YACvB,KAAK,EAAE,yBAAyB;YAChC,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EACX,mFAAmF;SACpF;QACD;YACC,EAAE,EAAE,eAAe;YACnB,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,gCAAgC;SAC9C;QACD;YACC,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,WAAW;YAClB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,sCAAsC;SACpD;QACD;YACC,EAAE,EAAE,sBAAsB;YAC1B,KAAK,EAAE,kBAAkB;YACzB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;SACnB;KACD;IACD,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,KAAK,EAAE,0BAA0B;CACjC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import clsx from 'clsx';
3
- import './style.scss';
4
- const Badge = (props) => {
5
- const className = props.className;
6
- const type = props.type || 'warning';
7
- return _jsx("div", { className: clsx(`badge badge--${type}`, className), children: props.children });
8
- };
9
- export default Badge;
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/badge/index.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,cAAc,CAAC;AAgBtB,MAAM,KAAK,GAA0C,CAAE,KAAK,EAAG,EAAE;IAChE,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,SAAS,CAAC;IACrC,OAAO,cAAK,SAAS,EAAG,IAAI,CAAE,gBAAiB,IAAK,EAAE,EAAE,SAAS,CAAE,YAAK,KAAK,CAAC,QAAQ,GAAQ,CAAC;AAChG,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,50 +0,0 @@
1
- .badge {
2
- display: inline-block;
3
- // A number large enough to exceed height of any badge to make it look like a pill
4
- border-radius: 1000px; /* stylelint-disable-line scales/radii */
5
- padding: $badge-padding-y $badge-padding-x;
6
- font-size: $font-body-small;
7
- line-height: 17px;
8
- height: 18px;
9
- }
10
-
11
- .badge--warning-clear {
12
- color: var(--color-warning);
13
- border: 1px solid var(--color-warning);
14
- border-radius: 12px; /* stylelint-disable-line scales/radii */
15
- }
16
-
17
- .badge--warning {
18
- color: var(--color-warning-80);
19
- background-color: var(--color-warning-20);
20
- }
21
-
22
- .badge--success {
23
- color: var(--color-text-inverted);
24
- background-color: var(--color-success);
25
- }
26
-
27
- .badge--info {
28
- color: var(--color-neutral-70);
29
- background-color: var(--color-neutral-5);
30
- }
31
-
32
- .badge--info-blue {
33
- background-color: var(--studio-blue-50);
34
- color: var(--color-text-inverted);
35
- }
36
-
37
- .badge--info-green {
38
- color: var(--studio-green-80);
39
- background-color: rgba(184, 230, 191, 0.64);
40
- }
41
-
42
- .badge--info-purple {
43
- color: var(--studio-woocommerce-purple-80);
44
- background-color: var(--studio-woocommerce-purple-5);
45
- }
46
-
47
- .badge--error {
48
- background-color: var(--color-error);
49
- color: var(--color-text-inverted);
50
- }
@@ -1,66 +0,0 @@
1
- export default {
2
- site_intent: 'free',
3
- launchpad_screen: 'full',
4
- checklist_statuses: {
5
- setup_free: true,
6
- setup_general: true,
7
- design_completed: true,
8
- site_theme_selected: true,
9
- },
10
- checklist: [
11
- {
12
- id: 'design_selected',
13
- title: 'Select a design',
14
- completed: true,
15
- disabled: false,
16
- subtitle: '',
17
- badge_text: '',
18
- isLaunchTask: false,
19
- calypso_path: '/setup/update-design/designSetup?siteSlug=site62798.wordpress.com',
20
- },
21
- {
22
- id: 'setup_link_in_bio',
23
- title: 'Personalize Link in Bio',
24
- completed: true,
25
- disabled: false,
26
- subtitle: '',
27
- badge_text: '',
28
- isLaunchTask: false,
29
- calypso_path: '/setup/link-in-bio-post-setup/linkInBioPostSetup?siteSlug=site62798.wordpress.com',
30
- },
31
- {
32
- id: 'plan_selected',
33
- title: 'Choose a plan',
34
- completed: true,
35
- disabled: false,
36
- subtitle: '',
37
- badge_text: '',
38
- isLaunchTask: false,
39
- calypso_path: '/plans/site62798.wordpress.com',
40
- },
41
- {
42
- id: 'links_added',
43
- title: 'Add links',
44
- completed: false,
45
- disabled: false,
46
- subtitle: '',
47
- badge_text: '',
48
- isLaunchTask: false,
49
- calypso_path: '/site-editor/site62798.wordpress.com',
50
- },
51
- {
52
- id: 'link_in_bio_launched',
53
- title: 'Launch your site',
54
- completed: false,
55
- disabled: true,
56
- subtitle: '',
57
- badge_text: '',
58
- isLaunchTask: false,
59
- },
60
- ],
61
- is_enabled: true,
62
- is_dismissed: false,
63
- is_dismissible: false,
64
- title: 'Next steps for your site',
65
- };
66
- //# sourceMappingURL=link-in-bio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-in-bio.js","sourceRoot":"","sources":["../../../src/msw/link-in-bio.ts"],"names":[],"mappings":"AAAA,eAAe;IACd,WAAW,EAAE,MAAM;IACnB,gBAAgB,EAAE,MAAM;IACxB,kBAAkB,EAAE;QACnB,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,IAAI;QACnB,gBAAgB,EAAE,IAAI;QACtB,mBAAmB,EAAE,IAAI;KACzB;IACD,SAAS,EAAE;QACV;YACC,EAAE,EAAE,iBAAiB;YACrB,KAAK,EAAE,iBAAiB;YACxB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,mEAAmE;SACjF;QACD;YACC,EAAE,EAAE,mBAAmB;YACvB,KAAK,EAAE,yBAAyB;YAChC,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EACX,mFAAmF;SACpF;QACD;YACC,EAAE,EAAE,eAAe;YACnB,KAAK,EAAE,eAAe;YACtB,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,gCAAgC;SAC9C;QACD;YACC,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,WAAW;YAClB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,sCAAsC;SACpD;QACD;YACC,EAAE,EAAE,sBAAsB;YAC1B,KAAK,EAAE,kBAAkB;YACzB,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,KAAK;SACnB;KACD;IACD,UAAU,EAAE,IAAI;IAChB,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,KAAK,EAAE,0BAA0B;CACjC,CAAC"}
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import './style.scss';
3
- export interface BadgeProps {
4
- type?: 'warning' | 'warning-clear' | 'success' | 'info' | 'info-blue' | 'info-green' | 'info-purple' | 'error';
5
- className?: string;
6
- children?: React.ReactNode;
7
- }
8
- declare const Badge: React.FunctionComponent<BadgeProps>;
9
- export default Badge;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/badge/index.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,UAAU;IAC1B,IAAI,CAAC,EACF,SAAS,GACT,eAAe,GACf,SAAS,GACT,MAAM,GACN,WAAW,GACX,YAAY,GACZ,aAAa,GACb,OAAO,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAE,UAAU,CAI/C,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,35 +0,0 @@
1
- declare const _default: {
2
- site_intent: string;
3
- launchpad_screen: string;
4
- checklist_statuses: {
5
- setup_free: boolean;
6
- setup_general: boolean;
7
- design_completed: boolean;
8
- site_theme_selected: boolean;
9
- };
10
- checklist: ({
11
- id: string;
12
- title: string;
13
- completed: boolean;
14
- disabled: boolean;
15
- subtitle: string;
16
- badge_text: string;
17
- isLaunchTask: boolean;
18
- calypso_path: string;
19
- } | {
20
- id: string;
21
- title: string;
22
- completed: boolean;
23
- disabled: boolean;
24
- subtitle: string;
25
- badge_text: string;
26
- isLaunchTask: boolean;
27
- calypso_path?: undefined;
28
- })[];
29
- is_enabled: boolean;
30
- is_dismissed: boolean;
31
- is_dismissible: boolean;
32
- title: string;
33
- };
34
- export default _default;
35
- //# sourceMappingURL=link-in-bio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-in-bio.d.ts","sourceRoot":"","sources":["../../../src/msw/link-in-bio.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAiEE"}
@@ -1,25 +0,0 @@
1
- import clsx from 'clsx';
2
-
3
- import './style.scss';
4
-
5
- export interface BadgeProps {
6
- type?:
7
- | 'warning'
8
- | 'warning-clear'
9
- | 'success'
10
- | 'info'
11
- | 'info-blue'
12
- | 'info-green'
13
- | 'info-purple'
14
- | 'error';
15
- className?: string;
16
- children?: React.ReactNode;
17
- }
18
-
19
- const Badge: React.FunctionComponent< BadgeProps > = ( props ) => {
20
- const className = props.className;
21
- const type = props.type || 'warning';
22
- return <div className={ clsx( `badge badge--${ type }`, className ) }>{ props.children }</div>;
23
- };
24
-
25
- export default Badge;
@@ -1,50 +0,0 @@
1
- .badge {
2
- display: inline-block;
3
- // A number large enough to exceed height of any badge to make it look like a pill
4
- border-radius: 1000px; /* stylelint-disable-line scales/radii */
5
- padding: $badge-padding-y $badge-padding-x;
6
- font-size: $font-body-small;
7
- line-height: 17px;
8
- height: 18px;
9
- }
10
-
11
- .badge--warning-clear {
12
- color: var(--color-warning);
13
- border: 1px solid var(--color-warning);
14
- border-radius: 12px; /* stylelint-disable-line scales/radii */
15
- }
16
-
17
- .badge--warning {
18
- color: var(--color-warning-80);
19
- background-color: var(--color-warning-20);
20
- }
21
-
22
- .badge--success {
23
- color: var(--color-text-inverted);
24
- background-color: var(--color-success);
25
- }
26
-
27
- .badge--info {
28
- color: var(--color-neutral-70);
29
- background-color: var(--color-neutral-5);
30
- }
31
-
32
- .badge--info-blue {
33
- background-color: var(--studio-blue-50);
34
- color: var(--color-text-inverted);
35
- }
36
-
37
- .badge--info-green {
38
- color: var(--studio-green-80);
39
- background-color: rgba(184, 230, 191, 0.64);
40
- }
41
-
42
- .badge--info-purple {
43
- color: var(--studio-woocommerce-purple-80);
44
- background-color: var(--studio-woocommerce-purple-5);
45
- }
46
-
47
- .badge--error {
48
- background-color: var(--color-error);
49
- color: var(--color-text-inverted);
50
- }
@@ -1,66 +0,0 @@
1
- export default {
2
- site_intent: 'free',
3
- launchpad_screen: 'full',
4
- checklist_statuses: {
5
- setup_free: true,
6
- setup_general: true,
7
- design_completed: true,
8
- site_theme_selected: true,
9
- },
10
- checklist: [
11
- {
12
- id: 'design_selected',
13
- title: 'Select a design',
14
- completed: true,
15
- disabled: false,
16
- subtitle: '',
17
- badge_text: '',
18
- isLaunchTask: false,
19
- calypso_path: '/setup/update-design/designSetup?siteSlug=site62798.wordpress.com',
20
- },
21
- {
22
- id: 'setup_link_in_bio',
23
- title: 'Personalize Link in Bio',
24
- completed: true,
25
- disabled: false,
26
- subtitle: '',
27
- badge_text: '',
28
- isLaunchTask: false,
29
- calypso_path:
30
- '/setup/link-in-bio-post-setup/linkInBioPostSetup?siteSlug=site62798.wordpress.com',
31
- },
32
- {
33
- id: 'plan_selected',
34
- title: 'Choose a plan',
35
- completed: true,
36
- disabled: false,
37
- subtitle: '',
38
- badge_text: '',
39
- isLaunchTask: false,
40
- calypso_path: '/plans/site62798.wordpress.com',
41
- },
42
- {
43
- id: 'links_added',
44
- title: 'Add links',
45
- completed: false,
46
- disabled: false,
47
- subtitle: '',
48
- badge_text: '',
49
- isLaunchTask: false,
50
- calypso_path: '/site-editor/site62798.wordpress.com',
51
- },
52
- {
53
- id: 'link_in_bio_launched',
54
- title: 'Launch your site',
55
- completed: false,
56
- disabled: true,
57
- subtitle: '',
58
- badge_text: '',
59
- isLaunchTask: false,
60
- },
61
- ],
62
- is_enabled: true,
63
- is_dismissed: false,
64
- is_dismissible: false,
65
- title: 'Next steps for your site',
66
- };