@bytebrand/fe-ui-core 4.8.3 → 4.8.5

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.3",
3
+ "version": "4.8.5",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -203,4 +203,7 @@
203
203
  flex-shrink: 0;
204
204
 
205
205
  .longTitle
206
- max-width: 157px
206
+ max-width: 157px
207
+
208
+ .valueDescription
209
+ font-size: 11px
@@ -62,14 +62,14 @@ class AccordionWidget extends React.Component<IAccardionSectionProps, IAccardion
62
62
  <div className={styles.table}>
63
63
  <h3 className={styles.tableName}>{header}</h3>
64
64
  {propsList.map((prop, i) => {
65
- const { title, subTitle, value, isVisible = true, isLongTitle = false } = decoratedProps[prop];
65
+ const { title, subTitle, value, isVisible = true, isLongTitle = false, valueDescription = '' } = decoratedProps[prop];
66
66
  return isVisible && (
67
67
  <div key={i} className={title ? styles.tr : ''}>
68
68
  {title && <div className={classnames(styles.th, isLongTitle ? styles.longTitle : '')}>
69
69
  <span className={styles.title}>{title}</span>
70
70
  {subTitle ? <p className={styles.subTitle}>{subTitle}</p> : null}
71
71
  </div>}
72
- <div className={styles.td}>{value}</div>
72
+ <div className={styles.td}>{value} {valueDescription ? <span className={styles.valueDescription}>{valueDescription}</span> : ''}</div>
73
73
  </div>
74
74
  );
75
75
  })}
@@ -11,6 +11,7 @@ export interface IDecoratedProp {
11
11
  subTitle?: string;
12
12
  isVisible?: boolean;
13
13
  isLongTitle?: boolean;
14
+ valueDescription?: string;
14
15
  readonly value?: (string | JSX.Element);
15
16
  }
16
17
 
@@ -1568,7 +1568,8 @@ const getDecoratedProps = (
1568
1568
  return Number.isFinite(co2PriceLow)
1569
1569
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceLow, '$,.2f') })
1570
1570
  : t('vehicleProps:value.na');
1571
- }
1571
+ },
1572
+ valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1572
1573
  },
1573
1574
  wltpCo2CostsMiddle: {
1574
1575
  get title() {
@@ -1583,7 +1584,8 @@ const getDecoratedProps = (
1583
1584
  return Number.isFinite(co2PriceMedium)
1584
1585
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceMedium, '$,.2f') })
1585
1586
  : t('vehicleProps:value.na');
1586
- }
1587
+ },
1588
+ valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1587
1589
  },
1588
1590
  wltpCo2CostsHigh: {
1589
1591
  get title() {
@@ -1598,7 +1600,8 @@ const getDecoratedProps = (
1598
1600
  return Number.isFinite(co2PriceHigh)
1599
1601
  ? t('vehicleProps:value.wltpCo2Price', { price: getFormattedPrice(co2PriceHigh, '$,.2f') })
1600
1602
  : t('vehicleProps:value.na');
1601
- }
1603
+ },
1604
+ valueDescription: t('vehicleProps:value.wltpCo2PriceSpec')
1602
1605
  },
1603
1606
  powerPrice: {
1604
1607
  title: t('vehicleProps:title.powerPrice'),
@@ -1624,7 +1627,7 @@ const getDecoratedProps = (
1624
1627
 
1625
1628
  const { getBaseFuelPrice } = financingUtils;
1626
1629
 
1627
- const baseFuelPrice = getBaseFuelPrice(fuel, hybridPlugin);
1630
+ const baseFuelPrice = getBaseFuelPrice(fuel, hybridPlugin).fuelPrice;
1628
1631
 
1629
1632
  const fuelPrice = car.costModel.fuelPrice ? car.costModel.fuelPrice : baseFuelPrice;
1630
1633
  return Number.isFinite(fuelPrice)