feat(inputs): ✨ Add Phone number input
This commit is contained in:
1
packages/models/.gitignore
vendored
1
packages/models/.gitignore
vendored
@ -3,5 +3,4 @@ node_modules
|
||||
.env
|
||||
|
||||
dist
|
||||
types
|
||||
yarn-error.log
|
@ -2,7 +2,7 @@
|
||||
"name": "models",
|
||||
"version": "1.0.0",
|
||||
"main": "dist/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"types": "dist/types/index.d.ts",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
@ -14,6 +14,6 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch"
|
||||
"dev": "tsc --watch --preserveWatchOutput"
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ export type InputStep =
|
||||
| EmailInputStep
|
||||
| UrlInputStep
|
||||
| DateInputStep
|
||||
| PhoneNumberInputStep
|
||||
|
||||
export enum InputStepType {
|
||||
TEXT = 'text input',
|
||||
@ -13,6 +14,7 @@ export enum InputStepType {
|
||||
EMAIL = 'email input',
|
||||
URL = 'url input',
|
||||
DATE = 'date input',
|
||||
PHONE = 'phone number input',
|
||||
}
|
||||
|
||||
export type TextInputStep = StepBase & {
|
||||
@ -40,6 +42,11 @@ export type DateInputStep = StepBase & {
|
||||
options?: DateInputOptions
|
||||
}
|
||||
|
||||
export type PhoneNumberInputStep = StepBase & {
|
||||
type: InputStepType.PHONE
|
||||
options?: InputOptionsBase
|
||||
}
|
||||
|
||||
export type DateInputOptions = {
|
||||
labels?: { button?: string; from?: string; to?: string }
|
||||
hasTime?: boolean
|
||||
|
@ -7,7 +7,7 @@
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./types",
|
||||
"declarationDir": "./dist/types",
|
||||
"outDir": "./dist"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user