UNPKG

@base-ui/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

66 lines 2.77 kB
import { Store } from '@base-ui/utils/store'; import { type InteractionType } from '@base-ui/utils/useEnhancedClickHandler'; import type { TransitionStatus } from "../utils/useTransitionStatus.js"; import type { HTMLProps } from "../utils/types.js"; export type State = { id: string | undefined; modal: boolean; multiple: boolean; items: Record<string, React.ReactNode> | ReadonlyArray<{ label: React.ReactNode; value: any; }> | undefined; itemToStringLabel: ((item: any) => string) | undefined; itemToStringValue: ((item: any) => string) | undefined; isItemEqualToValue: (itemValue: any, selectedValue: any) => boolean; value: any; open: boolean; mounted: boolean; forceMount: boolean; transitionStatus: TransitionStatus; openMethod: InteractionType | null; activeIndex: number | null; selectedIndex: number | null; popupProps: HTMLProps; triggerProps: HTMLProps; triggerElement: HTMLElement | null; positionerElement: HTMLElement | null; listElement: HTMLDivElement | null; scrollUpArrowVisible: boolean; scrollDownArrowVisible: boolean; hasScrollArrows: boolean; }; export type SelectStore = Store<State>; export declare const selectors: { id: (state: State) => string | undefined; modal: (state: State) => boolean; multiple: (state: State) => boolean; items: (state: State) => Record<string, import("react").ReactNode> | readonly { label: React.ReactNode; value: any; }[] | undefined; itemToStringLabel: (state: State) => ((item: any) => string) | undefined; itemToStringValue: (state: State) => ((item: any) => string) | undefined; isItemEqualToValue: (state: State) => (itemValue: any, selectedValue: any) => boolean; value: (state: State) => any; hasSelectedValue: (state: State) => boolean; hasNullItemLabel: (state: State, enabled: boolean) => boolean; open: (state: State) => boolean; mounted: (state: State) => boolean; forceMount: (state: State) => boolean; transitionStatus: (state: State) => TransitionStatus; openMethod: (state: State) => InteractionType | null; activeIndex: (state: State) => number | null; selectedIndex: (state: State) => number | null; isActive: (state: State, index: number) => boolean; isSelected: (state: State, index: number, itemValue: any) => boolean; isSelectedByFocus: (state: State, index: number) => boolean; popupProps: (state: State) => HTMLProps; triggerProps: (state: State) => HTMLProps; triggerElement: (state: State) => HTMLElement | null; positionerElement: (state: State) => HTMLElement | null; listElement: (state: State) => HTMLDivElement | null; scrollUpArrowVisible: (state: State) => boolean; scrollDownArrowVisible: (state: State) => boolean; hasScrollArrows: (state: State) => boolean; };