@tamagui/theme-base 1.0.0-beta.189 → 1.0.0-beta.205
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/dist/cjs/firaFont.js +20 -17
- package/dist/cjs/firaFont.js.map +2 -2
- package/dist/cjs/silkscreenFont.js +1 -1
- package/dist/cjs/silkscreenFont.js.map +2 -2
- package/dist/cjs/themes.js +19 -19
- package/dist/cjs/themes.js.map +2 -2
- package/dist/cjs/tokens.js +26 -36
- package/dist/cjs/tokens.js.map +2 -2
- package/dist/esm/firaFont.js +20 -17
- package/dist/esm/firaFont.js.map +2 -2
- package/dist/esm/silkscreenFont.js +1 -1
- package/dist/esm/silkscreenFont.js.map +2 -2
- package/dist/esm/themes.js +20 -20
- package/dist/esm/themes.js.map +2 -2
- package/dist/esm/tokens.js +28 -38
- package/dist/esm/tokens.js.map +2 -2
- package/dist/jsx/firaFont.js +20 -17
- package/dist/jsx/silkscreenFont.js +1 -1
- package/dist/jsx/themes.js +20 -20
- package/dist/jsx/tokens.js +28 -38
- package/package.json +5 -5
- package/types/firaFont.d.ts +19 -0
- package/types/firaFont.d.ts.map +1 -1
- package/types/silkscreenFont.d.ts +17 -1
- package/types/silkscreenFont.d.ts.map +1 -1
- package/types/themes.d.ts +1 -2
- package/types/tokens.d.ts +332 -446
- package/types/tokens.d.ts.map +1 -1
package/dist/esm/tokens.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { createTokens } from "@tamagui/core";
|
|
2
1
|
import { allLightColors, darkColorsPostfixed } from "./colors";
|
|
3
|
-
import { firaFont } from "./firaFont";
|
|
4
|
-
import { interFont } from "./interFont";
|
|
5
|
-
import { silkscreenFont } from "./silkscreenFont";
|
|
6
2
|
const size = {
|
|
7
3
|
true: 20,
|
|
8
4
|
0: 0,
|
|
@@ -24,41 +20,35 @@ const space = {
|
|
|
24
20
|
...size,
|
|
25
21
|
...Object.fromEntries(Object.entries(size).map(([k, v]) => [`-${k}`, -v]))
|
|
26
22
|
};
|
|
27
|
-
const
|
|
23
|
+
const zIndex = {
|
|
24
|
+
0: 0,
|
|
25
|
+
1: 100,
|
|
26
|
+
2: 200,
|
|
27
|
+
3: 300,
|
|
28
|
+
4: 400,
|
|
29
|
+
5: 500
|
|
30
|
+
};
|
|
31
|
+
const color = {
|
|
32
|
+
...allLightColors,
|
|
33
|
+
...darkColorsPostfixed
|
|
34
|
+
};
|
|
35
|
+
const radius = {
|
|
36
|
+
0: 0,
|
|
37
|
+
1: 3,
|
|
38
|
+
2: 5,
|
|
39
|
+
3: 7,
|
|
40
|
+
4: 9,
|
|
41
|
+
5: 10,
|
|
42
|
+
6: 12,
|
|
43
|
+
7: 16,
|
|
44
|
+
8: 20,
|
|
45
|
+
9: 30
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
color,
|
|
49
|
+
radius,
|
|
28
50
|
size,
|
|
29
51
|
space,
|
|
30
|
-
|
|
31
|
-
title: interFont,
|
|
32
|
-
body: interFont,
|
|
33
|
-
mono: firaFont,
|
|
34
|
-
silkscreen: silkscreenFont
|
|
35
|
-
},
|
|
36
|
-
zIndex: {
|
|
37
|
-
0: 0,
|
|
38
|
-
1: 100,
|
|
39
|
-
2: 200,
|
|
40
|
-
3: 300,
|
|
41
|
-
4: 400,
|
|
42
|
-
5: 500
|
|
43
|
-
},
|
|
44
|
-
color: {
|
|
45
|
-
...allLightColors,
|
|
46
|
-
...darkColorsPostfixed
|
|
47
|
-
},
|
|
48
|
-
radius: {
|
|
49
|
-
0: 0,
|
|
50
|
-
1: 3,
|
|
51
|
-
2: 5,
|
|
52
|
-
3: 7,
|
|
53
|
-
4: 9,
|
|
54
|
-
5: 10,
|
|
55
|
-
6: 12,
|
|
56
|
-
7: 16,
|
|
57
|
-
8: 20,
|
|
58
|
-
9: 30
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
tokens
|
|
52
|
+
zIndex
|
|
63
53
|
};
|
|
64
54
|
//# sourceMappingURL=tokens.js.map
|
package/dist/esm/tokens.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tokens.tsx"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAAA;
|
|
4
|
+
"sourcesContent": ["import { allLightColors, darkColorsPostfixed } from './colors'\n\nexport const size = {\n true: 20, // for space boolean true\n 0: 0,\n '0.5': 2,\n 1: 6,\n 2: 10,\n 3: 15,\n 4: 20,\n 5: 25,\n 6: 30,\n 7: 40,\n 8: 50,\n 9: 65,\n 10: 75,\n 11: 85,\n 12: 100,\n} as const\n\ntype Sizes = typeof size\ntype SizeKeys = keyof Sizes\n\nexport const space: {\n [Key in `-${SizeKeys}` | SizeKeys]: Key extends keyof Sizes ? Sizes[Key] : number\n} = {\n ...size,\n ...Object.fromEntries(Object.entries(size).map(([k, v]) => [`-${k}`, -v])),\n} as any\n\nexport const zIndex = {\n 0: 0,\n 1: 100,\n 2: 200,\n 3: 300,\n 4: 400,\n 5: 500,\n}\n\nexport const color = {\n ...allLightColors,\n ...darkColorsPostfixed,\n}\n\nexport const radius = {\n 0: 0,\n 1: 3,\n 2: 5,\n 3: 7,\n 4: 9,\n 5: 10,\n 6: 12,\n 7: 16,\n 8: 20,\n 9: 30,\n}\n"],
|
|
5
|
+
"mappings": "AAAA;AAEO,MAAM,OAAO;AAAA,EAClB,MAAM;AAAA,EACN,GAAG;AAAA,EACH,OAAO;AAAA,EACP,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAKO,MAAM,QAET;AAAA,KACC;AAAA,KACA,OAAO,YAAY,OAAO,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAC3E;AAEO,MAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEO,MAAM,QAAQ;AAAA,KAChB;AAAA,KACA;AACL;AAEO,MAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/firaFont.js
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { createFont } from "@tamagui/core";
|
|
2
|
+
const size = {
|
|
3
|
+
1: 10,
|
|
4
|
+
2: 11,
|
|
5
|
+
3: 12,
|
|
6
|
+
4: 13,
|
|
7
|
+
5: 14,
|
|
8
|
+
6: 16,
|
|
9
|
+
7: 20,
|
|
10
|
+
8: 22,
|
|
11
|
+
9: 30,
|
|
12
|
+
10: 42,
|
|
13
|
+
11: 52,
|
|
14
|
+
12: 62,
|
|
15
|
+
13: 72,
|
|
16
|
+
14: 92,
|
|
17
|
+
15: 114,
|
|
18
|
+
16: 124
|
|
19
|
+
};
|
|
2
20
|
const firaFont = createFont({
|
|
3
21
|
family: "Fira Code, Monaco, Consolas, Ubuntu Mono, monospace",
|
|
4
|
-
size
|
|
5
|
-
|
|
6
|
-
2: 11,
|
|
7
|
-
3: 12,
|
|
8
|
-
4: 13,
|
|
9
|
-
5: 15,
|
|
10
|
-
6: 16,
|
|
11
|
-
7: 17
|
|
12
|
-
},
|
|
13
|
-
lineHeight: {
|
|
14
|
-
1: 15,
|
|
15
|
-
2: 18,
|
|
16
|
-
3: 19,
|
|
17
|
-
4: 20,
|
|
18
|
-
5: 22,
|
|
19
|
-
6: 24
|
|
20
|
-
},
|
|
22
|
+
size,
|
|
23
|
+
lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, v * 1.75])),
|
|
21
24
|
weight: {
|
|
22
25
|
4: "300",
|
|
23
26
|
6: "700"
|
package/dist/jsx/themes.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as Colors from "@tamagui/colors";
|
|
|
4
4
|
import { getVariableValue } from "@tamagui/core";
|
|
5
5
|
import { allDarkColors, allLightColors } from "./colors";
|
|
6
6
|
import { setColorAlpha } from "./colorUtils";
|
|
7
|
-
import {
|
|
7
|
+
import { color } from "./tokens";
|
|
8
8
|
const alternates = [1, 2, 3, 4];
|
|
9
9
|
function createThemesFrom(name, getTheme, props) {
|
|
10
10
|
const { shift = 0 } = props;
|
|
@@ -59,7 +59,7 @@ const createTheme = /* @__PURE__ */ __name((str = 1, {
|
|
|
59
59
|
backgroundHover: get(backgrounds, str + lighterDir),
|
|
60
60
|
backgroundPress: get(backgrounds, str + darkerDir * 1),
|
|
61
61
|
backgroundFocus: get(backgrounds, str + darkerDir * 2),
|
|
62
|
-
backgroundTransparent:
|
|
62
|
+
backgroundTransparent: color.grayA1,
|
|
63
63
|
borderColor: isLight ? get(colors, 8 - str, "borderColor") : get(backgrounds, 2 + str, "borderColor"),
|
|
64
64
|
borderColorHover: isLight ? get(colors, 6 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
65
65
|
borderColorPress: isLight ? get(colors, 5 - str, "borderColor") : get(backgrounds, 1 + str, "borderColor"),
|
|
@@ -70,7 +70,7 @@ const createTheme = /* @__PURE__ */ __name((str = 1, {
|
|
|
70
70
|
colorFocus: get(colors, 3 + str, "color"),
|
|
71
71
|
colorTranslucent,
|
|
72
72
|
colorMid: colors[Math.floor(colors.length / 2)],
|
|
73
|
-
shadowColor: isLight ?
|
|
73
|
+
shadowColor: isLight ? color.grayA3 : color.grayA8,
|
|
74
74
|
shadowColorHover: darkColors[!isLight ? 1 : 8],
|
|
75
75
|
shadowColorPress: darkColors[!isLight ? 1 : 8],
|
|
76
76
|
shadowColorFocus: darkColors[!isLight ? 1 : 8]
|
|
@@ -94,32 +94,32 @@ const colorSchemes = [
|
|
|
94
94
|
const lightGradient = [
|
|
95
95
|
"#fff",
|
|
96
96
|
"#f4f4f4",
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
97
|
+
color.gray1,
|
|
98
|
+
color.gray2,
|
|
99
|
+
color.gray3,
|
|
100
|
+
color.gray4,
|
|
101
|
+
color.gray5,
|
|
102
|
+
color.gray6,
|
|
103
|
+
color.gray7,
|
|
104
|
+
color.gray8,
|
|
105
|
+
color.gray9,
|
|
106
|
+
color.gray10,
|
|
107
|
+
color.gray11,
|
|
108
|
+
color.gray12
|
|
109
109
|
];
|
|
110
110
|
const darkGradient = [
|
|
111
|
-
"#0f0f0f",
|
|
112
111
|
"#111111",
|
|
113
|
-
"#
|
|
112
|
+
"#151515",
|
|
114
113
|
"#191919",
|
|
115
|
-
"#
|
|
116
|
-
"#
|
|
114
|
+
"#232323",
|
|
115
|
+
"#282828",
|
|
117
116
|
"#323232",
|
|
118
117
|
"#383838",
|
|
119
118
|
"#424242",
|
|
120
119
|
"#494949",
|
|
121
120
|
"#545454",
|
|
122
|
-
"#626262"
|
|
121
|
+
"#626262",
|
|
122
|
+
"#777777"
|
|
123
123
|
];
|
|
124
124
|
const lightThemes = createThemesFrom("light", createTheme, {
|
|
125
125
|
backgrounds: lightGradient,
|
package/dist/jsx/tokens.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { createTokens } from "@tamagui/core";
|
|
2
1
|
import { allLightColors, darkColorsPostfixed } from "./colors";
|
|
3
|
-
import { firaFont } from "./firaFont";
|
|
4
|
-
import { interFont } from "./interFont";
|
|
5
|
-
import { silkscreenFont } from "./silkscreenFont";
|
|
6
2
|
const size = {
|
|
7
3
|
true: 20,
|
|
8
4
|
0: 0,
|
|
@@ -24,40 +20,34 @@ const space = {
|
|
|
24
20
|
...size,
|
|
25
21
|
...Object.fromEntries(Object.entries(size).map(([k, v]) => [`-${k}`, -v]))
|
|
26
22
|
};
|
|
27
|
-
const
|
|
23
|
+
const zIndex = {
|
|
24
|
+
0: 0,
|
|
25
|
+
1: 100,
|
|
26
|
+
2: 200,
|
|
27
|
+
3: 300,
|
|
28
|
+
4: 400,
|
|
29
|
+
5: 500
|
|
30
|
+
};
|
|
31
|
+
const color = {
|
|
32
|
+
...allLightColors,
|
|
33
|
+
...darkColorsPostfixed
|
|
34
|
+
};
|
|
35
|
+
const radius = {
|
|
36
|
+
0: 0,
|
|
37
|
+
1: 3,
|
|
38
|
+
2: 5,
|
|
39
|
+
3: 7,
|
|
40
|
+
4: 9,
|
|
41
|
+
5: 10,
|
|
42
|
+
6: 12,
|
|
43
|
+
7: 16,
|
|
44
|
+
8: 20,
|
|
45
|
+
9: 30
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
color,
|
|
49
|
+
radius,
|
|
28
50
|
size,
|
|
29
51
|
space,
|
|
30
|
-
|
|
31
|
-
title: interFont,
|
|
32
|
-
body: interFont,
|
|
33
|
-
mono: firaFont,
|
|
34
|
-
silkscreen: silkscreenFont
|
|
35
|
-
},
|
|
36
|
-
zIndex: {
|
|
37
|
-
0: 0,
|
|
38
|
-
1: 100,
|
|
39
|
-
2: 200,
|
|
40
|
-
3: 300,
|
|
41
|
-
4: 400,
|
|
42
|
-
5: 500
|
|
43
|
-
},
|
|
44
|
-
color: {
|
|
45
|
-
...allLightColors,
|
|
46
|
-
...darkColorsPostfixed
|
|
47
|
-
},
|
|
48
|
-
radius: {
|
|
49
|
-
0: 0,
|
|
50
|
-
1: 3,
|
|
51
|
-
2: 5,
|
|
52
|
-
3: 7,
|
|
53
|
-
4: 9,
|
|
54
|
-
5: 10,
|
|
55
|
-
6: 12,
|
|
56
|
-
7: 16,
|
|
57
|
-
8: 20,
|
|
58
|
-
9: 30
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
tokens
|
|
52
|
+
zIndex
|
|
63
53
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/theme-base",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.205+6a67c74d",
|
|
4
4
|
"typings": "types",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"clean:build": "tamagui-build clean:build"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@tamagui/build": "^1.0.0-beta.
|
|
20
|
-
"@tamagui/colors": "^1.0.0-beta.
|
|
21
|
-
"@tamagui/core": "^1.0.0-beta.
|
|
19
|
+
"@tamagui/build": "^1.0.0-beta.205+6a67c74d",
|
|
20
|
+
"@tamagui/colors": "^1.0.0-beta.205+6a67c74d",
|
|
21
|
+
"@tamagui/core": "^1.0.0-beta.205+6a67c74d"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "6a67c74d67416b6c81169e1cc25e239ab935f651"
|
|
27
27
|
}
|
package/types/firaFont.d.ts
CHANGED
|
@@ -8,6 +8,15 @@ export declare const firaFont: {
|
|
|
8
8
|
5: number;
|
|
9
9
|
6: number;
|
|
10
10
|
7: number;
|
|
11
|
+
8: number;
|
|
12
|
+
9: number;
|
|
13
|
+
10: number;
|
|
14
|
+
11: number;
|
|
15
|
+
12: number;
|
|
16
|
+
13: number;
|
|
17
|
+
14: number;
|
|
18
|
+
15: number;
|
|
19
|
+
16: number;
|
|
11
20
|
};
|
|
12
21
|
lineHeight: {
|
|
13
22
|
1: number;
|
|
@@ -16,6 +25,16 @@ export declare const firaFont: {
|
|
|
16
25
|
4: number;
|
|
17
26
|
5: number;
|
|
18
27
|
6: number;
|
|
28
|
+
7: number;
|
|
29
|
+
8: number;
|
|
30
|
+
9: number;
|
|
31
|
+
10: number;
|
|
32
|
+
11: number;
|
|
33
|
+
12: number;
|
|
34
|
+
13: number;
|
|
35
|
+
14: number;
|
|
36
|
+
15: number;
|
|
37
|
+
16: number;
|
|
19
38
|
};
|
|
20
39
|
weight: {
|
|
21
40
|
4: string;
|
package/types/firaFont.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firaFont.d.ts","sourceRoot":"","sources":["../src/firaFont.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"firaFont.d.ts","sourceRoot":"","sources":["../src/firaFont.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAanB,CAAA"}
|
|
@@ -19,13 +19,29 @@ export declare const silkscreenFont: {
|
|
|
19
19
|
16: number;
|
|
20
20
|
};
|
|
21
21
|
lineHeight: {
|
|
22
|
-
|
|
22
|
+
1: number;
|
|
23
|
+
2: number;
|
|
24
|
+
3: number;
|
|
25
|
+
4: number;
|
|
26
|
+
5: number;
|
|
27
|
+
6: number;
|
|
28
|
+
7: number;
|
|
29
|
+
8: number;
|
|
30
|
+
9: number;
|
|
31
|
+
10: number;
|
|
32
|
+
11: number;
|
|
33
|
+
12: number;
|
|
34
|
+
13: number;
|
|
35
|
+
14: number;
|
|
36
|
+
15: number;
|
|
37
|
+
16: number;
|
|
23
38
|
};
|
|
24
39
|
weight: {
|
|
25
40
|
4: string;
|
|
26
41
|
};
|
|
27
42
|
letterSpacing: {
|
|
28
43
|
4: number;
|
|
44
|
+
5: number;
|
|
29
45
|
6: number;
|
|
30
46
|
};
|
|
31
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"silkscreenFont.d.ts","sourceRoot":"","sources":["../src/silkscreenFont.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"silkscreenFont.d.ts","sourceRoot":"","sources":["../src/silkscreenFont.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAazB,CAAA"}
|
package/types/themes.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Variable } from '@tamagui/core';
|
|
2
1
|
export declare const colorSchemes: readonly [{
|
|
3
2
|
readonly name: "blue";
|
|
4
3
|
readonly colors: {
|
|
@@ -391,7 +390,7 @@ export declare const colorSchemes: readonly [{
|
|
|
391
390
|
};
|
|
392
391
|
}];
|
|
393
392
|
export declare type ColorNames = typeof colorSchemes[number]['name'];
|
|
394
|
-
export declare const lightGradient:
|
|
393
|
+
export declare const lightGradient: string[];
|
|
395
394
|
export declare const darkGradient: string[];
|
|
396
395
|
declare const baseThemes: {
|
|
397
396
|
dark: any;
|