hanbiro-react16-sdk 1.0.9 → 1.0.11

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.
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ export type TooltipPlacement = "top" | "bottom" | "left" | "right";
3
+ export interface TooltipProps {
4
+ /** The tooltip content */
5
+ title: React.ReactNode;
6
+ /** The element that triggers the tooltip */
7
+ children: React.ReactElement;
8
+ /** Placement of the tooltip relative to the trigger */
9
+ placement?: TooltipPlacement;
10
+ /** If true, the tooltip is rendered inline (no portal) */
11
+ disablePortal?: boolean;
12
+ /** Delay before showing tooltip (ms) */
13
+ enterDelay?: number;
14
+ /** Delay before hiding tooltip (ms) */
15
+ leaveDelay?: number;
16
+ /** Additional class name for the tooltip */
17
+ className?: string;
18
+ /** Additional styles for the tooltip */
19
+ style?: React.CSSProperties;
20
+ /** z-index of the tooltip */
21
+ zIndex?: number;
22
+ }
23
+ interface TooltipState {
24
+ visible: boolean;
25
+ coords: {
26
+ top: number;
27
+ left: number;
28
+ };
29
+ }
30
+ declare class Tooltip extends React.Component<TooltipProps, TooltipState> {
31
+ private triggerRef;
32
+ private tooltipRef;
33
+ private enterTimer;
34
+ private leaveTimer;
35
+ static defaultProps: Partial<TooltipProps>;
36
+ constructor(props: TooltipProps);
37
+ computeCoords(): {
38
+ top: number;
39
+ left: number;
40
+ };
41
+ handleMouseEnter: () => void;
42
+ handleMouseLeave: () => void;
43
+ componentWillUnmount(): void;
44
+ renderTooltip(): React.JSX.Element | null;
45
+ render(): React.JSX.Element;
46
+ }
47
+ export default Tooltip;
@@ -1,3 +1,5 @@
1
1
  export { default as ChatAIDraft } from './ChatAIDraft';
2
2
  export { default as LoadingCircular } from './LoadingCircular';
3
3
  export { default as LoadingContainer } from './LoadingContainer';
4
+ export { default as Tooltip } from './Tooltip';
5
+ export type { TooltipProps, TooltipPlacement } from './Tooltip';