@codecademy/gamut-styles 17.1.3-alpha.5daf90.0 → 17.1.3-alpha.8efe7d.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/AssetProvider.d.ts +3 -2
- package/dist/AssetProvider.js +18 -15
- package/dist/Background.d.ts +1 -1
- package/dist/Background.js +45 -28
- package/dist/ColorMode.d.ts +23 -21
- package/dist/ColorMode.js +77 -70
- package/dist/GamutProvider.js +22 -20
- package/dist/cache/createEmotionCache.js +26 -11
- package/dist/cache/stylisPlugins/focusVisible.js +4 -4
- package/dist/globals/Reboot.d.ts +2 -1
- package/dist/globals/Reboot.js +6 -4
- package/dist/globals/Typography.d.ts +2 -1
- package/dist/globals/Typography.js +20 -18
- package/dist/globals/Variables.js +21 -12
- package/dist/remoteAssets/fonts.js +8 -8
- package/dist/styles/boxShadow.js +20 -10
- package/dist/styles/fontSmoothing.js +7 -5
- package/dist/styles/noSelect.js +1 -1
- package/dist/styles/pxRem.js +3 -3
- package/dist/styles/responsive.js +6 -4
- package/dist/styles/screenReaderOnly.js +2 -2
- package/dist/styles/transitionConcat.js +4 -4
- package/dist/themes/admin.d.ts +2 -2
- package/dist/themes/admin.js +1 -1
- package/dist/themes/core.js +12 -14
- package/dist/themes/enterprise.d.ts +1002 -0
- package/dist/themes/enterprise.js +68 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +2 -1
- package/dist/themes/platform.d.ts +2 -2
- package/dist/themes/platform.js +1 -1
- package/dist/utilities/themed.js +2 -4
- package/dist/variables/borderRadii.js +1 -1
- package/dist/variables/colors.d.ts +100 -0
- package/dist/variables/colors.js +89 -19
- package/dist/variables/deprecated-colors.d.ts +1 -1
- package/dist/variables/deprecated-colors.js +16 -17
- package/dist/variables/elements.js +1 -1
- package/dist/variables/responsive.js +6 -4
- package/dist/variables/spacing.js +1 -1
- package/dist/variables/timing.js +6 -6
- package/dist/variables/typography.js +8 -14
- package/dist/variance/config.js +32 -49
- package/dist/variance/index.js +2 -1
- package/dist/variance/props.js +16 -16
- package/dist/variance/utils.d.ts +3 -3
- package/dist/variance/utils.js +14 -6
- package/package.json +3 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createTheme } from '@codecademy/variance';
|
|
2
|
+
import { enterprisePalette } from '../variables';
|
|
3
|
+
import { coreTheme } from './core';
|
|
4
|
+
export var enterpriseTheme = createTheme(coreTheme).addColors(enterprisePalette).addColorModes('light', {
|
|
5
|
+
light: {
|
|
6
|
+
text: {
|
|
7
|
+
_: 'gray-900',
|
|
8
|
+
accent: 'blue',
|
|
9
|
+
disabled: 'gray-500',
|
|
10
|
+
secondary: 'gray-500'
|
|
11
|
+
},
|
|
12
|
+
background: {
|
|
13
|
+
_: 'white',
|
|
14
|
+
contrast: 'white',
|
|
15
|
+
current: 'white',
|
|
16
|
+
primary: 'beige',
|
|
17
|
+
selected: 'blue-50',
|
|
18
|
+
disabled: 'gray-100',
|
|
19
|
+
hover: 'gray-200'
|
|
20
|
+
},
|
|
21
|
+
primary: {
|
|
22
|
+
_: 'blue',
|
|
23
|
+
hover: 'blue-400',
|
|
24
|
+
inverse: 'white'
|
|
25
|
+
},
|
|
26
|
+
secondary: {
|
|
27
|
+
_: 'gray-900',
|
|
28
|
+
hover: 'gray-800'
|
|
29
|
+
},
|
|
30
|
+
interface: {
|
|
31
|
+
_: 'blue',
|
|
32
|
+
hover: 'blue-400'
|
|
33
|
+
},
|
|
34
|
+
danger: {
|
|
35
|
+
_: 'red',
|
|
36
|
+
hover: 'red-600'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
dark: {
|
|
40
|
+
text: {
|
|
41
|
+
_: 'white',
|
|
42
|
+
accent: 'blue',
|
|
43
|
+
disabled: 'gray-100',
|
|
44
|
+
secondary: 'gray-200'
|
|
45
|
+
},
|
|
46
|
+
background: {
|
|
47
|
+
_: 'gray-900',
|
|
48
|
+
current: 'gray-800',
|
|
49
|
+
primary: 'gray-900',
|
|
50
|
+
selected: 'gray-700',
|
|
51
|
+
disabled: 'gray-500',
|
|
52
|
+
hover: 'gray-600'
|
|
53
|
+
},
|
|
54
|
+
primary: {
|
|
55
|
+
_: 'skyBlue',
|
|
56
|
+
hover: 'skyBlue-100',
|
|
57
|
+
inverse: 'blue'
|
|
58
|
+
},
|
|
59
|
+
secondary: {
|
|
60
|
+
_: 'white',
|
|
61
|
+
hover: 'blue-50'
|
|
62
|
+
},
|
|
63
|
+
interface: {
|
|
64
|
+
_: 'white',
|
|
65
|
+
hover: 'blue-50'
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}).build();
|
package/dist/themes/index.d.ts
CHANGED
package/dist/themes/index.js
CHANGED
|
@@ -929,7 +929,7 @@ export declare const platformTheme: Record<"breakpoints", {
|
|
|
929
929
|
}, "-", "_">;
|
|
930
930
|
}>;
|
|
931
931
|
mode: "light" | "dark";
|
|
932
|
-
_getColorValue: (color: import("@codecademy/variance").Path<{
|
|
932
|
+
_getColorValue: (color: "text" | import("@codecademy/variance").Path<{
|
|
933
933
|
readonly beige: "#FFF0E5";
|
|
934
934
|
readonly blue: "#1557FF";
|
|
935
935
|
readonly green: "#008A27";
|
|
@@ -997,7 +997,7 @@ export declare const platformTheme: Record<"breakpoints", {
|
|
|
997
997
|
readonly "white-200": string;
|
|
998
998
|
readonly "white-600": string;
|
|
999
999
|
readonly "white-700": string;
|
|
1000
|
-
}, "-"> | "
|
|
1000
|
+
}, "-"> | "secondary" | "background" | "primary" | "danger" | "interface" | "text-disabled" | "text-accent" | "text-secondary" | "shadow-opaque" | "shadow-solid" | "secondary-hover" | "feedback-error" | "feedback-success" | "feedback-warning" | "background-disabled" | "background-contrast" | "background-current" | "background-primary" | "background-selected" | "background-hover" | "primary-hover" | "primary-inverse" | "danger-hover" | "interface-hover" | import("@codecademy/variance").Path<{
|
|
1001
1001
|
readonly lightBeige: "#FFFBF8";
|
|
1002
1002
|
readonly gold: "#8A7300";
|
|
1003
1003
|
readonly teal: "#027E97";
|
package/dist/themes/platform.js
CHANGED
|
@@ -7,7 +7,7 @@ import { coreTheme } from './core';
|
|
|
7
7
|
* That are not needed for the rest of the application.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export var platformTheme = createTheme(coreTheme).addColors(platformPalette).addColorModes('dark', {
|
|
11
11
|
light: {
|
|
12
12
|
editor: {
|
|
13
13
|
attribute: 'green-700',
|
package/dist/utilities/themed.js
CHANGED
|
@@ -191,3 +191,103 @@ export declare const platformPalette: {
|
|
|
191
191
|
readonly "teal-500": "#027E97";
|
|
192
192
|
readonly "purple-300": "#B3CCFF";
|
|
193
193
|
};
|
|
194
|
+
export declare const enterpriseSwatches: {
|
|
195
|
+
readonly blue: {
|
|
196
|
+
readonly '50': "#F0F8FE";
|
|
197
|
+
readonly '100': "#E0F2FE";
|
|
198
|
+
readonly '200': "#B7DDF8";
|
|
199
|
+
readonly '300': "#78BAE9";
|
|
200
|
+
readonly '400': "#3498DF";
|
|
201
|
+
readonly '500': "#0073C4";
|
|
202
|
+
readonly '600': "#005998";
|
|
203
|
+
readonly '700': "#00406C";
|
|
204
|
+
readonly '800': "#002640";
|
|
205
|
+
readonly '900': "#001626";
|
|
206
|
+
};
|
|
207
|
+
readonly gray: {
|
|
208
|
+
readonly '50': "#F3F5F7";
|
|
209
|
+
readonly '100': "#E1E6EA";
|
|
210
|
+
readonly '200': "#CAD4DC";
|
|
211
|
+
readonly '300': "#AAB8C1";
|
|
212
|
+
readonly '400': "#80919C";
|
|
213
|
+
readonly '500': "#6B7B85";
|
|
214
|
+
readonly '600': "#56646E";
|
|
215
|
+
readonly '700': "#404E58";
|
|
216
|
+
readonly '800': "#2B3841";
|
|
217
|
+
readonly '900': "#15222B";
|
|
218
|
+
};
|
|
219
|
+
readonly skyBlue: {
|
|
220
|
+
readonly '100': "#E6FAFF";
|
|
221
|
+
readonly '500': "#21B9E8";
|
|
222
|
+
};
|
|
223
|
+
readonly green: {
|
|
224
|
+
readonly '0': "#EBF6E4";
|
|
225
|
+
readonly '400': "#6EAB49";
|
|
226
|
+
readonly '500': "#42811A";
|
|
227
|
+
readonly '700': "#1D4C12";
|
|
228
|
+
};
|
|
229
|
+
readonly pink: {
|
|
230
|
+
readonly '100': "#FEE7F2";
|
|
231
|
+
readonly '400': "#DF659E";
|
|
232
|
+
readonly '500': "#CD397E";
|
|
233
|
+
};
|
|
234
|
+
readonly yellow: {
|
|
235
|
+
readonly '0': "#FEFAE8";
|
|
236
|
+
readonly '500': "#E8C427";
|
|
237
|
+
};
|
|
238
|
+
readonly orange: {
|
|
239
|
+
readonly '500': "#F2A036";
|
|
240
|
+
};
|
|
241
|
+
readonly red: {
|
|
242
|
+
readonly '0': "#FBE8E8";
|
|
243
|
+
readonly '100': "#F4C7C7";
|
|
244
|
+
readonly '500': "#BE3636";
|
|
245
|
+
readonly '600': "#932729";
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
export declare const enterprisePalette: {
|
|
249
|
+
readonly mulberryPink: "#CD397E";
|
|
250
|
+
readonly blue: "#3498DF";
|
|
251
|
+
readonly green: "#42811A";
|
|
252
|
+
readonly skyBlue: "#21B9E8";
|
|
253
|
+
readonly yellow: "#E8C427";
|
|
254
|
+
readonly red: "#BE3636";
|
|
255
|
+
readonly gray: "#6B7B85";
|
|
256
|
+
readonly black: "#000C14";
|
|
257
|
+
readonly "blue-100": "#E0F2FE";
|
|
258
|
+
readonly "blue-300": "#78BAE9";
|
|
259
|
+
readonly "blue-400": "#3498DF";
|
|
260
|
+
readonly "blue-500": "#0073C4";
|
|
261
|
+
readonly "blue-800": "#002640";
|
|
262
|
+
readonly "green-0": "#EBF6E4";
|
|
263
|
+
readonly "green-400": "#6EAB49";
|
|
264
|
+
readonly "green-700": "#1D4C12";
|
|
265
|
+
readonly "yellow-0": "#FEFAE8";
|
|
266
|
+
readonly "yellow-500": "#E8C427";
|
|
267
|
+
readonly "pink-400": "#DF659E";
|
|
268
|
+
readonly "red-0": "#FBE8E8";
|
|
269
|
+
readonly "red-100": "#F4C7C7";
|
|
270
|
+
readonly "red-500": "#BE3636";
|
|
271
|
+
readonly "red-600": "#932729";
|
|
272
|
+
readonly "orange-500": "#F2A036";
|
|
273
|
+
readonly "gray-100": "#E1E6EA";
|
|
274
|
+
readonly "gray-300": "#AAB8C1";
|
|
275
|
+
readonly "gray-800": "#2B3841";
|
|
276
|
+
readonly "gray-200": "#CAD4DC";
|
|
277
|
+
readonly "gray-600": "#56646E";
|
|
278
|
+
readonly "gray-900": "#15222B";
|
|
279
|
+
readonly "blue-200": "#B7DDF8";
|
|
280
|
+
readonly "blue-600": "#005998";
|
|
281
|
+
readonly "blue-700": "#00406C";
|
|
282
|
+
readonly "blue-900": "#001626";
|
|
283
|
+
readonly "blue-50": "#F0F8FE";
|
|
284
|
+
readonly "green-500": "#42811A";
|
|
285
|
+
readonly "pink-100": "#FEE7F2";
|
|
286
|
+
readonly "pink-500": "#CD397E";
|
|
287
|
+
readonly "gray-400": "#80919C";
|
|
288
|
+
readonly "gray-500": "#6B7B85";
|
|
289
|
+
readonly "gray-700": "#404E58";
|
|
290
|
+
readonly "gray-50": "#F3F5F7";
|
|
291
|
+
readonly "skyBlue-100": "#E6FAFF";
|
|
292
|
+
readonly "skyBlue-500": "#21B9E8";
|
|
293
|
+
};
|
package/dist/variables/colors.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
7
|
import { flattenScale } from '@codecademy/variance';
|
|
2
8
|
import { rgba } from 'polished';
|
|
3
9
|
/**
|
|
4
10
|
* Core Colors
|
|
5
11
|
*/
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
var black = '#000000';
|
|
14
|
+
var white = '#ffffff';
|
|
15
|
+
var navy = '#10162F';
|
|
16
|
+
var effects = {
|
|
11
17
|
shadow: {
|
|
12
18
|
black: {
|
|
13
19
|
slight: rgba(black, 0.15),
|
|
@@ -19,7 +25,7 @@ const effects = {
|
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
};
|
|
22
|
-
export
|
|
28
|
+
export var coreSwatches = {
|
|
23
29
|
beige: {
|
|
24
30
|
'100': '#FFF0E5'
|
|
25
31
|
},
|
|
@@ -88,7 +94,7 @@ export const coreSwatches = {
|
|
|
88
94
|
'700': rgba(white, 0.8)
|
|
89
95
|
}
|
|
90
96
|
};
|
|
91
|
-
export
|
|
97
|
+
export var trueColors = {
|
|
92
98
|
beige: coreSwatches.beige[100],
|
|
93
99
|
blue: coreSwatches.blue[500],
|
|
94
100
|
green: coreSwatches.green[700],
|
|
@@ -105,20 +111,16 @@ export const trueColors = {
|
|
|
105
111
|
paleRed: coreSwatches.red[100],
|
|
106
112
|
red: coreSwatches.red[500],
|
|
107
113
|
yellow: coreSwatches.yellow[500],
|
|
108
|
-
black,
|
|
109
|
-
white
|
|
110
|
-
};
|
|
111
|
-
export const corePalette = {
|
|
112
|
-
...flattenScale(coreSwatches),
|
|
113
|
-
...flattenScale(effects),
|
|
114
|
-
...trueColors
|
|
114
|
+
black: black,
|
|
115
|
+
white: white
|
|
115
116
|
};
|
|
117
|
+
export var corePalette = _objectSpread(_objectSpread(_objectSpread({}, flattenScale(coreSwatches)), flattenScale(effects)), trueColors);
|
|
116
118
|
|
|
117
119
|
/**
|
|
118
120
|
* Platform Colors
|
|
119
121
|
*/
|
|
120
122
|
|
|
121
|
-
export
|
|
123
|
+
export var platformSwatches = {
|
|
122
124
|
beige: {
|
|
123
125
|
'0': '#FFFBF8'
|
|
124
126
|
},
|
|
@@ -138,13 +140,81 @@ export const platformSwatches = {
|
|
|
138
140
|
'300': '#B3CCFF'
|
|
139
141
|
}
|
|
140
142
|
};
|
|
141
|
-
|
|
143
|
+
var truePlatformColors = {
|
|
142
144
|
lightBeige: platformSwatches.beige[0],
|
|
143
145
|
gold: platformSwatches.gold[800],
|
|
144
146
|
teal: platformSwatches.teal[500],
|
|
145
147
|
purple: platformSwatches.purple[300]
|
|
146
148
|
};
|
|
147
|
-
export
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
export var platformPalette = _objectSpread(_objectSpread({}, flattenScale(platformSwatches)), truePlatformColors);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Enterprise Colors
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
var enterpriseBlack = '#000C14';
|
|
156
|
+
export var enterpriseSwatches = {
|
|
157
|
+
blue: {
|
|
158
|
+
'50': '#F0F8FE',
|
|
159
|
+
'100': '#E0F2FE',
|
|
160
|
+
'200': '#B7DDF8',
|
|
161
|
+
'300': '#78BAE9',
|
|
162
|
+
'400': '#3498DF',
|
|
163
|
+
'500': '#0073C4',
|
|
164
|
+
'600': '#005998',
|
|
165
|
+
'700': '#00406C',
|
|
166
|
+
'800': '#002640',
|
|
167
|
+
'900': '#001626'
|
|
168
|
+
},
|
|
169
|
+
gray: {
|
|
170
|
+
'50': '#F3F5F7',
|
|
171
|
+
'100': '#E1E6EA',
|
|
172
|
+
'200': '#CAD4DC',
|
|
173
|
+
'300': '#AAB8C1',
|
|
174
|
+
'400': '#80919C',
|
|
175
|
+
'500': '#6B7B85',
|
|
176
|
+
'600': '#56646E',
|
|
177
|
+
'700': '#404E58',
|
|
178
|
+
'800': '#2B3841',
|
|
179
|
+
'900': '#15222B'
|
|
180
|
+
},
|
|
181
|
+
skyBlue: {
|
|
182
|
+
'100': '#E6FAFF',
|
|
183
|
+
'500': '#21B9E8'
|
|
184
|
+
},
|
|
185
|
+
green: {
|
|
186
|
+
'0': '#EBF6E4',
|
|
187
|
+
'400': '#6EAB49',
|
|
188
|
+
'500': '#42811A',
|
|
189
|
+
'700': '#1D4C12'
|
|
190
|
+
},
|
|
191
|
+
pink: {
|
|
192
|
+
'100': '#FEE7F2',
|
|
193
|
+
'400': '#DF659E',
|
|
194
|
+
'500': '#CD397E'
|
|
195
|
+
},
|
|
196
|
+
yellow: {
|
|
197
|
+
'0': '#FEFAE8',
|
|
198
|
+
'500': '#E8C427'
|
|
199
|
+
},
|
|
200
|
+
orange: {
|
|
201
|
+
'500': '#F2A036'
|
|
202
|
+
},
|
|
203
|
+
red: {
|
|
204
|
+
'0': '#FBE8E8',
|
|
205
|
+
'100': '#F4C7C7',
|
|
206
|
+
'500': '#BE3636',
|
|
207
|
+
'600': '#932729'
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
var trueEnterpriseColors = {
|
|
211
|
+
mulberryPink: enterpriseSwatches.pink[500],
|
|
212
|
+
blue: enterpriseSwatches.blue[400],
|
|
213
|
+
green: enterpriseSwatches.green[500],
|
|
214
|
+
skyBlue: enterpriseSwatches.skyBlue[500],
|
|
215
|
+
yellow: enterpriseSwatches.yellow[500],
|
|
216
|
+
red: enterpriseSwatches.red[500],
|
|
217
|
+
gray: enterpriseSwatches.gray[500],
|
|
218
|
+
black: enterpriseBlack
|
|
219
|
+
};
|
|
220
|
+
export var enterprisePalette = _objectSpread(_objectSpread({}, flattenScale(enterpriseSwatches)), trueEnterpriseColors);
|
|
@@ -149,8 +149,8 @@ export declare const colors: {
|
|
|
149
149
|
readonly "gray-900": "#19191a";
|
|
150
150
|
readonly "beige-0": "#FFF0E5";
|
|
151
151
|
readonly "blue-900": "#10162f";
|
|
152
|
-
readonly "gray-0": "#ffffff";
|
|
153
152
|
readonly "gray-400": "#a2a2a6";
|
|
154
153
|
readonly "gray-500": "#828285";
|
|
155
154
|
readonly "gray-700": "#4b4b4d";
|
|
155
|
+
readonly "gray-0": "#ffffff";
|
|
156
156
|
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
7
|
import { flattenScale } from '@codecademy/variance';
|
|
2
8
|
import { corePalette } from './colors';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
white
|
|
6
|
-
} = corePalette;
|
|
7
|
-
|
|
9
|
+
var black = corePalette.black,
|
|
10
|
+
white = corePalette.white;
|
|
8
11
|
/**
|
|
9
12
|
* @deprecated
|
|
10
13
|
* Using these variables directly is no longer supported.
|
|
11
14
|
*
|
|
12
15
|
* Please use [`theme.colors`](https://gamut.codecademy.com/storybook/?path=/docs/foundations-theme--colors#standard-colors)
|
|
13
16
|
*/
|
|
14
|
-
|
|
15
|
-
export const interactiveColors = {
|
|
17
|
+
export var interactiveColors = {
|
|
16
18
|
dark: corePalette.hyper,
|
|
17
19
|
light: corePalette.yellow
|
|
18
20
|
};
|
|
@@ -24,7 +26,7 @@ export const interactiveColors = {
|
|
|
24
26
|
* Please use [`theme.colors`](https://gamut.codecademy.com/storybook/?path=/docs/foundations-theme--colors#standard-colors)
|
|
25
27
|
*/
|
|
26
28
|
|
|
27
|
-
export
|
|
29
|
+
export var editorColors = {
|
|
28
30
|
blue: '#83fff5',
|
|
29
31
|
deepPurple: '#cc7bc2',
|
|
30
32
|
gray: '#939598',
|
|
@@ -42,7 +44,7 @@ export const editorColors = {
|
|
|
42
44
|
* Please use [`theme.colors`](https://gamut.codecademy.com/storybook/?path=/docs/foundations-theme--colors#standard-colors)
|
|
43
45
|
*/
|
|
44
46
|
|
|
45
|
-
export
|
|
47
|
+
export var platformColors = {
|
|
46
48
|
mint: {
|
|
47
49
|
'500': '#37c3be',
|
|
48
50
|
'600': '#2c9c98',
|
|
@@ -67,7 +69,7 @@ export const platformColors = {
|
|
|
67
69
|
* Please use [`theme.colors`](https://gamut.codecademy.com/storybook/?path=/docs/foundations-theme--colors#standard-colors)
|
|
68
70
|
*/
|
|
69
71
|
|
|
70
|
-
export
|
|
72
|
+
export var swatches = {
|
|
71
73
|
beige: {
|
|
72
74
|
'0': '#FFF0E5'
|
|
73
75
|
},
|
|
@@ -123,7 +125,7 @@ export const swatches = {
|
|
|
123
125
|
* Please use [`theme.colors`](https://gamut.codecademy.com/storybook/?path=/docs/foundations-theme--colors#standard-colors)
|
|
124
126
|
*/
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
var trueColors = {
|
|
127
129
|
beige: swatches.beige[0],
|
|
128
130
|
blue: swatches.blue[500],
|
|
129
131
|
green: swatches.green[700],
|
|
@@ -139,8 +141,8 @@ const trueColors = {
|
|
|
139
141
|
pink: swatches.pink[400],
|
|
140
142
|
red: swatches.red[500],
|
|
141
143
|
yellow: swatches.yellow[500],
|
|
142
|
-
black,
|
|
143
|
-
white
|
|
144
|
+
black: black,
|
|
145
|
+
white: white
|
|
144
146
|
};
|
|
145
147
|
|
|
146
148
|
/**
|
|
@@ -150,7 +152,4 @@ const trueColors = {
|
|
|
150
152
|
* Please use [`theme.colors`](https://gamut.codecademy.com/storybook/?path=/docs/foundations-theme--colors#standard-colors)
|
|
151
153
|
*/
|
|
152
154
|
|
|
153
|
-
export
|
|
154
|
-
...flattenScale(swatches),
|
|
155
|
-
...trueColors
|
|
156
|
-
};
|
|
155
|
+
export var colors = _objectSpread(_objectSpread({}, flattenScale(swatches)), trueColors);
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var breakpoints = {
|
|
2
2
|
xs: '480px',
|
|
3
3
|
sm: '768px',
|
|
4
4
|
md: '1024px',
|
|
5
5
|
lg: '1200px',
|
|
6
6
|
xl: '1440px'
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
var createMediaQuery = function createMediaQuery(size, direction) {
|
|
9
|
+
return "@media only screen and (".concat(direction, "-width: ").concat(breakpoints[size], ")");
|
|
10
|
+
};
|
|
11
|
+
export var mediaQueries = {
|
|
10
12
|
xs: createMediaQuery('xs', 'min'),
|
|
11
13
|
sm: createMediaQuery('sm', 'min'),
|
|
12
14
|
md: createMediaQuery('md', 'min'),
|
|
13
15
|
lg: createMediaQuery('lg', 'min'),
|
|
14
16
|
xl: createMediaQuery('xl', 'min')
|
|
15
17
|
};
|
|
16
|
-
export
|
|
18
|
+
export var contentWidths = {
|
|
17
19
|
md: breakpoints.lg,
|
|
18
20
|
max: breakpoints.xl
|
|
19
21
|
};
|
package/dist/variables/timing.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var timingValues = {
|
|
2
2
|
fast: 150,
|
|
3
3
|
medium: 200,
|
|
4
4
|
base: 300,
|
|
5
5
|
slow: 350
|
|
6
6
|
};
|
|
7
|
-
export
|
|
8
|
-
fast:
|
|
9
|
-
medium:
|
|
10
|
-
base:
|
|
11
|
-
slow:
|
|
7
|
+
export var timing = {
|
|
8
|
+
fast: "".concat(timingValues.fast, "ms"),
|
|
9
|
+
medium: "".concat(timingValues.medium, "ms"),
|
|
10
|
+
base: "".concat(timingValues.base, "ms"),
|
|
11
|
+
slow: "".concat(timingValues.slow, "ms")
|
|
12
12
|
};
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import { pxRem } from '../styles/pxRem';
|
|
2
|
-
export
|
|
3
|
-
"Segoe UI"
|
|
4
|
-
"
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
sans-serif`;
|
|
8
|
-
export const fontMonospace = `Monaco, Menlo, "Ubuntu Mono", "Droid Sans Mono", Consolas,
|
|
9
|
-
monospace`;
|
|
10
|
-
export const fontSystem = `-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Ubuntu",
|
|
11
|
-
"Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif`;
|
|
12
|
-
export const fontFamily = {
|
|
2
|
+
export var fontAccent = "\"Suisse\", \"Apercu\", -apple-system, BlinkMacSystemFont,\n\"Segoe UI\", \"Roboto\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\",\n\"Helvetica Neue\", sans-serif";
|
|
3
|
+
export var fontBase = "\"Apercu\", -apple-system, BlinkMacSystemFont, \"Segoe UI\",\n\"Roboto\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\",\nsans-serif";
|
|
4
|
+
export var fontMonospace = "Monaco, Menlo, \"Ubuntu Mono\", \"Droid Sans Mono\", Consolas,\nmonospace";
|
|
5
|
+
export var fontSystem = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Ubuntu\",\n\"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif";
|
|
6
|
+
export var fontFamily = {
|
|
13
7
|
accent: fontAccent,
|
|
14
8
|
base: fontBase,
|
|
15
9
|
monospace: fontMonospace,
|
|
16
10
|
system: fontSystem
|
|
17
11
|
};
|
|
18
|
-
export
|
|
12
|
+
export var fontSize = {
|
|
19
13
|
64: pxRem(64),
|
|
20
14
|
44: pxRem(44),
|
|
21
15
|
34: pxRem(34),
|
|
@@ -26,12 +20,12 @@ export const fontSize = {
|
|
|
26
20
|
16: pxRem(16),
|
|
27
21
|
14: pxRem(14)
|
|
28
22
|
};
|
|
29
|
-
export
|
|
23
|
+
export var lineHeight = {
|
|
30
24
|
base: 1.5,
|
|
31
25
|
spacedTitle: 1.3,
|
|
32
26
|
title: 1.2
|
|
33
27
|
};
|
|
34
|
-
export
|
|
28
|
+
export var fontWeight = {
|
|
35
29
|
base: 400,
|
|
36
30
|
title: 700,
|
|
37
31
|
700: 700,
|