@codecademy/brand 5.11.0-alpha.93b754c9d.0 → 5.11.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.
@@ -1,6 +1,6 @@
1
1
  import { ContentContainer, WithChildrenProp } from '@codecademy/gamut';
2
2
  import * as React from 'react';
3
- export interface AppBarProps extends WithChildrenProp, Pick<React.ComponentProps<typeof ContentContainer>, 'aria-label' | 'as'> {
3
+ export interface AppBarProps extends WithChildrenProp, Pick<React.ComponentProps<typeof ContentContainer>, 'aria-label' | 'as' | 'className'> {
4
4
  /**
5
5
  * Whether the container should be larger than the default content size.
6
6
  */
@@ -2,19 +2,17 @@ import { ContentContainer } from '@codecademy/gamut';
2
2
  import * as React from 'react';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  export const AppBar = ({
5
- 'aria-label': ariaLabel,
6
- as,
7
5
  wide,
8
- children
6
+ children,
7
+ ...rest
9
8
  }) => {
10
9
  return /*#__PURE__*/_jsx(ContentContainer, {
11
- "aria-label": ariaLabel,
12
- as: as,
13
10
  display: "flex",
14
11
  alignItems: "center",
15
12
  height: "100%",
16
13
  size: wide ? 'wide' : 'medium',
17
14
  zIndex: 14,
15
+ ...rest,
18
16
  children: children
19
17
  });
20
18
  };
@@ -1,88 +1,65 @@
1
- import { Box, Card, FillButton, FlexBox, StrokeButton, Text, TextButton } from '@codecademy/gamut';
1
+ import { Card, FillButton, FlexBox, StrokeButton, Text, TextButton } from '@codecademy/gamut';
2
2
  import { CalendarIcon, ClockIcon } from '@codecademy/gamut-icons';
3
3
  import { formatInTimeZone } from 'date-fns-tz';
4
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  const formatTime = (timeString, format) => {
6
6
  return formatInTimeZone(new Date(timeString), Intl.DateTimeFormat().resolvedOptions().timeZone, format);
7
7
  };
8
- const formatDaysLeft = timeString => {
9
- const start = new Date(timeString).getTime();
10
- if (Number.isNaN(start)) return '';
11
- const now = Date.now();
12
- const dayInMs = 24 * 60 * 60 * 1000;
13
- const daysLeft = Math.max(0, Math.ceil((start - now) / dayInMs));
14
- if (daysLeft === 0) {
15
- return 'today';
16
- }
17
- return `in ${daysLeft} day${daysLeft === 1 ? '' : 's'}`;
18
- };
19
8
  export const CoachingSessionCard = ({
20
9
  session,
21
10
  ctas
22
11
  }) => /*#__PURE__*/_jsx(Card, {
23
12
  borderRadius: "xl",
24
13
  p: 32,
25
- border: 1,
26
- borderColor: "border-primary",
14
+ height: "auto",
27
15
  children: /*#__PURE__*/_jsxs(FlexBox, {
28
16
  column: true,
29
- justifyContent: "space-between",
30
- height: "100%",
31
- children: [/*#__PURE__*/_jsxs(Box, {
32
- children: [/*#__PURE__*/_jsxs(Text, {
33
- mb: 4,
34
- children: [/*#__PURE__*/_jsx(Text, {
35
- fontWeight: "bold",
36
- children: session.coachOfferingCategoryName
37
- }), ' ', "coaching session with", ' ', /*#__PURE__*/_jsx(Text, {
38
- fontWeight: "bold",
39
- children: session.participantName
40
- }), /*#__PURE__*/_jsxs(Text, {
41
- fontWeight: "bold",
42
- children: [" ", formatDaysLeft(session.startTime)]
17
+ children: [/*#__PURE__*/_jsxs(Text, {
18
+ mb: 12,
19
+ children: [/*#__PURE__*/_jsx(Text, {
20
+ fontWeight: "bold",
21
+ children: session.coachOfferingCategoryName
22
+ }), ' ', "coaching session with", ' ', /*#__PURE__*/_jsx(Text, {
23
+ fontWeight: "bold",
24
+ children: session.participantName
25
+ })]
26
+ }), /*#__PURE__*/_jsxs(FlexBox, {
27
+ alignItems: "center",
28
+ gap: 16,
29
+ mb: 24,
30
+ children: [/*#__PURE__*/_jsxs(FlexBox, {
31
+ alignItems: "center",
32
+ gap: 8,
33
+ children: [/*#__PURE__*/_jsx(CalendarIcon, {
34
+ size: 16
35
+ }), /*#__PURE__*/_jsx(Text, {
36
+ variant: "p-small",
37
+ color: "text-secondary",
38
+ children: new Date(session.startTime).toLocaleDateString(undefined, {
39
+ weekday: 'long',
40
+ month: 'long',
41
+ day: 'numeric',
42
+ year: 'numeric'
43
+ })
43
44
  })]
44
45
  }), /*#__PURE__*/_jsxs(FlexBox, {
45
- column: true,
46
- alignItems: "flex-start",
47
- gap: 4,
48
- mb: 4,
49
- children: [/*#__PURE__*/_jsxs(FlexBox, {
50
- alignItems: "center",
51
- gap: 4,
52
- py: 8,
53
- children: [/*#__PURE__*/_jsx(CalendarIcon, {
54
- size: 16
55
- }), /*#__PURE__*/_jsx(Text, {
56
- variant: "p-small",
57
- color: "text-secondary",
58
- children: new Date(session.startTime).toLocaleDateString(undefined, {
59
- weekday: 'long',
60
- month: 'long',
61
- day: 'numeric',
62
- year: 'numeric'
63
- })
64
- })]
65
- }), /*#__PURE__*/_jsxs(FlexBox, {
66
- alignItems: "center",
67
- gap: 4,
68
- py: 8,
69
- children: [/*#__PURE__*/_jsx(ClockIcon, {
70
- size: 16
71
- }), /*#__PURE__*/_jsx(Text, {
72
- variant: "p-small",
73
- color: "text-secondary",
74
- children: `${formatTime(session.startTime, 'h:mm aa')} - ${formatTime(session.endTime, 'h:mm aa z')}`
75
- })]
76
- }), session.status && /*#__PURE__*/_jsxs(Text, {
46
+ alignItems: "center",
47
+ gap: 8,
48
+ children: [/*#__PURE__*/_jsx(ClockIcon, {
49
+ size: 16
50
+ }), /*#__PURE__*/_jsx(Text, {
77
51
  variant: "p-small",
78
- fontWeight: "bold",
79
- children: ["Status: ", session.status]
52
+ color: "text-secondary",
53
+ children: `${formatTime(session.startTime, 'h:mm aa')} - ${formatTime(session.endTime, 'h:mm aa z')}`
80
54
  })]
55
+ }), session.status && /*#__PURE__*/_jsxs(Text, {
56
+ variant: "p-small",
57
+ fontWeight: "bold",
58
+ children: ["Status: ", session.status]
81
59
  })]
82
60
  }), /*#__PURE__*/_jsx(FlexBox, {
83
61
  alignItems: "center",
84
62
  gap: 8,
85
- flexWrap: "wrap",
86
63
  children: ctas?.map(cta => {
87
64
  const Button = cta.buttonType === 'fill' ? FillButton : cta.buttonType === 'stroke' ? StrokeButton : TextButton;
88
65
  return /*#__PURE__*/_jsx(Button, {
@@ -0,0 +1,19 @@
1
+ export type LoadingPathShape = 'c' | 'inner' | 'outer' | 'underline';
2
+ export declare const LoadingIcon: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
5
+ } & {
6
+ theme?: import("@emotion/react").Theme;
7
+ }, import("react").SVGProps<SVGSVGElement>, {}>;
8
+ export declare const PrimaryPath: import("@emotion/styled").StyledComponent<{
9
+ theme?: import("@emotion/react").Theme;
10
+ as?: React.ElementType;
11
+ } & {
12
+ shape: LoadingPathShape;
13
+ }, import("react").SVGProps<SVGPathElement>, {}>;
14
+ export declare const SecondaryPath: import("@emotion/styled").StyledComponent<{
15
+ theme?: import("@emotion/react").Theme;
16
+ as?: React.ElementType;
17
+ } & {
18
+ shape: LoadingPathShape;
19
+ }, import("react").SVGProps<SVGPathElement>, {}>;
@@ -0,0 +1,120 @@
1
+ import _styled from "@emotion/styled/base";
2
+ import { css, pxRem } from '@codecademy/gamut-styles';
3
+ import { keyframes } from '@emotion/react';
4
+ const DRAW_DURATION = '3s';
5
+ const C_OFFSET = 169;
6
+ const INNER_OFFSET = 287;
7
+ const OUTER_OFFSET = 361;
8
+ const UNDERLINE_OFFSET = 77;
9
+ const drawC = keyframes`
10
+ 50% {
11
+ stroke-dashoffset: 0;
12
+ }
13
+ `;
14
+ const drawCFast = keyframes`
15
+ 10% {
16
+ stroke-dashoffset: ${C_OFFSET};
17
+ }
18
+ 50% {
19
+ stroke-dashoffset: 0;
20
+ }
21
+ 85% {
22
+ stroke-dashoffset: ${C_OFFSET};
23
+ }
24
+ `;
25
+ const drawInner = keyframes`
26
+ 50% {
27
+ stroke-dashoffset: 0;
28
+ }
29
+ `;
30
+ const drawInnerFast = keyframes`
31
+ 10% {
32
+ stroke-dashoffset: ${INNER_OFFSET};
33
+ }
34
+ 50% {
35
+ stroke-dashoffset: 0;
36
+ }
37
+ 85% {
38
+ stroke-dashoffset: ${INNER_OFFSET};
39
+ }
40
+ `;
41
+ const drawOuter = keyframes`
42
+ 50% {
43
+ stroke-dashoffset: 0;
44
+ }
45
+ `;
46
+ const drawOuterFast = keyframes`
47
+ 10% {
48
+ stroke-dashoffset: ${OUTER_OFFSET};
49
+ }
50
+ 50% {
51
+ stroke-dashoffset: 0;
52
+ }
53
+ 85% {
54
+ stroke-dashoffset: ${OUTER_OFFSET};
55
+ }
56
+ `;
57
+ const drawUnderline = keyframes`
58
+ 50% {
59
+ stroke-dashoffset: 0;
60
+ }
61
+ `;
62
+ const drawUnderlineFast = keyframes`
63
+ 10% {
64
+ stroke-dashoffset: ${UNDERLINE_OFFSET};
65
+ }
66
+ 50% {
67
+ stroke-dashoffset: 0;
68
+ }
69
+ 85% {
70
+ stroke-dashoffset: ${UNDERLINE_OFFSET};
71
+ }
72
+ `;
73
+ const pathAnimationConfig = {
74
+ underline: {
75
+ offset: UNDERLINE_OFFSET,
76
+ animation: drawUnderline,
77
+ animationFast: drawUnderlineFast
78
+ },
79
+ c: {
80
+ offset: C_OFFSET,
81
+ animation: drawC,
82
+ animationFast: drawCFast
83
+ },
84
+ inner: {
85
+ offset: INNER_OFFSET,
86
+ animation: drawInner,
87
+ animationFast: drawInnerFast
88
+ },
89
+ outer: {
90
+ offset: OUTER_OFFSET,
91
+ animation: drawOuter,
92
+ animationFast: drawOuterFast
93
+ }
94
+ };
95
+ const getPathStyles = (pathType, fast = false) => {
96
+ const config = pathAnimationConfig[pathType];
97
+ return css({
98
+ strokeDasharray: config.offset,
99
+ strokeDashoffset: config.offset,
100
+ animation: `${fast ? config.animationFast : config.animation} ${DRAW_DURATION} infinite`
101
+ });
102
+ };
103
+ export const LoadingIcon = /*#__PURE__*/_styled('svg', {
104
+ target: "e162ofti2",
105
+ label: "LoadingIcon"
106
+ })(css({
107
+ width: pxRem(120)
108
+ }), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64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c3R5bGVkKCdzdmcnKShcbiAgY3NzKHtcbiAgICB3aWR0aDogcHhSZW0oMTIwKSxcbiAgfSlcbik7XG5cbmV4cG9ydCBjb25zdCBQcmltYXJ5UGF0aCA9IHN0eWxlZCgncGF0aCcpPHsgc2hhcGU6IExvYWRpbmdQYXRoU2hhcGUgfT4oXG4gICh7IHNoYXBlIH0pID0+IGdldFBhdGhTdHlsZXMoc2hhcGUsIGZhbHNlKVxuKTtcblxuZXhwb3J0IGNvbnN0IFNlY29uZGFyeVBhdGggPSBzdHlsZWQoJ3BhdGgnKTx7IHNoYXBlOiBMb2FkaW5nUGF0aFNoYXBlIH0+KFxuICAoeyBzaGFwZSB9KSA9PiBnZXRQYXRoU3R5bGVzKHNoYXBlLCB0cnVlKVxuKTtcbiJdfQ== */");
109
+ export const PrimaryPath = /*#__PURE__*/_styled('path', {
110
+ target: "e162ofti1",
111
+ label: "PrimaryPath"
112
+ })(({
113
+ shape
114
+ }) => getPathStyles(shape, false), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Mb2FkaW5nL2VsZW1lbnRzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE2SDJCIiwiZmlsZSI6Ii4uLy4uL3NyYy9Mb2FkaW5nL2VsZW1lbnRzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcywgcHhSZW0gfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHsga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBEUkFXX0RVUkFUSU9OID0gJzNzJztcblxuY29uc3QgQ19PRkZTRVQgPSAxNjk7XG5jb25zdCBJTk5FUl9PRkZTR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lNFVCxcbiAgICBhbmltYXRpb246IGRyYXdPdXRlcixcbiAgICBhbmltYXRpb25GYXN0OiBkcmF3T3V0ZXJGYXN0LFxuICB9LFxufSBhcyBjb25zdDtcblxuY29uc3QgZ2V0UGF0aFN0eWxlcyA9IChwYXRoVHlwZTogTG9hZGluZ1BhdGhTaGFwZSwgZmFzdCA9IGZhbHNlKSA9PiB7XG4gIGNvbnN0IGNvbmZpZyA9IHBhdGhBbmltYXRpb25Db25maWdbcGF0aFR5cGVdO1xuICByZXR1cm4gY3NzKHtcbiAgICBzdHJva2VEYXNoYXJyYXk6IGNvbmZpZy5vZmZzZXQsXG4gICAgc3Ryb2tlRGFzaG9mZnNldDogY29uZmlnLm9mZnNldCxcbiAgICBhbmltYXRpb246IGAke1xuICAgICAgZmFzdCA/IGNvbmZpZy5hbmltYXRpb25GYXN0IDogY29uZmlnLmFuaW1hdGlvblxuICAgIH0gJHtEUkFXX0RVUkFUSU9OfSBpbmZpbml0ZWAsXG4gIH0pO1xufTtcblxuZXhwb3J0IGNvbnN0IExvYWRpbmdJY29uID0gc3R5bGVkKCdzdmcnKShcbiAgY3NzKHtcbiAgICB3aWR0aDogcHhSZW0oMTIwKSxcbiAgfSlcbik7XG5cbmV4cG9ydCBjb25zdCBQcmltYXJ5UGF0aCA9IHN0eWxlZCgncGF0aCcpPHsgc2hhcGU6IExvYWRpbmdQYXRoU2hhcGUgfT4oXG4gICh7IHNoYXBlIH0pID0+IGdldFBhdGhTdHlsZXMoc2hhcGUsIGZhbHNlKVxuKTtcblxuZXhwb3J0IGNvbnN0IFNlY29uZGFyeVBhdGggPSBzdHlsZWQoJ3BhdGgnKTx7IHNoYXBlOiBMb2FkaW5nUGF0aFNoYXBlIH0+KFxuICAoeyBzaGFwZSB9KSA9PiBnZXRQYXRoU3R5bGVzKHNoYXBlLCB0cnVlKVxuKTtcbiJdfQ== */");
115
+ export const SecondaryPath = /*#__PURE__*/_styled('path', {
116
+ target: "e162ofti0",
117
+ label: "SecondaryPath"
118
+ })(({
119
+ shape
120
+ }) => getPathStyles(shape, true), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Mb2FkaW5nL2VsZW1lbnRzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpSTZCIiwiZmlsZSI6Ii4uLy4uL3NyYy9Mb2FkaW5nL2VsZW1lbnRzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcywgcHhSZW0gfSBmcm9tICdAY29kZWNhZGVteS9nYW11dC1zdHlsZXMnO1xuaW1wb3J0IHsga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBEUkFXX0RVUkFUSU9OID0gJzNzJztcblxuY29uc3QgQ19PRkZTRVQgPSAxNjk7XG5jb25zdCBJTk5FUl9PRkZTRVQgPSAyODc7XG5jb25zdCBPVVRFUl9PRkZTRVQgPSAzNjE7XG5jb25zdCBVTkRFUkxJTkVfT0ZGU0VUID0gNzc7XG5cbmNvbnN0IGRyYXdDID0ga2V5ZnJhbWVzYFxuICA1MCUge1xuICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwO1xuICB9XG5gO1xuXG5jb25zdCBkcmF3Q0Zhc3QgPSBrZXlmcmFtZXNgXG4gIDEwJSB7XG4gICAgc3Ryb2tlLWRhc2hvZmZzZXQ6ICR7Q19PRkZTRVR9O1xuICB9XG4gIDUwJSB7XG4gICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDA7XG4gIH1cbiAgODUlIHtcbiAgICBzdHJva2UtZGFzaG9mZnNldDogJHtDX09GRlNFVH07XG4gIH1cbmA7XG5cbmNvbnN0IGRyYXdJbm5lciA9IGtleWZyYW1lc2BcbiAgNTAlIHtcbiA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gJHtEUkFXX0RVUkFUSU9OfSBpbmZpbml0ZWAsXG4gIH0pO1xufTtcblxuZXhwb3J0IGNvbnN0IExvYWRpbmdJY29uID0gc3R5bGVkKCdzdmcnKShcbiAgY3NzKHtcbiAgICB3aWR0aDogcHhSZW0oMTIwKSxcbiAgfSlcbik7XG5cbmV4cG9ydCBjb25zdCBQcmltYXJ5UGF0aCA9IHN0eWxlZCgncGF0aCcpPHsgc2hhcGU6IExvYWRpbmdQYXRoU2hhcGUgfT4oXG4gICh7IHNoYXBlIH0pID0+IGdldFBhdGhTdHlsZXMoc2hhcGUsIGZhbHNlKVxuKTtcblxuZXhwb3J0IGNvbnN0IFNlY29uZGFyeVBhdGggPSBzdHlsZWQoJ3BhdGgnKTx7IHNoYXBlOiBMb2FkaW5nUGF0aFNoYXBlIH0+KFxuICAoeyBzaGFwZSB9KSA9PiBnZXRQYXRoU3R5bGVzKHNoYXBlLCB0cnVlKVxuKTtcbiJdfQ== */");
@@ -1,22 +1,39 @@
1
- import { useCurrentMode } from '@codecademy/gamut-styles';
2
- import { useTheme } from '@emotion/react';
3
- import cx from 'classnames';
1
+ import { theme, useCurrentMode } from '@codecademy/gamut-styles';
4
2
  import * as React from 'react';
5
-
6
- // eslint-disable-next-line gamut/no-css-standalone
7
- import styles from './styles.module.scss';
3
+ import { LoadingIcon, PrimaryPath, SecondaryPath } from './elements';
8
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ const PATHS = {
6
+ c: {
7
+ d: 'M18.7 57.6c0 4.2.4 7.4 1.2 9.8 2.3 7.1 8.4 11 16.3 11 5.9 0 10.6-2.4 13.7-6.1.2-.4.3-.8-.1-1.2l-5.2-4.5c-.4-.3-.8-.3-1.2.1-2 2.2-4 3.5-7.3 3.5-3.5 0-6.2-1.7-7.4-5.1-.7-2-.8-4.4-.8-7.4 0-3.1.2-5.4.8-7.4 1.1-3.5 3.9-5.2 7.4-5.2 3.3 0 5.3 1.2 7.3 3.5.3.4.7.5 1.2.2l5.2-4.5c.4-.3.3-.8.1-1.2-3.1-3.8-7.8-6.2-13.7-6.2-7.9 0-14 3.9-16.3 11-.8 2.3-1.2 5.5-1.2 9.7',
8
+ secondaryStrokeWidth: 3
9
+ },
10
+ underline: {
11
+ d: 'M120.7 97.2c.5 0 .8-.3.8-.8v-7.5c0-.5-.3-.8-.8-.8h-28c-.5 0-.8.3-.8.8v7.5c0 .5.3.8.8.8h28',
12
+ secondaryStrokeWidth: 3
13
+ },
14
+ outer: {
15
+ d: 'M42.7 1.5H2.1 2c-.3.2-.5.5-.5.8v94c0 .3.1.5.3.7.1.1.3.1.5.1h80.8c.3 0 .5-.1.6-.3.1-.1.2-.3.2-.5v-94c0-.2-.1-.4-.2-.6-.1-.1-.3-.2-.6-.2H42.7',
16
+ secondaryStrokeWidth: 3
17
+ },
18
+ inner: {
19
+ d: 'M42.7 88H11.3h-.1c-.3-.1-.5-.4-.5-.7V11.5c0-.4.2-.6.5-.8h63.1c.3.1.5.4.5.8v75.7c0 .4-.2.6-.5.7H42.7',
20
+ secondaryStrokeWidth: 3
21
+ }
22
+ };
23
+ const getStrokeColors = mode => ({
24
+ primary: mode === 'light' ? theme.colors['gray-300'] : theme.colors['navy-600'],
25
+ secondary: mode === 'light' ? theme.colors['blue-800'] : theme.colors['navy-200']
26
+ });
9
27
  export const Loading = ({
10
28
  className
11
29
  }) => {
12
- const {
13
- colors
14
- } = useTheme();
15
30
  const mode = useCurrentMode();
16
- const color1 = mode === 'light' ? colors['gray-300'] : colors['navy-600'];
17
- const color2 = mode === 'light' ? colors['blue-800'] : colors['navy-200'];
18
- const icon = /*#__PURE__*/_jsxs("svg", {
19
- className: cx(styles.loading, className),
31
+ const {
32
+ primary,
33
+ secondary
34
+ } = getStrokeColors(mode);
35
+ return /*#__PURE__*/_jsxs(LoadingIcon, {
36
+ className: className,
20
37
  "data-testid": "loading",
21
38
  xmlns: "https://www.w3.org/2000/svg",
22
39
  width: "123",
@@ -24,59 +41,19 @@ export const Loading = ({
24
41
  viewBox: "0 0 123 98.7",
25
42
  children: [/*#__PURE__*/_jsx("title", {
26
43
  children: "Loading Icon"
27
- }), /*#__PURE__*/_jsx("path", {
28
- className: cx(styles.path, styles.c),
29
- stroke: color1,
30
- fill: "none",
31
- strokeMiterlimit: "10",
32
- d: "M18.7 57.6c0 4.2.4 7.4 1.2 9.8 2.3 7.1 8.4 11 16.3 11 5.9 0 10.6-2.4 13.7-6.1.2-.4.3-.8-.1-1.2l-5.2-4.5c-.4-.3-.8-.3-1.2.1-2 2.2-4 3.5-7.3 3.5-3.5 0-6.2-1.7-7.4-5.1-.7-2-.8-4.4-.8-7.4 0-3.1.2-5.4.8-7.4 1.1-3.5 3.9-5.2 7.4-5.2 3.3 0 5.3 1.2 7.3 3.5.3.4.7.5 1.2.2l5.2-4.5c.4-.3.3-.8.1-1.2-3.1-3.8-7.8-6.2-13.7-6.2-7.9 0-14 3.9-16.3 11-.8 2.3-1.2 5.5-1.2 9.7"
33
- }), /*#__PURE__*/_jsx("path", {
34
- className: cx(styles.path, styles.underline),
35
- stroke: color1,
36
- fill: "none",
37
- strokeMiterlimit: "10",
38
- d: "M120.7 97.2c.5 0 .8-.3.8-.8v-7.5c0-.5-.3-.8-.8-.8h-28c-.5 0-.8.3-.8.8v7.5c0 .5.3.8.8.8h28"
39
- }), /*#__PURE__*/_jsx("path", {
40
- className: cx(styles.path, styles.outer),
41
- stroke: color1,
42
- fill: "none",
43
- strokeMiterlimit: "10",
44
- d: "M42.7 1.5H2.1 2c-.3.2-.5.5-.5.8v94c0 .3.1.5.3.7.1.1.3.1.5.1h80.8c.3 0 .5-.1.6-.3.1-.1.2-.3.2-.5v-94c0-.2-.1-.4-.2-.6-.1-.1-.3-.2-.6-.2H42.7"
45
- }), /*#__PURE__*/_jsx("path", {
46
- className: cx(styles.path, styles.inner),
47
- stroke: color1,
48
- fill: "none",
49
- strokeMiterlimit: "10",
50
- d: "M42.7 88H11.3h-.1c-.3-.1-.5-.4-.5-.7V11.5c0-.4.2-.6.5-.8h63.1c.3.1.5.4.5.8v75.7c0 .4-.2.6-.5.7H42.7"
51
- }), /*#__PURE__*/_jsx("path", {
52
- className: cx(styles.pathTwo, styles.c),
53
- stroke: color2,
54
- fill: "none",
55
- strokeWidth: "3",
56
- strokeMiterlimit: "10",
57
- d: "M18.7 57.6c0 4.2.4 7.4 1.2 9.8 2.3 7.1 8.4 11 16.3 11 5.9 0 10.6-2.4 13.7-6.1.2-.4.3-.8-.1-1.2l-5.2-4.5c-.4-.3-.8-.3-1.2.1-2 2.2-4 3.5-7.3 3.5-3.5 0-6.2-1.7-7.4-5.1-.7-2-.8-4.4-.8-7.4 0-3.1.2-5.4.8-7.4 1.1-3.5 3.9-5.2 7.4-5.2 3.3 0 5.3 1.2 7.3 3.5.3.4.7.5 1.2.2l5.2-4.5c.4-.3.3-.8.1-1.2-3.1-3.8-7.8-6.2-13.7-6.2-7.9 0-14 3.9-16.3 11-.8 2.3-1.2 5.5-1.2 9.7"
58
- }), /*#__PURE__*/_jsx("path", {
59
- className: cx(styles.pathTwo, styles.underline),
60
- stroke: color2,
61
- fill: "none",
62
- strokeWidth: "3",
63
- strokeMiterlimit: "10",
64
- d: "M120.7 97.2c.5 0 .8-.3.8-.8v-7.5c0-.5-.3-.8-.8-.8h-28c-.5 0-.8.3-.8.8v7.5c0 .5.3.8.8.8h28"
65
- }), /*#__PURE__*/_jsx("path", {
66
- className: cx(styles.pathTwo, styles.outer),
67
- stroke: color2,
68
- fill: "none",
69
- strokeWidth: "3",
70
- strokeMiterlimit: "10",
71
- d: "M42.7 1.5H2.1 2c-.3.2-.5.5-.5.8v94c0 .3.1.5.3.7.1.1.3.1.5.1h80.8c.3 0 .5-.1.6-.3.1-.1.2-.3.2-.5v-94c0-.2-.1-.4-.2-.6-.1-.1-.3-.2-.6-.2H42.7"
72
- }), /*#__PURE__*/_jsx("path", {
73
- className: cx(styles.pathTwo, styles.inner),
74
- stroke: color2,
75
- fill: "none",
76
- strokeWidth: "3",
77
- strokeMiterlimit: "10",
78
- d: "M42.7 88H11.3h-.1c-.3-.1-.5-.4-.5-.7V11.5c0-.4.2-.6.5-.8h63.1c.3.1.5.4.5.8v75.7c0 .4-.2.6-.5.7H42.7"
79
- })]
44
+ }), Object.keys(PATHS).map(shape => /*#__PURE__*/_jsx(PrimaryPath, {
45
+ shape: shape,
46
+ stroke: primary,
47
+ fill: "none",
48
+ strokeMiterlimit: 10,
49
+ d: PATHS[shape].d
50
+ }, `primary-${shape}`)), Object.keys(PATHS).map(shape => /*#__PURE__*/_jsx(SecondaryPath, {
51
+ shape: shape,
52
+ stroke: secondary,
53
+ fill: "none",
54
+ strokeWidth: PATHS[shape].secondaryStrokeWidth,
55
+ strokeMiterlimit: 10,
56
+ d: PATHS[shape].d
57
+ }, `secondary-${shape}`))]
80
58
  });
81
- return icon;
82
59
  };
package/dist/index.d.ts CHANGED
@@ -5,8 +5,6 @@ export * from './AccordionButtonDeprecated';
5
5
  export * from './AbbreviatedCommunityEventCard';
6
6
  export * from './AppBar';
7
7
  export * from './AppBar/AppBarSection';
8
- export * from './AppBarDeprecated';
9
- export * from './AppBarDeprecated/AppBarSectionDeprecated';
10
8
  export * from './AppHeader';
11
9
  export * from './AppHeader/AppHeaderElements/AppHeaderDropdown';
12
10
  export * from './AppHeader/AppHeaderElements/AppHeaderLink';
package/dist/index.js CHANGED
@@ -5,8 +5,6 @@ export * from './AccordionButtonDeprecated';
5
5
  export * from './AbbreviatedCommunityEventCard';
6
6
  export * from './AppBar';
7
7
  export * from './AppBar/AppBarSection';
8
- export * from './AppBarDeprecated';
9
- export * from './AppBarDeprecated/AppBarSectionDeprecated';
10
8
  export * from './AppHeader';
11
9
  export * from './AppHeader/AppHeaderElements/AppHeaderDropdown';
12
10
  export * from './AppHeader/AppHeaderElements/AppHeaderLink';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
- "version": "5.11.0-alpha.93b754c9d.0",
3
+ "version": "5.11.0",
4
4
  "description": "Brand component library for Codecademy",
5
5
  "license": "MIT",
6
6
  "repository": "git@github.com:codecademy-engineering/mono.git",
@@ -1,14 +0,0 @@
1
- import { WithChildrenProp } from '@codecademy/gamut';
2
- import * as React from 'react';
3
- export interface AppBarSectionPropsDeprecated extends WithChildrenProp {
4
- /**
5
- * Position of the the section within the AppBar.
6
- */
7
- position?: 'left' | 'center' | 'right';
8
- className?: string;
9
- }
10
- /**
11
- * @deprecated use `<AppBarSection>` instead
12
- * this component still exists since `<Footer>` in le-shared uses classnames
13
- */
14
- export declare const AppBarSectionDeprecated: React.FC<AppBarSectionPropsDeprecated>;
@@ -1,25 +0,0 @@
1
- import cx from 'classnames';
2
- import * as React from 'react';
3
-
4
- // eslint-disable-next-line gamut/no-css-standalone
5
- import styles from './styles/index.module.scss';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- /**
8
- * @deprecated use `<AppBarSection>` instead
9
- * this component still exists since `<Footer>` in le-shared uses classnames
10
- */
11
- export const AppBarSectionDeprecated = ({
12
- position,
13
- className,
14
- children
15
- }) => {
16
- const classes = cx(styles.section, {
17
- [styles.sectionRight]: position === 'right',
18
- [styles.sectionLeft]: position === 'left',
19
- [styles.sectionCenter]: position === 'center'
20
- }, className);
21
- return /*#__PURE__*/_jsx("div", {
22
- className: classes,
23
- children: children
24
- });
25
- };
@@ -1,14 +0,0 @@
1
- import { WithChildrenProp } from '@codecademy/gamut';
2
- import * as React from 'react';
3
- export interface AppBarPropsDeprecated extends WithChildrenProp {
4
- className?: string;
5
- /**
6
- * Whether the container should be larger than the default content size.
7
- */
8
- wide?: boolean;
9
- }
10
- /**
11
- * @deprecated use `<AppBar>` instead
12
- * this component still exists since `<Footer>` in le-shared uses classnames
13
- */
14
- export declare const AppBarDeprecated: React.FC<AppBarPropsDeprecated>;
@@ -1,26 +0,0 @@
1
- import { ContentContainer } from '@codecademy/gamut';
2
- import cx from 'classnames';
3
- import * as React from 'react';
4
-
5
- // eslint-disable-next-line gamut/no-css-standalone
6
- import styles from './styles/index.module.scss';
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- /**
9
- * @deprecated use `<AppBar>` instead
10
- * this component still exists since `<Footer>` in le-shared uses classnames
11
- */
12
- export const AppBarDeprecated = ({
13
- wide,
14
- children,
15
- className
16
- }) => {
17
- const classes = cx(styles.wrapper, className);
18
- return /*#__PURE__*/_jsx(ContentContainer, {
19
- className: classes,
20
- display: "flex",
21
- alignItems: "center",
22
- height: "100%",
23
- size: wide ? 'wide' : 'medium',
24
- children: children
25
- });
26
- };
@@ -1,37 +0,0 @@
1
- $appbar-gutter: 8px;
2
- $appbar-tab-width: 48px;
3
- $appbar-z: 14;
4
-
5
- .wrapper {
6
- display: flex;
7
- align-items: center;
8
- height: 100%;
9
- z-index: $appbar-z;
10
- }
11
-
12
- .section {
13
- display: flex;
14
- align-items: center;
15
- height: 100%;
16
- z-index: 1;
17
- }
18
-
19
- .sectionRight {
20
- justify-content: flex-end;
21
- white-space: nowrap;
22
- }
23
-
24
- .sectionLeft {
25
- flex: 1;
26
- }
27
-
28
- .sectionRight,
29
- .sectionLeft {
30
- flex: 1;
31
- }
32
-
33
- .sectionCenter {
34
- flex: 2;
35
- justify-content: center;
36
- text-align: center;
37
- }
@@ -1,129 +0,0 @@
1
- $c-offset: 169;
2
- $inner-offset: 287;
3
- $outer-offset: 361;
4
- $underline-offset: 77;
5
- $animation-duration: 3s;
6
-
7
- @keyframes draw-c {
8
- 50% {
9
- stroke-dashoffset: 0;
10
- }
11
- }
12
- @keyframes draw-c-fast {
13
- 10% {
14
- stroke-dashoffset: $c-offset;
15
- }
16
- 50% {
17
- stroke-dashoffset: 0;
18
- }
19
- 85% {
20
- stroke-dashoffset: $c-offset;
21
- }
22
- }
23
-
24
- @keyframes draw-inner {
25
- 50% {
26
- stroke-dashoffset: 0;
27
- }
28
- }
29
- @keyframes draw-inner-fast {
30
- 10% {
31
- stroke-dashoffset: $inner-offset;
32
- }
33
- 50% {
34
- stroke-dashoffset: 0;
35
- }
36
- 85% {
37
- stroke-dashoffset: $inner-offset;
38
- }
39
- }
40
-
41
- @keyframes draw-outer {
42
- 50% {
43
- stroke-dashoffset: 0;
44
- }
45
- }
46
- @keyframes draw-outer-fast {
47
- 10% {
48
- stroke-dashoffset: $outer-offset;
49
- }
50
- 50% {
51
- stroke-dashoffset: 0;
52
- }
53
- 85% {
54
- stroke-dashoffset: $outer-offset;
55
- }
56
- }
57
-
58
- @keyframes draw-underline {
59
- 50% {
60
- stroke-dashoffset: 0;
61
- }
62
- }
63
- @keyframes draw-underline-fast {
64
- 10% {
65
- stroke-dashoffset: $underline-offset;
66
- }
67
- 50% {
68
- stroke-dashoffset: 0;
69
- }
70
- 85% {
71
- stroke-dashoffset: $underline-offset;
72
- }
73
- }
74
-
75
- .fullPage {
76
- width: 100%;
77
- height: calc(100vh - 4rem);
78
- }
79
-
80
- .loading {
81
- width: 120px;
82
- }
83
-
84
- .underline {
85
- stroke-dasharray: $underline-offset;
86
- stroke-dashoffset: $underline-offset;
87
- }
88
- .c {
89
- stroke-dasharray: $c-offset;
90
- stroke-dashoffset: $c-offset;
91
- }
92
- .inner {
93
- stroke-dasharray: $inner-offset;
94
- stroke-dashoffset: $inner-offset;
95
- }
96
- .outer {
97
- stroke-dasharray: $outer-offset;
98
- stroke-dashoffset: $outer-offset;
99
- }
100
-
101
- .path {
102
- &.underline {
103
- animation: draw-underline $animation-duration infinite;
104
- }
105
- &.c {
106
- animation: draw-c $animation-duration infinite;
107
- }
108
- &.outer {
109
- animation: draw-outer $animation-duration infinite;
110
- }
111
- &.inner {
112
- animation: draw-inner $animation-duration infinite;
113
- }
114
- }
115
-
116
- .pathTwo {
117
- &.underline {
118
- animation: draw-underline-fast $animation-duration infinite;
119
- }
120
- &.c {
121
- animation: draw-c-fast $animation-duration infinite;
122
- }
123
- &.outer {
124
- animation: draw-outer-fast $animation-duration infinite;
125
- }
126
- &.inner {
127
- animation: draw-inner-fast $animation-duration infinite;
128
- }
129
- }