first commit
This commit is contained in:
14
node_modules/@floating-ui/react-dom/src/arrow.d.ts
generated
vendored
Normal file
14
node_modules/@floating-ui/react-dom/src/arrow.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { Middleware, SideObject } from '@floating-ui/core';
|
||||
import * as React from 'react';
|
||||
export interface Options {
|
||||
element: React.MutableRefObject<Element | null> | Element;
|
||||
padding?: number | SideObject;
|
||||
}
|
||||
/**
|
||||
* A data provider that provides data to position an inner element of the
|
||||
* floating element (usually a triangle or caret) so that it is centered to the
|
||||
* reference element.
|
||||
* This wraps the core `arrow` middleware to allow React refs as the element.
|
||||
* @see https://floating-ui.com/docs/arrow
|
||||
*/
|
||||
export declare const arrow: (options: Options) => Middleware;
|
||||
3
node_modules/@floating-ui/react-dom/src/index.d.ts
generated
vendored
Normal file
3
node_modules/@floating-ui/react-dom/src/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { arrow } from './arrow';
|
||||
export { useFloating } from './useFloating';
|
||||
export { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size, } from '@floating-ui/dom';
|
||||
44
node_modules/@floating-ui/react-dom/src/types.d.ts
generated
vendored
Normal file
44
node_modules/@floating-ui/react-dom/src/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import type { ComputePositionConfig, ComputePositionReturn, VirtualElement } from '@floating-ui/dom';
|
||||
import * as React from 'react';
|
||||
export { arrow, Options as ArrowOptions } from './arrow';
|
||||
export { useFloating } from './useFloating';
|
||||
export type { AlignedPlacement, Alignment, AutoPlacementOptions, AutoUpdateOptions, Axis, Boundary, ClientRectObject, ComputePositionConfig, ComputePositionReturn, Coords, DetectOverflowOptions, Dimensions, ElementContext, ElementRects, Elements, FlipOptions, FloatingElement, HideOptions, InlineOptions, Length, Middleware, MiddlewareArguments, MiddlewareData, MiddlewareReturn, MiddlewareState, NodeScroll, OffsetOptions, Padding, Placement, Platform, Rect, ReferenceElement, RootBoundary, ShiftOptions, Side, SideObject, SizeOptions, Strategy, VirtualElement, } from '@floating-ui/dom';
|
||||
export { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size, } from '@floating-ui/dom';
|
||||
type Prettify<T> = {
|
||||
[K in keyof T]: T[K];
|
||||
} & {};
|
||||
export type UseFloatingData = Prettify<Omit<ComputePositionReturn, 'x' | 'y'> & {
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
isPositioned: boolean;
|
||||
}>;
|
||||
export type ReferenceType = Element | VirtualElement;
|
||||
export type UseFloatingReturn<RT extends ReferenceType = ReferenceType> = Prettify<UseFloatingData & {
|
||||
/**
|
||||
* Update the position of the floating element, re-rendering the component
|
||||
* if required.
|
||||
*/
|
||||
update: () => void;
|
||||
/**
|
||||
* @deprecated use `refs.setReference` instead.
|
||||
*/
|
||||
reference: (node: RT | null) => void;
|
||||
/**
|
||||
* @deprecated use `refs.setFloating` instead.
|
||||
*/
|
||||
floating: (node: HTMLElement | null) => void;
|
||||
refs: {
|
||||
reference: React.MutableRefObject<RT | null>;
|
||||
floating: React.MutableRefObject<HTMLElement | null>;
|
||||
setReference: (node: RT | null) => void;
|
||||
setFloating: (node: HTMLElement | null) => void;
|
||||
};
|
||||
elements: {
|
||||
reference: RT | null;
|
||||
floating: HTMLElement | null;
|
||||
};
|
||||
}>;
|
||||
export type UseFloatingProps<RT extends ReferenceType = ReferenceType> = Prettify<Partial<ComputePositionConfig> & {
|
||||
whileElementsMounted?: (reference: RT, floating: HTMLElement, update: () => void) => void | (() => void);
|
||||
open?: boolean;
|
||||
}>;
|
||||
6
node_modules/@floating-ui/react-dom/src/useFloating.d.ts
generated
vendored
Normal file
6
node_modules/@floating-ui/react-dom/src/useFloating.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { ReferenceType, UseFloatingProps, UseFloatingReturn } from './types';
|
||||
/**
|
||||
* Provides data to position a floating element.
|
||||
* @see https://floating-ui.com/docs/react
|
||||
*/
|
||||
export declare function useFloating<RT extends ReferenceType = ReferenceType>(options?: UseFloatingProps): UseFloatingReturn<RT>;
|
||||
1
node_modules/@floating-ui/react-dom/src/utils/deepEqual.d.ts
generated
vendored
Normal file
1
node_modules/@floating-ui/react-dom/src/utils/deepEqual.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function deepEqual(a: any, b: any): boolean;
|
||||
2
node_modules/@floating-ui/react-dom/src/utils/useLatestRef.d.ts
generated
vendored
Normal file
2
node_modules/@floating-ui/react-dom/src/utils/useLatestRef.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import * as React from 'react';
|
||||
export declare function useLatestRef<T>(value: T): React.MutableRefObject<T>;
|
||||
Reference in New Issue
Block a user