@bytebrand/fe-ui-core 4.2.251 → 4.3.1

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.
Files changed (125) hide show
  1. package/__tests__/utils/CommonUtils/getOfferSliders.test.ts +2 -4
  2. package/common.ts +2 -6
  3. package/package.json +2 -3
  4. package/source/components/AccordionWidget/AccordionWidget.tsx +3 -1
  5. package/source/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
  6. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.styl +190 -2
  7. package/source/components/Checkout/CheckoutStepper/CheckoutStepper.tsx +16 -15
  8. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.styl +2 -2
  9. package/source/components/Checkout/OrderOverviewItem/OrderOverviewItem.tsx +3 -3
  10. package/source/components/FormattedNumber/FormattedNumber.tsx +3 -2
  11. package/source/components/InfoBlocks/FirstInfoBlock/FirstInfoBlockItem/FirstInfoBlockItem.styl +6 -4
  12. package/source/components/OfferDetailedSection/partials/PanelConfig.tsx +3 -0
  13. package/source/components/OfferPanel/MuiOfferPeriod/{MuiOfferPeriod.theme.tsx → MuiOfferPeriod.theme.js} +13 -8
  14. package/source/components/OfferPanel/MuiOfferPeriod/MuiOfferPeriod.tsx +4 -28
  15. package/source/components/OfferPanel/OfferCheckboxGroup/CheckboxContainer.tsx +12 -6
  16. package/source/components/OfferPanel/OfferCheckboxGroup/OfferCheckboxGroup.tsx +1 -1
  17. package/source/components/OfferPanel/OfferPanel.tsx +1 -1
  18. package/source/components/OfferPanel/OfferPeriod/OfferPeriod.tsx +4 -0
  19. package/source/components/OfferPanel/RangeGroup/RangeGroup.tsx +4 -6
  20. package/source/components/PriceRatingDetailed/PriceRatingDetailed.tsx +2 -6
  21. package/source/components/SearchFilters/filters/AlternativeID.tsx +53 -42
  22. package/source/components/SearchFilters/filters/DriveType.tsx +1 -1
  23. package/source/components/SearchFilters/filters/EmissionSticker.tsx +1 -1
  24. package/source/components/SearchFilters/filters/FirstRegistration.tsx +1 -0
  25. package/source/components/SearchFilters/filters/InteriorColor.tsx +1 -1
  26. package/source/components/SearchFilters/filters/InteriorMaterial.tsx +1 -2
  27. package/source/components/SearchFilters/filters/Mileage.tsx +1 -1
  28. package/source/components/SearchFilters/filters/Power.tsx +17 -36
  29. package/source/components/SearchFilters/filters/StateOptions.tsx +1 -0
  30. package/source/components/SearchFilters/filters/Transmission.tsx +1 -1
  31. package/source/components/SearchPage/SearchChips/SearchChips.tsx +1 -1
  32. package/source/components/SearchPageMobile/FiltersDetailed/BodyType.tsx +3 -3
  33. package/source/components/SearchPageMobile/FiltersDetailed/Consumption.tsx +2 -2
  34. package/source/components/SearchPageMobile/FiltersDetailed/Doors.tsx +1 -1
  35. package/source/components/SearchPageMobile/FiltersDetailed/MakeModel.tsx +1 -1
  36. package/source/components/SearchWidget/ColorWidget/BodyColorWidget.tsx +3 -3
  37. package/source/components/SearchWidget/EnvironmentWidget/EnvironmentWidget.tsx +3 -3
  38. package/source/components/SearchWidget/HighlightsWidget/HighlightsWidget.tsx +2 -2
  39. package/source/components/SearchWidget/StateWidget/StateWidget.tsx +2 -1
  40. package/source/components/SearchWidgetsMobile/BasicDataWidgetMobile/BasicDataWidgetMobile.tsx +4 -4
  41. package/source/components/SearchWidgetsMobile/EquipmentsWidget/EquipmentsWidget.tsx +16 -16
  42. package/source/components/SearchWidgetsMobile/HighlightsWidgetMobile/HighlightsWidgetMobile.tsx +1 -1
  43. package/source/components/SearchWidgetsMobile/InteriorWidget/InteriorWidget.tsx +1 -1
  44. package/source/components/SearchWidgetsMobile/SafetyWidget/SafetyWidget.tsx +6 -6
  45. package/source/components/Stepper/Stepper.tsx +3 -4
  46. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.styl +2 -11
  47. package/source/components/UserDashboardPage/sections/OrderStatusSection/AdditionalOrderInfo.tsx +5 -5
  48. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCar.tsx +38 -57
  49. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusCard.tsx +2 -2
  50. package/source/components/UserDashboardPage/sections/OrderStatusSection/OrderStatusSection.tsx +101 -183
  51. package/source/components/UserDashboardPage/sections/RequestedCarsSection/RequestedCarsSection.tsx +7 -5
  52. package/source/components/Vehicle/VehicleFormattedPrice/VehicleFormattedPrice.tsx +7 -33
  53. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.styl +2 -10
  54. package/source/components/VehicleDetailedSidebar/VehicleDetailedSidebar.tsx +14 -54
  55. package/source/components/VehicleDetailedSidebar/partials/Price.styl +1 -5
  56. package/source/components/VehicleDetailedSidebar/partials/Price.tsx +1 -2
  57. package/source/components/VehicleDetailedSidebar/partials/PriceContent.styl +5 -16
  58. package/source/components/VehicleDetailedSidebar/partials/PriceContent.tsx +4 -9
  59. package/source/components/VehicleDetailedSidebar/partials/Properties.tsx +1 -1
  60. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.styl +0 -45
  61. package/source/components/VehicleDetailedSlider/VehicleDetailedSlider.tsx +42 -121
  62. package/source/components/VehicleDetailedSlider/partials/PriceData.styl +1 -4
  63. package/source/components/VehicleDetailedSlider/partials/PriceData.tsx +1 -8
  64. package/source/components/VehicleDetailedSlider/partials/Stats.tsx +2 -2
  65. package/source/components/VehicleSmallCard/VehicleData/VechiclePriceItem/VechiclePriceItem.tsx +7 -9
  66. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +1 -35
  67. package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +3 -9
  68. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.styl +2 -11
  69. package/source/components/VehicleSmallCard/VehicleData/VehicleTitle/VehicleTitle.tsx +1 -2
  70. package/source/components/VehicleSmallCard/VehicleSmallCard.styl +1 -3
  71. package/source/components/VehicleSmallCard/VehicleSmallCard.tsx +7 -3
  72. package/source/components/_common/Badge/Badge.styl +0 -3
  73. package/source/components/_common/Badge/Badge.tsx +1 -1
  74. package/source/components/_common/Button/Button.tsx +4 -5
  75. package/source/components/_common/Checkbox/FormCheckbox.tsx +4 -4
  76. package/source/components/_common/CheckboxMaterial/CheckboxMaterial.tsx +1 -1
  77. package/source/components/_common/Chip/Chip.tsx +3 -1
  78. package/source/components/_common/ExpansionPanel/ExpansionPanel.tsx +3 -3
  79. package/source/components/_common/IconSVG/IconSVGConfig.tsx +0 -2
  80. package/source/components/_common/IconSVG/SVG/flags/SK.tsx +1 -0
  81. package/source/components/_common/IconSVG/SVG/slider/360New.tsx +1 -1
  82. package/source/components/_common/MaterialAccordion/MaterialAccordion.tsx +30 -22
  83. package/source/components/_common/MaterialAutocomplete/MaterialAutocomplete.styled.tsx +8 -8
  84. package/source/components/_common/MaterialDatePicker/MaterialDatePicker.styled.tsx +1 -0
  85. package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +15 -12
  86. package/source/components/_common/MaterialSelect/MaterialSelect.tsx +3 -3
  87. package/source/components/_common/MaterialSwitch/MaterialSwitch.tsx +1 -3
  88. package/source/components/_common/MaterialTooltip/MaterialTooltip.styled.tsx +1 -1
  89. package/source/components/_common/MaterialTooltip/MaterialTooltip.tsx +3 -3
  90. package/source/components/_common/Modal/CookieModal.tsx +3 -1
  91. package/source/components/_common/Modal/Modal.styled.tsx +1 -2
  92. package/source/components/_common/Modal/Modal.tsx +5 -1
  93. package/source/components/_common/Modal/ModalsConfig.tsx +1 -5
  94. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.styl +7 -23
  95. package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +36 -84
  96. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.styl +14 -29
  97. package/source/components/_common/Modal/modals/PreviewCookieModal/PreviewCookieModal.tsx +10 -17
  98. package/source/components/_common/OfferRequestButtonWrapper/OfferRequestButtonWrapper.tsx +4 -12
  99. package/source/components/_common/Range/Range.tsx +16 -26
  100. package/source/components/_common/UserMenu/MaterialMenu.styled.tsx +1 -0
  101. package/source/components/_common/UserMenu/MaterialMenu.tsx +3 -3
  102. package/source/components/_common/UserMenu/MaterialMenuItem.tsx +20 -42
  103. package/source/components/_common/UserMenu/NestedMenu.tsx +1 -1
  104. package/source/components/_common/withStats/withStats.styl +0 -3
  105. package/source/components/_common/withStats/withStats.tsx +16 -19
  106. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.styl +1 -14
  107. package/source/components/containers/SearchPage/FiltersContainer/FiltersContainer.tsx +42 -78
  108. package/source/framework/constants/common.ts +60 -89
  109. package/source/framework/constants/highlights.ts +1 -1
  110. package/source/framework/constants.ts +1 -1
  111. package/source/framework/types/types.ts +4 -9
  112. package/source/framework/utils/CommonUtils.ts +62 -73
  113. package/source/framework/utils/DateUtils.ts +2 -10
  114. package/source/framework/vehiclesProps/decoratedLightProps.tsx +2 -1
  115. package/source/framework/vehiclesProps/decoratedProps.tsx +2 -1
  116. package/source/locales/data.ts +2 -2
  117. package/tslint.json +2 -1
  118. package/utils.ts +0 -2
  119. package/__tests__/components/UserDasboardPage/sections/CheckoutSection/CheckoutSection.test.tsx +0 -613
  120. package/__tests__/components/UserDasboardPage/sections/FavoriteSection/FavoriteSection.test.tsx +0 -335
  121. package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.styl +0 -38
  122. package/source/components/UserDashboardPage/sections/CheckoutSection/CheckoutSection.tsx +0 -120
  123. package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.styl +0 -22
  124. package/source/components/UserDashboardPage/sections/FavoriteSection/FavoriteSection.tsx +0 -84
  125. package/source/components/_common/IconSVG/SVG/slider/YoutubeButton.tsx +0 -26
@@ -3,7 +3,7 @@ import classnames from 'classnames';
3
3
 
4
4
  import styles from './Badge.styl';
5
5
 
6
- export type TBadgeType = 'white' | 'gray' | 'green' | 'blue' | 'red' | 'lightBlue';
6
+ export type TBadgeType = 'white' | 'gray' | 'green' | 'blue' | 'red';
7
7
 
8
8
  export interface IBadgeProps {
9
9
  children: any;
@@ -15,7 +15,6 @@ export interface IButtonProps {
15
15
  color?: variantColor;
16
16
  children?: any;
17
17
  variant?: variantType;
18
- getRef?: (ref: HTMLButtonElement) => void;
19
18
 
20
19
  disabled?: boolean;
21
20
  loading?: boolean;
@@ -26,7 +25,8 @@ export interface IButtonProps {
26
25
  onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement>) => void;
27
26
  }
28
27
 
29
- const Button: React.FC<IButtonProps> = ({ getRef, className, color, onClick, onMouseEnter, onMouseLeave, variant, loading, disabled, children }: IButtonProps) => {
28
+ const Button: React.FC<IButtonProps> = ({ className, color = 'primary', onClick, onMouseEnter, onMouseLeave, variant, loading, disabled, children }: IButtonProps) => {
29
+
30
30
  const onHandlerClick = (event: React.MouseEvent<HTMLButtonElement>) => {
31
31
  event.stopPropagation();
32
32
  event.nativeEvent.stopImmediatePropagation();
@@ -53,7 +53,6 @@ const Button: React.FC<IButtonProps> = ({ getRef, className, color, onClick, onM
53
53
  onClick: onHandlerClick,
54
54
  onMouseEnter: onHandlerMouseEnter,
55
55
  onMouseLeave: onHandlerMouseLeave,
56
- ref:getRef,
57
56
  disabled: disabled || loading
58
57
  };
59
58
 
@@ -64,14 +63,14 @@ const Button: React.FC<IButtonProps> = ({ getRef, className, color, onClick, onM
64
63
 
65
64
  Button.defaultProps = {
66
65
  className: '',
67
- color: 'primary',
66
+
68
67
  disabled: false,
69
68
  loading: false,
70
69
  variant: 'contained',
71
70
  buttonType: 'button',
72
71
 
73
72
  onClick: () => { },
74
- getRef: () => { },
73
+
75
74
  onMouseEnter: () => { },
76
75
  onMouseLeave: () => { }
77
76
  };
@@ -21,7 +21,7 @@ interface IFormCheckboxState {
21
21
  checked?: boolean;
22
22
  error?: boolean;
23
23
  disabled?: boolean
24
- };
24
+ }
25
25
  }
26
26
 
27
27
  class FormCheckbox extends React.Component<IFormCheckboxProps, IFormCheckboxState> {
@@ -68,11 +68,11 @@ class FormCheckbox extends React.Component<IFormCheckboxProps, IFormCheckboxStat
68
68
  checked,
69
69
  name,
70
70
  disabled,
71
+ onChange: this.handleChange,
72
+ error: customError,
71
73
  label,
72
74
  checkboxClassName,
73
- labelClassName,
74
- onChange: this.handleChange,
75
- error: customError
75
+ labelClassName
76
76
  };
77
77
 
78
78
  return (
@@ -26,7 +26,7 @@ export interface ICheckboxProps {
26
26
  checkedIcon?: any;
27
27
  className?: string;
28
28
  type?: string;
29
- content?: string | JSX.Element;
29
+ content?: string;
30
30
  radio?: boolean;
31
31
  formControlClassName?: string;
32
32
  contentType?: string;
@@ -7,12 +7,13 @@ export interface IChip {
7
7
  }
8
8
 
9
9
  export interface IChipProps {
10
+ className?: string;
10
11
  chip: IChip;
11
12
  onClick?: (event: React.MouseEvent, chip: IChip) => void;
12
13
  onDelete?: (event: React.MouseEvent, chip: IChip) => void;
13
14
  }
14
15
 
15
- const ChipLanding: React.FunctionComponent<IChipProps> = ({ chip, onClick, onDelete }) => {
16
+ const ChipLanding: React.FunctionComponent<IChipProps> = ({ chip, className, onClick, onDelete }) => {
16
17
  const { key, value } = chip;
17
18
  const onDeleteHandler = (event: any) => { event.stopPropagation(); onDelete(event, chip); };
18
19
  const onClickHandler = (event: any) => { event.stopPropagation(); onClick(event, chip); };
@@ -30,6 +31,7 @@ const ChipLanding: React.FunctionComponent<IChipProps> = ({ chip, onClick, onDel
30
31
  };
31
32
 
32
33
  ChipLanding.defaultProps = {
34
+ className: '',
33
35
  chip: { key: '', value: '' },
34
36
  onClick: () => {},
35
37
  onDelete: () => {}
@@ -8,10 +8,10 @@ import { ThemeProvider } from '@mui/material/styles';
8
8
  import { Theme } from './ExpansionPanel.styled';
9
9
 
10
10
  export interface IExpansionPanelProps {
11
- title?: string;
11
+ title?: string | JSX.Element;
12
12
  subTitle?: string;
13
13
  defaultExpanded?: boolean;
14
- onChange?: any; // TODO: understand how this onchange works and where it is used and write the correct types
14
+ onChange?: (panel: string) => (event: React.SyntheticEvent, isExpanded: boolean) => void;
15
15
  className?: string;
16
16
  children?: any;
17
17
  reactScrollName?: string; // property "name" for "Element" component of "react-scroll" library
@@ -71,7 +71,7 @@ class ExpansionPanel extends React.Component<IExpansionPanelProps> {
71
71
  <Accordion
72
72
  defaultExpanded={defaultExpanded}
73
73
  onChange={isCompare ? onChange : onChange && onChange(reactScrollName)}
74
- expanded={(isCompare && typeof expanded === 'boolean') ? expanded : expanded && (expanded === reactScrollName)}
74
+ expanded={isCompare ? expanded : expanded && (expanded === reactScrollName)}
75
75
  className={accordionClassName}
76
76
  >
77
77
  <AccordionSummary
@@ -236,7 +236,6 @@ import Easy from './SVG/slider/Easy';
236
236
  import Safe from './SVG/slider/Safe';
237
237
  import ZoomIn from './SVG/slider/ZoomIn';
238
238
  import ZoomOut from './SVG/slider/ZoomOut';
239
- import YoutubeButton from './SVG/slider/YoutubeButton'
240
239
 
241
240
  // social
242
241
  import SharingInterface from './SVG/social/SharingInterface';
@@ -548,7 +547,6 @@ const components: IComponentsProp = {
548
547
  safe: Safe,
549
548
  zoomIn: ZoomIn,
550
549
  zoomOut: ZoomOut,
551
- youtubeButton:YoutubeButton,
552
550
 
553
551
  // social
554
552
  sharingInterface: SharingInterface,
@@ -1,4 +1,5 @@
1
1
  /* tslint:disable */
2
+ import { fill } from "lodash";
2
3
  import * as React from "react";
3
4
 
4
5
  const SK = (props: any) => (
@@ -10,7 +10,7 @@ const Svg360New = (props: any) => (
10
10
  >
11
11
  <path fillRule="evenodd" clipRule="evenodd" d="M19.2731 12.0024C19.2854 11.774 19.2917 11.5352 19.2917 11.2855C19.2917 11.1381 19.2896 10.9914 19.2854 10.8455C20.9575 11.7695 21.9814 13.0117 21.9814 14.3777C21.9814 16.8116 18.7309 18.8525 14.3546 19.4004V18.3921C16.0124 18.1721 17.47 17.7275 18.5982 17.1434C20.2857 16.2698 20.9814 15.24 20.9814 14.3777C20.9814 13.6409 20.4735 12.7818 19.2731 12.0024ZM8.73484 18.2452V16.9993C8.73484 16.8454 8.90151 16.7491 9.03484 16.8261L12.3089 18.7164C12.4422 18.7934 12.4422 18.9858 12.3089 19.0628L9.03484 20.9531C8.90151 21.03 8.73484 20.9338 8.73484 20.7799V19.2622C4.82573 18.562 2.01855 16.6395 2.01855 14.3777C2.01855 13.0115 3.04264 11.7692 4.71506 10.8452C4.71086 10.9912 4.70874 11.138 4.70874 11.2855C4.70874 11.5353 4.71462 11.7743 4.72619 12.0028C3.52623 12.7822 3.01855 13.641 3.01855 14.3777C3.01855 15.24 3.71425 16.2698 5.40178 17.1434C6.31839 17.618 7.45254 18.0005 8.73484 18.2452Z" fill="#636578"/>
12
12
  <path fillRule="evenodd" clipRule="evenodd" d="M12.5852 4.01221H11.371H8.76601C8.17317 4.01221 7.93534 4.05632 7.82485 4.10914L7.82398 4.10955C7.78226 4.12949 7.739 4.15017 7.66339 4.36463L6.90141 7.76114L6.89787 7.77689L6.89333 7.79238C6.36163 9.60562 6.44052 12.1325 6.61804 13.7916C6.65081 14.0978 6.91756 14.3404 7.25825 14.3404H7.51156C7.75013 14.3404 7.94353 14.147 7.94353 13.9084C7.94353 13.5663 8.22089 13.289 8.56302 13.289L11.3769 13.289L12.6228 13.289C12.6231 13.289 12.6234 13.289 12.6238 13.289H13.9287H15.3304C15.6726 13.289 15.9499 13.5663 15.9499 13.9084C15.9499 14.147 16.1433 14.3404 16.3819 14.3404H16.6927C17.0621 14.3404 17.3517 14.0778 17.3866 13.7448C17.5607 12.0842 17.633 9.5881 17.1064 7.79238L17.1018 7.77689L17.0983 7.76114L16.3363 4.36463C16.2607 4.15017 16.2175 4.12949 16.1757 4.10955L16.1749 4.10914C16.0644 4.05632 15.8265 4.01221 15.2337 4.01221H12.5852ZM12.6228 14.289L13.9287 14.289H15.001C15.1677 14.8951 15.7228 15.3404 16.3819 15.3404H16.6927C17.539 15.3404 18.2893 14.7252 18.3812 13.8491C18.5576 12.1668 18.6497 9.51711 18.0706 7.52675L17.3059 4.11822L17.3 4.09191L17.2913 4.06638C17.1801 3.7402 17.0155 3.40262 16.6062 3.20696C16.2639 3.04331 15.8059 3.01221 15.2337 3.01221H12.5852H11.371H8.76601C8.19381 3.01221 7.73577 3.04331 7.3935 3.20696C6.98426 3.40262 6.81959 3.7402 6.70842 4.06638L6.69972 4.09191L6.69381 4.11822L5.92913 7.52675C5.3446 9.5359 5.44389 12.2173 5.62372 13.898C5.71431 14.7446 6.43952 15.3404 7.25825 15.3404H7.51156C8.17066 15.3404 8.72577 14.8951 8.89243 14.289H11.3759C11.3763 14.289 11.3766 14.289 11.3769 14.289L12.6228 14.289Z" fill="#636578"/>
13
- <path d="M17.5619 7.56836V7.56836C13.9305 8.65377 10.0509 8.65178 6.41895 7.56836V7.56836" stroke="#636578" strokeLinecap="round"/>
13
+ <path d="M17.5619 7.56836V7.56836C13.9305 8.65377 10.0509 8.65178 6.41895 7.56836V7.56836" stroke="#636578" stroke-linecap="round"/>
14
14
  <circle cx="8.15374" cy="10.3359" r="0.768972" fill="#636578"/>
15
15
  <circle cx="15.8442" cy="10.4555" r="0.768972" fill="#636578"/>
16
16
  </svg>
@@ -3,7 +3,8 @@ import { Accordion, AccordionSummary, AccordionDetails } from '@mui/material';
3
3
  import IconSVG from '../IconSVG/IconSVG';
4
4
  import {
5
5
  ThemeProvider,
6
- createTheme
6
+ createTheme,
7
+ experimental_sx as sx
7
8
  } from '@mui/material/styles';
8
9
 
9
10
  export interface IItem {
@@ -17,9 +18,7 @@ export interface IAccordionProps {
17
18
 
18
19
  defaultOpened?: number;
19
20
 
20
- variant?: any;
21
-
22
- expandedDefault?: string;
21
+ variant?: string;
23
22
  }
24
23
 
25
24
  declare module '@mui/material/AccordionSummary' {
@@ -47,9 +46,10 @@ const MaterialAccordion = (
47
46
  const theme = createTheme({
48
47
  components: {
49
48
  MuiAccordion: {
50
- styleOverrides: {
51
- root: () => ({
52
- ...(variant === 'searchDetailed' && {
49
+ variants: [
50
+ {
51
+ props: { variant: 'searchDetailed' },
52
+ style: {
53
53
  margin: 0,
54
54
  '&.Mui-expanded': {
55
55
  margin: 0
@@ -57,8 +57,11 @@ const MaterialAccordion = (
57
57
  '&.MuiAccordion-root:before': {
58
58
  opacity: 0
59
59
  }
60
- }),
61
- ...(variant === 'searchDetailedSmall' && {
60
+ }
61
+ },
62
+ {
63
+ props: { variant: 'searchDetailedSmall' },
64
+ style: {
62
65
  margin: 0,
63
66
  boxShadow: 'none',
64
67
  '&.Mui-expanded': {
@@ -67,28 +70,32 @@ const MaterialAccordion = (
67
70
  '&.MuiAccordion-root:before': {
68
71
  opacity: 0
69
72
  }
70
- })
71
- })
72
- }
73
+ }
74
+ }
75
+ ]
73
76
  },
74
77
  MuiAccordionSummary: {
75
- styleOverrides: {
76
- root: () => ({
77
- ...(variant === 'searchDetailed' && {
78
+ variants: [
79
+ {
80
+ props: { variant: 'searchDetailed' },
81
+ style: {
78
82
  color: '#005ccb',
79
83
  fontWeight: 'bold',
80
84
  fontSize: 14,
81
85
  '&.Mui-expanded': {
82
86
  borderBottom: '1px solid #e8e8e8'
83
87
  }
84
- }),
85
- ...(variant === 'searchDetailedSmall' && {
88
+ }
89
+ },
90
+ {
91
+ props: { variant: 'searchDetailedSmall' },
92
+ style: {
86
93
  color: '1f1f1f',
87
94
  fontWeight: 'bold',
88
95
  fontSize: 14
89
- })
90
- })
91
- }
96
+ }
97
+ }
98
+ ]
92
99
  }
93
100
  }
94
101
  });
@@ -97,10 +104,10 @@ const MaterialAccordion = (
97
104
  const [expanded, setExpanded] = useState(expandedDefault || false);
98
105
 
99
106
  const handleChange =
100
- (panel: string) => (_: React.SyntheticEvent, isExpanded: boolean) => {
107
+ (panel: string) => (event: React.SyntheticEvent, isExpanded: boolean) => {
101
108
  setExpanded(isExpanded ? panel : false);
102
109
  };
103
- return items.map((item: { title: string, content: any }, index: number) => {
110
+ return items.map((item: any, index: number) => {
104
111
  return (
105
112
  <ThemeProvider theme={theme}>
106
113
  <Accordion
@@ -113,6 +120,7 @@ const MaterialAccordion = (
113
120
  expandIcon={<IconSVG name={'arrowSelect'} customDimensions />}
114
121
  aria-controls={item.title}
115
122
  id={item.title}
123
+ variant={variant}
116
124
  sx={{
117
125
  borderBottom: '1px solid #e8e8e8',
118
126
  borderImageWidth: 0
@@ -21,7 +21,7 @@ export const Theme = createTheme({
21
21
  },
22
22
  ['&.Mui-focused + [data-popper-placement*="bottom"] .MuiOutlinedInput-notchedOutline']: {
23
23
  ...(ownerState.name === 'mobileSearch' && { // tslint:disable-line
24
- borderTop: isMobileOnly ? '2px solid #005CCB' : 0
24
+ borderTop: isMobileOnly ? '2px solid #1976d2' : 0
25
25
  })
26
26
  },
27
27
  ['&.Mui-focused .MuiInputLabel-root']: {
@@ -38,9 +38,9 @@ export const Theme = createTheme({
38
38
  ['&.Mui-focused + [data-popper-placement*="top"] > .MuiPaper-root']: {
39
39
  borderBottomLeftRadius: 0,
40
40
  borderBottomRightRadius: 0,
41
- borderLeft: '2px solid #005CCB',
42
- borderRight: '2px solid #005CCB',
43
- borderTop: '2px solid #005CCB',
41
+ borderLeft: '2px solid #1976d2',
42
+ borderRight: '2px solid #1976d2',
43
+ borderTop: '2px solid #1976d2',
44
44
  ...(ownerState.error && { // tslint:disable-line
45
45
  borderColor: '#d32f2f'
46
46
  })
@@ -48,15 +48,15 @@ export const Theme = createTheme({
48
48
  ['&.Mui-focused + [data-popper-placement*="bottom"] > .MuiPaper-root']: {
49
49
  borderTopLeftRadius: 0,
50
50
  borderTopRightRadius: 0,
51
- borderLeft: '2px solid #005CCB',
52
- borderRight: '2px solid #005CCB',
53
- borderBottom: '2px solid #005CCB',
51
+ borderLeft: '2px solid #1976d2',
52
+ borderRight: '2px solid #1976d2',
53
+ borderBottom: '2px solid #1976d2',
54
54
  ...(ownerState.error && { // tslint:disable-line
55
55
  borderColor: '#d32f2f'
56
56
  }),
57
57
  marginTop: '-3px',
58
58
  ...(ownerState.name === 'mobileSearch' && { // tslint:disable-line
59
- borderTop: isMobileOnly ? '2px solid #005CCB' : 0,
59
+ borderTop: isMobileOnly ? '2px solid #1976d2' : 0,
60
60
  marginTop: 0,
61
61
  borderTopRightRadius: 4,
62
62
  borderTopLeftRadius: 4
@@ -6,6 +6,7 @@ export const Theme = createTheme({
6
6
  styleOverrides: {
7
7
  input: ({ ownerState: { size } }: { ownerState: { size?: 'smaller' | 'custom' | 'normal' | 'small' | 'medium' } }) => ({
8
8
  ...(size === 'smaller' && {
9
+ // tslint:disable-line
9
10
  height: 28,
10
11
  boxSizing: 'border-box'
11
12
  }),
@@ -1,6 +1,6 @@
1
1
  import { createTheme } from '@mui/material/styles';
2
2
  import { IconButton } from '@mui/material';
3
- import { styled } from '@mui/system';
3
+ import { padding, styled } from '@mui/system';
4
4
  import IconSVG from '../IconSVG/IconSVG';
5
5
  import { isMobileOnly } from 'react-device-detect';
6
6
 
@@ -15,9 +15,9 @@ export const Theme = createTheme({
15
15
  },
16
16
  MuiInputLabel: {
17
17
  styleOverrides: {
18
- root: ({ ownerState: { size } }: { ownerState: { size?: 'smaller' | 'custom' | 'normal' | 'small' | 'medium' } }) => ({
18
+ root: ({ ownerState }) => ({
19
19
  maxWidth: 'calc(100% - 38px)',
20
- ...(size === 'custom' && {
20
+ ...(ownerState.size === 'custom' && { // tslint:disable-line
21
21
  marginTop: isMobileOnly ? '0px' :'-4px',
22
22
  ['&.MuiInputLabel-shrink, &.Mui-focused']: {
23
23
  marginTop: 0
@@ -37,8 +37,8 @@ export const Theme = createTheme({
37
37
  borderTopLeftRadius: 0,
38
38
  borderTopRightRadius: 0,
39
39
  transformOrigin: '0 0 !important',
40
- boxShadow: 'inset 2px 0px 0px 0px #005CCB, inset -2px 0px 0px 0px #005CCB',
41
- borderBottom: '2px solid #005CCB',
40
+ boxShadow: 'inset 2px 0px 0px 0px #1976d2, inset -2px 0px 0px 0px #1976d2',
41
+ borderBottom: '2px solid #1976d2',
42
42
  ['& > .MuiList-root']: {
43
43
  paddingRight: '0 !important',
44
44
  width: '100% !important'
@@ -48,12 +48,12 @@ export const Theme = createTheme({
48
48
  },
49
49
  ['::-webkit-scrollbar-track']: {
50
50
  background: '#fff',
51
- borderRight: '2px solid #005CCB',
51
+ borderRight: '2px solid #1976d2',
52
52
  boxShadow: 'inset -4px 0 0 0 #fff'
53
53
  },
54
54
  ['::-webkit-scrollbar-thumb']: {
55
55
  backgroundColor: '#e8e8e8',
56
- borderRight: '2px solid #005CCB',
56
+ borderRight: '2px solid #1976d2',
57
57
  boxShadow: 'inset -4px 0 0 0 #fff'
58
58
  },
59
59
  ['::-webkit-scrollbar-thumb:hover']: {
@@ -64,19 +64,22 @@ export const Theme = createTheme({
64
64
  },
65
65
  MuiOutlinedInput: {
66
66
  styleOverrides: {
67
- root: ({ ownerState: { size } }: { ownerState: { size?: 'smaller' | 'custom' | 'normal' | 'small' | 'medium' } }) => ({
68
- ...(size === 'small' && {
67
+ root: ({ ownerState }) => ({
68
+ ...(ownerState.size === 'small' && {
69
69
  paddingRight: '0 !important',
70
- flexWrap: 'nowrap !important'
70
+ flexWrap: 'nowrap !important',
71
+ ['.Mui-disabled']: {
72
+ // backgroundColor: '#e8e8e8'
73
+ }
71
74
  }),
72
- ...(size === 'custom' && {
75
+ ...(ownerState.size === 'custom' && {
73
76
  height: isMobileOnly ? 56 : 48,
74
77
  boxSizing: 'border-box'
75
78
  }),
76
79
  ['&.Mui-disabled svg']: {
77
80
  opacity:'0.38'
78
81
  }
79
- } as any)
82
+ })
80
83
  }
81
84
  },
82
85
  MuiListItemText: {
@@ -9,7 +9,7 @@ import { isMobileOnly } from 'react-device-detect';
9
9
 
10
10
  export interface IItems {
11
11
  value: string | number;
12
- label: string | JSX.Element;
12
+ label: string;
13
13
  isDisabled?: boolean;
14
14
  isSeries?: boolean;
15
15
  }
@@ -32,7 +32,7 @@ export interface IVehicleModalProps {
32
32
  icon?: string;
33
33
  children?: JSX.Element | JSX.Element[];
34
34
  onChange: (value: any) => void;
35
- items?: IItems[];
35
+ items: IItems[];
36
36
  selectClassName?: string;
37
37
  amountOfItems?: number;
38
38
  customDimensionsIcon?: boolean;
@@ -99,7 +99,7 @@ const MaterialSelect: React.FC<IVehicleModalProps> = ({
99
99
  onChange('' as string);
100
100
  };
101
101
 
102
- const getLabel = (label: string | JSX.Element, disabled: boolean) => disabled ? <span>{(label as string).toUpperCase()}</span> : label;
102
+ const getLabel = (label: string, disabled: boolean) => disabled ? <span>{label.toUpperCase()}</span> : label;
103
103
 
104
104
  const IconClassNames = classnames(
105
105
  classNameIcon
@@ -7,11 +7,10 @@ interface IMaterialSwitch {
7
7
  disabled?: boolean;
8
8
  onChange: (value: boolean) => void;
9
9
  label?: any;
10
- sx?: any;
11
10
  labelPlacement?: 'bottom' | 'end' | 'start' | 'top';
12
11
  }
13
12
 
14
- const MaterialSwitch = ({ disabled, label, onChange, value = false, sx, labelPlacement }: IMaterialSwitch) => {
13
+ const MaterialSwitch = ({ disabled, label, onChange, value = false, labelPlacement }: IMaterialSwitch) => {
15
14
  const [checked, setChecked] = useState(value);
16
15
  const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
17
16
  setChecked(event.target.checked);
@@ -20,7 +19,6 @@ const MaterialSwitch = ({ disabled, label, onChange, value = false, sx, labelPla
20
19
  return (
21
20
  <FormControlLabel
22
21
  label={label}
23
- sx={sx}
24
22
  labelPlacement={labelPlacement}
25
23
  control={
26
24
  <Switch
@@ -8,7 +8,7 @@ export const IconSvgWrapper = styled(IconSVG)(props => ({
8
8
  height: '10px'
9
9
  }));
10
10
 
11
- export const TooltipWrapper = styled('div')(() => ({
11
+ export const TooltipWrapper = styled('div')(props => ({
12
12
  // zIndex: props.zindex ? props.zindex : 9996,
13
13
  display: 'inline-block'
14
14
  }));
@@ -17,8 +17,8 @@ interface IMaterialTooltip {
17
17
 
18
18
  const LightTooltip = styled(({ className, ...props }: TooltipProps) => (
19
19
  <Tooltip {...props} classes={{ popper: className }} />
20
- ))(({ zindex }: { zindex: number }) => ({
21
- zIndex: zindex ? zindex : 9996,
20
+ ))(props => ({
21
+ zIndex: props.zindex ? props.zindex : 9996,
22
22
  [`& .${tooltipClasses.tooltip}`]: {
23
23
  backgroundColor: '#fff',
24
24
  color: '#4C4E64AD',
@@ -46,7 +46,7 @@ const MaterialTooltip = ({ text, placement, className, disabled, zindex }: IMate
46
46
  };
47
47
 
48
48
  const onHandleMenuToggle = debounce(
49
- (_: any) => {
49
+ (event: any) => {
50
50
  setIsOpen(() => !isOpen);
51
51
  },
52
52
  50
@@ -3,6 +3,7 @@ import useModal from '../../../framework/hooks/useModal';
3
3
  import { updateCookieList } from '../../../framework/utils/CommonUtils';
4
4
  import Modal from './Modal';
5
5
 
6
+
6
7
  export interface ICookieModal {
7
8
  handleSentryInit?: () => void;
8
9
  }
@@ -42,8 +43,9 @@ const CookieModal = ({ handleSentryInit }: ICookieModal) => {
42
43
  : <></>;
43
44
  };
44
45
 
46
+
45
47
  CookieModal.defaultProps = {
46
- handleSentryInit: () => {}
48
+ handleSentryInit: () => {},
47
49
  };
48
50
 
49
51
  export default CookieModal;
@@ -10,6 +10,5 @@ export const BaseModalWrapper = styled('div')({
10
10
  boxShadow: '0px 0px 20px rgba(76, 78, 100, 0.4)',
11
11
  borderRadius: '10px',
12
12
  maxWidth: '600px',
13
- boxSizing: 'border-box',
14
- outline: 'none'
13
+ boxSizing: 'border-box'
15
14
  });
@@ -12,8 +12,12 @@ interface IBasicModal {
12
12
  }
13
13
 
14
14
  const BasicModal = ({ isVisible, toggleModal, name, modalProps, handleSentryInit }: IBasicModal) => {
15
+ const { onClearModalState } = modalProps;
15
16
  return (
16
- <Modal open={isVisible}>
17
+ <Modal open={isVisible} onClose={() => {
18
+ // toggleModal();
19
+ // onClearModalState();
20
+ }}>
17
21
  <BaseModalWrapper>
18
22
  {ModalsConfig[name] && ModalsConfig[name]({ ...modalProps, toggleModal, handleSentryInit })}
19
23
  </BaseModalWrapper>
@@ -4,11 +4,7 @@ import TestModal from './modals/TestModal';
4
4
  import PreviewCookieModal from './modals/PreviewCookieModal/PreviewCookieModal';
5
5
  import ManageCookieModal from './modals/ManageCookieModal/ManageCookieModal';
6
6
 
7
- interface IModalConfigProps {
8
- [key: string]: (props: any) => JSX.Element;
9
- }
10
-
11
- const ModalsConfig: IModalConfigProps = {
7
+ const ModalsConfig = {
12
8
  TEST_MODAL: (props: any) => {
13
9
  return <TestModal { ...props } />;
14
10
  },
@@ -1,7 +1,7 @@
1
1
  @import '../../../../../theme/mixins.styl';
2
2
 
3
3
  .modalWrapper
4
- padding: 13px 15px 28px;
4
+ padding: 16px 10px 25px 25px
5
5
  text-align: center
6
6
  box-sizing: border-box
7
7
  max-width: 600px
@@ -9,13 +9,10 @@
9
9
  .modalTitle
10
10
  font-family: sans-serif
11
11
  font-weight: bold
12
- font-size: 16px;
12
+ font-size: 24px;
13
13
  line-height: 133.4%;
14
14
  color: rgba(76, 78, 100, 0.87)
15
- margin-top: 12px
16
- +media-tablet-up()
17
- font-size: 24px;
18
- margin-top: 20px
15
+ margin-top: 20px
19
16
 
20
17
  .modalContent
21
18
  font-family: sans-serif
@@ -24,11 +21,9 @@
24
21
  text-align: justify;
25
22
  letter-spacing: 0.15px;
26
23
  color: rgba(76, 78, 100, 0.87);
27
- margin-top: 12px
24
+ margin-top: 20px
28
25
  margin-right: 25px
29
26
 
30
- +media-tablet-up()
31
- margin-top: 20px
32
27
  .accordions
33
28
  height: 278px
34
29
  overflow-y: scroll
@@ -57,6 +52,7 @@
57
52
  .modalBtn
58
53
  height: 38px
59
54
  text-transform: capitalize !important
55
+ font-size: 11px !important;
60
56
  +media-tablet-landscape-up()
61
57
  min-width: 222px !important
62
58
  font-size: 14px !important;
@@ -66,22 +62,10 @@
66
62
 
67
63
  .switchBlock
68
64
  display: flex
65
+ justify-content: space-between
69
66
  align-items: center
70
67
  font-size: 12px
71
68
  line-height: 15px
72
69
  letter-spacing: 1px
73
70
  color: rgba(76, 78, 100, 0.87)
74
- text-align: left
75
-
76
- .switchBlockTitle
77
- width: 140px;
78
-
79
- .switchBlockLink
80
- color: rgba(76, 78, 100, 0.87);
81
- text-decoration-line: underline;
82
- font-size: 10px;
83
-
84
- &:focus
85
- text-decoration-line: underline;
86
- &:hover
87
- text-decoration-line: none;
71
+ text-align: left