alicia-design-system 1.40.2 → 1.41.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/dist/cjs/alicia/common/Tooltip/Tooltip.d.ts +19 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.js +14 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.js.map +1 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.spec.d.ts +1 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.spec.js +13 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.spec.js.map +1 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.stories.d.ts +33 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.stories.js +35 -0
- package/dist/cjs/alicia/common/Tooltip/Tooltip.stories.js.map +1 -0
- package/dist/cjs/alicia/common/Tooltip/index.d.ts +1 -0
- package/dist/cjs/alicia/common/Tooltip/index.js +6 -0
- package/dist/cjs/alicia/common/Tooltip/index.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/alicia/common/Tooltip/Tooltip.d.ts +19 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.js +10 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.js.map +1 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.spec.d.ts +1 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.spec.js +11 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.spec.js.map +1 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.stories.d.ts +33 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.stories.js +32 -0
- package/dist/esm/alicia/common/Tooltip/Tooltip.stories.js.map +1 -0
- package/dist/esm/alicia/common/Tooltip/index.d.ts +1 -0
- package/dist/esm/alicia/common/Tooltip/index.js +2 -0
- package/dist/esm/alicia/common/Tooltip/index.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export declare const Tooltip: FC<TooltipProps>;
|
|
3
|
+
type TooltipProps = TooltipContentProps & {
|
|
4
|
+
placement?: 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
padding?: string;
|
|
7
|
+
customNode?: ReactNode;
|
|
8
|
+
showDefaultIcon?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type TooltipContentProps = {
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
titleFontWeight?: string;
|
|
14
|
+
titleFontSize?: string;
|
|
15
|
+
descriptionFontWeight?: string;
|
|
16
|
+
descriptionFontSize?: string;
|
|
17
|
+
textColor?: string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tooltip = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@chakra-ui/react");
|
|
6
|
+
const icons_1 = require("../icons");
|
|
7
|
+
const Tooltip = ({ title, description, titleFontWeight = "700", titleFontSize = "16px", descriptionFontWeight = "400", descriptionFontSize = "14px", placement = 'auto', backgroundColor = 'transparent', padding = '16px', textColor = "black", customNode, showDefaultIcon = false }) => {
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Tooltip, Object.assign({ background: backgroundColor, p: padding, borderRadius: "5px", hasArrow: true, placement: placement, label: (0, jsx_runtime_1.jsx)(TooltipContent, { title: title, description: description, titleFontSize: titleFontSize, titleFontWeight: titleFontWeight, descriptionFontSize: descriptionFontSize, descriptionFontWeight: descriptionFontWeight, textColor: textColor }) }, { children: showDefaultIcon || !customNode ? ((0, jsx_runtime_1.jsx)(icons_1.InfoIcon, {})) : (customNode) })));
|
|
9
|
+
};
|
|
10
|
+
exports.Tooltip = Tooltip;
|
|
11
|
+
const TooltipContent = ({ title, description, titleFontWeight, titleFontSize, descriptionFontWeight, descriptionFontSize, textColor }) => {
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [title && ((0, jsx_runtime_1.jsx)(react_1.Flex, Object.assign({ color: textColor, fontWeight: titleFontWeight, fontSize: titleFontSize }, { children: title }))), description && ((0, jsx_runtime_1.jsx)(react_1.Flex, Object.assign({ color: textColor, fontWeight: descriptionFontWeight, fontSize: descriptionFontSize }, { children: description })))] }));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;AACA,4CAAuE;AACvE,oCAAoC;AAE7B,MAAM,OAAO,GAAqB,CAAC,EACxC,KAAK,EACL,WAAW,EACX,eAAe,GAAG,KAAK,EACvB,aAAa,GAAG,MAAM,EACtB,qBAAqB,GAAG,KAAK,EAC7B,mBAAmB,GAAG,MAAM,EAC5B,SAAS,GAAG,MAAM,EAClB,eAAe,GAAG,aAAa,EAC/B,OAAO,GAAG,MAAM,EAChB,SAAS,GAAG,OAAO,EACnB,UAAU,EACV,eAAe,GAAG,KAAK,EACxB,EAAE,EAAE;IAEH,OAAO,CACL,uBAAC,eAAa,kBACZ,UAAU,EAAE,eAAe,EAC3B,CAAC,EAAE,OAAO,EACV,YAAY,EAAC,KAAK,EAClB,QAAQ,QACR,SAAS,EAAE,SAAS,EACpB,KAAK,EACH,uBAAC,cAAc,IACb,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,SAAS,EAAE,SAAS,GACpB,gBACD,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,uBAAC,gBAAQ,KAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAiB,CACrF,CAAC;AAEJ,CAAC,CAAC;AAnCW,QAAA,OAAO,WAmClB;AAEF,MAAM,cAAc,GAA4B,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,SAAS,EACV,EAAE,EAAE;IACH,OAAO,CACL,wBAAC,WAAG,eACD,KAAK,IAAI,CACR,uBAAC,YAAI,kBAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,gBAAG,KAAK,IAAQ,CAC7F,EACA,WAAW,IAAI,CACd,uBAAC,YAAI,kBAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,qBAAqB,EAAE,QAAQ,EAAE,mBAAmB,gBAAG,WAAW,IAAQ,CAC/G,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const react_1 = require("@testing-library/react");
|
|
5
|
+
require("@testing-library/jest-dom");
|
|
6
|
+
const index_1 = require("./index");
|
|
7
|
+
describe("Tooltip component testing with testing-library", () => {
|
|
8
|
+
it("renders without crashing", () => {
|
|
9
|
+
const component = (0, react_1.render)((0, jsx_runtime_1.jsx)(index_1.Tooltip, {}));
|
|
10
|
+
expect(component).toBeTruthy();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=Tooltip.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.spec.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/Tooltip.spec.tsx"],"names":[],"mappings":";;;AAAA,kDAAgD;AAChD,qCAAmC;AACnC,mCAAkC;AAElC,QAAQ,CAAC,gDAAgD,EAAE,GAAG,EAAE;IAC9D,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,SAAS,GAAG,IAAA,cAAM,EAAC,uBAAC,eAAO,KAAG,CAAC,CAAC;QAEtC,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").FC<{
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
description?: string | undefined;
|
|
6
|
+
titleFontWeight?: string | undefined;
|
|
7
|
+
titleFontSize?: string | undefined;
|
|
8
|
+
descriptionFontWeight?: string | undefined;
|
|
9
|
+
descriptionFontSize?: string | undefined;
|
|
10
|
+
textColor?: string | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
placement?: "top" | "right" | "bottom" | "left" | "auto" | undefined;
|
|
13
|
+
backgroundColor?: string | undefined;
|
|
14
|
+
padding?: string | undefined;
|
|
15
|
+
customNode?: import("react").ReactNode;
|
|
16
|
+
showDefaultIcon?: boolean | undefined;
|
|
17
|
+
}>>;
|
|
18
|
+
export default _default;
|
|
19
|
+
export declare const Primary: ComponentStory<import("react").FC<{
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
titleFontWeight?: string | undefined;
|
|
23
|
+
titleFontSize?: string | undefined;
|
|
24
|
+
descriptionFontWeight?: string | undefined;
|
|
25
|
+
descriptionFontSize?: string | undefined;
|
|
26
|
+
textColor?: string | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
placement?: "top" | "right" | "bottom" | "left" | "auto" | undefined;
|
|
29
|
+
backgroundColor?: string | undefined;
|
|
30
|
+
padding?: string | undefined;
|
|
31
|
+
customNode?: import("react").ReactNode;
|
|
32
|
+
showDefaultIcon?: boolean | undefined;
|
|
33
|
+
}>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Primary = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("@chakra-ui/react");
|
|
6
|
+
const Tooltip_1 = require("./Tooltip");
|
|
7
|
+
exports.default = {
|
|
8
|
+
title: "Alicia/common/Tooltip",
|
|
9
|
+
component: Tooltip_1.Tooltip,
|
|
10
|
+
argTypes: {
|
|
11
|
+
placement: {
|
|
12
|
+
options: ['auto', 'top', 'bottom', 'left', 'right'],
|
|
13
|
+
control: { type: 'radio' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const Template = (args) => {
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Box, Object.assign({ height: "200px", width: "2xl", display: "flex", justifyContent: "center", alignItems: "center" }, { children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, Object.assign({}, args)) })));
|
|
19
|
+
};
|
|
20
|
+
exports.Primary = Template.bind({});
|
|
21
|
+
exports.Primary.args = {
|
|
22
|
+
title: 'Tooltip title',
|
|
23
|
+
description: 'Lorem ipsum dolor sit amet',
|
|
24
|
+
padding: '16px',
|
|
25
|
+
backgroundColor: "#B5C9FF",
|
|
26
|
+
titleFontWeight: "700",
|
|
27
|
+
titleFontSize: "16px",
|
|
28
|
+
descriptionFontWeight: "400",
|
|
29
|
+
descriptionFontSize: "14px",
|
|
30
|
+
placement: 'auto',
|
|
31
|
+
textColor: "#000000",
|
|
32
|
+
customNode: (0, jsx_runtime_1.jsx)(react_1.Text, Object.assign({ as: "span" }, { children: "Lorem ipsum" })),
|
|
33
|
+
showDefaultIcon: true
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=Tooltip.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":";;;;AAAA,4CAA6C;AAE7C,uCAAoC;AAEpC,kBAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,iBAAO;IAClB,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;YACnD,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;KACF;CAC+B,CAAC;AAEnC,MAAM,QAAQ,GAAmC,CAAC,IAAI,EAAE,EAAE;IAExD,OAAO,CACL,uBAAC,WAAG,kBAAC,MAAM,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,cAAc,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,gBACxF,uBAAC,iBAAO,oBACF,IAAI,EACR,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEzC,eAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,4BAA4B;IACzC,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,MAAM;IACrB,qBAAqB,EAAE,KAAK;IAC5B,mBAAmB,EAAE,MAAM;IAC3B,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,uBAAC,YAAI,kBAAC,EAAE,EAAC,MAAM,iCAAmB;IAC9C,eAAe,EAAE,IAAI;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from "./Tooltip";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tooltip = void 0;
|
|
4
|
+
var Tooltip_1 = require("./Tooltip");
|
|
5
|
+
Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/index.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -11,4 +11,5 @@ export * from "./alicia/common/TextBox";
|
|
|
11
11
|
export * from "./alicia/common/Select";
|
|
12
12
|
export * from "./alicia/common/Accordion";
|
|
13
13
|
export * from "./alicia/common/NavigationButtons";
|
|
14
|
+
export * from "./alicia/common/Tooltip";
|
|
14
15
|
export * from "./alicia/common/Menu";
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,5 +27,6 @@ __exportStar(require("./alicia/common/TextBox"), exports);
|
|
|
27
27
|
__exportStar(require("./alicia/common/Select"), exports);
|
|
28
28
|
__exportStar(require("./alicia/common/Accordion"), exports);
|
|
29
29
|
__exportStar(require("./alicia/common/NavigationButtons"), exports);
|
|
30
|
+
__exportStar(require("./alicia/common/Tooltip"), exports);
|
|
30
31
|
__exportStar(require("./alicia/common/Menu"), exports);
|
|
31
32
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,2DAAyC;AACzC,yDAAuC;AACvC,uDAAqC;AACrC,6DAA2C;AAC3C,6DAA2C;AAC3C,uDAAqC;AACrC,mEAAiD;AACjD,wDAAsC;AACtC,0DAAwC;AACxC,yDAAuC;AACvC,4DAA0C;AAC1C,oEAAkD;AAClD,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,2DAAyC;AACzC,yDAAuC;AACvC,uDAAqC;AACrC,6DAA2C;AAC3C,6DAA2C;AAC3C,uDAAqC;AACrC,mEAAiD;AACjD,wDAAsC;AACtC,0DAAwC;AACxC,yDAAuC;AACvC,4DAA0C;AAC1C,oEAAkD;AAClD,0DAAwC;AACxC,uDAAqC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export declare const Tooltip: FC<TooltipProps>;
|
|
3
|
+
type TooltipProps = TooltipContentProps & {
|
|
4
|
+
placement?: 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
padding?: string;
|
|
7
|
+
customNode?: ReactNode;
|
|
8
|
+
showDefaultIcon?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type TooltipContentProps = {
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
titleFontWeight?: string;
|
|
14
|
+
titleFontSize?: string;
|
|
15
|
+
descriptionFontWeight?: string;
|
|
16
|
+
descriptionFontSize?: string;
|
|
17
|
+
textColor?: string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Flex, Tooltip as ChakraTooltip } from '@chakra-ui/react';
|
|
3
|
+
import { InfoIcon } from "../icons";
|
|
4
|
+
export const Tooltip = ({ title, description, titleFontWeight = "700", titleFontSize = "16px", descriptionFontWeight = "400", descriptionFontSize = "14px", placement = 'auto', backgroundColor = 'transparent', padding = '16px', textColor = "black", customNode, showDefaultIcon = false }) => {
|
|
5
|
+
return (_jsx(ChakraTooltip, Object.assign({ background: backgroundColor, p: padding, borderRadius: "5px", hasArrow: true, placement: placement, label: _jsx(TooltipContent, { title: title, description: description, titleFontSize: titleFontSize, titleFontWeight: titleFontWeight, descriptionFontSize: descriptionFontSize, descriptionFontWeight: descriptionFontWeight, textColor: textColor }) }, { children: showDefaultIcon || !customNode ? (_jsx(InfoIcon, {})) : (customNode) })));
|
|
6
|
+
};
|
|
7
|
+
const TooltipContent = ({ title, description, titleFontWeight, titleFontSize, descriptionFontWeight, descriptionFontSize, textColor }) => {
|
|
8
|
+
return (_jsxs(Box, { children: [title && (_jsx(Flex, Object.assign({ color: textColor, fontWeight: titleFontWeight, fontSize: titleFontSize }, { children: title }))), description && (_jsx(Flex, Object.assign({ color: textColor, fontWeight: descriptionFontWeight, fontSize: descriptionFontSize }, { children: description })))] }));
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/Tooltip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAqB,CAAC,EACxC,KAAK,EACL,WAAW,EACX,eAAe,GAAG,KAAK,EACvB,aAAa,GAAG,MAAM,EACtB,qBAAqB,GAAG,KAAK,EAC7B,mBAAmB,GAAG,MAAM,EAC5B,SAAS,GAAG,MAAM,EAClB,eAAe,GAAG,aAAa,EAC/B,OAAO,GAAG,MAAM,EAChB,SAAS,GAAG,OAAO,EACnB,UAAU,EACV,eAAe,GAAG,KAAK,EACxB,EAAE,EAAE;IAEH,OAAO,CACL,KAAC,aAAa,kBACZ,UAAU,EAAE,eAAe,EAC3B,CAAC,EAAE,OAAO,EACV,YAAY,EAAC,KAAK,EAClB,QAAQ,QACR,SAAS,EAAE,SAAS,EACpB,KAAK,EACH,KAAC,cAAc,IACb,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAE,qBAAqB,EAC5C,SAAS,EAAE,SAAS,GACpB,gBACD,eAAe,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAC,QAAQ,KAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAiB,CACrF,CAAC;AAEJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAA4B,CAAC,EAC/C,KAAK,EACL,WAAW,EACX,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,SAAS,EACV,EAAE,EAAE;IACH,OAAO,CACL,MAAC,GAAG,eACD,KAAK,IAAI,CACR,KAAC,IAAI,kBAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,gBAAG,KAAK,IAAQ,CAC7F,EACA,WAAW,IAAI,CACd,KAAC,IAAI,kBAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,qBAAqB,EAAE,QAAQ,EAAE,mBAAmB,gBAAG,WAAW,IAAQ,CAC/G,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render } from "@testing-library/react";
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
|
+
import { Tooltip } from "./index";
|
|
5
|
+
describe("Tooltip component testing with testing-library", () => {
|
|
6
|
+
it("renders without crashing", () => {
|
|
7
|
+
const component = render(_jsx(Tooltip, {}));
|
|
8
|
+
expect(component).toBeTruthy();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=Tooltip.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.spec.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/Tooltip.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,QAAQ,CAAC,gDAAgD,EAAE,GAAG,EAAE;IAC9D,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAC,OAAO,KAAG,CAAC,CAAC;QAEtC,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
declare const _default: ComponentMeta<import("react").FC<{
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
description?: string | undefined;
|
|
6
|
+
titleFontWeight?: string | undefined;
|
|
7
|
+
titleFontSize?: string | undefined;
|
|
8
|
+
descriptionFontWeight?: string | undefined;
|
|
9
|
+
descriptionFontSize?: string | undefined;
|
|
10
|
+
textColor?: string | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
placement?: "top" | "right" | "bottom" | "left" | "auto" | undefined;
|
|
13
|
+
backgroundColor?: string | undefined;
|
|
14
|
+
padding?: string | undefined;
|
|
15
|
+
customNode?: import("react").ReactNode;
|
|
16
|
+
showDefaultIcon?: boolean | undefined;
|
|
17
|
+
}>>;
|
|
18
|
+
export default _default;
|
|
19
|
+
export declare const Primary: ComponentStory<import("react").FC<{
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
titleFontWeight?: string | undefined;
|
|
23
|
+
titleFontSize?: string | undefined;
|
|
24
|
+
descriptionFontWeight?: string | undefined;
|
|
25
|
+
descriptionFontSize?: string | undefined;
|
|
26
|
+
textColor?: string | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
placement?: "top" | "right" | "bottom" | "left" | "auto" | undefined;
|
|
29
|
+
backgroundColor?: string | undefined;
|
|
30
|
+
padding?: string | undefined;
|
|
31
|
+
customNode?: import("react").ReactNode;
|
|
32
|
+
showDefaultIcon?: boolean | undefined;
|
|
33
|
+
}>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text, Box } from '@chakra-ui/react';
|
|
3
|
+
import { Tooltip } from "./Tooltip";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Alicia/common/Tooltip",
|
|
6
|
+
component: Tooltip,
|
|
7
|
+
argTypes: {
|
|
8
|
+
placement: {
|
|
9
|
+
options: ['auto', 'top', 'bottom', 'left', 'right'],
|
|
10
|
+
control: { type: 'radio' },
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
const Template = (args) => {
|
|
15
|
+
return (_jsx(Box, Object.assign({ height: "200px", width: "2xl", display: "flex", justifyContent: "center", alignItems: "center" }, { children: _jsx(Tooltip, Object.assign({}, args)) })));
|
|
16
|
+
};
|
|
17
|
+
export const Primary = Template.bind({});
|
|
18
|
+
Primary.args = {
|
|
19
|
+
title: 'Tooltip title',
|
|
20
|
+
description: 'Lorem ipsum dolor sit amet',
|
|
21
|
+
padding: '16px',
|
|
22
|
+
backgroundColor: "#B5C9FF",
|
|
23
|
+
titleFontWeight: "700",
|
|
24
|
+
titleFontSize: "16px",
|
|
25
|
+
descriptionFontWeight: "400",
|
|
26
|
+
descriptionFontSize: "14px",
|
|
27
|
+
placement: 'auto',
|
|
28
|
+
textColor: "#000000",
|
|
29
|
+
customNode: _jsx(Text, Object.assign({ as: "span" }, { children: "Lorem ipsum" })),
|
|
30
|
+
showDefaultIcon: true
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=Tooltip.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/Tooltip.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAe;IACb,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,OAAO;IAClB,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC;YACnD,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;KACF;CAC+B,CAAC;AAEnC,MAAM,QAAQ,GAAmC,CAAC,IAAI,EAAE,EAAE;IAExD,OAAO,CACL,KAAC,GAAG,kBAAC,MAAM,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,cAAc,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,gBACxF,KAAC,OAAO,oBACF,IAAI,EACR,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEzC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,4BAA4B;IACzC,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,MAAM;IACrB,qBAAqB,EAAE,KAAK;IAC5B,mBAAmB,EAAE,MAAM;IAC3B,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,KAAC,IAAI,kBAAC,EAAE,EAAC,MAAM,iCAAmB;IAC9C,eAAe,EAAE,IAAI;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from "./Tooltip";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/alicia/common/Tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -11,4 +11,5 @@ export * from "./alicia/common/TextBox";
|
|
|
11
11
|
export * from "./alicia/common/Select";
|
|
12
12
|
export * from "./alicia/common/Accordion";
|
|
13
13
|
export * from "./alicia/common/NavigationButtons";
|
|
14
|
+
export * from "./alicia/common/Tooltip";
|
|
14
15
|
export * from "./alicia/common/Menu";
|
package/dist/esm/index.js
CHANGED
|
@@ -11,5 +11,6 @@ export * from "./alicia/common/TextBox";
|
|
|
11
11
|
export * from "./alicia/common/Select";
|
|
12
12
|
export * from "./alicia/common/Accordion";
|
|
13
13
|
export * from "./alicia/common/NavigationButtons";
|
|
14
|
+
export * from "./alicia/common/Tooltip";
|
|
14
15
|
export * from "./alicia/common/Menu";
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|