import { FieldBaseProps } from "../FieldBase/FieldBase.cjs"; import { WidthProp } from "@marigold/system"; import { ReactElement, Ref } from "react"; import RAC from "react-aria-components"; type RemovedProps = 'className' | 'style' | 'children' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'value' | 'defaultValue'; export interface SearchFieldProps extends Omit, Pick, 'label' | 'addon' | 'description' | 'errorMessage'> { /** * Action element to display in the search field. */ action?: ReactElement; /** * Visual variant of the component. Which values exist is defined by the theme * and listed in the "Appearance" section of the component's documentation. */ variant?: string; /** * Size of the component. Which values exist is defined by the theme and listed * in the "Appearance" section of the component's documentation. */ size?: string; /** * Sets the width of the field. You can see allowed tokens here: https://tailwindcss.com/docs/width * * Numeric/scale values are spacing-scale tokens, not pixels: `width={64}` * resolves to `calc(var(--spacing) * 64)` ~= 16rem (256px), not 64px. * @default full */ width?: WidthProp['width']; /** * If `true`, the input is considered invalid and if set the `errorMessage` is shown instead of the `description`. * @default false */ error?: RAC.SearchFieldProps['isInvalid']; /** * If `true`, the input is disabled. * @default false */ disabled?: RAC.SearchFieldProps['isDisabled']; /** * If `true`, the input is required. * @default false */ required?: RAC.SearchFieldProps['isRequired']; /** * If `true`, the input is readOnly. * @default false */ readOnly?: RAC.SearchFieldProps['isReadOnly']; /** * The current value of the input field. * @default none */ value?: string; /** * The default value of the input field. * @default none */ defaultValue?: string; /** * Placeholder text for the input field. * @default none */ placeholder?: string; /** Ref to the DOM element the component renders. */ ref?: Ref; } declare const SearchField: ({ disabled, required, readOnly, error, ref, ...rest }: SearchFieldProps) => import("react").JSX.Element; export { SearchField };