@codecademy/brand 3.26.0-alpha.11d3f104ec.0 → 3.26.0-alpha.18e8b1387b.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 +6 -28
- package/dist/AppHeader/AppHeaderElements/AppHeaderCatalogSection/elements.d.ts +8 -46
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.d.ts +0 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdown/index.js +10 -67
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.d.ts +3 -40
- package/dist/AppHeader/AppHeaderElements/AppHeaderLink/index.js +16 -30
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/elements.d.ts +42 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/elements.js +36 -0
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.d.ts +1 -8
- package/dist/AppHeader/AppHeaderElements/AppHeaderLinkSections/index.js +32 -25
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/index.d.ts +5 -2
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/index.js +91 -24
- package/dist/AppHeader/AppHeaderElements/AppHeaderResourcesDropdown/index.js +5 -27
- package/dist/AppHeader/AppHeaderElements/AppHeaderSection/NavSection.d.ts +2 -2
- package/dist/AppHeader/AppHeaderElements/AppHeaderSection/NavSection.js +38 -20
- package/dist/AppHeader/AppHeaderElements/AppHeaderSection/elements.js +8 -8
- package/dist/AppHeader/AppHeaderElements/AppHeaderSection/index.js +5 -13
- package/dist/AppHeader/AppHeaderElements/AppHeaderSkillTile/index.js +2 -2
- package/dist/AppHeader/shared/elements.d.ts +12 -25
- package/dist/AppHeader/shared/elements.js +126 -26
- package/dist/AppHeader/shared/types.d.ts +1 -1
- package/dist/AppHeader/shared/utils.d.ts +1 -2
- package/dist/AppHeader/shared/utils.js +0 -2
- package/dist/AppHeaderMobile/index.js +2 -3
- package/dist/PlanCard/PricingAmount.js +6 -6
- package/dist/PlanCard/types.d.ts +1 -0
- package/dist/PlanCard/types.js +13 -1
- package/package.json +1 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderDropdownLink.d.ts +0 -3
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderDropdownLink.js +0 -25
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderMenuItem.d.ts +0 -3
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/AppHeaderMenuItem.js +0 -26
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/StyledAppHeaderLink.d.ts +0 -79
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/StyledAppHeaderLink.js +0 -36
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/types.d.ts +0 -4
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/types.js +0 -1
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/index.d.ts +0 -2
- package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/index.js +0 -2
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderDropdownNavButton.d.ts +0 -18
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderDropdownNavButton.js +0 -50
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderMenuNavButton.d.ts +0 -9
- package/dist/AppHeader/AppHeaderElements/AppHeaderNavButton/AppHeaderMenuNavButton.js +0 -38
package/dist/AppHeader/AppHeaderElements/AppHeaderDropdownLinks/elements/StyledAppHeaderLink.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import _styled from "@emotion/styled/base";
|
|
2
|
-
import { css, theme } from '@codecademy/gamut-styles';
|
|
3
|
-
import { AppHeaderLink } from '../../AppHeaderLink';
|
|
4
|
-
export const StyledAppHeaderLink = /*#__PURE__*/_styled(AppHeaderLink, {
|
|
5
|
-
target: "e1oc8aqt0",
|
|
6
|
-
label: "StyledAppHeaderLink"
|
|
7
|
-
})(css({
|
|
8
|
-
display: 'flex',
|
|
9
|
-
position: 'relative',
|
|
10
|
-
'@media (max-width: 1199px)': {
|
|
11
|
-
pl: 0
|
|
12
|
-
},
|
|
13
|
-
'&::before': {
|
|
14
|
-
content: '""',
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
width: 'calc(100% - 24px)',
|
|
17
|
-
left: {
|
|
18
|
-
_: 0,
|
|
19
|
-
lg: 12
|
|
20
|
-
},
|
|
21
|
-
borderRadius: 'lg',
|
|
22
|
-
transition: 'background-color 0.15s ease',
|
|
23
|
-
pointerEvents: 'none',
|
|
24
|
-
zIndex: -1
|
|
25
|
-
},
|
|
26
|
-
'&:hover::before, &:focus-visible::before': {
|
|
27
|
-
backgroundColor: theme.colors['navy-100']
|
|
28
|
-
},
|
|
29
|
-
'&:hover, &:focus-visible, &:active': {
|
|
30
|
-
color: 'hyper-400',
|
|
31
|
-
borderRadius: 'lg'
|
|
32
|
-
},
|
|
33
|
-
'&:active::before': {
|
|
34
|
-
backgroundColor: theme.colors['navy-200']
|
|
35
|
-
}
|
|
36
|
-
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9BcHBIZWFkZXIvQXBwSGVhZGVyRWxlbWVudHMvQXBwSGVhZGVyRHJvcGRvd25MaW5rcy9lbGVtZW50cy9TdHlsZWRBcHBIZWFkZXJMaW5rLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLbUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vc3JjL0FwcEhlYWRlci9BcHBIZWFkZXJFbGVtZW50cy9BcHBIZ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libGUsICY6YWN0aXZlJzoge1xuICAgICAgY29sb3I6ICdoeXBlci00MDAnLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnbGcnLFxuICAgIH0sXG4gICAgJyY6YWN0aXZlOjpiZWZvcmUnOiB7XG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6IHRoZW1lLmNvbG9yc1snbmF2eS0yMDAnXSxcbiAgICB9LFxuICB9KVxuKTtcbiJdfQ== */");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { GamutIconProps } from '@codecademy/gamut-icons';
|
|
2
|
-
interface AppHeaderNavButtonBaseProps {
|
|
3
|
-
buttonRef: React.RefObject<HTMLButtonElement>;
|
|
4
|
-
handleOnClick: (event: React.MouseEvent) => void;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
title?: string;
|
|
7
|
-
}
|
|
8
|
-
interface AppHeaderTextNavButtonProps extends AppHeaderNavButtonBaseProps {
|
|
9
|
-
icon?: never;
|
|
10
|
-
isIconOnly?: never;
|
|
11
|
-
}
|
|
12
|
-
interface AppHeaderIconNavButtonProps extends AppHeaderNavButtonBaseProps {
|
|
13
|
-
icon: React.ComponentType<GamutIconProps>;
|
|
14
|
-
isIconOnly?: boolean;
|
|
15
|
-
}
|
|
16
|
-
type AppHeaderNavButtonProps = AppHeaderTextNavButtonProps | AppHeaderIconNavButtonProps;
|
|
17
|
-
export declare const AppHeaderDropdownNavButton: React.FC<AppHeaderNavButtonProps>;
|
|
18
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { IconButton } from '@codecademy/gamut';
|
|
2
|
-
import { DropdownAnchor, DropdownIcon, StyledText } from '../../shared';
|
|
3
|
-
import { useAppHeaderDropdownContext } from '../AppHeaderDropdownProvider';
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
export const AppHeaderDropdownNavButton = ({
|
|
6
|
-
buttonRef,
|
|
7
|
-
handleOnClick,
|
|
8
|
-
icon,
|
|
9
|
-
isOpen,
|
|
10
|
-
title,
|
|
11
|
-
isIconOnly
|
|
12
|
-
}) => {
|
|
13
|
-
const {
|
|
14
|
-
firstItemRef
|
|
15
|
-
} = useAppHeaderDropdownContext();
|
|
16
|
-
const dropdownNavOnClick = e => {
|
|
17
|
-
handleOnClick(e);
|
|
18
|
-
if (!isOpen) {
|
|
19
|
-
firstItemRef?.focus();
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const sharedProps = {
|
|
23
|
-
'aria-expanded': isOpen,
|
|
24
|
-
onClick: dropdownNavOnClick,
|
|
25
|
-
ref: buttonRef
|
|
26
|
-
};
|
|
27
|
-
if (icon && isIconOnly) return /*#__PURE__*/_jsx(IconButton, {
|
|
28
|
-
icon: icon,
|
|
29
|
-
tip: title ?? 'Dropdown',
|
|
30
|
-
tipProps: {
|
|
31
|
-
alignment: 'bottom-center',
|
|
32
|
-
placement: 'floating'
|
|
33
|
-
},
|
|
34
|
-
...sharedProps
|
|
35
|
-
});
|
|
36
|
-
return /*#__PURE__*/_jsxs(DropdownAnchor, {
|
|
37
|
-
...sharedProps,
|
|
38
|
-
title: title,
|
|
39
|
-
variant: "interface",
|
|
40
|
-
children: [/*#__PURE__*/_jsx(StyledText, {
|
|
41
|
-
fontWeight: isOpen ? 'bold' : 'normal',
|
|
42
|
-
textAlign: "center",
|
|
43
|
-
title: title,
|
|
44
|
-
children: title
|
|
45
|
-
}), /*#__PURE__*/_jsx(DropdownIcon, {
|
|
46
|
-
open: isOpen,
|
|
47
|
-
size: 12
|
|
48
|
-
})]
|
|
49
|
-
});
|
|
50
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AppHeaderProfileDropdownItem } from '../../shared';
|
|
2
|
-
interface AppHeaderMenuNavButtonProps {
|
|
3
|
-
buttonRef: React.RefObject<HTMLButtonElement>;
|
|
4
|
-
handleOnClick: (event: React.MouseEvent) => void;
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
item: AppHeaderProfileDropdownItem;
|
|
7
|
-
}
|
|
8
|
-
export declare const AppHeaderMenuNavButton: React.FC<AppHeaderMenuNavButtonProps>;
|
|
9
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { TextButton } from '@codecademy/gamut';
|
|
2
|
-
import { Avatar } from '../../../Avatar';
|
|
3
|
-
import { useAppHeaderMenuContext } from '../AppHeaderMenuProvider';
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
export const AppHeaderMenuNavButton = ({
|
|
6
|
-
buttonRef,
|
|
7
|
-
handleOnClick,
|
|
8
|
-
isOpen,
|
|
9
|
-
item
|
|
10
|
-
}) => {
|
|
11
|
-
const {
|
|
12
|
-
menuItems,
|
|
13
|
-
resetIndex
|
|
14
|
-
} = useAppHeaderMenuContext();
|
|
15
|
-
const profileOnClick = e => {
|
|
16
|
-
const menuItemsArray = menuItems.values();
|
|
17
|
-
const firstMenuItem = menuItemsArray.next().value;
|
|
18
|
-
handleOnClick(e);
|
|
19
|
-
firstMenuItem?.focus();
|
|
20
|
-
};
|
|
21
|
-
return /*#__PURE__*/_jsx(TextButton, {
|
|
22
|
-
"aria-expanded": isOpen,
|
|
23
|
-
"aria-haspopup": true,
|
|
24
|
-
"data-testid": "avatar-dropdown-button",
|
|
25
|
-
onClick: profileOnClick
|
|
26
|
-
// this resets our programatic menu index to 0 in case someone clicks out of the dropdown
|
|
27
|
-
,
|
|
28
|
-
onFocus: resetIndex,
|
|
29
|
-
ref: buttonRef,
|
|
30
|
-
variant: "interface",
|
|
31
|
-
children: /*#__PURE__*/_jsx(Avatar, {
|
|
32
|
-
alt: "User profile avatar",
|
|
33
|
-
disableDropshadow: true,
|
|
34
|
-
size: 40,
|
|
35
|
-
src: item.avatar
|
|
36
|
-
})
|
|
37
|
-
});
|
|
38
|
-
};
|