@tamagui/themes 1.89.29 → 1.89.30
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/generated-v3.js +1857 -1819
- package/dist/cjs/generated-v3.js.map +1 -1
- package/dist/cjs/generated-v3.native.js +2593 -2447
- package/dist/cjs/generated-v3.native.js.map +1 -1
- package/dist/cjs/v3-themes.js +28 -28
- package/dist/cjs/v3-themes.js.map +1 -1
- package/dist/cjs/v3-themes.native.js +28 -28
- package/dist/cjs/v3-themes.native.js.map +2 -2
- package/dist/esm/generated-v3.js +1857 -1819
- package/dist/esm/generated-v3.js.map +1 -1
- package/dist/esm/generated-v3.mjs +166 -166
- package/dist/esm/generated-v3.native.js +2593 -2447
- package/dist/esm/generated-v3.native.js.map +1 -1
- package/dist/esm/v3-themes.js +28 -28
- package/dist/esm/v3-themes.js.map +1 -1
- package/dist/esm/v3-themes.mjs +29 -31
- package/dist/esm/v3-themes.native.js +28 -28
- package/dist/esm/v3-themes.native.js.map +2 -2
- package/package.json +7 -7
- package/src/generated-v3.ts +1828 -1788
- package/src/v3-themes.ts +29 -36
- package/types/generated-v3.d.ts +3 -1
package/src/v3-themes.ts
CHANGED
|
@@ -238,17 +238,10 @@ export const getTemplates = (scheme: 'dark' | 'light') => {
|
|
|
238
238
|
|
|
239
239
|
// our palettes have 4 things padding each end until you get to bg/color:
|
|
240
240
|
// [accentBg, transparent1, transparent2, transparent3, transparent4, background, ...]
|
|
241
|
-
const bgIndex =
|
|
242
|
-
|
|
243
|
-
// light themes will start with a slightly stronger bg, and then lighten on hover
|
|
244
|
-
// whereas dark themes start with a less strong bg, but lighten on hover as well
|
|
245
|
-
const bgBaseOffset = 1
|
|
246
|
-
|
|
241
|
+
const bgIndex = 5
|
|
247
242
|
const lighten = isLight ? -1 : 1
|
|
248
243
|
const darken = -lighten
|
|
249
|
-
|
|
250
|
-
const background = bgIndex + bgBaseOffset
|
|
251
|
-
const borderColor = background + 3
|
|
244
|
+
const borderColor = bgIndex + 3
|
|
252
245
|
|
|
253
246
|
// templates use the palette and specify index
|
|
254
247
|
// negative goes backwards from end so -1 is the last item
|
|
@@ -260,41 +253,41 @@ export const getTemplates = (scheme: 'dark' | 'light') => {
|
|
|
260
253
|
background025: 2,
|
|
261
254
|
background05: 3,
|
|
262
255
|
background075: 4,
|
|
263
|
-
color1: bgIndex
|
|
264
|
-
color2: bgIndex +
|
|
265
|
-
color3: bgIndex +
|
|
266
|
-
color4: bgIndex +
|
|
267
|
-
color5: bgIndex +
|
|
268
|
-
color6: bgIndex +
|
|
269
|
-
color7: bgIndex +
|
|
270
|
-
color8: bgIndex +
|
|
271
|
-
color9: bgIndex +
|
|
272
|
-
color10: bgIndex +
|
|
273
|
-
color11: bgIndex +
|
|
274
|
-
color12: bgIndex +
|
|
275
|
-
color0: -
|
|
276
|
-
color025: -
|
|
277
|
-
color05: -
|
|
278
|
-
color075: -
|
|
256
|
+
color1: bgIndex,
|
|
257
|
+
color2: bgIndex + 1,
|
|
258
|
+
color3: bgIndex + 2,
|
|
259
|
+
color4: bgIndex + 3,
|
|
260
|
+
color5: bgIndex + 4,
|
|
261
|
+
color6: bgIndex + 5,
|
|
262
|
+
color7: bgIndex + 6,
|
|
263
|
+
color8: bgIndex + 7,
|
|
264
|
+
color9: bgIndex + 8,
|
|
265
|
+
color10: bgIndex + 9,
|
|
266
|
+
color11: bgIndex + 10,
|
|
267
|
+
color12: bgIndex + 11,
|
|
268
|
+
color0: -1,
|
|
269
|
+
color025: -2,
|
|
270
|
+
color05: -3,
|
|
271
|
+
color075: -4,
|
|
279
272
|
// the background, color, etc keys here work like generics - they make it so you
|
|
280
273
|
// can publish components for others to use without mandating a specific color scale
|
|
281
274
|
// the @tamagui/button Button component looks for `$background`, so you set the
|
|
282
275
|
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
283
|
-
background,
|
|
284
|
-
backgroundHover:
|
|
285
|
-
backgroundPress:
|
|
286
|
-
backgroundFocus:
|
|
276
|
+
background: bgIndex,
|
|
277
|
+
backgroundHover: bgIndex + lighten, // always lighten on hover no matter the scheme
|
|
278
|
+
backgroundPress: bgIndex + darken, // always darken on press no matter the theme
|
|
279
|
+
backgroundFocus: bgIndex + darken,
|
|
287
280
|
borderColor,
|
|
288
281
|
borderColorHover: borderColor + lighten,
|
|
289
282
|
borderColorPress: borderColor + darken,
|
|
290
283
|
borderColorFocus: borderColor,
|
|
291
|
-
color: -bgIndex
|
|
292
|
-
colorHover: -bgIndex -
|
|
293
|
-
colorPress: -bgIndex
|
|
294
|
-
colorFocus: -bgIndex -
|
|
295
|
-
colorTransparent: -
|
|
296
|
-
placeholderColor: -bgIndex -
|
|
297
|
-
outlineColor: -
|
|
284
|
+
color: -bgIndex,
|
|
285
|
+
colorHover: -bgIndex - 1,
|
|
286
|
+
colorPress: -bgIndex,
|
|
287
|
+
colorFocus: -bgIndex - 1,
|
|
288
|
+
colorTransparent: -1,
|
|
289
|
+
placeholderColor: -bgIndex - 3,
|
|
290
|
+
outlineColor: -2,
|
|
298
291
|
}
|
|
299
292
|
|
|
300
293
|
const surface1 = {
|
package/types/generated-v3.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
type Theme = {
|
|
2
|
+
accentBackground: string;
|
|
3
|
+
accentColor: string;
|
|
2
4
|
background0: string;
|
|
3
5
|
background025: string;
|
|
4
6
|
background05: string;
|
|
@@ -25,8 +27,8 @@ type Theme = {
|
|
|
25
27
|
backgroundFocus: string;
|
|
26
28
|
borderColor: string;
|
|
27
29
|
borderColorHover: string;
|
|
28
|
-
borderColorFocus: string;
|
|
29
30
|
borderColorPress: string;
|
|
31
|
+
borderColorFocus: string;
|
|
30
32
|
color: string;
|
|
31
33
|
colorHover: string;
|
|
32
34
|
colorPress: string;
|