@maxio-com/design-tokens 3.2.0 → 3.3.1
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 +1 -1
- package/README.md +61 -2
- package/dist/colors.d.ts +90 -0
- package/dist/colors.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -26
- package/dist/semantic-colors.d.ts +210 -0
- package/dist/semantic-colors.d.ts.map +1 -0
- package/dist/typography.d.ts +54 -0
- package/dist/typography.d.ts.map +1 -0
- package/dist/variables.css +292 -0
- package/package.json +12 -5
package/LICENSE.MD
CHANGED
package/README.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# Design Tokens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Maxio UI Design Tokens
|
|
4
4
|
|
|
5
|
-
This package is used to store and maintain design tokens for Maxio UI.
|
|
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
|
+
## Dark mode
|
|
36
|
+
|
|
37
|
+
Semantic tokens are composed in a way that they can be used in both light and dark mode. This means that you can use the same tokens for both light and dark mode, and the tokens will automatically adjust to the mode.
|
|
38
|
+
|
|
39
|
+
We use data attribute (`[data-maxio-dark-mode]`) to toggle dark mode. It allows to control the dark mode per component, and it also allows to control the dark mode globally.
|
|
40
|
+
|
|
41
|
+
```css
|
|
42
|
+
.my-component {
|
|
43
|
+
background-color: var(--maxio-color-bg-primary);
|
|
44
|
+
color: var(--maxio-color-text-primary);
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<!-- regular component -->
|
|
50
|
+
<div class="my-component">...</div>
|
|
51
|
+
|
|
52
|
+
<!-- dark mode -->
|
|
53
|
+
<div class="my-component" data-maxio-dark-mode>...</div>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## FAQ
|
|
57
|
+
|
|
58
|
+
### How do I use these tokens?
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
### How do I update these tokens?
|
|
63
|
+
|
|
64
|
+
You can update these tokens by modifying the CSS file in this package and submitting a PR.
|
package/dist/colors.d.ts
ADDED
|
@@ -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"}
|
package/dist/index.d.ts
ADDED
|
@@ -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.
|
|
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,210 @@
|
|
|
1
|
+
declare const bg: {
|
|
2
|
+
primary: {
|
|
3
|
+
light: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
hover: {
|
|
6
|
+
light: string;
|
|
7
|
+
dark: string;
|
|
8
|
+
};
|
|
9
|
+
active: {
|
|
10
|
+
light: string;
|
|
11
|
+
dark: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
secondary: {
|
|
15
|
+
light: string;
|
|
16
|
+
dark: string;
|
|
17
|
+
hover: {
|
|
18
|
+
light: string;
|
|
19
|
+
dark: string;
|
|
20
|
+
};
|
|
21
|
+
active: {
|
|
22
|
+
light: string;
|
|
23
|
+
dark: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
tertiary: {
|
|
27
|
+
light: string;
|
|
28
|
+
dark: string;
|
|
29
|
+
hover: {
|
|
30
|
+
light: string;
|
|
31
|
+
dark: string;
|
|
32
|
+
};
|
|
33
|
+
active: {
|
|
34
|
+
light: string;
|
|
35
|
+
dark: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
inverse: {
|
|
39
|
+
light: string;
|
|
40
|
+
dark: string;
|
|
41
|
+
hover: {
|
|
42
|
+
light: string;
|
|
43
|
+
dark: string;
|
|
44
|
+
};
|
|
45
|
+
active: {
|
|
46
|
+
light: string;
|
|
47
|
+
dark: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
neutral: {
|
|
51
|
+
light: string;
|
|
52
|
+
dark: string;
|
|
53
|
+
};
|
|
54
|
+
info: {
|
|
55
|
+
light: string;
|
|
56
|
+
dark: string;
|
|
57
|
+
};
|
|
58
|
+
success: {
|
|
59
|
+
light: string;
|
|
60
|
+
dark: string;
|
|
61
|
+
};
|
|
62
|
+
warning: {
|
|
63
|
+
light: string;
|
|
64
|
+
dark: string;
|
|
65
|
+
};
|
|
66
|
+
danger: {
|
|
67
|
+
light: string;
|
|
68
|
+
dark: string;
|
|
69
|
+
};
|
|
70
|
+
highlight: {
|
|
71
|
+
light: string;
|
|
72
|
+
dark: string;
|
|
73
|
+
};
|
|
74
|
+
fill: {
|
|
75
|
+
brand: {
|
|
76
|
+
light: string;
|
|
77
|
+
dark: string;
|
|
78
|
+
hover: {
|
|
79
|
+
light: string;
|
|
80
|
+
dark: string;
|
|
81
|
+
};
|
|
82
|
+
active: {
|
|
83
|
+
light: string;
|
|
84
|
+
dark: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
neutral: {
|
|
88
|
+
light: string;
|
|
89
|
+
dark: string;
|
|
90
|
+
};
|
|
91
|
+
info: {
|
|
92
|
+
light: string;
|
|
93
|
+
dark: string;
|
|
94
|
+
};
|
|
95
|
+
success: {
|
|
96
|
+
light: string;
|
|
97
|
+
dark: string;
|
|
98
|
+
};
|
|
99
|
+
warning: {
|
|
100
|
+
light: string;
|
|
101
|
+
dark: string;
|
|
102
|
+
};
|
|
103
|
+
danger: {
|
|
104
|
+
light: string;
|
|
105
|
+
dark: string;
|
|
106
|
+
hover: {
|
|
107
|
+
light: string;
|
|
108
|
+
dark: string;
|
|
109
|
+
};
|
|
110
|
+
active: {
|
|
111
|
+
light: string;
|
|
112
|
+
dark: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
highlight: {
|
|
116
|
+
light: string;
|
|
117
|
+
dark: string;
|
|
118
|
+
};
|
|
119
|
+
disabled: {
|
|
120
|
+
light: string;
|
|
121
|
+
dark: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
declare const border: {
|
|
126
|
+
primary: {
|
|
127
|
+
light: string;
|
|
128
|
+
dark: string;
|
|
129
|
+
};
|
|
130
|
+
secondary: {
|
|
131
|
+
light: string;
|
|
132
|
+
dark: string;
|
|
133
|
+
};
|
|
134
|
+
tertiary: {
|
|
135
|
+
light: string;
|
|
136
|
+
dark: string;
|
|
137
|
+
};
|
|
138
|
+
inverse: {
|
|
139
|
+
light: string;
|
|
140
|
+
dark: string;
|
|
141
|
+
};
|
|
142
|
+
focus: {
|
|
143
|
+
light: string;
|
|
144
|
+
dark: string;
|
|
145
|
+
};
|
|
146
|
+
'focus-inset': {
|
|
147
|
+
light: string;
|
|
148
|
+
dark: string;
|
|
149
|
+
};
|
|
150
|
+
brand: {
|
|
151
|
+
light: string;
|
|
152
|
+
dark: string;
|
|
153
|
+
};
|
|
154
|
+
info: {
|
|
155
|
+
light: string;
|
|
156
|
+
dark: string;
|
|
157
|
+
};
|
|
158
|
+
'info-secondary': {
|
|
159
|
+
light: string;
|
|
160
|
+
dark: string;
|
|
161
|
+
};
|
|
162
|
+
success: {
|
|
163
|
+
light: string;
|
|
164
|
+
dark: string;
|
|
165
|
+
};
|
|
166
|
+
'success-secondary': {
|
|
167
|
+
light: string;
|
|
168
|
+
dark: string;
|
|
169
|
+
};
|
|
170
|
+
warning: {
|
|
171
|
+
light: string;
|
|
172
|
+
dark: string;
|
|
173
|
+
};
|
|
174
|
+
'warning-secondary': {
|
|
175
|
+
light: string;
|
|
176
|
+
dark: string;
|
|
177
|
+
};
|
|
178
|
+
danger: {
|
|
179
|
+
light: string;
|
|
180
|
+
dark: string;
|
|
181
|
+
};
|
|
182
|
+
'danger-secondary': {
|
|
183
|
+
light: string;
|
|
184
|
+
dark: string;
|
|
185
|
+
};
|
|
186
|
+
highlight: {
|
|
187
|
+
light: string;
|
|
188
|
+
dark: string;
|
|
189
|
+
};
|
|
190
|
+
'highlight-secondary': {
|
|
191
|
+
light: string;
|
|
192
|
+
dark: string;
|
|
193
|
+
};
|
|
194
|
+
avatar: {
|
|
195
|
+
light: string;
|
|
196
|
+
dark: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
declare const icon: {
|
|
200
|
+
primary: {
|
|
201
|
+
light: string;
|
|
202
|
+
dark: string;
|
|
203
|
+
};
|
|
204
|
+
secondary: {
|
|
205
|
+
light: string;
|
|
206
|
+
dark: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
export { bg, border, icon };
|
|
210
|
+
//# sourceMappingURL=semantic-colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic-colors.d.ts","sourceRoot":"","sources":["../src/semantic-colors.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4IP,CAAC;AAEF,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEX,CAAC;AAEF,QAAA,MAAM,IAAI;;;;;;;;;CAST,CAAC;AAEF,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -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
|
+
[data-maxio-dark-mode] {
|
|
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.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Design Tokens definition",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
-
"types": "
|
|
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": "
|
|
31
|
+
"gitHead": "828a8d013482730bc73097820a2835e533d91802"
|
|
25
32
|
}
|