-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathconsts.js
More file actions
94 lines (93 loc) · 2.81 KB
/
consts.js
File metadata and controls
94 lines (93 loc) · 2.81 KB
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
// For now, we are using a local copy of react-html-attributes.
// Eventually, the relative path here should be removed, and
// the version number of react-html-attributes should be bumped.
module.exports.htmlProps = require("./react-html-attributes");
module.exports.svgProps = require("svg-element-attributes");
module.exports.voids = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"];
// The types for certain attributes differ according to their containing element.
// These appear in the typesByElement object, using "*" as a default element
// (required only if the default attribute type is other than `String`).
// For clarity, it is an error for any attribute to be in both `types` and `typesByElement`.
module.exports.typesByElement = {
"cols": {
"textarea": "Int",
},
"max": {
"meter": "Number",
"progress": "Number"
},
"min": {
"meter": "Number"
},
"rows": {
"textarea": "Int"
},
"size" : {
"input": "Int",
"select": "Int"
}
};
module.exports.types = {
"allowFullScreen": "Boolean",
"allowTransparency": "Boolean",
"async": "Boolean",
"autoComplete": "Boolean",
"autoFocus": "Boolean",
"autoPlay": "Boolean",
"capture": "Boolean",
"checked": "Boolean",
"children": "Array JSX",
"colSpan": "Int",
"contentEditable": "Boolean",
"controls": "Boolean",
"dangerouslySetInnerHTML": "{ __html :: String }",
"default": "Boolean",
"defer": "Boolean",
"disabled": "Boolean",
"draggable": "Boolean",
"formNoValidate": "Boolean",
"hidden": "Boolean",
"itemScope": "Boolean",
"loop": "Boolean",
"maxLength": "Int",
"minLength": "Int",
"multiple": "Boolean",
"muted": "Boolean",
"noValidate": "Boolean",
"onBlur": "EventHandler",
"onChange": "EventHandler",
"onClick": "EventHandler",
"onFocus": "EventHandler",
"onInput": "EventHandler",
"onInvalid": "EventHandler",
"onKeyDown": "EventHandler",
"onKeyPress": "EventHandler",
"onKeyUp": "EventHandler",
"onMouseDown": "EventHandler",
"onMouseEnter": "EventHandler",
"onMouseLeave": "EventHandler",
"onMouseMove": "EventHandler",
"onMouseOut": "EventHandler",
"onMouseOver": "EventHandler",
"onMouseUp": "EventHandler",
"onSubmit": "EventHandler",
"open": "Boolean",
"playsInline": "Boolean",
"readOnly": "Boolean",
"ref": "Ref (Nullable Node)",
"required": "Boolean",
"reversed": "Boolean",
"rowSpan": "Int",
"scoped": "Boolean",
"seamless": "Boolean",
"selected": "Boolean",
"span": "Int",
"spellCheck": "Boolean",
"srcDoc": "JSX",
"start": "Int",
"style": "CSS",
"suppressContentEditableWarning": "Boolean",
"tabIndex": "Int",
"unselectable": "Boolean"
};
module.exports.reserved = ["module", "data", "type", "newtype", "class", "instance", "where", "derive", "if", "then", "else", "case", "of"];