-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathProps.purs
425 lines (282 loc) · 12.2 KB
/
Props.purs
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
module React.DOM.Props where
import React (Event(), EventHandlerContext(), KeyboardEvent(), MouseEvent(), handle)
foreign import data Props :: *
foreign import unsafeMkProps :: forall val. String -> val -> Props
foreign import unsafeUnfoldProps :: forall vals. String -> { | vals } -> Props
foreign import unsafeFromPropsArray :: forall props. Array Props -> props
aria :: forall ariaAttrs. { | ariaAttrs } -> Props
aria = unsafeUnfoldProps "aria"
_data :: forall dataAttrs. { | dataAttrs } -> Props
_data = unsafeUnfoldProps "data"
style :: forall style. { | style } -> Props
style = unsafeUnfoldProps "style"
dangerouslySetInnerHTML :: { __html :: String } -> Props
dangerouslySetInnerHTML = unsafeMkProps "dangerouslySetInnerHTML"
accept :: String -> Props
accept = unsafeMkProps "accept"
acceptCharset :: String -> Props
acceptCharset = unsafeMkProps "acceptCharset"
accessKey :: String -> Props
accessKey = unsafeMkProps "accessKey"
action :: String -> Props
action = unsafeMkProps "action"
allowFullScreen :: String -> Props
allowFullScreen = unsafeMkProps "allowFullScreen"
allowTransparency :: String -> Props
allowTransparency = unsafeMkProps "allowTransparency"
alt :: String -> Props
alt = unsafeMkProps "alt"
async :: String -> Props
async = unsafeMkProps "async"
autoComplete :: String -> Props
autoComplete = unsafeMkProps "autoComplete"
autoFocus :: Boolean -> Props
autoFocus = unsafeMkProps "autoFocus"
autoPlay :: String -> Props
autoPlay = unsafeMkProps "autoPlay"
cellPadding :: String -> Props
cellPadding = unsafeMkProps "cellPadding"
cellSpacing :: String -> Props
cellSpacing = unsafeMkProps "cellSpacing"
charSet :: String -> Props
charSet = unsafeMkProps "charSet"
checked :: String -> Props
checked = unsafeMkProps "checked"
classID :: String -> Props
classID = unsafeMkProps "classID"
className :: String -> Props
className = unsafeMkProps "className"
cols :: String -> Props
cols = unsafeMkProps "cols"
colSpan :: String -> Props
colSpan = unsafeMkProps "colSpan"
content :: String -> Props
content = unsafeMkProps "content"
contentEditable :: String -> Props
contentEditable = unsafeMkProps "contentEditable"
contextMenu :: String -> Props
contextMenu = unsafeMkProps "contextMenu"
controls :: String -> Props
controls = unsafeMkProps "controls"
coords :: String -> Props
coords = unsafeMkProps "coords"
crossOrigin :: String -> Props
crossOrigin = unsafeMkProps "crossOrigin"
dateTime :: String -> Props
dateTime = unsafeMkProps "dateTime"
defer :: String -> Props
defer = unsafeMkProps "defer"
dir :: String -> Props
dir = unsafeMkProps "dir"
disabled :: Boolean -> Props
disabled = unsafeMkProps "disabled"
download :: String -> Props
download = unsafeMkProps "download"
draggable :: String -> Props
draggable = unsafeMkProps "draggable"
encType :: String -> Props
encType = unsafeMkProps "encType"
form :: String -> Props
form = unsafeMkProps "form"
formAction :: String -> Props
formAction = unsafeMkProps "formAction"
formEncType :: String -> Props
formEncType = unsafeMkProps "formEncType"
formMethod :: String -> Props
formMethod = unsafeMkProps "formMethod"
formNoValidate :: String -> Props
formNoValidate = unsafeMkProps "formNoValidate"
formTarget :: String -> Props
formTarget = unsafeMkProps "formTarget"
frameBorder :: String -> Props
frameBorder = unsafeMkProps "frameBorder"
height :: String -> Props
height = unsafeMkProps "height"
hidden :: String -> Props
hidden = unsafeMkProps "hidden"
href :: String -> Props
href = unsafeMkProps "href"
hrefLang :: String -> Props
hrefLang = unsafeMkProps "hrefLang"
htmlFor :: String -> Props
htmlFor = unsafeMkProps "htmlFor"
httpEquiv :: String -> Props
httpEquiv = unsafeMkProps "httpEquiv"
icon :: String -> Props
icon = unsafeMkProps "icon"
_id :: String -> Props
_id = unsafeMkProps "id"
key :: String -> Props
key = unsafeMkProps "key"
label :: String -> Props
label = unsafeMkProps "label"
lang :: String -> Props
lang = unsafeMkProps "lang"
list :: String -> Props
list = unsafeMkProps "list"
loop :: String -> Props
loop = unsafeMkProps "loop"
manifest :: String -> Props
manifest = unsafeMkProps "manifest"
marginHeight :: String -> Props
marginHeight = unsafeMkProps "marginHeight"
marginWidth :: String -> Props
marginWidth = unsafeMkProps "marginWidth"
max :: String -> Props
max = unsafeMkProps "max"
maxLength :: String -> Props
maxLength = unsafeMkProps "maxLength"
media :: String -> Props
media = unsafeMkProps "media"
mediaGroup :: String -> Props
mediaGroup = unsafeMkProps "mediaGroup"
method :: String -> Props
method = unsafeMkProps "method"
min :: String -> Props
min = unsafeMkProps "min"
multiple :: String -> Props
multiple = unsafeMkProps "multiple"
muted :: String -> Props
muted = unsafeMkProps "muted"
name :: String -> Props
name = unsafeMkProps "name"
noValidate :: String -> Props
noValidate = unsafeMkProps "noValidate"
open :: String -> Props
open = unsafeMkProps "open"
pattern :: String -> Props
pattern = unsafeMkProps "pattern"
placeholder :: String -> Props
placeholder = unsafeMkProps "placeholder"
poster :: String -> Props
poster = unsafeMkProps "poster"
preload :: String -> Props
preload = unsafeMkProps "preload"
radioGroup :: String -> Props
radioGroup = unsafeMkProps "radioGroup"
readOnly :: String -> Props
readOnly = unsafeMkProps "readOnly"
rel :: String -> Props
rel = unsafeMkProps "rel"
required :: String -> Props
required = unsafeMkProps "required"
role :: String -> Props
role = unsafeMkProps "role"
rows :: String -> Props
rows = unsafeMkProps "rows"
rowSpan :: String -> Props
rowSpan = unsafeMkProps "rowSpan"
sandbox :: String -> Props
sandbox = unsafeMkProps "sandbox"
scope :: String -> Props
scope = unsafeMkProps "scope"
scrolling :: String -> Props
scrolling = unsafeMkProps "scrolling"
seamless :: String -> Props
seamless = unsafeMkProps "seamless"
selected :: String -> Props
selected = unsafeMkProps "selected"
shape :: String -> Props
shape = unsafeMkProps "shape"
size :: String -> Props
size = unsafeMkProps "size"
sizes :: String -> Props
sizes = unsafeMkProps "sizes"
span :: String -> Props
span = unsafeMkProps "span"
spellCheck :: String -> Props
spellCheck = unsafeMkProps "spellCheck"
src :: String -> Props
src = unsafeMkProps "src"
srcDoc :: String -> Props
srcDoc = unsafeMkProps "srcDoc"
srcSet :: String -> Props
srcSet = unsafeMkProps "srcSet"
start :: String -> Props
start = unsafeMkProps "start"
step :: String -> Props
step = unsafeMkProps "step"
tabIndex :: String -> Props
tabIndex = unsafeMkProps "tabIndex"
target :: String -> Props
target = unsafeMkProps "target"
title :: String -> Props
title = unsafeMkProps "title"
_type :: String -> Props
_type = unsafeMkProps "type"
useMap :: String -> Props
useMap = unsafeMkProps "useMap"
value :: String -> Props
value = unsafeMkProps "value"
width :: String -> Props
width = unsafeMkProps "width"
wmode :: String -> Props
wmode = unsafeMkProps "wmode"
onCopy :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onCopy f = unsafeMkProps "onCopy" (handle f)
onCut :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onCut f = unsafeMkProps "onCut" (handle f)
onPaste :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onPaste f = unsafeMkProps "onPaste" (handle f)
onKeyDown :: forall eff props state result. (KeyboardEvent -> EventHandlerContext eff props state result) -> Props
onKeyDown f = unsafeMkProps "onKeyDown" (handle f)
onKeyPress :: forall eff props state result. (KeyboardEvent -> EventHandlerContext eff props state result) -> Props
onKeyPress f = unsafeMkProps "onKeyPress" (handle f)
onKeyUp :: forall eff props state result. (KeyboardEvent -> EventHandlerContext eff props state result) -> Props
onKeyUp f = unsafeMkProps "onKeyUp" (handle f)
onFocus :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onFocus f = unsafeMkProps "onFocus" (handle f)
onBlur :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onBlur f = unsafeMkProps "onBlur" (handle f)
onChange :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onChange f = unsafeMkProps "onChange" (handle f)
onInput :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onInput f = unsafeMkProps "onInput" (handle f)
onSubmit :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onSubmit f = unsafeMkProps "onSubmit" (handle f)
onClick :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onClick f = unsafeMkProps "onClick" (handle f)
onDoubleClick :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDoubleClick f = unsafeMkProps "onDoubleClick" (handle f)
onDrag :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDrag f = unsafeMkProps "onDrag" (handle f)
onDragEnd :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDragEnd f = unsafeMkProps "onDragEnd" (handle f)
onDragEnter :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDragEnter f = unsafeMkProps "onDragEnter" (handle f)
onDragExit :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDragExit f = unsafeMkProps "onDragExit" (handle f)
onDragLeave :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDragLeave f = unsafeMkProps "onDragLeave" (handle f)
onDragOver :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDragOver f = unsafeMkProps "onDragOver" (handle f)
onDragStart :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDragStart f = unsafeMkProps "onDragStart" (handle f)
onDrop :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onDrop f = unsafeMkProps "onDrop" (handle f)
onMouseDown :: forall eff props state result. (MouseEvent -> EventHandlerContext eff props state result) -> Props
onMouseDown f = unsafeMkProps "onMouseDown" (handle f)
onMouseEnter :: forall eff props state result. (MouseEvent -> EventHandlerContext eff props state result) -> Props
onMouseEnter f = unsafeMkProps "onMouseEnter" (handle f)
onMouseLeave :: forall eff props state result. (MouseEvent -> EventHandlerContext eff props state result) -> Props
onMouseLeave f = unsafeMkProps "onMouseLeave" (handle f)
onMouseMove :: forall eff props state result. (MouseEvent -> EventHandlerContext eff props state result) -> Props
onMouseMove f = unsafeMkProps "onMouseMove" (handle f)
onMouseOut :: forall eff props state result. (MouseEvent -> EventHandlerContext eff props state result) -> Props
onMouseOut f = unsafeMkProps "onMouseOut" (handle f)
onMouseOver :: forall eff props state result. (MouseEvent -> EventHandlerContext eff props state result) -> Props
onMouseOver f = unsafeMkProps "onMouseOver" (handle f)
onMouseUp :: forall eff props state result. (MouseEvent -> EventHandlerContext eff props state result) -> Props
onMouseUp f = unsafeMkProps "onMouseUp" (handle f)
onTouchCancel :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onTouchCancel f = unsafeMkProps "onTouchCancel" (handle f)
onTouchEnd :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onTouchEnd f = unsafeMkProps "onTouchEnd" (handle f)
onTouchMove :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onTouchMove f = unsafeMkProps "onTouchMove" (handle f)
onTouchStart :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onTouchStart f = unsafeMkProps "onTouchStart" (handle f)
onScroll :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onScroll f = unsafeMkProps "onScroll" (handle f)
onWheel :: forall eff props state result. (Event -> EventHandlerContext eff props state result) -> Props
onWheel f = unsafeMkProps "onWheel" (handle f)