@bytebrand/fe-ui-core 4.0.249 → 4.0.250

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.0.249",
3
+ "version": "4.0.250",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -13,7 +13,7 @@ export const Theme = createTheme({
13
13
  popupIndicator: {
14
14
  padding: 4,
15
15
  },
16
- root: {
16
+ root: ({ ownerState }) => ({
17
17
  ['&.Mui-focused + [data-popper-placement*="bottom"] .MuiOutlinedInput-root']: {
18
18
  borderTopRightRadius: 0,
19
19
  borderTopLeftRadius: 0
@@ -37,7 +37,10 @@ export const Theme = createTheme({
37
37
  borderBottomRightRadius: 0,
38
38
  borderLeft: '2px solid #1976d2',
39
39
  borderRight: '2px solid #1976d2',
40
- borderTop: '2px solid #1976d2'
40
+ borderTop: '2px solid #1976d2',
41
+ ...(ownerState.error && { // tslint:disable-line
42
+ borderColor: '#d32f2f'
43
+ })
41
44
  },
42
45
  ['&.Mui-focused + [data-popper-placement*="bottom"] > .MuiPaper-root']: {
43
46
  borderTopLeftRadius: 0,
@@ -45,6 +48,9 @@ export const Theme = createTheme({
45
48
  borderLeft: '2px solid #1976d2',
46
49
  borderRight: '2px solid #1976d2',
47
50
  borderBottom: '2px solid #1976d2',
51
+ ...(ownerState.error && { // tslint:disable-line
52
+ borderColor: '#d32f2f'
53
+ }),
48
54
  marginTop: '-3px'
49
55
  },
50
56
  ['& + .MuiAutocomplete-popper .MuiAutocomplete-listbox']: {
@@ -66,7 +72,7 @@ export const Theme = createTheme({
66
72
  ['& + .MuiAutocomplete-popper > .MuiPaper-root::-webkit-scrollbar-thumb:hover']: {
67
73
  backgroundColor: 'grey'
68
74
  }
69
- }
75
+ })
70
76
  }
71
77
  },
72
78
  MuiChip: {
@@ -90,6 +90,7 @@ const MaterialAutocomplete: React.FC<IMaterialAutocompleteProps> = ({
90
90
  multiple={multiple}
91
91
  handleHomeEndKeys
92
92
  value={value}
93
+ error={error}
93
94
  onChange={(e, newValue, reason: string, details?: { option: any }) => {
94
95
  if (typeof newValue === 'string') {
95
96
  onChange(newValue);
@@ -478,7 +478,7 @@ export function getChipFilterValue (chip: any, t: (key: string, options?: object
478
478
  const rateValue = `${t('SearchPage:filtersChips.rateChip')} ${values[0].length ? values[0].join(' ') : t('SearchPage:filtersChips.any')}`;
479
479
  filterValue = `${rateValue}, ${values[1].join(', ')}`;
480
480
  break;
481
-
481
+
482
482
  default:
483
483
  filterValue = t(`cbd:${chipFilterValue}`);
484
484
  }