@tamagui/theme-base 1.0.0-beta.207 → 1.0.0-beta.230

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.
@@ -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 { tokens } from "./tokens";
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: tokens.color.grayA1,
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 ? tokens.color.grayA3 : tokens.color.grayA8,
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,18 +94,18 @@ const colorSchemes = [
94
94
  const lightGradient = [
95
95
  "#fff",
96
96
  "#f4f4f4",
97
- tokens.color.gray1,
98
- tokens.color.gray2,
99
- tokens.color.gray3,
100
- tokens.color.gray4,
101
- tokens.color.gray5,
102
- tokens.color.gray6,
103
- tokens.color.gray7,
104
- tokens.color.gray8,
105
- tokens.color.gray9,
106
- tokens.color.gray10,
107
- tokens.color.gray11,
108
- tokens.color.gray12
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
111
  "#111111",
@@ -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 tokens = createTokens({
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
- font: {
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.207+3fd10ea6",
3
+ "version": "1.0.0-beta.230+fab00413",
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.207+3fd10ea6",
20
- "@tamagui/colors": "^1.0.0-beta.207+3fd10ea6",
21
- "@tamagui/core": "^1.0.0-beta.207+3fd10ea6"
19
+ "@tamagui/build": "^1.0.0-beta.230+fab00413",
20
+ "@tamagui/colors": "^1.0.0-beta.230+fab00413",
21
+ "@tamagui/core": "^1.0.0-beta.230+fab00413"
22
22
  },
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
- "gitHead": "3fd10ea6d026fac0339fbc1a501ee304f4985b05"
26
+ "gitHead": "fab0041356da84bd32620811a57a156d11514d2b"
27
27
  }
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: (string | Variable)[];
393
+ export declare const lightGradient: string[];
395
394
  export declare const darkGradient: string[];
396
395
  declare const baseThemes: {
397
396
  dark: any;
@@ -1 +1 @@
1
- {"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.tsx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