@bytebrand/fe-ui-core 4.1.214 → 4.1.215

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.1.214",
3
+ "version": "4.1.215",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -82,14 +82,6 @@
82
82
  pointer-events: none;
83
83
  .priceItemCategory
84
84
  color: $grey-9;
85
- [class*='MuiIconButton-root']
86
- svg
87
- circle
88
- // fill: $grey-9;
89
- stroke: $grey-9;
90
- path
91
- stroke: $grey-9;
92
- fill: $grey-9;
93
85
 
94
86
  .priceNewBlock
95
87
  background-color $grey-9;
@@ -169,4 +161,3 @@
169
161
  .tooltipWrapFavorites
170
162
  transform: translateY(0px);
171
163
  margin-left: 5px;
172
-
@@ -106,7 +106,8 @@ class VehiclePriceItem extends React.Component<IVehiclePriceItemProps> {
106
106
  text={tooltipDescription}
107
107
  // positionX={positionX}
108
108
  // positionY={positionY}
109
- icon='InfoTransparent'
109
+ icon='infoIcon'
110
+ disabled={isPriceDisable}
110
111
  />
111
112
  )}
112
113
  {isNewPriceCategory && (
@@ -1,7 +1,8 @@
1
1
  import { styled } from '@mui/system';
2
2
  import IconSVG from '../IconSVG/IconSVG';
3
3
 
4
- export const IconSvgWrapper = styled(IconSVG)({
4
+ export const IconSvgWrapper = styled(IconSVG)((props) => ({
5
+ fill: props.disabled ? '#4C4E6442' : '#4C4E648A',
5
6
  width: '12px',
6
7
  height: '12px'
7
- });
8
+ }));
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import IconButton from '@mui/material/IconButton';
3
3
  import Tooltip, { TooltipProps, tooltipClasses } from '@mui/material/Tooltip';
4
4
  import { styled } from '@mui/material/styles';
@@ -9,6 +9,7 @@ interface IMaterialTooltip {
9
9
  icon?: string;
10
10
  className?: string;
11
11
  placement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';
12
+ disabled?: Boolean;
12
13
  }
13
14
 
14
15
  const LightTooltip = styled(({ className, ...props }: TooltipProps) => (
@@ -18,18 +19,33 @@ const LightTooltip = styled(({ className, ...props }: TooltipProps) => (
18
19
  [`& .${tooltipClasses.tooltip}`]: {
19
20
  backgroundColor: theme.palette.common.white,
20
21
  color: 'rgba(60,60,60,0.87)',
21
- boxShadow: '0px 4px 10px 6px rgb(60 60 60 / 22%)',
22
22
  border: '1px solid rgb(60 60 60 / 22%)',
23
23
  fontSize: 11,
24
- borderRadius: 4
24
+ borderRadius: 6,
25
+ background: '#FFFFFF',
26
+ boxShadow: '0px 0px 1px -2px rgba(76, 78, 100, 0.2), 0px 0px 2px rgba(76, 78, 100, 0.14), 0px 0px 5px rgba(76, 78, 100, 0.12)'
25
27
  }
26
28
  }));
27
29
 
28
- const MaterialTooltip = ({ text, icon = 'InfoTransparent', placement, className }: IMaterialTooltip) => {
30
+ const MaterialTooltip = ({ text, placement, className, disabled }: IMaterialTooltip) => {
31
+ const [isOpen, setIsOpen] = useState(false);
32
+
33
+ const onHandleClick = (event: React.SyntheticEvent) => {
34
+ event.persist();
35
+ setIsOpen(!isOpen);
36
+ };
37
+
29
38
  return (
30
- <LightTooltip placement={placement} title={text} className={className}>
31
- <IconButton>
32
- <IconSvgWrapper name={icon} customDimensions />
39
+ <LightTooltip
40
+ open={isOpen}
41
+ onMouseOver={() => setIsOpen(true)}
42
+ onMouseLeave={() => setIsOpen(false)}
43
+ placement={placement}
44
+ title={text}
45
+ className={className}
46
+ >
47
+ <IconButton onTouchEnd={(e) => onHandleClick(e)}>
48
+ <IconSvgWrapper name={'infoIcon'} customDimensions disabled={disabled} />
33
49
  </IconButton>
34
50
  </LightTooltip>
35
51
  );