Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement new Input control component #143

Merged
merged 11 commits into from
Mar 13, 2025
Prev Previous commit
Next Next commit
chore: Convert InputType to JavaScript object
  • Loading branch information
spuxx-dev committed Mar 13, 2025
commit fcd36feaac438aa67de256062dc3ae917fbe7950
52 changes: 29 additions & 23 deletions packages/browser-utils/src/types/html/index.ts
Original file line number Diff line number Diff line change
@@ -2,26 +2,32 @@
* Valid input types according to the HTML specification.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types}
*/
export type InputType =
| 'button'
| 'checkbox'
| 'color'
| 'date'
| 'datetime-local'
| 'email'
| 'file'
| 'hidden'
| 'image'
| 'month'
| 'number'
| 'password'
| 'radio'
| 'range'
| 'reset'
| 'search'
| 'submit'
| 'tel'
| 'text'
| 'time'
| 'url'
| 'week';
export const InputType = {
button: 'button',
checkbox: 'checkbox',
color: 'color',
date: 'date',
datetimeLocal: 'datetime-local',
email: 'email',
file: 'file',
hidden: 'hidden',
image: 'image',
month: 'month',
number: 'number',
password: 'password',
radio: 'radio',
range: 'range',
reset: 'reset',
search: 'search',
submit: 'submit',
tel: 'tel',
text: 'text',
time: 'time',
url: 'url',
week: 'week',
} as const;
/**
* Valid input types according to the HTML specification.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types}
*/
export type InputType = (typeof InputType)[keyof typeof InputType];