import { OverlayProps } from '../../overlay/src/Overlay.js'; import * as react from 'react'; import { SyntheticEvent, Ref, ReactNode, KeyboardEvent } from 'react'; import { MergedRef } from '../../shared/src/useMergedRefs.js'; import { FocusScope } from '../../shared/src/useFocusScope.js'; import { ColorProp, ContentProp, HeightProp, BorderProp, FilterProp, AlignContentProp, AlignItemsProp, AlignSelfProp, AspectRatioProp, BackgroundColorProp, BackgroundImageProp, BackgroundPositionProp, BackgroundRepeatProp, BackgroundSizeProp, BorderRadiusProp, BottomProp, BoxShadowProp, ColumnGapProp, ContentVisibilityProp, CursorProp, DisplayProp, FillProp, FlexProp, FlexBasisProp, FlexDirectionProp, FlexFlowProp, FlexGrowProp, FlexShrinkProp, FlexWrapProp, FontFamilyProp, FontSizeProp, FontStyleProp, FontWeightProp, GapProp, GridProp, GridAreaProp, GridAutoColumnsProp, GridAutoFlowProp, GridAutoRowsProp, GridColumnProp, GridColumnEndProp, GridColumnSpanProp, GridColumnStartProp, GridRowProp, GridRowEndProp, GridRowSpanProp, GridRowStartProp, GridTemplateProp, GridTemplateAreasProp, GridTemplateColumnsProp, GridTemplateRowsProp, JustifyContentProp, JustifyItemsProp, JustifySelfProp, LeftProp, LetterSpacingProp, LineHeightProp, MarginProp, MarginBottomProp, MarginLeftProp, MarginRightProp, MarginTopProp, MarginXProp, MarginYProp, MaxHeightProp, MaxWidthProp, MinHeightProp, MinWidthProp, ObjectFitProp, ObjectPositionProp, OpacityProp, OrderProp, OutlineProp, OverflowProp, OverflowXProp, OverflowYProp, PaddingProp, PaddingBottomProp, PaddingLeftProp, PaddingRightProp, PaddingTopProp, PaddingXProp, PaddingYProp, PointerEventsProp, PositionProp, ResizeProp, RightProp, RowGapProp, StrokeProp, TextAlignProp, TextDecorationProp, TextOverflowProp, TextTransformProp, TopProp, TransformProp, TransformOriginProp, TransformStyleProp, VerticalAlignProp, VisibilityProp, WhiteSpaceProp, WillChangeProp, WordBreakProp, WidthValue } from '../../styling/src/styled-system/props-handler.js'; import { ResponsiveValue } from '../../styling/src/useResponsiveValue.js'; import { PopupAlignment, PopupDirection } from '../../overlay/src/usePopup.js'; import { PopupType } from '../../overlay/src/usePopupAriaProps.js'; import { ValidationState } from '../../input/src/types.js'; import { CollectionNode } from '../../collection/src/useCollection.js'; import '../../shared/src/types.js'; import 'csstype'; import '../../styling/src/BreakpointProvider.js'; import 'react/jsx-runtime'; import '../../shared/src/type-fest.js'; import '../../styling/src/styled-system/StylingContext.js'; import '../../shared/src/useFocusManager.js'; import '../../overlay/src/useOverlayPosition.js'; import '@popperjs/core'; import '../../group/src/Group.js'; import '../../layout/src/Flex.js'; interface UseSelectOptions { align?: PopupAlignment; allowFlip?: boolean; allowPreventOverflow?: boolean; allowResponsiveMenuWidth?: boolean; ariaDescribedBy?: string; ariaLabel?: string; ariaLabelledBy?: string; autoFocus?: boolean | number; defaultOpen?: boolean; defaultSelectedKey?: string; direction?: PopupDirection; disabled?: boolean; id?: string; onOpenChange?: (event: SyntheticEvent, isOpen: boolean) => void; onSelectionChange?: (event: SyntheticEvent, selectedKey: string) => void; open?: boolean | null; overlayProps?: Partial; readOnly?: boolean; ref?: Ref; selectedKey?: string | null; validationState?: ValidationState; } declare function useSelect(children: ReactNode, { align, allowFlip, allowPreventOverflow, allowResponsiveMenuWidth, ariaDescribedBy, ariaLabel, ariaLabelledBy, autoFocus, defaultOpen, defaultSelectedKey, direction, disabled, id, onOpenChange, onSelectionChange, open: openProp, overlayProps: { id: menuId, width: menuWidth, ...menuProps }, readOnly, ref, selectedKey: selectedKeyProp, validationState }?: UseSelectOptions): { close: (event: SyntheticEvent) => void; focusScope: FocusScope; isOpen: boolean; listboxProps: { "aria-describedby": string; "aria-label": string; "aria-labelledby": string; autoFocus: boolean; autoFocusTarget: string; fluid: boolean; focusOnHover: boolean; nodes: CollectionNode[]; onSelectionChange: (event: SyntheticEvent, newValue: string[]) => void; selectedKeys: string[]; validationState: ValidationState; }; open: (event: SyntheticEvent, focusTarget: string) => void; overlayProps: { onKeyDown: (event: KeyboardEvent) => void; } & { onKeyDown?: undefined; } & { onKeyDown: (event: KeyboardEvent) => void; } & { id: string; } & { ref: MergedRef; show: boolean; } & { as?: react.ElementType; color?: ColorProp; content?: ContentProp; height?: HeightProp; border?: BorderProp; slot?: string; style?: react.CSSProperties; title?: string; filter?: FilterProp; key?: react.Key; defaultChecked?: boolean; defaultValue?: string | number | readonly string[]; suppressContentEditableWarning?: boolean; suppressHydrationWarning?: boolean; accessKey?: string; autoCapitalize?: (string & {}) | "none" | "off" | "on" | "sentences" | "words" | "characters"; autoFocus?: boolean; className?: string; contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only"; contextMenu?: string; dir?: string; draggable?: boolean | "true" | "false"; enterKeyHint?: "search" | "enter" | "done" | "go" | "next" | "previous" | "send"; hidden?: boolean; lang?: string; nonce?: string; spellCheck?: boolean | "true" | "false"; tabIndex?: number; translate?: "yes" | "no"; radioGroup?: string; role?: react.AriaRole; about?: string; datatype?: string; inlist?: any; prefix?: string; property?: string; rel?: string; resource?: string; rev?: string; typeof?: string; vocab?: string; autoCorrect?: string; autoSave?: string; itemProp?: string; itemScope?: boolean; itemType?: string; itemID?: string; itemRef?: string; results?: number; security?: string; unselectable?: "off" | "on"; inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal"; is?: string; "data-testid"?: string; "aria-activedescendant"?: string; "aria-atomic"?: boolean | "true" | "false"; "aria-autocomplete"?: "list" | "none" | "inline" | "both"; "aria-braillelabel"?: string; "aria-brailleroledescription"?: string; "aria-busy"?: boolean | "true" | "false"; "aria-checked"?: boolean | "true" | "false" | "mixed"; "aria-colcount"?: number; "aria-colindex"?: number; "aria-colindextext"?: string; "aria-colspan"?: number; "aria-controls"?: string; "aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date"; "aria-describedby"?: string; "aria-description"?: string; "aria-details"?: string; "aria-disabled"?: boolean | "true" | "false"; "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup"; "aria-errormessage"?: string; "aria-expanded"?: boolean | "true" | "false"; "aria-flowto"?: string; "aria-grabbed"?: boolean | "true" | "false"; "aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "true" | "false" | "listbox" | "tree"; "aria-hidden"?: boolean | "true" | "false"; "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling"; "aria-keyshortcuts"?: string; "aria-label"?: string; "aria-labelledby"?: string; "aria-level"?: number; "aria-live"?: "off" | "assertive" | "polite"; "aria-modal"?: boolean | "true" | "false"; "aria-multiline"?: boolean | "true" | "false"; "aria-multiselectable"?: boolean | "true" | "false"; "aria-orientation"?: "horizontal" | "vertical"; "aria-owns"?: string; "aria-placeholder"?: string; "aria-posinset"?: number; "aria-pressed"?: boolean | "true" | "false" | "mixed"; "aria-readonly"?: boolean | "true" | "false"; "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals"; "aria-required"?: boolean | "true" | "false"; "aria-roledescription"?: string; "aria-rowcount"?: number; "aria-rowindex"?: number; "aria-rowindextext"?: string; "aria-rowspan"?: number; "aria-selected"?: boolean | "true" | "false"; "aria-setsize"?: number; "aria-sort"?: "none" | "ascending" | "descending" | "other"; "aria-valuemax"?: number; "aria-valuemin"?: number; "aria-valuenow"?: number; "aria-valuetext"?: string; children?: ReactNode; dangerouslySetInnerHTML?: { __html: string | TrustedHTML; }; onCopy?: react.ClipboardEventHandler; onCopyCapture?: react.ClipboardEventHandler; onCut?: react.ClipboardEventHandler; onCutCapture?: react.ClipboardEventHandler; onPaste?: react.ClipboardEventHandler; onPasteCapture?: react.ClipboardEventHandler; onCompositionEnd?: react.CompositionEventHandler; onCompositionEndCapture?: react.CompositionEventHandler; onCompositionStart?: react.CompositionEventHandler; onCompositionStartCapture?: react.CompositionEventHandler; onCompositionUpdate?: react.CompositionEventHandler; onCompositionUpdateCapture?: react.CompositionEventHandler; onFocus?: react.FocusEventHandler; onFocusCapture?: react.FocusEventHandler; onBlur?: react.FocusEventHandler; onBlurCapture?: react.FocusEventHandler; onChange?: react.FormEventHandler; onChangeCapture?: react.FormEventHandler; onBeforeInput?: react.FormEventHandler; onBeforeInputCapture?: react.FormEventHandler; onInput?: react.FormEventHandler; onInputCapture?: react.FormEventHandler; onReset?: react.FormEventHandler; onResetCapture?: react.FormEventHandler; onSubmit?: react.FormEventHandler; onSubmitCapture?: react.FormEventHandler; onInvalid?: react.FormEventHandler; onInvalidCapture?: react.FormEventHandler; onLoad?: react.ReactEventHandler; onLoadCapture?: react.ReactEventHandler; onError?: react.ReactEventHandler; onErrorCapture?: react.ReactEventHandler; onKeyDown?: react.KeyboardEventHandler; onKeyDownCapture?: react.KeyboardEventHandler; onKeyPress?: react.KeyboardEventHandler; onKeyPressCapture?: react.KeyboardEventHandler; onKeyUp?: react.KeyboardEventHandler; onKeyUpCapture?: react.KeyboardEventHandler; onAbort?: react.ReactEventHandler; onAbortCapture?: react.ReactEventHandler; onCanPlay?: react.ReactEventHandler; onCanPlayCapture?: react.ReactEventHandler; onCanPlayThrough?: react.ReactEventHandler; onCanPlayThroughCapture?: react.ReactEventHandler; onDurationChange?: react.ReactEventHandler; onDurationChangeCapture?: react.ReactEventHandler; onEmptied?: react.ReactEventHandler; onEmptiedCapture?: react.ReactEventHandler; onEncrypted?: react.ReactEventHandler; onEncryptedCapture?: react.ReactEventHandler; onEnded?: react.ReactEventHandler; onEndedCapture?: react.ReactEventHandler; onLoadedData?: react.ReactEventHandler; onLoadedDataCapture?: react.ReactEventHandler; onLoadedMetadata?: react.ReactEventHandler; onLoadedMetadataCapture?: react.ReactEventHandler; onLoadStart?: react.ReactEventHandler; onLoadStartCapture?: react.ReactEventHandler; onPause?: react.ReactEventHandler; onPauseCapture?: react.ReactEventHandler; onPlay?: react.ReactEventHandler; onPlayCapture?: react.ReactEventHandler; onPlaying?: react.ReactEventHandler; onPlayingCapture?: react.ReactEventHandler; onProgress?: react.ReactEventHandler; onProgressCapture?: react.ReactEventHandler; onRateChange?: react.ReactEventHandler; onRateChangeCapture?: react.ReactEventHandler; onResize?: react.ReactEventHandler; onResizeCapture?: react.ReactEventHandler; onSeeked?: react.ReactEventHandler; onSeekedCapture?: react.ReactEventHandler; onSeeking?: react.ReactEventHandler; onSeekingCapture?: react.ReactEventHandler; onStalled?: react.ReactEventHandler; onStalledCapture?: react.ReactEventHandler; onSuspend?: react.ReactEventHandler; onSuspendCapture?: react.ReactEventHandler; onTimeUpdate?: react.ReactEventHandler; onTimeUpdateCapture?: react.ReactEventHandler; onVolumeChange?: react.ReactEventHandler; onVolumeChangeCapture?: react.ReactEventHandler; onWaiting?: react.ReactEventHandler; onWaitingCapture?: react.ReactEventHandler; onAuxClick?: react.MouseEventHandler; onAuxClickCapture?: react.MouseEventHandler; onClick?: react.MouseEventHandler; onClickCapture?: react.MouseEventHandler; onContextMenu?: react.MouseEventHandler; onContextMenuCapture?: react.MouseEventHandler; onDoubleClick?: react.MouseEventHandler; onDoubleClickCapture?: react.MouseEventHandler; onDrag?: react.DragEventHandler; onDragCapture?: react.DragEventHandler; onDragEnd?: react.DragEventHandler; onDragEndCapture?: react.DragEventHandler; onDragEnter?: react.DragEventHandler; onDragEnterCapture?: react.DragEventHandler; onDragExit?: react.DragEventHandler; onDragExitCapture?: react.DragEventHandler; onDragLeave?: react.DragEventHandler; onDragLeaveCapture?: react.DragEventHandler; onDragOver?: react.DragEventHandler; onDragOverCapture?: react.DragEventHandler; onDragStart?: react.DragEventHandler; onDragStartCapture?: react.DragEventHandler; onDrop?: react.DragEventHandler; onDropCapture?: react.DragEventHandler; onMouseDown?: react.MouseEventHandler; onMouseDownCapture?: react.MouseEventHandler; onMouseEnter?: react.MouseEventHandler; onMouseLeave?: react.MouseEventHandler; onMouseMove?: react.MouseEventHandler; onMouseMoveCapture?: react.MouseEventHandler; onMouseOut?: react.MouseEventHandler; onMouseOutCapture?: react.MouseEventHandler; onMouseOver?: react.MouseEventHandler; onMouseOverCapture?: react.MouseEventHandler; onMouseUp?: react.MouseEventHandler; onMouseUpCapture?: react.MouseEventHandler; onSelect?: react.ReactEventHandler; onSelectCapture?: react.ReactEventHandler; onTouchCancel?: react.TouchEventHandler; onTouchCancelCapture?: react.TouchEventHandler; onTouchEnd?: react.TouchEventHandler; onTouchEndCapture?: react.TouchEventHandler; onTouchMove?: react.TouchEventHandler; onTouchMoveCapture?: react.TouchEventHandler; onTouchStart?: react.TouchEventHandler; onTouchStartCapture?: react.TouchEventHandler; onPointerDown?: react.PointerEventHandler; onPointerDownCapture?: react.PointerEventHandler; onPointerMove?: react.PointerEventHandler; onPointerMoveCapture?: react.PointerEventHandler; onPointerUp?: react.PointerEventHandler; onPointerUpCapture?: react.PointerEventHandler; onPointerCancel?: react.PointerEventHandler; onPointerCancelCapture?: react.PointerEventHandler; onPointerEnter?: react.PointerEventHandler; onPointerLeave?: react.PointerEventHandler; onPointerOver?: react.PointerEventHandler; onPointerOverCapture?: react.PointerEventHandler; onPointerOut?: react.PointerEventHandler; onPointerOutCapture?: react.PointerEventHandler; onGotPointerCapture?: react.PointerEventHandler; onGotPointerCaptureCapture?: react.PointerEventHandler; onLostPointerCapture?: react.PointerEventHandler; onLostPointerCaptureCapture?: react.PointerEventHandler; onScroll?: react.UIEventHandler; onScrollCapture?: react.UIEventHandler; onWheel?: react.WheelEventHandler; onWheelCapture?: react.WheelEventHandler; onAnimationStart?: react.AnimationEventHandler; onAnimationStartCapture?: react.AnimationEventHandler; onAnimationEnd?: react.AnimationEventHandler; onAnimationEndCapture?: react.AnimationEventHandler; onAnimationIteration?: react.AnimationEventHandler; onAnimationIterationCapture?: react.AnimationEventHandler; onTransitionEnd?: react.TransitionEventHandler; onTransitionEndCapture?: react.TransitionEventHandler; alignContent?: AlignContentProp; alignItems?: AlignItemsProp; alignSelf?: AlignSelfProp; aspectRatio?: AspectRatioProp; backgroundColor?: BackgroundColorProp; backgroundColorActive?: BackgroundColorProp; backgroundColorFocus?: BackgroundColorProp; backgroundColorHover?: BackgroundColorProp; backgroundImage?: BackgroundImageProp; backgroundPosition?: BackgroundPositionProp; backgroundRepeat?: BackgroundRepeatProp; backgroundSize?: BackgroundSizeProp; borderBottom?: BorderProp; borderBottomActive?: BorderProp; borderBottomFocus?: BorderProp; borderBottomHover?: BorderProp; borderBottomLeftRadius?: BorderRadiusProp; borderBottomRightRadius?: BorderRadiusProp; borderActive?: BorderProp; borderFocus?: BorderProp; borderHover?: BorderProp; borderLeft?: BorderProp; borderLeftActive?: BorderProp; borderLeftFocus?: BorderProp; borderLeftHover?: BorderProp; borderRadius?: BorderRadiusProp; borderRight?: BorderProp; borderRightActive?: BorderProp; borderRightFocus?: BorderProp; borderRightHover?: BorderProp; borderTop?: BorderProp; borderTopActive?: BorderProp; borderTopFocus?: BorderProp; borderTopHover?: BorderProp; borderTopLeftRadius?: BorderRadiusProp; borderTopRightRadius?: BorderRadiusProp; bottom?: BottomProp; boxShadow?: BoxShadowProp; boxShadowActive?: BoxShadowProp; boxShadowFocus?: BoxShadowProp; boxShadowHover?: BoxShadowProp; colorActive?: ColorProp; colorFocus?: ColorProp; colorHover?: ColorProp; columnGap?: ColumnGapProp; contentVisibility?: ContentVisibilityProp; cursor?: CursorProp; cursorHover?: CursorProp; display?: DisplayProp; fill?: FillProp; fillFocus?: FillProp; fillHover?: FillProp; flex?: FlexProp; flexBasis?: FlexBasisProp; flexDirection?: FlexDirectionProp; flexFlow?: FlexFlowProp; flexGrow?: FlexGrowProp; flexShrink?: FlexShrinkProp; flexWrap?: FlexWrapProp; fontFamily?: FontFamilyProp; fontSize?: FontSizeProp; fontStyle?: FontStyleProp; fontWeight?: FontWeightProp; gap?: GapProp; grid?: GridProp; gridArea?: GridAreaProp; gridAutoColumns?: GridAutoColumnsProp; gridAutoFlow?: GridAutoFlowProp; gridAutoRows?: GridAutoRowsProp; gridColumn?: GridColumnProp; gridColumnEnd?: GridColumnEndProp; gridColumnSpan?: GridColumnSpanProp; gridColumnStart?: GridColumnStartProp; gridRow?: GridRowProp; gridRowEnd?: GridRowEndProp; gridRowSpan?: GridRowSpanProp; gridRowStart?: GridRowStartProp; gridTemplate?: GridTemplateProp; gridTemplateAreas?: GridTemplateAreasProp; gridTemplateColumns?: GridTemplateColumnsProp; gridTemplateRows?: GridTemplateRowsProp; justifyContent?: JustifyContentProp; justifyItems?: JustifyItemsProp; justifySelf?: JustifySelfProp; left?: LeftProp; letterSpacing?: LetterSpacingProp; lineHeight?: LineHeightProp; margin?: MarginProp; marginBottom?: MarginBottomProp; marginLeft?: MarginLeftProp; marginRight?: MarginRightProp; marginTop?: MarginTopProp; marginX?: MarginXProp; marginY?: MarginYProp; maxHeight?: MaxHeightProp; maxWidth?: MaxWidthProp; minHeight?: MinHeightProp; minWidth?: MinWidthProp; objectFit?: ObjectFitProp; objectPosition?: ObjectPositionProp; opacity?: OpacityProp; opacityActive?: OpacityProp; opacityFocus?: OpacityProp; opacityHover?: OpacityProp; order?: OrderProp; outline?: OutlineProp; outlineFocus?: OutlineProp; overflow?: OverflowProp; overflowX?: OverflowXProp; overflowY?: OverflowYProp; padding?: PaddingProp; paddingBottom?: PaddingBottomProp; paddingLeft?: PaddingLeftProp; paddingRight?: PaddingRightProp; paddingTop?: PaddingTopProp; paddingX?: PaddingXProp; paddingY?: PaddingYProp; pointerEvents?: PointerEventsProp; position?: PositionProp; resize?: ResizeProp; right?: RightProp; rowGap?: RowGapProp; stroke?: StrokeProp; textAlign?: TextAlignProp; textDecoration?: TextDecorationProp; textOverflow?: TextOverflowProp; textTransform?: TextTransformProp; top?: TopProp; transform?: TransformProp; transformOrigin?: TransformOriginProp; transformStyle?: TransformStyleProp; verticalAlign?: VerticalAlignProp; visibility?: VisibilityProp; whiteSpace?: WhiteSpaceProp; willChange?: WillChangeProp; wordBreak?: WordBreakProp; zIndex?: number; show?: boolean; borderOffset?: string | number; containerElement?: HTMLElement; ref?: react.LegacyRef; } & { className: string; width: string | 0 | 1280 | 960 | 800 | 640 | 480 | 400 | 320 | 240 | 160 | 80 | 40 | 20 | ResponsiveValue; }; selectedItem: { avatar: any; endIcon: any; icon: any; text: any; }; selectedKey: string; setSelectedKey: (event: SyntheticEvent, newKeys: string[]) => void; triggerProps: { onClick: undefined; onKeyDown: undefined; onKeyUp: undefined; onBlur: undefined; onFocus: undefined; onMouseEnter: undefined; "aria-controls": string; "aria-expanded": boolean; "aria-haspopup": PopupType; tabIndex: number; } & { "aria-describedby": string; "aria-label": string; "aria-labelledby": string; disabled: boolean; id: string; onKeyDown: (event: KeyboardEvent) => void; ref: MergedRef; }; valueProps: { id: string; }; }; export { type UseSelectOptions, useSelect };