labsense-ui-kit 1.2.57 → 1.2.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/Badge.d.ts +6 -0
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -6
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ interface BadgeProps {
|
|
|
14
14
|
weight?: string;
|
|
15
15
|
onClick?: (e: React.MouseEvent<HTMLDivElement | HTMLButtonElement | SVGElement>) => void;
|
|
16
16
|
};
|
|
17
|
+
image?: {
|
|
18
|
+
src: string;
|
|
19
|
+
img_alt: string;
|
|
20
|
+
width: string;
|
|
21
|
+
height: string;
|
|
22
|
+
};
|
|
17
23
|
tooltipText?: string;
|
|
18
24
|
tooltipCSS?: {
|
|
19
25
|
background?: string;
|
package/dist/index.js
CHANGED
|
@@ -5858,6 +5858,7 @@ var Badge = function Badge(_ref8) {
|
|
|
5858
5858
|
size: 10,
|
|
5859
5859
|
weight: '0.1px'
|
|
5860
5860
|
} : _ref8$icon,
|
|
5861
|
+
image = _ref8.image,
|
|
5861
5862
|
tooltipText = _ref8.tooltipText,
|
|
5862
5863
|
tooltipCSS = _ref8.tooltipCSS;
|
|
5863
5864
|
var themeColors = useTheme();
|
|
@@ -5926,15 +5927,21 @@ var Badge = function Badge(_ref8) {
|
|
|
5926
5927
|
"$justifyContent": 'center',
|
|
5927
5928
|
"$width": 'fit-content',
|
|
5928
5929
|
"$gap": '4px',
|
|
5929
|
-
"$position": 'relative'
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5930
|
+
"$position": 'relative',
|
|
5931
|
+
onMouseEnter: tooltipText && icon ? handleMouseEnter : undefined,
|
|
5932
|
+
onMouseLeave: tooltipText && icon ? handleMouseLeave : undefined
|
|
5933
|
+
}, tooltipText && icon && React__default.createElement(TooltipWrapper, null, image ? React__default.createElement("img", {
|
|
5934
|
+
src: image.src,
|
|
5935
|
+
alt: image.img_alt,
|
|
5936
|
+
width: image.width,
|
|
5937
|
+
height: image.height,
|
|
5938
|
+
draggable: false
|
|
5939
|
+
}) : React__default.createElement(Icon, {
|
|
5934
5940
|
icon: icon.icon,
|
|
5935
5941
|
size: icon.size,
|
|
5936
5942
|
weight: icon.weight,
|
|
5937
|
-
color: icon.color || themeColors.vms.text.medium
|
|
5943
|
+
color: icon.color || themeColors.vms.text.medium,
|
|
5944
|
+
cursor: 'pointer'
|
|
5938
5945
|
}), React__default.createElement(TooltipText, {
|
|
5939
5946
|
"$bgColor": tooltipCSS === null || tooltipCSS === void 0 ? void 0 : tooltipCSS.background,
|
|
5940
5947
|
"$visible": showTooltip,
|