import type { Ref, RefCallback } from 'react'; import { useEffect } from 'react'; import type { Sprinkles } from 'styles/sprinkles.css'; export declare const isBrowser: boolean; export declare const isomorphicLayoutEffect: typeof useEffect; export declare const useUncontrolledState: (value: T, onChange?: (value: T) => void) => [T, (value: T) => void]; export declare const useInputControlledState: (incomingValue: T, incomingOnChange?: H) => [T, H]; export declare const useId: (idFromProps?: string) => string | null; export declare const setRef: (ref: Ref, value: T) => void; /** * Used to merge multiple refs into a single ref callback * @param refs an array of refs */ export declare function mergeRefs(refs: Array | undefined | null>): RefCallback; export declare const isHtmlElement: (element: unknown) => element is Element; export declare const hex2rgba: (c: any, alpha?: string) => string; export declare const ownerDocument: (node?: Node) => Document; export declare const ownerWindow: (node?: Node) => Window; /** * A method to be used when dealing with callbacks that depend on data, but you don't want to trigger re-renders. * * @see {@link https://github.com/facebook/react/issues/14099#issuecomment-440013892|facebook/react#14099} * * @param fn */ export declare const useEventCallback: (fn: T) => (...args: any[]) => undefined; export declare const animate: (element: T, property: keyof T, to: number, duration?: number) => (() => void) | void; export type Alignment = 'left' | 'right' | 'center'; export declare const alignmentToFlexAlignment: (align: Alignment) => Sprinkles["justifyContent"]; /** * A function that returns the first item in the array, if the index exceeds its maximum length * * @example * ```js * const sortFlowRingLookup = arrayRingLookup(['asc', 'desc', 'none']); * * expect(sortFlowRingLookup(4)).toBe('desc'); * ``` */ export declare const arrayRingLookup: >(collection: T) => (index: any) => unknown; export declare const noop: () => void; //# sourceMappingURL=index.d.ts.map