@vela-ui/react
Version:
Vela UI React components
101 lines (98 loc) • 3.56 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import { ValidationResult, TextFieldProps, Text, FieldError as FieldError$1, Group, Label as Label$1 } from 'react-aria-components';
export { TextProps } from 'react-aria-components';
interface FieldProps {
placeholder?: string;
label?: string;
description?: string;
errorMessage?: string | ((validation: ValidationResult) => string);
"aria-label"?: TextFieldProps["aria-label"];
"aria-labelledby"?: TextFieldProps["aria-labelledby"];
}
declare const fieldVariants: tailwind_variants.TVReturnType<{
[key: string]: {
[key: string]: tailwind_variants.ClassValue | {
description?: tailwind_variants.ClassValue;
label?: tailwind_variants.ClassValue;
fieldError?: tailwind_variants.ClassValue;
};
};
} | {
[x: string]: {
[x: string]: tailwind_variants.ClassValue | {
description?: tailwind_variants.ClassValue;
label?: tailwind_variants.ClassValue;
fieldError?: tailwind_variants.ClassValue;
};
};
} | {}, {
label: string;
description: string;
fieldError: string;
}, undefined, {
[key: string]: {
[key: string]: tailwind_variants.ClassValue | {
description?: tailwind_variants.ClassValue;
label?: tailwind_variants.ClassValue;
fieldError?: tailwind_variants.ClassValue;
};
};
} | {}, {
label: string;
description: string;
fieldError: string;
}, tailwind_variants.TVReturnType<unknown, {
label: string;
description: string;
fieldError: string;
}, undefined, unknown, unknown, undefined>>;
type LabelProps = React.ComponentProps<typeof Label$1>;
declare function Label({ className, ...props }: LabelProps): react_jsx_runtime.JSX.Element;
type DescriptionProps = Omit<React.ComponentProps<typeof Text>, "slot">;
declare function Description({ className, ...props }: DescriptionProps): react_jsx_runtime.JSX.Element;
type FieldErrorProps = React.ComponentProps<typeof FieldError$1>;
declare function FieldError({ className, ...props }: FieldErrorProps): react_jsx_runtime.JSX.Element;
declare const fieldGroupVariants: tailwind_variants.TVReturnType<{
isFocusWithin: {
true: string;
};
isInvalid: {
true: string;
};
isDisabled: {
true: string;
};
}, undefined, "group border-input relative flex h-10 items-center overflow-hidden rounded-lg border shadow-xs", {
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, tailwind_variants.TVReturnType<{
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, "outline-hidden", {
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, tailwind_variants.TVReturnType<{
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, "outline-hidden", unknown, unknown, undefined>>>;
type FieldGroupProps = React.ComponentProps<typeof Group> & VariantProps<typeof fieldGroupVariants>;
declare function FieldGroup({ className, ...props }: FieldGroupProps): react_jsx_runtime.JSX.Element;
export { Description, type DescriptionProps, FieldError, type FieldErrorProps, FieldGroup, type FieldGroupProps, type FieldProps, Label, type LabelProps, fieldVariants };