hanbiro-react16-sdk 1.0.8 → 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.
package/README.md CHANGED
@@ -17,7 +17,7 @@ You **must** import the SDK stylesheet at the entry point of your project (or in
17
17
  **For npm/ES module projects:**
18
18
  ```ts
19
19
  // src/index.tsx or App.tsx
20
- import 'hanbiro-react16-sdk/dist/hanbiro-react16-sdk.style.css';
20
+ import 'hanbiro-react16-sdk/style.css';
21
21
  ```
22
22
 
23
23
  **For UMD (script tag):**
@@ -66,7 +66,7 @@ initHanbiroReactSDK({
66
66
  import React, { Component } from 'react';
67
67
  import { ChatAIDraft } from 'hanbiro-react16-sdk/components';
68
68
  import { getBaseUrl } from 'hanbiro-react16-sdk/utils';
69
- import 'hanbiro-react16-sdk/dist/hanbiro-react16-sdk.style.css';
69
+ import 'hanbiro-react16-sdk/style.css';
70
70
 
71
71
  class ChatAIDraftApp extends Component {
72
72
  handleApply = (result) => {
@@ -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';