@codecademy/gamut-styles 20.1.1-alpha.d5d6ec.0 → 20.1.1-alpha.dabb2f.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/themes/admin.d.ts +3 -16
- package/dist/themes/core.d.ts +1 -14
- package/dist/themes/core.js +2 -25
- package/dist/themes/lxStudio.d.ts +2 -15
- package/dist/themes/percipio.d.ts +3 -29
- package/dist/themes/percipio.js +2 -22
- package/dist/themes/platform.d.ts +3 -16
- package/dist/variables/elevation.d.ts +17 -0
- package/dist/variables/elevation.js +43 -0
- package/dist/variables/index.d.ts +1 -0
- package/dist/variables/index.js +1 -0
- package/package.json +2 -2
package/dist/themes/admin.d.ts
CHANGED
|
@@ -544,20 +544,7 @@ export declare const adminTheme: Record<"breakpoints", {
|
|
|
544
544
|
}>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
|
|
545
545
|
1: string;
|
|
546
546
|
2: string;
|
|
547
|
-
}, "-">>>, Record<"elevation", import("@codecademy/variance").LiteralPaths<{
|
|
548
|
-
rest: {
|
|
549
|
-
shadow: string;
|
|
550
|
-
transform: string;
|
|
551
|
-
};
|
|
552
|
-
hover: {
|
|
553
|
-
shadow: string;
|
|
554
|
-
transform: string;
|
|
555
|
-
};
|
|
556
|
-
hoverMirrored: {
|
|
557
|
-
shadow: string;
|
|
558
|
-
transform: string;
|
|
559
|
-
};
|
|
560
|
-
}, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, {
|
|
547
|
+
}, "-">>>, Record<"elevation", import("@codecademy/variance").LiteralPaths<import("..").ElevationScale, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, {
|
|
561
548
|
colors: import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
562
549
|
primary: {
|
|
563
550
|
_: "blue-500";
|
|
@@ -927,7 +914,7 @@ export declare const adminTheme: Record<"breakpoints", {
|
|
|
927
914
|
}, "-", "_">;
|
|
928
915
|
}>;
|
|
929
916
|
mode: "light" | "dark";
|
|
930
|
-
_getColorValue: (color: import("@codecademy/variance").Path<{
|
|
917
|
+
_getColorValue: (color: "shadow-primary" | "shadow-secondary" | import("@codecademy/variance").Path<{
|
|
931
918
|
readonly beige: "#FFF0E5";
|
|
932
919
|
readonly blue: "#1557FF";
|
|
933
920
|
readonly green: "#008A27";
|
|
@@ -996,7 +983,7 @@ export declare const adminTheme: Record<"breakpoints", {
|
|
|
996
983
|
readonly "white-200": string;
|
|
997
984
|
readonly "white-600": string;
|
|
998
985
|
readonly "white-700": string;
|
|
999
|
-
}, "-"> | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "
|
|
986
|
+
}, "-"> | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "danger-hover" | "interface-hover" | "border-disabled" | "border-secondary" | "border-tertiary") => string;
|
|
1000
987
|
}> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
|
|
1001
988
|
export type AdminThemeShape = typeof adminTheme;
|
|
1002
989
|
export interface AdminTheme extends AdminThemeShape {
|
package/dist/themes/core.d.ts
CHANGED
|
@@ -525,20 +525,7 @@ export declare const coreTheme: Record<"breakpoints", {
|
|
|
525
525
|
}>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
|
|
526
526
|
1: string;
|
|
527
527
|
2: string;
|
|
528
|
-
}, "-">>>, Record<"elevation", import("@codecademy/variance").LiteralPaths<
|
|
529
|
-
rest: {
|
|
530
|
-
shadow: string;
|
|
531
|
-
transform: string;
|
|
532
|
-
};
|
|
533
|
-
hover: {
|
|
534
|
-
shadow: string;
|
|
535
|
-
transform: string;
|
|
536
|
-
};
|
|
537
|
-
hoverMirrored: {
|
|
538
|
-
shadow: string;
|
|
539
|
-
transform: string;
|
|
540
|
-
};
|
|
541
|
-
}, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
|
|
528
|
+
}, "-">>>, Record<"elevation", import("@codecademy/variance").LiteralPaths<import("../variables").ElevationScale, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
|
|
542
529
|
export type CoreThemeShape = typeof coreTheme;
|
|
543
530
|
export interface CoreTheme extends CoreThemeShape {
|
|
544
531
|
}
|
package/dist/themes/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createTheme } from '@codecademy/variance';
|
|
2
|
-
import { borderRadii, containerQueries, corePalette, elements, fontFamily, fontSize, fontWeight, lineHeight, mediaQueries, spacing } from '../variables';
|
|
2
|
+
import { borderRadii, containerQueries, coreElevation, corePalette, elements, fontFamily, fontSize, fontWeight, lineHeight, mediaQueries, spacing } from '../variables';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @description This is the core theme that all other Codecademy themes are extended from
|
|
@@ -129,27 +129,4 @@ export const coreTheme = createTheme({
|
|
|
129
129
|
}) => ({
|
|
130
130
|
1: `1px solid ${colors['border-primary']}`,
|
|
131
131
|
2: `2px solid ${colors['border-primary']}`
|
|
132
|
-
})).addScale('elevation', (
|
|
133
|
-
colors
|
|
134
|
-
}) => {
|
|
135
|
-
const shadowPrimary = colors['shadow-primary'];
|
|
136
|
-
const offset = 8;
|
|
137
|
-
const lift = 4;
|
|
138
|
-
const shadow = x => `${x}px ${offset}px 0 0 ${shadowPrimary}`;
|
|
139
|
-
return {
|
|
140
|
-
rest: {
|
|
141
|
-
shadow: `0 0 0 0 ${shadowPrimary}`,
|
|
142
|
-
transform: 'none'
|
|
143
|
-
},
|
|
144
|
-
hover: {
|
|
145
|
-
shadow: shadow(-offset),
|
|
146
|
-
transform: `translate(${lift}px, -${lift}px)`
|
|
147
|
-
},
|
|
148
|
-
// camelCase: variance's `LiteralPaths` splits token paths on `-`, so a
|
|
149
|
-
// hyphenated key would resolve to `never` and drop out of the theme type.
|
|
150
|
-
hoverMirrored: {
|
|
151
|
-
shadow: shadow(offset),
|
|
152
|
-
transform: `translate(-${lift}px, -${lift}px)`
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
}).createScaleVariables('elements').addName('core').build();
|
|
132
|
+
})).addScale('elevation', coreElevation).createScaleVariables('elements').addName('core').build();
|
|
@@ -544,20 +544,7 @@ export declare const lxStudioTheme: Record<"breakpoints", {
|
|
|
544
544
|
1: string;
|
|
545
545
|
2: string;
|
|
546
546
|
}, "-">;
|
|
547
|
-
elevation: import("@codecademy/variance").LiteralPaths<
|
|
548
|
-
rest: {
|
|
549
|
-
shadow: string;
|
|
550
|
-
transform: string;
|
|
551
|
-
};
|
|
552
|
-
hover: {
|
|
553
|
-
shadow: string;
|
|
554
|
-
transform: string;
|
|
555
|
-
};
|
|
556
|
-
hoverMirrored: {
|
|
557
|
-
shadow: string;
|
|
558
|
-
transform: string;
|
|
559
|
-
};
|
|
560
|
-
}, "-">;
|
|
547
|
+
elevation: import("@codecademy/variance").LiteralPaths<import("../variables").ElevationScale, "-">;
|
|
561
548
|
name: string;
|
|
562
549
|
} & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
563
550
|
lxStudioSuccess: "#06844F";
|
|
@@ -1100,7 +1087,7 @@ export declare const lxStudioTheme: Record<"breakpoints", {
|
|
|
1100
1087
|
}, "-", "_">;
|
|
1101
1088
|
}>;
|
|
1102
1089
|
mode: "light";
|
|
1103
|
-
_getColorValue: (color: "beige" | "blue" | "navy" | "green" | "yellow" | "pink" | "red" | "orange" | "hyper" | "white" | "beige-100" | "blue-0" | "blue-100" | "blue-300" | "blue-400" | "blue-500" | "blue-800" | "navy-100" | "navy-300" | "navy-400" | "navy-500" | "navy-800" | "navy-200" | "navy-600" | "navy-700" | "navy-900" | "green-0" | "green-100" | "green-400" | "green-700" | "green-900" | "yellow-0" | "yellow-400" | "yellow-500" | "yellow-900" | "pink-0" | "pink-400" | "red-0" | "red-300" | "red-400" | "red-500" | "red-600" | "red-900" | "orange-100" | "orange-500" | "hyper-400" | "hyper-500" | "gray-100" | "gray-300" | "gray-800" | "gray-200" | "gray-600" | "gray-900" | "white-100" | "white-300" | "white-400" | "white-500" | "white-200" | "white-600" | "white-700" | "lightBlue" | "lightGreen" | "paleBlue" | "paleGreen" | "palePink" | "paleYellow" | "paleRed" | "black" | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "
|
|
1090
|
+
_getColorValue: (color: "beige" | "blue" | "navy" | "green" | "yellow" | "pink" | "red" | "orange" | "hyper" | "white" | "beige-100" | "blue-0" | "blue-100" | "blue-300" | "blue-400" | "blue-500" | "blue-800" | "navy-100" | "navy-300" | "navy-400" | "navy-500" | "navy-800" | "navy-200" | "navy-600" | "navy-700" | "navy-900" | "green-0" | "green-100" | "green-400" | "green-700" | "green-900" | "yellow-0" | "yellow-400" | "yellow-500" | "yellow-900" | "pink-0" | "pink-400" | "red-0" | "red-300" | "red-400" | "red-500" | "red-600" | "red-900" | "orange-100" | "orange-500" | "hyper-400" | "hyper-500" | "gray-100" | "gray-300" | "gray-800" | "gray-200" | "gray-600" | "gray-900" | "white-100" | "white-300" | "white-400" | "white-500" | "white-200" | "white-600" | "white-700" | "shadow-primary" | "shadow-secondary" | "lightBlue" | "lightGreen" | "paleBlue" | "paleGreen" | "palePink" | "paleYellow" | "paleRed" | "black" | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "danger-hover" | "interface-hover" | "border-disabled" | "border-secondary" | "border-tertiary" | "lxStudioSuccess" | "lxStudioBgPrimary" | "sapphire") => string;
|
|
1104
1091
|
}> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
|
|
1105
1092
|
export type LxStudioThemeShape = typeof lxStudioTheme;
|
|
1106
1093
|
export type LxStudioTheme = LxStudioThemeShape;
|
|
@@ -536,20 +536,7 @@ export declare const percipioTheme: Record<"breakpoints", {
|
|
|
536
536
|
1: string;
|
|
537
537
|
2: string;
|
|
538
538
|
}, "-">;
|
|
539
|
-
elevation: import("@codecademy/variance").LiteralPaths<
|
|
540
|
-
rest: {
|
|
541
|
-
shadow: string;
|
|
542
|
-
transform: string;
|
|
543
|
-
};
|
|
544
|
-
hover: {
|
|
545
|
-
shadow: string;
|
|
546
|
-
transform: string;
|
|
547
|
-
};
|
|
548
|
-
hoverMirrored: {
|
|
549
|
-
shadow: string;
|
|
550
|
-
transform: string;
|
|
551
|
-
};
|
|
552
|
-
}, "-">;
|
|
539
|
+
elevation: import("@codecademy/variance").LiteralPaths<import("../variables").ElevationScale, "-">;
|
|
553
540
|
name: string;
|
|
554
541
|
} & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
555
542
|
percipioTextPrimary: "#222325";
|
|
@@ -1162,21 +1149,8 @@ export declare const percipioTheme: Record<"breakpoints", {
|
|
|
1162
1149
|
}, "-", "_">;
|
|
1163
1150
|
}>;
|
|
1164
1151
|
mode: "light";
|
|
1165
|
-
_getColorValue: (color: "beige" | "blue" | "navy" | "green" | "yellow" | "pink" | "red" | "orange" | "hyper" | "white" | "beige-100" | "blue-0" | "blue-100" | "blue-300" | "blue-400" | "blue-500" | "blue-800" | "navy-100" | "navy-300" | "navy-400" | "navy-500" | "navy-800" | "navy-200" | "navy-600" | "navy-700" | "navy-900" | "green-0" | "green-100" | "green-400" | "green-700" | "green-900" | "yellow-0" | "yellow-400" | "yellow-500" | "yellow-900" | "pink-0" | "pink-400" | "red-0" | "red-300" | "red-400" | "red-500" | "red-600" | "red-900" | "orange-100" | "orange-500" | "hyper-400" | "hyper-500" | "gray-100" | "gray-300" | "gray-800" | "gray-200" | "gray-600" | "gray-900" | "white-100" | "white-300" | "white-400" | "white-500" | "white-200" | "white-600" | "white-700" | "lightBlue" | "lightGreen" | "paleBlue" | "paleGreen" | "palePink" | "paleYellow" | "paleRed" | "black" | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "
|
|
1166
|
-
}>, Record<"elevation", import("@codecademy/variance").LiteralPaths<
|
|
1167
|
-
rest: {
|
|
1168
|
-
shadow: string;
|
|
1169
|
-
transform: string;
|
|
1170
|
-
};
|
|
1171
|
-
hover: {
|
|
1172
|
-
shadow: string;
|
|
1173
|
-
transform: string;
|
|
1174
|
-
};
|
|
1175
|
-
hoverMirrored: {
|
|
1176
|
-
shadow: string;
|
|
1177
|
-
transform: string;
|
|
1178
|
-
};
|
|
1179
|
-
}, "-">>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
|
|
1152
|
+
_getColorValue: (color: "beige" | "blue" | "navy" | "green" | "yellow" | "pink" | "red" | "orange" | "hyper" | "white" | "beige-100" | "blue-0" | "blue-100" | "blue-300" | "blue-400" | "blue-500" | "blue-800" | "navy-100" | "navy-300" | "navy-400" | "navy-500" | "navy-800" | "navy-200" | "navy-600" | "navy-700" | "navy-900" | "green-0" | "green-100" | "green-400" | "green-700" | "green-900" | "yellow-0" | "yellow-400" | "yellow-500" | "yellow-900" | "pink-0" | "pink-400" | "red-0" | "red-300" | "red-400" | "red-500" | "red-600" | "red-900" | "orange-100" | "orange-500" | "hyper-400" | "hyper-500" | "gray-100" | "gray-300" | "gray-800" | "gray-200" | "gray-600" | "gray-900" | "white-100" | "white-300" | "white-400" | "white-500" | "white-200" | "white-600" | "white-700" | "shadow-primary" | "shadow-secondary" | "lightBlue" | "lightGreen" | "paleBlue" | "paleGreen" | "palePink" | "paleYellow" | "paleRed" | "black" | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "danger-hover" | "interface-hover" | "border-disabled" | "border-secondary" | "border-tertiary" | "sapphire" | "percipioTextPrimary" | "percipioTextSecondary" | "percipioTextDisabled" | "percipioTextAccent" | "percipioBgPrimary" | "percipioBgSuccess" | "percipioBgWarning" | "percipioBgError" | "percipioActionPrimaryHover" | "percipioActionSecondary" | "percipioActionSecondaryHover" | "percipioActionDangerHover" | "percipioFeedbackSuccess" | "percipioFeedbackWarning" | "percipioDanger") => string;
|
|
1153
|
+
}>, Record<"elevation", import("@codecademy/variance").LiteralPaths<import("../variables").ElevationScale, "-">>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
|
|
1180
1154
|
export type PercipioThemeShape = typeof percipioTheme;
|
|
1181
1155
|
export interface PercipioTheme extends PercipioThemeShape {
|
|
1182
1156
|
}
|
package/dist/themes/percipio.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createTheme } from '@codecademy/variance';
|
|
2
|
-
import { fontWeightMediumTitle, percipioFontFamily, percipioPalette } from '../variables';
|
|
2
|
+
import { fontWeightMediumTitle, percipioElevation, percipioFontFamily, percipioPalette } from '../variables';
|
|
3
3
|
import { coreTheme } from './core';
|
|
4
4
|
export const percipioTheme = createTheme({
|
|
5
5
|
...coreTheme,
|
|
@@ -53,24 +53,4 @@ export const percipioTheme = createTheme({
|
|
|
53
53
|
disabled: 'navy-300'
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
}).addScale('elevation', (
|
|
57
|
-
colors
|
|
58
|
-
}) => {
|
|
59
|
-
const shadowPrimary = colors['shadow-primary'];
|
|
60
|
-
const shadowSecondary = colors['shadow-secondary'];
|
|
61
|
-
const hover = `0 1px 4px 0 ${shadowPrimary}, 0 2px 11px 0 ${shadowSecondary}`;
|
|
62
|
-
return {
|
|
63
|
-
rest: {
|
|
64
|
-
shadow: `0 1px 4px 0 ${shadowPrimary}, 0 2px 7px 0 ${shadowPrimary}`,
|
|
65
|
-
transform: 'none'
|
|
66
|
-
},
|
|
67
|
-
hover: {
|
|
68
|
-
shadow: hover,
|
|
69
|
-
transform: 'none'
|
|
70
|
-
},
|
|
71
|
-
hoverMirrored: {
|
|
72
|
-
shadow: hover,
|
|
73
|
-
transform: 'none'
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}).addName('percipio').build();
|
|
56
|
+
}).addScale('elevation', percipioElevation).addName('percipio').build();
|
|
@@ -560,20 +560,7 @@ export declare const platformTheme: Record<"breakpoints", {
|
|
|
560
560
|
}>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
|
|
561
561
|
1: string;
|
|
562
562
|
2: string;
|
|
563
|
-
}, "-">>>, Record<"elevation", import("@codecademy/variance").LiteralPaths<{
|
|
564
|
-
rest: {
|
|
565
|
-
shadow: string;
|
|
566
|
-
transform: string;
|
|
567
|
-
};
|
|
568
|
-
hover: {
|
|
569
|
-
shadow: string;
|
|
570
|
-
transform: string;
|
|
571
|
-
};
|
|
572
|
-
hoverMirrored: {
|
|
573
|
-
shadow: string;
|
|
574
|
-
transform: string;
|
|
575
|
-
};
|
|
576
|
-
}, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
563
|
+
}, "-">>>, Record<"elevation", import("@codecademy/variance").LiteralPaths<import("../variables").ElevationScale, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
577
564
|
readonly lightBeige: "#FFFBF8";
|
|
578
565
|
readonly gold: "#8A7300";
|
|
579
566
|
readonly teal: "#006D82";
|
|
@@ -1097,7 +1084,7 @@ export declare const platformTheme: Record<"breakpoints", {
|
|
|
1097
1084
|
}, "-", "_">;
|
|
1098
1085
|
}>;
|
|
1099
1086
|
mode: "light" | "dark";
|
|
1100
|
-
_getColorValue: (color: import("@codecademy/variance").Path<{
|
|
1087
|
+
_getColorValue: (color: "shadow-primary" | "shadow-secondary" | import("@codecademy/variance").Path<{
|
|
1101
1088
|
readonly beige: "#FFF0E5";
|
|
1102
1089
|
readonly blue: "#1557FF";
|
|
1103
1090
|
readonly green: "#008A27";
|
|
@@ -1166,7 +1153,7 @@ export declare const platformTheme: Record<"breakpoints", {
|
|
|
1166
1153
|
readonly "white-200": string;
|
|
1167
1154
|
readonly "white-600": string;
|
|
1168
1155
|
readonly "white-700": string;
|
|
1169
|
-
}, "-"> | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "
|
|
1156
|
+
}, "-"> | "text" | "secondary" | "background" | "primary" | "danger" | "interface" | "border-primary" | "text-accent" | "text-disabled" | "text-secondary" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-error" | "background-success" | "background-warning" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "danger-hover" | "interface-hover" | "border-disabled" | "border-secondary" | "border-tertiary" | import("@codecademy/variance").Path<{
|
|
1170
1157
|
readonly lightBeige: "#FFFBF8";
|
|
1171
1158
|
readonly gold: "#8A7300";
|
|
1172
1159
|
readonly teal: "#006D82";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type ThemeColors = Record<string, string>;
|
|
2
|
+
export type ElevationStateStyles = {
|
|
3
|
+
shadow: string;
|
|
4
|
+
transform: string;
|
|
5
|
+
};
|
|
6
|
+
export type ElevationScale = {
|
|
7
|
+
rest: ElevationStateStyles;
|
|
8
|
+
hover: ElevationStateStyles;
|
|
9
|
+
hoverMirrored: ElevationStateStyles;
|
|
10
|
+
};
|
|
11
|
+
export type ElevationState = keyof ElevationScale;
|
|
12
|
+
export type ElevationScaleFactory = (theme: {
|
|
13
|
+
colors: ThemeColors;
|
|
14
|
+
}) => ElevationScale;
|
|
15
|
+
export declare const coreElevation: ElevationScaleFactory;
|
|
16
|
+
export declare const percipioElevation: ElevationScaleFactory;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export const coreElevation = ({
|
|
2
|
+
colors
|
|
3
|
+
}) => {
|
|
4
|
+
const shadowPrimary = colors['shadow-primary'];
|
|
5
|
+
const offset = 8;
|
|
6
|
+
const lift = 4;
|
|
7
|
+
const shadow = x => `${x}px ${offset}px 0 0 ${shadowPrimary}`;
|
|
8
|
+
return {
|
|
9
|
+
rest: {
|
|
10
|
+
shadow: `0 0 0 0 ${shadowPrimary}`,
|
|
11
|
+
transform: 'none'
|
|
12
|
+
},
|
|
13
|
+
hover: {
|
|
14
|
+
shadow: shadow(-offset),
|
|
15
|
+
transform: `translate(${lift}px, -${lift}px)`
|
|
16
|
+
},
|
|
17
|
+
hoverMirrored: {
|
|
18
|
+
shadow: shadow(offset),
|
|
19
|
+
transform: `translate(-${lift}px, -${lift}px)`
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export const percipioElevation = ({
|
|
24
|
+
colors
|
|
25
|
+
}) => {
|
|
26
|
+
const shadowPrimary = colors['shadow-primary'];
|
|
27
|
+
const shadowSecondary = colors['shadow-secondary'];
|
|
28
|
+
const hover = `0 1px 4px 0 ${shadowPrimary}, 0 2px 11px 0 ${shadowSecondary}`;
|
|
29
|
+
return {
|
|
30
|
+
rest: {
|
|
31
|
+
shadow: `0 1px 4px 0 ${shadowPrimary}, 0 2px 7px 0 ${shadowPrimary}`,
|
|
32
|
+
transform: 'none'
|
|
33
|
+
},
|
|
34
|
+
hover: {
|
|
35
|
+
shadow: hover,
|
|
36
|
+
transform: 'none'
|
|
37
|
+
},
|
|
38
|
+
hoverMirrored: {
|
|
39
|
+
shadow: hover,
|
|
40
|
+
transform: 'none'
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
};
|
package/dist/variables/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut-styles",
|
|
3
3
|
"description": "Styleguide & Component library for codecademy.com",
|
|
4
|
-
"version": "20.1.1-alpha.
|
|
4
|
+
"version": "20.1.1-alpha.dabb2f.0",
|
|
5
5
|
"author": "Jake Hiller <jake@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codecademy/variance": "0.26.2-alpha.
|
|
7
|
+
"@codecademy/variance": "0.26.2-alpha.dabb2f.0",
|
|
8
8
|
"@emotion/is-prop-valid": "^1.1.0",
|
|
9
9
|
"framer-motion": "^11.18.0",
|
|
10
10
|
"get-nonce": "^1.0.0",
|