@react-hive/honey-layout 4.1.0 → 5.2.0-beta

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.
Files changed (40) hide show
  1. package/dist/components/HoneyBox.d.ts +3 -1
  2. package/dist/components/HoneyContextMenu/HoneyContextMenu.d.ts +8 -0
  3. package/dist/components/HoneyContextMenu/HoneyContextMenu.types.d.ts +11 -0
  4. package/dist/components/HoneyContextMenu/HoneyContextMenuContent.d.ts +7 -0
  5. package/dist/components/HoneyContextMenu/HoneyContextMenuContentOption.d.ts +7 -0
  6. package/dist/components/HoneyContextMenu/index.d.ts +2 -0
  7. package/dist/components/HoneyFlexBox.d.ts +3 -5
  8. package/dist/components/HoneyGrid/HoneyGrid.d.ts +0 -9
  9. package/dist/components/HoneyGrid/HoneyGridContext.d.ts +8 -0
  10. package/dist/components/HoneyGrid/HoneyGridStyled.d.ts +1 -5
  11. package/dist/components/HoneyGrid/hooks/index.d.ts +1 -1
  12. package/dist/components/HoneyGrid/hooks/use-honey-grid-context.d.ts +1 -0
  13. package/dist/components/HoneyGridColumn/HoneyGridColumnStyled.d.ts +1 -5
  14. package/dist/components/HoneyLazyContent.d.ts +7 -8
  15. package/dist/components/HoneyList/HoneyList.d.ts +1 -1
  16. package/dist/components/HoneyList/HoneyListStyled.d.ts +1 -9
  17. package/dist/components/HoneyLoopingList/HoneyLoopingList.d.ts +1 -3
  18. package/dist/components/HoneyOverlay.d.ts +7 -8
  19. package/dist/components/HoneyPopup/HoneyPopup.d.ts +61 -0
  20. package/dist/components/HoneyPopup/HoneyPopupContext.d.ts +5 -0
  21. package/dist/components/HoneyPopup/HoneyPopupPortal.d.ts +12 -0
  22. package/dist/components/HoneyPopup/HoneyPopupStyled.d.ts +5 -0
  23. package/dist/components/HoneyPopup/HoneyPopupTree.d.ts +6 -0
  24. package/dist/components/HoneyPopup/hooks/index.d.ts +2 -0
  25. package/dist/components/HoneyPopup/hooks/use-honey-popup-context.d.ts +1 -0
  26. package/dist/components/HoneyPopup/hooks/use-honey-popup-interactions.d.ts +55 -0
  27. package/dist/components/HoneyPopup/hooks/use-honey-popup.d.ts +96 -0
  28. package/dist/components/HoneyPopup/index.d.ts +2 -0
  29. package/dist/components/HoneyStatusContent.d.ts +1 -1
  30. package/dist/components/index.d.ts +2 -0
  31. package/dist/contexts/HoneyLayoutContext.d.ts +1 -1
  32. package/dist/effects.d.ts +1 -1
  33. package/dist/helpers/helpers.d.ts +1 -0
  34. package/dist/helpers/react.helpers.d.ts +10 -0
  35. package/dist/hooks/use-honey-drag.d.ts +13 -9
  36. package/dist/hooks/use-honey-synthetic-scrollable-container.d.ts +2 -2
  37. package/dist/index.js +5155 -1653
  38. package/dist/types/data.types.d.ts +8 -11
  39. package/package.json +14 -13
  40. package/dist/components/HoneyGrid/hooks/use-current-honey-grid.d.ts +0 -6
@@ -5,4 +5,6 @@ export interface HoneyBoxProps extends HoneyPrefixedCSSProperties {
5
5
  as?: StyledTarget<'web'>;
6
6
  effects?: HoneyEffectResultFn<object>[];
7
7
  }
8
- export declare const HoneyBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, HTMLAttributes<HTMLDivElement> & HoneyBoxProps>> & string;
8
+ type HoneyBoxInnerProps = HTMLAttributes<HTMLDivElement> & HoneyBoxProps;
9
+ export declare const HoneyBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, HoneyBoxInnerProps>> & string;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { HoneyPopupProps, HoneyPopupChildrenContextProps } from '../HoneyPopup';
3
+ import { HoneyContextMenuOption } from './HoneyContextMenu.types';
4
+ import { HoneyContextMenuContentProps } from './HoneyContextMenuContent';
5
+ export interface HoneyContextMenuProps<Option extends HoneyContextMenuOption<Context>, Context = undefined> extends Pick<HoneyPopupProps<Context>, 'context'>, HoneyContextMenuContentProps<Option, Context> {
6
+ children: (context: HoneyPopupChildrenContextProps) => ReactNode;
7
+ }
8
+ export declare const HoneyContextMenu: <Option extends HoneyContextMenuOption<Context>, Context = undefined>({ children, options, optionProps, context, }: HoneyContextMenuProps<Option, Context>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ interface HoneyContextMenuOptionExecutionContext<Context> {
2
+ context: Context | undefined;
3
+ }
4
+ export interface HoneyContextMenuOption<Context = undefined> {
5
+ id: string;
6
+ label: string;
7
+ options?: HoneyContextMenuOption<Context>[];
8
+ isVisible?: boolean | ((executionContext: HoneyContextMenuOptionExecutionContext<Context>) => boolean);
9
+ onClick?: (executionContext: HoneyContextMenuOptionExecutionContext<Context>) => void;
10
+ }
11
+ export {};
@@ -0,0 +1,7 @@
1
+ import { HoneyContextMenuOption } from './HoneyContextMenu.types';
2
+ import { HoneyContextMenuContentOptionProps } from './HoneyContextMenuContentOption';
3
+ export interface HoneyContextMenuContentProps<Option extends HoneyContextMenuOption<Context>, Context> {
4
+ options: Option[] | undefined;
5
+ optionProps?: Omit<HoneyContextMenuContentOptionProps<Option, Context>, 'option'>;
6
+ }
7
+ export declare const HoneyContextMenuContent: <Option extends HoneyContextMenuOption<Context>, Context = undefined>({ options, optionProps, }: HoneyContextMenuContentProps<Option, Context>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { HoneyBoxProps } from '../HoneyBox';
3
+ import { HoneyContextMenuOption } from './HoneyContextMenu.types';
4
+ export interface HoneyContextMenuContentOptionProps<Option extends HoneyContextMenuOption<Context>, Context> extends HTMLAttributes<HTMLDivElement>, HoneyBoxProps {
5
+ option: Option;
6
+ }
7
+ export declare const HoneyContextMenuContentOption: <Option extends HoneyContextMenuOption<Context>, Context = undefined>({ option, ...props }: HoneyContextMenuContentOptionProps<Option, Context>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './HoneyContextMenu.types';
2
+ export * from './HoneyContextMenu';
@@ -1,5 +1,3 @@
1
- export declare const HoneyFlexBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('./HoneyBox').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('./HoneyBox').HoneyBoxProps, "ref"> & {
2
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
3
- }, Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('./HoneyBox').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('./HoneyBox').HoneyBoxProps, "ref"> & {
4
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
5
- }>, never>, never>> & string;
1
+ import { HoneyBoxProps } from './HoneyBox';
2
+ export type HoneyFlexBoxProps = HoneyBoxProps;
3
+ export declare const HoneyFlexBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & HoneyBoxProps, import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & HoneyBoxProps>, never>, HoneyBoxProps>> & string;
@@ -1,14 +1,6 @@
1
1
  import { default as React } from 'react';
2
- import { HoneyBreakpointName } from '../../types';
3
2
  import { HoneyGridStyledProps } from './HoneyGridStyled';
4
3
  import { HoneyGridColumnStyledProps } from '../HoneyGridColumn';
5
- type HoneyGridContextValue = {
6
- columns: number;
7
- spacing: number | undefined;
8
- isColumnGrowing: boolean;
9
- applyColumnMaxWidth: HoneyBreakpointName | false;
10
- };
11
- export declare const HoneyGridContext: React.Context<HoneyGridContextValue | undefined>;
12
4
  export interface HoneyGridProps extends HoneyGridStyledProps {
13
5
  /**
14
6
  * The number of columns in the grid layout.
@@ -31,4 +23,3 @@ export interface HoneyGridProps extends HoneyGridStyledProps {
31
23
  export declare const HoneyGrid: React.ForwardRefExoticComponent<HoneyGridProps & {
32
24
  children?: React.ReactNode | undefined;
33
25
  } & React.RefAttributes<HTMLDivElement>>;
34
- export {};
@@ -0,0 +1,8 @@
1
+ import { HoneyBreakpointName } from '../../types';
2
+ export interface HoneyGridContextProps {
3
+ columns: number;
4
+ spacing: number | undefined;
5
+ isColumnGrowing: boolean;
6
+ applyColumnMaxWidth: HoneyBreakpointName | false;
7
+ }
8
+ export declare const HoneyGridContext: import('react').Context<HoneyGridContextProps | undefined>;
@@ -17,8 +17,4 @@ export interface HoneyGridStyledProps extends HTMLAttributes<HTMLDivElement>, Om
17
17
  */
18
18
  spacing?: number;
19
19
  }
20
- export declare const HoneyGridStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps, "ref"> & {
21
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
22
- }, Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps, "ref"> & {
23
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
24
- }>, never>, HoneyGridStyledProps>> & string;
20
+ export declare const HoneyGridStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps, import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps>, never>, HoneyGridStyledProps>> & string;
@@ -1 +1 @@
1
- export * from './use-current-honey-grid';
1
+ export * from './use-honey-grid-context';
@@ -0,0 +1 @@
1
+ export declare const useHoneyGridContext: () => import('../HoneyGridContext').HoneyGridContextProps;
@@ -29,8 +29,4 @@ export interface HoneyGridColumnStyledProps extends HTMLAttributes<HTMLDivElemen
29
29
  * It provides flexibility in specifying the number of columns to take, the total number of columns in the grid,
30
30
  * and the spacing between columns.
31
31
  */
32
- export declare const HoneyGridColumnStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps, "ref"> & {
33
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
34
- }, Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps, "ref"> & {
35
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
36
- }>, never>, never>, HoneyGridColumnStyledProps>> & string;
32
+ export declare const HoneyGridColumnStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps, import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & HoneyBoxProps>, never>, keyof HoneyBoxProps> & HoneyBoxProps, HoneyGridColumnStyledProps>> & string;
@@ -1,30 +1,29 @@
1
1
  import { PropsWithChildren } from 'react';
2
- interface HoneyLazyContentProps {
2
+ export interface HoneyLazyContentProps {
3
3
  /**
4
4
  * Determines whether the content should be mounted or unmounted.
5
5
  */
6
- isMount: boolean;
6
+ mount: boolean;
7
7
  /**
8
- * The delay in milliseconds before unmounting the content when `isMount` is set to `false`.
8
+ * The delay in milliseconds before unmounting the content when `mount` is set to `false`.
9
9
  */
10
10
  unmountDelay: number;
11
11
  /**
12
- * Determines whether the content should always remain mounted, regardless of the value of `isMount`.
12
+ * Determines whether the content should always remain mounted, regardless of the value of `mount`.
13
13
  * If `true`, the content will never be unmounted.
14
14
  *
15
15
  * @default false
16
16
  */
17
- isAlwaysMounted?: boolean;
17
+ alwaysMounted?: boolean;
18
18
  /**
19
19
  * Determines whether the content should remain mounted after the mount.
20
20
  * If `true`, the content will not be unmounted after the time it's mounted.
21
21
  *
22
22
  * @default false
23
23
  */
24
- isKeepAfterMount?: boolean;
24
+ keepAfterMount?: boolean;
25
25
  }
26
26
  /**
27
27
  * Component for lazy loading/unloading content based on a mount/unmount state.
28
28
  */
29
- export declare const HoneyLazyContent: ({ children, isMount, unmountDelay, isAlwaysMounted, isKeepAfterMount, }: PropsWithChildren<HoneyLazyContentProps>) => import('react').ReactNode;
30
- export {};
29
+ export declare const HoneyLazyContent: ({ children, mount, unmountDelay, alwaysMounted, keepAfterMount, }: PropsWithChildren<HoneyLazyContentProps>) => import('react').ReactNode;
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes, RefAttributes, default as React } from 'react';
1
+ import { default as React, HTMLAttributes, RefAttributes } from 'react';
2
2
  import { HoneyListGenericProps, HoneyListItem } from './HoneyList.types';
3
3
  import { HoneyBoxProps } from '../HoneyBox';
4
4
  import { HoneyStatusContentProps } from '../HoneyStatusContent';
@@ -1,9 +1 @@
1
- export declare const HoneyListStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, "ref"> & {
2
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
3
- }, Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, "ref"> & {
4
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
5
- }>, never>, never>, import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, "ref"> & {
6
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
7
- }, Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, "ref"> & {
8
- ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
9
- }>, never>, never>>, never>, never>> & string;
1
+ export declare const HoneyListStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps>, never>, keyof import('..').HoneyBoxProps> & import('..').HoneyBoxProps, import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & import('react').HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps>, never>, keyof import('..').HoneyBoxProps> & import('..').HoneyBoxProps>, never>, never>> & string;
@@ -2,9 +2,7 @@ import { default as React } from 'react';
2
2
  import { HoneyBoxProps } from '../HoneyBox';
3
3
  import { HoneyListItem, HoneyListGenericProps } from '../HoneyList';
4
4
  type HoneyLoopingListDirection = 'vertical' | 'horizontal';
5
- export declare const HoneyLoopingListStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & React.HTMLAttributes<HTMLDivElement> & HoneyBoxProps, "ref"> & {
6
- ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
7
- }, never>> & string;
5
+ export declare const HoneyLoopingListStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof HoneyBoxProps> & React.HTMLAttributes<HTMLDivElement> & HoneyBoxProps, never>> & string;
8
6
  export declare const HoneyLoopingListItemStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
7
  interface HoneyLoopingListProps<Item extends HoneyListItem> extends HoneyBoxProps, HoneyListGenericProps<Item> {
10
8
  activeItemIndex: number;
@@ -1,7 +1,7 @@
1
- import { ReactNode, HTMLAttributes } from 'react';
1
+ import { default as React, ReactNode, HTMLAttributes } from 'react';
2
2
  import { HoneyActiveOverlay, HoneyOverlayId, Nullable } from '../types';
3
- import { HoneyBoxProps } from './HoneyBox';
4
- interface OverlayContext {
3
+ import { HoneyFlexBoxProps } from './HoneyFlexBox';
4
+ export interface HoneyOverlayContext {
5
5
  /**
6
6
  * The current overlay instance, including methods and metadata for managing the overlay.
7
7
  */
@@ -11,16 +11,16 @@ interface OverlayContext {
11
11
  */
12
12
  deactivateOverlay: () => void;
13
13
  }
14
- export interface HoneyOverlayProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>, HoneyBoxProps {
14
+ export interface HoneyOverlayProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>, HoneyFlexBoxProps {
15
15
  /**
16
16
  * The content of the overlay, either as static nodes or a function that receives the object
17
17
  * with the current overlay state and helper methods.
18
18
  */
19
- children: ReactNode | ((overlayContext: OverlayContext) => ReactNode);
19
+ children: ReactNode | ((overlayContext: HoneyOverlayContext) => ReactNode);
20
20
  /**
21
21
  * Determines whether the overlay is currently active.
22
22
  */
23
- isActive: boolean;
23
+ active: boolean;
24
24
  /**
25
25
  * An optional unique identifier for the overlay.
26
26
  */
@@ -41,5 +41,4 @@ export interface HoneyOverlayProps extends Omit<HTMLAttributes<HTMLDivElement>,
41
41
  *
42
42
  * @param props - The properties used to configure the overlay.
43
43
  */
44
- export declare const HoneyOverlay: ({ children, isActive, overlayId, onDeactivate, ...props }: HoneyOverlayProps) => import("react/jsx-runtime").JSX.Element;
45
- export {};
44
+ export declare const HoneyOverlay: React.ForwardRefExoticComponent<HoneyOverlayProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,61 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { UseInteractionsReturn, FloatingArrowProps, FloatingFocusManagerProps, MiddlewareData } from '@floating-ui/react';
3
+ import { HoneyPopupPortalProps } from './HoneyPopupPortal';
4
+ import { HoneyPopupStyledProps } from './HoneyPopupStyled';
5
+ import { HoneyPopupContextProps } from './HoneyPopupContext';
6
+ import { UseHoneyPopupOptions } from './hooks';
7
+ import { HoneyOverlayProps } from '../HoneyOverlay';
8
+ export interface HoneyPopupChildrenContextProps {
9
+ referenceProps: ReturnType<UseInteractionsReturn['getReferenceProps']>;
10
+ }
11
+ type InheritedHoneyOverlayProps = Omit<HoneyOverlayProps, 'children' | 'active' | 'onDeactivate'>;
12
+ export interface HoneyPopupProps<Context = undefined> extends Omit<HoneyPopupStyledProps, 'children' | 'content'>, UseHoneyPopupOptions {
13
+ children: (context: HoneyPopupChildrenContextProps) => ReactNode;
14
+ /**
15
+ * Content inside the popup.
16
+ */
17
+ content: ReactNode | ((context: HoneyPopupContextProps<Context>) => ReactNode);
18
+ /**
19
+ * Additional props for the floating content.
20
+ */
21
+ contentProps?: InheritedHoneyOverlayProps;
22
+ /**
23
+ * Props for managing focus inside the popup.
24
+ *
25
+ * @see https://floating-ui.com/docs/floatingfocusmanager#props
26
+ */
27
+ focusManagerProps?: Omit<FloatingFocusManagerProps, 'children' | 'context'>;
28
+ /**
29
+ * Whether to show an arrow indicator.
30
+ *
31
+ * @default false
32
+ */
33
+ showArrow?: boolean;
34
+ /**
35
+ * Properties for an arrow component.
36
+ *
37
+ * @see https://floating-ui.com/docs/FloatingArrow#props
38
+ */
39
+ arrowProps?: Omit<FloatingArrowProps, 'ref' | 'context'>;
40
+ /**
41
+ * Properties for `HoneyPopupPortal` component.
42
+ */
43
+ portalProps?: Omit<HoneyPopupPortalProps, 'children'>;
44
+ /**
45
+ * Function to adjust the floating content's styles before rendering.
46
+ */
47
+ adjustStyles?: (styles: CSSProperties, executionContext: {
48
+ middlewareData: MiddlewareData;
49
+ }) => CSSProperties;
50
+ /**
51
+ * Optional context for the popup.
52
+ */
53
+ context?: Context;
54
+ }
55
+ /**
56
+ * A popup component that provides floating behavior with customizable options.
57
+ *
58
+ * @template Context - Optional context type.
59
+ */
60
+ export declare const HoneyPopup: <Context = undefined>({ children, content, contentProps, focusManagerProps, enabled, open, event, arrowOptions, floatingOptions, offsetOptions, shiftOptions, flipOptions, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, transitionOptions, showArrow, useAutoUpdate, autoUpdateOptions, arrowProps, portalProps, adjustStyles, context, onOpen, onClose, ...props }: HoneyPopupProps<Context>) => import("react/jsx-runtime").JSX.Element;
61
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface HoneyPopupContextProps<Context> {
2
+ context: Context | undefined;
3
+ closePopup: () => void;
4
+ }
5
+ export declare const HoneyPopupContext: import('react').Context<HoneyPopupContextProps<any> | undefined>;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { FloatingPortalProps } from '@floating-ui/react';
3
+ /**
4
+ * @see https://floating-ui.com/docs/floatingportal#props
5
+ */
6
+ export interface HoneyPopupPortalProps extends FloatingPortalProps {
7
+ /**
8
+ * @default true
9
+ */
10
+ enabled?: boolean;
11
+ }
12
+ export declare const HoneyPopupPortal: ({ children, enabled, ...props }: HoneyPopupPortalProps) => 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;
@@ -0,0 +1,5 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { HoneyFlexBoxProps } from '../HoneyFlexBox';
3
+ export interface HoneyPopupStyledProps extends HTMLAttributes<HTMLDivElement>, HoneyFlexBoxProps {
4
+ }
5
+ export declare const HoneyPopupStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps>, never>, keyof import('..').HoneyBoxProps> & import('..').HoneyBoxProps, import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps, import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof HTMLAttributes<HTMLDivElement> | keyof import('..').HoneyBoxProps> & HTMLAttributes<HTMLDivElement> & import('..').HoneyBoxProps>, never>, keyof import('..').HoneyBoxProps> & import('..').HoneyBoxProps>, never>, HoneyPopupStyledProps>> & string;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ import { FloatingTreeProps } from '@floating-ui/react';
3
+ /**
4
+ * @see https://floating-ui.com/docs/floatingtree
5
+ */
6
+ export declare const HoneyPopupTree: ({ children, ...props }: FloatingTreeProps) => 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;
@@ -0,0 +1,2 @@
1
+ export * from './use-honey-popup';
2
+ export * from './use-honey-popup-context';
@@ -0,0 +1 @@
1
+ export declare const useHoneyPopupContext: () => import('../HoneyPopupContext').HoneyPopupContextProps<any>;
@@ -0,0 +1,55 @@
1
+ import { FloatingContext, UseDismissProps, UseClickProps, UseHoverProps, UseFocusProps, UseClientPointProps, UseRoleProps } from '@floating-ui/react';
2
+ /**
3
+ * Options for configuring popup interactions.
4
+ */
5
+ export interface UseHoneyPopupInteractionsOptions {
6
+ /**
7
+ * @default true
8
+ */
9
+ enabled?: boolean;
10
+ /**
11
+ * Determines the trigger event for opening the popup.
12
+ *
13
+ * @default 'click'
14
+ */
15
+ event?: 'click' | 'hover' | 'focus' | 'point' | 'manual';
16
+ /**
17
+ * Configuration for dismiss behavior.
18
+ *
19
+ * @see https://floating-ui.com/docs/usedismiss
20
+ */
21
+ dismissOptions?: Omit<UseDismissProps, 'enabled' | 'escapeKey'>;
22
+ /**
23
+ * Configuration for click interactions.
24
+ *
25
+ * @see https://floating-ui.com/docs/useclick
26
+ */
27
+ clickOptions?: Omit<UseClickProps, 'enabled'>;
28
+ /**
29
+ * Configuration for hover interactions.
30
+ *
31
+ * @prop restMs Default is 150.
32
+ *
33
+ * @see https://floating-ui.com/docs/usehover
34
+ */
35
+ hoverOptions?: Omit<UseHoverProps, 'enabled'>;
36
+ /**
37
+ * Configuration for focus interactions.
38
+ *
39
+ * @see https://floating-ui.com/docs/usefocus
40
+ */
41
+ focusOptions?: Omit<UseFocusProps, 'enabled'>;
42
+ /**
43
+ * Configuration for pointer interactions.
44
+ *
45
+ * @see https://floating-ui.com/docs/useclientpoint
46
+ */
47
+ clientPointsOptions?: Omit<UseClientPointProps, 'enabled'>;
48
+ /**
49
+ * Configuration for role assignment.
50
+ *
51
+ * @see https://floating-ui.com/docs/userole
52
+ */
53
+ roleOptions?: Omit<UseRoleProps, 'enabled'>;
54
+ }
55
+ export declare const useHoneyPopupInteractions: (context: FloatingContext, { enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, }: UseHoneyPopupInteractionsOptions) => import('@floating-ui/react').UseInteractionsReturn;
@@ -0,0 +1,96 @@
1
+ import { useTransitionStyles, AutoUpdateOptions, ArrowOptions, FlipOptions, OffsetOptions, ShiftOptions, UseFloatingOptions, UseFloatingReturn, UseInteractionsReturn, UseTransitionStylesProps } from '@floating-ui/react';
2
+ import { RefObject } from 'react';
3
+ import { Nullable } from '../../../types';
4
+ import { UseHoneyPopupInteractionsOptions } from './use-honey-popup-interactions';
5
+ export interface UseHoneyPopupOptions extends UseHoneyPopupInteractionsOptions {
6
+ open?: boolean;
7
+ /**
8
+ * Configuration for the floating arrow.
9
+ */
10
+ arrowOptions?: Omit<ArrowOptions, 'element'>;
11
+ /**
12
+ * Options for configuring the floating UI behavior.
13
+ */
14
+ floatingOptions?: Omit<UseFloatingOptions, 'nodeId' | 'open' | 'whileElementsMounted' | 'onOpenChange'>;
15
+ /**
16
+ * Configuration for offset middleware.
17
+ *
18
+ * @see https://floating-ui.com/docs/offset
19
+ */
20
+ offsetOptions?: OffsetOptions;
21
+ /**
22
+ * Configuration for flip middleware.
23
+ *
24
+ * @prop crossAxis - Default is `false`.
25
+ * See details by https://floating-ui.com/docs/flip#combining-with-shift
26
+ */
27
+ flipOptions?: FlipOptions;
28
+ /**
29
+ * Configuration for shift middleware.
30
+ *
31
+ * @see https://floating-ui.com/docs/shift
32
+ */
33
+ shiftOptions?: ShiftOptions;
34
+ /**
35
+ * @prop duration Default is 250.
36
+ *
37
+ * @see https://floating-ui.com/docs/usetransition#usetransitionstyles
38
+ */
39
+ transitionOptions?: UseTransitionStylesProps;
40
+ /**
41
+ * Whether to use automatic position updates.
42
+ *
43
+ * @default false
44
+ */
45
+ useAutoUpdate?: boolean;
46
+ /**
47
+ * Configuration for auto-update behavior.
48
+ *
49
+ * @see https://floating-ui.com/docs/autoupdate
50
+ */
51
+ autoUpdateOptions?: AutoUpdateOptions;
52
+ /**
53
+ * Callback invoked when the popup opens.
54
+ */
55
+ onOpen?: () => void;
56
+ /**
57
+ * Callback invoked when the popup closes.
58
+ */
59
+ onClose?: () => void;
60
+ }
61
+ interface UseHoneyPopupApi {
62
+ /**
63
+ * Unique identifier for the floating element.
64
+ */
65
+ nodeId: string | undefined;
66
+ /**
67
+ * Whether the popup is currently open.
68
+ */
69
+ isOpen: boolean;
70
+ /**
71
+ * Floating UI instance with positioning and middleware.
72
+ */
73
+ floating: UseFloatingReturn;
74
+ /**
75
+ * Ref for the floating arrow element.
76
+ */
77
+ arrowRef: RefObject<Nullable<SVGSVGElement>>;
78
+ /**
79
+ * Event handlers for the popup (click, hover, etc.).
80
+ */
81
+ interactions: UseInteractionsReturn;
82
+ transition: ReturnType<typeof useTransitionStyles>;
83
+ /**
84
+ * Function to manually close the popup.
85
+ */
86
+ closePopup: () => void;
87
+ }
88
+ /**
89
+ * Hook for managing a floating popup with customizable behavior.
90
+ *
91
+ * @param options - Configuration options for the popup.
92
+ *
93
+ * @returns An object containing state and utilities for managing the popup.
94
+ */
95
+ export declare const useHoneyPopup: ({ enabled, event, dismissOptions, clickOptions, hoverOptions, focusOptions, clientPointsOptions, roleOptions, open, arrowOptions, floatingOptions, offsetOptions, flipOptions, shiftOptions, transitionOptions, useAutoUpdate, autoUpdateOptions, onOpen, onClose, }: UseHoneyPopupOptions) => UseHoneyPopupApi;
96
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './HoneyPopup';
2
+ export * from './hooks';
@@ -50,4 +50,4 @@ export interface HoneyStatusContentProps {
50
50
  /**
51
51
  * A component that conditionally renders blocks based on specified boolean flags.
52
52
  */
53
- export declare const HoneyStatusContent: ({ children, isLoading, isLoadingOverContent, isError, isNoContent, loadingContent, errorContent, noContent, }: PropsWithChildren<HoneyStatusContentProps>) => string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null;
53
+ export declare const HoneyStatusContent: ({ children, isLoading, isLoadingOverContent, isError, isNoContent, loadingContent, errorContent, noContent, }: PropsWithChildren<HoneyStatusContentProps>) => 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;
@@ -7,3 +7,5 @@ export * from './HoneyLoopingList';
7
7
  export * from './HoneyStatusContent';
8
8
  export * from './HoneyLazyContent';
9
9
  export * from './HoneyOverlay';
10
+ export * from './HoneyPopup';
11
+ export * from './HoneyContextMenu';
@@ -42,7 +42,7 @@ export interface HoneyLayoutContextValue {
42
42
  * @param [unit] - The CSS unit to use for the calculated value. Defaults to 'px'.
43
43
  * @param [type] - The type of spacing to use from the theme (e.g., 'base', 'small', 'large').
44
44
  *
45
- * @returns {ResolveSpacingResult<MultiValue, Unit>} - The resolved spacing value, formatted as a string with the appropriate unit.
45
+ * @returns The resolved spacing value, formatted as a string with the appropriate unit.
46
46
  */
47
47
  resolveSpacing: <MultiValue extends HoneyCSSMultiValue<number>, Unit extends Nullable<HoneyCSSDimensionUnit> = 'px'>(value: MultiValue, unit?: Unit, type?: keyof HoneySpacings) => ResolveSpacingResult<MultiValue, Unit>;
48
48
  /**
package/dist/effects.d.ts CHANGED
@@ -37,7 +37,7 @@ export interface HoneyVisibilityTransitionEffectContextProps {
37
37
  *
38
38
  * @default false
39
39
  */
40
- isActive?: boolean;
40
+ active?: boolean;
41
41
  }
42
42
  /**
43
43
  * A styled-components effect that applies smooth transitions to the `visibility`, `opacity`, and optional extra properties of an element.
@@ -1,6 +1,7 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { ExecutionContext, StyleFunction, css } from 'styled-components';
3
3
  import { Nullable, HoneyBreakpointName, HoneyCSSArrayValue, HoneyCSSDimensionShortHandValue, HoneyCSSDimensionUnit, HoneyCSSMultiValue, HoneyCSSMediaRule, HoneySpacings, HoneyColorKey, HoneyFontName, HoneyCSSColor, HoneyDimensionName, HoneyPrefixedCSSProperties, HoneyBreakpoints, HoneyScreenState, HoneyCSSDimensionValue } from '../types';
4
+ export declare const noop: () => void;
4
5
  export declare function assert(condition: any, message: string): asserts condition;
5
6
  export declare const generateUniqueId: () => string;
6
7
  /**
@@ -1,2 +1,12 @@
1
+ import { Ref, RefCallback } from 'react';
1
2
  import { IStyleSheetManager } from 'styled-components';
2
3
  export declare const shouldForwardProp: IStyleSheetManager['shouldForwardProp'];
4
+ /**
5
+ * Merges multiple refs into a single ref callback.
6
+ * This ensures that all provided refs receive the same reference.
7
+ *
8
+ * @param refs - A list of refs that need to be merged.
9
+ *
10
+ * @returns A single ref callback that assigns the element to all provided refs.
11
+ */
12
+ export declare const mergeRefs: <T>(...refs: (Ref<T> | undefined)[]) => RefCallback<T>;