@trackunit/ui-design-tokens 0.0.69 → 0.0.72

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.
@@ -1,27 +1,27 @@
1
- /**
2
- * A collection of all the tokens related to elevation in the theme.
3
- */
4
- export declare const themeBoxShadow: {
5
- readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
6
- readonly DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
7
- readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
8
- readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
9
- readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
10
- readonly "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)";
11
- readonly inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)";
12
- readonly none: "none";
13
- readonly active: "0px 0px 1px 1px rgba(26, 27, 28, 0.13), 0px 1px 1px rgba(26, 27, 28, 0.15)";
14
- };
15
- /**
16
- * Elevation is based on N100 with an alpha channel. E(X)A variants
17
- * are for active versions(e.g. hover).
18
- */
19
- export declare const elevation: {
20
- readonly E05: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
21
- readonly E10: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
22
- readonly E10A: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
23
- readonly E20: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
24
- readonly E30: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
25
- readonly E40: "0 25px 50px -12px rgb(0 0 0 / 0.25)";
26
- };
27
- export type Elevation = typeof elevation;
1
+ /**
2
+ * A collection of all the tokens related to elevation in the theme.
3
+ */
4
+ export declare const themeBoxShadow: {
5
+ readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
6
+ readonly DEFAULT: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
7
+ readonly md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
8
+ readonly lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
9
+ readonly xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
10
+ readonly "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)";
11
+ readonly inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)";
12
+ readonly none: "none";
13
+ readonly active: "0px 0px 1px 1px rgba(26, 27, 28, 0.13), 0px 1px 1px rgba(26, 27, 28, 0.15)";
14
+ };
15
+ /**
16
+ * Elevation is based on N100 with an alpha channel. E(X)A variants
17
+ * are for active versions(e.g. hover).
18
+ */
19
+ export declare const elevation: {
20
+ readonly E05: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
21
+ readonly E10: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
22
+ readonly E10A: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
23
+ readonly E20: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
24
+ readonly E30: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
25
+ readonly E40: "0 25px 50px -12px rgb(0 0 0 / 0.25)";
26
+ };
27
+ export type Elevation = typeof elevation;
@@ -1,12 +1,12 @@
1
- /**
2
- * A collection of all the tokens related to screen size in the theme.
3
- */
4
- export declare const themeScreenSize: {
5
- readonly xs: "0px";
6
- readonly sm: "480px";
7
- readonly md: "768px";
8
- readonly lg: "1024px";
9
- readonly xl: "1200px";
10
- readonly "2xl": "1600px";
11
- readonly "3xl": "1900px";
12
- };
1
+ /**
2
+ * A collection of all the tokens related to screen size in the theme.
3
+ */
4
+ export declare const themeScreenSize: {
5
+ readonly xs: "0px";
6
+ readonly sm: "480px";
7
+ readonly md: "768px";
8
+ readonly lg: "1024px";
9
+ readonly xl: "1200px";
10
+ readonly "2xl": "1600px";
11
+ readonly "3xl": "1900px";
12
+ };
@@ -1,51 +1,51 @@
1
- /**
2
- * A collection of all the tokens related to sizes in the theme.
3
- */
4
- export declare const themeSpacing: {
5
- readonly px: "1px";
6
- readonly "0": "0px";
7
- readonly "0.5": "0.125rem";
8
- readonly "1": "0.25rem";
9
- readonly "1.5": "0.375rem";
10
- readonly "2": "0.5rem";
11
- readonly "2.5": "0.625rem";
12
- readonly "3": "0.75rem";
13
- readonly "3.5": "0.875rem";
14
- readonly "4": "1rem";
15
- readonly "5": "1.25rem";
16
- readonly "6": "1.5rem";
17
- readonly "7": "1.75rem";
18
- readonly "8": "2rem";
19
- readonly "9": "2.25rem";
20
- readonly "10": "2.5rem";
21
- readonly "11": "2.75rem";
22
- readonly "12": "3rem";
23
- readonly "14": "3.5rem";
24
- readonly "16": "4rem";
25
- readonly "20": "5rem";
26
- readonly "24": "6rem";
27
- readonly "28": "7rem";
28
- readonly "32": "8rem";
29
- readonly "36": "9rem";
30
- readonly "40": "10rem";
31
- readonly "44": "11rem";
32
- readonly "48": "12rem";
33
- readonly "52": "13rem";
34
- readonly "56": "14rem";
35
- readonly "60": "15rem";
36
- readonly "64": "16rem";
37
- readonly "72": "18rem";
38
- readonly "80": "20rem";
39
- readonly "96": "24rem";
40
- };
41
- export declare const size: {
42
- readonly none: "0px";
43
- readonly tiny: "0.25rem";
44
- readonly mini: "0.5rem";
45
- readonly small: "0.75rem";
46
- readonly medium: "1rem";
47
- readonly large: "1.5rem";
48
- readonly giant: "2rem";
49
- readonly enormous: "2.5rem";
50
- };
51
- export type Size = typeof size;
1
+ /**
2
+ * A collection of all the tokens related to sizes in the theme.
3
+ */
4
+ export declare const themeSpacing: {
5
+ readonly px: "1px";
6
+ readonly "0": "0px";
7
+ readonly "0.5": "0.125rem";
8
+ readonly "1": "0.25rem";
9
+ readonly "1.5": "0.375rem";
10
+ readonly "2": "0.5rem";
11
+ readonly "2.5": "0.625rem";
12
+ readonly "3": "0.75rem";
13
+ readonly "3.5": "0.875rem";
14
+ readonly "4": "1rem";
15
+ readonly "5": "1.25rem";
16
+ readonly "6": "1.5rem";
17
+ readonly "7": "1.75rem";
18
+ readonly "8": "2rem";
19
+ readonly "9": "2.25rem";
20
+ readonly "10": "2.5rem";
21
+ readonly "11": "2.75rem";
22
+ readonly "12": "3rem";
23
+ readonly "14": "3.5rem";
24
+ readonly "16": "4rem";
25
+ readonly "20": "5rem";
26
+ readonly "24": "6rem";
27
+ readonly "28": "7rem";
28
+ readonly "32": "8rem";
29
+ readonly "36": "9rem";
30
+ readonly "40": "10rem";
31
+ readonly "44": "11rem";
32
+ readonly "48": "12rem";
33
+ readonly "52": "13rem";
34
+ readonly "56": "14rem";
35
+ readonly "60": "15rem";
36
+ readonly "64": "16rem";
37
+ readonly "72": "18rem";
38
+ readonly "80": "20rem";
39
+ readonly "96": "24rem";
40
+ };
41
+ export declare const size: {
42
+ readonly none: "0px";
43
+ readonly tiny: "0.25rem";
44
+ readonly mini: "0.5rem";
45
+ readonly small: "0.75rem";
46
+ readonly medium: "1rem";
47
+ readonly large: "1.5rem";
48
+ readonly giant: "2rem";
49
+ readonly enormous: "2.5rem";
50
+ };
51
+ export type Size = typeof size;
@@ -1,59 +1,60 @@
1
- /**
2
- * A collection of all the tokens related to typography in the theme.
3
- */
4
- export declare const themeFontSize: {
5
- readonly xs: "0.75rem";
6
- readonly sm: "0.875rem";
7
- readonly base: "1rem";
8
- readonly lg: "1.125rem";
9
- readonly xl: "1.25rem";
10
- readonly "2xl": "1.5rem";
11
- readonly "3xl": "1.875rem";
12
- readonly "4xl": "2.25rem";
13
- readonly "5xl": "3rem";
14
- readonly "6xl": "3.75rem";
15
- readonly "7xl": "4.5rem";
16
- readonly "8xl": "6rem";
17
- readonly "9xl": "8rem";
18
- };
19
- export type ThemeFontSize = typeof themeFontSize;
20
- export type fontSizeKeys = keyof typeof themeFontSize;
21
- export declare const themeLineHeight: {
22
- [key in fontSizeKeys]: string;
23
- };
24
- export declare const themeFontWeight: {
25
- readonly thin: 100;
26
- readonly extralight: 200;
27
- readonly light: 300;
28
- readonly normal: 400;
29
- readonly medium: 500;
30
- readonly bold: 600;
31
- readonly extrabold: 700;
32
- readonly black: 800;
33
- };
34
- /**
35
- * Based on a root size of 16px.
36
- */
37
- export declare const fontSize: {
38
- readonly primary: "1.875rem";
39
- readonly secondary: "1.125rem";
40
- readonly tertiary: "1rem";
41
- readonly subtitle: "1rem";
42
- readonly body: "0.875rem";
43
- readonly small: "0.75rem";
44
- };
45
- export type FontSize = typeof fontSize;
46
- /**
47
- * Primary font weights.
48
- */
49
- export declare const fontWeight: {
50
- readonly thin: 100;
51
- readonly extralight: 200;
52
- readonly light: 300;
53
- readonly normal: 400;
54
- readonly medium: 500;
55
- readonly bold: 600;
56
- readonly extrabold: 700;
57
- readonly black: 800;
58
- };
59
- export type FontWeight = typeof fontWeight;
1
+ /**
2
+ * A collection of all the tokens related to typography in the theme.
3
+ */
4
+ export declare const themeFontSize: {
5
+ readonly xs: "0.75rem";
6
+ readonly sm: "0.875rem";
7
+ readonly base: "1rem";
8
+ readonly lg: "1.125rem";
9
+ readonly xl: "1.25rem";
10
+ readonly "2xl": "1.5rem";
11
+ readonly "3xl": "1.875rem";
12
+ readonly "4xl": "2.25rem";
13
+ readonly "5xl": "3rem";
14
+ readonly "6xl": "3.75rem";
15
+ readonly "7xl": "4.5rem";
16
+ readonly "8xl": "6rem";
17
+ readonly "9xl": "8rem";
18
+ };
19
+ export type ThemeFontSize = typeof themeFontSize;
20
+ export type fontSizeKeys = keyof typeof themeFontSize;
21
+ export declare const themeLineHeight: {
22
+ [key in fontSizeKeys]: string;
23
+ };
24
+ export declare const themeFontWeight: {
25
+ readonly thin: 100;
26
+ readonly extralight: 200;
27
+ readonly light: 300;
28
+ readonly normal: 400;
29
+ readonly medium: 500;
30
+ readonly bold: 600;
31
+ readonly extrabold: 700;
32
+ readonly black: 800;
33
+ };
34
+ /**
35
+ * Based on a root size of 16px.
36
+ */
37
+ export declare const fontSize: {
38
+ readonly primary: "1.875rem";
39
+ readonly secondary: "1.125rem";
40
+ readonly tertiary: "1rem";
41
+ readonly subtitle: "1rem";
42
+ readonly body: "0.875rem";
43
+ readonly small: "0.75rem";
44
+ };
45
+ export type FontSize = typeof fontSize;
46
+ /**
47
+ * Primary font weights.
48
+ */
49
+ export declare const fontWeight: {
50
+ readonly thin: 100;
51
+ readonly extralight: 200;
52
+ readonly light: 300;
53
+ readonly normal: 400;
54
+ readonly medium: 500;
55
+ readonly bold: 600;
56
+ readonly extrabold: 700;
57
+ readonly black: 800;
58
+ };
59
+ export type FontWeight = typeof fontWeight;
60
+ export declare const fontFamily = "'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif";
@@ -1,12 +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
- * @example "--color-primart-400" --> "rgb(var(--color-primary-400) / var(--tw-bg-opacity)))"
10
- * @returns {string} Full css for using the color
11
- */
12
- export declare function colorVariableToCss(variable: string): string;
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
+ * @example "--color-primart-400" --> "rgb(var(--color-primary-400) / var(--tw-bg-opacity)))"
10
+ * @returns {string} Full css for using the color
11
+ */
12
+ export declare function colorVariableToCss(variable: string): string;
@@ -1,10 +1,10 @@
1
- /**
2
- * Returns the HEX color based on a Color from the theme.
3
- * Reads the RGB value from the underlying CSS variable and convert to HEX.
4
- *
5
- * Example: color("PRIMARY", 500, "HEX") -> #3b82f6
6
- *
7
- * @param variable A color from the `colors` object of the Theme
8
- * @returns {string} HEX color
9
- */
10
- export declare const getHEX: (variable: string) => string;
1
+ /**
2
+ * Returns the HEX color based on a Color from the theme.
3
+ * Reads the RGB value from the underlying CSS variable and convert to HEX.
4
+ *
5
+ * Example: color("PRIMARY", 500, "HEX") -> #3b82f6
6
+ *
7
+ * @param variable A color from the `colors` object of the Theme
8
+ * @returns {string} HEX color
9
+ */
10
+ export declare const getHEX: (variable: string) => string;
@@ -1,5 +1,5 @@
1
- /**
2
- * Reads the value of the CSS custom Property.
3
- * ATTENTION: For colors use getHEX
4
- */
5
- export declare function getValuesFromDesignToken(designToken: string | number): string | number;
1
+ /**
2
+ * Reads the value of the CSS custom Property.
3
+ * ATTENTION: For colors use getHEX
4
+ */
5
+ export declare function getValuesFromDesignToken(designToken: string | number): string | number;
@@ -1,17 +1,17 @@
1
- export declare const themeZIndex: {
2
- readonly hidden: -1;
3
- readonly default: 1;
4
- readonly top: 5;
5
- readonly overlay: 10;
6
- readonly popover: 20;
7
- readonly toast: 100;
8
- };
9
- export declare const zIndex: {
10
- readonly hidden: -1;
11
- readonly default: 1;
12
- readonly top: 5;
13
- readonly overlay: 10;
14
- readonly popover: 20;
15
- readonly toast: 100;
16
- };
17
- export type ZIndex = typeof zIndex;
1
+ export declare const themeZIndex: {
2
+ readonly hidden: -1;
3
+ readonly default: 1;
4
+ readonly top: 5;
5
+ readonly overlay: 10;
6
+ readonly popover: 20;
7
+ readonly toast: 100;
8
+ };
9
+ export declare const zIndex: {
10
+ readonly hidden: -1;
11
+ readonly default: 1;
12
+ readonly top: 5;
13
+ readonly overlay: 10;
14
+ readonly popover: 20;
15
+ readonly toast: 100;
16
+ };
17
+ export type ZIndex = typeof zIndex;
@@ -1,13 +0,0 @@
1
- import { Elevation } from "./elevation";
2
- import { Size } from "./size";
3
- import { FontSize, FontWeight } from "./typography";
4
- import { ZIndex } from "./zIndex";
5
- export interface Tokens {
6
- size: Size;
7
- fontSize: FontSize;
8
- fontWeight: FontWeight;
9
- fontFamily: string;
10
- elevation: Elevation;
11
- zIndex: ZIndex;
12
- }
13
- export declare const tokens: Tokens;