@instructure/ui-theme-tokens 9.5.2-snapshot-1 → 10.0.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +11 -2
  2. package/es/canvas/colors.js +33 -17
  3. package/es/canvasHighContrast/colors.js +33 -17
  4. package/es/{instructure/forms.js → common/colors/index.js} +5 -7
  5. package/es/{instructure/index.js → common/colors/primitves.js} +36 -13
  6. package/es/index.js +2 -3
  7. package/es/utils/getUIColors.js +48 -0
  8. package/lib/canvas/colors.js +34 -17
  9. package/lib/canvasHighContrast/colors.js +34 -17
  10. package/lib/{instructure/forms.js → common/colors/index.js} +7 -7
  11. package/lib/{instructure/index.js → common/colors/primitves.js} +37 -13
  12. package/lib/index.js +4 -10
  13. package/lib/utils/getUIColors.js +55 -0
  14. package/package.json +5 -5
  15. package/src/canvas/colors.ts +38 -19
  16. package/src/canvasHighContrast/colors.ts +37 -19
  17. package/src/{instructure/forms.ts → common/colors/index.ts} +5 -8
  18. package/src/{instructure/index.ts → common/colors/primitves.ts} +43 -14
  19. package/src/index.ts +2 -3
  20. package/src/{instructure/spacing.ts → utils/getUIColors.ts} +27 -13
  21. package/tokens/canvas/scss/_variables.scss +0 -49
  22. package/tokens/canvas/source.json +1 -1
  23. package/tokens/canvas-high-contrast/scss/_variables.scss +0 -49
  24. package/tokens/canvas-high-contrast/source.json +1 -1
  25. package/tsconfig.build.tsbuildinfo +1 -1
  26. package/types/canvas/colors.d.ts +1 -1
  27. package/types/canvas/colors.d.ts.map +1 -1
  28. package/types/canvasHighContrast/colors.d.ts +6 -2
  29. package/types/canvasHighContrast/colors.d.ts.map +1 -1
  30. package/types/canvasHighContrast/index.d.ts +5 -1
  31. package/types/canvasHighContrast/index.d.ts.map +1 -1
  32. package/types/common/colors/index.d.ts +5 -0
  33. package/types/common/colors/index.d.ts.map +1 -0
  34. package/types/common/colors/primitves.d.ts +4 -0
  35. package/types/common/colors/primitves.d.ts.map +1 -0
  36. package/types/index.d.ts +2 -3
  37. package/types/index.d.ts.map +1 -1
  38. package/types/utils/getUIColors.d.ts +4 -0
  39. package/types/utils/getUIColors.d.ts.map +1 -0
  40. package/es/instructure/colors.js +0 -56
  41. package/es/instructure/spacing.js +0 -37
  42. package/es/instructure/typography.js +0 -49
  43. package/es/utils/functionalColors.js +0 -79
  44. package/lib/instructure/colors.js +0 -61
  45. package/lib/instructure/spacing.js +0 -42
  46. package/lib/instructure/typography.js +0 -54
  47. package/lib/utils/functionalColors.js +0 -85
  48. package/src/instructure/colors.ts +0 -66
  49. package/src/instructure/typography.ts +0 -57
  50. package/src/utils/functionalColors.ts +0 -90
  51. package/tokens/instructure/scss/_variables.scss +0 -115
  52. package/tokens/instructure/source.json +0 -1
  53. package/types/instructure/colors.d.ts +0 -12
  54. package/types/instructure/colors.d.ts.map +0 -1
  55. package/types/instructure/forms.d.ts +0 -5
  56. package/types/instructure/forms.d.ts.map +0 -1
  57. package/types/instructure/index.d.ts +0 -18
  58. package/types/instructure/index.d.ts.map +0 -1
  59. package/types/instructure/spacing.d.ts +0 -5
  60. package/types/instructure/spacing.d.ts.map +0 -1
  61. package/types/instructure/typography.d.ts +0 -5
  62. package/types/instructure/typography.d.ts.map +0 -1
  63. package/types/utils/functionalColors.d.ts +0 -5
  64. package/types/utils/functionalColors.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getUIColors.d.ts","sourceRoot":"","sources":["../../src/utils/getUIColors.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,2BAA2B,CAAA;AAE9D,eAAO,MAAM,WAAW,cAAe,SAAS,KAAG,EAyBjD,CAAA;AAEF,eAAe,WAAW,CAAA"}
@@ -1,56 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import { functionalColors } from '../utils/functionalColors';
26
- const values = {
27
- brand: '#287A9F',
28
- link: '#287A9F',
29
- electric: '#287A9F',
30
- shamrock: '#24A159',
31
- barney: '#143D50',
32
- crimson: '#E72429',
33
- fire: '#F76400',
34
- licorice: '#0D323F',
35
- oxford: '#143D50',
36
- ash: '#156380',
37
- slate: '#156380',
38
- tiara: '#CCDCE4',
39
- porcelain: '#F2F8FA',
40
- white: '#FFFFFF'
41
- };
42
-
43
- /**
44
- * Two Inst colors are not accessible, so adding them for display purposes only in decorative elements
45
- */
46
-
47
- // Two Inst colors are not accessible, so adding them for display purposes only
48
- // in decorative elements
49
- const appendInaccessibleColors = {
50
- ...functionalColors(values),
51
- inaccessibleAlert: '#fccb0e',
52
- inaccessibleWarning: '#f68e1f'
53
- };
54
- const colors = Object.freeze(appendInaccessibleColors);
55
- export default colors;
56
- export { colors };
@@ -1,37 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- const spacing = Object.freeze({
26
- xxxSmall: '0.125rem',
27
- xxSmall: '0.375rem',
28
- xSmall: '0.75rem',
29
- small: '1rem',
30
- mediumSmall: '1.25rem',
31
- medium: '1.5rem',
32
- large: '2.25rem',
33
- xLarge: '3rem',
34
- xxLarge: '3.75rem'
35
- });
36
- export default spacing;
37
- export { spacing };
@@ -1,49 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- const typography = Object.freeze({
26
- fontFamily: `"Proxima Nova", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
27
- "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
28
- "Helvetica Neue", sans-serif`,
29
- fontFamilyMonospace: 'Menlo, Consolas, Monaco, "Andale Mono", monospace',
30
- fontFamilyHeading: `"TiemposHeadlineWebBold", "Georgia", "Proxima Nova", sans-serif`,
31
- fontSizeXSmall: '0.75rem',
32
- fontSizeSmall: '0.875rem',
33
- fontSizeMedium: '1rem',
34
- fontSizeLarge: '1.25rem',
35
- fontSizeXLarge: '2.25rem',
36
- fontSizeXXLarge: '3rem',
37
- fontWeightLight: 300,
38
- fontWeightNormal: 400,
39
- fontWeightBold: 700,
40
- lineHeight: 1.5,
41
- lineHeightFit: 1.125,
42
- lineHeightCondensed: 1.25,
43
- lineHeightDouble: 2,
44
- letterSpacingNormal: 0,
45
- letterSpacingCondensed: '-0.0625rem',
46
- letterSpacingExpanded: '0.0625rem'
47
- });
48
- export default typography;
49
- export { typography };
@@ -1,79 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- function functionalColors(colors) {
26
- const text = {
27
- textDarkest: colors.licorice,
28
- textDark: colors.ash,
29
- textLight: colors.porcelain,
30
- textLightest: colors.white,
31
- textBrand: colors.brand,
32
- textLink: colors.link,
33
- textAlert: colors.barney,
34
- textInfo: colors.brand,
35
- textSuccess: colors.shamrock,
36
- textDanger: colors.crimson,
37
- textWarning: colors.fire
38
- };
39
- const background = {
40
- backgroundDarkest: colors.licorice,
41
- backgroundDark: colors.ash,
42
- backgroundMedium: colors.tiara,
43
- backgroundLight: colors.porcelain,
44
- backgroundLightest: colors.white,
45
- backgroundBrand: colors.brand,
46
- backgroundBrandSecondary: colors.oxford,
47
- backgroundAlert: colors.barney,
48
- backgroundInfo: colors.brand,
49
- backgroundSuccess: colors.shamrock,
50
- backgroundDanger: colors.crimson,
51
- backgroundWarning: colors.fire
52
- };
53
- const border = {
54
- borderLightest: colors.white,
55
- borderLight: colors.porcelain,
56
- borderMedium: colors.tiara,
57
- borderDark: colors.ash,
58
- borderDarkest: colors.licorice,
59
- borderBrand: colors.brand,
60
- borderAlert: colors.barney,
61
- borderInfo: colors.brand,
62
- borderSuccess: colors.shamrock,
63
- borderDanger: colors.crimson,
64
- borderWarning: colors.fire,
65
- borderDebug: colors.crimson
66
- };
67
- return {
68
- ...colors,
69
- ...text,
70
- ...background,
71
- ...border,
72
- values: colors,
73
- text: text,
74
- background: background,
75
- border: border
76
- };
77
- }
78
- export default functionalColors;
79
- export { functionalColors };
@@ -1,61 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.colors = void 0;
7
- var _functionalColors = require("../utils/functionalColors");
8
- /*
9
- * The MIT License (MIT)
10
- *
11
- * Copyright (c) 2015 - present Instructure, Inc.
12
- *
13
- * Permission is hereby granted, free of charge, to any person obtaining a copy
14
- * of this software and associated documentation files (the "Software"), to deal
15
- * in the Software without restriction, including without limitation the rights
16
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
- * copies of the Software, and to permit persons to whom the Software is
18
- * furnished to do so, subject to the following conditions:
19
- *
20
- * The above copyright notice and this permission notice shall be included in all
21
- * copies or substantial portions of the Software.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- * SOFTWARE.
30
- */
31
-
32
- const values = {
33
- brand: '#287A9F',
34
- link: '#287A9F',
35
- electric: '#287A9F',
36
- shamrock: '#24A159',
37
- barney: '#143D50',
38
- crimson: '#E72429',
39
- fire: '#F76400',
40
- licorice: '#0D323F',
41
- oxford: '#143D50',
42
- ash: '#156380',
43
- slate: '#156380',
44
- tiara: '#CCDCE4',
45
- porcelain: '#F2F8FA',
46
- white: '#FFFFFF'
47
- };
48
-
49
- /**
50
- * Two Inst colors are not accessible, so adding them for display purposes only in decorative elements
51
- */
52
-
53
- // Two Inst colors are not accessible, so adding them for display purposes only
54
- // in decorative elements
55
- const appendInaccessibleColors = {
56
- ...(0, _functionalColors.functionalColors)(values),
57
- inaccessibleAlert: '#fccb0e',
58
- inaccessibleWarning: '#f68e1f'
59
- };
60
- const colors = exports.colors = Object.freeze(appendInaccessibleColors);
61
- var _default = exports.default = colors;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.spacing = exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- const spacing = exports.spacing = Object.freeze({
32
- xxxSmall: '0.125rem',
33
- xxSmall: '0.375rem',
34
- xSmall: '0.75rem',
35
- small: '1rem',
36
- mediumSmall: '1.25rem',
37
- medium: '1.5rem',
38
- large: '2.25rem',
39
- xLarge: '3rem',
40
- xxLarge: '3.75rem'
41
- });
42
- var _default = exports.default = spacing;
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.typography = exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- const typography = exports.typography = Object.freeze({
32
- fontFamily: `"Proxima Nova", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
33
- "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
34
- "Helvetica Neue", sans-serif`,
35
- fontFamilyMonospace: 'Menlo, Consolas, Monaco, "Andale Mono", monospace',
36
- fontFamilyHeading: `"TiemposHeadlineWebBold", "Georgia", "Proxima Nova", sans-serif`,
37
- fontSizeXSmall: '0.75rem',
38
- fontSizeSmall: '0.875rem',
39
- fontSizeMedium: '1rem',
40
- fontSizeLarge: '1.25rem',
41
- fontSizeXLarge: '2.25rem',
42
- fontSizeXXLarge: '3rem',
43
- fontWeightLight: 300,
44
- fontWeightNormal: 400,
45
- fontWeightBold: 700,
46
- lineHeight: 1.5,
47
- lineHeightFit: 1.125,
48
- lineHeightCondensed: 1.25,
49
- lineHeightDouble: 2,
50
- letterSpacingNormal: 0,
51
- letterSpacingCondensed: '-0.0625rem',
52
- letterSpacingExpanded: '0.0625rem'
53
- });
54
- var _default = exports.default = typography;
@@ -1,85 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- exports.functionalColors = functionalColors;
8
- /*
9
- * The MIT License (MIT)
10
- *
11
- * Copyright (c) 2015 - present Instructure, Inc.
12
- *
13
- * Permission is hereby granted, free of charge, to any person obtaining a copy
14
- * of this software and associated documentation files (the "Software"), to deal
15
- * in the Software without restriction, including without limitation the rights
16
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
- * copies of the Software, and to permit persons to whom the Software is
18
- * furnished to do so, subject to the following conditions:
19
- *
20
- * The above copyright notice and this permission notice shall be included in all
21
- * copies or substantial portions of the Software.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- * SOFTWARE.
30
- */
31
-
32
- function functionalColors(colors) {
33
- const text = {
34
- textDarkest: colors.licorice,
35
- textDark: colors.ash,
36
- textLight: colors.porcelain,
37
- textLightest: colors.white,
38
- textBrand: colors.brand,
39
- textLink: colors.link,
40
- textAlert: colors.barney,
41
- textInfo: colors.brand,
42
- textSuccess: colors.shamrock,
43
- textDanger: colors.crimson,
44
- textWarning: colors.fire
45
- };
46
- const background = {
47
- backgroundDarkest: colors.licorice,
48
- backgroundDark: colors.ash,
49
- backgroundMedium: colors.tiara,
50
- backgroundLight: colors.porcelain,
51
- backgroundLightest: colors.white,
52
- backgroundBrand: colors.brand,
53
- backgroundBrandSecondary: colors.oxford,
54
- backgroundAlert: colors.barney,
55
- backgroundInfo: colors.brand,
56
- backgroundSuccess: colors.shamrock,
57
- backgroundDanger: colors.crimson,
58
- backgroundWarning: colors.fire
59
- };
60
- const border = {
61
- borderLightest: colors.white,
62
- borderLight: colors.porcelain,
63
- borderMedium: colors.tiara,
64
- borderDark: colors.ash,
65
- borderDarkest: colors.licorice,
66
- borderBrand: colors.brand,
67
- borderAlert: colors.barney,
68
- borderInfo: colors.brand,
69
- borderSuccess: colors.shamrock,
70
- borderDanger: colors.crimson,
71
- borderWarning: colors.fire,
72
- borderDebug: colors.crimson
73
- };
74
- return {
75
- ...colors,
76
- ...text,
77
- ...background,
78
- ...border,
79
- values: colors,
80
- text: text,
81
- background: background,
82
- border: border
83
- };
84
- }
85
- var _default = exports.default = functionalColors;
@@ -1,66 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import { functionalColors } from '../utils/functionalColors'
26
- import { BaseColors, Colors } from '@instructure/shared-types'
27
-
28
- const values: BaseColors = {
29
- brand: '#287A9F',
30
- link: '#287A9F',
31
- electric: '#287A9F',
32
- shamrock: '#24A159',
33
- barney: '#143D50',
34
- crimson: '#E72429',
35
- fire: '#F76400',
36
- licorice: '#0D323F',
37
- oxford: '#143D50',
38
- ash: '#156380',
39
- slate: '#156380',
40
- tiara: '#CCDCE4',
41
- porcelain: '#F2F8FA',
42
- white: '#FFFFFF'
43
- }
44
-
45
- /**
46
- * Two Inst colors are not accessible, so adding them for display purposes only in decorative elements
47
- */
48
- type InaccessibleColors = {
49
- inaccessibleAlert: string
50
- inaccessibleWarning: string
51
- }
52
-
53
- // Two Inst colors are not accessible, so adding them for display purposes only
54
- // in decorative elements
55
- const appendInaccessibleColors: Colors & InaccessibleColors = {
56
- ...functionalColors(values),
57
- inaccessibleAlert: '#fccb0e',
58
- inaccessibleWarning: '#f68e1f'
59
- }
60
-
61
- const colors: Colors & InaccessibleColors = Object.freeze(
62
- appendInaccessibleColors
63
- )
64
-
65
- export default colors
66
- export { colors }
@@ -1,57 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
-
25
- import { Typography } from '@instructure/shared-types'
26
-
27
- const typography: Typography = Object.freeze({
28
- fontFamily: `"Proxima Nova", "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
29
- "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
30
- "Helvetica Neue", sans-serif`,
31
- fontFamilyMonospace: 'Menlo, Consolas, Monaco, "Andale Mono", monospace',
32
- fontFamilyHeading: `"TiemposHeadlineWebBold", "Georgia", "Proxima Nova", sans-serif`,
33
-
34
- fontSizeXSmall: '0.75rem',
35
- fontSizeSmall: '0.875rem',
36
- fontSizeMedium: '1rem',
37
-
38
- fontSizeLarge: '1.25rem',
39
- fontSizeXLarge: '2.25rem',
40
- fontSizeXXLarge: '3rem',
41
-
42
- fontWeightLight: 300,
43
- fontWeightNormal: 400,
44
- fontWeightBold: 700,
45
-
46
- lineHeight: 1.5,
47
- lineHeightFit: 1.125,
48
- lineHeightCondensed: 1.25,
49
- lineHeightDouble: 2,
50
-
51
- letterSpacingNormal: 0,
52
- letterSpacingCondensed: '-0.0625rem',
53
- letterSpacingExpanded: '0.0625rem'
54
- } as const)
55
-
56
- export default typography
57
- export { typography }
@@ -1,90 +0,0 @@
1
- /*
2
- * The MIT License (MIT)
3
- *
4
- * Copyright (c) 2015 - present Instructure, Inc.
5
- *
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to deal
8
- * in the Software without restriction, including without limitation the rights
9
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- * copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in all
14
- * copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- * SOFTWARE.
23
- */
24
- import {
25
- BackgroundColors,
26
- BaseColors,
27
- BorderColors,
28
- Colors,
29
- TextColors
30
- } from '@instructure/shared-types'
31
-
32
- function functionalColors(colors: BaseColors): Colors {
33
- const text: TextColors = {
34
- textDarkest: colors.licorice,
35
- textDark: colors.ash,
36
- textLight: colors.porcelain,
37
- textLightest: colors.white,
38
- textBrand: colors.brand,
39
- textLink: colors.link,
40
- textAlert: colors.barney,
41
- textInfo: colors.brand,
42
- textSuccess: colors.shamrock,
43
- textDanger: colors.crimson,
44
- textWarning: colors.fire
45
- }
46
-
47
- const background: BackgroundColors = {
48
- backgroundDarkest: colors.licorice,
49
- backgroundDark: colors.ash,
50
- backgroundMedium: colors.tiara,
51
- backgroundLight: colors.porcelain,
52
- backgroundLightest: colors.white,
53
- backgroundBrand: colors.brand,
54
- backgroundBrandSecondary: colors.oxford,
55
- backgroundAlert: colors.barney,
56
- backgroundInfo: colors.brand,
57
- backgroundSuccess: colors.shamrock,
58
- backgroundDanger: colors.crimson,
59
- backgroundWarning: colors.fire
60
- }
61
-
62
- const border: BorderColors = {
63
- borderLightest: colors.white,
64
- borderLight: colors.porcelain,
65
- borderMedium: colors.tiara,
66
- borderDark: colors.ash,
67
- borderDarkest: colors.licorice,
68
- borderBrand: colors.brand,
69
- borderAlert: colors.barney,
70
- borderInfo: colors.brand,
71
- borderSuccess: colors.shamrock,
72
- borderDanger: colors.crimson,
73
- borderWarning: colors.fire,
74
- borderDebug: colors.crimson
75
- }
76
-
77
- return {
78
- ...colors,
79
- ...text,
80
- ...background,
81
- ...border,
82
- values: colors,
83
- text: text,
84
- background: background,
85
- border: border
86
- }
87
- }
88
-
89
- export default functionalColors
90
- export { functionalColors }