UNPKG

@base-ui-components/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.

64 lines 2.59 kB
import { Store } from '@base-ui-components/utils/store'; 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: (item: any, value: any) => boolean; value: any; open: boolean; mounted: boolean; forceMount: boolean; transitionStatus: TransitionStatus; touchModality: boolean; 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) => (item: any, value: any) => boolean; value: (state: State) => any; open: (state: State) => boolean; mounted: (state: State) => boolean; forceMount: (state: State) => boolean; transitionStatus: (state: State) => TransitionStatus; touchModality: (state: State) => boolean; activeIndex: (state: State) => number | null; selectedIndex: (state: State) => number | null; isActive: (state: State, index: number) => boolean; isSelected: (state: State, index: number, candidate: 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; serializedValue: (state: State) => string; };