@xfers/design-system 3.1.23 → 3.1.24
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/cjs/index.js +6 -6
- package/cjs/index.js.map +1 -1
- package/dist/components/Tooltip/index.js +7 -4
- package/dist/components/Tooltip/index.js.map +1 -1
- package/dist/types/components/Tooltip/index.d.ts +3 -1
- package/es/icons.js +1 -1
- package/es/index.js +4 -4
- package/es/index.js.map +1 -1
- package/es/logos.js +1 -1
- package/package.json +1 -1
|
@@ -32,12 +32,15 @@ require("antd/es/tooltip/style/css");
|
|
|
32
32
|
var styled_1 = require("@emotion/styled");
|
|
33
33
|
var emotion_1 = require("emotion");
|
|
34
34
|
var breakPoints_1 = require("src/constants/breakPoints");
|
|
35
|
-
var
|
|
36
|
-
var
|
|
35
|
+
var fontStyles_1 = require("src/constants/fontStyles");
|
|
36
|
+
var TypographyStyles_1 = require("src/shared/TypographyStyles");
|
|
37
|
+
var theme_1 = require("src/theme/theme");
|
|
38
|
+
var defaultOverlayStyle = emotion_1.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: 200px;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n box-shadow: none;\n\n .ant-tooltip-inner {\n padding: 12px;\n border-radius: 8px;\n box-shadow: none;\n background-color: ", ";\n }\n\n ", " {\n max-width: 250px;\n }\n\n .ant-tooltip-arrow {\n width: 16px;\n height: 16px;\n\n .ant-tooltip-arrow-content {\n background-color: ", ";\n box-shadow: none;\n width: 16px;\n height: 16px;\n }\n }\n\n &.ant-tooltip-placement-topRight .ant-tooltip-arrow,\n &.ant-tooltip-placement-topLeft .ant-tooltip-arrow,\n &.ant-tooltip-placement-top .ant-tooltip-arrow {\n bottom: -3px;\n }\n &.ant-tooltip-placement-bottomRight .ant-tooltip-arrow,\n &.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow,\n &.ant-tooltip-placement-bottom .ant-tooltip-arrow {\n top: -3px;\n }\n &.ant-tooltip-placement-rightBottom .ant-tooltip-arrow,\n &.ant-tooltip-placement-rightTop .ant-tooltip-arrow,\n &.ant-tooltip-placement-right .ant-tooltip-arrow {\n left: -3px;\n }\n &.ant-tooltip-placement-leftBottom .ant-tooltip-arrow,\n &.ant-tooltip-placement-leftTop .ant-tooltip-arrow,\n &.ant-tooltip-placement-left .ant-tooltip-arrow {\n right: -3px;\n }\n"], ["\n max-width: 200px;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n box-shadow: none;\n\n .ant-tooltip-inner {\n padding: 12px;\n border-radius: 8px;\n box-shadow: none;\n background-color: ", ";\n }\n\n ", " {\n max-width: 250px;\n }\n\n .ant-tooltip-arrow {\n width: 16px;\n height: 16px;\n\n .ant-tooltip-arrow-content {\n background-color: ", ";\n box-shadow: none;\n width: 16px;\n height: 16px;\n }\n }\n\n &.ant-tooltip-placement-topRight .ant-tooltip-arrow,\n &.ant-tooltip-placement-topLeft .ant-tooltip-arrow,\n &.ant-tooltip-placement-top .ant-tooltip-arrow {\n bottom: -3px;\n }\n &.ant-tooltip-placement-bottomRight .ant-tooltip-arrow,\n &.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow,\n &.ant-tooltip-placement-bottom .ant-tooltip-arrow {\n top: -3px;\n }\n &.ant-tooltip-placement-rightBottom .ant-tooltip-arrow,\n &.ant-tooltip-placement-rightTop .ant-tooltip-arrow,\n &.ant-tooltip-placement-right .ant-tooltip-arrow {\n left: -3px;\n }\n &.ant-tooltip-placement-leftBottom .ant-tooltip-arrow,\n &.ant-tooltip-placement-leftTop .ant-tooltip-arrow,\n &.ant-tooltip-placement-left .ant-tooltip-arrow {\n right: -3px;\n }\n"])), fontStyles_1.MAIN_FONT, TypographyStyles_1.FONT_SIZE.P1, TypographyStyles_1.FONT_WEIGHT.REGULAR, theme_1.straitsXTheme.text.white, theme_1.straitsXTheme.brand.primary.contrast, breakPoints_1.DESKTOP_BREAKPOINT, theme_1.straitsXTheme.brand.primary.contrast);
|
|
39
|
+
var Container = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n line-height: 22px;\n"], ["\n line-height: 22px;\n"])));
|
|
37
40
|
var FooterContainer = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-top: 20px;\n display: flex;\n justify-content: flex-end;\n\n a {\n margin-left: 20px;\n }\n"], ["\n margin-top: 20px;\n display: flex;\n justify-content: flex-end;\n\n a {\n margin-left: 20px;\n }\n"])));
|
|
38
41
|
function default_1(_a) {
|
|
39
|
-
var children = _a.children, _b = _a.placement, placement = _b === void 0 ? 'bottomRight' : _b, _c = _a.overlayClassName, overlayClassName = _c === void 0 ? defaultOverlayStyle : _c, color = _a.color, title = _a.title, footer = _a.footer,
|
|
40
|
-
return (react_1.default.createElement(tooltip_1.default, __assign({ overlayClassName: overlayClassName, arrowPointAtCenter:
|
|
42
|
+
var children = _a.children, _b = _a.placement, placement = _b === void 0 ? 'bottomRight' : _b, _c = _a.overlayClassName, overlayClassName = _c === void 0 ? defaultOverlayStyle : _c, _d = _a.arrowPointAtCenter, arrowPointAtCenter = _d === void 0 ? true : _d, color = _a.color, title = _a.title, footer = _a.footer, _e = _a.mouseEnterDelay, mouseEnterDelay = _e === void 0 ? 0 : _e, _f = _a.mouseLeaveDelay, mouseLeaveDelay = _f === void 0 ? 0 : _f, rest = __rest(_a, ["children", "placement", "overlayClassName", "arrowPointAtCenter", "color", "title", "footer", "mouseEnterDelay", "mouseLeaveDelay"]);
|
|
43
|
+
return (react_1.default.createElement(tooltip_1.default, __assign({ overlayClassName: overlayClassName, arrowPointAtCenter: arrowPointAtCenter, color: color, placement: placement, title: react_1.default.createElement(Container, null,
|
|
41
44
|
title,
|
|
42
45
|
footer && react_1.default.createElement(FooterContainer, null, footer)), mouseEnterDelay: mouseEnterDelay, mouseLeaveDelay: mouseLeaveDelay }, rest), children));
|
|
43
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyB;AACzB,2CAAqC;AACrC,qCAAkC;AAElC,0CAAoC;AACpC,mCAA6B;AAC7B,yDAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tooltip/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyB;AACzB,2CAAqC;AACrC,qCAAkC;AAElC,0CAAoC;AACpC,mCAA6B;AAC7B,yDAA8D;AAC9D,uDAAoD;AACpD,gEAAoE;AACpE,yCAA+C;AA+B/C,IAAM,mBAAmB,GAAG,aAAG,mzCAAA,wCAEd,EAAS,kBACX,EAAY,oBACV,EAAmB,cACzB,EAAwB,8IAOX,EAAoC,cAGxD,EAAkB,6JASI,EAAoC,60BA2B7D,KAjDgB,sBAAS,EACX,4BAAS,CAAC,EAAE,EACV,8BAAW,CAAC,OAAO,EACzB,qBAAa,CAAC,IAAI,CAAC,KAAK,EAOX,qBAAa,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAGxD,gCAAkB,EASI,qBAAa,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CA2B7D,CAAA;AAED,IAAM,SAAS,GAAG,gBAAM,CAAC,GAAG,6FAAA,0BAE3B,IAAA,CAAA;AAED,IAAM,eAAe,GAAG,gBAAM,CAAC,GAAG,kLAAA,+GAQjC,IAAA,CAAA;AAED,mBAAwB,EAWhB;IAVN,IAAA,QAAQ,cAAA,EACR,iBAAyB,EAAzB,SAAS,mBAAG,aAAa,KAAA,EACzB,wBAAsC,EAAtC,gBAAgB,mBAAG,mBAAmB,KAAA,EACtC,0BAAyB,EAAzB,kBAAkB,mBAAG,IAAI,KAAA,EACzB,KAAK,WAAA,EACL,KAAK,WAAA,EACL,MAAM,YAAA,EACN,uBAAmB,EAAnB,eAAe,mBAAG,CAAC,KAAA,EACnB,uBAAmB,EAAnB,eAAe,mBAAG,CAAC,KAAA,EAChB,IAAI,cAVe,qIAWvB,CADQ;IAEP,OAAO,CACL,8BAAC,iBAAO,aACN,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EACH,8BAAC,SAAS;YACP,KAAK;YACL,MAAM,IAAI,8BAAC,eAAe,QAAE,MAAM,CAAmB,CAC5C,EAEd,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,eAAe,IAC5B,IAAI,GAEP,QAAQ,CACD,CACX,CAAA;AACH,CAAC;AA/BD,4BA+BC"}
|
|
@@ -10,7 +10,9 @@ declare type Props = {
|
|
|
10
10
|
overlayClassName?: string;
|
|
11
11
|
mouseEnterDelay?: number;
|
|
12
12
|
mouseLeaveDelay?: number;
|
|
13
|
+
arrowPointAtCenter?: boolean;
|
|
13
14
|
color?: string;
|
|
15
|
+
overlayStyle?: object;
|
|
14
16
|
};
|
|
15
|
-
export default function ({ children, placement, overlayClassName, color, title, footer, mouseEnterDelay, mouseLeaveDelay, ...rest }: Props): JSX.Element;
|
|
17
|
+
export default function ({ children, placement, overlayClassName, arrowPointAtCenter, color, title, footer, mouseEnterDelay, mouseLeaveDelay, ...rest }: Props): JSX.Element;
|
|
16
18
|
export {};
|