@bytebrand/fe-ui-core 4.2.25 → 4.2.27

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.2.25",
3
+ "version": "4.2.27",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -27,9 +27,9 @@ class Breadcrumbs extends React.PureComponent<IBreadcrumbsProps> {
27
27
  if (document.referrer) {
28
28
  window.history.back();
29
29
  } else {
30
- window.location.href = '/search'
30
+ window.location.href = '/search';
31
31
  }
32
- };
32
+ };
33
33
 
34
34
  renderList = (list: LinkItem[]) => {
35
35
  const { t = (phrase: string) => _get(breadcrumbsTranslate(), phrase.replace(':', '.'), phrase), page } = this.props;
@@ -21,51 +21,28 @@
21
21
  line-height: 24px;
22
22
 
23
23
  .priceDifference
24
- background: $lightGreen
25
24
  color: white
26
25
  padding: 0 15px
27
26
  float: left
28
27
  text-transform: uppercase
29
- border-radius: 4px
28
+ border-radius: 33px
29
+ font-weight: 700;
30
+ font-size: 20px;
31
+ line-height: 50px;
32
+ height: auto
30
33
 
31
34
  +media-tablet-landscape-down()
32
- padding: 0 5px
33
- border-radius: 2px
35
+ padding: 0 10px
36
+ border-radius: 16px
37
+ line-height: 24px
38
+ font-size: 13px
34
39
 
35
40
  .priceDifferencePerCent
36
- color: white
37
- padding: 0 15px
41
+ @extend .priceDifference
38
42
  float: right
39
43
  position: relative
40
44
  z-index: 1
41
45
 
42
- +media-tablet-landscape-down()
43
- padding: 0 3px
44
-
45
- .perCentIcon
46
- position: absolute
47
- top: 0
48
- right: 0
49
- width: 116px
50
- height: 50px
51
- z-index: -1
52
-
53
- +media-tablet-landscape-down()
54
- width: 72px
55
- height: 30px
56
- transform: scale(0.8);
57
- margin-top: -3px;
58
- margin-right: -8px;
59
-
60
46
  .new
61
- background: $primary
62
- color: white
63
- padding: 0 15px
64
- margin-right: 10px
65
- float: left
66
- text-transform: uppercase
67
- border-radius: 4px
68
-
69
- +media-tablet-landscape-down()
70
- padding: 0 5px
71
- border-radius: 2px
47
+ @extend .priceDifference
48
+ margin-right: 12px
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import FormattedNumber from '../../FormattedNumber/FormattedNumber';
3
-
4
- import IconSVG from '../../_common/IconSVG/IconSVG';
3
+ import Badge from '../../_common/Badge/Badge';
5
4
 
6
5
  import styles from './PriceData.styl';
7
6
 
@@ -19,18 +18,17 @@ const EUR = `\u20AC`;
19
18
  const PriceData: React.FunctionComponent<IProps> = ({ t, showNewLabel, historyPriceDifference, historyPriceDifferencePerCent }) => {
20
19
  return (
21
20
  <div className={styles.topWrapper}>
22
- {showNewLabel && <div className={styles.new}>{t('slider.new')}</div>}
21
+ {showNewLabel && <Badge type='blue' className={styles.new}>{t('slider.new')}</Badge>}
23
22
  {!!historyPriceDifference && historyPriceDifference >= MIN_PRICE_DIFFERENCE && (
24
- <div className={styles.priceDifference}>
23
+ <Badge type='green' className={styles.priceDifference}>
25
24
  <FormattedNumber value={historyPriceDifference} numbersAfterDot={0}/>
26
25
  {` ${EUR} ${t('slider.save')}`}
27
- </div>
26
+ </Badge>
28
27
  )}
29
28
  {historyPriceDifferencePerCent >= MIN_PERCENT && (
30
- <div className={styles.priceDifferencePerCent}>
31
- <IconSVG name='discountRibbon' className={styles.perCentIcon} customDimensions/>
29
+ <Badge type='red' className={styles.priceDifferencePerCent}>
32
30
  -{historyPriceDifferencePerCent}%
33
- </div>
31
+ </Badge>
34
32
  )}
35
33
  </div>
36
34
  );
@@ -1,7 +1,7 @@
1
1
  @import '../../../theme/mixins.styl';
2
2
 
3
3
  .titleSection
4
- color: $blue-10
4
+ // color: $blue-10
5
5
  text-transform uppercase
6
6
  position relative
7
7
  display flex
@@ -11,6 +11,8 @@
11
11
  +media-tablet-down()
12
12
  truncate()
13
13
  padding: 15px
14
+ display: flex
15
+ flex-direction: column
14
16
 
15
17
  .makeModel
16
18
  font-weight: bold
@@ -20,6 +22,10 @@
20
22
  .otherParam
21
23
  font-size: 12px;
22
24
  text-transform none
25
+ overflow: hidden;
26
+ display: inline-block;
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
23
29
 
24
30
  .userButton
25
31
  cursor: pointer
@@ -11,14 +11,14 @@ export const IconSvgWrapper = styled(IconSVG)(props => ({
11
11
  export const TooltipWrapper = styled('div')(props => ({
12
12
  // zIndex: props.zindex ? props.zindex : 9996,
13
13
  display: 'inline-block'
14
- }))
14
+ }));
15
15
 
16
16
  export const Theme = createTheme({
17
17
  components: {
18
18
  MuiTooltip: {
19
19
  styleOverrides: {
20
-
20
+
21
21
  }
22
22
  }
23
23
  }
24
- })
24
+ });
@@ -1,11 +1,10 @@
1
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
- import { styled } from '@mui/material/styles';
4
+ import { styled, ThemeProvider } from '@mui/material/styles';
5
5
  import { IconSvgWrapper, Theme, TooltipWrapper } from './MaterialTooltip.styled';
6
- import { ThemeProvider } from '@mui/material/styles';
7
6
  import ClickAwayListener from '@mui/material/ClickAwayListener';
8
- import { debounce } from 'lodash'
7
+ import { debounce } from 'lodash';
9
8
 
10
9
  interface IMaterialTooltip {
11
10
  text: string;
@@ -44,11 +43,14 @@ const MaterialTooltip = ({ text, placement, className, disabled, zindex }: IMate
44
43
 
45
44
  const onHandleMenuClose = () => {
46
45
  setIsOpen(false);
47
- }
46
+ };
48
47
 
49
- const onHandleMenuToggle = debounce((event: any) => {
50
- setIsOpen(() => !isOpen);
51
- }, 50)
48
+ const onHandleMenuToggle = debounce(
49
+ (event: any) => {
50
+ setIsOpen(() => !isOpen);
51
+ },
52
+ 50
53
+ );
52
54
 
53
55
  return (
54
56
  <ThemeProvider theme={Theme}>
@@ -69,7 +71,7 @@ const MaterialTooltip = ({ text, placement, className, disabled, zindex }: IMate
69
71
  className={className}
70
72
  zindex={zindex}
71
73
  PopperProps={{
72
- disablePortal: true,
74
+ disablePortal: true
73
75
  }}
74
76
  >
75
77
  <IconButton>
@@ -49,7 +49,7 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
49
49
  styles.controlButton,
50
50
  styles.offerButtonGet,
51
51
  { [styles.offerButtonSuccess]: isOfferRequested || !!Object.keys(checkoutData).length },
52
- { [styles.isAlternativeButton]: isAlternative || isSale || isAlternativeType}
52
+ { [styles.isAlternativeButton]: isAlternative || isSale || isAlternativeType }
53
53
  );
54
54
 
55
55
  const getRequestButtonTitle = () => {