@bytebrand/fe-ui-core 4.1.49 → 4.1.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.1.49",
3
+ "version": "4.1.51",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -17,6 +17,7 @@
17
17
  +media-tablet-down()
18
18
  height: 35px
19
19
  margin-bottom 5px
20
+ margin-top: 0;
20
21
  +media-phone-only()
21
22
  background-color: $grey-f2;
22
23
  padding: 5px 0 5px 10px
@@ -45,8 +46,8 @@
45
46
  font-weight: 700
46
47
 
47
48
  .sorting
48
- // flex-basis: 20%
49
- min-width: 180px
49
+ flex-basis: 20%
50
+ min-width: 140px
50
51
  [class*='MuiPaper-root'], [class*='MuiOutlinedInput-root']
51
52
  font-size: 14px !important
52
53
 
@@ -59,7 +60,6 @@
59
60
  margin-right: 10px
60
61
  color: $skyBlue
61
62
  +media-tablet-down()
62
- font-size: 10px
63
63
  flex-basis: unset
64
64
 
65
65
  .resultText
@@ -94,4 +94,8 @@
94
94
 
95
95
  .sortingHeader
96
96
  color: $skyBlue
97
- font-size: 13px
97
+ font-size: 13px
98
+ display: flex
99
+ justify-content: end
100
+ align-items: center
101
+ column-gap: 10px
@@ -6,6 +6,7 @@ import { searchTopBarTranslate } from '../../../locales/data';
6
6
  import MaterialMenu from '../../_common/UserMenu/MaterialMenu';
7
7
  import { isMobileOnly } from 'react-device-detect';
8
8
  import MaterialAutocomplete from '../../_common/MaterialAutocomplete/MaterialAutocomplete';
9
+ import IconSVG from '../../_common/IconSVG/IconSVG';
9
10
 
10
11
  interface ISearchTopBarProps {
11
12
  t?: (key: string, options?: object) => string;
@@ -43,6 +44,7 @@ class SearchTopBar extends React.Component<ISearchTopBarProps, {}> {
43
44
  return (
44
45
  <span className={styles.sortingHeader}>
45
46
  {value}
47
+ <IconSVG name='menuArrow' customDimensions width={10} />
46
48
  </span>
47
49
  );
48
50
  }
@@ -19,4 +19,3 @@ const SvgDate = (props: any) => (
19
19
 
20
20
  export default SvgDate;
21
21
  /* tslint:enable */
22
-
@@ -16,4 +16,3 @@ const SvgOwner = (props: any) => (
16
16
 
17
17
  export default SvgOwner;
18
18
  /* tslint:enable */
19
-
@@ -22,7 +22,7 @@ const MaterialSwitch = ({ disabled, label, onChange, value = false, labelPlaceme
22
22
  labelPlacement={labelPlacement}
23
23
  control={
24
24
  <Switch
25
- checked={checked}
25
+ checked={value || checked}
26
26
  onChange={handleChange}
27
27
  disabled={disabled}
28
28
  onClick={e => e.stopPropagation()}
@@ -49,4 +49,8 @@
49
49
  text-transform: uppercase !important
50
50
 
51
51
  .outlinedBtn
52
- border: none !important
52
+ border: none !important
53
+
54
+ .switchBlock
55
+ display: flex
56
+ justify-content: space-between
@@ -1,12 +1,25 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import styles from './ManageCookieModal.styl';
3
3
 
4
4
  import IconSVG from '../../../IconSVG/IconSVG';
5
5
  import Button from '../../../Button/Button';
6
6
  import MaterialAccordionGroup from '../../../MaterialAccordionGroup/MaterialAccordionGroup';
7
7
  import classNames from 'classnames';
8
+ import MaterialSwitch from '../../../MaterialSwitch/MaterialSwitch';
8
9
 
9
10
  const ManageCookieModal = () => {
11
+ const [accordionSwitchValue, setAccordionSwitchValue] = useState(false);
12
+ const [switchValue, setSwitchValue] = useState(false);
13
+
14
+ const onHandleAccordionSwitchValue = (value: boolean) => {
15
+ setAccordionSwitchValue(value);
16
+ };
17
+
18
+ const accordionSwitchProps = {
19
+ value: accordionSwitchValue,
20
+ onChange: onHandleAccordionSwitchValue
21
+ };
22
+
10
23
  return (
11
24
  <div className={styles.modalWrapper}>
12
25
  <IconSVG name='autodeLogo' customDimensions />
@@ -17,6 +30,7 @@ const ManageCookieModal = () => {
17
30
  title='Notwendig'
18
31
  tooltipText='tooltip text'
19
32
  withSwitch
33
+ switchProps={accordionSwitchProps}
20
34
  >
21
35
  Wir verwenden Browser-Cookies, die notwendig sind, damit die Website wie vorgesehen funktioniert.
22
36
  Beispiel: Wir speichern Ihre Präferenzen bei der Datenerfassung auf der Website, damit wir sie berücksichtigen
@@ -27,6 +41,7 @@ const ManageCookieModal = () => {
27
41
  <MaterialAccordionGroup
28
42
  title='Analytisch'
29
43
  withSwitch
44
+ switchProps={accordionSwitchProps}
30
45
  >
31
46
  Um das Nutzerverhalten zu verstehen und Ihnen ein relevanteres Surferlebnis zu bieten oder den Inhalt
32
47
  unserer Website zu personalisieren. Beispiel: Wir sammeln Informationen darüber, welche Seiten Sie besuchen,
@@ -36,11 +51,16 @@ const ManageCookieModal = () => {
36
51
  <MaterialAccordionGroup
37
52
  title='Marketing'
38
53
  withSwitch
54
+ switchProps={accordionSwitchProps}
39
55
  >
40
56
  Zur Personalisierung und Messung der Effektivität von Werbung auf unserer Website und anderen Websites.
41
57
  Beispiel: Wir können Ihnen eine personalisierte Werbung auf der Grundlage der Seiten, die Sie auf unserer
42
58
  Website besuchen, anzeigen.
43
59
  For example, we may serve you a personalized ad based on the pages you visit on our site.
60
+ <div className={styles.switchBlock}>
61
+ <span>Cookie</span>
62
+ <MaterialSwitch value={switchValue} onChange={(value: boolean) => setSwitchValue(value)} />
63
+ </div>
44
64
  </MaterialAccordionGroup>
45
65
  </div>
46
66
  <div className={styles.buttonsContainer}>
@@ -13,7 +13,7 @@ const PreviewCookieModal = ({ toggleModal, setModal }: IPreviewCookieModal) => {
13
13
  const onAcceptAll = () => {
14
14
  localStorage.setItem('cookieConfig', JSON.stringify([]));
15
15
  toggleModal();
16
- }
16
+ };
17
17
  return (
18
18
  <div className={styles.modalWrapper}>
19
19
  <IconSVG name='autodeLogo' customDimensions />