@tamagui/config 3.0.0-beta.922.1 → 3.0.0
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/animations-css.cjs +2 -26
- package/dist/cjs/animations-motion.cjs +2 -87
- package/dist/cjs/animations-motion.native.cjs +2 -87
- package/dist/cjs/animations-motion.native.js +2 -87
- package/dist/cjs/animations-motion.native.js.map +1 -1
- package/dist/cjs/animations-reanimated.cjs +2 -101
- package/dist/cjs/animations-reanimated.native.cjs +2 -101
- package/dist/cjs/animations-reanimated.native.js +2 -101
- package/dist/cjs/animations-reanimated.native.js.map +1 -1
- package/dist/cjs/animations-rn.cjs +2 -111
- package/dist/cjs/animations-rn.native.cjs +2 -111
- package/dist/cjs/animations-rn.native.js +2 -111
- package/dist/cjs/animations-rn.native.js.map +1 -1
- package/dist/cjs/settings.cjs +1 -0
- package/dist/cjs/settings.native.cjs +1 -0
- package/dist/cjs/settings.native.js +1 -0
- package/dist/cjs/settings.native.js.map +1 -1
- package/dist/cjs/v5-base.cjs +73 -2
- package/dist/cjs/v5-base.native.cjs +73 -2
- package/dist/cjs/v5-base.native.js +73 -2
- package/dist/cjs/v5-base.native.js.map +1 -1
- package/dist/cjs/v5-fonts.cjs +6 -1
- package/dist/cjs/v5-fonts.native.cjs +6 -1
- package/dist/cjs/v5-fonts.native.js +6 -1
- package/dist/cjs/v5-fonts.native.js.map +1 -1
- package/dist/cjs/v6-base.cjs +107 -11
- package/dist/cjs/v6-base.native.cjs +109 -11
- package/dist/cjs/v6-base.native.js +109 -11
- package/dist/cjs/v6-base.native.js.map +1 -1
- package/dist/cjs/v6-tailwind-scales.generated.cjs +12 -0
- package/dist/cjs/v6-tailwind-scales.generated.native.cjs +12 -0
- package/dist/cjs/v6-tailwind-scales.generated.native.js +12 -0
- package/dist/cjs/v6-tailwind-scales.generated.native.js.map +1 -1
- package/dist/cjs/v6-themes.cjs +2 -1
- package/dist/cjs/v6-themes.native.cjs +2 -1
- package/dist/cjs/v6-themes.native.js +2 -1
- package/dist/cjs/v6-themes.native.js.map +1 -1
- package/dist/esm/animations-css.mjs +2 -26
- package/dist/esm/animations-css.mjs.map +1 -1
- package/dist/esm/animations-motion.mjs +2 -87
- package/dist/esm/animations-motion.mjs.map +1 -1
- package/dist/esm/animations-motion.native.js +2 -87
- package/dist/esm/animations-motion.native.js.map +1 -1
- package/dist/esm/animations-reanimated.mjs +2 -101
- package/dist/esm/animations-reanimated.mjs.map +1 -1
- package/dist/esm/animations-reanimated.native.js +2 -101
- package/dist/esm/animations-reanimated.native.js.map +1 -1
- package/dist/esm/animations-rn.mjs +2 -111
- package/dist/esm/animations-rn.mjs.map +1 -1
- package/dist/esm/animations-rn.native.js +2 -111
- package/dist/esm/animations-rn.native.js.map +1 -1
- package/dist/esm/settings.mjs +1 -0
- package/dist/esm/settings.mjs.map +1 -1
- package/dist/esm/settings.native.js +1 -0
- package/dist/esm/settings.native.js.map +1 -1
- package/dist/esm/v5-base.mjs +74 -4
- package/dist/esm/v5-base.mjs.map +1 -1
- package/dist/esm/v5-base.native.js +74 -4
- package/dist/esm/v5-base.native.js.map +1 -1
- package/dist/esm/v5-fonts.mjs +7 -2
- package/dist/esm/v5-fonts.mjs.map +1 -1
- package/dist/esm/v5-fonts.native.js +7 -2
- package/dist/esm/v5-fonts.native.js.map +1 -1
- package/dist/esm/v6-base.mjs +105 -11
- package/dist/esm/v6-base.mjs.map +1 -1
- package/dist/esm/v6-base.native.js +107 -11
- package/dist/esm/v6-base.native.js.map +1 -1
- package/dist/esm/v6-tailwind-scales.generated.mjs +12 -0
- package/dist/esm/v6-tailwind-scales.generated.mjs.map +1 -1
- package/dist/esm/v6-tailwind-scales.generated.native.js +12 -0
- package/dist/esm/v6-tailwind-scales.generated.native.js.map +1 -1
- package/dist/esm/v6-themes.mjs +2 -1
- package/dist/esm/v6-themes.mjs.map +1 -1
- package/dist/esm/v6-themes.native.js +2 -1
- package/dist/esm/v6-themes.native.js.map +1 -1
- package/package.json +25 -13
- package/src/animations-css.ts +2 -27
- package/src/animations-motion.ts +2 -105
- package/src/animations-reanimated.ts +2 -101
- package/src/animations-rn.ts +2 -111
- package/src/settings.ts +1 -0
- package/src/v5-base.ts +57 -2
- package/src/v5-fonts.ts +14 -7
- package/src/v6-base.ts +104 -10
- package/src/v6-tailwind-scales.generated.ts +12 -0
- package/src/v6-themes.ts +35 -4
- package/types/animations-css.d.ts +104 -44
- package/types/animations-css.d.ts.map +1 -1
- package/types/animations-motion.d.ts +102 -204
- package/types/animations-motion.d.ts.map +1 -1
- package/types/animations-reanimated.d.ts +102 -196
- package/types/animations-reanimated.d.ts.map +1 -1
- package/types/animations-rn.d.ts +102 -216
- package/types/animations-rn.d.ts.map +1 -1
- package/types/settings.d.ts +1 -0
- package/types/settings.d.ts.map +1 -1
- package/types/v5-base.d.ts +72 -2
- package/types/v5-base.d.ts.map +1 -1
- package/types/v5-fonts.d.ts.map +1 -1
- package/types/v6-base.d.ts +527 -5
- package/types/v6-base.d.ts.map +1 -1
- package/types/v6-tailwind-scales.generated.d.ts +12 -0
- package/types/v6-tailwind-scales.generated.d.ts.map +1 -1
- package/types/v6-themes.d.ts +7 -1
- package/types/v6-themes.d.ts.map +1 -1
- package/types/v6.d.ts +1343 -371
- package/types/v6.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/config",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"sideEffects": false,
|
|
6
7
|
"files": [
|
|
@@ -80,6 +81,15 @@
|
|
|
80
81
|
"require": "./dist/cjs/v6-builder.cjs",
|
|
81
82
|
"default": "./dist/esm/v6-builder.mjs"
|
|
82
83
|
},
|
|
84
|
+
"./settings": {
|
|
85
|
+
"types": "./types/settings.d.ts",
|
|
86
|
+
"react-native": "./dist/esm/settings.native.js",
|
|
87
|
+
"browser": "./dist/esm/settings.mjs",
|
|
88
|
+
"module": "./dist/esm/settings.mjs",
|
|
89
|
+
"import": "./dist/esm/settings.mjs",
|
|
90
|
+
"require": "./dist/cjs/settings.cjs",
|
|
91
|
+
"default": "./dist/esm/settings.mjs"
|
|
92
|
+
},
|
|
83
93
|
"./animations-css": {
|
|
84
94
|
"types": "./types/animations-css.d.ts",
|
|
85
95
|
"react-native": "./dist/esm/animations-css.native.js",
|
|
@@ -167,25 +177,27 @@
|
|
|
167
177
|
"clean:build": "tamagui-build clean:build"
|
|
168
178
|
},
|
|
169
179
|
"dependencies": {
|
|
170
|
-
"@tamagui/
|
|
171
|
-
"@tamagui/animations-
|
|
172
|
-
"@tamagui/animations-
|
|
173
|
-
"@tamagui/animations-
|
|
174
|
-
"@tamagui/
|
|
175
|
-
"@tamagui/
|
|
176
|
-
"@tamagui/
|
|
177
|
-
"@tamagui/
|
|
178
|
-
"@tamagui/
|
|
180
|
+
"@tamagui/animation-helpers": "3.0.0",
|
|
181
|
+
"@tamagui/animations-css": "3.0.0",
|
|
182
|
+
"@tamagui/animations-motion": "3.0.0",
|
|
183
|
+
"@tamagui/animations-react-native": "3.0.0",
|
|
184
|
+
"@tamagui/animations-reanimated": "3.0.0",
|
|
185
|
+
"@tamagui/create-system-font": "3.0.0",
|
|
186
|
+
"@tamagui/shorthands": "3.0.0",
|
|
187
|
+
"@tamagui/style-grammar": "3.0.0",
|
|
188
|
+
"@tamagui/themes": "3.0.0",
|
|
189
|
+
"@tamagui/web": "3.0.0"
|
|
179
190
|
},
|
|
180
191
|
"devDependencies": {
|
|
181
192
|
"@csstools/color-helpers": "6.1.0",
|
|
182
|
-
"@tamagui/build": "3.0.0
|
|
183
|
-
"@tamagui/cli": "3.0.0
|
|
193
|
+
"@tamagui/build": "3.0.0",
|
|
194
|
+
"@tamagui/cli": "3.0.0",
|
|
184
195
|
"tailwindcss": "4.3.0"
|
|
185
196
|
},
|
|
186
197
|
"repository": {
|
|
187
198
|
"type": "git",
|
|
188
199
|
"url": "git+https://github.com/tamagui/tamagui.git",
|
|
189
200
|
"directory": "code/core/config"
|
|
190
|
-
}
|
|
201
|
+
},
|
|
202
|
+
"releaseSourceCommit": "15fbca480b143f876f6975601e23a17d3f90d2ee"
|
|
191
203
|
}
|
package/src/animations-css.ts
CHANGED
|
@@ -1,31 +1,6 @@
|
|
|
1
1
|
import { createAnimations } from '@tamagui/animations-css/extras'
|
|
2
|
+
import { animationPresets } from '@tamagui/animation-helpers'
|
|
2
3
|
|
|
3
|
-
const
|
|
4
|
-
const bouncy = 'cubic-bezier(0.175, 0.885, 0.32, 1.275)'
|
|
5
|
-
|
|
6
|
-
export const animationsCSS = createAnimations({
|
|
7
|
-
'0ms': '0ms linear',
|
|
8
|
-
'50ms': '50ms linear',
|
|
9
|
-
'75ms': '75ms linear',
|
|
10
|
-
'100ms': '100ms ease-out',
|
|
11
|
-
'200ms': '200ms ease-out',
|
|
12
|
-
'250ms': '250ms ease-out',
|
|
13
|
-
'300ms': '300ms ease-out',
|
|
14
|
-
'400ms': '400ms ease-out',
|
|
15
|
-
'500ms': '500ms ease-out',
|
|
16
|
-
superBouncy: `300ms cubic-bezier(0.175, 0.885, 0.32, 1.5)`,
|
|
17
|
-
bouncy: `350ms ${bouncy}`,
|
|
18
|
-
superLazy: `600ms ${easeOut}`,
|
|
19
|
-
lazy: `500ms ${easeOut}`,
|
|
20
|
-
medium: `300ms ${easeOut}`,
|
|
21
|
-
slowest: `800ms ${easeOut}`,
|
|
22
|
-
slow: `450ms ${easeOut}`,
|
|
23
|
-
quick: `150ms ${easeOut}`,
|
|
24
|
-
quickLessBouncy: `180ms ${easeOut}`,
|
|
25
|
-
quicker: `120ms ${easeOut}`,
|
|
26
|
-
quickerLessBouncy: `100ms ${easeOut}`,
|
|
27
|
-
quickest: `80ms ${easeOut}`,
|
|
28
|
-
quickestLessBouncy: `60ms ${easeOut}`,
|
|
29
|
-
})
|
|
4
|
+
export const animationsCSS = createAnimations(animationPresets)
|
|
30
5
|
|
|
31
6
|
export const animations = animationsCSS
|
package/src/animations-motion.ts
CHANGED
|
@@ -1,109 +1,6 @@
|
|
|
1
1
|
import { createAnimations } from '@tamagui/animations-motion'
|
|
2
|
+
import { animationPresets } from '@tamagui/animation-helpers'
|
|
2
3
|
|
|
3
|
-
export const animationsMotion = createAnimations(
|
|
4
|
-
'0ms': {
|
|
5
|
-
duration: 0,
|
|
6
|
-
},
|
|
7
|
-
'50ms': {
|
|
8
|
-
duration: 50,
|
|
9
|
-
},
|
|
10
|
-
'75ms': {
|
|
11
|
-
duration: 75,
|
|
12
|
-
},
|
|
13
|
-
'100ms': {
|
|
14
|
-
duration: 100,
|
|
15
|
-
},
|
|
16
|
-
'200ms': {
|
|
17
|
-
duration: 200,
|
|
18
|
-
},
|
|
19
|
-
'250ms': {
|
|
20
|
-
duration: 250,
|
|
21
|
-
},
|
|
22
|
-
'300ms': {
|
|
23
|
-
duration: 300,
|
|
24
|
-
},
|
|
25
|
-
'400ms': {
|
|
26
|
-
duration: 400,
|
|
27
|
-
},
|
|
28
|
-
'500ms': {
|
|
29
|
-
duration: 500,
|
|
30
|
-
},
|
|
31
|
-
superLazy: {
|
|
32
|
-
type: 'spring',
|
|
33
|
-
damping: 15,
|
|
34
|
-
mass: 2,
|
|
35
|
-
stiffness: 20,
|
|
36
|
-
},
|
|
37
|
-
lazy: {
|
|
38
|
-
type: 'spring',
|
|
39
|
-
damping: 11,
|
|
40
|
-
mass: 0.25,
|
|
41
|
-
stiffness: 12,
|
|
42
|
-
},
|
|
43
|
-
slowest: {
|
|
44
|
-
type: 'spring',
|
|
45
|
-
damping: 9,
|
|
46
|
-
stiffness: 7.5,
|
|
47
|
-
},
|
|
48
|
-
slow: {
|
|
49
|
-
type: 'spring',
|
|
50
|
-
damping: 27,
|
|
51
|
-
stiffness: 45,
|
|
52
|
-
},
|
|
53
|
-
medium: {
|
|
54
|
-
damping: 12,
|
|
55
|
-
stiffness: 100,
|
|
56
|
-
mass: 0.85,
|
|
57
|
-
},
|
|
58
|
-
superBouncy: {
|
|
59
|
-
type: 'spring',
|
|
60
|
-
damping: 3,
|
|
61
|
-
mass: 0.7,
|
|
62
|
-
stiffness: 135,
|
|
63
|
-
},
|
|
64
|
-
bouncy: {
|
|
65
|
-
type: 'spring',
|
|
66
|
-
damping: 5.4,
|
|
67
|
-
mass: 0.9,
|
|
68
|
-
stiffness: 90,
|
|
69
|
-
},
|
|
70
|
-
quick: {
|
|
71
|
-
type: 'spring',
|
|
72
|
-
damping: 17,
|
|
73
|
-
mass: 0.5,
|
|
74
|
-
stiffness: 410,
|
|
75
|
-
},
|
|
76
|
-
quickLessBouncy: {
|
|
77
|
-
type: 'spring',
|
|
78
|
-
damping: 40,
|
|
79
|
-
mass: 1,
|
|
80
|
-
stiffness: 400,
|
|
81
|
-
velocity: 5,
|
|
82
|
-
},
|
|
83
|
-
quicker: {
|
|
84
|
-
type: 'spring',
|
|
85
|
-
damping: 20,
|
|
86
|
-
mass: 0.35,
|
|
87
|
-
stiffness: 450,
|
|
88
|
-
},
|
|
89
|
-
quickerLessBouncy: {
|
|
90
|
-
type: 'spring',
|
|
91
|
-
damping: 26,
|
|
92
|
-
mass: 0.5,
|
|
93
|
-
stiffness: 500,
|
|
94
|
-
},
|
|
95
|
-
quickest: {
|
|
96
|
-
type: 'spring',
|
|
97
|
-
damping: 22,
|
|
98
|
-
mass: 0.3,
|
|
99
|
-
stiffness: 550,
|
|
100
|
-
},
|
|
101
|
-
quickestLessBouncy: {
|
|
102
|
-
type: 'spring',
|
|
103
|
-
damping: 28,
|
|
104
|
-
mass: 0.4,
|
|
105
|
-
stiffness: 600,
|
|
106
|
-
},
|
|
107
|
-
})
|
|
4
|
+
export const animationsMotion = createAnimations(animationPresets)
|
|
108
5
|
|
|
109
6
|
export const animations = animationsMotion
|
|
@@ -1,105 +1,6 @@
|
|
|
1
1
|
import { createAnimations } from '@tamagui/animations-reanimated'
|
|
2
|
+
import { animationPresets } from '@tamagui/animation-helpers'
|
|
2
3
|
|
|
3
|
-
export const animationsReanimated = createAnimations(
|
|
4
|
-
'0ms': {
|
|
5
|
-
type: 'timing',
|
|
6
|
-
duration: 0,
|
|
7
|
-
},
|
|
8
|
-
'50ms': {
|
|
9
|
-
type: 'timing',
|
|
10
|
-
duration: 50,
|
|
11
|
-
},
|
|
12
|
-
'75ms': {
|
|
13
|
-
type: 'timing',
|
|
14
|
-
duration: 75,
|
|
15
|
-
},
|
|
16
|
-
'100ms': {
|
|
17
|
-
type: 'timing',
|
|
18
|
-
duration: 100,
|
|
19
|
-
},
|
|
20
|
-
'200ms': {
|
|
21
|
-
type: 'timing',
|
|
22
|
-
duration: 200,
|
|
23
|
-
},
|
|
24
|
-
'250ms': {
|
|
25
|
-
type: 'timing',
|
|
26
|
-
duration: 250,
|
|
27
|
-
},
|
|
28
|
-
'300ms': {
|
|
29
|
-
type: 'timing',
|
|
30
|
-
duration: 300,
|
|
31
|
-
},
|
|
32
|
-
'400ms': {
|
|
33
|
-
type: 'timing',
|
|
34
|
-
duration: 400,
|
|
35
|
-
},
|
|
36
|
-
'500ms': {
|
|
37
|
-
type: 'timing',
|
|
38
|
-
duration: 500,
|
|
39
|
-
},
|
|
40
|
-
superBouncy: {
|
|
41
|
-
damping: 5,
|
|
42
|
-
mass: 0.7,
|
|
43
|
-
stiffness: 180,
|
|
44
|
-
},
|
|
45
|
-
bouncy: {
|
|
46
|
-
damping: 9,
|
|
47
|
-
mass: 0.9,
|
|
48
|
-
stiffness: 120,
|
|
49
|
-
},
|
|
50
|
-
superLazy: {
|
|
51
|
-
damping: 25,
|
|
52
|
-
mass: 2,
|
|
53
|
-
stiffness: 25,
|
|
54
|
-
},
|
|
55
|
-
medium: {
|
|
56
|
-
damping: 16,
|
|
57
|
-
stiffness: 90,
|
|
58
|
-
mass: 0.8,
|
|
59
|
-
},
|
|
60
|
-
lazy: {
|
|
61
|
-
damping: 18,
|
|
62
|
-
mass: 0.2,
|
|
63
|
-
stiffness: 10,
|
|
64
|
-
},
|
|
65
|
-
slowest: {
|
|
66
|
-
damping: 15,
|
|
67
|
-
stiffness: 10,
|
|
68
|
-
},
|
|
69
|
-
slow: {
|
|
70
|
-
damping: 45,
|
|
71
|
-
stiffness: 60,
|
|
72
|
-
},
|
|
73
|
-
quick: {
|
|
74
|
-
damping: 25,
|
|
75
|
-
mass: 1,
|
|
76
|
-
stiffness: 550,
|
|
77
|
-
},
|
|
78
|
-
quickLessBouncy: {
|
|
79
|
-
damping: 40,
|
|
80
|
-
mass: 2,
|
|
81
|
-
stiffness: 400,
|
|
82
|
-
},
|
|
83
|
-
quicker: {
|
|
84
|
-
damping: 16,
|
|
85
|
-
mass: 0.6,
|
|
86
|
-
stiffness: 700,
|
|
87
|
-
},
|
|
88
|
-
quickerLessBouncy: {
|
|
89
|
-
damping: 27,
|
|
90
|
-
mass: 0.45,
|
|
91
|
-
stiffness: 750,
|
|
92
|
-
},
|
|
93
|
-
quickest: {
|
|
94
|
-
damping: 15,
|
|
95
|
-
mass: 0.6,
|
|
96
|
-
stiffness: 400,
|
|
97
|
-
},
|
|
98
|
-
quickestLessBouncy: {
|
|
99
|
-
damping: 24,
|
|
100
|
-
mass: 0.35,
|
|
101
|
-
stiffness: 750,
|
|
102
|
-
},
|
|
103
|
-
})
|
|
4
|
+
export const animationsReanimated = createAnimations(animationPresets)
|
|
104
5
|
|
|
105
6
|
export const animations = animationsReanimated
|
package/src/animations-rn.ts
CHANGED
|
@@ -1,115 +1,6 @@
|
|
|
1
1
|
import { createAnimations } from '@tamagui/animations-react-native'
|
|
2
|
+
import { animationPresets } from '@tamagui/animation-helpers'
|
|
2
3
|
|
|
3
|
-
export const animationsReactNative = createAnimations(
|
|
4
|
-
'0ms': {
|
|
5
|
-
type: 'timing',
|
|
6
|
-
duration: 0,
|
|
7
|
-
},
|
|
8
|
-
'50ms': {
|
|
9
|
-
type: 'timing',
|
|
10
|
-
duration: 50,
|
|
11
|
-
},
|
|
12
|
-
'75ms': {
|
|
13
|
-
type: 'timing',
|
|
14
|
-
duration: 75,
|
|
15
|
-
},
|
|
16
|
-
'100ms': {
|
|
17
|
-
type: 'timing',
|
|
18
|
-
duration: 100,
|
|
19
|
-
},
|
|
20
|
-
'200ms': {
|
|
21
|
-
type: 'timing',
|
|
22
|
-
duration: 200,
|
|
23
|
-
},
|
|
24
|
-
'250ms': {
|
|
25
|
-
type: 'timing',
|
|
26
|
-
duration: 250,
|
|
27
|
-
},
|
|
28
|
-
'300ms': {
|
|
29
|
-
type: 'timing',
|
|
30
|
-
duration: 300,
|
|
31
|
-
},
|
|
32
|
-
'400ms': {
|
|
33
|
-
type: 'timing',
|
|
34
|
-
duration: 400,
|
|
35
|
-
},
|
|
36
|
-
'500ms': {
|
|
37
|
-
type: 'timing',
|
|
38
|
-
duration: 500,
|
|
39
|
-
},
|
|
40
|
-
superBouncy: {
|
|
41
|
-
type: 'spring',
|
|
42
|
-
damping: 5,
|
|
43
|
-
mass: 0.7,
|
|
44
|
-
stiffness: 180,
|
|
45
|
-
},
|
|
46
|
-
bouncy: {
|
|
47
|
-
type: 'spring',
|
|
48
|
-
damping: 9,
|
|
49
|
-
mass: 0.9,
|
|
50
|
-
stiffness: 120,
|
|
51
|
-
},
|
|
52
|
-
superLazy: {
|
|
53
|
-
type: 'spring',
|
|
54
|
-
damping: 25,
|
|
55
|
-
mass: 2,
|
|
56
|
-
stiffness: 25,
|
|
57
|
-
},
|
|
58
|
-
lazy: {
|
|
59
|
-
type: 'spring',
|
|
60
|
-
damping: 18,
|
|
61
|
-
mass: 0.2,
|
|
62
|
-
stiffness: 10,
|
|
63
|
-
},
|
|
64
|
-
medium: {
|
|
65
|
-
damping: 16,
|
|
66
|
-
stiffness: 90,
|
|
67
|
-
mass: 0.8,
|
|
68
|
-
},
|
|
69
|
-
slowest: {
|
|
70
|
-
type: 'spring',
|
|
71
|
-
damping: 15,
|
|
72
|
-
stiffness: 10,
|
|
73
|
-
},
|
|
74
|
-
slow: {
|
|
75
|
-
type: 'spring',
|
|
76
|
-
damping: 45,
|
|
77
|
-
stiffness: 60,
|
|
78
|
-
},
|
|
79
|
-
quick: {
|
|
80
|
-
type: 'spring',
|
|
81
|
-
damping: 25,
|
|
82
|
-
mass: 1,
|
|
83
|
-
stiffness: 550,
|
|
84
|
-
},
|
|
85
|
-
quickLessBouncy: {
|
|
86
|
-
type: 'spring',
|
|
87
|
-
damping: 40,
|
|
88
|
-
mass: 2,
|
|
89
|
-
stiffness: 400,
|
|
90
|
-
},
|
|
91
|
-
quicker: {
|
|
92
|
-
type: 'spring',
|
|
93
|
-
damping: 16,
|
|
94
|
-
mass: 0.6,
|
|
95
|
-
stiffness: 700,
|
|
96
|
-
},
|
|
97
|
-
quickerLessBouncy: {
|
|
98
|
-
type: 'spring',
|
|
99
|
-
damping: 27,
|
|
100
|
-
mass: 0.45,
|
|
101
|
-
stiffness: 750,
|
|
102
|
-
},
|
|
103
|
-
quickest: {
|
|
104
|
-
damping: 15,
|
|
105
|
-
mass: 0.6,
|
|
106
|
-
stiffness: 400,
|
|
107
|
-
},
|
|
108
|
-
quickestLessBouncy: {
|
|
109
|
-
damping: 24,
|
|
110
|
-
mass: 0.35,
|
|
111
|
-
stiffness: 750,
|
|
112
|
-
},
|
|
113
|
-
})
|
|
4
|
+
export const animationsReactNative = createAnimations(animationPresets)
|
|
114
5
|
|
|
115
6
|
export const animations = animationsReactNative
|
package/src/settings.ts
CHANGED
package/src/v5-base.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { shorthands } from '@tamagui/shorthands/v4' // v4 same as v5
|
|
|
2
2
|
import type { Shorthands } from '@tamagui/shorthands/v4'
|
|
3
3
|
import { themes, tokens } from '@tamagui/themes/v5'
|
|
4
4
|
import type { V5Themes, V5Tokens } from '@tamagui/themes/v5'
|
|
5
|
+
import type { GenericSizing } from '@tamagui/web'
|
|
5
6
|
import { fonts } from './v5-fonts'
|
|
6
7
|
import type { V5Fonts } from './v5-fonts'
|
|
7
8
|
import { media } from './media'
|
|
@@ -32,10 +33,64 @@ export type V5DefaultConfig = {
|
|
|
32
33
|
themes: V5Themes
|
|
33
34
|
tokens: V5Tokens
|
|
34
35
|
fonts: V5Fonts
|
|
35
|
-
selectionStyles: typeof selectionStyles
|
|
36
36
|
settings: V5Settings
|
|
37
|
+
sizing: GenericSizing
|
|
37
38
|
}
|
|
38
39
|
|
|
40
|
+
// v5's numeric scales cannot derive the ladder, so each rung points text,
|
|
41
|
+
// padding and radius at v5 keys and pins the frozen geometry: v5 buttons
|
|
42
|
+
// keep their heights while their text and spacing go v5-native
|
|
43
|
+
export const defaultSizing = {
|
|
44
|
+
default: 'md',
|
|
45
|
+
sizes: {
|
|
46
|
+
xs: {
|
|
47
|
+
fontSize: '1',
|
|
48
|
+
controlFontSize: '1',
|
|
49
|
+
paddingInline: '2',
|
|
50
|
+
paddingBlock: '1-5',
|
|
51
|
+
gap: '1-5',
|
|
52
|
+
radius: '1',
|
|
53
|
+
px: { height: 24, icon: 12, square: 17 },
|
|
54
|
+
},
|
|
55
|
+
sm: {
|
|
56
|
+
fontSize: '3',
|
|
57
|
+
controlFontSize: '3',
|
|
58
|
+
paddingInline: '3',
|
|
59
|
+
paddingBlock: '2',
|
|
60
|
+
gap: '2',
|
|
61
|
+
radius: '2',
|
|
62
|
+
px: { height: 32, icon: 16, square: 20 },
|
|
63
|
+
},
|
|
64
|
+
md: {
|
|
65
|
+
fontSize: '3',
|
|
66
|
+
controlFontSize: '3',
|
|
67
|
+
paddingInline: '3-5',
|
|
68
|
+
paddingBlock: '2',
|
|
69
|
+
gap: '2',
|
|
70
|
+
radius: '2',
|
|
71
|
+
px: { height: 36, icon: 16, square: 22 },
|
|
72
|
+
},
|
|
73
|
+
lg: {
|
|
74
|
+
fontSize: '5',
|
|
75
|
+
controlFontSize: '5',
|
|
76
|
+
paddingInline: '5',
|
|
77
|
+
paddingBlock: '2',
|
|
78
|
+
gap: '2',
|
|
79
|
+
radius: '2',
|
|
80
|
+
px: { height: 40, icon: 16, square: 25 },
|
|
81
|
+
},
|
|
82
|
+
xl: {
|
|
83
|
+
fontSize: '6',
|
|
84
|
+
controlFontSize: '6',
|
|
85
|
+
paddingInline: '6',
|
|
86
|
+
paddingBlock: '2-5',
|
|
87
|
+
gap: '2-5',
|
|
88
|
+
radius: '3',
|
|
89
|
+
px: { height: 48, icon: 20, square: 28 },
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
} as const satisfies GenericSizing
|
|
93
|
+
|
|
39
94
|
// base config without animations - users must provide their own
|
|
40
95
|
export const defaultConfig: V5DefaultConfig = {
|
|
41
96
|
media,
|
|
@@ -43,6 +98,6 @@ export const defaultConfig: V5DefaultConfig = {
|
|
|
43
98
|
themes,
|
|
44
99
|
tokens,
|
|
45
100
|
fonts,
|
|
46
|
-
selectionStyles,
|
|
47
101
|
settings,
|
|
102
|
+
sizing: defaultSizing,
|
|
48
103
|
}
|
package/src/v5-fonts.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
createSystemFont,
|
|
3
|
+
v5SystemFontLineHeight,
|
|
4
|
+
v5SystemFontSizes,
|
|
5
|
+
} from '@tamagui/create-system-font'
|
|
2
6
|
const isNative = process.env.TAMAGUI_TARGET === 'native'
|
|
3
7
|
|
|
4
8
|
export { createSystemFont }
|
|
@@ -7,11 +11,13 @@ export { createSystemFont }
|
|
|
7
11
|
const headingLineHeight = (size: number) =>
|
|
8
12
|
Math.round(isNative ? size * 1.2 : size * 1.12 + 5)
|
|
9
13
|
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
14
|
+
// v5 pins its own size and line height scales. the package defaults moved to a
|
|
15
|
+
// smooth curve for v6, and a v5 app must not resize when it takes the update
|
|
16
|
+
const v5Scale = { sizes: v5SystemFontSizes, sizeLineHeight: v5SystemFontLineHeight }
|
|
17
|
+
|
|
18
|
+
// keep v5 font scales explicitly absolute. numeric font definitions also retain
|
|
19
|
+
// pixel units in v3; only authored numeric styles and numeric-string font values
|
|
20
|
+
// express line-height ratios. token creation preserves numeric values for arithmetic.
|
|
15
21
|
const toPxScale = <T extends Record<string, number>>(obj: T): T =>
|
|
16
22
|
Object.fromEntries(
|
|
17
23
|
Object.entries(obj).map(([k, v]) => [k, typeof v === 'number' ? `${v}px` : v])
|
|
@@ -24,9 +30,10 @@ const pinFontToPx = <F extends { size: any; lineHeight?: any }>(font: F): F => (
|
|
|
24
30
|
})
|
|
25
31
|
|
|
26
32
|
export const fonts = {
|
|
27
|
-
body: pinFontToPx(createSystemFont()),
|
|
33
|
+
body: pinFontToPx(createSystemFont(v5Scale)),
|
|
28
34
|
heading: pinFontToPx(
|
|
29
35
|
createSystemFont({
|
|
36
|
+
...v5Scale,
|
|
30
37
|
font: {
|
|
31
38
|
weight: {
|
|
32
39
|
0: '600',
|