@zenkigen-inc/component-ui 1.7.0 → 1.7.2
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/index.esm.js +141 -34
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +141 -34
- package/dist/index.js.map +1 -1
- package/dist/tooltip/tooltip-content.d.ts +11 -0
- package/dist/tooltip/tooltip.d.ts +3 -2
- package/dist/tooltip/tooltip.hook.d.ts +11 -0
- package/dist/tooltip/type.d.ts +10 -0
- package/package.json +3 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TooltipHorizontalAlign, TooltipPosition, TooltipSize, TooltipVerticalPosition } from './type';
|
|
3
|
+
export declare const TooltipContent: ({ content, horizontalAlign, verticalPosition, size, tooltipPosition, maxWidth, isPortal, }: {
|
|
4
|
+
content: string;
|
|
5
|
+
size: TooltipSize;
|
|
6
|
+
maxWidth: CSSProperties['maxWidth'];
|
|
7
|
+
verticalPosition: TooltipVerticalPosition;
|
|
8
|
+
horizontalAlign: TooltipHorizontalAlign;
|
|
9
|
+
tooltipPosition: TooltipPosition;
|
|
10
|
+
isPortal?: boolean | undefined;
|
|
11
|
+
}) => import("react").JSX.Element;
|
|
@@ -3,10 +3,11 @@ import { TooltipHorizontalAlign, TooltipSize, TooltipVerticalPosition } from './
|
|
|
3
3
|
type Props = {
|
|
4
4
|
content: string;
|
|
5
5
|
size?: TooltipSize;
|
|
6
|
-
maxWidth?: CSSProperties['
|
|
6
|
+
maxWidth?: CSSProperties['maxWidth'];
|
|
7
7
|
verticalPosition?: TooltipVerticalPosition;
|
|
8
8
|
horizontalAlign?: TooltipHorizontalAlign;
|
|
9
9
|
isDisabledHover?: boolean;
|
|
10
|
+
portalTarget?: HTMLElement;
|
|
10
11
|
};
|
|
11
|
-
export declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, }: PropsWithChildren<Props>): import("react").JSX.Element;
|
|
12
|
+
export declare function Tooltip({ children, content, size, maxWidth, verticalPosition, horizontalAlign, isDisabledHover, portalTarget, }: PropsWithChildren<Props>): import("react").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TooltipHorizontalAlign, TooltipPosition, TooltipSize, TooltipVerticalPosition } from './type';
|
|
3
|
+
export declare const useTooltip: () => {
|
|
4
|
+
calculatePosition: (args: {
|
|
5
|
+
dimensions: DOMRect;
|
|
6
|
+
maxWidth?: CSSProperties['width'];
|
|
7
|
+
verticalPosition: TooltipVerticalPosition;
|
|
8
|
+
horizontalAlign: TooltipHorizontalAlign;
|
|
9
|
+
tooltipSize: TooltipSize;
|
|
10
|
+
}) => TooltipPosition;
|
|
11
|
+
};
|
package/dist/tooltip/type.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
export type TooltipSize = 'small' | 'medium';
|
|
2
3
|
export type TooltipVerticalPosition = 'top' | 'bottom';
|
|
3
4
|
export type TooltipHorizontalAlign = 'left' | 'center' | 'right';
|
|
5
|
+
export type TooltipPosition = {
|
|
6
|
+
maxWidth: CSSProperties['width'];
|
|
7
|
+
width: string;
|
|
8
|
+
left: string;
|
|
9
|
+
top: string;
|
|
10
|
+
bottom: string;
|
|
11
|
+
translateX: string;
|
|
12
|
+
translateY: string;
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenkigen-inc/component-ui",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"repository": "https://github.com/zenkigen/zenkigen-component",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"react": "^18.0.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zenkigen-inc/component-icons": "1.7.
|
|
30
|
-
"@zenkigen-inc/component-theme": "1.7.
|
|
29
|
+
"@zenkigen-inc/component-icons": "1.7.2",
|
|
30
|
+
"@zenkigen-inc/component-theme": "1.7.2",
|
|
31
31
|
"clsx": "2.0.0"
|
|
32
32
|
}
|
|
33
33
|
}
|