@instructure/ui-theme-tokens 9.5.2-snapshot-1 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
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
package/CHANGELOG.md CHANGED
@@ -3,9 +3,18 @@
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-1](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2-snapshot-1) (2024-07-31)
6
+ # [10.0.0](https://github.com/instructure/instructure-ui/compare/v9.5.1...v10.0.0) (2024-07-31)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-theme-tokens
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
9
18
 
10
19
 
11
20
 
@@ -22,23 +22,39 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
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'
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
41
58
  };
42
- const colors = Object.freeze(functionalColors(baseColors));
43
59
  export default colors;
44
60
  export { colors };
@@ -22,23 +22,39 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
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'
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
41
58
  };
42
- const colors = Object.freeze(functionalColors(baseColors));
43
59
  export default colors;
44
60
  export { colors };
@@ -22,10 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- const forms = Object.freeze({
26
- inputHeightSmall: '2rem',
27
- inputHeightMedium: '2.75rem',
28
- inputHeightLarge: '3.375rem'
29
- });
30
- export default forms;
31
- export { forms };
25
+ import primitives from './primitves';
26
+ const colors = {
27
+ primitives
28
+ };
29
+ export default colors;
@@ -22,17 +22,40 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
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
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'
36
60
  };
37
- export default instructure;
38
- export { instructure };
61
+ export default primitives;
package/es/index.js CHANGED
@@ -24,6 +24,5 @@
24
24
 
25
25
  import { canvas } from './canvas';
26
26
  import { canvasHighContrast } from './canvasHighContrast';
27
- import { instructure } from './instructure';
28
- import { functionalColors } from './utils/functionalColors';
29
- export { canvas, canvasHighContrast, instructure, functionalColors };
27
+ import primitives from './common/colors/primitves';
28
+ export { canvas, canvasHighContrast, primitives };
@@ -0,0 +1,48 @@
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
+ export const getUIColors = contrasts => ({
26
+ surfacePagePrimary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.white1010,
27
+ surfacePageSecondary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1111,
28
+ surfaceCardPrimary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.white1010,
29
+ surfaceCardSecondary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1111,
30
+ surfaceDark: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey100100,
31
+ textTitle: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey125125,
32
+ textDescription: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey125125,
33
+ textBody: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey125125,
34
+ textTimestamp: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey5782,
35
+ textAuthor: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey5782,
36
+ textDatapoint: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey5782,
37
+ textLink: contrasts === null || contrasts === void 0 ? void 0 : contrasts.blue4570,
38
+ textPlaceholder: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey2424,
39
+ textSuccess: contrasts === null || contrasts === void 0 ? void 0 : contrasts.green4570,
40
+ textWarning: contrasts === null || contrasts === void 0 ? void 0 : contrasts.orange4570,
41
+ textError: contrasts === null || contrasts === void 0 ? void 0 : contrasts.red4570,
42
+ lineStroke: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1424,
43
+ lineDivider: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1214,
44
+ surfaceOverlayGrey: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey100100op75,
45
+ surfaceOverlayWhite: contrasts === null || contrasts === void 0 ? void 0 : contrasts.white1010op75,
46
+ surfaceDivider: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1424
47
+ });
48
+ export default getUIColors;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = exports.colors = void 0;
7
- var _functionalColors = require("../utils/functionalColors");
8
+ var _primitves = _interopRequireDefault(require("../common/colors/primitves"));
9
+ var _getUIColors = _interopRequireDefault(require("../utils/getUIColors"));
8
10
  /*
9
11
  * The MIT License (MIT)
10
12
  *
@@ -29,21 +31,36 @@ var _functionalColors = require("../utils/functionalColors");
29
31
  * SOFTWARE.
30
32
  */
31
33
 
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'
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
47
65
  };
48
- const colors = exports.colors = Object.freeze((0, _functionalColors.functionalColors)(baseColors));
49
66
  var _default = exports.default = colors;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = exports.colors = void 0;
7
- var _functionalColors = require("../utils/functionalColors");
8
+ var _primitves = _interopRequireDefault(require("../common/colors/primitves"));
9
+ var _getUIColors = _interopRequireDefault(require("../utils/getUIColors"));
8
10
  /*
9
11
  * The MIT License (MIT)
10
12
  *
@@ -29,21 +31,36 @@ var _functionalColors = require("../utils/functionalColors");
29
31
  * SOFTWARE.
30
32
  */
31
33
 
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'
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
47
65
  };
48
- const colors = exports.colors = Object.freeze((0, _functionalColors.functionalColors)(baseColors));
49
66
  var _default = exports.default = colors;
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.forms = exports.default = void 0;
7
+ exports.default = void 0;
8
+ var _primitves = _interopRequireDefault(require("./primitves"));
7
9
  /*
8
10
  * The MIT License (MIT)
9
11
  *
@@ -28,9 +30,7 @@ exports.forms = exports.default = void 0;
28
30
  * SOFTWARE.
29
31
  */
30
32
 
31
- const forms = exports.forms = Object.freeze({
32
- inputHeightSmall: '2rem',
33
- inputHeightMedium: '2.75rem',
34
- inputHeightLarge: '3.375rem'
35
- });
36
- var _default = exports.default = forms;
33
+ const colors = {
34
+ primitives: _primitves.default
35
+ };
36
+ var _default = exports.default = colors;
@@ -3,12 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.instructure = exports.default = void 0;
7
- var _canvas = require("../canvas");
8
- var _colors = require("./colors");
9
- var _forms = require("./forms");
10
- var _spacing = require("./spacing");
11
- var _typography = require("./typography");
6
+ exports.default = void 0;
12
7
  /*
13
8
  * The MIT License (MIT)
14
9
  *
@@ -33,11 +28,40 @@ var _typography = require("./typography");
33
28
  * SOFTWARE.
34
29
  */
35
30
 
36
- const instructure = exports.instructure = {
37
- ..._canvas.canvas,
38
- colors: _colors.colors,
39
- forms: _forms.forms,
40
- spacing: _spacing.spacing,
41
- typography: _typography.typography
31
+ const primitives = {
32
+ white: '#FFFFFF',
33
+ white10op75: '#FFFFFFBF',
34
+ grey11: '#F2F4F4',
35
+ grey12: '#E8EAEC',
36
+ grey14: '#D7DADE',
37
+ grey24: '#9EA6AD',
38
+ grey45: '#6A7883',
39
+ grey57: '#586874',
40
+ grey70: '#4A5B68',
41
+ grey82: '#3F515E',
42
+ grey100: '#334451',
43
+ grey100op75: '#334451BF',
44
+ grey125: '#273540',
45
+ blue12: '#E0EBF5',
46
+ blue45: '#2B7ABC',
47
+ blue57: '#0E68B3',
48
+ blue70: '#0A5A9E',
49
+ blue82: '#09508C',
50
+ green12: '#DCEEE4',
51
+ green45: '#03893D',
52
+ green57: '#027634',
53
+ green70: '#02672D',
54
+ green82: '#015B28',
55
+ orange12: '#FCE5D9',
56
+ orange30: '#F06E26',
57
+ orange45: '#CF4A00',
58
+ orange57: '#B34000',
59
+ orange70: '#9C3800',
60
+ orange82: '#8B3200',
61
+ red12: '#FCE4E5',
62
+ red45: '#E62429',
63
+ red57: '#C71F23',
64
+ red70: '#AE1B1F',
65
+ red82: '#9B181C'
42
66
  };
43
- var _default = exports.default = instructure;
67
+ var _default = exports.default = primitives;
package/lib/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -15,19 +16,12 @@ Object.defineProperty(exports, "canvasHighContrast", {
15
16
  return _canvasHighContrast.canvasHighContrast;
16
17
  }
17
18
  });
18
- Object.defineProperty(exports, "functionalColors", {
19
+ Object.defineProperty(exports, "primitives", {
19
20
  enumerable: true,
20
21
  get: function () {
21
- return _functionalColors.functionalColors;
22
- }
23
- });
24
- Object.defineProperty(exports, "instructure", {
25
- enumerable: true,
26
- get: function () {
27
- return _instructure.instructure;
22
+ return _primitves.default;
28
23
  }
29
24
  });
30
25
  var _canvas = require("./canvas");
31
26
  var _canvasHighContrast = require("./canvasHighContrast");
32
- var _instructure = require("./instructure");
33
- var _functionalColors = require("./utils/functionalColors");
27
+ var _primitves = _interopRequireDefault(require("./common/colors/primitves"));
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getUIColors = 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 getUIColors = contrasts => ({
32
+ surfacePagePrimary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.white1010,
33
+ surfacePageSecondary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1111,
34
+ surfaceCardPrimary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.white1010,
35
+ surfaceCardSecondary: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1111,
36
+ surfaceDark: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey100100,
37
+ textTitle: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey125125,
38
+ textDescription: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey125125,
39
+ textBody: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey125125,
40
+ textTimestamp: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey5782,
41
+ textAuthor: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey5782,
42
+ textDatapoint: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey5782,
43
+ textLink: contrasts === null || contrasts === void 0 ? void 0 : contrasts.blue4570,
44
+ textPlaceholder: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey2424,
45
+ textSuccess: contrasts === null || contrasts === void 0 ? void 0 : contrasts.green4570,
46
+ textWarning: contrasts === null || contrasts === void 0 ? void 0 : contrasts.orange4570,
47
+ textError: contrasts === null || contrasts === void 0 ? void 0 : contrasts.red4570,
48
+ lineStroke: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1424,
49
+ lineDivider: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1214,
50
+ surfaceOverlayGrey: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey100100op75,
51
+ surfaceOverlayWhite: contrasts === null || contrasts === void 0 ? void 0 : contrasts.white1010op75,
52
+ surfaceDivider: contrasts === null || contrasts === void 0 ? void 0 : contrasts.grey1424
53
+ });
54
+ exports.getUIColors = getUIColors;
55
+ var _default = exports.default = getUIColors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-theme-tokens",
3
- "version": "9.5.2-snapshot-1",
3
+ "version": "10.0.0",
4
4
  "description": "Cross-platform theme tokens for Instructure products",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -22,13 +22,13 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "devDependencies": {
25
- "@instructure/ui-babel-preset": "9.5.2-snapshot-1",
26
- "@instructure/ui-color-utils": "9.5.2-snapshot-1",
27
- "@instructure/ui-test-utils": "9.5.2-snapshot-1"
25
+ "@instructure/ui-babel-preset": "10.0.0",
26
+ "@instructure/ui-color-utils": "10.0.0",
27
+ "@instructure/ui-test-utils": "10.0.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.24.5",
31
- "@instructure/shared-types": "9.5.2-snapshot-1"
31
+ "@instructure/shared-types": "10.0.0"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"