@codecademy/gamut-styles 20.0.3-alpha.d2f149.0 → 20.0.3-alpha.d5ff62.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.
@@ -34,13 +34,17 @@ export declare const adminTheme: Record<"breakpoints", {
34
34
  md: string;
35
35
  lg: string;
36
36
  xl: string;
37
- }> & import("@codecademy/variance/dist/createTheme/types").Merge<Record<"elements", Record<"elements", import("@codecademy/variance").KeyAsVariable<{
38
- readonly headerHeight: {
39
- readonly base: "4rem";
40
- readonly md: "5rem";
41
- };
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<Record<"breakpoints", {
37
+ }> & import("@codecademy/variance/dist/createTheme/types").Merge<Record<"zIndexes", Record<"zIndexes", import("@codecademy/variance").KeyAsVariable<{
38
+ readonly underlay: -100;
39
+ readonly base: 0;
40
+ readonly foreground: 100;
41
+ readonly floating: 200;
42
+ readonly appBar: 300;
43
+ readonly flyout: 400;
44
+ readonly modal: 500;
45
+ readonly popover: 600;
46
+ readonly topmost: 700;
47
+ }, "zIndexes">>> & 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", {
44
48
  c_base: string;
45
49
  c_xs: string;
46
50
  c_sm: string;
@@ -120,7 +124,18 @@ export declare const adminTheme: Record<"breakpoints", {
120
124
  readonly base: "4rem";
121
125
  readonly md: "5rem";
122
126
  };
123
- readonly headerZ: 15;
127
+ readonly headerZ: 300;
128
+ };
129
+ zIndexes: {
130
+ readonly underlay: -100;
131
+ readonly base: 0;
132
+ readonly foreground: 100;
133
+ readonly floating: 200;
134
+ readonly appBar: 300;
135
+ readonly flyout: 400;
136
+ readonly modal: 500;
137
+ readonly popover: 600;
138
+ readonly topmost: 700;
124
139
  };
125
140
  } & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
126
141
  readonly beige: "#FFF0E5";
@@ -544,7 +559,13 @@ export declare const adminTheme: Record<"breakpoints", {
544
559
  }>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
545
560
  1: string;
546
561
  2: string;
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, {
562
+ }, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"elements", Record<"elements", import("@codecademy/variance").KeyAsVariable<{
563
+ readonly headerHeight: {
564
+ readonly base: "4rem";
565
+ readonly md: "5rem";
566
+ };
567
+ readonly headerZ: 300;
568
+ }, "elements">>>>, 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
569
  colors: import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
549
570
  primary: {
550
571
  _: "blue-500";
@@ -15,13 +15,17 @@ export declare const coreTheme: Record<"breakpoints", {
15
15
  md: string;
16
16
  lg: string;
17
17
  xl: string;
18
- }> & import("@codecademy/variance/dist/createTheme/types").Merge<Record<"elements", Record<"elements", import("@codecademy/variance").KeyAsVariable<{
19
- readonly headerHeight: {
20
- readonly base: "4rem";
21
- readonly md: "5rem";
22
- };
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<Record<"breakpoints", {
18
+ }> & import("@codecademy/variance/dist/createTheme/types").Merge<Record<"zIndexes", Record<"zIndexes", import("@codecademy/variance").KeyAsVariable<{
19
+ readonly underlay: -100;
20
+ readonly base: 0;
21
+ readonly foreground: 100;
22
+ readonly floating: 200;
23
+ readonly appBar: 300;
24
+ readonly flyout: 400;
25
+ readonly modal: 500;
26
+ readonly popover: 600;
27
+ readonly topmost: 700;
28
+ }, "zIndexes">>> & 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", {
25
29
  c_base: string;
26
30
  c_xs: string;
27
31
  c_sm: string;
@@ -101,7 +105,18 @@ export declare const coreTheme: Record<"breakpoints", {
101
105
  readonly base: "4rem";
102
106
  readonly md: "5rem";
103
107
  };
104
- readonly headerZ: 15;
108
+ readonly headerZ: 300;
109
+ };
110
+ zIndexes: {
111
+ readonly underlay: -100;
112
+ readonly base: 0;
113
+ readonly foreground: 100;
114
+ readonly floating: 200;
115
+ readonly appBar: 300;
116
+ readonly flyout: 400;
117
+ readonly modal: 500;
118
+ readonly popover: 600;
119
+ readonly topmost: 700;
105
120
  };
106
121
  } & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
107
122
  readonly beige: "#FFF0E5";
@@ -525,7 +540,13 @@ export declare const coreTheme: Record<"breakpoints", {
525
540
  }>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
526
541
  1: string;
527
542
  2: string;
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;
543
+ }, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"elements", Record<"elements", import("@codecademy/variance").KeyAsVariable<{
544
+ readonly headerHeight: {
545
+ readonly base: "4rem";
546
+ readonly md: "5rem";
547
+ };
548
+ readonly headerZ: 300;
549
+ }, "elements">>>>, 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
550
  export type CoreThemeShape = typeof coreTheme;
530
551
  export interface CoreTheme extends CoreThemeShape {
531
552
  }
@@ -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, corePalette, elements, fontFamily, fontSize, fontWeight, lineHeight, mediaQueries, spacing, zIndexes } from '../variables';
3
3
 
4
4
  /**
5
5
  * @description This is the core theme that all other Codecademy themes are extended from
@@ -18,7 +18,8 @@ export const coreTheme = createTheme({
18
18
  lineHeight,
19
19
  fontWeight,
20
20
  spacing,
21
- elements
21
+ elements,
22
+ zIndexes
22
23
  }).addColors(corePalette).addColorModes('light', {
23
24
  light: {
24
25
  text: {
@@ -129,4 +130,4 @@ export const coreTheme = createTheme({
129
130
  }) => ({
130
131
  1: `1px solid ${colors['border-primary']}`,
131
132
  2: `2px solid ${colors['border-primary']}`
132
- })).createScaleVariables('elements').addName('core').build();
133
+ })).createScaleVariables('elements').createScaleVariables('zIndexes').addName('core').build();
@@ -78,18 +78,39 @@ export declare const lxStudioTheme: Record<"breakpoints", {
78
78
  lg: string;
79
79
  xl: string;
80
80
  };
81
+ zIndexes: Record<"zIndexes", import("@codecademy/variance").KeyAsVariable<{
82
+ readonly underlay: -100;
83
+ readonly base: 0;
84
+ readonly foreground: 100;
85
+ readonly floating: 200;
86
+ readonly appBar: 300;
87
+ readonly flyout: 400;
88
+ readonly modal: 500;
89
+ readonly popover: 600;
90
+ readonly topmost: 700;
91
+ }, "zIndexes">> & {
92
+ readonly underlay: -100;
93
+ readonly base: 0;
94
+ readonly foreground: 100;
95
+ readonly floating: 200;
96
+ readonly appBar: 300;
97
+ readonly flyout: 400;
98
+ readonly modal: 500;
99
+ readonly popover: 600;
100
+ readonly topmost: 700;
101
+ };
81
102
  elements: Record<"elements", import("@codecademy/variance").KeyAsVariable<{
82
103
  readonly headerHeight: {
83
104
  readonly base: "4rem";
84
105
  readonly md: "5rem";
85
106
  };
86
- readonly headerZ: 15;
107
+ readonly headerZ: 300;
87
108
  }, "elements">> & {
88
109
  readonly headerHeight: {
89
110
  readonly base: "4rem";
90
111
  readonly md: "5rem";
91
112
  };
92
- readonly headerZ: 15;
113
+ readonly headerZ: 300;
93
114
  };
94
115
  fontSize: {
95
116
  readonly 64: string;
@@ -120,8 +141,8 @@ export declare const lxStudioTheme: Record<"breakpoints", {
120
141
  readonly 64: string;
121
142
  readonly 96: string;
122
143
  };
123
- _variables: import("@codecademy/variance/dist/createTheme/types").Assign<Record<string, import("@codecademy/variance").CSSObject>, Record<string, import("@codecademy/variance").CSSObject>> & Record<string, import("@codecademy/variance").CSSObject>;
124
- _tokens: import("@codecademy/variance/dist/createTheme/types").Assign<Record<string | number, any>, Record<string | number, any>> & Record<string | number, any>;
144
+ _variables: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance/dist/createTheme/types").Assign<Record<string, import("@codecademy/variance").CSSObject>, Record<string, import("@codecademy/variance").CSSObject>>, Record<string, import("@codecademy/variance").CSSObject>> & Record<string, import("@codecademy/variance").CSSObject>;
145
+ _tokens: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance/dist/createTheme/types").Assign<Record<string | number, any>, Record<string | number, any>>, Record<string | number, any>> & Record<string | number, any>;
125
146
  colors: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
126
147
  readonly beige: "#FFF0E5";
127
148
  readonly blue: "#1557FF";
@@ -62,18 +62,39 @@ export declare const percipioTheme: Record<"breakpoints", {
62
62
  lg: string;
63
63
  xl: string;
64
64
  };
65
+ zIndexes: Record<"zIndexes", import("@codecademy/variance").KeyAsVariable<{
66
+ readonly underlay: -100;
67
+ readonly base: 0;
68
+ readonly foreground: 100;
69
+ readonly floating: 200;
70
+ readonly appBar: 300;
71
+ readonly flyout: 400;
72
+ readonly modal: 500;
73
+ readonly popover: 600;
74
+ readonly topmost: 700;
75
+ }, "zIndexes">> & {
76
+ readonly underlay: -100;
77
+ readonly base: 0;
78
+ readonly foreground: 100;
79
+ readonly floating: 200;
80
+ readonly appBar: 300;
81
+ readonly flyout: 400;
82
+ readonly modal: 500;
83
+ readonly popover: 600;
84
+ readonly topmost: 700;
85
+ };
65
86
  elements: Record<"elements", import("@codecademy/variance").KeyAsVariable<{
66
87
  readonly headerHeight: {
67
88
  readonly base: "4rem";
68
89
  readonly md: "5rem";
69
90
  };
70
- readonly headerZ: 15;
91
+ readonly headerZ: 300;
71
92
  }, "elements">> & {
72
93
  readonly headerHeight: {
73
94
  readonly base: "4rem";
74
95
  readonly md: "5rem";
75
96
  };
76
- readonly headerZ: 15;
97
+ readonly headerZ: 300;
77
98
  };
78
99
  borderRadii: {
79
100
  none: string;
@@ -112,8 +133,8 @@ export declare const percipioTheme: Record<"breakpoints", {
112
133
  readonly 64: string;
113
134
  readonly 96: string;
114
135
  };
115
- _variables: import("@codecademy/variance/dist/createTheme/types").Assign<Record<string, import("@codecademy/variance").CSSObject>, Record<string, import("@codecademy/variance").CSSObject>> & Record<string, import("@codecademy/variance").CSSObject>;
116
- _tokens: import("@codecademy/variance/dist/createTheme/types").Assign<Record<string | number, any>, Record<string | number, any>> & Record<string | number, any>;
136
+ _variables: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance/dist/createTheme/types").Assign<Record<string, import("@codecademy/variance").CSSObject>, Record<string, import("@codecademy/variance").CSSObject>>, Record<string, import("@codecademy/variance").CSSObject>> & Record<string, import("@codecademy/variance").CSSObject>;
137
+ _tokens: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance/dist/createTheme/types").Assign<Record<string | number, any>, Record<string | number, any>>, Record<string | number, any>> & Record<string | number, any>;
117
138
  colors: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
118
139
  readonly beige: "#FFF0E5";
119
140
  readonly blue: "#1557FF";
@@ -50,13 +50,17 @@ export declare const platformTheme: Record<"breakpoints", {
50
50
  md: string;
51
51
  lg: string;
52
52
  xl: string;
53
- }> & import("@codecademy/variance/dist/createTheme/types").Merge<Record<"elements", Record<"elements", import("@codecademy/variance").KeyAsVariable<{
54
- readonly headerHeight: {
55
- readonly base: "4rem";
56
- readonly md: "5rem";
57
- };
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<Record<"breakpoints", {
53
+ }> & import("@codecademy/variance/dist/createTheme/types").Merge<Record<"zIndexes", Record<"zIndexes", import("@codecademy/variance").KeyAsVariable<{
54
+ readonly underlay: -100;
55
+ readonly base: 0;
56
+ readonly foreground: 100;
57
+ readonly floating: 200;
58
+ readonly appBar: 300;
59
+ readonly flyout: 400;
60
+ readonly modal: 500;
61
+ readonly popover: 600;
62
+ readonly topmost: 700;
63
+ }, "zIndexes">>> & 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", {
60
64
  c_base: string;
61
65
  c_xs: string;
62
66
  c_sm: string;
@@ -136,7 +140,18 @@ export declare const platformTheme: Record<"breakpoints", {
136
140
  readonly base: "4rem";
137
141
  readonly md: "5rem";
138
142
  };
139
- readonly headerZ: 15;
143
+ readonly headerZ: 300;
144
+ };
145
+ zIndexes: {
146
+ readonly underlay: -100;
147
+ readonly base: 0;
148
+ readonly foreground: 100;
149
+ readonly floating: 200;
150
+ readonly appBar: 300;
151
+ readonly flyout: 400;
152
+ readonly modal: 500;
153
+ readonly popover: 600;
154
+ readonly topmost: 700;
140
155
  };
141
156
  } & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
142
157
  readonly beige: "#FFF0E5";
@@ -560,7 +575,13 @@ export declare const platformTheme: Record<"breakpoints", {
560
575
  }>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
561
576
  1: string;
562
577
  2: string;
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<{
578
+ }, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"elements", Record<"elements", import("@codecademy/variance").KeyAsVariable<{
579
+ readonly headerHeight: {
580
+ readonly base: "4rem";
581
+ readonly md: "5rem";
582
+ };
583
+ readonly headerZ: 300;
584
+ }, "elements">>>>, 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
585
  readonly lightBeige: "#FFFBF8";
565
586
  readonly gold: "#8A7300";
566
587
  readonly teal: "#006D82";
@@ -4,8 +4,9 @@ export declare const elements: {
4
4
  readonly md: "5rem";
5
5
  };
6
6
  /**
7
- * Semi-arbitrary z-index for global page headers.
8
- * @remarks PLEASE talk to web platform before adding new z-index constants!
7
+ * z-index for global page headers. Aliases the `appBar` token from the `zIndexes`
8
+ * scale so consumers still reading `elements.headerZ` stay in sync with the scale.
9
+ * Prefer `zIndex="appBar"` in new code.
9
10
  */
10
- readonly headerZ: 15;
11
+ readonly headerZ: 300;
11
12
  };
@@ -1,11 +1,13 @@
1
+ import { zIndexes } from './zIndexes';
1
2
  export const elements = {
2
3
  headerHeight: {
3
4
  base: '4rem',
4
5
  md: '5rem'
5
6
  },
6
7
  /**
7
- * Semi-arbitrary z-index for global page headers.
8
- * @remarks PLEASE talk to web platform before adding new z-index constants!
8
+ * z-index for global page headers. Aliases the `appBar` token from the `zIndexes`
9
+ * scale so consumers still reading `elements.headerZ` stay in sync with the scale.
10
+ * Prefer `zIndex="appBar"` in new code.
9
11
  */
10
- headerZ: 15
12
+ headerZ: zIndexes.appBar
11
13
  };
@@ -5,3 +5,4 @@ export * from './responsive';
5
5
  export * from './spacing';
6
6
  export * from './timing';
7
7
  export * from './typography';
8
+ export * from './zIndexes';
@@ -4,4 +4,5 @@ export * from './elements';
4
4
  export * from './responsive';
5
5
  export * from './spacing';
6
6
  export * from './timing';
7
- export * from './typography';
7
+ export * from './typography';
8
+ export * from './zIndexes';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Semantic z-index scale. Every z-index in Gamut should reference a token here rather than a
3
+ * magic number.
4
+ *
5
+ * The `zIndex` prop is intentionally left numeric/unscaled, and this object is numeric, so
6
+ * tokens are used as `zIndex={zIndexes.modal}`. That preserves the escape hatch (a raw
7
+ * in-between number, e.g. `zIndex={550}`) and arithmetic on tokens (e.g. `zIndexes.foreground - 2`).
8
+ *
9
+ * Values are spaced by 100 so in-between escape-hatch numbers are available. `floating` (200) is
10
+ * the floor of the portal band and the default for `BodyPortal`.
11
+ *
12
+ * @remarks PLEASE talk to web platform before adding new z-index tokens.
13
+ */
14
+ export declare const zIndexes: {
15
+ /** Decorative layer behind content (underlines, backdrops, shadows). */
16
+ readonly underlay: -100;
17
+ /** Ground layer — establishes a local stacking context without lifting above siblings. */
18
+ readonly base: 0;
19
+ /**
20
+ * The raised in-flow layer: an element in front of what sits/scrolls behind it, but below
21
+ * all portal overlays. Covers content lifted above an `underlay` (e.g. text over its
22
+ * underline) and sticky content headers (e.g. a sticky table `thead`).
23
+ */
24
+ readonly foreground: 100;
25
+ /**
26
+ * Portal floor: the default for `BodyPortal`, and the layer for persistent floating page
27
+ * furniture at rest (e.g. an AI chat launcher, help bubble). Above page content, below the
28
+ * app nav and all overlays.
29
+ */
30
+ readonly floating: 200;
31
+ /** Global app header / nav bar. Aliased by the legacy `elements.headerZ` constant. */
32
+ readonly appBar: 300;
33
+ /** Portaled side panel (the `Flyout` component = `Drawer` inside `Overlay`). */
34
+ readonly flyout: 400;
35
+ /** `Overlay`, `Modal`, and `Dialog` (they share one portal primitive). */
36
+ readonly modal: 500;
37
+ /** Portal-mode `Popover` and the portaled `SelectDropdown` menu — above modal. */
38
+ readonly popover: 600;
39
+ /**
40
+ * Top-most transient overlays that must never be clipped: floating tooltips (`FloatingTip`)
41
+ * and toasts / notifications (`Toaster`). Highest layer — nothing in Gamut sits above it.
42
+ */
43
+ readonly topmost: 700;
44
+ };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Semantic z-index scale. Every z-index in Gamut should reference a token here rather than a
3
+ * magic number.
4
+ *
5
+ * The `zIndex` prop is intentionally left numeric/unscaled, and this object is numeric, so
6
+ * tokens are used as `zIndex={zIndexes.modal}`. That preserves the escape hatch (a raw
7
+ * in-between number, e.g. `zIndex={550}`) and arithmetic on tokens (e.g. `zIndexes.foreground - 2`).
8
+ *
9
+ * Values are spaced by 100 so in-between escape-hatch numbers are available. `floating` (200) is
10
+ * the floor of the portal band and the default for `BodyPortal`.
11
+ *
12
+ * @remarks PLEASE talk to web platform before adding new z-index tokens.
13
+ */
14
+ export const zIndexes = {
15
+ /** Decorative layer behind content (underlines, backdrops, shadows). */
16
+ underlay: -100,
17
+ /** Ground layer — establishes a local stacking context without lifting above siblings. */
18
+ base: 0,
19
+ /**
20
+ * The raised in-flow layer: an element in front of what sits/scrolls behind it, but below
21
+ * all portal overlays. Covers content lifted above an `underlay` (e.g. text over its
22
+ * underline) and sticky content headers (e.g. a sticky table `thead`).
23
+ */
24
+ foreground: 100,
25
+ /**
26
+ * Portal floor: the default for `BodyPortal`, and the layer for persistent floating page
27
+ * furniture at rest (e.g. an AI chat launcher, help bubble). Above page content, below the
28
+ * app nav and all overlays.
29
+ */
30
+ floating: 200,
31
+ /** Global app header / nav bar. Aliased by the legacy `elements.headerZ` constant. */
32
+ appBar: 300,
33
+ /** Portaled side panel (the `Flyout` component = `Drawer` inside `Overlay`). */
34
+ flyout: 400,
35
+ /** `Overlay`, `Modal`, and `Dialog` (they share one portal primitive). */
36
+ modal: 500,
37
+ /** Portal-mode `Popover` and the portaled `SelectDropdown` menu — above modal. */
38
+ popover: 600,
39
+ /**
40
+ * Top-most transient overlays that must never be clipped: floating tooltips (`FloatingTip`)
41
+ * and toasts / notifications (`Toaster`). Highest layer — nothing in Gamut sits above it.
42
+ */
43
+ topmost: 700
44
+ };
@@ -450,6 +450,9 @@ export const positioning = {
450
450
  resolveProperty: getPropertyMode,
451
451
  transform: transformSize
452
452
  },
453
+ // Intentionally unscaled: scaled variance props are token-only and reject raw numbers,
454
+ // which would break the numeric escape hatch and Tip's z-index arithmetic. Use the numeric
455
+ // `zIndexes` token object instead (e.g. zIndex={zIndexes.modal}).
453
456
  zIndex: {
454
457
  property: 'zIndex'
455
458
  },
@@ -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.0.3-alpha.d2f149.0",
4
+ "version": "20.0.3-alpha.d5ff62.0",
5
5
  "author": "Jake Hiller <jake@codecademy.com>",
6
6
  "dependencies": {
7
- "@codecademy/variance": "0.26.2-alpha.d2f149.0",
7
+ "@codecademy/variance": "0.26.2-alpha.d5ff62.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;