@@ -14,20 +14,15 @@ const spacing = {
14
14
120 : 120 ,
15
15
160 : 160 ,
16
16
} as const ;
17
-
18
- const negativeSpacing = {
19
- negative0 : 0 ,
20
- negative4 : 4 ,
21
- negative8 : 8 ,
22
- negative12 : 12 ,
23
- negative16 : 16 ,
24
- negative24 : 24 ,
25
- negative32 : 32 ,
26
- negative40 : 40 ,
27
- negative80 : 80 ,
28
- negative120 : 120 ,
29
- negative160 : 160 ,
30
- } as const ;
17
+ const negativeSpacing : Record < `negative${keyof typeof spacing } `, number > = Object . entries (
18
+ spacing
19
+ ) . reduce (
20
+ ( acc , [ key , value ] ) => ( {
21
+ ...acc ,
22
+ [ `negative${ key } ` ] : value ,
23
+ } ) ,
24
+ { } as Record < `negative${keyof typeof spacing } `, number >
25
+ ) ;
31
26
32
27
const radius = {
33
28
...spacing ,
@@ -61,55 +56,11 @@ export const unconditionalProperties = {
61
56
borderBottomLeftRadius : radius ,
62
57
borderBottomRightRadius : radius ,
63
58
textTransform : [ "none" , "uppercase" , "lowercase" , "capitalize" ] ,
64
- fontFamily : {
65
- body : vars . typography . body . fontFamily ,
66
- display : vars . typography . display . fontFamily ,
67
- headline : vars . typography . headline . fontFamily ,
68
- label : vars . typography . label . fontFamily ,
69
- title : vars . typography . title . fontFamily ,
70
- } ,
71
- fontWeight : {
72
- body : vars . typography . body . fontWeight . regular ,
73
- bodyStrong : vars . typography . body . fontWeight . strong ,
74
- display : vars . typography . display . fontWeight ,
75
- headline : vars . typography . headline . fontWeight ,
76
- label : vars . typography . label . fontWeight ,
77
- title : vars . typography . title . fontWeight ,
78
- } ,
79
- fontSize : {
80
- bodySmall : vars . typography . body . sizes . small . fontSize ,
81
- bodyMedium : vars . typography . body . sizes . medium . fontSize ,
82
- bodyLarge : vars . typography . body . sizes . large . fontSize ,
83
- displaySmall : vars . typography . display . sizes . small . fontSize ,
84
- displayMedium : vars . typography . display . sizes . medium . fontSize ,
85
- displayLarge : vars . typography . display . sizes . large . fontSize ,
86
- headlineSmall : vars . typography . headline . sizes . small . fontSize ,
87
- headlineMedium : vars . typography . headline . sizes . medium . fontSize ,
88
- headlineLarge : vars . typography . headline . sizes . large . fontSize ,
89
- labelSmall : vars . typography . label . sizes . small . fontSize ,
90
- labelMedium : vars . typography . label . sizes . medium . fontSize ,
91
- labelLarge : vars . typography . label . sizes . large . fontSize ,
92
- titleSmall : vars . typography . title . sizes . small . fontSize ,
93
- titleMedium : vars . typography . title . sizes . medium . fontSize ,
94
- titleLarge : vars . typography . title . sizes . large . fontSize ,
95
- } ,
96
- lineHeight : {
97
- bodySmall : vars . typography . body . sizes . small . lineHeight ,
98
- bodyMedium : vars . typography . body . sizes . medium . lineHeight ,
99
- bodyLarge : vars . typography . body . sizes . large . lineHeight ,
100
- displaySmall : vars . typography . display . sizes . small . lineHeight ,
101
- displayMedium : vars . typography . display . sizes . medium . lineHeight ,
102
- displayLarge : vars . typography . display . sizes . large . lineHeight ,
103
- headlineSmall : vars . typography . headline . sizes . small . lineHeight ,
104
- headlineMedium : vars . typography . headline . sizes . medium . lineHeight ,
105
- headlineLarge : vars . typography . headline . sizes . large . lineHeight ,
106
- labelSmall : vars . typography . label . sizes . small . lineHeight ,
107
- labelMedium : vars . typography . label . sizes . medium . lineHeight ,
108
- labelLarge : vars . typography . label . sizes . large . lineHeight ,
109
- titleSmall : vars . typography . title . sizes . small . lineHeight ,
110
- titleMedium : vars . typography . title . sizes . medium . lineHeight ,
111
- titleLarge : vars . typography . title . sizes . large . lineHeight ,
112
- } ,
59
+ fontFamily : vars . fontFamily ,
60
+ fontWeight : vars . fontWeight ,
61
+ fontSize : vars . fontSize ,
62
+ lineHeight : vars . lineHeight ,
63
+ letterSpacing : vars . letterSpacing ,
113
64
height : {
114
65
...spacing ,
115
66
full : "100%" ,
0 commit comments