@codecademy/gamut-styles 20.1.1-alpha.39981f.0 → 20.1.1-alpha.68eed7.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.
@@ -40,7 +40,7 @@ export declare const adminTheme: Record<"breakpoints", {
40
40
  readonly md: "5rem";
41
41
  };
42
42
  readonly headerZ: 15;
43
- }, "elements">>> & import("@codecademy/variance/dist/createTheme/types").Merge<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<Record<"breakpoints", {
43
+ }, "elements">>> & import("@codecademy/variance/dist/createTheme/types").Merge<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<Record<"breakpoints", {
44
44
  c_base: string;
45
45
  c_xs: string;
46
46
  c_sm: string;
@@ -544,7 +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<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, {
547
+ }, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, {
548
548
  colors: import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
549
549
  primary: {
550
550
  _: "blue-500";
@@ -914,7 +914,7 @@ export declare const adminTheme: Record<"breakpoints", {
914
914
  }, "-", "_">;
915
915
  }>;
916
916
  mode: "light" | "dark";
917
- _getColorValue: (color: "shadow-primary" | "shadow-secondary" | import("@codecademy/variance").Path<{
917
+ _getColorValue: (color: import("@codecademy/variance").Path<{
918
918
  readonly beige: "#FFF0E5";
919
919
  readonly blue: "#1557FF";
920
920
  readonly green: "#008A27";
@@ -983,7 +983,7 @@ export declare const adminTheme: Record<"breakpoints", {
983
983
  readonly "white-200": string;
984
984
  readonly "white-600": string;
985
985
  readonly "white-700": string;
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;
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" | "shadow-secondary" | "shadow-primary" | "danger-hover" | "interface-hover" | "border-disabled" | "border-secondary" | "border-tertiary") => string;
987
987
  }> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
988
988
  export type AdminThemeShape = typeof adminTheme;
989
989
  export interface AdminTheme extends AdminThemeShape {
@@ -21,7 +21,7 @@ export declare const coreTheme: Record<"breakpoints", {
21
21
  readonly md: "5rem";
22
22
  };
23
23
  readonly headerZ: 15;
24
- }, "elements">>> & import("@codecademy/variance/dist/createTheme/types").Merge<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<Record<"breakpoints", {
24
+ }, "elements">>> & import("@codecademy/variance/dist/createTheme/types").Merge<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<Record<"breakpoints", {
25
25
  c_base: string;
26
26
  c_xs: string;
27
27
  c_sm: string;
@@ -525,7 +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<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;
528
+ }, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
529
529
  export type CoreThemeShape = typeof coreTheme;
530
530
  export interface CoreTheme extends CoreThemeShape {
531
531
  }
@@ -1,5 +1,5 @@
1
1
  import { createTheme } from '@codecademy/variance';
2
- import { borderRadii, containerQueries, coreElevation, corePalette, elements, fontFamily, fontSize, fontWeight, lineHeight, mediaQueries, spacing } from '../variables';
2
+ import { borderRadii, containerQueries, 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,4 +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', coreElevation).createScaleVariables('elements').addName('core').build();
132
+ })).createScaleVariables('elements').addName('core').build();
@@ -544,7 +544,6 @@ export declare const lxStudioTheme: Record<"breakpoints", {
544
544
  1: string;
545
545
  2: string;
546
546
  }, "-">;
547
- elevation: import("@codecademy/variance").LiteralPaths<import("../variables").ElevationScale, "-">;
548
547
  name: string;
549
548
  } & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
550
549
  lxStudioSuccess: "#06844F";
@@ -1087,7 +1086,7 @@ export declare const lxStudioTheme: Record<"breakpoints", {
1087
1086
  }, "-", "_">;
1088
1087
  }>;
1089
1088
  mode: "light";
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;
1089
+ _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" | "shadow-secondary" | "shadow-primary" | "danger-hover" | "interface-hover" | "border-disabled" | "border-secondary" | "border-tertiary" | "lxStudioSuccess" | "lxStudioBgPrimary" | "sapphire") => string;
1091
1090
  }> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
1092
1091
  export type LxStudioThemeShape = typeof lxStudioTheme;
1093
1092
  export type LxStudioTheme = LxStudioThemeShape;
@@ -22,7 +22,7 @@ export declare const percipioTheme: Record<"breakpoints", {
22
22
  md: string;
23
23
  lg: string;
24
24
  xl: string;
25
- }> & import("@codecademy/variance/dist/createTheme/types").Merge<import("@codecademy/variance/dist/createTheme/types").MergeTheme<Record<"breakpoints", {
25
+ }> & import("@codecademy/variance/dist/createTheme/types").Merge<Record<"breakpoints", {
26
26
  c_base: string;
27
27
  c_xs: string;
28
28
  c_sm: string;
@@ -536,7 +536,6 @@ export declare const percipioTheme: Record<"breakpoints", {
536
536
  1: string;
537
537
  2: string;
538
538
  }, "-">;
539
- elevation: import("@codecademy/variance").LiteralPaths<import("../variables").ElevationScale, "-">;
540
539
  name: string;
541
540
  } & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
542
541
  percipioTextPrimary: "#222325";
@@ -1149,8 +1148,8 @@ export declare const percipioTheme: Record<"breakpoints", {
1149
1148
  }, "-", "_">;
1150
1149
  }>;
1151
1150
  mode: "light";
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;
1151
+ _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" | "shadow-secondary" | "shadow-primary" | "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;
1152
+ }> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"name", string>> & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys;
1154
1153
  export type PercipioThemeShape = typeof percipioTheme;
1155
1154
  export interface PercipioTheme extends PercipioThemeShape {
1156
1155
  }
@@ -1,5 +1,5 @@
1
1
  import { createTheme } from '@codecademy/variance';
2
- import { fontWeightMediumTitle, percipioElevation, percipioFontFamily, percipioPalette } from '../variables';
2
+ import { fontWeightMediumTitle, percipioFontFamily, percipioPalette } from '../variables';
3
3
  import { coreTheme } from './core';
4
4
  export const percipioTheme = createTheme({
5
5
  ...coreTheme,
@@ -53,4 +53,4 @@ export const percipioTheme = createTheme({
53
53
  disabled: 'navy-300'
54
54
  }
55
55
  }
56
- }).addScale('elevation', percipioElevation).addName('percipio').build();
56
+ }).addName('percipio').build();
@@ -56,7 +56,7 @@ export declare const platformTheme: Record<"breakpoints", {
56
56
  readonly md: "5rem";
57
57
  };
58
58
  readonly headerZ: 15;
59
- }, "elements">>> & import("@codecademy/variance/dist/createTheme/types").Merge<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<Record<"breakpoints", {
59
+ }, "elements">>> & import("@codecademy/variance/dist/createTheme/types").Merge<import("@codecademy/variance/dist/createTheme/types").MergeTheme<import("@codecademy/variance/dist/createTheme/types").MergeTheme<Record<"breakpoints", {
60
60
  c_base: string;
61
61
  c_xs: string;
62
62
  c_sm: string;
@@ -560,7 +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<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<{
563
+ }, "-">>>, 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<{
564
564
  readonly lightBeige: "#FFFBF8";
565
565
  readonly gold: "#8A7300";
566
566
  readonly teal: "#006D82";
@@ -1084,7 +1084,7 @@ export declare const platformTheme: Record<"breakpoints", {
1084
1084
  }, "-", "_">;
1085
1085
  }>;
1086
1086
  mode: "light" | "dark";
1087
- _getColorValue: (color: "shadow-primary" | "shadow-secondary" | import("@codecademy/variance").Path<{
1087
+ _getColorValue: (color: import("@codecademy/variance").Path<{
1088
1088
  readonly beige: "#FFF0E5";
1089
1089
  readonly blue: "#1557FF";
1090
1090
  readonly green: "#008A27";
@@ -1153,7 +1153,7 @@ export declare const platformTheme: Record<"breakpoints", {
1153
1153
  readonly "white-200": string;
1154
1154
  readonly "white-600": string;
1155
1155
  readonly "white-700": string;
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<{
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" | "shadow-secondary" | "shadow-primary" | "danger-hover" | "interface-hover" | "border-disabled" | "border-secondary" | "border-tertiary" | import("@codecademy/variance").Path<{
1157
1157
  readonly lightBeige: "#FFFBF8";
1158
1158
  readonly gold: "#8A7300";
1159
1159
  readonly teal: "#006D82";
@@ -1,7 +1,6 @@
1
1
  export * from './borderRadii';
2
2
  export * from './colors';
3
3
  export * from './elements';
4
- export * from './elevation';
5
4
  export * from './responsive';
6
5
  export * from './spacing';
7
6
  export * from './timing';
@@ -1,7 +1,6 @@
1
1
  export * from './borderRadii';
2
2
  export * from './colors';
3
3
  export * from './elements';
4
- export * from './elevation';
5
4
  export * from './responsive';
6
5
  export * from './spacing';
7
6
  export * from './timing';
@@ -1,9 +1,10 @@
1
1
  import { ThemeProps } from '@codecademy/variance';
2
+ import type React from 'react';
2
3
  import { all as allProps } from './config';
3
4
  declare const allPropnames: ["mode", "variant", ...[keyof typeof allProps]];
4
5
  export type SystemPropNames = (typeof allPropnames)[number];
5
- export type ElementOrProps = keyof JSX.IntrinsicElements | ThemeProps;
6
- export type ForwardableProps<El extends ElementOrProps, Additional> = Exclude<El extends keyof JSX.IntrinsicElements ? keyof JSX.IntrinsicElements[El] : keyof Element, Additional | SystemPropNames>;
6
+ export type ElementOrProps = keyof React.JSX.IntrinsicElements | ThemeProps;
7
+ export type ForwardableProps<El extends ElementOrProps, Additional> = Exclude<El extends keyof React.JSX.IntrinsicElements ? keyof React.JSX.IntrinsicElements[El] : keyof Element, Additional | SystemPropNames>;
7
8
  export declare function createStyledOptions<El extends ElementOrProps = 'div', Additional extends string = never>(additional?: readonly Additional[]): {
8
9
  shouldForwardProp: (prop: PropertyKey) => prop is ForwardableProps<El, Additional>;
9
10
  };
@@ -24,6 +25,6 @@ export declare function createStyledOptions<El extends ElementOrProps = 'div', A
24
25
  *
25
26
  */
26
27
  export declare const styledOptions: typeof createStyledOptions & {
27
- shouldForwardProp: (prop: PropertyKey) => prop is "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | keyof import("react").ClassAttributes<HTMLDivElement>;
28
+ shouldForwardProp: (prop: PropertyKey) => prop is "style" | "property" | "rel" | "slot" | "title" | "rev" | "id" | "nonce" | "content" | "translate" | "children" | "className" | "part" | "prefix" | "role" | "suppressHydrationWarning" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "resource" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | keyof React.ClassAttributes<HTMLDivElement>;
28
29
  };
29
30
  export {};
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@codecademy/gamut-styles",
3
3
  "description": "Styleguide & Component library for codecademy.com",
4
- "version": "20.1.1-alpha.39981f.0",
4
+ "version": "20.1.1-alpha.68eed7.0",
5
5
  "author": "Jake Hiller <jake@codecademy.com>",
6
6
  "dependencies": {
7
- "@codecademy/variance": "0.26.2-alpha.39981f.0",
7
+ "@codecademy/variance": "0.26.2-alpha.68eed7.0",
8
8
  "@emotion/is-prop-valid": "^1.1.0",
9
- "framer-motion": "^11.18.0",
9
+ "framer-motion": "^12.0.0",
10
10
  "get-nonce": "^1.0.0",
11
11
  "polished": "^4.1.2"
12
12
  },
@@ -26,7 +26,7 @@
26
26
  "@emotion/react": "^11.4.0",
27
27
  "@emotion/styled": "^11.3.0",
28
28
  "lodash": "^4.17.23",
29
- "react": "^17.0.2 || ^18.3.0",
29
+ "react": "^17.0.2 || ^18.3.0 || ^19.0.0",
30
30
  "stylis": "^4.0.7"
31
31
  },
32
32
  "publishConfig": {
@@ -1,2 +0,0 @@
1
- import { setupRtl as setupRtlBase } from 'component-test-setup';
2
- export declare const setupRtl: typeof setupRtlBase;
@@ -1,39 +0,0 @@
1
- type ThemeColors = Record<string, string>;
2
- /**
3
- * The visual treatment of a surface at a single elevation state.
4
- * These are type aliases rather than interfaces so they keep the implicit
5
- * index signatures `addScale`'s constraint requires.
6
- */
7
- export type ElevationStateStyles = {
8
- shadow: string;
9
- transform: string;
10
- };
11
- /**
12
- * State keys are camelCase: variance's `LiteralPaths` splits token paths on
13
- * `-`, so a hyphenated key like `hover-mirrored` would resolve to `never` and
14
- * drop out of the theme type. `hoverMirrored` is for surfaces that cast their
15
- * shadow to the opposite side (e.g. Card's `patternRight` shadow).
16
- */
17
- export type ElevationScale = {
18
- rest: ElevationStateStyles;
19
- hover: ElevationStateStyles;
20
- hoverMirrored: ElevationStateStyles;
21
- };
22
- export type ElevationState = keyof ElevationScale;
23
- /**
24
- * Elevation scales describe how a surface renders shadow and lift at rest and
25
- * on hover. Each theme provides its own scale via
26
- * `.addScale('elevation', ...)`, which passes in that theme's `colors` — so
27
- * `colors['shadow-primary']` resolves per theme and per color mode without
28
- * this file ever importing a theme (which would be a circular dependency).
29
- *
30
- * The shared return type guarantees every theme emits the same elevation
31
- * tokens, so lookups like `theme.elevation['hover-shadow']` are safe under
32
- * any theme.
33
- */
34
- export type ElevationScaleFactory = (theme: {
35
- colors: ThemeColors;
36
- }) => ElevationScale;
37
- export declare const coreElevation: ElevationScaleFactory;
38
- export declare const percipioElevation: ElevationScaleFactory;
39
- export {};
@@ -1,68 +0,0 @@
1
- /**
2
- * The visual treatment of a surface at a single elevation state.
3
- * These are type aliases rather than interfaces so they keep the implicit
4
- * index signatures `addScale`'s constraint requires.
5
- */
6
-
7
- /**
8
- * State keys are camelCase: variance's `LiteralPaths` splits token paths on
9
- * `-`, so a hyphenated key like `hover-mirrored` would resolve to `never` and
10
- * drop out of the theme type. `hoverMirrored` is for surfaces that cast their
11
- * shadow to the opposite side (e.g. Card's `patternRight` shadow).
12
- */
13
-
14
- /**
15
- * Elevation scales describe how a surface renders shadow and lift at rest and
16
- * on hover. Each theme provides its own scale via
17
- * `.addScale('elevation', ...)`, which passes in that theme's `colors` — so
18
- * `colors['shadow-primary']` resolves per theme and per color mode without
19
- * this file ever importing a theme (which would be a circular dependency).
20
- *
21
- * The shared return type guarantees every theme emits the same elevation
22
- * tokens, so lookups like `theme.elevation['hover-shadow']` are safe under
23
- * any theme.
24
- */
25
-
26
- export const coreElevation = ({
27
- colors
28
- }) => {
29
- const shadowPrimary = colors['shadow-primary'];
30
- const offset = 8;
31
- const lift = 4;
32
- const shadow = x => `${x}px ${offset}px 0 0 ${shadowPrimary}`;
33
- return {
34
- rest: {
35
- shadow: `0 0 0 0 ${shadowPrimary}`,
36
- transform: 'none'
37
- },
38
- hover: {
39
- shadow: shadow(-offset),
40
- transform: `translate(${lift}px, -${lift}px)`
41
- },
42
- hoverMirrored: {
43
- shadow: shadow(offset),
44
- transform: `translate(-${lift}px, -${lift}px)`
45
- }
46
- };
47
- };
48
- export const percipioElevation = ({
49
- colors
50
- }) => {
51
- const shadowPrimary = colors['shadow-primary'];
52
- const shadowSecondary = colors['shadow-secondary'];
53
- const hover = `0 1px 4px 0 ${shadowPrimary}, 0 2px 11px 0 ${shadowSecondary}`;
54
- return {
55
- rest: {
56
- shadow: `0 1px 4px 0 ${shadowPrimary}, 0 2px 7px 0 ${shadowPrimary}`,
57
- transform: 'none'
58
- },
59
- hover: {
60
- shadow: hover,
61
- transform: 'none'
62
- },
63
- hoverMirrored: {
64
- shadow: hover,
65
- transform: 'none'
66
- }
67
- };
68
- };