File tree 1 file changed +29
-23
lines changed
packages/browser-utils/src/types/html
1 file changed +29
-23
lines changed Original file line number Diff line number Diff line change 2
2
* Valid input types according to the HTML specification.
3
3
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types }
4
4
*/
5
- export type InputType =
6
- | 'button'
7
- | 'checkbox'
8
- | 'color'
9
- | 'date'
10
- | 'datetime-local'
11
- | 'email'
12
- | 'file'
13
- | 'hidden'
14
- | 'image'
15
- | 'month'
16
- | 'number'
17
- | 'password'
18
- | 'radio'
19
- | 'range'
20
- | 'reset'
21
- | 'search'
22
- | 'submit'
23
- | 'tel'
24
- | 'text'
25
- | 'time'
26
- | 'url'
27
- | 'week' ;
5
+ export const InputType = {
6
+ button : 'button' ,
7
+ checkbox : 'checkbox' ,
8
+ color : 'color' ,
9
+ date : 'date' ,
10
+ datetimeLocal : 'datetime-local' ,
11
+ email : 'email' ,
12
+ file : 'file' ,
13
+ hidden : 'hidden' ,
14
+ image : 'image' ,
15
+ month : 'month' ,
16
+ number : 'number' ,
17
+ password : 'password' ,
18
+ radio : 'radio' ,
19
+ range : 'range' ,
20
+ reset : 'reset' ,
21
+ search : 'search' ,
22
+ submit : 'submit' ,
23
+ tel : 'tel' ,
24
+ text : 'text' ,
25
+ time : 'time' ,
26
+ url : 'url' ,
27
+ week : 'week' ,
28
+ } as const ;
29
+ /**
30
+ * Valid input types according to the HTML specification.
31
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types }
32
+ */
33
+ export type InputType = ( typeof InputType ) [ keyof typeof InputType ] ;
You can’t perform that action at this time.
0 commit comments