@k8slens/lds 0.32.0 → 0.33.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.
- package/lib/cjs/Tooltip/Tooltip.d.ts +26 -0
- package/lib/es/Tooltip/Tooltip.d.ts +26 -0
- package/package.json +7 -4
- /package/lib/web/{lds-v0-31-0 → lds-v0-32-0}/index.css +0 -0
- /package/lib/web/{lds-v0-31-0 → lds-v0-32-0}/index.js +0 -0
- /package/lib/web/{lds-v0-31-0 → lds-v0-32-0}/typography.css +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { type Placement } from "@popperjs/core";
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
/**
|
|
5
|
+
* Popper placement. Defaults to `auto`
|
|
6
|
+
*/
|
|
7
|
+
placement?: Placement;
|
|
8
|
+
/**
|
|
9
|
+
* Which element to listen for mutations on. Defaults to document.body
|
|
10
|
+
*/
|
|
11
|
+
mutationsListenerElement?: HTMLElement;
|
|
12
|
+
/**
|
|
13
|
+
* Wrapper element type, div or span, defaults to span
|
|
14
|
+
*/
|
|
15
|
+
wrapper: "span" | "div";
|
|
16
|
+
popupClassName?: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
alwaysVisible?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SpanTooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "aria-describedby">, TooltipProps {
|
|
21
|
+
wrapper: "span";
|
|
22
|
+
}
|
|
23
|
+
export interface DivTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "aria-describedby">, TooltipProps {
|
|
24
|
+
wrapper: "div";
|
|
25
|
+
}
|
|
26
|
+
export default function Tooltip({ id, wrapper: Wrapper, mutationsListenerElement, popupClassName, placement, alwaysVisible, text, children, ...props }: SpanTooltipProps | DivTooltipProps): JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { type Placement } from "@popperjs/core";
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
/**
|
|
5
|
+
* Popper placement. Defaults to `auto`
|
|
6
|
+
*/
|
|
7
|
+
placement?: Placement;
|
|
8
|
+
/**
|
|
9
|
+
* Which element to listen for mutations on. Defaults to document.body
|
|
10
|
+
*/
|
|
11
|
+
mutationsListenerElement?: HTMLElement;
|
|
12
|
+
/**
|
|
13
|
+
* Wrapper element type, div or span, defaults to span
|
|
14
|
+
*/
|
|
15
|
+
wrapper: "span" | "div";
|
|
16
|
+
popupClassName?: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
alwaysVisible?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SpanTooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "aria-describedby">, TooltipProps {
|
|
21
|
+
wrapper: "span";
|
|
22
|
+
}
|
|
23
|
+
export interface DivTooltipProps extends Omit<HTMLAttributes<HTMLDivElement>, "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "aria-describedby">, TooltipProps {
|
|
24
|
+
wrapper: "div";
|
|
25
|
+
}
|
|
26
|
+
export default function Tooltip({ id, wrapper: Wrapper, mutationsListenerElement, popupClassName, placement, alwaysVisible, text, children, ...props }: SpanTooltipProps | DivTooltipProps): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k8slens/lds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Lens Design System – Core React Component Library",
|
|
5
5
|
"author": "Mirantis Inc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"format": "eslint --fix ."
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@k8slens/lds-tokens": "^0.
|
|
31
|
+
"@k8slens/lds-tokens": "^0.34.0",
|
|
32
32
|
"@storybook/react": "6.5.16",
|
|
33
33
|
"@testing-library/react": "14.0.0",
|
|
34
34
|
"@types/rollup-plugin-delete": "1.0.0",
|
|
@@ -37,11 +37,14 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@headlessui/react": "^1.7.14",
|
|
39
39
|
"@k8slens/lds-icons": "*",
|
|
40
|
+
"@popperjs/core": "^2.11.6",
|
|
40
41
|
"@types/react": "^18.2.0",
|
|
41
42
|
"@types/react-dom": "^18.2.1",
|
|
42
43
|
"clsx": "^1.2.1",
|
|
43
44
|
"react": "^18.2.0",
|
|
44
|
-
"react-dom": "^18.2.0"
|
|
45
|
+
"react-dom": "^18.2.0",
|
|
46
|
+
"react-popper": "^2.3.0",
|
|
47
|
+
"rooks": "^7.4.3"
|
|
45
48
|
},
|
|
46
49
|
"jest": {
|
|
47
50
|
"testEnvironment": "jsdom",
|
|
@@ -53,5 +56,5 @@
|
|
|
53
56
|
"\\.svg": "<rootDir>/../../__mocks__/SVGStub.js"
|
|
54
57
|
}
|
|
55
58
|
},
|
|
56
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "c43d64d70295292ed4e957a65887ccf3044b99a5"
|
|
57
60
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|