@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/js",
|
"name": "@typebot.io/js",
|
||||||
"version": "0.2.78",
|
"version": "0.2.79",
|
||||||
"description": "Javascript library to display typebots on your website",
|
"description": "Javascript library to display typebots on your website",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -16,6 +16,7 @@ export const SendButton = (props: SendButtonProps) => {
|
|||||||
return (
|
return (
|
||||||
<Button type="submit" {...others}>
|
<Button type="submit" {...others}>
|
||||||
{(isMobile() && !local.disableIcon) ||
|
{(isMobile() && !local.disableIcon) ||
|
||||||
|
!props.children ||
|
||||||
(typeof props.children === 'string' && isEmpty(props.children)) ? (
|
(typeof props.children === 'string' && isEmpty(props.children)) ? (
|
||||||
<SendIcon
|
<SendIcon
|
||||||
class={'send-icon flex ' + (local.disableIcon ? 'hidden' : '')}
|
class={'send-icon flex ' + (local.disableIcon ? 'hidden' : '')}
|
||||||
|
@ -3,6 +3,7 @@ import { InputSubmitContent } from '@/types'
|
|||||||
import { DateInputBlock } from '@typebot.io/schemas'
|
import { DateInputBlock } from '@typebot.io/schemas'
|
||||||
import { createSignal } from 'solid-js'
|
import { createSignal } from 'solid-js'
|
||||||
import { defaultDateInputOptions } from '@typebot.io/schemas/features/blocks/inputs/date/constants'
|
import { defaultDateInputOptions } from '@typebot.io/schemas/features/blocks/inputs/date/constants'
|
||||||
|
import clsx from 'clsx'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onSubmit: (inputValue: InputSubmitContent) => void
|
onSubmit: (inputValue: InputSubmitContent) => void
|
||||||
@ -19,7 +20,10 @@ export const DateForm = (props: Props) => {
|
|||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<form
|
<form
|
||||||
class={'flex justify-between typebot-input pr-2 items-end'}
|
class={clsx(
|
||||||
|
'flex justify-between typebot-input pr-2',
|
||||||
|
props.options?.isRange ? 'items-end' : 'items-center'
|
||||||
|
)}
|
||||||
onSubmit={(e) => {
|
onSubmit={(e) => {
|
||||||
if (inputValues().from === '' && inputValues().to === '') return
|
if (inputValues().from === '' && inputValues().to === '') return
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@ -95,8 +99,7 @@ export const DateForm = (props: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SendButton class="my-2 ml-2">
|
<SendButton class="my-2 ml-2">
|
||||||
{props.options?.labels?.button ??
|
{props.options?.labels?.button}
|
||||||
defaultDateInputOptions.labels.button}
|
|
||||||
</SendButton>
|
</SendButton>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -68,8 +68,7 @@ export const EmailInput = (props: Props) => {
|
|||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
/>
|
/>
|
||||||
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
||||||
{props.block.options?.labels?.button ??
|
{props.block.options?.labels?.button}
|
||||||
defaultEmailInputOptions.labels.button}
|
|
||||||
</SendButton>
|
</SendButton>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -80,8 +80,7 @@ export const NumberInput = (props: NumberInputProps) => {
|
|||||||
step={props.block.options?.step ?? 'any'}
|
step={props.block.options?.step ?? 'any'}
|
||||||
/>
|
/>
|
||||||
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
||||||
{props.block.options?.labels?.button ??
|
{props.block.options?.labels?.button}
|
||||||
defaultNumberInputOptions.labels.button}
|
|
||||||
</SendButton>
|
</SendButton>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -158,7 +158,7 @@ export const PhoneInput = (props: PhoneInputProps) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
||||||
{props.labels?.button ?? defaultPhoneInputOptions.labels.button}
|
{props.labels?.button}
|
||||||
</SendButton>
|
</SendButton>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -89,8 +89,7 @@ export const TextInput = (props: Props) => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
||||||
{props.block.options?.labels?.button ??
|
{props.block.options?.labels?.button}
|
||||||
defaultTextInputOptions.labels.button}
|
|
||||||
</SendButton>
|
</SendButton>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -74,8 +74,7 @@ export const UrlInput = (props: Props) => {
|
|||||||
autocomplete="url"
|
autocomplete="url"
|
||||||
/>
|
/>
|
||||||
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
<SendButton type="button" class="my-2 ml-2" on:click={submit}>
|
||||||
{props.block.options?.labels?.button ??
|
{props.block.options?.labels?.button}
|
||||||
defaultUrlInputOptions.labels.button}
|
|
||||||
</SendButton>
|
</SendButton>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/nextjs",
|
"name": "@typebot.io/nextjs",
|
||||||
"version": "0.2.78",
|
"version": "0.2.79",
|
||||||
"description": "Convenient library to display typebots on your Next.js website",
|
"description": "Convenient library to display typebots on your Next.js website",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@typebot.io/react",
|
"name": "@typebot.io/react",
|
||||||
"version": "0.2.78",
|
"version": "0.2.79",
|
||||||
"description": "Convenient library to display typebots on your React app",
|
"description": "Convenient library to display typebots on your React app",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
Reference in New Issue
Block a user