@react-hive/honey-layout 6.2.0 → 6.5.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/dist/components/HoneyContextMenu/HoneyContextMenu.d.ts +6 -5
- package/dist/components/HoneyContextMenu/HoneyContextMenu.types.d.ts +7 -5
- package/dist/components/HoneyContextMenu/HoneyContextMenuContent.d.ts +4 -3
- package/dist/components/HoneyContextMenu/HoneyContextMenuContentOption.d.ts +3 -2
- package/dist/components/HoneyPopup/HoneyPopup.d.ts +12 -48
- package/dist/components/HoneyPopup/HoneyPopup.types.d.ts +1 -0
- package/dist/components/HoneyPopup/HoneyPopupContent.d.ts +49 -0
- package/dist/components/HoneyPopup/HoneyPopupContext.d.ts +4 -2
- package/dist/components/HoneyPopup/HoneyPopupTree.d.ts +16 -1
- package/dist/components/HoneyPopup/hooks/use-honey-popup-context.d.ts +3 -1
- package/dist/components/HoneyPopup/hooks/use-honey-popup-interactions.d.ts +14 -2
- package/dist/components/HoneyPopup/hooks/use-honey-popup.d.ts +12 -6
- package/dist/components/HoneyPopup/index.d.ts +2 -0
- package/dist/helpers/helpers.d.ts +15 -2
- package/dist/index.js +5595 -0
- package/dist/types/css.types.d.ts +0 -50
- package/dist/utils/utils.d.ts +0 -9
- package/package.json +15 -15
- package/dist/index.mjs +0 -5959
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ReferenceType } from '@floating-ui/react';
|
|
2
3
|
import { FastOmit } from '@react-hive/honey-style';
|
|
3
|
-
import {
|
|
4
|
+
import { HoneyPopupContextValue, HoneyPopupProps } from '../HoneyPopup';
|
|
4
5
|
import { HoneyContextMenuOption } from './HoneyContextMenu.types';
|
|
5
6
|
import { HoneyContextMenuContentProps } from './HoneyContextMenuContent';
|
|
6
|
-
export interface HoneyContextMenuProps<Option extends HoneyContextMenuOption<Context>, Context
|
|
7
|
-
children: (context:
|
|
8
|
-
subProps?: FastOmit<HoneyContextMenuContentProps<Option, Context>, 'options' | 'optionProps'>;
|
|
7
|
+
export interface HoneyContextMenuProps<Option extends HoneyContextMenuOption<Context, Reference>, Context, Reference extends ReferenceType, UseAutoSize extends boolean> extends FastOmit<HoneyPopupProps<Context, Reference, UseAutoSize>, 'content'>, Pick<HoneyContextMenuContentProps<Option, Context, Reference, UseAutoSize>, 'options' | 'optionProps'> {
|
|
8
|
+
children: ReactNode | ((context: HoneyPopupContextValue<Context, Reference>) => ReactNode);
|
|
9
|
+
subProps?: FastOmit<HoneyContextMenuContentProps<Option, Context, Reference, UseAutoSize>, 'options' | 'optionProps'>;
|
|
9
10
|
}
|
|
10
|
-
export declare const HoneyContextMenu: <Option extends HoneyContextMenuOption<Context>, Context
|
|
11
|
+
export declare const HoneyContextMenu: <Option extends HoneyContextMenuOption<Context, Reference>, Context, Reference extends ReferenceType, UseAutoSize extends boolean>({ children, subProps, options, optionProps, clickOptions, context, ...popupProps }: HoneyContextMenuProps<Option, Context, Reference, UseAutoSize>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { FloatingContext, ReferenceType } from '@floating-ui/react';
|
|
2
|
+
interface HoneyContextMenuOptionExecutionContext<Context, Reference extends ReferenceType> {
|
|
2
3
|
context: Context | undefined;
|
|
4
|
+
floatingContext: FloatingContext<Reference>;
|
|
3
5
|
}
|
|
4
|
-
export interface HoneyContextMenuOption<Context = undefined> {
|
|
6
|
+
export interface HoneyContextMenuOption<Context = undefined, Reference extends ReferenceType = ReferenceType> {
|
|
5
7
|
id: string;
|
|
6
8
|
label: string;
|
|
7
|
-
options?: HoneyContextMenuOption<Context>[];
|
|
8
|
-
visible?: boolean | ((executionContext: HoneyContextMenuOptionExecutionContext<Context>) => boolean);
|
|
9
|
-
onClick?: (executionContext: HoneyContextMenuOptionExecutionContext<Context>) => void;
|
|
9
|
+
options?: HoneyContextMenuOption<Context, Reference>[];
|
|
10
|
+
visible?: boolean | ((executionContext: HoneyContextMenuOptionExecutionContext<Context, Reference>) => boolean);
|
|
11
|
+
onClick?: (executionContext: HoneyContextMenuOptionExecutionContext<Context, Reference>) => void;
|
|
10
12
|
}
|
|
11
13
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ReferenceType } from '@floating-ui/react';
|
|
1
2
|
import { FastOmit } from '@react-hive/honey-style';
|
|
2
3
|
import { HoneyPopupProps } from '../HoneyPopup';
|
|
3
4
|
import { HoneyContextMenuOption } from './HoneyContextMenu.types';
|
|
4
5
|
import { HoneyContextMenuContentOptionProps } from './HoneyContextMenuContentOption';
|
|
5
|
-
export interface HoneyContextMenuContentProps<Option extends HoneyContextMenuOption<Context>, Context> extends FastOmit<HoneyPopupProps<Context>, 'children' | 'context' | 'content'> {
|
|
6
|
+
export interface HoneyContextMenuContentProps<Option extends HoneyContextMenuOption<Context, Reference>, Context, Reference extends ReferenceType, UseAutoSize extends boolean> extends FastOmit<HoneyPopupProps<Context, Reference, UseAutoSize>, 'children' | 'context' | 'content'> {
|
|
6
7
|
options: Option[] | undefined;
|
|
7
|
-
optionProps?: FastOmit<HoneyContextMenuContentOptionProps<Option, Context>, 'option'>;
|
|
8
|
+
optionProps?: FastOmit<HoneyContextMenuContentOptionProps<Option, Context, Reference>, 'option'>;
|
|
8
9
|
}
|
|
9
|
-
export declare const HoneyContextMenuContent: <Option extends HoneyContextMenuOption<Context>, Context
|
|
10
|
+
export declare const HoneyContextMenuContent: <Option extends HoneyContextMenuOption<Context, Reference>, Context, Reference extends ReferenceType, UseAutoSize extends boolean>({ options, optionProps, floatingOptions, ...popupProps }: HoneyContextMenuContentProps<Option, Context, Reference, UseAutoSize>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ReferenceType } from '@floating-ui/react';
|
|
1
2
|
import { HoneyBoxProps } from '../HoneyBox';
|
|
2
3
|
import { HoneyContextMenuOption } from './HoneyContextMenu.types';
|
|
3
|
-
export interface HoneyContextMenuContentOptionProps<Option extends HoneyContextMenuOption<Context>, Context> extends HoneyBoxProps {
|
|
4
|
+
export interface HoneyContextMenuContentOptionProps<Option extends HoneyContextMenuOption<Context, Reference>, Context, Reference extends ReferenceType> extends HoneyBoxProps {
|
|
4
5
|
option: Option;
|
|
5
6
|
}
|
|
6
|
-
export declare const HoneyContextMenuContentOption: <Option extends HoneyContextMenuOption<Context>, Context>({ option, ...props }: HoneyContextMenuContentOptionProps<Option, Context>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const HoneyContextMenuContentOption: <Option extends HoneyContextMenuOption<Context, Reference>, Context, Reference extends ReferenceType>({ option, ...props }: HoneyContextMenuContentOptionProps<Option, Context, Reference>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,57 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { HoneyPopupPortalProps } from './HoneyPopupPortal';
|
|
5
|
-
import { HoneyPopupStyledProps } from './HoneyPopupStyled';
|
|
6
|
-
import { HoneyPopupContextProps } from './HoneyPopupContext';
|
|
7
|
-
import { UseHoneyPopupOptions } from './hooks';
|
|
8
|
-
import { HoneyOverlayProps } from '../HoneyOverlay';
|
|
9
|
-
export interface HoneyPopupChildrenContextProps {
|
|
10
|
-
referenceProps: ReturnType<UseInteractionsReturn['getReferenceProps']>;
|
|
11
|
-
}
|
|
12
|
-
type InheritedHoneyOverlayProps = FastOmit<HoneyOverlayProps, 'children' | 'active' | 'onDeactivate' | '$position'>;
|
|
13
|
-
export interface HoneyPopupProps<Context = undefined, UseAutoSize extends boolean = boolean> extends UseHoneyPopupOptions<UseAutoSize> {
|
|
14
|
-
children: (context: HoneyPopupChildrenContextProps) => ReactNode;
|
|
15
|
-
referenceProps?: FastOmit<HoneyPopupStyledProps, 'children' | 'content'>;
|
|
16
|
-
/**
|
|
17
|
-
* Content inside the popup.
|
|
18
|
-
*/
|
|
19
|
-
content: ReactNode | ((context: HoneyPopupContextProps<Context>) => ReactNode);
|
|
1
|
+
import { ReferenceType } from '@floating-ui/react';
|
|
2
|
+
import { HoneyPopupContentProps } from './HoneyPopupContent';
|
|
3
|
+
export interface HoneyPopupProps<Context, Reference extends ReferenceType, UseAutoSize extends boolean> extends HoneyPopupContentProps<Context, Reference, UseAutoSize> {
|
|
20
4
|
/**
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
contentProps?: UseAutoSize extends true ? Omit<InheritedHoneyOverlayProps, '$minWidth' | '$minHeight' | '$maxWidth' | '$maxHeight'> : InheritedHoneyOverlayProps;
|
|
24
|
-
/**
|
|
25
|
-
* Props for managing focus inside the popup.
|
|
5
|
+
* Whether to wrap the popup in a `FloatingTree`.
|
|
6
|
+
* Required if you're using nested floating elements like tooltips or popups within a popup.
|
|
26
7
|
*
|
|
27
|
-
* @
|
|
28
|
-
*/
|
|
29
|
-
focusManagerProps?: FastOmit<FloatingFocusManagerProps, 'children' | 'context'>;
|
|
30
|
-
/**
|
|
31
|
-
* Properties for an arrow component.
|
|
8
|
+
* @default false
|
|
32
9
|
*
|
|
33
|
-
* @see https://floating-ui.com/docs/
|
|
34
|
-
*/
|
|
35
|
-
arrowProps?: FastOmit<FloatingArrowProps, 'ref' | 'context'>;
|
|
36
|
-
/**
|
|
37
|
-
* Properties for `HoneyPopupPortal` component.
|
|
38
|
-
*/
|
|
39
|
-
portalProps?: FastOmit<HoneyPopupPortalProps, 'children'>;
|
|
40
|
-
/**
|
|
41
|
-
* Function to adjust the floating content's styles before rendering.
|
|
42
|
-
*/
|
|
43
|
-
adjustStyles?: (styles: CSSProperties, executionContext: {
|
|
44
|
-
middlewareData: MiddlewareData;
|
|
45
|
-
}) => CSSProperties;
|
|
46
|
-
/**
|
|
47
|
-
* Optional context for the popup.
|
|
10
|
+
* @see https://floating-ui.com/docs/floatingtree
|
|
48
11
|
*/
|
|
49
|
-
|
|
12
|
+
useTree?: boolean;
|
|
50
13
|
}
|
|
51
14
|
/**
|
|
52
15
|
* A popup component that provides floating behavior with customizable options.
|
|
53
16
|
*
|
|
54
|
-
* @template Context - Optional context type.
|
|
17
|
+
* @template Context - Optional context type passed to floating UI.
|
|
18
|
+
* @template Reference - The reference type used for positioning.
|
|
19
|
+
* @template UseAutoSize - Enables auto-sizing behavior for content if `true`.
|
|
55
20
|
*/
|
|
56
|
-
export declare const HoneyPopup: <Context
|
|
57
|
-
export {};
|
|
21
|
+
export declare const HoneyPopup: <Context, Reference extends ReferenceType, UseAutoSize extends boolean>({ useTree, ...props }: HoneyPopupProps<Context, Reference, UseAutoSize>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { ReferenceType, FloatingArrowProps, FloatingFocusManagerProps, MiddlewareData } from '@floating-ui/react';
|
|
3
|
+
import { FastOmit } from '@react-hive/honey-style';
|
|
4
|
+
import { HoneyPopupPortalProps } from './HoneyPopupPortal';
|
|
5
|
+
import { HoneyPopupStyledProps } from './HoneyPopupStyled';
|
|
6
|
+
import { HoneyPopupContextValue } from './HoneyPopupContext';
|
|
7
|
+
import { UseHoneyPopupOptions } from './hooks';
|
|
8
|
+
import { HoneyOverlayProps } from '../HoneyOverlay';
|
|
9
|
+
type InheritedHoneyOverlayProps = FastOmit<HoneyOverlayProps, 'children' | 'active' | 'onDeactivate' | '$position'>;
|
|
10
|
+
export interface HoneyPopupContentProps<Context, Reference extends ReferenceType, UseAutoSize extends boolean> extends UseHoneyPopupOptions<Reference, UseAutoSize> {
|
|
11
|
+
children: ReactNode | ((context: HoneyPopupContextValue<Context, Reference>) => ReactNode);
|
|
12
|
+
referenceProps?: FastOmit<HoneyPopupStyledProps, 'children' | 'content'>;
|
|
13
|
+
/**
|
|
14
|
+
* Content inside the popup.
|
|
15
|
+
*/
|
|
16
|
+
content: ReactNode | ((context: HoneyPopupContextValue<Context, Reference>) => ReactNode);
|
|
17
|
+
/**
|
|
18
|
+
* Additional props for the floating content.
|
|
19
|
+
*/
|
|
20
|
+
contentProps?: UseAutoSize extends true ? FastOmit<InheritedHoneyOverlayProps, '$minWidth' | '$minHeight' | '$maxWidth' | '$maxHeight'> : InheritedHoneyOverlayProps;
|
|
21
|
+
/**
|
|
22
|
+
* Props for managing focus inside the popup.
|
|
23
|
+
*
|
|
24
|
+
* @see https://floating-ui.com/docs/floatingfocusmanager#props
|
|
25
|
+
*/
|
|
26
|
+
focusManagerProps?: FastOmit<FloatingFocusManagerProps, 'children' | 'context'>;
|
|
27
|
+
/**
|
|
28
|
+
* Properties for an arrow component.
|
|
29
|
+
*
|
|
30
|
+
* @see https://floating-ui.com/docs/FloatingArrow#props
|
|
31
|
+
*/
|
|
32
|
+
arrowProps?: FastOmit<FloatingArrowProps, 'ref' | 'context'>;
|
|
33
|
+
/**
|
|
34
|
+
* Properties for `HoneyPopupPortal` component.
|
|
35
|
+
*/
|
|
36
|
+
portalProps?: FastOmit<HoneyPopupPortalProps, 'children'>;
|
|
37
|
+
/**
|
|
38
|
+
* Function to adjust the floating content's styles before rendering.
|
|
39
|
+
*/
|
|
40
|
+
adjustStyles?: (styles: CSSProperties, executionContext: {
|
|
41
|
+
middlewareData: MiddlewareData;
|
|
42
|
+
}) => CSSProperties;
|
|
43
|
+
/**
|
|
44
|
+
* Optional context for the popup.
|
|
45
|
+
*/
|
|
46
|
+
context?: Context;
|
|
47
|
+
}
|
|
48
|
+
export declare const HoneyPopupContent: <Context, Reference extends ReferenceType, UseAutoSize extends boolean>({ children, referenceProps, content, contentProps, focusManagerProps, arrowProps, portalProps, adjustStyles, context, ...popupOptions }: HoneyPopupContentProps<Context, Reference, UseAutoSize>) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { FloatingContext, ReferenceType } from '@floating-ui/react';
|
|
2
|
+
export interface HoneyPopupContextValue<Context, Reference extends ReferenceType> {
|
|
2
3
|
context: Context | undefined;
|
|
4
|
+
floatingContext: FloatingContext<Reference>;
|
|
3
5
|
}
|
|
4
|
-
export declare const HoneyPopupContext: import('react').Context<
|
|
6
|
+
export declare const HoneyPopupContext: import('react').Context<HoneyPopupContextValue<any, any> | undefined>;
|
|
@@ -3,4 +3,19 @@ import { FloatingTreeProps } from '@floating-ui/react';
|
|
|
3
3
|
/**
|
|
4
4
|
* @see https://floating-ui.com/docs/floatingtree
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
interface HoneyPopupTreeProps extends FloatingTreeProps {
|
|
7
|
+
/**
|
|
8
|
+
* Whether to render the `FloatingTree` component.
|
|
9
|
+
* Automatically disables if there is a parent floating node.
|
|
10
|
+
*
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Wrapper component for `FloatingTree` that conditionally renders based on whether there is a parent floating node.
|
|
17
|
+
*
|
|
18
|
+
* @see https://floating-ui.com/docs/floatingtree
|
|
19
|
+
*/
|
|
20
|
+
export declare const HoneyPopupTree: ({ children, enabled, ...props }: HoneyPopupTreeProps) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
21
|
+
export {};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReferenceType } from '@floating-ui/react';
|
|
2
|
+
import { HoneyPopupContextValue } from '../HoneyPopupContext';
|
|
3
|
+
export declare const useHoneyPopupContext: <Context, Reference extends ReferenceType = ReferenceType>() => HoneyPopupContextValue<Context, Reference>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FloatingContext, UseDismissProps, UseClickProps, UseHoverProps, UseFocusProps, UseClientPointProps, UseRoleProps } from '@floating-ui/react';
|
|
1
|
+
import { ElementProps, ReferenceType, FloatingContext, UseDismissProps, UseClickProps, UseHoverProps, UseFocusProps, UseClientPointProps, UseRoleProps } from '@floating-ui/react';
|
|
2
2
|
import { FastOmit } from '@react-hive/honey-style';
|
|
3
|
+
export type HoneyPopupExtraInteraction = <Props extends object>(context: FloatingContext, props?: Props) => ElementProps;
|
|
3
4
|
/**
|
|
4
5
|
* Options for configuring popup interactions.
|
|
5
6
|
*/
|
|
@@ -53,5 +54,16 @@ export interface UseHoneyPopupInteractionsOptions {
|
|
|
53
54
|
* @see https://floating-ui.com/docs/userole
|
|
54
55
|
*/
|
|
55
56
|
roleOptions?: FastOmit<UseRoleProps, 'enabled'>;
|
|
57
|
+
/**
|
|
58
|
+
* Additional custom interactions to be merged with default ones.
|
|
59
|
+
* Useful for extending or overriding the default behavior.
|
|
60
|
+
*
|
|
61
|
+
* To define custom interaction, please use the ` HoneyPopupExtraInteraction ` type.
|
|
62
|
+
*
|
|
63
|
+
* @default []
|
|
64
|
+
*
|
|
65
|
+
* @see https://floating-ui.com/docs/custom-hooks
|
|
66
|
+
*/
|
|
67
|
+
extraInteractions?: ElementProps[];
|
|
56
68
|
}
|
|
57
|
-
export declare const useHoneyPopupInteractions: (context: FloatingContext
|
|
69
|
+
export declare const useHoneyPopupInteractions: <Reference extends ReferenceType>(context: FloatingContext<Reference>, { enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, extraInteractions, }: UseHoneyPopupInteractionsOptions) => import('@floating-ui/react').UseInteractionsReturn;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import { useTransitionStyles, AutoUpdateOptions, AutoPlacementOptions, ArrowOptions, FlipOptions, OffsetOptions, ShiftOptions, OpenChangeReason, UseFloatingOptions, UseFloatingReturn, UseInteractionsReturn, UseTransitionStylesProps } from '@floating-ui/react';
|
|
1
|
+
import { useTransitionStyles, ReferenceType, AutoUpdateOptions, AutoPlacementOptions, ArrowOptions, FlipOptions, OffsetOptions, ShiftOptions, OpenChangeReason, UseFloatingOptions, UseFloatingReturn, UseInteractionsReturn, UseTransitionStylesProps } from '@floating-ui/react';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { Derivable } from '@floating-ui/dom';
|
|
4
4
|
import { FastOmit } from '@react-hive/honey-style';
|
|
5
5
|
import { Nullable } from '../../../types';
|
|
6
6
|
import { UseHoneyPopupInteractionsOptions } from './use-honey-popup-interactions';
|
|
7
|
-
export interface UseHoneyPopupOptions<UseAutoSize extends boolean = boolean> extends UseHoneyPopupInteractionsOptions {
|
|
7
|
+
export interface UseHoneyPopupOptions<Reference extends ReferenceType, UseAutoSize extends boolean = boolean> extends UseHoneyPopupInteractionsOptions {
|
|
8
8
|
open?: boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Options for configuring the floating UI behavior.
|
|
11
11
|
*/
|
|
12
|
-
floatingOptions?: FastOmit<UseFloatingOptions
|
|
12
|
+
floatingOptions?: FastOmit<UseFloatingOptions<Reference>, 'nodeId' | 'open' | 'whileElementsMounted' | 'onOpenChange'>;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to use the offset middleware.
|
|
15
|
+
*
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
useOffset?: boolean;
|
|
13
19
|
/**
|
|
14
20
|
* Configuration for offset middleware.
|
|
15
21
|
*
|
|
@@ -115,7 +121,7 @@ export interface UseHoneyPopupOptions<UseAutoSize extends boolean = boolean> ext
|
|
|
115
121
|
*/
|
|
116
122
|
onClose?: (reason?: OpenChangeReason, event?: Event) => void;
|
|
117
123
|
}
|
|
118
|
-
interface UseHoneyPopupApi {
|
|
124
|
+
interface UseHoneyPopupApi<Reference extends ReferenceType> {
|
|
119
125
|
/**
|
|
120
126
|
* Unique identifier for the floating element.
|
|
121
127
|
*/
|
|
@@ -127,7 +133,7 @@ interface UseHoneyPopupApi {
|
|
|
127
133
|
/**
|
|
128
134
|
* Floating UI instance with positioning and middleware.
|
|
129
135
|
*/
|
|
130
|
-
floating: UseFloatingReturn
|
|
136
|
+
floating: UseFloatingReturn<Reference>;
|
|
131
137
|
/**
|
|
132
138
|
* Ref for the floating arrow element.
|
|
133
139
|
*/
|
|
@@ -145,5 +151,5 @@ interface UseHoneyPopupApi {
|
|
|
145
151
|
*
|
|
146
152
|
* @returns An object containing state and utilities for managing the popup.
|
|
147
153
|
*/
|
|
148
|
-
export declare const useHoneyPopup: ({ enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, open, floatingOptions, offsetOptions, useFlip, flipOptions, useShift, shiftOptions, useArrow, arrowOptions, transitionOptions, useAutoPlacement, autoPlacementOptions, useAutoUpdate, autoUpdateOptions, useAutoSize, minAcceptableWidth, minAcceptableHeight, maxAcceptableWidth, maxAcceptableHeight, onOpen, onClose, }: UseHoneyPopupOptions) => UseHoneyPopupApi
|
|
154
|
+
export declare const useHoneyPopup: <Reference extends ReferenceType>({ enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, extraInteractions, open, floatingOptions, useOffset, offsetOptions, useFlip, flipOptions, useShift, shiftOptions, useArrow, arrowOptions, transitionOptions, useAutoPlacement, autoPlacementOptions, useAutoUpdate, autoUpdateOptions, useAutoSize, minAcceptableWidth, minAcceptableHeight, maxAcceptableWidth, maxAcceptableHeight, onOpen, onClose, }: UseHoneyPopupOptions<Reference>) => UseHoneyPopupApi<Reference>;
|
|
149
155
|
export {};
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { FastOmit,
|
|
3
|
-
import { Nullable, HoneyScreenState, HoneyCSSShorthandTuple, HoneyCSSShorthandDimensionOutput, HoneyCSSSpacingValue,
|
|
2
|
+
import { FastOmit, HoneyFontName, HoneyColor, HoneyCSSColor, HoneyStyledContext, HoneyStyledFunction, HoneyDimensionName, HoneyBreakpointName, HoneyBreakpoints, HoneySpacings, HoneyCSSDimensionUnit, HoneyCSSDimensionValue, HoneyCSSMediaRule } from '@react-hive/honey-style';
|
|
3
|
+
import { Nullable, HoneyScreenState, HoneyCSSShorthandTuple, HoneyCSSShorthandDimensionOutput, HoneyCSSSpacingValue, HoneyPrefixedCSSProperties } from '../types';
|
|
4
4
|
export declare const noop: () => void;
|
|
5
5
|
export declare function assert(condition: any, message: string): asserts condition;
|
|
6
6
|
export declare const generateUniqueId: () => string;
|
|
7
|
+
/**
|
|
8
|
+
* Invokes the given input if it is a function, passing the provided arguments.
|
|
9
|
+
* Otherwise, returns the input as-is.
|
|
10
|
+
*
|
|
11
|
+
* @template Args - Tuple of argument types to pass to the function.
|
|
12
|
+
* @template Result - Return type of the function or the value.
|
|
13
|
+
*
|
|
14
|
+
* @param input - A function to invoke with `args`, or a direct value of type `Result`.
|
|
15
|
+
* @param args - Arguments to pass if `input` is a function.
|
|
16
|
+
*
|
|
17
|
+
* @returns The result of invoking the function, or the original value if it's not a function.
|
|
18
|
+
*/
|
|
19
|
+
export declare const invokeIfFunction: <Args extends any[], Result>(input: ((...args: Args) => Result) | Result, ...args: Args) => Result;
|
|
7
20
|
/**
|
|
8
21
|
* Determines the resolved type for spacing values when processed by `resolveSpacing`.
|
|
9
22
|
*
|