@codecademy/gamut-styles 20.0.3-alpha.f72be7.0 → 20.0.3-alpha.fc54a1.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 +9 -34
- package/dist/themes/core.d.ts +9 -34
- package/dist/themes/core.js +3 -4
- package/dist/themes/lxStudio.d.ts +4 -29
- package/dist/themes/percipio.d.ts +4 -29
- package/dist/themes/platform.d.ts +9 -34
- package/dist/variables/elements.d.ts +3 -4
- package/dist/variables/elements.js +3 -5
- package/dist/variables/index.d.ts +0 -1
- package/dist/variables/index.js +1 -2
- package/dist/variance/config.js +0 -3
- package/package.json +2 -2
- package/dist/variables/zIndices.d.ts +0 -43
- package/dist/variables/zIndices.js +0 -43
package/dist/themes/admin.d.ts
CHANGED
|
@@ -34,19 +34,13 @@ 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<"
|
|
38
|
-
readonly
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
readonly
|
|
43
|
-
|
|
44
|
-
readonly flyout: 500;
|
|
45
|
-
readonly modal: 600;
|
|
46
|
-
readonly popover: 700;
|
|
47
|
-
readonly toaster: 800;
|
|
48
|
-
readonly tooltip: 900;
|
|
49
|
-
}, "zIndices">>> & 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", {
|
|
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", {
|
|
50
44
|
c_base: string;
|
|
51
45
|
c_xs: string;
|
|
52
46
|
c_sm: string;
|
|
@@ -126,20 +120,7 @@ export declare const adminTheme: Record<"breakpoints", {
|
|
|
126
120
|
readonly base: "4rem";
|
|
127
121
|
readonly md: "5rem";
|
|
128
122
|
};
|
|
129
|
-
readonly headerZ:
|
|
130
|
-
};
|
|
131
|
-
zIndices: {
|
|
132
|
-
readonly underlay: -100;
|
|
133
|
-
readonly base: 0;
|
|
134
|
-
readonly foreground: 100;
|
|
135
|
-
readonly portal: 200;
|
|
136
|
-
readonly widget: 300;
|
|
137
|
-
readonly appBar: 400;
|
|
138
|
-
readonly flyout: 500;
|
|
139
|
-
readonly modal: 600;
|
|
140
|
-
readonly popover: 700;
|
|
141
|
-
readonly toaster: 800;
|
|
142
|
-
readonly tooltip: 900;
|
|
123
|
+
readonly headerZ: 15;
|
|
143
124
|
};
|
|
144
125
|
} & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
145
126
|
readonly beige: "#FFF0E5";
|
|
@@ -563,13 +544,7 @@ export declare const adminTheme: Record<"breakpoints", {
|
|
|
563
544
|
}>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
|
|
564
545
|
1: string;
|
|
565
546
|
2: string;
|
|
566
|
-
}, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys
|
|
567
|
-
readonly headerHeight: {
|
|
568
|
-
readonly base: "4rem";
|
|
569
|
-
readonly md: "5rem";
|
|
570
|
-
};
|
|
571
|
-
readonly headerZ: 400;
|
|
572
|
-
}, "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, {
|
|
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, {
|
|
573
548
|
colors: import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
574
549
|
primary: {
|
|
575
550
|
_: "blue-500";
|
package/dist/themes/core.d.ts
CHANGED
|
@@ -15,19 +15,13 @@ 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<"
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
readonly
|
|
24
|
-
|
|
25
|
-
readonly flyout: 500;
|
|
26
|
-
readonly modal: 600;
|
|
27
|
-
readonly popover: 700;
|
|
28
|
-
readonly toaster: 800;
|
|
29
|
-
readonly tooltip: 900;
|
|
30
|
-
}, "zIndices">>> & 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", {
|
|
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", {
|
|
31
25
|
c_base: string;
|
|
32
26
|
c_xs: string;
|
|
33
27
|
c_sm: string;
|
|
@@ -107,20 +101,7 @@ export declare const coreTheme: Record<"breakpoints", {
|
|
|
107
101
|
readonly base: "4rem";
|
|
108
102
|
readonly md: "5rem";
|
|
109
103
|
};
|
|
110
|
-
readonly headerZ:
|
|
111
|
-
};
|
|
112
|
-
zIndices: {
|
|
113
|
-
readonly underlay: -100;
|
|
114
|
-
readonly base: 0;
|
|
115
|
-
readonly foreground: 100;
|
|
116
|
-
readonly portal: 200;
|
|
117
|
-
readonly widget: 300;
|
|
118
|
-
readonly appBar: 400;
|
|
119
|
-
readonly flyout: 500;
|
|
120
|
-
readonly modal: 600;
|
|
121
|
-
readonly popover: 700;
|
|
122
|
-
readonly toaster: 800;
|
|
123
|
-
readonly tooltip: 900;
|
|
104
|
+
readonly headerZ: 15;
|
|
124
105
|
};
|
|
125
106
|
} & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
126
107
|
readonly beige: "#FFF0E5";
|
|
@@ -544,13 +525,7 @@ export declare const coreTheme: Record<"breakpoints", {
|
|
|
544
525
|
}>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
|
|
545
526
|
1: string;
|
|
546
527
|
2: string;
|
|
547
|
-
}, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys
|
|
548
|
-
readonly headerHeight: {
|
|
549
|
-
readonly base: "4rem";
|
|
550
|
-
readonly md: "5rem";
|
|
551
|
-
};
|
|
552
|
-
readonly headerZ: 400;
|
|
553
|
-
}, "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;
|
|
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;
|
|
554
529
|
export type CoreThemeShape = typeof coreTheme;
|
|
555
530
|
export interface CoreTheme extends CoreThemeShape {
|
|
556
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
|
|
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
|
|
@@ -18,8 +18,7 @@ export const coreTheme = createTheme({
|
|
|
18
18
|
lineHeight,
|
|
19
19
|
fontWeight,
|
|
20
20
|
spacing,
|
|
21
|
-
elements
|
|
22
|
-
zIndices
|
|
21
|
+
elements
|
|
23
22
|
}).addColors(corePalette).addColorModes('light', {
|
|
24
23
|
light: {
|
|
25
24
|
text: {
|
|
@@ -130,4 +129,4 @@ export const coreTheme = createTheme({
|
|
|
130
129
|
}) => ({
|
|
131
130
|
1: `1px solid ${colors['border-primary']}`,
|
|
132
131
|
2: `2px solid ${colors['border-primary']}`
|
|
133
|
-
})).createScaleVariables('elements').
|
|
132
|
+
})).createScaleVariables('elements').addName('core').build();
|
|
@@ -78,43 +78,18 @@ export declare const lxStudioTheme: Record<"breakpoints", {
|
|
|
78
78
|
lg: string;
|
|
79
79
|
xl: string;
|
|
80
80
|
};
|
|
81
|
-
zIndices: Record<"zIndices", import("@codecademy/variance").KeyAsVariable<{
|
|
82
|
-
readonly underlay: -100;
|
|
83
|
-
readonly base: 0;
|
|
84
|
-
readonly foreground: 100;
|
|
85
|
-
readonly portal: 200;
|
|
86
|
-
readonly widget: 300;
|
|
87
|
-
readonly appBar: 400;
|
|
88
|
-
readonly flyout: 500;
|
|
89
|
-
readonly modal: 600;
|
|
90
|
-
readonly popover: 700;
|
|
91
|
-
readonly toaster: 800;
|
|
92
|
-
readonly tooltip: 900;
|
|
93
|
-
}, "zIndices">> & {
|
|
94
|
-
readonly underlay: -100;
|
|
95
|
-
readonly base: 0;
|
|
96
|
-
readonly foreground: 100;
|
|
97
|
-
readonly portal: 200;
|
|
98
|
-
readonly widget: 300;
|
|
99
|
-
readonly appBar: 400;
|
|
100
|
-
readonly flyout: 500;
|
|
101
|
-
readonly modal: 600;
|
|
102
|
-
readonly popover: 700;
|
|
103
|
-
readonly toaster: 800;
|
|
104
|
-
readonly tooltip: 900;
|
|
105
|
-
};
|
|
106
81
|
elements: Record<"elements", import("@codecademy/variance").KeyAsVariable<{
|
|
107
82
|
readonly headerHeight: {
|
|
108
83
|
readonly base: "4rem";
|
|
109
84
|
readonly md: "5rem";
|
|
110
85
|
};
|
|
111
|
-
readonly headerZ:
|
|
86
|
+
readonly headerZ: 15;
|
|
112
87
|
}, "elements">> & {
|
|
113
88
|
readonly headerHeight: {
|
|
114
89
|
readonly base: "4rem";
|
|
115
90
|
readonly md: "5rem";
|
|
116
91
|
};
|
|
117
|
-
readonly headerZ:
|
|
92
|
+
readonly headerZ: 15;
|
|
118
93
|
};
|
|
119
94
|
fontSize: {
|
|
120
95
|
readonly 64: string;
|
|
@@ -145,8 +120,8 @@ export declare const lxStudioTheme: Record<"breakpoints", {
|
|
|
145
120
|
readonly 64: string;
|
|
146
121
|
readonly 96: string;
|
|
147
122
|
};
|
|
148
|
-
_variables: import("@codecademy/variance/dist/createTheme/types").Assign<
|
|
149
|
-
_tokens: import("@codecademy/variance/dist/createTheme/types").Assign<
|
|
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>;
|
|
150
125
|
colors: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
151
126
|
readonly beige: "#FFF0E5";
|
|
152
127
|
readonly blue: "#1557FF";
|
|
@@ -62,43 +62,18 @@ export declare const percipioTheme: Record<"breakpoints", {
|
|
|
62
62
|
lg: string;
|
|
63
63
|
xl: string;
|
|
64
64
|
};
|
|
65
|
-
zIndices: Record<"zIndices", import("@codecademy/variance").KeyAsVariable<{
|
|
66
|
-
readonly underlay: -100;
|
|
67
|
-
readonly base: 0;
|
|
68
|
-
readonly foreground: 100;
|
|
69
|
-
readonly portal: 200;
|
|
70
|
-
readonly widget: 300;
|
|
71
|
-
readonly appBar: 400;
|
|
72
|
-
readonly flyout: 500;
|
|
73
|
-
readonly modal: 600;
|
|
74
|
-
readonly popover: 700;
|
|
75
|
-
readonly toaster: 800;
|
|
76
|
-
readonly tooltip: 900;
|
|
77
|
-
}, "zIndices">> & {
|
|
78
|
-
readonly underlay: -100;
|
|
79
|
-
readonly base: 0;
|
|
80
|
-
readonly foreground: 100;
|
|
81
|
-
readonly portal: 200;
|
|
82
|
-
readonly widget: 300;
|
|
83
|
-
readonly appBar: 400;
|
|
84
|
-
readonly flyout: 500;
|
|
85
|
-
readonly modal: 600;
|
|
86
|
-
readonly popover: 700;
|
|
87
|
-
readonly toaster: 800;
|
|
88
|
-
readonly tooltip: 900;
|
|
89
|
-
};
|
|
90
65
|
elements: Record<"elements", import("@codecademy/variance").KeyAsVariable<{
|
|
91
66
|
readonly headerHeight: {
|
|
92
67
|
readonly base: "4rem";
|
|
93
68
|
readonly md: "5rem";
|
|
94
69
|
};
|
|
95
|
-
readonly headerZ:
|
|
70
|
+
readonly headerZ: 15;
|
|
96
71
|
}, "elements">> & {
|
|
97
72
|
readonly headerHeight: {
|
|
98
73
|
readonly base: "4rem";
|
|
99
74
|
readonly md: "5rem";
|
|
100
75
|
};
|
|
101
|
-
readonly headerZ:
|
|
76
|
+
readonly headerZ: 15;
|
|
102
77
|
};
|
|
103
78
|
borderRadii: {
|
|
104
79
|
none: string;
|
|
@@ -137,8 +112,8 @@ export declare const percipioTheme: Record<"breakpoints", {
|
|
|
137
112
|
readonly 64: string;
|
|
138
113
|
readonly 96: string;
|
|
139
114
|
};
|
|
140
|
-
_variables: import("@codecademy/variance/dist/createTheme/types").Assign<
|
|
141
|
-
_tokens: import("@codecademy/variance/dist/createTheme/types").Assign<
|
|
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>;
|
|
142
117
|
colors: import("@codecademy/variance/dist/createTheme/types").Assign<import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
143
118
|
readonly beige: "#FFF0E5";
|
|
144
119
|
readonly blue: "#1557FF";
|
|
@@ -50,19 +50,13 @@ 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<"
|
|
54
|
-
readonly
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
readonly
|
|
59
|
-
|
|
60
|
-
readonly flyout: 500;
|
|
61
|
-
readonly modal: 600;
|
|
62
|
-
readonly popover: 700;
|
|
63
|
-
readonly toaster: 800;
|
|
64
|
-
readonly tooltip: 900;
|
|
65
|
-
}, "zIndices">>> & 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", {
|
|
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", {
|
|
66
60
|
c_base: string;
|
|
67
61
|
c_xs: string;
|
|
68
62
|
c_sm: string;
|
|
@@ -142,20 +136,7 @@ export declare const platformTheme: Record<"breakpoints", {
|
|
|
142
136
|
readonly base: "4rem";
|
|
143
137
|
readonly md: "5rem";
|
|
144
138
|
};
|
|
145
|
-
readonly headerZ:
|
|
146
|
-
};
|
|
147
|
-
zIndices: {
|
|
148
|
-
readonly underlay: -100;
|
|
149
|
-
readonly base: 0;
|
|
150
|
-
readonly foreground: 100;
|
|
151
|
-
readonly portal: 200;
|
|
152
|
-
readonly widget: 300;
|
|
153
|
-
readonly appBar: 400;
|
|
154
|
-
readonly flyout: 500;
|
|
155
|
-
readonly modal: 600;
|
|
156
|
-
readonly popover: 700;
|
|
157
|
-
readonly toaster: 800;
|
|
158
|
-
readonly tooltip: 900;
|
|
139
|
+
readonly headerZ: 15;
|
|
159
140
|
};
|
|
160
141
|
} & import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"colors", import("@codecademy/variance").KeyAsVariable<import("@codecademy/variance").LiteralPaths<{
|
|
161
142
|
readonly beige: "#FFF0E5";
|
|
@@ -579,13 +560,7 @@ export declare const platformTheme: Record<"breakpoints", {
|
|
|
579
560
|
}>, Record<"borders", import("@codecademy/variance").LiteralPaths<{
|
|
580
561
|
1: string;
|
|
581
562
|
2: string;
|
|
582
|
-
}, "-">>>, import("@codecademy/variance/dist/createTheme/types").PrivateThemeKeys, Record<"
|
|
583
|
-
readonly headerHeight: {
|
|
584
|
-
readonly base: "4rem";
|
|
585
|
-
readonly md: "5rem";
|
|
586
|
-
};
|
|
587
|
-
readonly headerZ: 400;
|
|
588
|
-
}, "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<{
|
|
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<{
|
|
589
564
|
readonly lightBeige: "#FFFBF8";
|
|
590
565
|
readonly gold: "#8A7300";
|
|
591
566
|
readonly teal: "#006D82";
|
|
@@ -4,9 +4,8 @@ export declare const elements: {
|
|
|
4
4
|
readonly md: "5rem";
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
|
-
* z-index for global page headers.
|
|
8
|
-
*
|
|
9
|
-
* Prefer `zIndex="appBar"` in new code.
|
|
7
|
+
* Semi-arbitrary z-index for global page headers.
|
|
8
|
+
* @remarks PLEASE talk to web platform before adding new z-index constants!
|
|
10
9
|
*/
|
|
11
|
-
readonly headerZ:
|
|
10
|
+
readonly headerZ: 15;
|
|
12
11
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { zIndices } from './zIndices';
|
|
2
1
|
export const elements = {
|
|
3
2
|
headerHeight: {
|
|
4
3
|
base: '4rem',
|
|
5
4
|
md: '5rem'
|
|
6
5
|
},
|
|
7
6
|
/**
|
|
8
|
-
* z-index for global page headers.
|
|
9
|
-
*
|
|
10
|
-
* Prefer `zIndex="appBar"` in new code.
|
|
7
|
+
* Semi-arbitrary z-index for global page headers.
|
|
8
|
+
* @remarks PLEASE talk to web platform before adding new z-index constants!
|
|
11
9
|
*/
|
|
12
|
-
headerZ:
|
|
10
|
+
headerZ: 15
|
|
13
11
|
};
|
package/dist/variables/index.js
CHANGED
package/dist/variance/config.js
CHANGED
|
@@ -450,9 +450,6 @@ 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
|
-
// `zIndices` token object instead (e.g. zIndex={zIndices.modal}).
|
|
456
453
|
zIndex: {
|
|
457
454
|
property: 'zIndex'
|
|
458
455
|
},
|
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.0.3-alpha.
|
|
4
|
+
"version": "20.0.3-alpha.fc54a1.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.fc54a1.0",
|
|
8
8
|
"@emotion/is-prop-valid": "^1.1.0",
|
|
9
9
|
"framer-motion": "^11.18.0",
|
|
10
10
|
"get-nonce": "^1.0.0",
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Semantic z-index scale. A single scale covers both in-flow layers (low values) and
|
|
3
|
-
* portal layers (≥100). Every z-index in Gamut should reference a token here rather than a
|
|
4
|
-
* magic number.
|
|
5
|
-
*
|
|
6
|
-
* The `zIndex` prop is intentionally left numeric/unscaled, and this object is numeric, so
|
|
7
|
-
* tokens are used as `zIndex={zIndices.modal}`. That preserves the escape hatch (a raw
|
|
8
|
-
* in-between number, e.g. `zIndex={605}`) and arithmetic on tokens (e.g. `zIndices.foreground - 2`).
|
|
9
|
-
*
|
|
10
|
-
* Portal-band values are spaced by 100 so in-between escape-hatch numbers are available.
|
|
11
|
-
* `portal` (200) is the floor of the portal band and the default for `BodyPortal`.
|
|
12
|
-
*
|
|
13
|
-
* @remarks PLEASE talk to web platform before adding new z-index tokens.
|
|
14
|
-
*/
|
|
15
|
-
export declare const zIndices: {
|
|
16
|
-
/** Decorative layer behind content (underlines, backdrops, shadows). */
|
|
17
|
-
readonly underlay: -100;
|
|
18
|
-
/** Ground layer — establishes a local stacking context without lifting above siblings. */
|
|
19
|
-
readonly base: 0;
|
|
20
|
-
/**
|
|
21
|
-
* The raised in-flow layer: an element in front of what sits/scrolls behind it, but below
|
|
22
|
-
* all portal overlays. Covers content lifted above an `underlay` (e.g. text over its
|
|
23
|
-
* underline) and sticky content headers (e.g. a sticky table `thead`). Set to 100 so it
|
|
24
|
-
* clears common ad-hoc low z-index values.
|
|
25
|
-
*/
|
|
26
|
-
readonly foreground: 100;
|
|
27
|
-
/** Portal floor / `BodyPortal` default — un-tokenized portal content lands here. */
|
|
28
|
-
readonly portal: 200;
|
|
29
|
-
/** Persistent floating page furniture at rest (e.g. an AI chat launcher, help bubble). */
|
|
30
|
-
readonly widget: 300;
|
|
31
|
-
/** Global app header / nav bar. Aliased by the legacy `elements.headerZ` constant. */
|
|
32
|
-
readonly appBar: 400;
|
|
33
|
-
/** Portaled side panel (the `Flyout` component = `Drawer` inside `Overlay`). */
|
|
34
|
-
readonly flyout: 500;
|
|
35
|
-
/** `Overlay`, `Modal`, and `Dialog` (they share one portal primitive). */
|
|
36
|
-
readonly modal: 600;
|
|
37
|
-
/** Portal-mode `Popover` and the portaled `SelectDropdown` menu — above modal. */
|
|
38
|
-
readonly popover: 700;
|
|
39
|
-
/** Toasts / notifications — visible above modals. */
|
|
40
|
-
readonly toaster: 800;
|
|
41
|
-
/** Floating tooltips (`FloatingTip`) — highest, so they are never clipped. */
|
|
42
|
-
readonly tooltip: 900;
|
|
43
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Semantic z-index scale. A single scale covers both in-flow layers (low values) and
|
|
3
|
-
* portal layers (≥100). Every z-index in Gamut should reference a token here rather than a
|
|
4
|
-
* magic number.
|
|
5
|
-
*
|
|
6
|
-
* The `zIndex` prop is intentionally left numeric/unscaled, and this object is numeric, so
|
|
7
|
-
* tokens are used as `zIndex={zIndices.modal}`. That preserves the escape hatch (a raw
|
|
8
|
-
* in-between number, e.g. `zIndex={605}`) and arithmetic on tokens (e.g. `zIndices.foreground - 2`).
|
|
9
|
-
*
|
|
10
|
-
* Portal-band values are spaced by 100 so in-between escape-hatch numbers are available.
|
|
11
|
-
* `portal` (200) is the floor of the portal band and the default for `BodyPortal`.
|
|
12
|
-
*
|
|
13
|
-
* @remarks PLEASE talk to web platform before adding new z-index tokens.
|
|
14
|
-
*/
|
|
15
|
-
export const zIndices = {
|
|
16
|
-
/** Decorative layer behind content (underlines, backdrops, shadows). */
|
|
17
|
-
underlay: -100,
|
|
18
|
-
/** Ground layer — establishes a local stacking context without lifting above siblings. */
|
|
19
|
-
base: 0,
|
|
20
|
-
/**
|
|
21
|
-
* The raised in-flow layer: an element in front of what sits/scrolls behind it, but below
|
|
22
|
-
* all portal overlays. Covers content lifted above an `underlay` (e.g. text over its
|
|
23
|
-
* underline) and sticky content headers (e.g. a sticky table `thead`). Set to 100 so it
|
|
24
|
-
* clears common ad-hoc low z-index values.
|
|
25
|
-
*/
|
|
26
|
-
foreground: 100,
|
|
27
|
-
/** Portal floor / `BodyPortal` default — un-tokenized portal content lands here. */
|
|
28
|
-
portal: 200,
|
|
29
|
-
/** Persistent floating page furniture at rest (e.g. an AI chat launcher, help bubble). */
|
|
30
|
-
widget: 300,
|
|
31
|
-
/** Global app header / nav bar. Aliased by the legacy `elements.headerZ` constant. */
|
|
32
|
-
appBar: 400,
|
|
33
|
-
/** Portaled side panel (the `Flyout` component = `Drawer` inside `Overlay`). */
|
|
34
|
-
flyout: 500,
|
|
35
|
-
/** `Overlay`, `Modal`, and `Dialog` (they share one portal primitive). */
|
|
36
|
-
modal: 600,
|
|
37
|
-
/** Portal-mode `Popover` and the portaled `SelectDropdown` menu — above modal. */
|
|
38
|
-
popover: 700,
|
|
39
|
-
/** Toasts / notifications — visible above modals. */
|
|
40
|
-
toaster: 800,
|
|
41
|
-
/** Floating tooltips (`FloatingTip`) — highest, so they are never clipped. */
|
|
42
|
-
tooltip: 900
|
|
43
|
-
};
|