@instructure/ui-theme-tokens 9.5.2-snapshot-7 → 9.5.2

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 +2 -11
  2. package/es/canvas/colors.js +17 -33
  3. package/es/canvasHighContrast/colors.js +17 -33
  4. package/es/index.js +3 -2
  5. package/es/instructure/colors.js +56 -0
  6. package/es/{common/colors/index.js → instructure/forms.js} +7 -5
  7. package/es/{common/colors/primitves.js → instructure/index.js} +13 -36
  8. package/es/instructure/spacing.js +37 -0
  9. package/es/instructure/typography.js +49 -0
  10. package/es/utils/functionalColors.js +79 -0
  11. package/lib/canvas/colors.js +17 -34
  12. package/lib/canvasHighContrast/colors.js +17 -34
  13. package/lib/index.js +10 -4
  14. package/lib/instructure/colors.js +61 -0
  15. package/lib/{common/colors/index.js → instructure/forms.js} +7 -7
  16. package/lib/{common/colors/primitves.js → instructure/index.js} +13 -37
  17. package/lib/instructure/spacing.js +42 -0
  18. package/lib/instructure/typography.js +54 -0
  19. package/lib/utils/functionalColors.js +85 -0
  20. package/package.json +5 -5
  21. package/src/canvas/colors.ts +19 -38
  22. package/src/canvasHighContrast/colors.ts +19 -37
  23. package/src/index.ts +3 -2
  24. package/src/{utils/getUIColors.ts → instructure/colors.ts} +37 -25
  25. package/src/{common/colors/index.ts → instructure/forms.ts} +8 -5
  26. package/src/instructure/index.ts +40 -0
  27. package/src/instructure/spacing.ts +40 -0
  28. package/src/{common/colors/primitves.ts → instructure/typography.ts} +33 -45
  29. package/src/utils/functionalColors.ts +90 -0
  30. package/tokens/canvas/scss/_variables.scss +49 -0
  31. package/tokens/canvas/source.json +1 -1
  32. package/tokens/canvas-high-contrast/scss/_variables.scss +49 -0
  33. package/tokens/canvas-high-contrast/source.json +1 -1
  34. package/tokens/instructure/scss/_variables.scss +115 -0
  35. package/tokens/instructure/source.json +1 -0
  36. package/tsconfig.build.tsbuildinfo +1 -1
  37. package/types/canvas/colors.d.ts +1 -1
  38. package/types/canvas/colors.d.ts.map +1 -1
  39. package/types/canvasHighContrast/colors.d.ts +2 -6
  40. package/types/canvasHighContrast/colors.d.ts.map +1 -1
  41. package/types/canvasHighContrast/index.d.ts +1 -5
  42. package/types/canvasHighContrast/index.d.ts.map +1 -1
  43. package/types/index.d.ts +3 -2
  44. package/types/index.d.ts.map +1 -1
  45. package/types/instructure/colors.d.ts +12 -0
  46. package/types/instructure/colors.d.ts.map +1 -0
  47. package/types/instructure/forms.d.ts +5 -0
  48. package/types/instructure/forms.d.ts.map +1 -0
  49. package/types/instructure/index.d.ts +18 -0
  50. package/types/instructure/index.d.ts.map +1 -0
  51. package/types/instructure/spacing.d.ts +5 -0
  52. package/types/instructure/spacing.d.ts.map +1 -0
  53. package/types/instructure/typography.d.ts +5 -0
  54. package/types/instructure/typography.d.ts.map +1 -0
  55. package/types/utils/functionalColors.d.ts +5 -0
  56. package/types/utils/functionalColors.d.ts.map +1 -0
  57. package/es/utils/getUIColors.js +0 -48
  58. package/lib/utils/getUIColors.js +0 -55
  59. package/types/common/colors/index.d.ts +0 -5
  60. package/types/common/colors/index.d.ts.map +0 -1
  61. package/types/common/colors/primitves.d.ts +0 -4
  62. package/types/common/colors/primitves.d.ts.map +0 -1
  63. package/types/utils/getUIColors.d.ts +0 -4
  64. package/types/utils/getUIColors.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,18 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [9.5.2-snapshot-7](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2-snapshot-7) (2024-07-31)
6
+ ## [9.5.2](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2) (2024-08-05)
7
7
 
8
-
9
- ### Features
10
-
11
- * **many:** rewrite color system ([1e5809e](https://github.com/instructure/instructure-ui/commit/1e5809e28dee8c2a71703a429609b8d2f95d76e6))
12
- * **shared-types,ui-theme-tokens:** add transparent colors to the palette ([7219606](https://github.com/instructure/instructure-ui/commit/7219606144114fd4bf4048177dfe31ee81de76d9))
13
-
14
-
15
- ### BREAKING CHANGES
16
-
17
- * **many:** Breaks color overrides in certain cases
8
+ **Note:** Version bump only for package @instructure/ui-theme-tokens
18
9
 
19
10
 
20
11
 
@@ -22,39 +22,23 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import primitives from '../common/colors/primitves';
26
- import getUIColors from '../utils/getUIColors';
27
- const contrasts = {
28
- white1010: primitives.white,
29
- white1010op75: primitives.white10op75,
30
- grey1111: primitives.grey11,
31
- grey1214: primitives.grey12,
32
- grey1424: primitives.grey14,
33
- grey2424: primitives.grey24,
34
- grey4570: primitives.grey45,
35
- grey5782: primitives.grey57,
36
- grey100100: primitives.grey100,
37
- grey100100op75: primitives.grey100op75,
38
- grey125125: primitives.grey125,
39
- blue1212: primitives.blue12,
40
- blue4570: primitives.blue45,
41
- blue5782: primitives.blue57,
42
- green1212: primitives.green12,
43
- green4570: primitives.green45,
44
- green5782: primitives.green57,
45
- orange1212: primitives.orange12,
46
- orange3045: primitives.orange30,
47
- orange4570: primitives.orange45,
48
- orange5782: primitives.orange57,
49
- red1212: primitives.red12,
50
- red4570: primitives.red45,
51
- red5782: primitives.red57
52
- };
53
- const ui = getUIColors(contrasts);
54
- const colors = {
55
- primitives,
56
- contrasts,
57
- ui
25
+ import { functionalColors } from '../utils/functionalColors';
26
+ const baseColors = {
27
+ brand: '#0374B5',
28
+ link: '#0374B5',
29
+ electric: '#0374B5',
30
+ shamrock: '#0B874B',
31
+ barney: '#BF32A4',
32
+ crimson: '#E0061F',
33
+ fire: '#FC5E13',
34
+ licorice: '#2D3B45',
35
+ oxford: '#394B58',
36
+ ash: '#6B7780',
37
+ slate: '#8B969E',
38
+ tiara: '#C7CDD1',
39
+ porcelain: '#F5F5F5',
40
+ white: '#FFFFFF'
58
41
  };
42
+ const colors = Object.freeze(functionalColors(baseColors));
59
43
  export default colors;
60
44
  export { colors };
@@ -22,39 +22,23 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import primitives from '../common/colors/primitves';
26
- import getUIColors from '../utils/getUIColors';
27
- const contrasts = {
28
- white1010: primitives.white,
29
- white1010op75: primitives.white10op75,
30
- grey1111: primitives.grey11,
31
- grey1214: primitives.grey14,
32
- grey1424: primitives.grey24,
33
- grey2424: primitives.grey24,
34
- grey4570: primitives.grey70,
35
- grey5782: primitives.grey82,
36
- grey100100: primitives.grey100,
37
- grey100100op75: primitives.grey100op75,
38
- grey125125: primitives.grey125,
39
- blue1212: primitives.blue12,
40
- blue4570: primitives.blue70,
41
- blue5782: primitives.blue82,
42
- green1212: primitives.green12,
43
- green4570: primitives.green70,
44
- green5782: primitives.green82,
45
- orange1212: primitives.orange12,
46
- orange3045: primitives.orange45,
47
- orange4570: primitives.orange70,
48
- orange5782: primitives.orange82,
49
- red1212: primitives.red12,
50
- red4570: primitives.red70,
51
- red5782: primitives.red82
52
- };
53
- const ui = getUIColors(contrasts);
54
- const colors = {
55
- primitives,
56
- contrasts,
57
- ui
25
+ import { functionalColors } from '../utils/functionalColors';
26
+ const baseColors = {
27
+ brand: '#0770A3',
28
+ link: '#0770A3',
29
+ electric: '#0770A3',
30
+ shamrock: '#127A1B',
31
+ barney: '#B8309E',
32
+ crimson: '#D01A19',
33
+ fire: '#C23C0D',
34
+ licorice: '#2D3B45',
35
+ oxford: '#394B58',
36
+ ash: '#556572',
37
+ slate: '#556572',
38
+ tiara: '#556572',
39
+ porcelain: '#FFFFFF',
40
+ white: '#FFFFFF'
58
41
  };
42
+ const colors = Object.freeze(functionalColors(baseColors));
59
43
  export default colors;
60
44
  export { colors };
package/es/index.js CHANGED
@@ -24,5 +24,6 @@
24
24
 
25
25
  import { canvas } from './canvas';
26
26
  import { canvasHighContrast } from './canvasHighContrast';
27
- import primitives from './common/colors/primitves';
28
- export { canvas, canvasHighContrast, primitives };
27
+ import { instructure } from './instructure';
28
+ import { functionalColors } from './utils/functionalColors';
29
+ export { canvas, canvasHighContrast, instructure, functionalColors };
@@ -0,0 +1,56 @@
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 };
@@ -22,8 +22,10 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import primitives from './primitves';
26
- const colors = {
27
- primitives
28
- };
29
- export default colors;
25
+ const forms = Object.freeze({
26
+ inputHeightSmall: '2rem',
27
+ inputHeightMedium: '2.75rem',
28
+ inputHeightLarge: '3.375rem'
29
+ });
30
+ export default forms;
31
+ export { forms };
@@ -22,40 +22,17 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- const primitives = {
26
- white: '#FFFFFF',
27
- white10op75: '#FFFFFFBF',
28
- grey11: '#F2F4F4',
29
- grey12: '#E8EAEC',
30
- grey14: '#D7DADE',
31
- grey24: '#9EA6AD',
32
- grey45: '#6A7883',
33
- grey57: '#586874',
34
- grey70: '#4A5B68',
35
- grey82: '#3F515E',
36
- grey100: '#334451',
37
- grey100op75: '#334451BF',
38
- grey125: '#273540',
39
- blue12: '#E0EBF5',
40
- blue45: '#2B7ABC',
41
- blue57: '#0E68B3',
42
- blue70: '#0A5A9E',
43
- blue82: '#09508C',
44
- green12: '#DCEEE4',
45
- green45: '#03893D',
46
- green57: '#027634',
47
- green70: '#02672D',
48
- green82: '#015B28',
49
- orange12: '#FCE5D9',
50
- orange30: '#F06E26',
51
- orange45: '#CF4A00',
52
- orange57: '#B34000',
53
- orange70: '#9C3800',
54
- orange82: '#8B3200',
55
- red12: '#FCE4E5',
56
- red45: '#E62429',
57
- red57: '#C71F23',
58
- red70: '#AE1B1F',
59
- red82: '#9B181C'
25
+ import { canvas } from '../canvas';
26
+ import { colors } from './colors';
27
+ import { forms } from './forms';
28
+ import { spacing } from './spacing';
29
+ import { typography } from './typography';
30
+ const instructure = {
31
+ ...canvas,
32
+ colors,
33
+ forms,
34
+ spacing,
35
+ typography
60
36
  };
61
- export default primitives;
37
+ export default instructure;
38
+ export { instructure };
@@ -0,0 +1,37 @@
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 };
@@ -0,0 +1,49 @@
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 };
@@ -0,0 +1,79 @@
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,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = exports.colors = void 0;
8
- var _primitves = _interopRequireDefault(require("../common/colors/primitves"));
9
- var _getUIColors = _interopRequireDefault(require("../utils/getUIColors"));
7
+ var _functionalColors = require("../utils/functionalColors");
10
8
  /*
11
9
  * The MIT License (MIT)
12
10
  *
@@ -31,36 +29,21 @@ var _getUIColors = _interopRequireDefault(require("../utils/getUIColors"));
31
29
  * SOFTWARE.
32
30
  */
33
31
 
34
- const contrasts = {
35
- white1010: _primitves.default.white,
36
- white1010op75: _primitves.default.white10op75,
37
- grey1111: _primitves.default.grey11,
38
- grey1214: _primitves.default.grey12,
39
- grey1424: _primitves.default.grey14,
40
- grey2424: _primitves.default.grey24,
41
- grey4570: _primitves.default.grey45,
42
- grey5782: _primitves.default.grey57,
43
- grey100100: _primitves.default.grey100,
44
- grey100100op75: _primitves.default.grey100op75,
45
- grey125125: _primitves.default.grey125,
46
- blue1212: _primitves.default.blue12,
47
- blue4570: _primitves.default.blue45,
48
- blue5782: _primitves.default.blue57,
49
- green1212: _primitves.default.green12,
50
- green4570: _primitves.default.green45,
51
- green5782: _primitves.default.green57,
52
- orange1212: _primitves.default.orange12,
53
- orange3045: _primitves.default.orange30,
54
- orange4570: _primitves.default.orange45,
55
- orange5782: _primitves.default.orange57,
56
- red1212: _primitves.default.red12,
57
- red4570: _primitves.default.red45,
58
- red5782: _primitves.default.red57
59
- };
60
- const ui = (0, _getUIColors.default)(contrasts);
61
- const colors = exports.colors = {
62
- primitives: _primitves.default,
63
- contrasts,
64
- ui
32
+ const baseColors = {
33
+ brand: '#0374B5',
34
+ link: '#0374B5',
35
+ electric: '#0374B5',
36
+ shamrock: '#0B874B',
37
+ barney: '#BF32A4',
38
+ crimson: '#E0061F',
39
+ fire: '#FC5E13',
40
+ licorice: '#2D3B45',
41
+ oxford: '#394B58',
42
+ ash: '#6B7780',
43
+ slate: '#8B969E',
44
+ tiara: '#C7CDD1',
45
+ porcelain: '#F5F5F5',
46
+ white: '#FFFFFF'
65
47
  };
48
+ const colors = exports.colors = Object.freeze((0, _functionalColors.functionalColors)(baseColors));
66
49
  var _default = exports.default = colors;
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = exports.colors = void 0;
8
- var _primitves = _interopRequireDefault(require("../common/colors/primitves"));
9
- var _getUIColors = _interopRequireDefault(require("../utils/getUIColors"));
7
+ var _functionalColors = require("../utils/functionalColors");
10
8
  /*
11
9
  * The MIT License (MIT)
12
10
  *
@@ -31,36 +29,21 @@ var _getUIColors = _interopRequireDefault(require("../utils/getUIColors"));
31
29
  * SOFTWARE.
32
30
  */
33
31
 
34
- const contrasts = {
35
- white1010: _primitves.default.white,
36
- white1010op75: _primitves.default.white10op75,
37
- grey1111: _primitves.default.grey11,
38
- grey1214: _primitves.default.grey14,
39
- grey1424: _primitves.default.grey24,
40
- grey2424: _primitves.default.grey24,
41
- grey4570: _primitves.default.grey70,
42
- grey5782: _primitves.default.grey82,
43
- grey100100: _primitves.default.grey100,
44
- grey100100op75: _primitves.default.grey100op75,
45
- grey125125: _primitves.default.grey125,
46
- blue1212: _primitves.default.blue12,
47
- blue4570: _primitves.default.blue70,
48
- blue5782: _primitves.default.blue82,
49
- green1212: _primitves.default.green12,
50
- green4570: _primitves.default.green70,
51
- green5782: _primitves.default.green82,
52
- orange1212: _primitves.default.orange12,
53
- orange3045: _primitves.default.orange45,
54
- orange4570: _primitves.default.orange70,
55
- orange5782: _primitves.default.orange82,
56
- red1212: _primitves.default.red12,
57
- red4570: _primitves.default.red70,
58
- red5782: _primitves.default.red82
59
- };
60
- const ui = (0, _getUIColors.default)(contrasts);
61
- const colors = exports.colors = {
62
- primitives: _primitves.default,
63
- contrasts,
64
- ui
32
+ const baseColors = {
33
+ brand: '#0770A3',
34
+ link: '#0770A3',
35
+ electric: '#0770A3',
36
+ shamrock: '#127A1B',
37
+ barney: '#B8309E',
38
+ crimson: '#D01A19',
39
+ fire: '#C23C0D',
40
+ licorice: '#2D3B45',
41
+ oxford: '#394B58',
42
+ ash: '#556572',
43
+ slate: '#556572',
44
+ tiara: '#556572',
45
+ porcelain: '#FFFFFF',
46
+ white: '#FFFFFF'
65
47
  };
48
+ const colors = exports.colors = Object.freeze((0, _functionalColors.functionalColors)(baseColors));
66
49
  var _default = exports.default = colors;
package/lib/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -16,12 +15,19 @@ Object.defineProperty(exports, "canvasHighContrast", {
16
15
  return _canvasHighContrast.canvasHighContrast;
17
16
  }
18
17
  });
19
- Object.defineProperty(exports, "primitives", {
18
+ Object.defineProperty(exports, "functionalColors", {
20
19
  enumerable: true,
21
20
  get: function () {
22
- return _primitves.default;
21
+ return _functionalColors.functionalColors;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "instructure", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _instructure.instructure;
23
28
  }
24
29
  });
25
30
  var _canvas = require("./canvas");
26
31
  var _canvasHighContrast = require("./canvasHighContrast");
27
- var _primitves = _interopRequireDefault(require("./common/colors/primitves"));
32
+ var _instructure = require("./instructure");
33
+ var _functionalColors = require("./utils/functionalColors");
@@ -0,0 +1,61 @@
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;