@codecademy/brand 1.13.0-alpha.2827340f44.0 → 1.13.0-alpha.2a33ab7fd2.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/index.js +2 -2
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.d.ts +2 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.js +25 -18
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderDropdownLink.js +1 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderMenuItem.js +1 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts +12 -8
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.js +22 -32
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.d.ts +1 -7
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +23 -78
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +2 -2
- package/dist/AppHeader/index.d.ts +3 -0
- package/dist/AppHeader/index.js +6 -3
- package/dist/AppHeader/shared/elements.d.ts +4 -1
- package/dist/AppHeader/shared/elements.js +25 -22
- package/dist/AppHeader/shared/testTypes.d.ts +0 -0
- package/dist/AppHeader/shared/testTypes.js +0 -0
- package/dist/AppHeader/shared/types.d.ts +16 -12
- package/dist/AppHeader/shared/utils.d.ts +4 -2
- package/dist/AppHeader/shared/utils.js +31 -3
- package/dist/AppHeaderMobile/AppHeaderMainMenuMobile/index.js +2 -3
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/elements.js +2 -1
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +9 -5
- package/dist/AppHeaderMobile/index.js +6 -6
- package/dist/GlobalHeader/index.js +2 -1
- package/dist/LearningOutcomeCard/index.d.ts +1 -5
- package/dist/LearningOutcomeCard/index.js +41 -71
- package/dist/stories/Molecules/AppHeader/AppHeader.stories.js +3 -0
- package/dist/stories/Molecules/AppHeader/LXStudioHeader.stories.d.ts +1 -0
- package/dist/stories/Molecules/AppHeader/LXStudioHeader.stories.js +111 -15
- package/dist/stories/Molecules/AppHeader/LXStudioMobileHeader.stories.js +6 -2
- package/dist/stories/Molecules/LearningOutcomeCard.stories.d.ts +0 -2
- package/dist/stories/Molecules/LearningOutcomeCard.stories.js +1 -31
- package/dist/stories/Organisms/GlobalFooter.stories.js +4 -1
- package/dist/stories/Organisms/GlobalHeader/About.stories.js +3 -0
- package/dist/stories/Organisms/GlobalHeader/Anon.stories.js +3 -0
- package/dist/stories/Organisms/GlobalHeader/Bootcamp.stories.js +3 -0
- package/dist/stories/Organisms/GlobalHeader/Enterprise.stories.js +3 -0
- package/dist/stories/Organisms/GlobalHeader/Free.stories.js +3 -0
- package/dist/stories/Organisms/GlobalHeader/Pro.stories.js +3 -0
- package/dist/stories/Organisms/GlobalHeader/Simple.stories.js +3 -0
- package/dist/stories/Organisms/GlobalPage.stories.js +3 -0
- package/package.json +1 -1
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Box, FlexBox, Text } from '@codecademy/gamut';
|
|
2
|
+
import { ArrowDashRightIcon, CloudCheckIcon, CommentsIcon, ConversationChatIcon, EarthIcon, GearIcon, LayoutModuleIcon, MiniArrowLeftIcon, PercipioIcon, PersonIcon, SupportIcon, TrashIcon } from '@codecademy/gamut-icons';
|
|
2
3
|
import { AppHeader, LogoLXStudio } from '../../../index';
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
5
|
const meta = {
|
|
5
6
|
component: AppHeader,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen'
|
|
9
|
+
},
|
|
6
10
|
args: {
|
|
7
11
|
action: () => {},
|
|
12
|
+
dropdownSpacing: 'condensed',
|
|
8
13
|
isStandalone: true,
|
|
9
14
|
hideRightButtonDefaults: true,
|
|
10
15
|
items: {
|
|
11
16
|
left: [{
|
|
12
17
|
id: 'render-element',
|
|
13
|
-
renderElement: () => /*#__PURE__*/_jsx(
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
renderElement: () => /*#__PURE__*/_jsx(Box, {
|
|
19
|
+
children: /*#__PURE__*/_jsx(LogoLXStudio, {
|
|
20
|
+
height: 40,
|
|
21
|
+
width: 196.92
|
|
22
|
+
})
|
|
16
23
|
}),
|
|
17
24
|
type: 'render-element'
|
|
18
25
|
}],
|
|
@@ -25,7 +32,6 @@ const meta = {
|
|
|
25
32
|
id: 'sublink-1',
|
|
26
33
|
text: 'Percipio',
|
|
27
34
|
href: 'http://codecademy.com',
|
|
28
|
-
trackingTarget: '',
|
|
29
35
|
type: 'link',
|
|
30
36
|
icon: PercipioIcon
|
|
31
37
|
}],
|
|
@@ -34,35 +40,37 @@ const meta = {
|
|
|
34
40
|
}, {
|
|
35
41
|
id: 'profile-dropdown',
|
|
36
42
|
type: 'profile-dropdown',
|
|
37
|
-
avatar: 'https://
|
|
43
|
+
avatar: 'https://avatarfiles.alphacoders.com/367/367474.png',
|
|
38
44
|
userDisplayName: 'cinnamoroll',
|
|
39
45
|
popover: [[{
|
|
40
46
|
id: 'sublink-1',
|
|
41
47
|
icon: PersonIcon,
|
|
42
48
|
text: 'My profile',
|
|
43
49
|
href: 'http://codecademy.com',
|
|
44
|
-
trackingTarget: '',
|
|
45
50
|
type: 'link'
|
|
46
51
|
}, {
|
|
47
52
|
id: 'sublink-2',
|
|
48
53
|
icon: GearIcon,
|
|
49
54
|
text: 'Settings',
|
|
50
55
|
href: 'http://codecademy.com',
|
|
51
|
-
trackingTarget: '',
|
|
52
56
|
type: 'link'
|
|
53
57
|
}, {
|
|
54
|
-
id: 'sublink-
|
|
58
|
+
id: 'sublink-3',
|
|
55
59
|
icon: SupportIcon,
|
|
56
60
|
text: 'Help',
|
|
57
61
|
href: 'http://codecademy.com',
|
|
58
|
-
trackingTarget: '',
|
|
59
62
|
type: 'link'
|
|
60
|
-
}
|
|
61
|
-
id: 'sublink-
|
|
62
|
-
icon:
|
|
63
|
+
}, {
|
|
64
|
+
id: 'sublink-4',
|
|
65
|
+
icon: TrashIcon,
|
|
66
|
+
text: 'Deleted items',
|
|
67
|
+
href: 'http://codecademy.com',
|
|
68
|
+
type: 'link'
|
|
69
|
+
}, {
|
|
70
|
+
id: 'sublink-5',
|
|
71
|
+
icon: ArrowDashRightIcon,
|
|
63
72
|
text: 'Log out',
|
|
64
73
|
href: 'http://codecademy.com',
|
|
65
|
-
trackingTarget: '',
|
|
66
74
|
type: 'link'
|
|
67
75
|
}]],
|
|
68
76
|
text: 'string;',
|
|
@@ -77,4 +85,92 @@ export const Default = {
|
|
|
77
85
|
...args
|
|
78
86
|
}),
|
|
79
87
|
name: 'LXStudio AppHeader'
|
|
88
|
+
};
|
|
89
|
+
export const ButtonsWithTitle = {
|
|
90
|
+
render: args => /*#__PURE__*/_jsx(AppHeader, {
|
|
91
|
+
...args
|
|
92
|
+
}),
|
|
93
|
+
args: {
|
|
94
|
+
action: () => {},
|
|
95
|
+
dropdownSpacing: 'condensed',
|
|
96
|
+
isStandalone: true,
|
|
97
|
+
hideRightButtonDefaults: true,
|
|
98
|
+
items: {
|
|
99
|
+
left: [{
|
|
100
|
+
id: 'exit',
|
|
101
|
+
type: 'text-button',
|
|
102
|
+
text: 'Exit',
|
|
103
|
+
icon: MiniArrowLeftIcon,
|
|
104
|
+
href: ''
|
|
105
|
+
}, {
|
|
106
|
+
id: 'caisy-title',
|
|
107
|
+
renderElement: () => /*#__PURE__*/_jsxs(FlexBox, {
|
|
108
|
+
borderColor: "border-secondary",
|
|
109
|
+
borderLeft: 1,
|
|
110
|
+
center: true,
|
|
111
|
+
height: "100%",
|
|
112
|
+
width: "fit-content",
|
|
113
|
+
pl: 16,
|
|
114
|
+
children: [/*#__PURE__*/_jsx(ConversationChatIcon, {
|
|
115
|
+
size: 26,
|
|
116
|
+
ml: 4,
|
|
117
|
+
color: "primary"
|
|
118
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
119
|
+
as: "h1",
|
|
120
|
+
ml: 16,
|
|
121
|
+
variant: "title-xs",
|
|
122
|
+
children: "CAISY\u2122: Something else entirely"
|
|
123
|
+
})]
|
|
124
|
+
}),
|
|
125
|
+
type: 'render-element'
|
|
126
|
+
}],
|
|
127
|
+
right: [{
|
|
128
|
+
id: 'draft-zone',
|
|
129
|
+
renderElement: () => /*#__PURE__*/_jsxs(FlexBox, {
|
|
130
|
+
center: true,
|
|
131
|
+
color: "text-secondary",
|
|
132
|
+
height: "24px",
|
|
133
|
+
width: "fit-content",
|
|
134
|
+
children: [/*#__PURE__*/_jsx(CloudCheckIcon, {}), /*#__PURE__*/_jsx(Text, {
|
|
135
|
+
ml: 8,
|
|
136
|
+
children: "Draft auto-saved"
|
|
137
|
+
})]
|
|
138
|
+
}),
|
|
139
|
+
type: 'render-element'
|
|
140
|
+
}, {
|
|
141
|
+
id: 'globe-button',
|
|
142
|
+
text: 'Language',
|
|
143
|
+
icon: EarthIcon,
|
|
144
|
+
type: 'icon-button',
|
|
145
|
+
href: '',
|
|
146
|
+
variant: 'primary'
|
|
147
|
+
}, {
|
|
148
|
+
id: 'chat-button',
|
|
149
|
+
text: 'Comments',
|
|
150
|
+
icon: CommentsIcon,
|
|
151
|
+
type: 'icon-button',
|
|
152
|
+
href: '',
|
|
153
|
+
variant: 'primary'
|
|
154
|
+
}, {
|
|
155
|
+
id: 'preview-button',
|
|
156
|
+
text: 'Preview',
|
|
157
|
+
type: 'stroke-button',
|
|
158
|
+
href: '',
|
|
159
|
+
variant: 'primary'
|
|
160
|
+
}, {
|
|
161
|
+
id: 'share-button',
|
|
162
|
+
text: 'Share',
|
|
163
|
+
type: 'stroke-button',
|
|
164
|
+
href: '',
|
|
165
|
+
variant: 'primary'
|
|
166
|
+
}, {
|
|
167
|
+
id: 'publish-button',
|
|
168
|
+
text: 'Publish',
|
|
169
|
+
type: 'fill-button',
|
|
170
|
+
href: '',
|
|
171
|
+
variant: 'primary'
|
|
172
|
+
}]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
name: 'LXStudio Buttons with Title'
|
|
80
176
|
};
|
|
@@ -3,6 +3,9 @@ import { AppHeaderMobile, LogoLXStudio } from '../../../index';
|
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
const meta = {
|
|
5
5
|
component: AppHeaderMobile,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen'
|
|
8
|
+
},
|
|
6
9
|
args: {
|
|
7
10
|
action: () => {},
|
|
8
11
|
isEnterprise: true,
|
|
@@ -10,8 +13,9 @@ const meta = {
|
|
|
10
13
|
left: [{
|
|
11
14
|
id: 'render-element',
|
|
12
15
|
renderElement: () => /*#__PURE__*/_jsx(LogoLXStudio, {
|
|
13
|
-
|
|
14
|
-
width:
|
|
16
|
+
maxWidth: "40vw",
|
|
17
|
+
width: "225px",
|
|
18
|
+
pb: 4
|
|
15
19
|
}),
|
|
16
20
|
type: 'render-element'
|
|
17
21
|
}],
|
|
@@ -5,5 +5,3 @@ export default meta;
|
|
|
5
5
|
type Story = StoryObj<typeof LearningOutcomeCard>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const EmphasizedCard: Story;
|
|
8
|
-
export declare const EmphasizedCardWithProgress: Story;
|
|
9
|
-
export declare const EmphasizedCardWithProgress100: Story;
|
|
@@ -6,13 +6,7 @@ const meta = {
|
|
|
6
6
|
args: {
|
|
7
7
|
level: 1,
|
|
8
8
|
outcome: 'Implement sorting algorithms in Java.',
|
|
9
|
-
skills: [
|
|
10
|
-
title: 'java'
|
|
11
|
-
}, {
|
|
12
|
-
title: 'skill'
|
|
13
|
-
}, {
|
|
14
|
-
title: 'computer science'
|
|
15
|
-
}]
|
|
9
|
+
skills: ['java', 'skill', 'computer science']
|
|
16
10
|
}
|
|
17
11
|
};
|
|
18
12
|
export default meta;
|
|
@@ -32,28 +26,4 @@ export const EmphasizedCard = {
|
|
|
32
26
|
})
|
|
33
27
|
}),
|
|
34
28
|
name: 'Emphasized Card'
|
|
35
|
-
};
|
|
36
|
-
export const EmphasizedCardWithProgress = {
|
|
37
|
-
render: args => /*#__PURE__*/_jsx(Background, {
|
|
38
|
-
bg: "navy",
|
|
39
|
-
p: 24,
|
|
40
|
-
children: /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
41
|
-
emphasized: true,
|
|
42
|
-
...args,
|
|
43
|
-
progress: 60
|
|
44
|
-
})
|
|
45
|
-
}),
|
|
46
|
-
name: 'Emphasized card displaying progress, for use in the Learning Environment'
|
|
47
|
-
};
|
|
48
|
-
export const EmphasizedCardWithProgress100 = {
|
|
49
|
-
render: args => /*#__PURE__*/_jsx(Background, {
|
|
50
|
-
bg: "navy",
|
|
51
|
-
p: 24,
|
|
52
|
-
children: /*#__PURE__*/_jsx(LearningOutcomeCard, {
|
|
53
|
-
emphasized: true,
|
|
54
|
-
...args,
|
|
55
|
-
progress: 100
|
|
56
|
-
})
|
|
57
|
-
}),
|
|
58
|
-
name: 'Emphasized card displaying 100% progress, for use in the Learning Environment'
|
|
59
29
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { GlobalFooter } from '../../index';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
const meta = {
|
|
4
|
-
component: GlobalFooter
|
|
4
|
+
component: GlobalFooter,
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'fullscreen'
|
|
7
|
+
}
|
|
5
8
|
};
|
|
6
9
|
export default meta;
|
|
7
10
|
export const Default = {
|
|
@@ -3,6 +3,9 @@ import { GlobalHeader } from '../../../index';
|
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
const meta = {
|
|
5
5
|
component: GlobalHeader,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'fullscreen'
|
|
8
|
+
},
|
|
6
9
|
decorators: [Story => {
|
|
7
10
|
return /*#__PURE__*/_jsx(Box, {
|
|
8
11
|
style: {
|
|
@@ -4,6 +4,9 @@ import { GlobalHeader } from '../../../index';
|
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
const meta = {
|
|
6
6
|
component: GlobalHeader,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen'
|
|
9
|
+
},
|
|
7
10
|
decorators: [Story => {
|
|
8
11
|
return /*#__PURE__*/_jsx(Box, {
|
|
9
12
|
style: {
|
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.13.0-alpha.
|
|
4
|
+
"version": "1.13.0-alpha.2a33ab7fd2.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|