UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

109 lines (108 loc) 3.99 kB
import { ThemeProps } from "../../core/system/index.types.js"; import { Component, GenericsComponent, HTMLStyledProps } from "../../core/components/index.types.js"; import "../../core/index.js"; import { AutocompleteStyle } from "./autocomplete.style.js"; import { PopoverContentProps, PopupAnimationProps } from "../popover/popover.js"; import { UseComboboxGroupProps } from "../../hooks/use-combobox/index.js"; import { UseInputBorderProps } from "../input/use-input-border.js"; import { InputElementProps } from "../input/input-element.js"; import { InputGroupRootProps } from "../input/input-group.js"; import { UseAutocompleteOptionProps, UseAutocompleteProps } from "./use-autocomplete.js"; import "../../index.js"; import * as react72 from "react"; import { ReactElement, ReactNode } from "react"; //#region src/components/autocomplete/autocomplete.d.ts interface AutocompleteRootProps<Multiple extends boolean = false> extends Omit<HTMLStyledProps, "defaultValue" | "filter" | "offset" | "onChange" | "ref" | "value">, UseAutocompleteProps<Multiple>, PopupAnimationProps, ThemeProps<AutocompleteStyle>, UseInputBorderProps { /** * If `true`, display the clear icon. * * @default true */ clearable?: boolean; /** * The icon to be used in the clear button. */ clearIcon?: ReactNode; /** * The icon to be used in the empty element. */ emptyIcon?: ReactNode; /** * The icon to be used in the autocomplete. */ icon?: ReactNode; /** * Props for content element. */ contentProps?: AutocompleteContentProps; /** * The props for the end element. */ elementProps?: InputElementProps; /** * Props for empty element. */ emptyProps?: AutocompleteEmptyProps; /** * Props for group element. */ groupProps?: Omit<AutocompleteGroupProps, "children" | "label">; /** * Props for icon element. */ iconProps?: AutocompleteIconProps; /** * The props for the input element. */ inputProps?: HTMLStyledProps<"input">; /** * Props for option element. */ optionProps?: Omit<AutocompleteOptionProps, "children" | "value">; /** * Props for root element. */ rootProps?: InputGroupRootProps; } declare const AutocompletePropsContext: react72.Context<Partial<AutocompleteRootProps<false>> | undefined>, useAutocompletePropsContext: () => Partial<AutocompleteRootProps<false>> | undefined; /** * `Autocomplete` is a component used to display suggestions in response to user text input. * * @see https://yamada-ui.com/docs/components/autocomplete */ declare const AutocompleteRoot: GenericsComponent<{ <Multiple extends boolean = false>(props: AutocompleteRootProps<Multiple>): ReactElement; }>; interface AutocompleteIconProps extends HTMLStyledProps { icon?: ReactNode; } interface AutocompleteContentProps extends PopoverContentProps {} interface AutocompleteLabelProps extends HTMLStyledProps<"span"> {} declare const AutocompleteLabel: Component<"span", AutocompleteLabelProps>; interface AutocompleteGroupProps extends UseComboboxGroupProps, HTMLStyledProps { /** * The label of the group. */ label?: ReactNode; /** * Props for the label component. */ labelProps?: AutocompleteLabelProps; } declare const AutocompleteGroup: Component<"div", AutocompleteGroupProps>; interface AutocompleteOptionProps extends UseAutocompleteOptionProps, HTMLStyledProps { /** * The icon to be used in the autocomplete option. */ icon?: ReactNode; } declare const AutocompleteOption: Component<"div", AutocompleteOptionProps>; interface AutocompleteEmptyProps extends HTMLStyledProps { /** * The icon to be used in the autocomplete option. */ icon?: ReactNode; } //#endregion export { AutocompleteGroup, AutocompleteGroupProps, AutocompleteLabel, AutocompleteLabelProps, AutocompleteOption, AutocompleteOptionProps, AutocompletePropsContext, AutocompleteRoot, AutocompleteRootProps, useAutocompletePropsContext }; //# sourceMappingURL=autocomplete.d.ts.map