@codecademy/brand 0.18.0 → 0.19.0-alpha.af124bc9f8.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.js +53 -27
- 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 +8 -4
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.js +20 -23
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +17 -63
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderDropdownNavButton.d.ts +4 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderDropdownNavButton.js +22 -5
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/index.js +2 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +2 -2
- package/dist/AppHeader/index.d.ts +5 -12
- package/dist/AppHeader/index.js +12 -92
- package/dist/AppHeader/shared/elements.d.ts +17 -1
- package/dist/AppHeader/shared/elements.js +47 -18
- package/dist/AppHeader/shared/types.d.ts +2 -0
- package/dist/AppHeader/shared/utils.d.ts +14 -0
- package/dist/AppHeader/shared/utils.js +76 -0
- package/dist/AppHeaderMobile/index.js +15 -6
- package/dist/LogoFromSkillsoft/index.d.ts +4 -5
- package/dist/LogoFromSkillsoft/index.js +2 -2
- package/dist/LogoLXStudio/index.d.ts +3 -0
- package/dist/LogoLXStudio/index.js +48 -0
- package/dist/ResourceCard/index.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.d.ts +6 -0
- package/dist/stories/Atoms/Logos/LogoLXStudio.stories.js +15 -0
- package/dist/stories/Molecules/AppHeader/AppHeader.stories.js +21 -1
- package/dist/stories/Molecules/AppHeader/AppHeaderDropdown.stories.js +2 -0
- package/dist/stories/Molecules/AppHeader/LXStudioHeader.stories.d.ts +6 -0
- package/dist/stories/Molecules/AppHeader/LXStudioHeader.stories.js +90 -0
- package/dist/stories/Molecules/AppHeader/LXStudioMobileHeader.stories.d.ts +6 -0
- package/dist/stories/Molecules/AppHeader/LXStudioMobileHeader.stories.js +80 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -50,6 +50,7 @@ export * from './Loading';
|
|
|
50
50
|
export * from './LoadingCurriculumCard';
|
|
51
51
|
export * from './Logo';
|
|
52
52
|
export * from './LogoFromSkillsoft';
|
|
53
|
+
export * from './LogoLXStudio';
|
|
53
54
|
export * from './MarketingToaster';
|
|
54
55
|
export * from './NotificationList';
|
|
55
56
|
export * from './NotificationList/NotificationItem';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LogoLXStudio } from '../../../index';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
const meta = {
|
|
4
|
+
args: {
|
|
5
|
+
height: 40
|
|
6
|
+
},
|
|
7
|
+
component: LogoLXStudio
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const Default = {
|
|
11
|
+
render: args => /*#__PURE__*/_jsx(LogoLXStudio, {
|
|
12
|
+
...args
|
|
13
|
+
}),
|
|
14
|
+
name: 'LogoFromSkillsoft'
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconButton } from '@codecademy/gamut';
|
|
2
|
-
import { FaviconIcon } from '@codecademy/gamut-icons';
|
|
2
|
+
import { FaviconIcon, PersonIcon } from '@codecademy/gamut-icons';
|
|
3
3
|
import { AppHeader } from '../../../index';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
const meta = {
|
|
@@ -36,6 +36,25 @@ const meta = {
|
|
|
36
36
|
href: 'http://codecademy.com',
|
|
37
37
|
trackingTarget: 'tracking-target',
|
|
38
38
|
type: 'text-button'
|
|
39
|
+
}, {
|
|
40
|
+
id: 'target',
|
|
41
|
+
text: 'Dropdown Target',
|
|
42
|
+
icon: PersonIcon,
|
|
43
|
+
popover: [{
|
|
44
|
+
id: 'sublink-1',
|
|
45
|
+
text: 'A Link',
|
|
46
|
+
href: 'http://codecademy.com',
|
|
47
|
+
trackingTarget: '',
|
|
48
|
+
type: 'link'
|
|
49
|
+
}, {
|
|
50
|
+
id: 'sublink-2',
|
|
51
|
+
text: 'Another Link',
|
|
52
|
+
href: 'http://codecademy.com',
|
|
53
|
+
trackingTarget: '',
|
|
54
|
+
type: 'link'
|
|
55
|
+
}],
|
|
56
|
+
trackingTarget: '',
|
|
57
|
+
type: 'dropdown'
|
|
39
58
|
}, {
|
|
40
59
|
id: 'fill-button',
|
|
41
60
|
text: 'FillButton',
|
|
@@ -44,6 +63,7 @@ const meta = {
|
|
|
44
63
|
type: 'fill-button'
|
|
45
64
|
}]
|
|
46
65
|
},
|
|
66
|
+
isStandalone: true,
|
|
47
67
|
search: {
|
|
48
68
|
onEnable: () => {},
|
|
49
69
|
onSearch: () => {},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Box } from '@codecademy/gamut';
|
|
2
|
+
import { PersonIcon } from '@codecademy/gamut-icons';
|
|
2
3
|
import { AppHeaderDropdown } from '../../../index';
|
|
3
4
|
import { MOCK_PROFILE_DROPDOWN } from './MockAppHeaderElements';
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -8,6 +9,7 @@ const meta = {
|
|
|
8
9
|
item: {
|
|
9
10
|
id: 'target',
|
|
10
11
|
text: 'Dropdown Target',
|
|
12
|
+
icon: PersonIcon,
|
|
11
13
|
popover: [{
|
|
12
14
|
id: 'sublink-1',
|
|
13
15
|
text: 'A Link',
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Box } from '@codecademy/gamut';
|
|
2
|
+
import { GearIcon, LayoutModuleIcon, PercipioIcon, PersonIcon, SupportIcon, TrashIcon } from '@codecademy/gamut-icons';
|
|
3
|
+
import { AppHeader, LogoLXStudio } from '../../../index';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: AppHeader,
|
|
7
|
+
args: {
|
|
8
|
+
action: () => {},
|
|
9
|
+
isStandalone: true,
|
|
10
|
+
hideRightButtonDefaults: true,
|
|
11
|
+
items: {
|
|
12
|
+
left: [{
|
|
13
|
+
id: 'render-element',
|
|
14
|
+
renderElement: () => /*#__PURE__*/_jsx(Box, {
|
|
15
|
+
children: /*#__PURE__*/_jsx(LogoLXStudio, {
|
|
16
|
+
height: 40,
|
|
17
|
+
width: 196.92
|
|
18
|
+
})
|
|
19
|
+
}),
|
|
20
|
+
type: 'render-element'
|
|
21
|
+
}],
|
|
22
|
+
right: [{
|
|
23
|
+
id: 'menu',
|
|
24
|
+
text: 'Menu',
|
|
25
|
+
icon: LayoutModuleIcon,
|
|
26
|
+
isIconOnly: true,
|
|
27
|
+
popover: [{
|
|
28
|
+
id: 'sublink-1',
|
|
29
|
+
text: 'Percipio',
|
|
30
|
+
href: 'http://codecademy.com',
|
|
31
|
+
trackingTarget: '',
|
|
32
|
+
type: 'link',
|
|
33
|
+
icon: PercipioIcon
|
|
34
|
+
}],
|
|
35
|
+
trackingTarget: '',
|
|
36
|
+
type: 'dropdown'
|
|
37
|
+
}, {
|
|
38
|
+
id: 'profile-dropdown',
|
|
39
|
+
type: 'profile-dropdown',
|
|
40
|
+
avatar: 'https://pbs.twimg.com/media/F9QcGzgXEAAPqLo?format=jpg&name=small',
|
|
41
|
+
userDisplayName: 'cinnamoroll',
|
|
42
|
+
popover: [[{
|
|
43
|
+
id: 'sublink-1',
|
|
44
|
+
icon: PersonIcon,
|
|
45
|
+
text: 'My profile',
|
|
46
|
+
href: 'http://codecademy.com',
|
|
47
|
+
trackingTarget: '',
|
|
48
|
+
type: 'link'
|
|
49
|
+
}, {
|
|
50
|
+
id: 'sublink-2',
|
|
51
|
+
icon: GearIcon,
|
|
52
|
+
text: 'Settings',
|
|
53
|
+
href: 'http://codecademy.com',
|
|
54
|
+
trackingTarget: '',
|
|
55
|
+
type: 'link'
|
|
56
|
+
}, {
|
|
57
|
+
id: 'sublink-3',
|
|
58
|
+
icon: SupportIcon,
|
|
59
|
+
text: 'Help',
|
|
60
|
+
href: 'http://codecademy.com',
|
|
61
|
+
trackingTarget: '',
|
|
62
|
+
type: 'link'
|
|
63
|
+
}, {
|
|
64
|
+
id: 'sublink-4',
|
|
65
|
+
icon: TrashIcon,
|
|
66
|
+
text: 'Deleted items',
|
|
67
|
+
href: 'http://codecademy.com',
|
|
68
|
+
trackingTarget: '',
|
|
69
|
+
type: 'link'
|
|
70
|
+
}], [{
|
|
71
|
+
id: 'sublink-2',
|
|
72
|
+
icon: PersonIcon,
|
|
73
|
+
text: 'Log out',
|
|
74
|
+
href: 'http://codecademy.com',
|
|
75
|
+
trackingTarget: '',
|
|
76
|
+
type: 'link'
|
|
77
|
+
}]],
|
|
78
|
+
text: 'string;',
|
|
79
|
+
trackingTarget: 'string'
|
|
80
|
+
}]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
export default meta;
|
|
85
|
+
export const Default = {
|
|
86
|
+
render: args => /*#__PURE__*/_jsx(AppHeader, {
|
|
87
|
+
...args
|
|
88
|
+
}),
|
|
89
|
+
name: 'LXStudio AppHeader'
|
|
90
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { AppHeaderMobile } from '../../../index';
|
|
3
|
+
declare const meta: Meta<typeof AppHeaderMobile>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AppHeaderMobile>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { GearIcon, LayoutModuleIcon, PercipioIcon, PersonIcon, SupportIcon } from '@codecademy/gamut-icons';
|
|
2
|
+
import { AppHeaderMobile, LogoLXStudio } from '../../../index';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const meta = {
|
|
5
|
+
component: AppHeaderMobile,
|
|
6
|
+
args: {
|
|
7
|
+
action: () => {},
|
|
8
|
+
isEnterprise: true,
|
|
9
|
+
items: {
|
|
10
|
+
left: [{
|
|
11
|
+
id: 'render-element',
|
|
12
|
+
renderElement: () => /*#__PURE__*/_jsx(LogoLXStudio, {
|
|
13
|
+
height: 1,
|
|
14
|
+
width: 1
|
|
15
|
+
}),
|
|
16
|
+
type: 'render-element'
|
|
17
|
+
}],
|
|
18
|
+
right: [],
|
|
19
|
+
mainMenu: [{
|
|
20
|
+
id: 'menu',
|
|
21
|
+
text: 'Menu',
|
|
22
|
+
icon: LayoutModuleIcon,
|
|
23
|
+
isIconOnly: true,
|
|
24
|
+
popover: [{
|
|
25
|
+
id: 'sublink-1',
|
|
26
|
+
text: 'Percipio',
|
|
27
|
+
href: 'http://codecademy.com',
|
|
28
|
+
trackingTarget: '',
|
|
29
|
+
type: 'link',
|
|
30
|
+
icon: PercipioIcon
|
|
31
|
+
}],
|
|
32
|
+
trackingTarget: '',
|
|
33
|
+
type: 'dropdown'
|
|
34
|
+
}, {
|
|
35
|
+
id: 'profile-dropdown',
|
|
36
|
+
type: 'profile-dropdown',
|
|
37
|
+
avatar: 'https://pbs.twimg.com/media/F9QcGzgXEAAPqLo?format=jpg&name=small',
|
|
38
|
+
userDisplayName: 'cinnamoroll',
|
|
39
|
+
popover: [[{
|
|
40
|
+
id: 'sublink-1',
|
|
41
|
+
icon: PersonIcon,
|
|
42
|
+
text: 'My profile',
|
|
43
|
+
href: 'http://codecademy.com',
|
|
44
|
+
trackingTarget: '',
|
|
45
|
+
type: 'link'
|
|
46
|
+
}, {
|
|
47
|
+
id: 'sublink-2',
|
|
48
|
+
icon: GearIcon,
|
|
49
|
+
text: 'Settings',
|
|
50
|
+
href: 'http://codecademy.com',
|
|
51
|
+
trackingTarget: '',
|
|
52
|
+
type: 'link'
|
|
53
|
+
}, {
|
|
54
|
+
id: 'sublink-3',
|
|
55
|
+
icon: SupportIcon,
|
|
56
|
+
text: 'Help',
|
|
57
|
+
href: 'http://codecademy.com',
|
|
58
|
+
trackingTarget: '',
|
|
59
|
+
type: 'link'
|
|
60
|
+
}], [{
|
|
61
|
+
id: 'sublink-4',
|
|
62
|
+
icon: PersonIcon,
|
|
63
|
+
text: 'Log out',
|
|
64
|
+
href: 'http://codecademy.com',
|
|
65
|
+
trackingTarget: '',
|
|
66
|
+
type: 'link'
|
|
67
|
+
}]],
|
|
68
|
+
text: 'string;',
|
|
69
|
+
trackingTarget: 'string'
|
|
70
|
+
}]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
export default meta;
|
|
75
|
+
export const Default = {
|
|
76
|
+
render: args => /*#__PURE__*/_jsx(AppHeaderMobile, {
|
|
77
|
+
...args
|
|
78
|
+
}),
|
|
79
|
+
name: 'LXStudio AppHeaderMobile'
|
|
80
|
+
};
|
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": "0.
|
|
4
|
+
"version": "0.19.0-alpha.af124bc9f8.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|