import * as solid_js from 'solid-js'; import { JSX } from 'solid-js'; import { M as MaybeAccessor } from '../../types-Bc0WfPsv.js'; import { HTMLProps, PolymorphicProps } from '../factory.js'; export { f as fieldAnatomy } from '../../field.anatomy-BA_rbPae.js'; import '@zag-js/anatomy'; interface ElementIds { root?: string; control?: string; label?: string; errorText?: string; helperText?: string; } interface UseFieldProps { /** * The id of the field. */ id?: string; /** * The ids of the field parts. */ ids?: ElementIds; /** * Indicates whether the field is required. */ required?: boolean; /** * Indicates whether the field is disabled. */ disabled?: boolean; /** * Indicates whether the field is invalid. */ invalid?: boolean; /** * Indicates whether the field is read-only. */ readOnly?: boolean; } type UseFieldReturn = ReturnType; declare const useField: (props?: MaybeAccessor) => solid_js.Accessor<{ ariaDescribedby: string; ids: { control: string; label: string; errorText: string; helperText: string; }; refs: { rootRef: solid_js.Setter; }; disabled: boolean; invalid: boolean; readOnly: boolean; required: boolean; getLabelProps: () => { id: string; 'data-disabled': boolean | "false" | "true"; 'data-invalid': boolean | "false" | "true"; 'data-readonly': boolean | "false" | "true"; 'data-required': boolean | "false" | "true"; htmlFor: string; "data-scope": string; "data-part": string; }; getRootProps: () => { id: string; role: string; 'data-disabled': boolean | "false" | "true"; 'data-invalid': boolean | "false" | "true"; 'data-readonly': boolean | "false" | "true"; "data-scope": string; "data-part": string; }; getInputProps: () => { "data-scope": string; "data-part": string; 'aria-describedby': string | undefined; 'aria-invalid': "true" | undefined; 'data-invalid': boolean | "false" | "true"; 'data-required': boolean | "false" | "true"; 'data-readonly': boolean | "false" | "true"; id: string; required: boolean; disabled: boolean; readOnly: true | undefined; }; getTextareaProps: () => { "data-scope": string; "data-part": string; 'aria-describedby': string | undefined; 'aria-invalid': "true" | undefined; 'data-invalid': boolean | "false" | "true"; 'data-required': boolean | "false" | "true"; 'data-readonly': boolean | "false" | "true"; id: string; required: boolean; disabled: boolean; readOnly: true | undefined; }; getSelectProps: () => { "data-scope": string; "data-part": string; 'aria-describedby': string | undefined; 'aria-invalid': "true" | undefined; 'data-invalid': boolean | "false" | "true"; 'data-required': boolean | "false" | "true"; 'data-readonly': boolean | "false" | "true"; id: string; required: boolean; disabled: boolean; readOnly: true | undefined; }; getHelperTextProps: () => { 'data-disabled': boolean | "false" | "true"; "data-scope": string; "data-part": string; id: string; }; getErrorTextProps: () => { 'aria-live': string; "data-scope": string; "data-part": string; id: string; }; getRequiredIndicatorProps: () => { "data-scope": string; "data-part": string; 'aria-hidden': boolean; }; }>; interface UseFieldContext extends UseFieldReturn { } declare const useFieldContext: () => UseFieldContext; interface FieldContextProps { children: (context: UseFieldContext) => JSX.Element; } declare const FieldContext: (props: FieldContextProps) => JSX.Element; interface FieldErrorTextBaseProps extends PolymorphicProps<'span'> { } interface FieldErrorTextProps extends HTMLProps<'span'>, FieldErrorTextBaseProps { } declare const FieldErrorText: (props: FieldErrorTextProps) => solid_js.JSX.Element; interface FieldHelperTextBaseProps extends PolymorphicProps<'span'> { } interface FieldHelperTextProps extends HTMLProps<'span'>, FieldHelperTextBaseProps { } declare const FieldHelperText: (props: FieldHelperTextProps) => solid_js.JSX.Element; interface FieldInputBaseProps extends PolymorphicProps<'input'> { } interface FieldInputProps extends HTMLProps<'input'>, FieldInputBaseProps { } declare const FieldInput: (props: FieldInputProps) => solid_js.JSX.Element; interface FieldLabelBaseProps extends PolymorphicProps<'label'> { } interface FieldLabelProps extends HTMLProps<'label'>, FieldLabelBaseProps { } declare const FieldLabel: (props: FieldLabelProps) => solid_js.JSX.Element; interface FieldRequiredIndicatorBaseProps extends PolymorphicProps<'span'> { fallback?: JSX.Element; } interface FieldRequiredIndicatorProps extends HTMLProps<'span'>, FieldRequiredIndicatorBaseProps { } declare const FieldRequiredIndicator: (props: FieldRequiredIndicatorProps) => JSX.Element; interface FieldRootBaseProps extends UseFieldProps, PolymorphicProps<'div'> { } interface FieldRootProps extends HTMLProps<'div'>, FieldRootBaseProps { } declare const FieldRoot: (props: FieldRootProps) => solid_js.JSX.Element; interface RootProviderProps { value: UseFieldReturn; } interface FieldRootProviderBaseProps extends PolymorphicProps<'div'> { } interface FieldRootProviderProps extends HTMLProps<'div'>, RootProviderProps, FieldRootProviderBaseProps { } declare const FieldRootProvider: (props: FieldRootProviderProps) => solid_js.JSX.Element; interface FieldSelectBaseProps extends PolymorphicProps<'select'> { } interface FieldSelectProps extends HTMLProps<'select'>, FieldSelectBaseProps { } declare const FieldSelect: (props: FieldSelectProps) => solid_js.JSX.Element; interface FieldTextareaBaseProps extends PolymorphicProps<'textarea'> { /** * Whether the textarea should autoresize * @default false */ autoresize?: boolean; } interface FieldTextareaProps extends HTMLProps<'textarea'>, FieldTextareaBaseProps { } declare const FieldTextarea: (props: FieldTextareaProps) => solid_js.JSX.Element; declare namespace field { export { FieldContext as Context, type FieldContextProps as ContextProps, FieldErrorText as ErrorText, type FieldErrorTextBaseProps as ErrorTextBaseProps, type FieldErrorTextProps as ErrorTextProps, FieldHelperText as HelperText, type FieldHelperTextBaseProps as HelperTextBaseProps, type FieldHelperTextProps as HelperTextProps, FieldInput as Input, type FieldInputBaseProps as InputBaseProps, type FieldInputProps as InputProps, FieldLabel as Label, type FieldLabelBaseProps as LabelBaseProps, type FieldLabelProps as LabelProps, FieldRequiredIndicator as RequiredIndicator, type FieldRequiredIndicatorBaseProps as RequiredIndicatorBaseProps, type FieldRequiredIndicatorProps as RequiredIndicatorProps, FieldRoot as Root, type FieldRootBaseProps as RootBaseProps, type FieldRootProps as RootProps, FieldRootProvider as RootProvider, type FieldRootProviderBaseProps as RootProviderBaseProps, type FieldRootProviderProps as RootProviderProps, FieldSelect as Select, type FieldSelectBaseProps as SelectBaseProps, type FieldSelectProps as SelectProps, FieldTextarea as Textarea, type FieldTextareaBaseProps as TextareaBaseProps, type FieldTextareaProps as TextareaProps }; } export { field as Field, FieldContext, type FieldContextProps, FieldErrorText, type FieldErrorTextBaseProps, type FieldErrorTextProps, FieldHelperText, type FieldHelperTextBaseProps, type FieldHelperTextProps, FieldInput, type FieldInputBaseProps, type FieldInputProps, FieldLabel, type FieldLabelBaseProps, type FieldLabelProps, FieldRequiredIndicator, type FieldRequiredIndicatorBaseProps, type FieldRequiredIndicatorProps, FieldRoot, type FieldRootBaseProps, type FieldRootProps, FieldRootProvider, type FieldRootProviderBaseProps, type FieldRootProviderProps, FieldSelect, type FieldSelectBaseProps, type FieldSelectProps, FieldTextarea, type FieldTextareaBaseProps, type FieldTextareaProps, type UseFieldContext, type UseFieldProps, type UseFieldReturn, useField, useFieldContext };