@tamagui/themes 1.52.2 → 1.52.3
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/palettes.js.map +1 -1
- package/dist/cjs/themes-old.js.map +1 -1
- package/dist/cjs/tokens.js.map +1 -1
- package/dist/cjs/v2-themes.js +184 -0
- package/dist/cjs/v2-themes.js.map +6 -0
- package/dist/cjs/v2.js +0 -13
- package/dist/cjs/v2.js.map +1 -1
- package/dist/esm/palettes.js.map +1 -1
- package/dist/esm/themes-old.js.map +1 -1
- package/dist/esm/tokens.js.map +1 -1
- package/dist/esm/v2-themes.js +160 -0
- package/dist/esm/v2-themes.js.map +6 -0
- package/dist/esm/v2.js +0 -2
- package/dist/esm/v2.js.map +1 -1
- package/package.json +11 -6
- package/src/{themes-v2.ts → v2-themes.ts} +23 -9
- package/src/v2.tsx +0 -5
- package/types/v2-themes.d.ts +42456 -0
- package/types/v2-themes.d.ts.map +1 -0
- package/types/v2.d.ts +0 -2
- package/types/v2.d.ts.map +1 -1
|
@@ -20,6 +20,17 @@ const colorThemeDefinition = (colorName: string) => [
|
|
|
20
20
|
},
|
|
21
21
|
]
|
|
22
22
|
|
|
23
|
+
const nonInherited = {
|
|
24
|
+
light: {
|
|
25
|
+
...lightColors,
|
|
26
|
+
...shadows.light,
|
|
27
|
+
},
|
|
28
|
+
dark: {
|
|
29
|
+
...darkColors,
|
|
30
|
+
...shadows.dark,
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
23
34
|
const themesBuilder = createThemeBuilder()
|
|
24
35
|
.addPalettes(palettes)
|
|
25
36
|
.addTemplates(templates)
|
|
@@ -28,18 +39,12 @@ const themesBuilder = createThemeBuilder()
|
|
|
28
39
|
light: {
|
|
29
40
|
template: 'base',
|
|
30
41
|
palette: 'light',
|
|
31
|
-
nonInheritedValues:
|
|
32
|
-
...lightColors,
|
|
33
|
-
...shadows.light,
|
|
34
|
-
},
|
|
42
|
+
nonInheritedValues: nonInherited.light,
|
|
35
43
|
},
|
|
36
44
|
dark: {
|
|
37
45
|
template: 'base',
|
|
38
46
|
palette: 'dark',
|
|
39
|
-
nonInheritedValues:
|
|
40
|
-
...darkColors,
|
|
41
|
-
...shadows.dark,
|
|
42
|
-
},
|
|
47
|
+
nonInheritedValues: nonInherited.dark,
|
|
43
48
|
},
|
|
44
49
|
})
|
|
45
50
|
.addChildThemes({
|
|
@@ -177,4 +182,13 @@ const themesBuilder = createThemeBuilder()
|
|
|
177
182
|
}
|
|
178
183
|
)
|
|
179
184
|
|
|
180
|
-
|
|
185
|
+
const themesIn = themesBuilder.build()
|
|
186
|
+
|
|
187
|
+
// stupid typescript too deep types fix :/
|
|
188
|
+
type ThemesIn = typeof themesIn
|
|
189
|
+
type ThemesOut = Omit<ThemesIn, 'light' | 'dark'> & {
|
|
190
|
+
light: ThemesIn['light'] & typeof nonInherited.light
|
|
191
|
+
dark: ThemesIn['dark'] & typeof nonInherited.dark
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export const themes = themesIn as ThemesOut
|