@maxio-com/design-tokens 3.1.0 → 3.2.0-alpha.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/LICENSE.MD CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Maxio
3
+ Copyright (c) 2024 Maxio
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Design Tokens
2
2
 
3
- Set of Maxio UI Design Tokens
3
+ Maxio UI Design Tokens
4
4
 
5
- This package is used to store and maintain design tokens for Maxio UI. The structure is based on Tailwind CSS design tokens (they are directly consumed by Tailwind CC theme).
5
+ This package is used to store and maintain design tokens for Maxio UI.
6
+ Tokens exists in the form of CSS variables and are used to maintain a consistent design system across all Maxio UI components (used directly within our [Design System](https://github.com/maxio-com/ui-components)).
7
+
8
+ For backwards compatibility, some of the primitive tokens are also available as JavaScript variables - however you should prefer using the CSS variables.
9
+
10
+ The source of truth is located in Figma/Notion and is exported to this package.
11
+ Learn more about the **Design Tokens** [here](https://www.notion.so/maxioevolution/Design-tokens-7e2081d708d6485396e3237cbb8028c7).
12
+
13
+
14
+
15
+ ## Installation
16
+
17
+ Design tokens are distributed as an npm package. You can install them using npm, yarn, or pnpm:
18
+
19
+ ```bash
20
+ pnpm install @maxio/design-tokens
21
+ ```
22
+
23
+ To use the design tokens in your project, you can import the CSS file into your project:
24
+
25
+ ```css
26
+ @import "@maxio-com/design-tokens/variables.css";
27
+ ```
28
+
29
+ ## Backward compatibility
30
+
31
+ All the changes in the design tokens should be backward compatible. This means that if you change a token, you should not break any existing components that use that token. Existing components should continue to work as expected. If you need to make a breaking change, you should create a new token and deprecate the old one.
32
+
33
+ After the deprecation period, and making sure migration has been done, you can remove the old token.
34
+
35
+ ## FAQ
36
+
37
+ ### How do I use these tokens?
38
+
39
+ You can use these tokens by importing the CSS file into your project. You can then use the tokens in your CSS or JavaScript files.
40
+
41
+ ### How do I update these tokens?
42
+
43
+ You can update these tokens by modifying the CSS file in this package and submitting a PR.
@@ -0,0 +1,90 @@
1
+ declare const colors: {
2
+ white: string;
3
+ black: string;
4
+ gray: {
5
+ '05': string;
6
+ '10': string;
7
+ '20': string;
8
+ '30': string;
9
+ '40': string;
10
+ '50': string;
11
+ '60': string;
12
+ '70': string;
13
+ '80': string;
14
+ '90': string;
15
+ '100': string;
16
+ '105': string;
17
+ };
18
+ blue: {
19
+ '05': string;
20
+ '10': string;
21
+ '20': string;
22
+ '30': string;
23
+ '40': string;
24
+ '50': string;
25
+ '60': string;
26
+ '70': string;
27
+ '80': string;
28
+ '90': string;
29
+ '100': string;
30
+ '105': string;
31
+ };
32
+ red: {
33
+ '05': string;
34
+ '10': string;
35
+ '20': string;
36
+ '30': string;
37
+ '40': string;
38
+ '50': string;
39
+ '60': string;
40
+ '70': string;
41
+ '80': string;
42
+ '90': string;
43
+ '100': string;
44
+ '105': string;
45
+ };
46
+ green: {
47
+ '05': string;
48
+ '10': string;
49
+ '20': string;
50
+ '30': string;
51
+ '40': string;
52
+ '50': string;
53
+ '60': string;
54
+ '70': string;
55
+ '80': string;
56
+ '90': string;
57
+ '100': string;
58
+ '105': string;
59
+ };
60
+ yellow: {
61
+ '05': string;
62
+ '10': string;
63
+ '20': string;
64
+ '30': string;
65
+ '40': string;
66
+ '50': string;
67
+ '60': string;
68
+ '70': string;
69
+ '80': string;
70
+ '90': string;
71
+ '100': string;
72
+ '105': string;
73
+ };
74
+ purple: {
75
+ '05': string;
76
+ '10': string;
77
+ '20': string;
78
+ '30': string;
79
+ '40': string;
80
+ '50': string;
81
+ '60': string;
82
+ '70': string;
83
+ '80': string;
84
+ '90': string;
85
+ '100': string;
86
+ '105': string;
87
+ };
88
+ };
89
+ export default colors;
90
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFX,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,4 @@
1
+ import colors from './colors';
2
+ import typography from './typography';
3
+ export { colors, typography };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,35 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.typography = exports.semanticColors = exports.colors = void 0;
6
+ exports.typography = exports.colors = void 0;
30
7
  var colors_1 = __importDefault(require("./colors"));
31
8
  exports.colors = colors_1.default;
32
- var semanticColors = __importStar(require("./semantic-colors"));
33
- exports.semanticColors = semanticColors;
34
9
  var typography_1 = __importDefault(require("./typography"));
35
10
  exports.typography = typography_1.default;
@@ -0,0 +1,54 @@
1
+ export declare const fontSize: {
2
+ readonly 1: "0.75rem";
3
+ readonly 2: "0.875rem";
4
+ readonly 3: "1rem";
5
+ readonly 4: "1.25rem";
6
+ readonly 5: "1.5rem";
7
+ readonly 6: "1.875rem";
8
+ readonly 7: "2.25rem";
9
+ readonly 8: "3rem";
10
+ readonly 9: "3.75rem";
11
+ };
12
+ export declare const lineHeight: {
13
+ readonly 1: "1rem";
14
+ readonly 2: "1.125rem";
15
+ readonly 3: "1.25rem";
16
+ readonly 4: "1.5rem";
17
+ readonly 5: "1.75rem";
18
+ readonly 6: "2rem";
19
+ readonly 7: "2.25rem";
20
+ readonly 8: "3rem";
21
+ readonly 9: "3.5rem";
22
+ readonly none: 1;
23
+ };
24
+ declare const _default: {
25
+ fontSans: string;
26
+ fontIcons: string;
27
+ fontDisplay: string;
28
+ fontMono: string;
29
+ fontSize: {
30
+ readonly 1: "0.75rem";
31
+ readonly 2: "0.875rem";
32
+ readonly 3: "1rem";
33
+ readonly 4: "1.25rem";
34
+ readonly 5: "1.5rem";
35
+ readonly 6: "1.875rem";
36
+ readonly 7: "2.25rem";
37
+ readonly 8: "3rem";
38
+ readonly 9: "3.75rem";
39
+ };
40
+ lineHeight: {
41
+ readonly 1: "1rem";
42
+ readonly 2: "1.125rem";
43
+ readonly 3: "1.25rem";
44
+ readonly 4: "1.5rem";
45
+ readonly 5: "1.75rem";
46
+ readonly 6: "2rem";
47
+ readonly 7: "2.25rem";
48
+ readonly 8: "3rem";
49
+ readonly 9: "3.5rem";
50
+ readonly none: 1;
51
+ };
52
+ };
53
+ export default _default;
54
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;CAUX,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;;;;;;;CAWb,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEX,wBAUE"}
@@ -0,0 +1,292 @@
1
+ :root {
2
+ /* privimitive colors - DEPRECATED */
3
+ --maxio-white: #ffffff;
4
+ --maxio-black: #000000;
5
+
6
+ /* primitive colors */
7
+ --maxio-black-opaque: hsl(0 0 0%);
8
+ --maxio-black-alpha-05: hsl(0 0 0% / 0.04);
9
+ --maxio-black-alpha-10: hsl(0 0 0% / 0.09);
10
+ --maxio-black-alpha-20: hsl(0 0 0% / 0.15);
11
+ --maxio-black-alpha-30: hsl(0 0 0% / 0.22);
12
+ --maxio-black-alpha-40: hsl(0 0 0% / 0.3);
13
+ --maxio-black-alpha-50: hsl(0 0 0% / 0.37);
14
+ --maxio-black-alpha-60: hsl(0 0 0% / 0.44);
15
+ --maxio-black-alpha-70: hsl(0 0 0% / 0.53);
16
+ --maxio-black-alpha-80: hsl(0 0 0% / 0.62);
17
+ --maxio-black-alpha-90: hsl(0 0 0% / 0.71);
18
+ --maxio-black-alpha-100: hsl(0 0 0% / 0.82);
19
+ --maxio-black-alpha-105: hsl(0 0 0% / 0.88);
20
+
21
+ --maxio-white-opaque: hsl(0 0 100%);
22
+ --maxio-white-alpha-05: hsl(0 0 100% / 0.13);
23
+ --maxio-white-alpha-10: hsl(0 0 100% / 0.19);
24
+ --maxio-white-alpha-20: hsl(0 0 100% / 0.3);
25
+ --maxio-white-alpha-30: hsl(0 0 100% / 0.39);
26
+ --maxio-white-alpha-40: hsl(0 0 100% / 0.48);
27
+ --maxio-white-alpha-50: hsl(0 0 100% / 0.57);
28
+ --maxio-white-alpha-60: hsl(0 0 100% / 0.64);
29
+ --maxio-white-alpha-70: hsl(0 0 100% / 0.71);
30
+ --maxio-white-alpha-80: hsl(0 0 100% / 0.79);
31
+ --maxio-white-alpha-90: hsl(0 0 100% / 0.86);
32
+ --maxio-white-alpha-100: hsl(0 0 100% / 0.92);
33
+ --maxio-white-alpha-105: hsl(0 0 100% / 0.97);
34
+
35
+ --maxio-gray-05: hsl(0 0 96%);
36
+ --maxio-gray-10: hsl(0 0 91%);
37
+ --maxio-gray-20: hsl(0 0 85%);
38
+ --maxio-gray-30: hsl(0 0 78%);
39
+ --maxio-gray-40: hsl(0 0 71%);
40
+ --maxio-gray-50: hsl(0 0 64%);
41
+ --maxio-gray-60: hsl(0 0 56%);
42
+ --maxio-gray-70: hsl(0 0 47%);
43
+ --maxio-gray-80: hsl(0 0 39%);
44
+ --maxio-gray-90: hsl(0 0 29%);
45
+ --maxio-gray-100: hsl(0 0 18%);
46
+ --maxio-gray-105: hsl(0 0 12%);
47
+
48
+ --maxio-blue-05: hsl(205 88% 95%);
49
+ --maxio-blue-10: hsl(204 86% 91%);
50
+ --maxio-blue-20: hsl(202 85% 84%);
51
+ --maxio-blue-30: hsl(203 85% 76%);
52
+ --maxio-blue-40: hsl(202 85% 67%);
53
+ --maxio-blue-50: hsl(203 92% 58%);
54
+ --maxio-blue-60: hsl(206 100% 49%);
55
+ --maxio-blue-70: hsl(214 100% 50%);
56
+ --maxio-blue-80: hsl(224 100% 50%);
57
+ --maxio-blue-90: hsl(236 100% 44%);
58
+ --maxio-blue-100: hsl(255 100% 26%);
59
+ --maxio-blue-105: hsl(260 100% 17%);
60
+
61
+ --maxio-green-05: hsl(82 84% 87%);
62
+ --maxio-green-10: hsl(81 81% 79%);
63
+ --maxio-green-20: hsl(82 76% 63%);
64
+ --maxio-green-30: hsl(96 60% 62%);
65
+ --maxio-green-40: hsl(116 46% 60%);
66
+ --maxio-green-50: hsl(137 39% 52%);
67
+ --maxio-green-60: hsl(151 48% 42%);
68
+ --maxio-green-70: hsl(162 63% 33%);
69
+ --maxio-green-80: hsl(165 100% 22%);
70
+ --maxio-green-90: hsl(161 100% 16%);
71
+ --maxio-green-100: hsl(153 100% 10%);
72
+ --maxio-green-105: hsl(143 100% 7%);
73
+
74
+ --maxio-purple-05: hsl(300 100% 96%);
75
+ --maxio-purple-10: hsl(300 100% 94%);
76
+ --maxio-purple-20: hsl(300 100% 89%);
77
+ --maxio-purple-30: hsl(300 100% 83%);
78
+ --maxio-purple-40: hsl(300 100% 76%);
79
+ --maxio-purple-50: hsl(298 90% 69%);
80
+ --maxio-purple-60: hsl(293 73% 62%);
81
+ --maxio-purple-70: hsl(288 61% 54%);
82
+ --maxio-purple-80: hsl(283 60% 46%);
83
+ --maxio-purple-90: hsl(280 80% 34%);
84
+ --maxio-purple-100: hsl(276 100% 21%);
85
+ --maxio-purple-105: hsl(270 100% 15%);
86
+
87
+ --maxio-red-05: hsl(0 100% 97%);
88
+ --maxio-red-10: hsl(2 100% 94%);
89
+ --maxio-red-20: hsl(1 100% 90%);
90
+ --maxio-red-30: hsl(1 100% 85%);
91
+ --maxio-red-40: hsl(359 100% 80%);
92
+ --maxio-red-50: hsl(358 96% 73%);
93
+ --maxio-red-60: hsl(355 89% 64%);
94
+ --maxio-red-70: hsl(349 76% 52%);
95
+ --maxio-red-80: hsl(343 83% 40%);
96
+ --maxio-red-90: hsl(342 100% 28%);
97
+ --maxio-red-100: hsl(357 100% 17%);
98
+ --maxio-red-105: hsl(0 100% 11%);
99
+
100
+ --maxio-yellow-05: hsl(50 100% 86%);
101
+ --maxio-yellow-10: hsl(50 100% 76%);
102
+ --maxio-yellow-20: hsl(47 100% 62%);
103
+ --maxio-yellow-30: hsl(39 100% 62%);
104
+ --maxio-yellow-40: hsl(34 91% 59%);
105
+ --maxio-yellow-50: hsl(36 81% 49%);
106
+ --maxio-yellow-60: hsl(36 100% 40%);
107
+ --maxio-yellow-70: hsl(34 100% 35%);
108
+ --maxio-yellow-80: hsl(30 100% 30%);
109
+ --maxio-yellow-90: hsl(24 100% 24%);
110
+ --maxio-yellow-100: hsl(7 100% 17%);
111
+ --maxio-yellow-105: hsl(0 100% 11%);
112
+
113
+ /* typography */
114
+ --maxio-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, San Francisco,
115
+ Segoe UI, Roboto, Helvetica Neue, sans-serif;
116
+ --maxio-font-icons: 'maxio-icons', sans-serif;
117
+ --maxio-font-display: 'Founders Grotesk', -apple-system, BlinkMacSystemFont,
118
+ San Francisco, Segoe UI, Roboto, Helvetica Neue, sans-serif;
119
+ --maxio-font-mono: ui-monospace, SFMono-Regular, SF Mono, 'Segoe UI Mono',
120
+ 'Roboto Mono', 'Ubuntu Mono', Menlo, Consolas, Courier, monospace;
121
+ --maxio-font-size-1: 0.75rem;
122
+ --maxio-font-size-2: 0.875rem;
123
+ --maxio-font-size-3: 1rem;
124
+ --maxio-font-size-4: 1.25rem;
125
+ --maxio-font-size-5: 1.5rem;
126
+ --maxio-font-size-6: 1.875rem;
127
+ --maxio-font-size-7: 2.25rem;
128
+ --maxio-font-size-8: 3rem;
129
+ --maxio-font-size-9: 3.75rem;
130
+ --maxio-line-height-1: 1rem;
131
+ --maxio-line-height-2: 1.125rem;
132
+ --maxio-line-height-3: 1.25rem;
133
+ --maxio-line-height-4: 1.5rem;
134
+ --maxio-line-height-5: 1.75rem;
135
+ --maxio-line-height-6: 2rem;
136
+ --maxio-line-height-7: 2.25rem;
137
+ --maxio-line-height-8: 3rem;
138
+ --maxio-line-height-9: 3.5rem;
139
+ --maxio-line-height-none: 1;
140
+
141
+ /* semantic tokens */
142
+ /* background colors */
143
+ --maxio-color-bg-primary: var(--maxio-white-opaque);
144
+ --maxio-color-bg-primary-hover: var(--maxio-gray-05);
145
+ --maxio-color-bg-primary-active: var(--maxio-gray-10);
146
+ --maxio-color-bg-secondary: var(--maxio-gray-05);
147
+ --maxio-color-bg-secondary-hover: var(--maxio-gray-10);
148
+ --maxio-color-bg-secondary-active: var(--maxio-gray-20);
149
+ --maxio-color-bg-tertiary: var(--maxio-gray-10);
150
+ --maxio-color-bg-tertiary-hover: var(--maxio-gray-20);
151
+ --maxio-color-bg-tertiary-active: var(--maxio-gray-30);
152
+ --maxio-color-bg-inverse: var(--maxio-black-opaque);
153
+ --maxio-color-bg-inverse-hover: var(--maxio-gray-105);
154
+ --maxio-color-bg-inverse-active: var(--maxio-gray-100);
155
+ --maxio-color-bg-neutral: var(--maxio-gray-10);
156
+ --maxio-color-bg-info: var(--maxio-blue-10);
157
+ --maxio-color-bg-success: var(--maxio-green-10);
158
+ --maxio-color-bg-warning: var(--maxio-yellow-10);
159
+ --maxio-color-bg-danger: var(--maxio-red-10);
160
+ --maxio-color-bg-highlight: var(--maxio-purple-10);
161
+ --maxio-color-bg-fill-brand: var(--maxio-blue-80);
162
+ --maxio-color-bg-fill-brand-hover: var(--maxio-blue-90);
163
+ --maxio-color-bg-fill-brand-active: var(--maxio-blue-100);
164
+ --maxio-color-bg-fill-neutral: var(--maxio-gray-80);
165
+ --maxio-color-bg-fill-info: var(--maxio-blue-80);
166
+ --maxio-color-bg-fill-success: var(--maxio-green-80);
167
+ --maxio-color-bg-fill-warning: var(--maxio-yellow-80);
168
+ --maxio-color-bg-fill-danger: var(--maxio-red-80);
169
+ --maxio-color-bg-fill-danger-hover: var(--maxio-red-90);
170
+ --maxio-color-bg-fill-danger-active: var(--maxio-red-100);
171
+ --maxio-color-bg-fill-highlight: var(--maxio-purple-80);
172
+ --maxio-color-bg-fill-disabled: var(--maxio-gray-30);
173
+
174
+ /* border colors */
175
+ --maxio-color-border-primary: var(--maxio-gray-80);
176
+ --maxio-color-border-secondary: var(--maxio-gray-60);
177
+ --maxio-color-border-tertiary: var(--maxio-gray-20);
178
+ --maxio-color-border-inverse: var(--maxio-black-opaque);
179
+ --maxio-color-border-focus: var(--maxio-blue-80);
180
+ --maxio-color-border-focus-inset: var(--maxio-white-opaque);
181
+ --maxio-color-border-brand: var(--maxio-blue-80);
182
+ --maxio-color-border-info: var(--maxio-blue-80);
183
+ --maxio-color-border-info-secondary: var(--maxio-blue-20);
184
+ --maxio-color-border-success: var(--maxio-green-80);
185
+ --maxio-color-border-success-secondary: var(--maxio-green-20);
186
+ --maxio-color-border-warning: var(--maxio-yellow-80);
187
+ --maxio-color-border-warning-secondary: var(--maxio-yellow-20);
188
+ --maxio-color-border-danger: var(--maxio-red-80);
189
+ --maxio-color-border-danger-secondary: var(--maxio-red-20);
190
+ --maxio-color-border-highlight: var(--maxio-purple-80);
191
+ --maxio-color-border-highlight-secondary: var(--maxio-purple-20);
192
+ --maxio-color-border-avatar: var(--maxio-black-alpha-10);
193
+
194
+ /* icon colors */
195
+ --maxio-color-icon-primary: var(--maxio-black-opaque);
196
+ --maxio-color-icon-secondary: var(--maxio-gray-90);
197
+ --maxio-color-icon-inverse: var(--maxio-white-opaque);
198
+ --maxio-color-icon-disabled: var(--maxio-gray-60);
199
+ --maxio-color-icon-on-bg-fill-disabled: var(--maxio-gray-70);
200
+ --maxio-color-icon-neutral: var(--maxio-gray-80);
201
+ --maxio-color-icon-info: var(--maxio-blue-80);
202
+ --maxio-color-icon-success: var(--maxio-green-80);
203
+ --maxio-color-icon-warning: var(--maxio-yellow-80);
204
+ --maxio-color-icon-danger: var(--maxio-red-80);
205
+ --maxio-color-icon-highlight: var(--maxio-purple-80);
206
+
207
+ /* text colors */
208
+ --maxio-color-text-primary: var(--maxio-black-opaque);
209
+ --maxio-color-text-secondary: var(--maxio-gray-90);
210
+ --maxio-color-text-tertiary: var(--maxio-gray-80);
211
+ --maxio-color-text-inverse: var(--maxio-white-opaque);
212
+ --maxio-color-text-on-bg-fill-disabled: var(--maxio-gray-70);
213
+ --maxio-color-text-disabled: var(--maxio-gray-60);
214
+ --maxio-color-text-danger: var(--maxio-red-80);
215
+ }
216
+
217
+ /* semantic tokens for dark mode */
218
+ :root[class~='dark'] {
219
+ /* background colors */
220
+ --maxio-color-bg-primary: var(--maxio-black-opaque);
221
+ --maxio-color-bg-primary-hover: var(--maxio-gray-105);
222
+ --maxio-color-bg-primary-active: var(--maxio-gray-100);
223
+ --maxio-color-bg-secondary: var(--maxio-gray-105);
224
+ --maxio-color-bg-secondary-hover: var(--maxio-gray-100);
225
+ --maxio-color-bg-secondary-active: var(--maxio-gray-90);
226
+ --maxio-color-bg-tertiary: var(--maxio-gray-100);
227
+ --maxio-color-bg-tertiary-hover: var(--maxio-gray-90);
228
+ --maxio-color-bg-tertiary-active: var(--maxio-gray-80);
229
+ --maxio-color-bg-inverse: var(--maxio-white-opaque);
230
+ --maxio-color-bg-inverse-hover: var(--maxio-gray-05);
231
+ --maxio-color-bg-inverse-active: var(--maxio-gray-10);
232
+ --maxio-color-bg-neutral: var(--maxio-gray-100);
233
+ --maxio-color-bg-info: var(--maxio-blue-100);
234
+ --maxio-color-bg-success: var(--maxio-green-100);
235
+ --maxio-color-bg-warning: var(--maxio-yellow-100);
236
+ --maxio-color-bg-danger: var(--maxio-red-100);
237
+ --maxio-color-bg-highlight: var(--maxio-purple-100);
238
+ --maxio-color-bg-fill-brand: var(--maxio-blue-60);
239
+ --maxio-color-bg-fill-brand-hover: var(--maxio-blue-50);
240
+ --maxio-color-bg-fill-brand-active: var(--maxio-blue-40);
241
+ --maxio-color-bg-fill-neutral: var(--maxio-gray-30);
242
+ --maxio-color-bg-fill-info: var(--maxio-blue-60);
243
+ --maxio-color-bg-fill-success: var(--maxio-green-30);
244
+ --maxio-color-bg-fill-warning: var(--maxio-yellow-30);
245
+ --maxio-color-bg-fill-danger: var(--maxio-red-60);
246
+ --maxio-color-bg-fill-danger-hover: var(--maxio-red-50);
247
+ --maxio-color-bg-fill-danger-active: var(--maxio-red-40);
248
+ --maxio-color-bg-fill-highlight: var(--maxio-purple-30);
249
+ --maxio-color-bg-fill-disabled: var(--maxio-gray-80);
250
+
251
+ /* border colors */
252
+ --maxio-color-border-primary: var(--maxio-gray-30);
253
+ --maxio-color-border-secondary: var(--maxio-gray-50);
254
+ --maxio-color-border-tertiary: var(--maxio-gray-90);
255
+ --maxio-color-border-inverse: var(--maxio-white-opaque);
256
+ --maxio-color-border-focus: var(--maxio-white-opaque);
257
+ --maxio-color-border-focus-inset: var(--maxio-black-opaque);
258
+ --maxio-color-border-brand: var(--maxio-blue-60);
259
+ --maxio-color-border-info: var(--maxio-blue-60);
260
+ --maxio-color-border-info-secondary: var(--maxio-blue-90);
261
+ --maxio-color-border-success: var(--maxio-green-30);
262
+ --maxio-color-border-success-secondary: var(--maxio-green-90);
263
+ --maxio-color-border-warning: var(--maxio-yellow-30);
264
+ --maxio-color-border-warning-secondary: var(--maxio-yellow-90);
265
+ --maxio-color-border-danger: var(--maxio-red-60);
266
+ --maxio-color-border-danger-secondary: var(--maxio-red-90);
267
+ --maxio-color-border-highlight: var(--maxio-purple-30);
268
+ --maxio-color-border-highlight-secondary: var(--maxio-purple-90);
269
+ --maxio-color-border-avatar: var(--maxio-black-alpha-100);
270
+
271
+ /* icon colors */
272
+ --maxio-color-icon-primary: var(--maxio-white-opaque);
273
+ --maxio-color-icon-secondary: var(--maxio-gray-20);
274
+ --maxio-color-icon-inverse: var(--maxio-black-opaque);
275
+ --maxio-color-icon-disabled: var(--maxio-gray-50);
276
+ --maxio-color-icon-on-bg-fill-disabled: var(--maxio-gray-40);
277
+ --maxio-color-icon-neutral: var(--maxio-gray-30);
278
+ --maxio-color-icon-info: var(--maxio-blue-60);
279
+ --maxio-color-icon-success: var(--maxio-green-30);
280
+ --maxio-color-icon-warning: var(--maxio-yellow-30);
281
+ --maxio-color-icon-danger: var(--maxio-red-60);
282
+ --maxio-color-icon-highlight: var(--maxio-purple-30);
283
+
284
+ /* text colors */
285
+ --maxio-color-text-primary: var(--maxio-white-opaque);
286
+ --maxio-color-text-secondary: var(--maxio-gray-20);
287
+ --maxio-color-text-tertiary: var(--maxio-gray-30);
288
+ --maxio-color-text-inverse: var(--maxio-black-opaque);
289
+ --maxio-color-text-on-bg-fill-disabled: var(--maxio-gray-40);
290
+ --maxio-color-text-disabled: var(--maxio-gray-50);
291
+ --maxio-color-text-danger: var(--maxio-red-60);
292
+ }
package/package.json CHANGED
@@ -1,25 +1,32 @@
1
1
  {
2
2
  "name": "@maxio-com/design-tokens",
3
- "version": "3.1.0",
3
+ "version": "3.2.0-alpha.0",
4
4
  "description": "Design Tokens definition",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
- "types": "typings/index.d.ts",
7
+ "types": "dist/index.d.ts",
8
8
  "author": "engineering@maxio.com",
9
9
  "files": [
10
10
  "dist",
11
- "package.json"
11
+ "package.json",
12
+ "README.md",
13
+ "LICENSE.md"
12
14
  ],
15
+ "exports": {
16
+ ".": "./dist/index.js",
17
+ "./variables.css": "./dist/variables.css",
18
+ "./package.json": "./package.json"
19
+ },
13
20
  "devDependencies": {
14
21
  "rimraf": "^3.0.2",
15
22
  "typescript": "^4.8.4"
16
23
  },
17
24
  "scripts": {
18
25
  "clean": "rimraf -rf dist typings",
19
- "build": "tsc -b"
26
+ "build": "tsc -b && cp src/variables.css dist/variables.css"
20
27
  },
21
28
  "publishConfig": {
22
29
  "access": "public"
23
30
  },
24
- "gitHead": "18ed4f036c650c46199e70fa98b5f5885c39cb4c"
31
+ "gitHead": "b9a255d833bc2b76483127a28679bb53c003ce11"
25
32
  }
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var colors_1 = __importDefault(require("../colors"));
7
- var background = {
8
- neutral: { light: colors_1.default.gray['80'], dark: colors_1.default.gray['40'] },
9
- 'neutral-subtle': {
10
- light: colors_1.default.gray['10'],
11
- dark: colors_1.default.gray['105'],
12
- },
13
- interactive: {
14
- light: colors_1.default.blue['80'],
15
- dark: colors_1.default.blue['40'],
16
- },
17
- info: { light: colors_1.default.blue['80'], dark: colors_1.default.blue['50'] },
18
- 'info-subtle': {
19
- light: colors_1.default.blue['10'],
20
- dark: colors_1.default.blue['105'],
21
- },
22
- success: { light: colors_1.default.green['80'], dark: colors_1.default.green['40'] },
23
- 'success-subtle': {
24
- light: colors_1.default.green['10'],
25
- dark: colors_1.default.green['105'],
26
- },
27
- warning: {
28
- light: colors_1.default.yellow['80'],
29
- dark: colors_1.default.yellow['40'],
30
- },
31
- 'warning-subtle': {
32
- light: colors_1.default.yellow['10'],
33
- dark: colors_1.default.yellow['105'],
34
- },
35
- danger: { light: colors_1.default.red['80'], dark: colors_1.default.red['40'] },
36
- 'danger-subtle': {
37
- light: colors_1.default.red['10'],
38
- dark: colors_1.default.red['105'],
39
- },
40
- highlight: {
41
- light: colors_1.default.purple['80'],
42
- dark: colors_1.default.purple['40'],
43
- },
44
- 'highlight-subtle': {
45
- light: colors_1.default.purple['10'],
46
- dark: colors_1.default.purple['105'],
47
- },
48
- inverse: { light: 'black', dark: 'white' },
49
- };
50
- exports.default = background;
@@ -1,81 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var colors_1 = __importDefault(require("../colors"));
7
- var border = {
8
- interactive: {
9
- light: colors_1.default.blue[80],
10
- dark: colors_1.default.blue[50],
11
- },
12
- subtle: {
13
- light: colors_1.default.gray[20],
14
- dark: colors_1.default.gray[90],
15
- },
16
- neutral: {
17
- light: colors_1.default.gray[60],
18
- dark: colors_1.default.gray[60],
19
- },
20
- strong: {
21
- light: colors_1.default.gray[80],
22
- dark: colors_1.default.gray[40],
23
- },
24
- inverse: {
25
- light: colors_1.default.black,
26
- dark: colors_1.default.white,
27
- },
28
- focus: {
29
- light: colors_1.default.blue[80],
30
- dark: colors_1.default.white,
31
- },
32
- 'focus-inset': {
33
- light: colors_1.default.white,
34
- dark: colors_1.default.black,
35
- },
36
- avatar: {
37
- light: 'rgba(0, 0, 0, 0.08)',
38
- dark: 'rgba(1, 1, 1, 0.08)',
39
- },
40
- info: {
41
- light: colors_1.default.blue[80],
42
- dark: colors_1.default.blue[40],
43
- },
44
- 'info-subtle': {
45
- light: colors_1.default.blue[20],
46
- dark: colors_1.default.blue[90],
47
- },
48
- success: {
49
- light: colors_1.default.green[80],
50
- dark: colors_1.default.green[40],
51
- },
52
- 'success-subtle': {
53
- light: colors_1.default.green[20],
54
- dark: colors_1.default.green[90],
55
- },
56
- warning: {
57
- light: colors_1.default.yellow[80],
58
- dark: colors_1.default.yellow[40],
59
- },
60
- 'warning-subtle': {
61
- light: colors_1.default.yellow[20],
62
- dark: colors_1.default.yellow[90],
63
- },
64
- danger: {
65
- light: colors_1.default.red[80],
66
- dark: colors_1.default.red[40],
67
- },
68
- 'danger-subtle': {
69
- light: colors_1.default.red[20],
70
- dark: colors_1.default.red[90],
71
- },
72
- highlight: {
73
- light: colors_1.default.purple[80],
74
- dark: colors_1.default.purple[40],
75
- },
76
- 'highlight-subtle': {
77
- light: colors_1.default.purple[20],
78
- dark: colors_1.default.purple[90],
79
- },
80
- };
81
- exports.default = border;
@@ -1,61 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var colors_1 = __importDefault(require("../colors"));
7
- var button = {
8
- primary: {
9
- light: colors_1.default.blue[80],
10
- dark: colors_1.default.blue[50],
11
- },
12
- 'primary-hover': {
13
- light: colors_1.default.blue[90],
14
- dark: colors_1.default.blue[40],
15
- },
16
- 'primary-active': {
17
- light: colors_1.default.blue[100],
18
- dark: colors_1.default.blue[30],
19
- },
20
- secondary: {
21
- light: colors_1.default.black,
22
- dark: colors_1.default.white,
23
- },
24
- 'secondary-hover': {
25
- light: colors_1.default.gray[100],
26
- dark: colors_1.default.gray['05'],
27
- },
28
- 'secondary-active': {
29
- light: colors_1.default.gray[90],
30
- dark: colors_1.default.gray[10],
31
- },
32
- tertiary: {
33
- light: colors_1.default.gray[10],
34
- dark: colors_1.default.gray[90],
35
- },
36
- 'tertiary-hover': {
37
- light: colors_1.default.gray[20],
38
- dark: colors_1.default.gray[80],
39
- },
40
- 'tertiary-active': {
41
- light: colors_1.default.gray[30],
42
- dark: colors_1.default.gray[70],
43
- },
44
- danger: {
45
- light: colors_1.default.red[80],
46
- dark: colors_1.default.red[50],
47
- },
48
- 'danger-hover': {
49
- light: colors_1.default.red[90],
50
- dark: colors_1.default.red[40],
51
- },
52
- 'danger-active': {
53
- light: colors_1.default.red[100],
54
- dark: colors_1.default.red[30],
55
- },
56
- disabled: {
57
- light: colors_1.default.gray[30],
58
- dark: colors_1.default.gray[80],
59
- },
60
- };
61
- exports.default = button;
@@ -1,78 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.icon = void 0;
7
- var colors_1 = __importDefault(require("../colors"));
8
- exports.icon = {
9
- primary: {
10
- light: colors_1.default.black,
11
- dark: colors_1.default.white,
12
- },
13
- secondary: {
14
- light: colors_1.default.gray['90'],
15
- dark: colors_1.default.gray['50'],
16
- },
17
- inverse: {
18
- light: colors_1.default.white,
19
- dark: colors_1.default.black,
20
- },
21
- 'on-color': {
22
- light: colors_1.default.white,
23
- dark: colors_1.default.white,
24
- },
25
- 'on-color-disabled': {
26
- light: colors_1.default.gray['70'],
27
- dark: colors_1.default.gray['50'],
28
- },
29
- disabled: {
30
- light: colors_1.default.gray['60'],
31
- dark: colors_1.default.gray['70'],
32
- },
33
- neutral: {
34
- light: colors_1.default.gray['60'],
35
- dark: colors_1.default.gray['60'],
36
- },
37
- info: {
38
- light: colors_1.default.blue['80'],
39
- dark: colors_1.default.blue['40'],
40
- },
41
- 'info-subtle': {
42
- light: colors_1.default.blue['30'],
43
- dark: colors_1.default.blue['80'],
44
- },
45
- success: {
46
- light: colors_1.default.green['80'],
47
- dark: colors_1.default.green['40'],
48
- },
49
- 'success-subtle': {
50
- light: colors_1.default.green['30'],
51
- dark: colors_1.default.green['80'],
52
- },
53
- warning: {
54
- light: colors_1.default.yellow['80'],
55
- dark: colors_1.default.yellow['40'],
56
- },
57
- 'warning-subtle': {
58
- light: colors_1.default.yellow['30'],
59
- dark: colors_1.default.yellow['80'],
60
- },
61
- danger: {
62
- light: colors_1.default.red['80'],
63
- dark: colors_1.default.red['40'],
64
- },
65
- 'danger-subtle': {
66
- light: colors_1.default.red['30'],
67
- dark: colors_1.default.red['80'],
68
- },
69
- highlight: {
70
- light: colors_1.default.purple['80'],
71
- dark: colors_1.default.purple['40'],
72
- },
73
- 'highlight-subtle': {
74
- light: colors_1.default.purple['30'],
75
- dark: colors_1.default.purple['80'],
76
- },
77
- };
78
- exports.default = exports.icon;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.text = exports.skeleton = exports.loading = exports.icon = exports.button = exports.border = exports.background = void 0;
7
- var background_1 = require("./background");
8
- Object.defineProperty(exports, "background", { enumerable: true, get: function () { return __importDefault(background_1).default; } });
9
- var border_1 = require("./border");
10
- Object.defineProperty(exports, "border", { enumerable: true, get: function () { return __importDefault(border_1).default; } });
11
- var button_1 = require("./button");
12
- Object.defineProperty(exports, "button", { enumerable: true, get: function () { return __importDefault(button_1).default; } });
13
- var icon_1 = require("./icon");
14
- Object.defineProperty(exports, "icon", { enumerable: true, get: function () { return __importDefault(icon_1).default; } });
15
- var loading_1 = require("./loading");
16
- Object.defineProperty(exports, "loading", { enumerable: true, get: function () { return __importDefault(loading_1).default; } });
17
- var skeleton_1 = require("./skeleton");
18
- Object.defineProperty(exports, "skeleton", { enumerable: true, get: function () { return __importDefault(skeleton_1).default; } });
19
- var text_1 = require("./text");
20
- Object.defineProperty(exports, "text", { enumerable: true, get: function () { return __importDefault(text_1).default; } });
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.loading = void 0;
7
- var colors_1 = __importDefault(require("../colors"));
8
- exports.loading = {
9
- track: {
10
- light: 'rgba(0, 0, 0, 0.16)',
11
- dark: 'rgba(1, 1, 1, 0.32)',
12
- },
13
- 'track-inverse': {
14
- light: 'rgba(1, 1, 1, 0.32)',
15
- dark: 'rgba(0, 0, 0, 0.16)',
16
- },
17
- bar: {
18
- light: colors_1.default.blue[80],
19
- dark: 'white',
20
- },
21
- 'bar-inverse': {
22
- light: 'white',
23
- dark: 'black',
24
- },
25
- };
26
- exports.default = exports.loading;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.skeleton = void 0;
7
- var colors_1 = __importDefault(require("../colors"));
8
- exports.skeleton = {
9
- background: {
10
- light: colors_1.default.gray[10],
11
- dark: colors_1.default.gray[90],
12
- },
13
- element: {
14
- light: colors_1.default.gray[30],
15
- dark: colors_1.default.gray[70],
16
- },
17
- };
18
- exports.default = exports.skeleton;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var colors_1 = __importDefault(require("../colors"));
7
- var text = {
8
- primary: {
9
- light: colors_1.default.black,
10
- dark: colors_1.default.white,
11
- },
12
- secondary: {
13
- light: colors_1.default.gray['90'],
14
- dark: colors_1.default.gray['20'],
15
- },
16
- placeholder: {
17
- light: colors_1.default.gray['80'],
18
- dark: colors_1.default.gray['40'],
19
- },
20
- 'on-color-disabled': {
21
- light: colors_1.default.gray['70'],
22
- dark: colors_1.default.gray['50'],
23
- },
24
- disabled: {
25
- light: colors_1.default.gray['60'],
26
- dark: colors_1.default.gray['70'],
27
- },
28
- inverse: {
29
- light: colors_1.default.white,
30
- dark: colors_1.default.black,
31
- },
32
- 'on-color': {
33
- light: colors_1.default.white,
34
- dark: colors_1.default.white,
35
- },
36
- danger: {
37
- light: colors_1.default.red['80'],
38
- dark: colors_1.default.red['40'],
39
- },
40
- };
41
- exports.default = text;