@commercetools-uikit/tooltip 0.0.0-canary-2021830134526
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/LICENSE +21 -0
- package/README.md +230 -0
- package/dist/commercetools-uikit-tooltip.cjs.d.ts +2 -0
- package/dist/commercetools-uikit-tooltip.cjs.dev.js +329 -0
- package/dist/commercetools-uikit-tooltip.cjs.js +7 -0
- package/dist/commercetools-uikit-tooltip.cjs.prod.js +291 -0
- package/dist/commercetools-uikit-tooltip.esm.js +308 -0
- package/dist/declarations/src/export-types.d.ts +2 -0
- package/dist/declarations/src/index.d.ts +3 -0
- package/dist/declarations/src/tooltip.d.ts +28 -0
- package/dist/declarations/src/tooltip.styles.d.ts +15 -0
- package/dist/declarations/src/version.d.ts +2 -0
- package/package.json +52 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Modifiers } from 'popper.js';
|
|
2
|
+
import { ComponentType, FocusEvent, ChangeEvent, CSSProperties, ReactElement } from 'react';
|
|
3
|
+
declare type TComponents = {
|
|
4
|
+
BodyComponent?: ComponentType;
|
|
5
|
+
TooltipWrapperComponent?: ComponentType;
|
|
6
|
+
WrapperComponent?: ComponentType;
|
|
7
|
+
};
|
|
8
|
+
export declare type TTooltipProps = {
|
|
9
|
+
children: ReactElement;
|
|
10
|
+
closeAfter: number;
|
|
11
|
+
styles?: Record<string, CSSProperties>;
|
|
12
|
+
off: boolean;
|
|
13
|
+
id?: string;
|
|
14
|
+
onClose?: (e?: ChangeEvent | FocusEvent) => void;
|
|
15
|
+
onOpen?: (e?: ChangeEvent | FocusEvent) => void;
|
|
16
|
+
isOpen?: boolean;
|
|
17
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
18
|
+
title: string;
|
|
19
|
+
modifiers?: Modifiers;
|
|
20
|
+
components?: TComponents;
|
|
21
|
+
horizontalConstraint?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
|
|
22
|
+
};
|
|
23
|
+
declare const Tooltip: {
|
|
24
|
+
(props: TTooltipProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
defaultProps: Pick<TTooltipProps, "off" | "horizontalConstraint" | "closeAfter" | "placement">;
|
|
27
|
+
};
|
|
28
|
+
export default Tooltip;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import type { TTooltipProps } from './tooltip';
|
|
3
|
+
export declare const Body: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const getBodyStyles: ({ constraint, placement, customStyles, }: {
|
|
8
|
+
constraint: TTooltipProps['horizontalConstraint'];
|
|
9
|
+
placement: string;
|
|
10
|
+
customStyles?: CSSProperties | undefined;
|
|
11
|
+
}) => CSSProperties;
|
|
12
|
+
export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@commercetools-uikit/tooltip",
|
|
3
|
+
"description": "Tooltips display informative text when users hover over or focus on an element.",
|
|
4
|
+
"version": "0.0.0-canary-2021830134526",
|
|
5
|
+
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/commercetools/ui-kit.git",
|
|
9
|
+
"directory": "packages/components/tooltip"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://uikit.commercetools.com",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"javascript",
|
|
14
|
+
"design system",
|
|
15
|
+
"react",
|
|
16
|
+
"uikit"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"private": false,
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"main": "dist/commercetools-uikit-tooltip.cjs.js",
|
|
25
|
+
"module": "dist/commercetools-uikit-tooltip.esm.js",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"prepare": "../../../scripts/version.js replace"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@babel/runtime": "7.14.8",
|
|
34
|
+
"@babel/runtime-corejs3": "7.14.9",
|
|
35
|
+
"@commercetools-uikit/constraints": "0.0.0-canary-2021830134526",
|
|
36
|
+
"@commercetools-uikit/design-system": "0.0.0-canary-2021830134526",
|
|
37
|
+
"@commercetools-uikit/hooks": "0.0.0-canary-2021830134526",
|
|
38
|
+
"@commercetools-uikit/utils": "12.2.0",
|
|
39
|
+
"@emotion/react": "^11.4.0",
|
|
40
|
+
"@emotion/styled": "^11.3.0",
|
|
41
|
+
"lodash": "4.17.21",
|
|
42
|
+
"prop-types": "15.7.2",
|
|
43
|
+
"react-is": "17.0.2",
|
|
44
|
+
"use-popper": "1.1.6"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"react": "17.0.2"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"react": "17.x"
|
|
51
|
+
}
|
|
52
|
+
}
|