@actview/floating-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/_deprecated-inner.d.ts +82 -0
- package/dist/components/Composite.d.ts +109 -0
- package/dist/components/FloatingArrow.d.ts +66 -0
- package/dist/components/FloatingDelayGroup.d.ts +70 -0
- package/dist/components/FloatingFocusManager.d.ts +92 -0
- package/dist/components/FloatingList.d.ts +43 -0
- package/dist/components/FloatingOverlay.d.ts +18 -0
- package/dist/components/FloatingPortal.d.ts +63 -0
- package/dist/components/FloatingTree.d.ts +45 -0
- package/dist/components/FocusGuard.d.ts +19 -0
- package/dist/components/NextFloatingDelayGroup.d.ts +57 -0
- package/dist/floating-ui.actview.d.mts +37 -0
- package/dist/floating-ui.actview.d.ts +37 -0
- package/dist/floating-ui.actview.esm.js +6688 -0
- package/dist/floating-ui.actview.mjs +6688 -0
- package/dist/floating-ui.actview.umd.js +6772 -0
- package/dist/floating-ui.actview.umd.min.js +1 -0
- package/dist/floating-ui.actview.utils.d.mts +7 -0
- package/dist/floating-ui.actview.utils.d.ts +7 -0
- package/dist/floating-ui.actview.utils.esm.js +587 -0
- package/dist/floating-ui.actview.utils.mjs +587 -0
- package/dist/floating-ui.actview.utils.umd.js +634 -0
- package/dist/floating-ui.actview.utils.umd.min.js +1 -0
- package/dist/hooks/gridNavigation.d.ts +39 -0
- package/dist/hooks/useClick.d.ts +45 -0
- package/dist/hooks/useClientPoint.d.ts +32 -0
- package/dist/hooks/useDismiss.d.ts +80 -0
- package/dist/hooks/useFloating.d.ts +18 -0
- package/dist/hooks/useFloatingRootContext.d.ts +22 -0
- package/dist/hooks/useFocus.d.ts +21 -0
- package/dist/hooks/useHover.d.ts +57 -0
- package/dist/hooks/useId.d.ts +11 -0
- package/dist/hooks/useInteractions.d.ts +13 -0
- package/dist/hooks/useListNavigation.d.ts +176 -0
- package/dist/hooks/useMergeRefs.d.ts +20 -0
- package/dist/hooks/useRole.d.ts +33 -0
- package/dist/hooks/useTransition.d.ts +68 -0
- package/dist/hooks/useTypeahead.d.ts +66 -0
- package/dist/index.d.ts +37 -0
- package/dist/safePolygon.d.ts +12 -0
- package/dist/types.d.ts +140 -0
- package/dist/useFloating.d.ts +57 -0
- package/dist/utils/clearTimeoutIfSet.d.ts +2 -0
- package/dist/utils/composite.d.ts +41 -0
- package/dist/utils/constants.d.ts +8 -0
- package/dist/utils/createAttribute.d.ts +1 -0
- package/dist/utils/createEventEmitter.d.ts +5 -0
- package/dist/utils/deepEqual.d.ts +1 -0
- package/dist/utils/element.d.ts +10 -0
- package/dist/utils/enqueueFocus.d.ts +8 -0
- package/dist/utils/event.d.ts +10 -0
- package/dist/utils/getDPR.d.ts +1 -0
- package/dist/utils/hooks.d.ts +16 -0
- package/dist/utils/log.d.ts +2 -0
- package/dist/utils/markOthers.d.ts +4 -0
- package/dist/utils/nodes.d.ts +4 -0
- package/dist/utils/platform.d.ts +6 -0
- package/dist/utils/roundByDPR.d.ts +1 -0
- package/dist/utils/safeReact.d.ts +8 -0
- package/dist/utils/tabbable.d.ts +13 -0
- package/dist/utils/useLiteMergeRefs.d.ts +14 -0
- package/dist/utils.d.ts +7 -0
- package/package.json +83 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { type Ref } from '@actview/core';
|
|
2
|
+
import type { Delay, FloatingRootContext } from '../types';
|
|
3
|
+
export interface NextFloatingDelayGroupProps {
|
|
4
|
+
children?: any;
|
|
5
|
+
/**
|
|
6
|
+
* The delay to use for the group when it's not in the instant phase.
|
|
7
|
+
*/
|
|
8
|
+
delay: Delay;
|
|
9
|
+
/**
|
|
10
|
+
* An optional explicit timeout to use for the group, which represents when
|
|
11
|
+
* grouping logic will no longer be active after the close delay completes.
|
|
12
|
+
* This is useful if you want grouping to “last” longer than the close delay,
|
|
13
|
+
* for example if there is no close delay at all.
|
|
14
|
+
*/
|
|
15
|
+
timeoutMs?: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Experimental next version of `FloatingDelayGroup` to become the default
|
|
19
|
+
* in the future. This component is not yet stable.
|
|
20
|
+
* Provides context for a group of floating elements that should share a
|
|
21
|
+
* `delay`. Unlike `FloatingDelayGroup`, `useNextDelayGroup` with this
|
|
22
|
+
* component does not cause a re-render of unrelated consumers of the
|
|
23
|
+
* context when the delay changes.
|
|
24
|
+
* @see https://floating-ui.com/docs/FloatingDelayGroup
|
|
25
|
+
*/
|
|
26
|
+
export declare const NextFloatingDelayGroup: {
|
|
27
|
+
__setup: (props: NextFloatingDelayGroupProps) => () => JSX.Element;
|
|
28
|
+
name?: string;
|
|
29
|
+
} & ((props: NextFloatingDelayGroupProps) => () => JSX.Element);
|
|
30
|
+
interface UseNextDelayGroupOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Whether delay grouping should be enabled.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
enabled?: boolean | undefined;
|
|
36
|
+
}
|
|
37
|
+
interface UseNextDelayGroupReturn {
|
|
38
|
+
/**
|
|
39
|
+
* The delay reference object.
|
|
40
|
+
*/
|
|
41
|
+
delayRef: Ref<Delay>;
|
|
42
|
+
/**
|
|
43
|
+
* Whether animations should be removed.
|
|
44
|
+
*/
|
|
45
|
+
isInstantPhase: Ref<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether a `<NextFloatingDelayGroup>` provider is present.
|
|
48
|
+
*/
|
|
49
|
+
hasProvider: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Enables grouping when called inside a component that's a child of a
|
|
53
|
+
* `NextFloatingDelayGroup`.
|
|
54
|
+
* @see https://floating-ui.com/docs/FloatingDelayGroup
|
|
55
|
+
*/
|
|
56
|
+
export declare function useNextDelayGroup(context: FloatingRootContext, options?: UseNextDelayGroupOptions): UseNextDelayGroupReturn;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @floating-ui/actview — @floating-ui/react 的 actview 版。
|
|
3
|
+
*
|
|
4
|
+
* 导出面与 upstream `packages/react/src/index.ts` 对齐:
|
|
5
|
+
* - utils 工具(`./utils` 子路径同 `@floating-ui/react/utils`)
|
|
6
|
+
* - 交互 hooks(useClick / useDismiss / useHover / useListNavigation / ...)
|
|
7
|
+
* - 组件(FloatingTree / FloatingPortal / FloatingFocusManager / Composite / ...)
|
|
8
|
+
* - safePolygon / inner / useInnerOffset
|
|
9
|
+
*/
|
|
10
|
+
export { Composite, CompositeItem } from './components/Composite';
|
|
11
|
+
export { FloatingArrow } from './components/FloatingArrow';
|
|
12
|
+
export { FloatingDelayGroup, useDelayGroup, useDelayGroupContext, } from './components/FloatingDelayGroup';
|
|
13
|
+
export { NextFloatingDelayGroup, useNextDelayGroup, } from './components/NextFloatingDelayGroup';
|
|
14
|
+
export { FloatingFocusManager } from './components/FloatingFocusManager';
|
|
15
|
+
export { FloatingList, useListItem } from './components/FloatingList';
|
|
16
|
+
export { FloatingOverlay } from './components/FloatingOverlay';
|
|
17
|
+
export { FloatingPortal, useFloatingPortalNode, } from './components/FloatingPortal';
|
|
18
|
+
export { FloatingNode, FloatingTree, useFloatingNodeId, useFloatingParentNodeId, useFloatingTree, } from './components/FloatingTree';
|
|
19
|
+
export { useClick } from './hooks/useClick';
|
|
20
|
+
export { useClientPoint } from './hooks/useClientPoint';
|
|
21
|
+
export { useDismiss } from './hooks/useDismiss';
|
|
22
|
+
export { useFloating } from './hooks/useFloating';
|
|
23
|
+
export { useFloatingRootContext } from './hooks/useFloatingRootContext';
|
|
24
|
+
export { useFocus } from './hooks/useFocus';
|
|
25
|
+
export { useHover } from './hooks/useHover';
|
|
26
|
+
export { useId } from './hooks/useId';
|
|
27
|
+
export { useInteractions } from './hooks/useInteractions';
|
|
28
|
+
export { useListNavigation } from './hooks/useListNavigation';
|
|
29
|
+
export { gridNavigation } from './hooks/gridNavigation';
|
|
30
|
+
export { useMergeRefs } from './hooks/useMergeRefs';
|
|
31
|
+
export { useRole } from './hooks/useRole';
|
|
32
|
+
export { useTransitionStatus, useTransitionStyles } from './hooks/useTransition';
|
|
33
|
+
export { useTypeahead } from './hooks/useTypeahead';
|
|
34
|
+
export { inner, useInnerOffset } from './_deprecated-inner';
|
|
35
|
+
export { safePolygon } from './safePolygon';
|
|
36
|
+
export type * from './types';
|
|
37
|
+
export * from './utils';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @floating-ui/actview — @floating-ui/react 的 actview 版。
|
|
3
|
+
*
|
|
4
|
+
* 导出面与 upstream `packages/react/src/index.ts` 对齐:
|
|
5
|
+
* - utils 工具(`./utils` 子路径同 `@floating-ui/react/utils`)
|
|
6
|
+
* - 交互 hooks(useClick / useDismiss / useHover / useListNavigation / ...)
|
|
7
|
+
* - 组件(FloatingTree / FloatingPortal / FloatingFocusManager / Composite / ...)
|
|
8
|
+
* - safePolygon / inner / useInnerOffset
|
|
9
|
+
*/
|
|
10
|
+
export { Composite, CompositeItem } from './components/Composite';
|
|
11
|
+
export { FloatingArrow } from './components/FloatingArrow';
|
|
12
|
+
export { FloatingDelayGroup, useDelayGroup, useDelayGroupContext, } from './components/FloatingDelayGroup';
|
|
13
|
+
export { NextFloatingDelayGroup, useNextDelayGroup, } from './components/NextFloatingDelayGroup';
|
|
14
|
+
export { FloatingFocusManager } from './components/FloatingFocusManager';
|
|
15
|
+
export { FloatingList, useListItem } from './components/FloatingList';
|
|
16
|
+
export { FloatingOverlay } from './components/FloatingOverlay';
|
|
17
|
+
export { FloatingPortal, useFloatingPortalNode, } from './components/FloatingPortal';
|
|
18
|
+
export { FloatingNode, FloatingTree, useFloatingNodeId, useFloatingParentNodeId, useFloatingTree, } from './components/FloatingTree';
|
|
19
|
+
export { useClick } from './hooks/useClick';
|
|
20
|
+
export { useClientPoint } from './hooks/useClientPoint';
|
|
21
|
+
export { useDismiss } from './hooks/useDismiss';
|
|
22
|
+
export { useFloating } from './hooks/useFloating';
|
|
23
|
+
export { useFloatingRootContext } from './hooks/useFloatingRootContext';
|
|
24
|
+
export { useFocus } from './hooks/useFocus';
|
|
25
|
+
export { useHover } from './hooks/useHover';
|
|
26
|
+
export { useId } from './hooks/useId';
|
|
27
|
+
export { useInteractions } from './hooks/useInteractions';
|
|
28
|
+
export { useListNavigation } from './hooks/useListNavigation';
|
|
29
|
+
export { gridNavigation } from './hooks/gridNavigation';
|
|
30
|
+
export { useMergeRefs } from './hooks/useMergeRefs';
|
|
31
|
+
export { useRole } from './hooks/useRole';
|
|
32
|
+
export { useTransitionStatus, useTransitionStyles } from './hooks/useTransition';
|
|
33
|
+
export { useTypeahead } from './hooks/useTypeahead';
|
|
34
|
+
export { inner, useInnerOffset } from './_deprecated-inner';
|
|
35
|
+
export { safePolygon } from './safePolygon';
|
|
36
|
+
export type * from './types';
|
|
37
|
+
export * from './utils';
|