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
- return (react_1.default.createElement(styled_components_1.ThemeProvider, { theme: resolvedTheme },
59
- react_1.default.createElement(Tooltip_1.Tooltip, { content: tooltip, disabled: !tooltip },
60
- 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,
61
- // onMouseEnter={() => setShowTooltip(true)}
62
- // onMouseLeave={() => setShowTooltip(false)}
63
- isInteraction: typeof onClick === 'function' },
64
- 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 },
65
- react_1.default.createElement("path", { d: IconsPath_1.iconsPath[name], fill: color ??
66
- (isDisabled
67
- ? iconConfig.color.disabled
68
- : isError
69
- ? iconConfig.color.error
70
- : isActive
71
- ? iconConfig.color.active
72
- : iconConfig.color.default) }))))));
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.paddingY}px ${config.size.paddingX}px`};
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
- return (React.createElement(ThemeProvider, { theme: resolvedTheme },
23
- React.createElement(Tooltip, { content: tooltip, disabled: !tooltip },
24
- 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,
25
- // onMouseEnter={() => setShowTooltip(true)}
26
- // onMouseLeave={() => setShowTooltip(false)}
27
- isInteraction: typeof onClick === 'function' },
28
- React.createElement("svg", { width: resolvedSize.svg, height: resolvedSize.svg, viewBox: '0 0 24 24', preserveAspectRatio: "xMidYMid meet", x: "0", y: "0", name: name },
29
- React.createElement("path", { d: iconsPath[name], fill: color ??
30
- (isDisabled
31
- ? iconConfig.color.disabled
32
- : isError
33
- ? iconConfig.color.error
34
- : isActive
35
- ? iconConfig.color.active
36
- : iconConfig.color.default) }))))));
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.paddingY}px ${config.size.paddingX}px`};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "3.0.48",
3
+ "version": "3.0.50",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",