@codecademy/brand 1.20.0-alpha.eb1e4e5e3b.0 → 1.20.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.
|
@@ -37,4 +37,4 @@ export const popularContent = [{
|
|
|
37
37
|
type: ContentType.DOC,
|
|
38
38
|
slug: 'html/concepts/elements'
|
|
39
39
|
}];
|
|
40
|
-
export const ALLOWED_HOSTS = ['
|
|
40
|
+
export const ALLOWED_HOSTS = ['skillsoft.com', 'percipio.com', 'localhost', 'codecademy.com'];
|
|
@@ -16,7 +16,12 @@ export function safelyRedirect(url) {
|
|
|
16
16
|
}
|
|
17
17
|
function hasAllowedHost(url) {
|
|
18
18
|
const parsedUrl = new URL(url);
|
|
19
|
-
|
|
19
|
+
const {
|
|
20
|
+
hostname
|
|
21
|
+
} = parsedUrl;
|
|
22
|
+
return ALLOWED_HOSTS.some(host =>
|
|
23
|
+
// Exact match or exact subdomain match (e.g. sub.codecademy.com)
|
|
24
|
+
hostname === host || hostname.endsWith(`.${host}`));
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
// when a url is relative, the URL constructor will throw a TypeError;
|
|
@@ -48,12 +48,13 @@ export const LearningOutcomePopover = ({
|
|
|
48
48
|
} = learningOutcomeDetails || {};
|
|
49
49
|
const lowLatestAssessment = Boolean(latestScore != null && latestScore < 70);
|
|
50
50
|
const renderProgress = () => /*#__PURE__*/_jsxs(FlexBox, {
|
|
51
|
+
alignItems: "center",
|
|
51
52
|
children: [Boolean(percentComplete === 100) && /*#__PURE__*/_jsx(FlexBox, {
|
|
52
53
|
width: 16,
|
|
53
54
|
height: 16,
|
|
54
55
|
borderRadius: "md",
|
|
55
56
|
bg: "primary",
|
|
56
|
-
mr:
|
|
57
|
+
mr: 8,
|
|
57
58
|
alignItems: "center",
|
|
58
59
|
justifyContent: "center",
|
|
59
60
|
children: /*#__PURE__*/_jsx(SmallCheckIcon, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/brand",
|
|
3
3
|
"description": "Brand component library for Codecademy",
|
|
4
|
-
"version": "1.20.0
|
|
4
|
+
"version": "1.20.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@codecademy/gamut-illustrations": "*",
|
|
32
32
|
"@codecademy/gamut-patterns": "*",
|
|
33
33
|
"@codecademy/gamut-styles": "*",
|
|
34
|
-
"@codecademy/tracking": "1.1.
|
|
34
|
+
"@codecademy/tracking": "1.1.2",
|
|
35
35
|
"@codecademy/variance": "*",
|
|
36
36
|
"@emotion/react": "^11.4.0",
|
|
37
37
|
"@emotion/styled": "^11.3.0",
|