import * as React$1 from 'react'; import React__default, { InputHTMLAttributes, ReactNode, ComponentType, CSSProperties } from 'react'; import { UseFormProps, SubmitHandler, UseFormReturn } from 'react-hook-form'; import { ZodTypeAny, TypeOf } from 'zod'; import * as culori from 'culori'; import { N as NIconSource } from './NIcon-D73-C51g.js'; import { a as FormDevTools } from './formFill-CQkTA0JS.js'; import * as class_variance_authority_types from 'class-variance-authority/types'; import * as SliderPrimitive from '@radix-ui/react-slider'; type ColorFormat = "hex" | "rgb" | "hsl" | "oklch"; declare function parseColor(input: string): culori.Color; declare function formatColor(input: string, format: ColorFormat): string; declare function detectFormat(input: string): ColorFormat; declare function toPickerHex(input: string): string; type SliderVariant = "default" | "secondary" | "destructive" | "accent" | "success" | "warning" | "info"; type SliderSize = "sm" | "md" | "lg"; type SliderOrientation = "horizontal" | "vertical"; declare const sliderVariants: (props?: { size?: "sm" | "md" | "lg"; orientation?: "horizontal" | "vertical"; } & class_variance_authority_types.ClassProp) => string; interface NSliderProps extends Omit, "value" | "defaultValue" | "onValueChange" | "orientation" | "dir" | "asChild"> { value?: number | [number, number]; defaultValue?: number | [number, number]; onValueChange?: (value: number | [number, number]) => void; min?: number; max?: number; step?: number; variant?: SliderVariant; size?: SliderSize; orientation?: SliderOrientation; disabled?: boolean; showTooltip?: boolean; formatTooltip?: (n: number) => string; dir?: "ltr" | "rtl"; name?: string; id?: string; "aria-label"?: string; "aria-labelledby"?: string; } declare function NSlider({ value: controlledValue, defaultValue, onValueChange, min, max, step, variant, size, orientation, disabled, showTooltip, formatTooltip, dir, name, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest }: NSliderProps): React$1.JSX.Element; declare namespace NSlider { var displayName: string; } interface SliderProps extends Omit { value: number[]; onValueChange: (value: number[]) => void; } declare function Slider({ value, onValueChange, ...rest }: SliderProps): React$1.JSX.Element; interface SliderInputProps extends Omit { value?: number; onChange?: (value: number) => void; status?: "default" | "error"; icon?: unknown; iconColor?: string; readOnly?: boolean; } declare function SliderInput({ value, onChange, status: _status, icon: _icon, iconColor: _iconColor, readOnly: _readOnly, ...rest }: SliderInputProps): React$1.JSX.Element; type InputIcon = string | ReactNode | ComponentType<{ className?: string; style?: CSSProperties; }>; declare const TAILWIND_COLORS: readonly ["black", "white", "gray", "slate", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "green", "teal", "blue", "indigo", "purple"]; type TailwindColor = "muted" | "primary" | "accent" | "success" | "warning" | "destructive" | typeof TAILWIND_COLORS[number]; interface BaseProps { className?: string; variant?: "default" | "rounded" | "ghost"; status?: "default" | "error"; bordered?: boolean; borderColor?: TailwindColor; iconColor?: string; } interface SelectItemType { value: string; label: string; icon?: string | ComponentType<{ className?: string; }>; } interface TextInputProps extends BaseProps, Omit, "className" | "onChange" | "placeholder" | "type" | "value"> { value: string; onChange: (value: string) => void; placeholder?: string; icon?: InputIcon; showIcon?: boolean; } interface NumberInputProps extends BaseProps, Omit, "className" | "onChange" | "placeholder" | "type" | "value"> { value: string | number; onChange: (value: number) => void; placeholder?: string; icon?: InputIcon; showIcon?: boolean; } interface PasswordInputProps extends BaseProps, Omit, "className" | "onChange" | "placeholder" | "type" | "value"> { value: string; onChange: (value: string) => void; placeholder?: string; icon?: InputIcon; showIcon?: boolean; } interface TextAreaInputProps extends BaseProps, Omit, "className" | "onChange" | "placeholder" | "value"> { value: string; onChange: (value: string) => void; placeholder?: string; rows?: number; } interface SelectInputProps extends BaseProps { value: string; onChange: (value: string) => void; items: (string | SelectItemType)[]; placeholder?: string; ariaLabel?: string; icon?: InputIcon; showIcon?: boolean; disabled?: boolean; /** Class applied to the portalled dropdown surface. */ dropdownClassName?: string; } interface ComboboxInputProps extends BaseProps { value: string; onChange: (value: string) => void; items: (string | SelectItemType)[]; placeholder?: string; searchPlaceholder?: string; emptyMessage?: string; loading?: boolean; loadingMessage?: string; onSearchChange?: (query: string) => void; shouldFilter?: boolean; icon?: InputIcon; showIcon?: boolean; disabled?: boolean; allowFreeText?: boolean; ariaLabel?: string; } interface MultiSelectInputProps extends BaseProps { value: string[]; onChange: (value: string[]) => void; items: (string | SelectItemType)[]; ariaLabel?: string; placeholder?: string; searchPlaceholder?: string; emptyMessage?: string; icon?: InputIcon; showIcon?: boolean; disabled?: boolean; maxDisplay?: number; showSearch?: boolean; } interface RadioGroupInputProps extends BaseProps { value: string; onChange: (value: string) => void; items: (string | SelectItemType)[]; layout?: "row" | "column"; } interface SwitchInputProps extends BaseProps { value: boolean; onChange: (checked: boolean) => void; label?: string; helper?: string; icon?: InputIcon; showIcon?: boolean; iconPosition?: "label" | "input"; } interface CheckboxInputProps extends BaseProps { value: boolean; onChange: (checked: boolean) => void; label?: string; helper?: string; checkboxClassName?: string; } interface CheckboxGroupInputProps extends BaseProps { value: string[]; onChange: (newValue: string[]) => void; items: (string | SelectItemType)[]; layout?: "row" | "column"; } interface FileInputProps extends BaseProps { value: File | string | null; onChange: (file: File | null) => void; placeholder?: string; icon?: InputIcon; showIcon?: boolean; } interface DateInputProps extends BaseProps { value: Date | undefined; onChange: (date: string | undefined) => void; placeholder?: string; icon?: InputIcon; showIcon?: boolean; ariaLabel?: string; } interface StarRatingInputProps extends BaseProps { value: number; onChange: (starNumber: number | undefined) => void; maxStars?: number; } interface ColorArrayInputProps extends BaseProps { value: string; onChange: (color: string) => void; colors?: string[]; } interface ColorPickerInputProps extends ColorArrayInputProps { disabled?: boolean; /** `"swatches"` keeps the legacy inline UI. `"popover"` opens a tweakcn-style picker. */ mode?: "popover" | "swatches"; /** Which format tabs the popover exposes. */ formats?: ColorFormat[]; /** How emitted values are formatted. `"preserve"` keeps the input's own format. */ output?: ColorFormat | "preserve"; hideSwatches?: boolean; } interface TimeInputProps extends BaseProps, Omit, "className" | "onChange" | "placeholder" | "type" | "value"> { value?: string; onChange: (value: string) => void; placeholder?: string; icon?: InputIcon; showIcon?: boolean; format24?: boolean; showSeconds?: boolean; } interface TimeZoneInputProps extends Omit { items?: SelectItemType[]; } type ImageInputPreviewSource = "value" | "fallback" | "default"; interface ImageInputPreviewError { source: ImageInputPreviewSource; src: string; } interface ImageInputProps extends BaseProps { value: File | string | null; onChange: (file: File | null) => void; placeholder?: string; icon?: InputIcon; showIcon?: boolean; uploadIcon?: React.ReactNode; /** Class applied to the component's outer layout container. */ containerClassName?: string; previewClassName?: string; /** Inline styles applied to the preview container. */ previewStyle?: CSSProperties; /** Class applied to the empty and replace-overlay content inside the preview. */ contentClassName?: string; /** Class applied to the preview element to control object-fit / sizing. */ imageClassName?: string; showPreview?: boolean; previewPosition?: "top" | "bottom" | "left" | "right"; allowClear?: boolean; accept?: string; defaultImage?: string; imageSize?: "sm" | "md" | "lg" | "xl"; imageVersion?: string | number | null; title?: string; subtitle?: string; titleClassName?: string; subtitleClassName?: string; replaceTitle?: string; replaceSubtitle?: string; trigger?: "icon" | "button" | "both"; buttonLabel?: string; disabled?: boolean; /** Accessible name for the primary preview image. Falls back to `replaceTitle`. */ previewAlt?: string; /** Accessible name for the fallback/default preview image. Falls back to `previewAlt`. */ fallbackAlt?: string; /** * URL tried when the primary `value` fails to load. * The same URL is never attempted twice, so a failing primary cannot loop. */ fallbackImage?: string | null; /** * Rendered inside the preview area when every candidate URL has failed. * When omitted, a small neutral unavailable state is rendered instead. */ unavailableContent?: React.ReactNode; /** Fires once for every URL that failed to load, with its source. */ onPreviewError?: (error: ImageInputPreviewError) => void; /** Accessible name for the replace (re-upload) control. */ replaceAriaLabel?: string; /** Accessible name for the clear control. */ clearAriaLabel?: string; } interface OtpInputProps extends BaseProps { value: string; onChange: (value: string) => void; /** Number of one-character cells. */ length?: number; /** Restrict the code to decimal digits. */ numeric?: boolean; ariaLabel?: string; digitAriaLabel?: (position: number, length: number) => string; autoFocus?: boolean; autoComplete?: React.HTMLInputAutoCompleteAttribute; disabled?: boolean; readOnly?: boolean; inputClassName?: string; onComplete?: (value: string) => void; } type AvatarInputRadius = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full"; /** ImageInput options with avatar-specific radius defaults. */ interface AvatarInputProps extends ImageInputProps { /** Preview corner radius. `none` is square and `full` is circular. */ radius?: AvatarInputRadius; /** Exact width and height. Numbers are interpreted as pixels. */ size?: number | string; /** Fill the available width and remaining height of the form item. */ fill?: boolean; } interface EmojiInputProps extends BaseProps { value: number; onChange: (value: number) => void; options?: { value: number; label: string; }[]; } interface PhoneInputProps extends BaseProps { value: string; onChange: (value: string) => void; defaultCountry?: string; placeholder?: string; disabled?: boolean; ariaLabel?: string; } interface LangInputProps extends BaseProps { value: string; onChange: (value: string) => void; items: { value: string; label: string; icon?: string | ComponentType<{ className?: string; }>; }[]; placeholder?: string; disabled?: boolean; } type FormVariant = "default" | "studio" | "compact"; interface FormSlotClassNames { item?: string; label?: string; input?: string; description?: string; error?: string; } declare const VariantProvider: React__default.FC<{ variant?: FormVariant; bordered?: boolean; children: React__default.ReactNode; }>; declare const useVariant: () => FormVariant; declare const useVariantPreset: () => FormSlotClassNames; type FormInputBackground = "card" | "background" | "secondary" | "muted" | "transparent"; interface BaseFormInputProps { name: string; formLabel?: string; formDescription?: string; required?: boolean; icon?: NIconSource; iconColor?: string; items?: any; disabled?: boolean; readOnly?: boolean; hidden?: boolean; className?: string; /** Semantic surface color for the input control. */ background?: FormInputBackground; classNames?: FormSlotClassNames; onChange?: (value: any) => void; } type FormInputSpecificProps = Omit; type FormImageInputProps = FormInputSpecificProps & { /** * Optional controlled preview value. * React Hook Form owns the value when omitted. */ value?: ImageInputProps["value"]; }; type FormAvatarInputProps = FormInputSpecificProps & { /** Optional controlled preview value. React Hook Form owns it when omitted. */ value?: AvatarInputProps["value"]; }; type InputTypeMap = { text: FormInputSpecificProps; number: FormInputSpecificProps; password: FormInputSpecificProps; otp: FormInputSpecificProps; textarea: FormInputSpecificProps; select: FormInputSpecificProps; combobox: FormInputSpecificProps; multiselect: FormInputSpecificProps; radio: FormInputSpecificProps; switch: FormInputSpecificProps; checkbox: FormInputSpecificProps; checkboxGroup: FormInputSpecificProps; file: FormInputSpecificProps; image: FormImageInputProps; avatar: FormAvatarInputProps; date: FormInputSpecificProps; starRating: FormInputSpecificProps; colorArray: FormInputSpecificProps; emoji: FormInputSpecificProps; lang: FormInputSpecificProps; phone: FormInputSpecificProps; time: FormInputSpecificProps; timeZone: FormInputSpecificProps; slider: FormInputSpecificProps; }; type FormInputProps = { [K in keyof InputTypeMap]: BaseFormInputProps & { type: K; } & InputTypeMap[K]; }[keyof InputTypeMap]; type FormProps = { schema?: T; defaultValues?: UseFormProps>["defaultValues"]; onSubmit: SubmitHandler>; form?: UseFormReturn>; variant?: FormVariant; bordered?: boolean; as?: "form" | "div"; className?: string; id?: string; devTools?: FormDevTools; children: React.ReactNode; }; interface NCoordinates { latitude: number; longitude: number; } interface NLocationValue { address: string; latitude: number | null; longitude: number | null; } /** * Optional provider-owned identity for a committed location selection. * * Kept separate from `NLocationValue` so provider-neutral applications never * persist Google-specific state. Applications that already store a Place ID * can bind it through `providerMeta`/`onProviderMetaChange` without copying the * map or search dialog. */ interface NLocationProviderSelectionMeta { provider: "google"; placeId: string | null; address: string; latitude: number | null; longitude: number | null; } interface NLocationCandidate { id: string; label: string; description?: string; coordinates?: NCoordinates; providerId?: string; } interface NLocationSearchContext { signal: AbortSignal; center: NCoordinates; language?: string; } interface NLocationGeocoderAdapter { id: string; search(query: string, context: NLocationSearchContext): Promise; resolve?(candidate: NLocationCandidate, signal: AbortSignal): Promise; reverse?(coordinates: NCoordinates, signal: AbortSignal): Promise; resetSession?(): void; } interface NLocationMapControls { zoomIn(): void; zoomOut(): void; recenter(coordinates: NCoordinates): void; } interface NLocationMapProps { value: NCoordinates | null; initialCenter: NCoordinates; initialZoom: number; onChange: (coordinates: NCoordinates) => void; onReady?: () => void; onLoadingChange?: (loading: boolean) => void; onError?: (error: Error) => void; onControlsReady?: (controls: NLocationMapControls | null) => void; reducedMotion?: boolean; className?: string; } interface NLocationMapAdapter { id: string; Map: ComponentType; } interface NLocationLabels { dialogTitle: string; dialogDescription: string; openMap: string; close: string; cancel: string; confirm: string; clearPin: string; searchPlaceholder: string; search: string; searching: string; searchEmpty: string; searchError: string; findingAddress: string; selected: string; notSelected: string; changedAfterPin: string; loading: string; unavailable: string; retry: string; currentLocation: string; zoomIn: string; zoomOut: string; mapInstructions: string; readyAnnouncement: string; selectedAnnouncement: string; addressUpdatedAnnouncement: string; clearedAnnouncement: string; geolocationUnsupported: string; geolocationDenied: string; geolocationTimeout: string; geolocationUnavailable: string; providerError: string; resultsAnnouncement: (count: number) => string; } interface NLocationClassNames { root?: string; input?: string; status?: string; dialog?: string; search?: string; map?: string; footer?: string; } interface NLocationProviderProps { children: ReactNode; adapter?: NLocationMapAdapter | null; geocoder?: NLocationGeocoderAdapter | null; defaultCenter?: NCoordinates; defaultZoom?: number; labels?: Partial; searchMode?: "submit" | "autocomplete"; unavailableReason?: string; } interface NLocationDialogProps { open: boolean; value: NLocationValue; providerMeta?: NLocationProviderSelectionMeta | null; onOpenChange: (open: boolean) => void; onConfirm: (value: NLocationValue, providerMeta?: NLocationProviderSelectionMeta | null) => void; labels?: Partial; classNames?: NLocationClassNames; } interface NLocationInputProps extends Omit, "value" | "onChange" | "className"> { value: NLocationValue; onChange: (value: NLocationValue) => void; /** Provider identity stored separately from the common location value. */ providerMeta?: NLocationProviderSelectionMeta | null; /** * Called atomically with a location update. Manual address edits and pin * clears pass `null`, preventing a stale Place ID from surviving a change. */ onProviderMetaChange?: (providerMeta: NLocationProviderSelectionMeta | null) => void; labels?: Partial; classNames?: NLocationClassNames; status?: "default" | "error"; bordered?: boolean; className?: string; } interface FormLocationInputProps extends Omit { name: string; formLabel?: ReactNode; formDescription?: ReactNode; required?: boolean; hidden?: boolean; background?: FormInputBackground; classNames?: NLocationClassNames & FormSlotClassNames; onChange?: (value: NLocationValue) => void; } interface LeafletLocationAdapterOptions { tileUrl: string; attribution: string; tileOptions?: { maxZoom?: number; minZoom?: number; }; } interface GoogleLocationAdapterOptions { apiKey: string; mapId?: string; language?: string; region?: string; } export { type NSliderProps as $, type AvatarInputProps as A, type TimeZoneInputProps as B, type ComboboxInputProps as C, type DateInputProps as D, type EmojiInputProps as E, type FormLocationInputProps as F, type GoogleLocationAdapterOptions as G, type FormProps as H, type ImageInputProps as I, type FormInputProps as J, type FormVariant as K, type LeafletLocationAdapterOptions as L, type MultiSelectInputProps as M, type NLocationMapAdapter as N, type OtpInputProps as O, type PasswordInputProps as P, type AvatarInputRadius as Q, type RadioGroupInputProps as R, type SelectInputProps as S, type TailwindColor as T, type ColorFormat as U, type FormInputBackground as V, type FormSlotClassNames as W, type ImageInputPreviewError as X, type ImageInputPreviewSource as Y, type InputIcon as Z, NSlider as _, type NLocationGeocoderAdapter as a, type SelectItemType as a0, Slider as a1, SliderInput as a2, type SliderInputProps as a3, type SliderOrientation as a4, type SliderProps as a5, type SliderSize as a6, type SliderVariant as a7, VariantProvider as a8, detectFormat as a9, formatColor as aa, parseColor as ab, sliderVariants as ac, toPickerHex as ad, useVariant as ae, useVariantPreset as af, type NLocationLabels as b, type NCoordinates as c, type NLocationCandidate as d, type NLocationClassNames as e, type NLocationDialogProps as f, type NLocationInputProps as g, type NLocationMapControls as h, type NLocationMapProps as i, type NLocationProviderProps as j, type NLocationProviderSelectionMeta as k, type NLocationSearchContext as l, type NLocationValue as m, type TextInputProps as n, type NumberInputProps as o, type TextAreaInputProps as p, type CheckboxInputProps as q, type CheckboxGroupInputProps as r, type SwitchInputProps as s, type FileInputProps as t, type StarRatingInputProps as u, type ColorArrayInputProps as v, type ColorPickerInputProps as w, type LangInputProps as x, type PhoneInputProps as y, type TimeInputProps as z };