labsense-ui-kit 1.1.57 → 1.1.59
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/Badge/IconTooltip.d.ts +2 -3
- package/dist/index.js +33 -28
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +33 -28
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,13 +6,12 @@ interface ITooltipProps {
|
|
|
6
6
|
infoText: React.ReactNode;
|
|
7
7
|
tooltipCSS?: {
|
|
8
8
|
background?: string;
|
|
9
|
-
color?: string;
|
|
10
9
|
gap?: string;
|
|
11
10
|
minWidth?: string;
|
|
11
|
+
maxWidth?: string;
|
|
12
12
|
position?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
13
13
|
tooltipTop?: string;
|
|
14
|
-
|
|
15
|
-
fontWeight?: string;
|
|
14
|
+
border?: string;
|
|
16
15
|
};
|
|
17
16
|
}
|
|
18
17
|
declare const IconTooltip: React.FC<ITooltipProps>;
|
package/dist/index.js
CHANGED
|
@@ -3609,27 +3609,33 @@ var Badge = function Badge(_ref4) {
|
|
|
3609
3609
|
};
|
|
3610
3610
|
|
|
3611
3611
|
var _templateObject$3, _templateObject2$3, _templateObject3$1, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
3612
|
-
var TooltipContainer = styled__default.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n position: absolute;\n z-index: 10;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.3s;\n border-radius: 4px;\n padding: 6px 8px;\n min-width: ", ";\n background-color: ", ";\n gap: ", ";\n\n ", "\n\n &::after {\n content: '';\n position: absolute;\n width: 16px;\n height: 8px;\n background-color: ", ";\n clip-path: polygon(50% 0%, 0% 100%, 100% 100%);\n\n ", "\n }\n"])), function (_ref) {
|
|
3613
|
-
var $
|
|
3614
|
-
return $
|
|
3612
|
+
var TooltipContainer = styled__default.div(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n position: absolute;\n z-index: 10;\n align-items: center;\n justify-content: center;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.3s;\n border-radius: 4px;\n padding: 6px 8px;\n border: ", ";\n min-width: ", ";\n min-width: ", ";\n background-color: ", ";\n gap: ", ";\n\n ", "\n\n &::after {\n content: '';\n position: absolute;\n width: 16px;\n height: 8px;\n background-color: ", ";\n clip-path: polygon(50% 0%, 0% 100%, 100% 100%);\n\n ", "\n }\n"])), function (_ref) {
|
|
3613
|
+
var $border = _ref.$border;
|
|
3614
|
+
return $border;
|
|
3615
3615
|
}, function (_ref2) {
|
|
3616
|
-
var $
|
|
3617
|
-
return $
|
|
3616
|
+
var $minWidth = _ref2.$minWidth;
|
|
3617
|
+
return $minWidth != null ? $minWidth : 'auto';
|
|
3618
3618
|
}, function (_ref3) {
|
|
3619
|
-
var $
|
|
3620
|
-
return $
|
|
3619
|
+
var $maxWidth = _ref3.$maxWidth;
|
|
3620
|
+
return $maxWidth != null ? $maxWidth : 'auto';
|
|
3621
3621
|
}, function (_ref4) {
|
|
3622
|
-
var $
|
|
3623
|
-
|
|
3624
|
-
|
|
3622
|
+
var $background = _ref4.$background;
|
|
3623
|
+
return $background != null ? $background : colorVariables.accent.light_1;
|
|
3624
|
+
}, function (_ref5) {
|
|
3625
|
+
var $gap = _ref5.$gap;
|
|
3626
|
+
return $gap != null ? $gap : '16px';
|
|
3627
|
+
}, function (_ref6) {
|
|
3628
|
+
var $tooltipPosition = _ref6.$tooltipPosition,
|
|
3629
|
+
$iconSize = _ref6.$iconSize,
|
|
3630
|
+
$tooltipTop = _ref6.$tooltipTop;
|
|
3625
3631
|
var vertical = $tooltipPosition.startsWith('top') ? "bottom: " + ($tooltipTop != null ? $tooltipTop : "calc(50% + " + ($iconSize + 2) + "px)") + ";" : "top: " + ($tooltipTop != null ? $tooltipTop : "calc(50% + " + ($iconSize + 2) + "px)") + ";";
|
|
3626
3632
|
var horizontal = $tooltipPosition.endsWith('Left') ? styled.css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["left: calc(100% + 10px); transform: translateX(-99%);"]))) : $tooltipPosition.endsWith('Center') ? styled.css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteralLoose(["left: 50%; transform: translateX(-50%);"]))) : styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["right: calc(100% + 10px); transform: translateX(99%);"])));
|
|
3627
3633
|
return styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["", " ", ";"])), vertical, horizontal);
|
|
3628
|
-
}, function (
|
|
3629
|
-
var $background =
|
|
3634
|
+
}, function (_ref7) {
|
|
3635
|
+
var $background = _ref7.$background;
|
|
3630
3636
|
return $background != null ? $background : colorVariables.accent.light_1;
|
|
3631
|
-
}, function (
|
|
3632
|
-
var $tooltipPosition =
|
|
3637
|
+
}, function (_ref8) {
|
|
3638
|
+
var $tooltipPosition = _ref8.$tooltipPosition;
|
|
3633
3639
|
if ($tooltipPosition.startsWith('top')) {
|
|
3634
3640
|
return $tooltipPosition.endsWith('Left') ? styled.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["top: 100%; right: 10px; transform: rotate(180deg);"]))) : $tooltipPosition.endsWith('Right') ? styled.css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["top: 100%; left: 10px; transform: rotate(180deg);"]))) : styled.css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["top: 100%; left: 50%; transform: translateX(-50%) rotate(180deg);"])));
|
|
3635
3641
|
} else {
|
|
@@ -3637,37 +3643,36 @@ var TooltipContainer = styled__default.div(_templateObject$3 || (_templateObject
|
|
|
3637
3643
|
}
|
|
3638
3644
|
});
|
|
3639
3645
|
var TooltipWrapper$1 = styled__default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n display: flex;\n position: relative;\n align-items: center;\n cursor: pointer;\n\n &:hover ", " {\n visibility: visible;\n opacity: 1;\n }\n"])), TooltipContainer);
|
|
3640
|
-
var IconTooltip = function IconTooltip(
|
|
3646
|
+
var IconTooltip = function IconTooltip(_ref9) {
|
|
3641
3647
|
var _tooltipCSS$position;
|
|
3642
|
-
var
|
|
3643
|
-
icon =
|
|
3648
|
+
var _ref9$icon = _ref9.icon,
|
|
3649
|
+
icon = _ref9$icon === void 0 ? {
|
|
3644
3650
|
icon: 'Information',
|
|
3645
3651
|
size: 12,
|
|
3646
3652
|
weight: '0px',
|
|
3647
3653
|
color: colorVariables.text.medium
|
|
3648
|
-
} :
|
|
3649
|
-
infoIcon =
|
|
3650
|
-
infoText =
|
|
3651
|
-
|
|
3652
|
-
tooltipCSS =
|
|
3654
|
+
} : _ref9$icon,
|
|
3655
|
+
infoIcon = _ref9.infoIcon,
|
|
3656
|
+
infoText = _ref9.infoText,
|
|
3657
|
+
_ref9$tooltipCSS = _ref9.tooltipCSS,
|
|
3658
|
+
tooltipCSS = _ref9$tooltipCSS === void 0 ? {
|
|
3653
3659
|
background: colorVariables.accent.light_1,
|
|
3654
|
-
color: colorVariables.text.dark,
|
|
3655
3660
|
gap: '4px',
|
|
3656
3661
|
minWidth: 'max-content',
|
|
3657
3662
|
position: 'bottomCenter',
|
|
3658
|
-
tooltipTop: undefined
|
|
3659
|
-
|
|
3660
|
-
fontWeight: '400'
|
|
3661
|
-
} : _ref7$tooltipCSS;
|
|
3663
|
+
tooltipTop: undefined
|
|
3664
|
+
} : _ref9$tooltipCSS;
|
|
3662
3665
|
return React__default.createElement(TooltipWrapper$1, null, React__default.createElement(Icon, Object.assign({}, icon, {
|
|
3663
3666
|
onClick: function onClick() {}
|
|
3664
3667
|
})), React__default.createElement(TooltipContainer, {
|
|
3665
3668
|
"$tooltipPosition": (_tooltipCSS$position = tooltipCSS.position) != null ? _tooltipCSS$position : 'bottomCenter',
|
|
3666
3669
|
"$minWidth": tooltipCSS.minWidth,
|
|
3670
|
+
"$maxWidth": tooltipCSS.maxWidth,
|
|
3667
3671
|
"$tooltipTop": tooltipCSS.tooltipTop,
|
|
3668
3672
|
"$background": tooltipCSS.background,
|
|
3669
3673
|
"$gap": tooltipCSS.gap,
|
|
3670
|
-
"$iconSize": icon.size || 17
|
|
3674
|
+
"$iconSize": icon.size || 17,
|
|
3675
|
+
"$border": tooltipCSS.border
|
|
3671
3676
|
}, infoIcon && React__default.createElement(Icon, Object.assign({}, infoIcon)), infoText));
|
|
3672
3677
|
};
|
|
3673
3678
|
|