-
Notifications
You must be signed in to change notification settings - Fork 6
/
dict.js
284 lines (282 loc) · 13.6 KB
/
dict.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
const dict = {
margin: { alias: 'm', scale: 'space', transformer: 'space', type: ['number', 'string'] },
'margin-top': { alias: 'mt', scale: 'space', transformer: 'space', type: ['number', 'string'] },
'margin-right': { alias: 'mr', scale: 'space', transformer: 'space', type: ['number', 'string'] },
'margin-bottom': {
alias: 'mb',
scale: 'space',
transformer: 'space',
type: ['number', 'string'],
},
'margin-left': { alias: 'ml', scale: 'space', transformer: 'space', type: ['number', 'string'] },
padding: { alias: 'p', scale: 'space', transformer: 'space', type: ['number', 'string'] },
'padding-top': { alias: 'pt', scale: 'space', transformer: 'space', type: ['number', 'string'] },
'padding-right': {
alias: 'pr',
scale: 'space',
transformer: 'space',
type: ['number', 'string'],
},
'padding-bottom': {
alias: 'pb',
scale: 'space',
transformer: 'space',
type: ['number', 'string'],
},
'padding-left': { alias: 'pl', scale: 'space', transformer: 'space', type: ['number', 'string'] },
font: { type: 'string' },
'font-size': {
alias: 'fz',
scale: 'fontSizes',
transformer: 'fontSize',
type: ['number', 'string'],
},
'font-variant': {
alias: 'fv',
type: 'string',
},
color: { alias: 'c', type: 'string' },
cursor: { alias: 'cur', type: 'string' },
transition: { alias: 'trs', type: 'string' },
'transition-delay': { alias: 'trsde', type: 'string' },
'transition-duration': { alias: 'trsdu', type: 'string' },
'transition-property': { alias: 'trsp', type: 'string' },
'transition-timing-function': { alias: 'trstf', type: 'string' },
'object-fit': { alias: 'of', type: 'string' },
'object-position': { alias: 'obp', type: 'string' },
'font-family': { alias: 'ff', type: 'string' },
'text-align': { alias: 'ta', type: 'string' },
'text-transform': { alias: 'tt', type: 'string' },
'word-spacing': { alias: 'wos', type: 'string' },
'word-break': { alias: 'wob', type: 'string' },
'white-space': { alias: 'whs', type: 'string' },
'text-indent': { alias: 'ti', type: ['number', 'string'] },
'mix-blend-mode': { alias: 'mbm', type: 'string' },
'line-height': { alias: 'lh', type: ['number', 'string'] },
'font-weight': { alias: 'fw', type: ['number', 'string'] },
'font-style': { alias: 'fs', type: 'string' },
'text-decoration': { alias: 'td', type: 'string' },
'text-decoration-line': { alias: 'tdl', type: 'string' },
'text-decoration-color': { alias: 'tdc', type: 'string' },
'text-decoration-style': { alias: 'tds', type: 'string' },
'text-decoration-thickness': { alias: 'tdth', type: 'string' },
'letter-spacing': { alias: 'lts', transformer: 'pixel', type: ['number', 'string'] },
display: { alias: 'd', type: 'string' },
width: { alias: 'w', transformer: 'width', type: ['number', 'string'] },
'max-width': { alias: 'maw', transformer: 'pixel', type: ['number', 'string'] },
'min-width': { alias: 'miw', transformer: 'pixel', type: ['number', 'string'] },
height: { alias: 'h', transformer: 'pixel', type: ['number', 'string'] },
'max-height': { alias: 'mah', transformer: 'pixel', type: ['number', 'string'] },
'min-height': { alias: 'mih', transformer: 'pixel', type: ['number', 'string'] },
'size-width': { type: 'string' },
'size-height': { type: 'string' },
'ratio-padding': { type: ['number', 'string'] },
ratio: { type: ['number', 'string'] },
'user-select': { alias: 'us', type: 'string' },
'vertical-align': { alias: 'va', type: 'string' },
'align-items': { alias: 'ai', type: 'string' },
'align-content': { alias: 'ac', type: 'string' },
'justify-items': { alias: 'ji', type: 'string' },
'justify-content': { alias: 'jc', type: 'string' },
'flex-wrap': { alias: 'fxw', type: 'string' },
'flex-grow': { alias: 'fxg', type: 'string' },
'flex-shrink': { alias: 'fxs', type: 'string' },
'flex-basis': { alias: 'fxb', transformer: 'width', type: 'string' },
'flex-direction': { alias: 'fxd', type: 'string' },
flex: { alias: 'fx', type: 'string' },
'justify-self': { alias: 'js', type: 'string' },
'align-self': { alias: 'asf', type: 'string' },
order: { alias: 'ord', type: 'string' },
'grid-gap': { type: 'string', scale: 'space', transformer: 'pixel' },
'grid-column-gap': { type: 'string', scale: 'space', transformer: 'pixel' },
'grid-row-gap': { type: 'string', scale: 'space', transformer: 'pixel' },
'grid-column': { type: 'string', process: false },
'grid-row': { type: 'string', process: false },
'grid-auto-flow': { type: 'string' },
'grid-auto-columns': { type: 'string' },
'grid-auto-rows': { type: 'string' },
'grid-template-columns': { type: 'string' },
'grid-template-rows': { type: 'string' },
'grid-template-areas': { type: 'string' },
'grid-template': { type: 'string' },
'grid-area': { type: 'string', process: false },
border: { alias: 'bd', type: 'string' },
'border-width': { alias: 'bdw', transformer: 'pixel', type: 'string' },
'border-style': { alias: 'bds', type: 'string' },
'border-top': { alias: 'bdt', type: 'string' },
'border-right': { alias: 'bdr', type: 'string' },
'border-bottom': { alias: 'bdb', type: 'string' },
'border-left': { alias: 'bdl', type: 'string' },
'border-color': { alias: 'bdc', type: 'string' },
'border-radius': { alias: 'bdrs', transformer: 'pixel', type: 'string' },
'box-shadow': { alias: 'bxsh', type: 'string' },
'box-sizing': { alias: 'bxsz', type: 'string' },
opacity: { alias: 'op', type: ['number', 'string'] },
outline: { alias: 'ol', type: 'string' },
overflow: { alias: 'ov', type: 'string' },
background: { alias: 'bg', type: 'string' },
'background-color': { alias: 'bgc', type: 'string' },
'background-image': { alias: 'bgi', type: 'string' },
'background-position': { alias: 'bgp', type: 'string' },
'background-repeat': { alias: 'bgr', type: 'string' },
'background-size': { alias: 'bgsz', type: 'string' },
'background-blend-mode': { alias: 'bbm', type: 'string' },
'background-attachment': { alias: 'bga', type: 'string' },
filter: { alias: 'f', type: 'string' },
position: { alias: 'pos', type: 'string' },
'z-index': { alias: 'z', type: 'number' },
top: { alias: 't', transformer: 'pixel', type: ['number', 'string'] },
right: { alias: 'r', transformer: 'pixel', type: ['number', 'string'] },
bottom: { alias: 'b', transformer: 'pixel', type: ['number', 'string'] },
left: { alias: 'l', transformer: 'pixel', type: ['number', 'string'] },
transform: { alias: 'trf', type: 'string' },
'transform-origin': { alias: 'trfo', type: 'string' },
'transform-style': { alias: 'trfs', type: 'string' },
'list-style': { alias: 'lis', type: 'string' },
'list-style-type': { alias: 'list', type: 'string' },
'list-style-image': { alias: 'lisi', type: 'string' },
'list-style-position': { alias: 'lisp', type: 'string' },
'padding-x': {
alias: 'px',
transformer: 'pixel',
type: ['number', 'string'],
compose: ['paddingLeft', 'paddingRight'],
},
'padding-y': {
alias: 'py',
transformer: 'pixel',
type: ['number', 'string'],
compose: ['paddingTop', 'paddingBottom'],
},
'margin-x': {
alias: 'mx',
transformer: 'pixel',
type: ['number', 'string'],
compose: ['marginLeft', 'marginRight'],
},
'margin-y': {
alias: 'my',
transformer: 'pixel',
type: ['number', 'string'],
compose: ['marginTop', 'marginBottom'],
},
animation: { alias: 'anim', type: 'string' },
'animation-delay': { alias: 'animdel', type: 'string' },
'animation-direction': { alias: 'animdir', type: 'string' },
'animation-duration': { alias: 'animdur', type: 'string' },
'animation-fill-mode': { alias: 'animfm', type: 'string' },
'animation-iteration-count': { alias: 'animic', type: 'string' },
'animation-name': { alias: 'animn', type: 'string' },
'animation-play-state': { alias: 'animps', type: 'string' },
'animation-timing-function': { alias: 'animtf', type: 'string' },
appearance: { alias: 'ap', type: 'string' },
'border-bottom-color': { alias: 'bdbc', type: 'string' },
'border-bottom-image': { alias: 'bdbi', type: 'string' },
'border-break': { alias: 'bdbk', type: 'string' },
'border-bottom-left-image': { alias: 'bdbli', type: 'string' },
'border-bottom-left-radius': { alias: 'bdblrs', type: 'string' },
'border-bottom-right-image': { alias: 'bdbri', type: 'string' },
'border-bottom-right-radius': { alias: 'bdbrrs', type: 'string' },
'border-bottom-style': { alias: 'bdbs', type: 'string' },
'border-bottom-width': { alias: 'bdbw', type: 'string' },
'border-corner-image': { alias: 'bdci', type: 'string' },
'border-collapse': { alias: 'bdcl', type: 'string' },
'border-fit': { alias: 'bdf', type: 'string' },
'border-image': { alias: 'bdi', type: 'string' },
'border-left-color': { alias: 'bdlc', type: 'string' },
'border-length': { alias: 'bdlen', type: 'string' },
'border-left-image': { alias: 'bdli', type: 'string' },
'border-left-style': { alias: 'bdls', type: 'string' },
'border-left-width': { alias: 'bdlw', type: 'string' },
'border-right-color': { alias: 'bdrc', type: 'string' },
'border-right-image': { alias: 'bdri', type: 'string' },
'border-right-style': { alias: 'bdrst', type: 'string' },
'border-right-width': { alias: 'bdrw', type: 'string' },
'border-spacing': { alias: 'bdsp', type: 'string' },
'border-top-color': { alias: 'bdtc', type: 'string' },
'border-top-image': { alias: 'bdti', type: 'string' },
'border-top-left-image': { alias: 'bdtli', type: 'string' },
'border-top-left-radius': { alias: 'bdtlrs', type: 'string' },
'border-top-right-image': { alias: 'bdtri', type: 'string' },
'border-top-right-radius': { alias: 'bdtrrs', type: 'string' },
'border-top-style': { alias: 'bdts', type: 'string' },
'border-top-width': { alias: 'bdtw', type: 'string' },
'backface-visibility': { alias: 'bfv', type: 'string' },
'background-break': { alias: 'bgbk', type: 'string' },
'background-clip': { alias: 'bgcp', type: 'string' },
'background-origin': { alias: 'bgo', type: 'string' },
'background-position-x': { alias: 'bgpx', type: 'string' },
'background-position-y': { alias: 'bgpy', type: 'string' },
clear: { alias: 'cl', type: 'string' },
content: { alias: 'cnt', type: 'string' },
'counter-increment': { alias: 'coi', type: 'string' },
columns: { alias: 'colm', type: 'string' },
'column-count': { alias: 'colmc', type: 'string' },
'column-fill': { alias: 'colmf', type: 'string' },
'column-gap': { alias: 'colmg', type: 'string' },
'column-rule': { alias: 'colmr', type: 'string' },
'column-rule-color': { alias: 'colmrc', type: 'string' },
'column-rule-style': { alias: 'colmrs', type: 'string' },
'column-rule-width': { alias: 'colmrw', type: 'string' },
'column-span': { alias: 'colms', type: 'string' },
'column-width': { alias: 'colmw', type: 'string' },
'counter-reset': { alias: 'cor', type: 'string' },
clip: { alias: 'cp', type: 'string' },
'caption-side': { alias: 'cps', type: 'string' },
'empty-cells': { alias: 'ec', type: 'string' },
'font-display': { alias: 'fd', type: 'string' },
'font-effect': { alias: 'fef', type: 'string' },
'font-emphasize': { alias: 'fem', type: 'string' },
'font-emphasize-position': { alias: 'femp', type: 'string' },
'font-emphasize-style': { alias: 'fems', type: 'string' },
float: { alias: 'fl', type: 'string' },
'font-smoothing': { alias: 'fsm', type: 'string' },
'font-stretch': { alias: 'fst', type: 'string' },
'font-variation-settings': { alias: 'fvs', type: 'string' },
'flex-flow': { alias: 'fxf', type: 'string' },
'font-size-adjust': { alias: 'fsza', type: 'string' },
grid: { alias: 'gd', type: 'string' },
'grid-column-start': { alias: 'gcs', type: 'string' },
'grid-column-end': { alias: 'gce', type: 'string' },
'grid-row-start': { alias: 'grs', type: 'string' },
'grid-row-end': { alias: 'gre', type: 'string' },
'max-resolution': { alias: 'mar', type: 'string' },
'min-resolution': { alias: 'mir', type: 'string' },
'outline-color': { alias: 'olc', type: 'string' },
'outline-offset': { alias: 'olo', type: 'string' },
'outline-style': { alias: 'ols', type: 'string' },
'outline-width|thin|medium|thick': { alias: 'olw', type: 'string' },
orientation: { alias: 'ori', type: 'string' },
orphans: { alias: 'orp', type: 'string' },
'overflow-style': { alias: 'ovs', type: 'string' },
'overflow-x': { alias: 'ovx', type: 'string' },
'overflow-y': { alias: 'ovy', type: 'string' },
'page-break-after': { alias: 'pgba', type: 'string' },
'page-break-before': { alias: 'pgbb', type: 'string' },
'page-break-inside': { alias: 'pgbi', type: 'string' },
perspective: { alias: 'pspc', type: ['number', 'string'] },
resize: { alias: 'rsz', type: 'string' },
'text-align-last': { alias: 'tal', type: 'string' },
'table-layout': { alias: 'tbl', type: 'string' },
'text-emphasis': { alias: 'te', type: 'string' },
'text-height': { alias: 'th', type: 'string' },
'text-justify': { alias: 'tj', type: 'string' },
'text-outline': { alias: 'to', type: 'string' },
'text-overflow': { alias: 'tov', type: 'string' },
'text-replace': { alias: 'tr', type: 'string' },
'text-shadow': { alias: 'tsh', type: 'string' },
'text-wrap': { alias: 'tw', type: 'string' },
visibility: { alias: 'v', type: 'string' },
'white-space-collapse': { alias: 'whsc', type: 'string' },
widows: { alias: 'wid', type: 'string' },
'writing-mode': { alias: 'wm', type: 'string' },
'word-wrap': { alias: 'wow', type: 'string' },
zoom: { alias: 'zom', type: 'string' },
};
export const hashPropsWithAliases = Object.keys(dict).reduce((acc, name) => {
const propValue = { ...dict[name], name };
acc[name] = propValue;
if (propValue.alias) acc[propValue.alias] = propValue;
return acc;
}, {});
export default dict;