venice-ui 3.0.48 → 3.0.50
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.
|
@@ -55,20 +55,22 @@ const Icon = ({ name = 'person', size = 'lg', isDisabled = false, isActive = fal
|
|
|
55
55
|
onClick(event);
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
|
|
59
|
-
react_1.default.createElement(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
react_1.default.createElement("
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
const IconElementComponent = () => {
|
|
59
|
+
return (react_1.default.createElement(Icon_styles_1.IconElement, { ref: iconRef, config: componentsConfig, onClick: handleClick, isDisabled: isDisabled, isError: isError, isActive: isActive, color: color, background: background, hoverColor: hoverColor, hoverBackground: hoverBackground, resolvedSize: resolvedSize,
|
|
60
|
+
// onMouseEnter={() => setShowTooltip(true)}
|
|
61
|
+
// onMouseLeave={() => setShowTooltip(false)}
|
|
62
|
+
isInteraction: typeof onClick === 'function' },
|
|
63
|
+
react_1.default.createElement("svg", { width: resolvedSize.svg, height: resolvedSize.svg, viewBox: '0 0 24 24', preserveAspectRatio: "xMidYMid meet", x: "0", y: "0", name: name },
|
|
64
|
+
react_1.default.createElement("path", { d: IconsPath_1.iconsPath[name], fill: color ??
|
|
65
|
+
(isDisabled
|
|
66
|
+
? iconConfig.color.disabled
|
|
67
|
+
: isError
|
|
68
|
+
? iconConfig.color.error
|
|
69
|
+
: isActive
|
|
70
|
+
? iconConfig.color.active
|
|
71
|
+
: iconConfig.color.default) }))));
|
|
72
|
+
};
|
|
73
|
+
return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme }, tooltip ? (react_1.default.createElement(Tooltip_1.Tooltip, { content: tooltip, disabled: !tooltip },
|
|
74
|
+
react_1.default.createElement(IconElementComponent, null))) : (react_1.default.createElement(IconElementComponent, null))));
|
|
73
75
|
};
|
|
74
76
|
exports.Icon = Icon;
|
|
@@ -14,7 +14,7 @@ exports.TooltipRoot = styled_components_1.default.div `
|
|
|
14
14
|
position: absolute;
|
|
15
15
|
z-index: ${({ config }) => config.size.zIndex};
|
|
16
16
|
background-color: ${({ config }) => config.color.background};
|
|
17
|
-
padding: ${({ config }) => `${config.size.
|
|
17
|
+
padding: ${({ config }) => `${config.size.paddingX}px ${config.size.paddingY}px`};
|
|
18
18
|
border-radius: ${({ config }) => `${config.size.radius}px`};
|
|
19
19
|
box-shadow: ${({ config }) => config.color.shadow};
|
|
20
20
|
color: ${({ config }) => config.color.text};
|
|
@@ -19,19 +19,21 @@ export const Icon = ({ name = 'person', size = 'lg', isDisabled = false, isActiv
|
|
|
19
19
|
onClick(event);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
React.createElement(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
React.createElement("
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
const IconElementComponent = () => {
|
|
23
|
+
return (React.createElement(IconElement, { ref: iconRef, config: componentsConfig, onClick: handleClick, isDisabled: isDisabled, isError: isError, isActive: isActive, color: color, background: background, hoverColor: hoverColor, hoverBackground: hoverBackground, resolvedSize: resolvedSize,
|
|
24
|
+
// onMouseEnter={() => setShowTooltip(true)}
|
|
25
|
+
// onMouseLeave={() => setShowTooltip(false)}
|
|
26
|
+
isInteraction: typeof onClick === 'function' },
|
|
27
|
+
React.createElement("svg", { width: resolvedSize.svg, height: resolvedSize.svg, viewBox: '0 0 24 24', preserveAspectRatio: "xMidYMid meet", x: "0", y: "0", name: name },
|
|
28
|
+
React.createElement("path", { d: iconsPath[name], fill: color ??
|
|
29
|
+
(isDisabled
|
|
30
|
+
? iconConfig.color.disabled
|
|
31
|
+
: isError
|
|
32
|
+
? iconConfig.color.error
|
|
33
|
+
: isActive
|
|
34
|
+
? iconConfig.color.active
|
|
35
|
+
: iconConfig.color.default) }))));
|
|
36
|
+
};
|
|
37
|
+
return (React.createElement(ThemeProvider, { theme: resolvedTheme }, tooltip ? (React.createElement(Tooltip, { content: tooltip, disabled: !tooltip },
|
|
38
|
+
React.createElement(IconElementComponent, null))) : (React.createElement(IconElementComponent, null))));
|
|
37
39
|
};
|
|
@@ -8,7 +8,7 @@ export const TooltipRoot = styled.div `
|
|
|
8
8
|
position: absolute;
|
|
9
9
|
z-index: ${({ config }) => config.size.zIndex};
|
|
10
10
|
background-color: ${({ config }) => config.color.background};
|
|
11
|
-
padding: ${({ config }) => `${config.size.
|
|
11
|
+
padding: ${({ config }) => `${config.size.paddingX}px ${config.size.paddingY}px`};
|
|
12
12
|
border-radius: ${({ config }) => `${config.size.radius}px`};
|
|
13
13
|
box-shadow: ${({ config }) => config.color.shadow};
|
|
14
14
|
color: ${({ config }) => config.color.text};
|