@bytebrand/fe-ui-core 4.8.50 → 4.8.51

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.8.50",
3
+ "version": "4.8.51",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -104,7 +104,6 @@
104
104
  "@types/react": "^16.8.3"
105
105
  },
106
106
  "scripts": {
107
- "prepare": "husky",
108
107
  "storybook": "start-storybook -p 6006",
109
108
  "clean": "rm -rf ./dist/*.*",
110
109
  "build:lib": "yarn clean && webpack --config ./webpack.config.js --progress",
@@ -21,7 +21,7 @@ export interface ICheckboxProps {
21
21
  checkboxClassName?: string;
22
22
  labelClassName?: string;
23
23
  labelPlacement?: 'end' | 'start' | 'top' | 'bottom';
24
- tooltipDescription?: string;
24
+ tooltipDescription?: React.ReactNode;
25
25
  checkboxPriceValue: any;
26
26
  tooltipPosX?: string;
27
27
  error?: boolean;
@@ -111,6 +111,30 @@
111
111
  max-height: inherit;
112
112
  width: inherit !important
113
113
 
114
+ :global
115
+ .MuiTooltip-tooltip
116
+ max-width: 360px !important
117
+ font-size: 11px
118
+ line-height: 1.45
119
+ color: #4C4E64AD
120
+ text-align: left
121
+
122
+ b
123
+ display: block
124
+ margin-bottom: 6px
125
+ font-size: 12px
126
+ color: #1a1a1a
127
+
128
+ p
129
+ margin: 0 0 6px
130
+
131
+ ul
132
+ margin: 4px 0 0
133
+ padding-left: 16px
134
+
135
+ li
136
+ margin-bottom: 3px
137
+
114
138
  .checkboxPrice
115
139
  align-self: center;
116
140
  color: rgba(#000000, .63);
@@ -16,7 +16,7 @@ const OfferCheckboxGroup: FC<IOfferPeriod> = ({ additionalService, transferInsta
16
16
  return (
17
17
  <div className={offerGroupClass}>
18
18
  {isAboAccordionExpanded0 && <CheckboxContainer {...additionalService } />}
19
- <CheckboxContainer {...{ ...transferInstallments, isAboAccordionExpanded0 }} />
19
+ {priceTabIndex === 2 && <CheckboxContainer {...{ ...transferInstallments, isAboAccordionExpanded0 }} />}
20
20
  </div>
21
21
  );
22
22
  };
@@ -71,7 +71,7 @@ const OfferPanel: FC<IFinancingPanel> = ({
71
71
 
72
72
  {priceTabIndex === THREE
73
73
  ? <div className={styles.aboAccordionWrapper}><AboAccordion /></div>
74
- : <div className={styles.offerCheckboxGroup}><OfferCheckboxGroup {...{ transferInstallments, additionalService }} /></div>}
74
+ : <div className={styles.offerCheckboxGroup}><OfferCheckboxGroup {...{ transferInstallments, additionalService, priceTabIndex }} /></div>}
75
75
  </>
76
76
  }
77
77
  </form>
@@ -1,48 +1,48 @@
1
- import * as React from 'react';
2
- import FormattedNumber from '../../FormattedNumber/FormattedNumber';
3
- import Badge from '../../_common/Badge/Badge';
4
-
5
- import styles from './PriceData.styl';
6
-
7
- interface IProps {
8
- t: (phrase: string, config?: any) => string;
9
- showNewLabel: boolean;
10
- historyPriceDifference: number;
11
- historyPriceDifferencePerCent: number;
12
- financingConfig?: any;
13
- activeTab?: number;
14
- showDownPayment: boolean;
15
- financingFirstInstallment?: number | null;
16
- leasingFirstInstallment?: number | null;
17
- }
18
-
19
- const MIN_PERCENT = 5;
20
- const MIN_PRICE_DIFFERENCE = 500;
21
- const EUR = `€`;
22
-
23
- const PriceData: React.FunctionComponent<IProps> = ({ t, showDownPayment, showNewLabel, historyPriceDifference, historyPriceDifferencePerCent, activeTab, financingFirstInstallment, leasingFirstInstallment }) => {
24
- const showDownPaymentBadge = showDownPayment && (
25
- (activeTab === 0 && financingFirstInstallment === 0) ||
26
- (activeTab === 1 && leasingFirstInstallment === 0)
27
- );
28
- return (
29
- <div className={styles.topWrapper}>
30
- {showNewLabel && <Badge type='blue' className={styles.new}>{t('slider.new')}</Badge>}
31
- {!!historyPriceDifference && historyPriceDifference >= MIN_PRICE_DIFFERENCE && (
32
- <Badge type='green' className={styles.priceDifference}>
33
- <FormattedNumber value={historyPriceDifference} numbersAfterDot={0}/>
34
- {` ${EUR} ${t('slider.save')}`}
35
- </Badge>
36
- )}
37
- {showDownPaymentBadge &&
38
- <Badge type='lightBlue' className={styles.percentageOfFirstInstallment}>{`0${EUR} ${t('slider.firstInstallment')}`}</Badge>}
39
- {historyPriceDifferencePerCent >= MIN_PERCENT && (
40
- <Badge type='red' className={styles.priceDifferencePerCent}>
41
- -{historyPriceDifferencePerCent}%
42
- </Badge>
43
- )}
44
- </div>
45
- );
46
- };
47
-
48
- export default PriceData;
1
+ import * as React from 'react';
2
+ import FormattedNumber from '../../FormattedNumber/FormattedNumber';
3
+ import Badge from '../../_common/Badge/Badge';
4
+
5
+ import styles from './PriceData.styl';
6
+
7
+ interface IProps {
8
+ t: (phrase: string, config?: any) => string;
9
+ showNewLabel: boolean;
10
+ historyPriceDifference: number;
11
+ historyPriceDifferencePerCent: number;
12
+ financingConfig?: any;
13
+ activeTab?: number;
14
+ showDownPayment: boolean;
15
+ financingFirstInstallment?: number | null;
16
+ leasingFirstInstallment?: number | null;
17
+ }
18
+
19
+ const MIN_PERCENT = 5;
20
+ const MIN_PRICE_DIFFERENCE = 500;
21
+ const EUR = `€`;
22
+
23
+ const PriceData: React.FunctionComponent<IProps> = ({ t, showDownPayment, showNewLabel, historyPriceDifference, historyPriceDifferencePerCent, activeTab, financingFirstInstallment, leasingFirstInstallment }) => {
24
+ const showDownPaymentBadge = showDownPayment && (
25
+ (activeTab === 0 && financingFirstInstallment === 0) ||
26
+ (activeTab === 1 && leasingFirstInstallment === 0)
27
+ );
28
+ return (
29
+ <div className={styles.topWrapper}>
30
+ {showNewLabel && <Badge type='blue' className={styles.new}>{t('slider.new')}</Badge>}
31
+ {!!historyPriceDifference && historyPriceDifference >= MIN_PRICE_DIFFERENCE && (
32
+ <Badge type='green' className={styles.priceDifference}>
33
+ <FormattedNumber value={historyPriceDifference} numbersAfterDot={0}/>
34
+ {` ${EUR} ${t('slider.save')}`}
35
+ </Badge>
36
+ )}
37
+ {showDownPaymentBadge &&
38
+ <Badge type='lightBlue' className={styles.percentageOfFirstInstallment}>{`0${EUR} ${t('slider.firstInstallment')}`}</Badge>}
39
+ {historyPriceDifferencePerCent >= MIN_PERCENT && (
40
+ <Badge type='red' className={styles.priceDifferencePerCent}>
41
+ -{historyPriceDifferencePerCent}%
42
+ </Badge>
43
+ )}
44
+ </div>
45
+ );
46
+ };
47
+
48
+ export default PriceData;
@@ -7,7 +7,7 @@ import ClickAwayListener from '@mui/material/ClickAwayListener';
7
7
  import { debounce } from 'lodash';
8
8
 
9
9
  interface IMaterialTooltip {
10
- text: string;
10
+ text: React.ReactNode;
11
11
  icon?: string;
12
12
  className?: string;
13
13
  placement?: 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top';