@codecademy/brand 3.6.0-alpha.eb8166002f.0 → 3.6.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/dist/AppHeader/AppHeaderElements/AppHeaderCatalogDropdown/NavPanels.js +31 -103
- package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js +1 -1
- package/dist/GlobalHeader/GlobalHeaderVariants.js +1 -1
- package/dist/LearningOutcomeFlyout/index.js +52 -11
- package/dist/LearningOutcomeFlyout/types.d.ts +2 -0
- package/dist/PricingSection/ConditionalColorMode.d.ts +4 -0
- package/dist/PricingSection/ConditionalColorMode.js +13 -0
- package/dist/PricingSection/PricingCard/PricingAmount.d.ts +7 -3
- package/dist/PricingSection/PricingCard/PricingAmount.js +92 -61
- package/dist/PricingSection/PricingCard/consts.js +14 -0
- package/dist/PricingSection/PricingCard/index.d.ts +6 -6
- package/dist/PricingSection/PricingCard/index.js +112 -153
- package/dist/PricingSection/PricingCard/types.d.ts +40 -0
- package/dist/PricingSection/PricingCard/types.js +63 -0
- package/dist/PricingSection/ProductCTA.d.ts +7 -5
- package/dist/PricingSection/ProductCTA.js +96 -31
- package/dist/PricingSection/Products.d.ts +4 -4
- package/dist/PricingSection/Products.js +28 -13
- package/dist/PricingSection/config.d.ts +1 -1
- package/dist/PricingSection/config.js +4 -2
- package/dist/PricingSection/index.d.ts +4 -5
- package/dist/PricingSection/index.js +27 -46
- package/dist/PricingSection/types.d.ts +3 -2
- package/dist/PricingSection/types.js +1 -0
- package/package.json +1 -1
|
@@ -1,84 +1,115 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
2
|
import { FlexBox, HiddenText, Text } from '@codecademy/gamut';
|
|
3
3
|
import { theme } from '@codecademy/gamut-styles';
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import { Product } from '../types';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
isUserInIndia
|
|
8
|
-
}) => isUserInIndia ? '₹' : '$';
|
|
6
|
+
import { getCurrencySymbol } from './types';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
8
|
const Amount = /*#__PURE__*/_styled(Text, {
|
|
10
9
|
target: "e19mon8j0",
|
|
11
10
|
label: "Amount"
|
|
12
|
-
})("font-weight:bold;color:black;font-size:
|
|
11
|
+
})("font-weight:bold;color:black;font-size:44px;line-height:64px;", theme.breakpoints.xl, "{font-size:64px;line-height:80px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9QcmljaW5nU2VjdGlvbi9QcmljaW5nQ2FyZC9QcmljaW5nQW1vdW50LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRMkIiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL1ByaWNpbmdTZWN0aW9uL1ByaWNpbmdDYXJkL1ByaWNpbmdBbW91bnQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRmxleEJveCwgSGlkZGVuVGV4dCwgVGV4dCB9IGZyb20gJ0Bjb2RlY2FkZW15L2dhbXV0JztcbmltcG9ydCB7IHRoZW1lIH0gZnJvbSAnQGNvZGVjYWRlbXkvZ2FtdXQtc3R5bGVzJztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5cbmltcG9ydCB7IFByb2R1Y3QgfSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBBbGxDdXJyZW5jeSwgZ2V0Q3VycmVuY3lTeW1ib2wgfSBmcm9tICcuL3R5cGVzJztcblxuY29uc3QgQW1vdW50ID0gc3R5bGVkKFRleHQpYFxuICBmb250LXdlaWdodDogYm9sZDtcbiAgY29sb3I6IGJsYWNrO1xu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GVkICR7Y3ljbGV9YDtcbiAgICBpZiAobW9udGhseVByaWNlKSB7XG4gICAgICBhcmlhTGFiZWwgKz0gYCBvciAke2dldEN1cnJlbmN5U3ltYm9sKFxuICAgICAgICBjdXJyZW5jeVxuICAgICAgKX0ke21vbnRobHlQcmljZX0gYmlsbGVkIG1vbnRobHlgO1xuICAgIH1cbiAgfVxuICBpZiAoaXNUZWFtcykge1xuICAgIGFyaWFMYWJlbCArPSAnLCBwZXIgdXNlci4gRGlzY291bnRzIGF2YWlsYWJsZSBmb3IgZWxpZ2libGUgdGVhbXMnO1xuICB9XG5cbiAgcmV0dXJuIChcbiAgICA8PlxuICAgICAgPEZsZXhCb3hcbiAgICAgICAgZGF0YS10ZXN0aWQ9XCJwcmljaW5nLWFtb3VudFwiXG4gICAgICAgIGxpbmVIZWlnaHQ9XCJ0aXRsZVwiXG4gICAgICAgIG1iPXtjb21wYWN0ID8gMCA6IDh9XG4gICAgICAgIGNvbHVtblxuICAgICAgICBhbGlnbkl0ZW1zPVwiY2VudGVyXCJcbiAgICAgID5cbiAgICAgICAgPEhpZGRlblRleHQgZGF0YS10ZXN0aWQ9XCJwcmljaW5nLWFtb3VudC1sYWJlbFwiPnthcmlhTGFiZWx9PC9IaWRkZW5UZXh0PlxuICAgICAgICB7LyogZm9yIHNjcmVlbiByZWFkZXIgb3B0aW1pemF0aW9uICovfVxuICAgICAgICA8RmxleEJveFxuICAgICAgICAgIGFyaWEtaGlkZGVuXG4gICAgICAgICAgcm93XG4gICAgICAgICAgYWxpZ25JdGVtcz1cImNlbnRlclwiXG4gICAgICAgICAgaGVpZ2h0PXt7IF86IDUwLCB4bDogJ3Vuc2V0JyB9fVxuICAgICAgICA+XG4gICAgICAgICAgPEZsZXhCb3ggbXI9ezR9IGFsaWduSXRlbXM9XCJzdGFydFwiPlxuICAgICAgICAgICAgPFRleHRcbiAgICAgICAgICAgICAgbXQ9e3sgXzogMTIsIHhsOiAxNiB9fVxuICAgICAgICAgICAgICBmb250V2VpZ2h0PVwiYm9sZFwiXG4gICAgICAgICAgICAgIGZvbnRTaXplPXszNH1cbiAgICAgICAgICAgID57YCR7Z2V0Q3VycmVuY3lTeW1ib2woY3VycmVuY3kpfWB9PC9UZXh0PlxuICAgICAgICAgICAgPEFtb3VudD57YCR7ZG9sbGFyc31gfTwvQW1vdW50PlxuICAgICAgICAgICAge3Byb2R1Y3QgPT09IFByb2R1Y3QuQmFzaWMgPyBudWxsIDogKFxuICAgICAgICAgICAgICA8RmxleEJveCBjb2x1bW4gYWxpZ25JdGVtcz1cImZsZXgtZW5kXCIgbWw9ezR9PlxuICAgICAgICAgICAgICAgIDxUZXh0IGZvbnRXZWlnaHQ9XCJib2xkXCIgZm9udFNpemU9ezIyfSBtdD17eyBfOiAxMiwgeGw6IDE2IH19PlxuICAgICAgICAgICAgICAgICAge2NlbnRzID8gYC4ke2NlbnRzfWAgOiA8c3Bhbj4mbmJzcDs8L3NwYW4+fVxuICAgICAgICAgICAgICAgIDwvVGV4dD5cbiAgICAgICAgICAgICAgICA8VGV4dCBtdD17eyBfOiAwLCB4bDogNCB9fSBjb2xvcj1cIm5hdnktNTAwXCI+XG4gICAgICAgICAgICAgICAgICAvbW9cbiAgICAgICAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICAgICAgIDwvRmxleEJveD5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9GbGV4Qm94PlxuICAgICAgICA8L0ZsZXhCb3g+XG4gICAgICAgIDxUZXh0IGNvbG9yPVwibmF2eS01MDBcIiBjZW50ZXIgbXQ9e2NvbXBhY3QgPyAwIDogeyBfOiA4LCB4bDogMCB9fT5cbiAgICAgICAgICB7cHJvZHVjdCA9PT0gUHJvZHVjdC5CYXNpYyA/IChcbiAgICAgICAgICAgIDxUZXh0IG1iPXsyNH0+QWx3YXlzIGZyZWU8L1RleHQ+XG4gICAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDw+XG4gICAgICAgICAgICAgIDxUZXh0IG1iPXtjb21wYWN0ID8gMCA6IDh9IGFyaWEtaGlkZGVuPlxuICAgICAgICAgICAgICAgIHtpc1RlYW1zXG4gICAgICAgICAgICAgICAgICA/ICdQZXIgdXNlciwgYmlsbGVkIGFubnVhbGx5J1xuICAgICAgICAgICAgICAgICAgOiBpc1VzZXJJbkluZGlhXG4gICAgICAgICAgICAgICAgICA/IGBQZXIgbW9udGgsIHBhaWQgJHtjeWNsZX1gXG4gICAgICAgICAgICAgICAgICA6IGBCaWxsZWQgJHtjeWNsZX1gfVxuICAgICAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICAgICAgIDxiciAvPlxuICAgICAgICAgICAgICB7bW9udGhseVByaWNlICYmIChcbiAgICAgICAgICAgICAgICA8VGV4dCBhcmlhLWhpZGRlbj5cbiAgICAgICAgICAgICAgICAgIHtgb3IgJHtnZXRDdXJyZW5jeVN5bWJvbChjdXJyZW5jeSl9JHttb250aGx5UHJpY2V9ICR7XG4gICAgICAgICAgICAgICAgICAgIGlzVXNlckluSW5kaWEgPyAncGFpZCcgOiAnYmlsbGVkJ1xuICAgICAgICAgICAgICAgICAgfSBtb250aGx5YH1cbiAgICAgICAgICAgICAgICA8L1RleHQ+XG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIHtpc1RlYW1zICYmIChcbiAgICAgICAgICAgICAgICA8VGV4dCBhcmlhLWhpZGRlbj5EaXNjb3VudHMgYXZhaWxhYmxlIGZvciBlbGlnaWJsZSB0ZWFtczwvVGV4dD5cbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvPlxuICAgICAgICAgICl9XG4gICAgICAgIDwvVGV4dD5cbiAgICAgIDwvRmxleEJveD5cbiAgICA8Lz5cbiAgKTtcbn07XG4iXX0= */"));
|
|
13
12
|
export const PricingAmount = ({
|
|
13
|
+
currency,
|
|
14
14
|
monthlyPrice,
|
|
15
15
|
product,
|
|
16
16
|
price,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
termMonths,
|
|
18
|
+
compact = false,
|
|
19
|
+
isUserInIndia
|
|
19
20
|
}) => {
|
|
21
|
+
const isTeams = product === Product.Teams;
|
|
20
22
|
const cycle = termMonths === 1 ? 'monthly' : 'annually';
|
|
21
23
|
const [dollars, cents] = price.split('.');
|
|
22
|
-
|
|
23
|
-
isUserInIndia
|
|
24
|
-
});
|
|
25
|
-
let ariaLabel = `${currencySymbol}${dollars}${cents ? `.${cents}` : ''}`;
|
|
24
|
+
let ariaLabel = `${getCurrencySymbol(currency)}${dollars}${cents ? `.${cents}` : ''}`;
|
|
26
25
|
if (product !== Product.Basic) {
|
|
27
|
-
ariaLabel += `
|
|
26
|
+
ariaLabel += ` a month, billed ${cycle}`;
|
|
27
|
+
if (monthlyPrice) {
|
|
28
|
+
ariaLabel += ` or ${getCurrencySymbol(currency)}${monthlyPrice} billed monthly`;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (isTeams) {
|
|
32
|
+
ariaLabel += ', per user. Discounts available for eligible teams';
|
|
28
33
|
}
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
children: [/*#__PURE__*/_jsxs(FlexBox, {
|
|
36
|
-
mr: 4,
|
|
34
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
35
|
+
children: /*#__PURE__*/_jsxs(FlexBox, {
|
|
36
|
+
"data-testid": "pricing-amount",
|
|
37
|
+
lineHeight: "title",
|
|
38
|
+
mb: compact ? 0 : 8,
|
|
39
|
+
column: true,
|
|
37
40
|
alignItems: "center",
|
|
38
41
|
children: [/*#__PURE__*/_jsx(HiddenText, {
|
|
42
|
+
"data-testid": "pricing-amount-label",
|
|
39
43
|
children: ariaLabel
|
|
40
|
-
}), /*#__PURE__*/_jsx(
|
|
41
|
-
fontWeight: "bold",
|
|
42
|
-
fontSize: 34,
|
|
43
|
-
"aria-hidden": true,
|
|
44
|
-
children: currencySymbol
|
|
45
|
-
}), /*#__PURE__*/_jsx(Amount, {
|
|
44
|
+
}), /*#__PURE__*/_jsx(FlexBox, {
|
|
46
45
|
"aria-hidden": true,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
row: true,
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
height: {
|
|
49
|
+
_: 50,
|
|
50
|
+
xl: 'unset'
|
|
51
|
+
},
|
|
52
|
+
children: /*#__PURE__*/_jsxs(FlexBox, {
|
|
53
|
+
mr: 4,
|
|
54
|
+
alignItems: "start",
|
|
55
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
56
|
+
mt: {
|
|
57
|
+
_: 12,
|
|
58
|
+
xl: 16
|
|
59
|
+
},
|
|
60
|
+
fontWeight: "bold",
|
|
61
|
+
fontSize: 34,
|
|
62
|
+
children: `${getCurrencySymbol(currency)}`
|
|
63
|
+
}), /*#__PURE__*/_jsx(Amount, {
|
|
64
|
+
children: `${dollars}`
|
|
65
|
+
}), product === Product.Basic ? null : /*#__PURE__*/_jsxs(FlexBox, {
|
|
66
|
+
column: true,
|
|
67
|
+
alignItems: "flex-end",
|
|
68
|
+
ml: 4,
|
|
69
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
70
|
+
fontWeight: "bold",
|
|
71
|
+
fontSize: 22,
|
|
72
|
+
mt: {
|
|
73
|
+
_: 12,
|
|
74
|
+
xl: 16
|
|
75
|
+
},
|
|
76
|
+
children: cents ? `.${cents}` : /*#__PURE__*/_jsx("span", {
|
|
77
|
+
children: "\xA0"
|
|
78
|
+
})
|
|
79
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
80
|
+
mt: {
|
|
81
|
+
_: 0,
|
|
82
|
+
xl: 4
|
|
83
|
+
},
|
|
84
|
+
color: "navy-500",
|
|
85
|
+
children: "/mo"
|
|
86
|
+
})]
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
90
|
+
color: "navy-500",
|
|
91
|
+
center: true,
|
|
92
|
+
mt: compact ? 0 : {
|
|
93
|
+
_: 8,
|
|
94
|
+
xl: 0
|
|
95
|
+
},
|
|
96
|
+
children: product === Product.Basic ? /*#__PURE__*/_jsx(Text, {
|
|
97
|
+
mb: 24,
|
|
98
|
+
children: "Always free"
|
|
99
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
100
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
101
|
+
mb: compact ? 0 : 8,
|
|
102
|
+
"aria-hidden": true,
|
|
103
|
+
children: isTeams ? 'Per user, billed annually' : isUserInIndia ? `Per month, paid ${cycle}` : `Billed ${cycle}`
|
|
104
|
+
}), /*#__PURE__*/_jsx("br", {}), monthlyPrice && /*#__PURE__*/_jsx(Text, {
|
|
105
|
+
"aria-hidden": true,
|
|
106
|
+
children: `or ${getCurrencySymbol(currency)}${monthlyPrice} ${isUserInIndia ? 'paid' : 'billed'} monthly`
|
|
107
|
+
}), isTeams && /*#__PURE__*/_jsx(Text, {
|
|
108
|
+
"aria-hidden": true,
|
|
109
|
+
children: "Discounts available for eligible teams"
|
|
110
|
+
})]
|
|
111
|
+
})
|
|
62
112
|
})]
|
|
63
|
-
})
|
|
64
|
-
color: "text-secondary",
|
|
65
|
-
center: true,
|
|
66
|
-
mt: {
|
|
67
|
-
_: 8,
|
|
68
|
-
xl: 0
|
|
69
|
-
},
|
|
70
|
-
children: product === Product.Basic ? /*#__PURE__*/_jsx(Text, {
|
|
71
|
-
mb: 24,
|
|
72
|
-
children: "Always free"
|
|
73
|
-
}) : /*#__PURE__*/_jsxs(FlexBox, {
|
|
74
|
-
column: true,
|
|
75
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
76
|
-
mb: 8,
|
|
77
|
-
children: `Billed ${cycle} or`
|
|
78
|
-
}), monthlyPrice && /*#__PURE__*/_jsx(Text, {
|
|
79
|
-
children: `${currencySymbol}${monthlyPrice} billed monthly`
|
|
80
|
-
})]
|
|
81
|
-
})
|
|
82
|
-
})]
|
|
113
|
+
})
|
|
83
114
|
});
|
|
84
115
|
};
|
|
@@ -75,6 +75,20 @@ export const planDetails = {
|
|
|
75
75
|
isLite: true,
|
|
76
76
|
features: getFeatures(['Basic access to free courses', 'Community support', 'Learning resources', 'Real-world projects', 'All courses', 'Skill paths', 'Certificates of completion'])
|
|
77
77
|
},
|
|
78
|
+
teams: {
|
|
79
|
+
id: 'teams',
|
|
80
|
+
title: 'Teams',
|
|
81
|
+
tag: 'Recommended for 2+',
|
|
82
|
+
isLite: false,
|
|
83
|
+
features: getFeatures()
|
|
84
|
+
},
|
|
85
|
+
enterprise: {
|
|
86
|
+
id: 'enterprise',
|
|
87
|
+
title: 'Enterprise',
|
|
88
|
+
tag: 'Recommended for 25+',
|
|
89
|
+
isLite: false,
|
|
90
|
+
features: getFeatures()
|
|
91
|
+
},
|
|
78
92
|
free: {
|
|
79
93
|
id: 'free',
|
|
80
94
|
title: 'Pro',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PlansByType } from '../config';
|
|
2
|
-
import {
|
|
2
|
+
import { Product, ProductDetails, User } from '../types';
|
|
3
|
+
import { AllCurrency } from './types';
|
|
3
4
|
export declare const smSize = 728;
|
|
4
|
-
export declare const PricingCard:
|
|
5
|
+
export declare const PricingCard: ({ product, productDetails, currency, plansByType, isUserInIndia, user, }: {
|
|
5
6
|
product: Product;
|
|
6
7
|
productDetails: ProductDetails;
|
|
8
|
+
currency: AllCurrency;
|
|
7
9
|
plansByType: PlansByType;
|
|
8
10
|
isUserInIndia: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
copyConfig?: CopyConfig[keyof CopyConfig];
|
|
12
|
-
}>;
|
|
11
|
+
user: User;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|