@bytebrand/fe-ui-core 4.8.12 → 4.8.14

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.12",
3
+ "version": "4.8.14",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -21,6 +21,7 @@ export interface IVehicleModalProps {
21
21
  variant?: 'filled' | 'outlined' | 'standard';
22
22
  label?: string;
23
23
  placeholder?: string;
24
+ maxLength?: number;
24
25
  onChange: (value: string, name?: string, event?: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
25
26
  }
26
27
 
@@ -40,7 +41,8 @@ const MaterialField: React.FC<IVehicleModalProps> = ({
40
41
  value,
41
42
  multiline,
42
43
  rows,
43
- placeholder
44
+ placeholder,
45
+ maxLength
44
46
  }: IVehicleModalProps) => {
45
47
  const [showPassword, setShowPassword] = React.useState(false);
46
48
  const [enteredValue, setEnteredValue] = useState(value);
@@ -88,6 +90,7 @@ const MaterialField: React.FC<IVehicleModalProps> = ({
88
90
  className={className}
89
91
  multiline={multiline}
90
92
  variant={variant}
93
+ inputProps={maxLength ? { maxLength } : {}}
91
94
  rows={rows}
92
95
  placeholder={placeholder}
93
96
  InputProps={{
@@ -1579,7 +1579,7 @@ const getDecoratedProps = (
1579
1579
 
1580
1580
  const { getCo2Price } = financingUtils;
1581
1581
  const { co2PriceLow } = getCo2Price(wltpCo2);
1582
- return Number.isFinite(co2PriceLow) ? ('vehicleProps:value.wltpCo2PriceSpec') : '';
1582
+ return Number.isFinite(co2PriceLow) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1583
1583
  }
1584
1584
  },
1585
1585
  wltpCo2CostsMiddle: {
@@ -1601,7 +1601,7 @@ const getDecoratedProps = (
1601
1601
 
1602
1602
  const { getCo2Price } = financingUtils;
1603
1603
  const { co2PriceMedium } = getCo2Price(wltpCo2);
1604
- return Number.isFinite(co2PriceMedium) ? ('vehicleProps:value.wltpCo2PriceSpec') : '';
1604
+ return Number.isFinite(co2PriceMedium) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1605
1605
  }
1606
1606
  },
1607
1607
  wltpCo2CostsHigh: {
@@ -1623,7 +1623,7 @@ const getDecoratedProps = (
1623
1623
 
1624
1624
  const { getCo2Price } = financingUtils;
1625
1625
  const { co2PriceHigh } = getCo2Price(wltpCo2);
1626
- return Number.isFinite(co2PriceHigh) ? ('vehicleProps:value.wltpCo2PriceSpec') : '';
1626
+ return Number.isFinite(co2PriceHigh) ? t('vehicleProps:value.wltpCo2PriceSpec') : '';
1627
1627
  }
1628
1628
  },
1629
1629
  powerPrice: {