UNPKG

@yamada-ui/react

Version:

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

97 lines (96 loc) 3.58 kB
import { ThemeProps } from "../../core/system/index.types.js"; import { Component, GenericsComponent, HTMLStyledProps } from "../../core/components/index.types.js"; import "../../core/index.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 { SelectStyle } from "./select.style.js"; import { UseSelectOptionProps, UseSelectProps } from "./use-select.js"; import "../../index.js"; import * as react2674 from "react"; import { ReactElement, ReactNode } from "react"; //#region src/components/select/select.d.ts interface SelectRootProps<Multiple extends boolean = false> extends Omit<HTMLStyledProps, "defaultValue" | "offset" | "onChange" | "value">, UseSelectProps<Multiple>, PopupAnimationProps, ThemeProps<SelectStyle>, UseInputBorderProps { /** * If `true`, display the clear icon. * * @default false */ clearable?: boolean; /** * The icon to be used in the clear button. */ clearIcon?: ReactNode; /** * The icon to be used in the select. */ icon?: ReactNode; /** * Props for content element. */ contentProps?: SelectContentProps; /** * The props for the end element. */ elementProps?: InputElementProps; /** * Props for group element. */ groupProps?: Omit<SelectGroupProps, "children" | "label">; /** * Props for icon element. */ iconProps?: SelectIconProps; /** * Props for option element. */ optionProps?: Omit<SelectOptionProps, "children" | "value">; /** * Props for placeholder element. */ placeholderProps?: Omit<SelectOptionProps, "children" | "value">; /** * Props for root element. */ rootProps?: InputGroupRootProps; } declare const SelectPropsContext: react2674.Context<Partial<SelectRootProps<false>> | undefined>, useSelectPropsContext: () => Partial<SelectRootProps<false>> | undefined; /** * `Select` is a component used for allowing a user to choose one option from a list. * * @see https://yamada-ui.com/docs/components/select */ declare const SelectRoot: GenericsComponent<{ <Multiple extends boolean = false>(props: SelectRootProps<Multiple>): ReactElement; }>; interface SelectIconProps extends HTMLStyledProps { icon?: ReactNode; } interface SelectContentProps extends PopoverContentProps {} interface SelectLabelProps extends HTMLStyledProps<"span"> {} declare const SelectLabel: Component<"span", SelectLabelProps>; interface SelectGroupProps extends UseComboboxGroupProps, HTMLStyledProps { /** * The label of the group. */ label?: ReactNode; /** * Props for the label component. */ labelProps?: SelectLabelProps; } declare const SelectGroup: Component<"div", SelectGroupProps>; interface SelectOptionProps extends UseSelectOptionProps, HTMLStyledProps { /** * The icon to be used in the select option. */ icon?: ReactNode; } declare const SelectOption: Component<"div", SelectOptionProps>; interface SelectSeparatorProps extends HTMLStyledProps<"hr"> {} declare const SelectSeparator: Component<"hr", SelectSeparatorProps>; //#endregion export { SelectGroup, SelectGroupProps, SelectLabel, SelectLabelProps, SelectOption, SelectOptionProps, SelectPropsContext, SelectRoot, SelectRootProps, SelectSeparator, SelectSeparatorProps, useSelectPropsContext }; //# sourceMappingURL=select.d.ts.map