diff --git a/packages/embeds/js/package.json b/packages/embeds/js/package.json index 1d6dbb5a3..cd01e63b6 100644 --- a/packages/embeds/js/package.json +++ b/packages/embeds/js/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/js", - "version": "0.2.45", + "version": "0.2.46", "description": "Javascript library to display typebots on your website", "type": "module", "main": "dist/index.js", diff --git a/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx b/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx index db751d0c4..4674b9a7a 100644 --- a/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx +++ b/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx @@ -94,10 +94,7 @@ export const DateForm = (props: Props) => { )} - + {props.options?.labels?.button ?? defaultDateInputOptions.labels.button} diff --git a/packages/embeds/js/src/features/blocks/inputs/email/components/EmailInput.tsx b/packages/embeds/js/src/features/blocks/inputs/email/components/EmailInput.tsx index 3c3ccdd68..f44c25f29 100644 --- a/packages/embeds/js/src/features/blocks/inputs/email/components/EmailInput.tsx +++ b/packages/embeds/js/src/features/blocks/inputs/email/components/EmailInput.tsx @@ -24,6 +24,7 @@ export const EmailInput = (props: Props) => { const submit = () => { if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() }) + else inputRef?.focus() } const submitWhenEnter = (e: KeyboardEvent) => { @@ -65,12 +66,7 @@ export const EmailInput = (props: Props) => { type="email" autocomplete="email" /> - + {props.block.options?.labels?.button ?? defaultEmailInputOptions.labels.button} diff --git a/packages/embeds/js/src/features/blocks/inputs/number/components/NumberInput.tsx b/packages/embeds/js/src/features/blocks/inputs/number/components/NumberInput.tsx index db99a3720..6cd313a2e 100644 --- a/packages/embeds/js/src/features/blocks/inputs/number/components/NumberInput.tsx +++ b/packages/embeds/js/src/features/blocks/inputs/number/components/NumberInput.tsx @@ -29,6 +29,7 @@ export const NumberInput = (props: NumberInputProps) => { const submit = () => { if (checkIfInputIsValid()) props.onSubmit({ value: inputValue().toString() }) + else inputRef?.focus() } const submitWhenEnter = (e: KeyboardEvent) => { @@ -79,12 +80,7 @@ export const NumberInput = (props: NumberInputProps) => { max={props.block.options?.max} step={props.block.options?.step ?? 'any'} /> - + {props.block.options?.labels?.button ?? defaultNumberInputOptions.labels.button} diff --git a/packages/embeds/js/src/features/blocks/inputs/phone/components/PhoneInput.tsx b/packages/embeds/js/src/features/blocks/inputs/phone/components/PhoneInput.tsx index 8b7731a4b..c109f63dd 100644 --- a/packages/embeds/js/src/features/blocks/inputs/phone/components/PhoneInput.tsx +++ b/packages/embeds/js/src/features/blocks/inputs/phone/components/PhoneInput.tsx @@ -69,6 +69,7 @@ export const PhoneInput = (props: PhoneInputProps) => { ? inputValue() : `${selectedCountryDialCode ?? ''}${inputValue()}`, }) + else inputRef?.focus() } const submitWhenEnter = (e: KeyboardEvent) => { @@ -155,12 +156,7 @@ export const PhoneInput = (props: PhoneInputProps) => { /> - + {props.labels?.button ?? defaultPhoneInputOptions.labels.button} diff --git a/packages/embeds/js/src/features/blocks/inputs/textInput/components/TextInput.tsx b/packages/embeds/js/src/features/blocks/inputs/textInput/components/TextInput.tsx index 3f82424d8..aab32c4a4 100644 --- a/packages/embeds/js/src/features/blocks/inputs/textInput/components/TextInput.tsx +++ b/packages/embeds/js/src/features/blocks/inputs/textInput/components/TextInput.tsx @@ -24,6 +24,7 @@ export const TextInput = (props: Props) => { const submit = () => { if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() }) + else inputRef?.focus() } const submitWhenEnter = (e: KeyboardEvent) => { @@ -82,12 +83,7 @@ export const TextInput = (props: Props) => { } /> )} - + {props.block.options?.labels?.button ?? defaultTextInputOptions.labels.button} diff --git a/packages/embeds/js/src/features/blocks/inputs/url/components/UrlInput.tsx b/packages/embeds/js/src/features/blocks/inputs/url/components/UrlInput.tsx index 64242d1f9..0aecd5a64 100644 --- a/packages/embeds/js/src/features/blocks/inputs/url/components/UrlInput.tsx +++ b/packages/embeds/js/src/features/blocks/inputs/url/components/UrlInput.tsx @@ -30,6 +30,7 @@ export const UrlInput = (props: Props) => { const submit = () => { if (checkIfInputIsValid()) props.onSubmit({ value: inputValue() }) + else inputRef?.focus() } const submitWhenEnter = (e: KeyboardEvent) => { @@ -71,12 +72,7 @@ export const UrlInput = (props: Props) => { type="url" autocomplete="url" /> - + {props.block.options?.labels?.button ?? defaultUrlInputOptions.labels.button} diff --git a/packages/embeds/nextjs/package.json b/packages/embeds/nextjs/package.json index 457b5965a..851dcf30e 100644 --- a/packages/embeds/nextjs/package.json +++ b/packages/embeds/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/nextjs", - "version": "0.2.45", + "version": "0.2.46", "description": "Convenient library to display typebots on your Next.js website", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/embeds/react/package.json b/packages/embeds/react/package.json index 6a533fdb9..3f1d78e49 100644 --- a/packages/embeds/react/package.json +++ b/packages/embeds/react/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/react", - "version": "0.2.45", + "version": "0.2.46", "description": "Convenient library to display typebots on your React app", "main": "dist/index.js", "types": "dist/index.d.ts",