UNPKG

booking-ui

Version:

React booking widget component for ZvenBook booking system

111 lines (102 loc) 3.78 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; import { ClassValue } from 'clsx'; type ServiceOption = { id: string; name: string; }; declare function ServicePicker({ services, value, onChange, className, }: { services: ServiceOption[]; value?: string; onChange: (id: string) => void; className?: string; }): react_jsx_runtime.JSX.Element; type ProviderOption = { id: string; name: string; }; declare function ProviderPicker({ providers, value, onChange, className, }: { providers: ProviderOption[]; value?: string; onChange: (id: string) => void; className?: string; }): react_jsx_runtime.JSX.Element; type Slot = { start: string; end: string; }; declare function SlotList({ slots, onSelect, className, }: { slots: Slot[]; onSelect: (slot: Slot) => void; className?: string; }): react_jsx_runtime.JSX.Element; declare const bookingStepsVariants: (props?: ({ layout?: "horizontal" | "vertical" | "wizard" | null | undefined; spacing?: "compact" | "normal" | "cozy" | null | undefined; radius?: "none" | "sm" | "md" | "lg" | "full" | null | undefined; color?: "accent" | "primary" | "muted" | "transparent" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; type BookingStepsProps = React.PropsWithChildren<VariantProps<typeof bookingStepsVariants> & { className?: string; }>; declare function BookingSteps({ layout, spacing, radius, color, className, children, }: BookingStepsProps): react_jsx_runtime.JSX.Element; interface BookingLabels { stepService: string; stepDateTime: string; stepDetails: string; chooseService: string; selectDate: string; loadingTimes: string; noSlotsAvailable: string; dayLabels: { sunday: string; monday: string; tuesday: string; wednesday: string; thursday: string; friday: string; saturday: string; }; yourDetails: string; firstNamePlaceholder: string; lastNamePlaceholder: string; emailPlaceholder: string; phonePlaceholder: string; back: string; next: string; bookAppointment: string; booking: string; bookingConfirmed: string; changeService: string; changeDate: string; changeTime: string; } declare const defaultLabels: BookingLabels; declare const swedishLabels: BookingLabels; interface BookingWidgetStyles { primaryColor?: string; accentColor?: string; borderColor?: string; textColor?: string; backgroundColor?: string; stepperClassName?: string; calendarClassName?: string; serviceCardClassName?: string; timeSlotClassName?: string; inputClassName?: string; buttonClassName?: string; submitButtonClassName?: string; } declare function BookingStepsWidget({ baseUrl, tenantId, className, layout, spacing, radius, color, weekStartsOn, labels, styles, }: { baseUrl: string; tenantId: string; className?: string; weekStartsOn?: 'sunday' | 'monday'; labels?: BookingLabels; styles?: BookingWidgetStyles; } & VariantProps<typeof bookingStepsVariants>): react_jsx_runtime.JSX.Element; declare function cn(...inputs: ClassValue[]): string; declare function Button(props: React.ButtonHTMLAttributes<HTMLButtonElement>): react_jsx_runtime.JSX.Element; export { type BookingLabels, BookingSteps, type BookingStepsProps, BookingStepsWidget, type BookingWidgetStyles, Button, type ProviderOption, ProviderPicker, type ServiceOption, ServicePicker, type Slot, SlotList, bookingStepsVariants, cn, defaultLabels, swedishLabels };