import { DismissableLayer } from "@loke/ui/dismissable-layer"; import { FocusScope } from "@loke/ui/focus-scope"; import * as PopperPrimitive from "@loke/ui/popper"; import { Portal as PortalPrimitive } from "@loke/ui/portal"; import { Primitive } from "@loke/ui/primitive"; import { type ComponentPropsWithoutRef, type FC, type ReactNode } from "react"; type Direction = "ltr" | "rtl"; declare const createSelectScope: import("@loke/ui/context").CreateScope; interface SelectSharedProps { autoComplete?: string; children?: ReactNode; defaultOpen?: boolean; dir?: Direction; disabled?: boolean; form?: string; name?: string; onOpenChange?(open: boolean): void; open?: boolean; required?: boolean; } type SelectProps = SelectSharedProps & { value?: string; defaultValue?: string; onValueChange?(value: string): void; }; declare const Select: FC; type PrimitiveButtonProps = ComponentPropsWithoutRef; interface SelectTriggerProps extends PrimitiveButtonProps { } declare const SelectTrigger: import("react").ForwardRefExoticComponent>; type PrimitiveSpanProps = ComponentPropsWithoutRef; interface SelectValueProps extends Omit { placeholder?: ReactNode; } declare const SelectValue: import("react").ForwardRefExoticComponent>; interface SelectIconProps extends PrimitiveSpanProps { } declare const SelectIcon: import("react").ForwardRefExoticComponent>; type PortalProps = ComponentPropsWithoutRef; interface SelectPortalProps { children?: ReactNode; /** * Specify a container element to portal the content into. */ container?: PortalProps["container"]; } declare const SelectPortal: FC; interface SelectContentProps extends SelectContentImplProps { } declare const SelectContent: import("react").ForwardRefExoticComponent>; type DismissableLayerProps = ComponentPropsWithoutRef; type FocusScopeProps = ComponentPropsWithoutRef; type SelectPopperPrivateProps = { onPlaced?: PopperContentProps["onPlaced"]; }; interface SelectContentImplProps extends Omit, Omit { /** * Event handler called when auto-focusing on close. * Can be prevented. */ onCloseAutoFocus?: FocusScopeProps["onUnmountAutoFocus"]; /** * Event handler called when the escape key is down. * Can be prevented. */ onEscapeKeyDown?: DismissableLayerProps["onEscapeKeyDown"]; /** * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`. * Can be prevented. */ onPointerDownOutside?: DismissableLayerProps["onPointerDownOutside"]; position?: "item-aligned" | "popper"; } interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps { } type PopperContentProps = ComponentPropsWithoutRef; interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps { } type PrimitiveDivProps = ComponentPropsWithoutRef; interface SelectViewportProps extends PrimitiveDivProps { nonce?: string; } declare const SelectViewport: import("react").ForwardRefExoticComponent>; interface SelectGroupProps extends PrimitiveDivProps { } declare const SelectGroup: import("react").ForwardRefExoticComponent>; interface SelectLabelProps extends PrimitiveDivProps { } declare const SelectLabel: import("react").ForwardRefExoticComponent>; interface SelectItemProps extends PrimitiveDivProps { disabled?: boolean; textValue?: string; value: string; } declare const SelectItem: import("react").ForwardRefExoticComponent>; interface SelectItemTextProps extends PrimitiveSpanProps { } declare const SelectItemText: import("react").ForwardRefExoticComponent>; interface SelectItemIndicatorProps extends PrimitiveSpanProps { } declare const SelectItemIndicator: import("react").ForwardRefExoticComponent>; interface SelectScrollUpButtonProps extends Omit { } declare const SelectScrollUpButton: import("react").ForwardRefExoticComponent>; interface SelectScrollDownButtonProps extends Omit { } declare const SelectScrollDownButton: import("react").ForwardRefExoticComponent>; interface SelectScrollButtonImplProps extends PrimitiveDivProps { onAutoScroll(): void; } interface SelectSeparatorProps extends PrimitiveDivProps { } declare const SelectSeparator: import("react").ForwardRefExoticComponent>; type PopperArrowProps = ComponentPropsWithoutRef; interface SelectArrowProps extends PopperArrowProps { } declare const SelectArrow: import("react").ForwardRefExoticComponent>; declare const Root: FC; declare const Trigger: import("react").ForwardRefExoticComponent>; declare const Value: import("react").ForwardRefExoticComponent>; declare const Icon: import("react").ForwardRefExoticComponent>; declare const Portal: FC; declare const Content: import("react").ForwardRefExoticComponent>; declare const Viewport: import("react").ForwardRefExoticComponent>; declare const Group: import("react").ForwardRefExoticComponent>; declare const Label: import("react").ForwardRefExoticComponent>; declare const Item: import("react").ForwardRefExoticComponent>; declare const ItemText: import("react").ForwardRefExoticComponent>; declare const ItemIndicator: import("react").ForwardRefExoticComponent>; declare const ScrollUpButton: import("react").ForwardRefExoticComponent>; declare const ScrollDownButton: import("react").ForwardRefExoticComponent>; declare const Separator: import("react").ForwardRefExoticComponent>; declare const Arrow: import("react").ForwardRefExoticComponent>; export { createSelectScope, Select, SelectTrigger, SelectValue, SelectIcon, SelectPortal, SelectContent, SelectViewport, SelectGroup, SelectLabel, SelectItem, SelectItemText, SelectItemIndicator, SelectScrollUpButton, SelectScrollDownButton, SelectSeparator, SelectArrow, Root, Trigger, Value, Icon, Portal, Content, Viewport, Group, Label, Item, ItemText, ItemIndicator, ScrollUpButton, ScrollDownButton, Separator, Arrow, }; export type { SelectProps, SelectTriggerProps, SelectValueProps, SelectIconProps, SelectPortalProps, SelectContentProps, SelectViewportProps, SelectGroupProps, SelectLabelProps, SelectItemProps, SelectItemTextProps, SelectItemIndicatorProps, SelectScrollUpButtonProps, SelectScrollDownButtonProps, SelectSeparatorProps, SelectArrowProps, };