@codecademy/brand 2.8.0-alpha.ee8d477ea2.0 → 2.9.0-alpha.1b05c8bc21.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 +30 -5
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.d.ts +0 -5
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.js +12 -56
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/index.js +3 -5
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/NavPanels.d.ts +10 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/NavPanels.js +230 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/NavSection.d.ts +15 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/NavSection.js +75 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/consts.d.ts +9 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/consts.js +48 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/index.d.ts +11 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSectionVariant/index.js +100 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDietCard/index.d.ts +10 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderDietCard/index.js +82 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +0 -0
- package/dist/AppHeaderMobile/AppHeaderCatalogSectonVariantMobile/index.d.ts +4 -0
- package/dist/AppHeaderMobile/AppHeaderCatalogSectonVariantMobile/index.js +63 -0
- package/dist/AppHeaderMobile/AppHeaderSubMenuMobile/index.js +12 -5
- package/dist/GlobalHeader/context.d.ts +8 -0
- package/dist/GlobalHeader/context.js +9 -0
- package/dist/GlobalHeader/index.js +43 -37
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { useTheme } from '@emotion/react';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useCallback } from 'react';
|
|
5
5
|
import { AppHeader, AppHeaderMobile, isAppHeaderItemWithHref } from '..';
|
|
6
|
+
import { GlobalHeaderItemClickContext } from './context';
|
|
6
7
|
import { anonDefaultHeaderItems, anonDefaultMobileHeaderItems, anonLandingHeaderItems, anonLandingMobileHeaderItems, anonLoginHeaderItems, anonLoginMobileHeaderItems, anonSignupHeaderItems, anonSignupMobileHeaderItems, enterpriseHeaderItems, enterpriseMobileHeaderItems, freeHeaderItems, freeMobileHeaderItems, loadingHeaderItems, loadingMobileHeaderItems, proHeaderItems, proMobileHeaderItems, simpleBootcampHeaderItems, simpleBootcampMobileHeaderItems, simpleHeaderItems, simpleMobileHeaderItems, teamsHeaderItems, teamsMobileHeaderItems } from './GlobalHeaderVariants';
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export * from './types';
|
|
@@ -67,43 +68,48 @@ export const GlobalHeader = props => {
|
|
|
67
68
|
},
|
|
68
69
|
children: /*#__PURE__*/_jsx(GlobalNavRedesignContext.Provider, {
|
|
69
70
|
value: !!props.displayGlobalNavRedesign,
|
|
70
|
-
children: /*#__PURE__*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
71
|
+
children: /*#__PURE__*/_jsx(GlobalHeaderItemClickContext.Provider, {
|
|
72
|
+
value: {
|
|
73
|
+
globalHeaderItemClick: combinedAction
|
|
74
|
+
},
|
|
75
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
76
|
+
as: "header",
|
|
77
|
+
position: "sticky",
|
|
78
|
+
top: 0,
|
|
79
|
+
zIndex: theme.elements.headerZ,
|
|
80
|
+
overflow: {
|
|
81
|
+
_: 'hidden',
|
|
82
|
+
sm: 'visible'
|
|
83
|
+
} // Prevent tooltip overflow on mobile
|
|
84
|
+
,
|
|
85
|
+
children: [/*#__PURE__*/_jsx(AppHeader, {
|
|
86
|
+
action: combinedAction,
|
|
87
|
+
items: getAppHeaderItems(props, false),
|
|
88
|
+
search: props.search,
|
|
89
|
+
...(props.type === 'anon' ? {
|
|
90
|
+
redirectParam: props.redirectParam
|
|
91
|
+
} : hideNotification ? {} : {
|
|
92
|
+
notifications: props.notifications
|
|
93
|
+
}),
|
|
94
|
+
hideRightButtonDefaults: hideNotification,
|
|
95
|
+
isAnon: props.type === 'anon',
|
|
96
|
+
isTeams: props.type === 'teams',
|
|
97
|
+
type: hideNotification ? 'enterprise' : 'standard'
|
|
98
|
+
}), /*#__PURE__*/_jsx(AppHeaderMobile, {
|
|
99
|
+
action: combinedAction,
|
|
100
|
+
items: getAppHeaderItems(props, true),
|
|
101
|
+
...(props.type === 'anon' || hideNotification ? {} : {
|
|
102
|
+
notifications: props.notifications
|
|
103
|
+
}),
|
|
104
|
+
search: props.search,
|
|
105
|
+
redirectParam: props.type === 'anon' ? props.redirectParam : undefined,
|
|
106
|
+
isEnterprise: props.type === 'enterprise',
|
|
107
|
+
isAnon: props.type === 'anon',
|
|
108
|
+
isSimple: props.type === 'simple',
|
|
109
|
+
hideRightMenuButton: props.type === 'simple' || props.type === 'loading',
|
|
110
|
+
navigationMenuFormattedLabel: props?.localizedLabels?.navigationMenuFormattedLabel
|
|
111
|
+
}), props.children]
|
|
112
|
+
})
|
|
107
113
|
})
|
|
108
114
|
})
|
|
109
115
|
});
|
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": "2.
|
|
4
|
+
"version": "2.9.0-alpha.1b05c8bc21.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|