@livechat/design-system-react-components 2.13.0 → 2.14.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.
@@ -1,3 +1,2 @@
1
1
  export { ActionMenu } from './ActionMenu';
2
- export { ActionMenuItem } from './ActionMenuItem';
3
2
  export type { IActionMenuOption } from './types';
@@ -64,17 +64,3 @@ export interface IActionMenuProps extends ComponentCoreProps {
64
64
  */
65
65
  footer?: React.ReactNode;
66
66
  }
67
- export interface ActionMenuItemProps {
68
- /**
69
- * Renders given element on the left of element
70
- */
71
- leftNode?: React.ReactNode;
72
- /**
73
- * Renders given element on the right of element
74
- */
75
- rightNode?: React.ReactNode;
76
- /**
77
- * Specify the kind of menu item
78
- */
79
- kind?: 'warning' | undefined;
80
- }
@@ -0,0 +1,8 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { ListItemProps } from './types';
3
+
4
+ export declare const ListItem: FC<PropsWithChildren<ListItemProps>>;
5
+ /**
6
+ * @deprecated Use `ListItem` instead. This will be removed in a future release.
7
+ */
8
+ export declare const ActionMenuItem: FC<PropsWithChildren<ListItemProps>>;
@@ -0,0 +1 @@
1
+ export { ListItem, ActionMenuItem } from './ListItem';
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface ListItemProps {
4
+ /**
5
+ * Renders given element on the left of element
6
+ */
7
+ leftNode?: ReactNode;
8
+ /**
9
+ * Renders given element on the right of element
10
+ */
11
+ rightNode?: ReactNode;
12
+ /**
13
+ * Specify the kind of menu item
14
+ */
15
+ kind?: 'warning' | undefined;
16
+ }
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { OverflowTooltipTextProps } from './types';
3
+
4
+ export declare const OverflowTooltipText: FC<OverflowTooltipTextProps>;
@@ -0,0 +1 @@
1
+ export { OverflowTooltipText } from './OverflowTooltipText';
@@ -0,0 +1,3 @@
1
+ export interface OverflowTooltipTextProps {
2
+ text: string;
3
+ }
@@ -1,5 +1,5 @@
1
1
  import { OffsetOptions } from '@floating-ui/core';
2
- import { Placement, UseClickProps, UseDismissProps, FlipOptions, Strategy } from '@floating-ui/react';
2
+ import { Placement, UseClickProps, UseDismissProps, FlipOptions, Strategy, UseTransitionStylesProps } from '@floating-ui/react';
3
3
  import * as React from 'react';
4
4
  export interface IPopoverProps {
5
5
  children?: React.ReactNode;
@@ -62,4 +62,10 @@ export interface IPopoverProps {
62
62
  * https://floating-ui.com/docs/usefloating#strategy
63
63
  */
64
64
  floatingStrategy?: Strategy;
65
+ /**
66
+ * Options to define or customize the transition styles for the popover's appearance and disappearance.
67
+ * Uses the default transition styles if not specified.
68
+ * @see https://floating-ui.com/docs/usetransition
69
+ */
70
+ transitionOptions?: UseTransitionStylesProps;
65
71
  }
@@ -2,3 +2,5 @@ export { useAnimations } from './useAnimations';
2
2
  export { useHeightResizer } from './useHeightResizer';
3
3
  export { useMobileViewDetector } from './useMobileViewDetector';
4
4
  export { useInteractive } from './useInteractive';
5
+ export { useOnHover } from './useOnHover';
6
+ export { useIsOverflow } from './useIsOverflow';
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export type NODE = HTMLDivElement | null;
2
+ export type NODE = HTMLElement | null;
3
3
  export type CALLBACK = (newSize: DOMRectReadOnly) => void;
4
4
  export interface IUseHeightResizer {
5
5
  size: number;
@@ -18,3 +18,8 @@ export interface UseInteractiveProps {
18
18
  export interface IUseInteractive {
19
19
  handleInteractiveClick: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
20
20
  }
21
+ export interface IUseOnHover {
22
+ isHovered: boolean;
23
+ handleMouseOver: () => void;
24
+ handleMouseOut: () => void;
25
+ }
@@ -0,0 +1,3 @@
1
+ import { RefObject } from 'react';
2
+
3
+ export declare const useIsOverflow: <T extends HTMLElement>(ref: RefObject<T>) => boolean;
@@ -0,0 +1,3 @@
1
+ import { IUseOnHover } from './types';
2
+
3
+ export declare const useOnHover: (initialState?: boolean) => IUseOnHover;