/** * Form components — Form, Input, Button, Select, Checkbox, etc. */ import { Component, ContainerComponent, StatefulComponent } from '../../core/component.js'; import type { ContainerProps, ComponentProps, StatefulProps, RxStr } from '../../core/component.js'; import type { Action } from '../../actions/types.js'; export interface FormProps extends ContainerProps { onSubmit: Action | Action[]; } export declare function Form(props: FormProps): ContainerComponent; export interface InputProps extends StatefulProps { label?: string; placeholder?: string; inputType?: string; required?: boolean; } export declare function Input(props: InputProps): StatefulComponent; export interface TextareaProps extends StatefulProps { placeholder?: string; rows?: number; } export declare function Textarea(props: TextareaProps): StatefulComponent; export type ButtonVariant = 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link'; export type ButtonSize = 'default' | 'sm' | 'lg' | 'icon'; export interface ButtonProps extends ComponentProps { variant?: ButtonVariant; size?: ButtonSize; disabled?: boolean; /** Set to true to make this a submit button inside a Form. */ submit?: boolean; onClick?: Action | Action[]; } export declare function Button(label: RxStr, props?: ButtonProps): Component; export declare function ButtonGroup(props?: ContainerProps): ContainerComponent; export declare function Select(props: StatefulProps & { children?: Component[]; }): ContainerComponent; export declare function SelectOption(value: string, label?: string, props?: ComponentProps): Component; export interface CheckboxProps extends StatefulProps { label?: string; checked?: boolean; } export declare function Checkbox(props: CheckboxProps): StatefulComponent; export interface SwitchProps extends StatefulProps { label?: string; } export declare function Switch(props: SwitchProps): StatefulComponent; export interface SliderProps extends StatefulProps { min?: number; max?: number; step?: number; } export declare function Slider(props: SliderProps): StatefulComponent; export declare function SelectGroup(props?: ContainerProps): ContainerComponent; export declare function SelectLabel(content: string, props?: ComponentProps): Component; export declare function SelectSeparator(props?: ComponentProps): Component; export interface RadioProps extends ComponentProps { value: string; label?: string; } export declare function Radio(props: RadioProps): Component; export interface RadioGroupProps extends StatefulProps { children?: Component[]; label?: string; } export declare function RadioGroup(props: RadioGroupProps): ContainerComponent; export interface ComboboxProps extends StatefulProps { placeholder?: string; searchable?: boolean; children?: Component[]; } export declare function Combobox(props: ComboboxProps): ContainerComponent; export declare function ComboboxOption(value: string, label?: string, props?: ComponentProps): Component; export declare function ComboboxGroup(props?: ContainerProps): ContainerComponent; export declare function ComboboxLabel(content: string, props?: ComponentProps): Component; export declare function ComboboxSeparator(props?: ComponentProps): Component; export interface CalendarProps extends StatefulProps { mode?: 'single' | 'range' | 'multiple'; minDate?: string; maxDate?: string; } export declare function Calendar(props: CalendarProps): StatefulComponent; export interface DatePickerProps extends StatefulProps { placeholder?: string; format?: string; minDate?: string; maxDate?: string; } export declare function DatePicker(props: DatePickerProps): StatefulComponent; export declare function Field(props?: ContainerProps): ContainerComponent; export declare function FieldTitle(content: RxStr, props?: ComponentProps): Component; export declare function FieldDescription(content: RxStr, props?: ComponentProps): Component; export declare function FieldContent(props?: ContainerProps): ContainerComponent; export declare function FieldError(content: RxStr, props?: ComponentProps): Component; export interface ChoiceCardProps extends ContainerProps { value: string; label?: string; description?: string; selected?: boolean; onClick?: Action | Action[]; } export declare function ChoiceCard(props: ChoiceCardProps): ContainerComponent; //# sourceMappingURL=index.d.ts.map