@trackunit/ui-design-tokens 0.0.43 → 0.0.45
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/index.d.ts +1 -6
- package/index.js +550 -185
- package/package.json +2 -6
- package/scripts/generate-css.d.ts +1 -0
- package/tokens/colors/color.d.ts +35 -0
- package/tokens/colors/colors.d.ts +21 -0
- package/tokens/colors/index.d.ts +4 -0
- package/tokens/colors/tailwindPalette.d.ts +270 -0
- package/tokens/colors/trackunitPalette.d.ts +754 -0
- package/tokens/tokens.d.ts +0 -2
- package/tokens/utils/colorVariableToCss.d.ts +12 -0
- package/tokens/{getHEX.d.ts → utils/getHEX.d.ts} +1 -1
- package/tokens/{getValues.d.ts → utils/getValuesFromDesignToken.d.ts} +1 -1
- package/tokens/colors.d.ts +0 -163
- package/tokens/mediaQuery.d.ts +0 -40
package/tokens/tokens.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Colors } from "./colors";
|
|
2
1
|
import { Elevation } from "./elevation";
|
|
3
2
|
import { Size } from "./size";
|
|
4
3
|
import { FontSize, FontWeight } from "./typography";
|
|
5
4
|
import { ZIndex } from "./zIndex";
|
|
6
5
|
export interface Tokens {
|
|
7
|
-
colors: Colors;
|
|
8
6
|
size: Size;
|
|
9
7
|
fontSize: FontSize;
|
|
10
8
|
fontWeight: FontWeight;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a css custom property from our design tokens to a useable css string.
|
|
3
|
+
*
|
|
4
|
+
* Our custom properties are saved as "rrr ggg bbb" rather than a full css color.
|
|
5
|
+
*
|
|
6
|
+
* This allows us to modify them with opacity values and more.
|
|
7
|
+
*
|
|
8
|
+
* @param variable CSS custom property for color
|
|
9
|
+
* @returns Full css for using the color
|
|
10
|
+
* @example "--color-primart-400" --> "rgb(var(--color-primary-400) / var(--tw-bg-opacity)))"
|
|
11
|
+
*/
|
|
12
|
+
export declare function colorVariableToCss(variable: string): string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Returns the HEX color based on a Color from the theme.
|
|
3
3
|
* Reads the RGB value from the underlying CSS variable and convert to HEX.
|
|
4
4
|
*
|
|
5
|
-
* Example:
|
|
5
|
+
* Example: color("PRIMARY", 500, "HEX") -> #3b82f6
|
|
6
6
|
*
|
|
7
7
|
* @param variable A color from the `colors` object of the Theme
|
|
8
8
|
* @returns HEX color
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Reads the value of the CSS custom Property
|
|
2
|
+
* Reads the value of the CSS custom Property.
|
|
3
3
|
* ATTENTION: For colors use getHEX
|
|
4
4
|
*/
|
|
5
5
|
export declare function getValuesFromDesignToken(designToken: string | number): string | number;
|
package/tokens/colors.d.ts
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The values assigned are loosely based on the hue/neutral's
|
|
3
|
-
* respective relative luminance, where 0% is black and 100% is white.
|
|
4
|
-
* However, it is slightly adjusted to be in reverse, where X0 will
|
|
5
|
-
* always represent the lightest version, while X100 will present the
|
|
6
|
-
* darkest version of a hue/neutral.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getColorValue(variable: string): string;
|
|
9
|
-
export declare const black = "#1a1b1c";
|
|
10
|
-
export declare const white = "#fff";
|
|
11
|
-
export declare const neutral: {
|
|
12
|
-
readonly N5: string;
|
|
13
|
-
readonly N10: string;
|
|
14
|
-
readonly N20: string;
|
|
15
|
-
readonly N30: string;
|
|
16
|
-
readonly N40: string;
|
|
17
|
-
readonly N50: string;
|
|
18
|
-
readonly N60: string;
|
|
19
|
-
readonly N70: string;
|
|
20
|
-
readonly N80: string;
|
|
21
|
-
readonly N90: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const blue: {
|
|
24
|
-
readonly B5: string;
|
|
25
|
-
readonly B10: string;
|
|
26
|
-
readonly B20: string;
|
|
27
|
-
readonly B30: string;
|
|
28
|
-
readonly B40: string;
|
|
29
|
-
readonly B50: string;
|
|
30
|
-
readonly B60: string;
|
|
31
|
-
readonly B70: string;
|
|
32
|
-
readonly B80: string;
|
|
33
|
-
readonly B90: string;
|
|
34
|
-
};
|
|
35
|
-
export declare const green: {
|
|
36
|
-
readonly G5: string;
|
|
37
|
-
readonly G10: string;
|
|
38
|
-
readonly G20: string;
|
|
39
|
-
readonly G30: string;
|
|
40
|
-
readonly G40: string;
|
|
41
|
-
readonly G50: string;
|
|
42
|
-
readonly G60: string;
|
|
43
|
-
readonly G70: string;
|
|
44
|
-
readonly G80: string;
|
|
45
|
-
readonly G90: string;
|
|
46
|
-
};
|
|
47
|
-
export declare const red: {
|
|
48
|
-
readonly R5: string;
|
|
49
|
-
readonly R10: string;
|
|
50
|
-
readonly R20: string;
|
|
51
|
-
readonly R30: string;
|
|
52
|
-
readonly R40: string;
|
|
53
|
-
readonly R50: string;
|
|
54
|
-
readonly R60: string;
|
|
55
|
-
readonly R70: string;
|
|
56
|
-
readonly R80: string;
|
|
57
|
-
readonly R90: string;
|
|
58
|
-
};
|
|
59
|
-
export declare const orange: {
|
|
60
|
-
readonly O5: string;
|
|
61
|
-
readonly O10: string;
|
|
62
|
-
readonly O20: string;
|
|
63
|
-
readonly O30: string;
|
|
64
|
-
readonly O40: string;
|
|
65
|
-
readonly O50: string;
|
|
66
|
-
readonly O60: string;
|
|
67
|
-
readonly O70: string;
|
|
68
|
-
readonly O80: string;
|
|
69
|
-
readonly O90: string;
|
|
70
|
-
};
|
|
71
|
-
export declare const purple: {
|
|
72
|
-
readonly P5: string;
|
|
73
|
-
readonly P10: string;
|
|
74
|
-
readonly P20: string;
|
|
75
|
-
readonly P30: string;
|
|
76
|
-
readonly P40: string;
|
|
77
|
-
readonly P50: string;
|
|
78
|
-
readonly P60: string;
|
|
79
|
-
readonly P70: string;
|
|
80
|
-
readonly P80: string;
|
|
81
|
-
readonly P90: string;
|
|
82
|
-
};
|
|
83
|
-
export declare const utilization: {
|
|
84
|
-
working: string;
|
|
85
|
-
moving: string;
|
|
86
|
-
idling: string;
|
|
87
|
-
stopped: string;
|
|
88
|
-
active: string;
|
|
89
|
-
operating: string;
|
|
90
|
-
};
|
|
91
|
-
export declare const colors: {
|
|
92
|
-
readonly utilization: {
|
|
93
|
-
working: string;
|
|
94
|
-
moving: string;
|
|
95
|
-
idling: string;
|
|
96
|
-
stopped: string;
|
|
97
|
-
active: string;
|
|
98
|
-
operating: string;
|
|
99
|
-
};
|
|
100
|
-
readonly black: "#1a1b1c";
|
|
101
|
-
readonly white: "#fff";
|
|
102
|
-
readonly P5: string;
|
|
103
|
-
readonly P10: string;
|
|
104
|
-
readonly P20: string;
|
|
105
|
-
readonly P30: string;
|
|
106
|
-
readonly P40: string;
|
|
107
|
-
readonly P50: string;
|
|
108
|
-
readonly P60: string;
|
|
109
|
-
readonly P70: string;
|
|
110
|
-
readonly P80: string;
|
|
111
|
-
readonly P90: string;
|
|
112
|
-
readonly O5: string;
|
|
113
|
-
readonly O10: string;
|
|
114
|
-
readonly O20: string;
|
|
115
|
-
readonly O30: string;
|
|
116
|
-
readonly O40: string;
|
|
117
|
-
readonly O50: string;
|
|
118
|
-
readonly O60: string;
|
|
119
|
-
readonly O70: string;
|
|
120
|
-
readonly O80: string;
|
|
121
|
-
readonly O90: string;
|
|
122
|
-
readonly R5: string;
|
|
123
|
-
readonly R10: string;
|
|
124
|
-
readonly R20: string;
|
|
125
|
-
readonly R30: string;
|
|
126
|
-
readonly R40: string;
|
|
127
|
-
readonly R50: string;
|
|
128
|
-
readonly R60: string;
|
|
129
|
-
readonly R70: string;
|
|
130
|
-
readonly R80: string;
|
|
131
|
-
readonly R90: string;
|
|
132
|
-
readonly G5: string;
|
|
133
|
-
readonly G10: string;
|
|
134
|
-
readonly G20: string;
|
|
135
|
-
readonly G30: string;
|
|
136
|
-
readonly G40: string;
|
|
137
|
-
readonly G50: string;
|
|
138
|
-
readonly G60: string;
|
|
139
|
-
readonly G70: string;
|
|
140
|
-
readonly G80: string;
|
|
141
|
-
readonly G90: string;
|
|
142
|
-
readonly B5: string;
|
|
143
|
-
readonly B10: string;
|
|
144
|
-
readonly B20: string;
|
|
145
|
-
readonly B30: string;
|
|
146
|
-
readonly B40: string;
|
|
147
|
-
readonly B50: string;
|
|
148
|
-
readonly B60: string;
|
|
149
|
-
readonly B70: string;
|
|
150
|
-
readonly B80: string;
|
|
151
|
-
readonly B90: string;
|
|
152
|
-
readonly N5: string;
|
|
153
|
-
readonly N10: string;
|
|
154
|
-
readonly N20: string;
|
|
155
|
-
readonly N30: string;
|
|
156
|
-
readonly N40: string;
|
|
157
|
-
readonly N50: string;
|
|
158
|
-
readonly N60: string;
|
|
159
|
-
readonly N70: string;
|
|
160
|
-
readonly N80: string;
|
|
161
|
-
readonly N90: string;
|
|
162
|
-
};
|
|
163
|
-
export declare type Colors = typeof colors;
|
package/tokens/mediaQuery.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare const breakpoints: {
|
|
2
|
-
xs: number;
|
|
3
|
-
sm: number;
|
|
4
|
-
md: number;
|
|
5
|
-
lg: number;
|
|
6
|
-
xl: number;
|
|
7
|
-
xxl: number;
|
|
8
|
-
xxxl: number;
|
|
9
|
-
};
|
|
10
|
-
export declare type Breakpoint = keyof typeof breakpoints;
|
|
11
|
-
/**
|
|
12
|
-
* Track units media queries.
|
|
13
|
-
*/
|
|
14
|
-
export declare const mediaQuery: import("styled-media-query").MediaGenerator<{
|
|
15
|
-
xs: string;
|
|
16
|
-
sm: string;
|
|
17
|
-
md: string;
|
|
18
|
-
lg: string;
|
|
19
|
-
xl: string;
|
|
20
|
-
xxl: string;
|
|
21
|
-
xxxl: string;
|
|
22
|
-
}, any>;
|
|
23
|
-
export declare const windowWidth: {
|
|
24
|
-
lessThan: (size: keyof typeof breakpoints) => boolean;
|
|
25
|
-
greaterThan: (size: keyof typeof breakpoints) => boolean;
|
|
26
|
-
between: (first: keyof typeof breakpoints, second: keyof typeof breakpoints) => boolean;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
--------
|
|
30
|
-
BOOTSTRAP
|
|
31
|
-
--------
|
|
32
|
-
grid-breakpoints: (
|
|
33
|
-
xs: 0,
|
|
34
|
-
sm: 576px,
|
|
35
|
-
md: 768px,
|
|
36
|
-
lg: 992px,
|
|
37
|
-
xl: 1200px,
|
|
38
|
-
xxl: 1400px
|
|
39
|
-
);
|
|
40
|
-
*/
|