@shopgate/pwa-ui-shared 7.31.4-beta.1 → 7.32.0-beta.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 (63) hide show
  1. package/ActionButton/spec.js +25 -28
  2. package/AddToCartButton/index.js +14 -14
  3. package/Availability/index.js +11 -28
  4. package/Availability/spec.js +11 -11
  5. package/Button/index.js +6 -9
  6. package/ButtonLink/spec.js +11 -7
  7. package/Card/index.js +5 -8
  8. package/CardList/components/Item/index.js +1 -2
  9. package/CartTotalLine/index.js +8 -12
  10. package/Checkbox/index.js +3 -4
  11. package/Chip/index.js +9 -10
  12. package/ContextMenu/components/Item/index.js +18 -28
  13. package/ContextMenu/index.js +3 -4
  14. package/Dialog/components/HtmlContentDialog/spec.js +7 -1
  15. package/DiscountBadge/index.js +35 -32
  16. package/DiscountBadge/spec.js +5 -5
  17. package/FavoritesButton/connector.js +1 -1
  18. package/FavoritesButton/index.js +26 -23
  19. package/Form/Checkbox/index.js +1 -1
  20. package/Form/InfoField/spec.js +3 -3
  21. package/Form/Password/index.js +3 -7
  22. package/Form/RadioGroup/components/Item/index.js +1 -3
  23. package/Form/Select/index.js +4 -5
  24. package/Form/Select/spec.js +3 -3
  25. package/Form/SelectContextChoices/index.js +8 -8
  26. package/Form/SelectContextChoices/spec.js +3 -3
  27. package/Form/TextField/index.js +3 -5
  28. package/FormElement/components/ErrorText/index.js +7 -8
  29. package/FormElement/components/Label/index.js +2 -2
  30. package/FormElement/components/Placeholder/index.js +3 -3
  31. package/FormElement/components/Underline/index.js +9 -17
  32. package/Glow/index.js +1 -2
  33. package/Glow/spec.js +3 -3
  34. package/IndicatorCircle/index.js +3 -4
  35. package/LoadingIndicator/index.js +3 -3
  36. package/Manufacturer/index.js +2 -2
  37. package/NoResults/components/Icon/index.js +3 -4
  38. package/NoResults/index.js +5 -5
  39. package/Placeholder/index.js +2 -2
  40. package/PlaceholderLabel/index.js +2 -3
  41. package/Price/index.js +4 -3
  42. package/PriceInfo/index.js +3 -4
  43. package/PriceStriked/index.js +3 -4
  44. package/ProgressBar/index.js +7 -12
  45. package/RadioButton/index.js +3 -4
  46. package/RatingStars/index.js +4 -5
  47. package/Ripple/components/RippleAnimation/index.js +1 -2
  48. package/Ripple/index.js +1 -2
  49. package/ScannerOverlay/components/CameraOverlay/index.js +1 -2
  50. package/ScannerOverlay/components/ScannerBar/components/FlashlightButton/index.js +4 -4
  51. package/ScannerOverlay/components/ScannerBar/index.js +3 -4
  52. package/Sheet/components/Header/components/SearchBar/index.js +6 -7
  53. package/Sheet/components/Header/index.js +15 -11
  54. package/Sheet/components/Header/spec.js +3 -1
  55. package/Sheet/index.js +2 -2
  56. package/TaxDisclaimer/index.js +11 -10
  57. package/TaxDisclaimer/spec.js +2 -1
  58. package/TextField/components/ErrorText/index.js +7 -7
  59. package/TextField/components/FormElement/index.js +3 -3
  60. package/TextField/components/Hint/index.js +3 -4
  61. package/TextField/components/Label/index.js +2 -2
  62. package/TextField/components/Underline/index.js +9 -17
  63. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { I18n } from '@shopgate/engage/components';
3
+ import { I18n, Typography } from '@shopgate/engage/components';
4
4
  import { themeConfig } from '@shopgate/pwa-common/helpers/config';
5
5
  import { svgToDataUrl } from '@shopgate/engage/core';
6
6
  import { makeStyles } from '@shopgate/engage/styles';
@@ -25,11 +25,9 @@ const useStyles = makeStyles()(theme => ({
25
25
  },
26
26
  icon: {
27
27
  width: 216,
28
- color: 'var(--color-primary)'
28
+ color: theme.palette.primary.main
29
29
  },
30
30
  headline: {
31
- fontSize: '1.25rem',
32
- fontWeight: 500,
33
31
  marginTop: 30
34
32
  },
35
33
  text: {
@@ -61,7 +59,9 @@ const NoResults = props => {
61
59
  }), /*#__PURE__*/_jsxs("div", {
62
60
  role: "alert",
63
61
  "aria-atomic": "true",
64
- children: [/*#__PURE__*/_jsx("div", {
62
+ children: [/*#__PURE__*/_jsx(Typography, {
63
+ variant: "h3",
64
+ component: "div",
65
65
  className: classes.headline,
66
66
  children: /*#__PURE__*/_jsx(I18n.Text, {
67
67
  string: props.headlineText,
@@ -2,9 +2,9 @@ import React, { memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { makeStyles } from '@shopgate/engage/styles';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
- const useStyles = makeStyles()(() => ({
5
+ const useStyles = makeStyles()(theme => ({
6
6
  root: {
7
- background: 'var(--color-background-accent)',
7
+ background: theme.palette.background.emphasized,
8
8
  position: 'relative'
9
9
  }
10
10
  }));
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { makeStyles } from '@shopgate/engage/styles';
4
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
- const useStyles = makeStyles()(() => ({
5
+ const useStyles = makeStyles()(theme => ({
7
6
  label: {
8
- background: themeConfig.colors.dark,
7
+ background: theme.palette.common.black,
9
8
  opacity: 0.1,
10
9
  width: '100%',
11
10
  height: 16,
package/Price/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "core-js/modules/es.string.replace.js";
2
2
  import React, { useMemo } from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { I18n } from '@shopgate/engage/components';
4
+ import { I18n, Typography } from '@shopgate/engage/components';
5
5
  import { i18n } from '@shopgate/engage/core/helpers';
6
6
  import { makeStyles } from '@shopgate/engage/styles';
7
7
  import showTaxDisclaimer from '@shopgate/pwa-common-commerce/market/helpers/showTaxDisclaimer';
@@ -15,7 +15,6 @@ const useStyles = makeStyles()({
15
15
  },
16
16
  disclaimer: {
17
17
  color: 'initial',
18
- fontSize: 14,
19
18
  position: 'absolute',
20
19
  right: -10,
21
20
  top: 0
@@ -106,7 +105,9 @@ const Price = props => {
106
105
  price: ariaPrice
107
106
  }),
108
107
  children: priceContent
109
- }), props.taxDisclaimer && showDisclaimer ? /*#__PURE__*/_jsxs("div", {
108
+ }), props.taxDisclaimer && showDisclaimer ? /*#__PURE__*/_jsxs(Typography, {
109
+ variant: "body2",
110
+ component: "div",
110
111
  className: classes.disclaimer,
111
112
  children: [/*#__PURE__*/_jsx("span", {
112
113
  "aria-hidden": true,
@@ -1,13 +1,12 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
4
3
  import { makeStyles } from '@shopgate/engage/styles';
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
- const useStyles = makeStyles()({
5
+ const useStyles = makeStyles()(theme => ({
7
6
  root: {
8
- color: themeConfig.colors.shade3
7
+ color: theme.palette.grey.medium
9
8
  }
10
- });
9
+ }));
11
10
 
12
11
  /**
13
12
  * The price info component
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3
3
  import { I18n } from '@shopgate/engage/components';
4
4
  import { i18n } from '@shopgate/engage/core/helpers';
5
5
  import { makeStyles } from '@shopgate/engage/styles';
6
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
7
6
 
8
7
  /**
9
8
  * Calculates the angle for the strike-through line
@@ -23,10 +22,10 @@ const calcAngle = element => {
23
22
  document.body.removeChild(cloned);
24
23
  return Math.round(90 - Math.atan(width / height) * (180 / Math.PI));
25
24
  };
26
- const useStyles = makeStyles()({
25
+ const useStyles = makeStyles()(theme => ({
27
26
  root: {
28
27
  whiteSpace: 'nowrap',
29
- color: themeColors.shade11,
28
+ color: theme.palette.grey.dark,
30
29
  '& span': {
31
30
  position: 'relative',
32
31
  '&::before': {
@@ -47,7 +46,7 @@ const useStyles = makeStyles()({
47
46
  }
48
47
  }
49
48
  }
50
- });
49
+ }));
51
50
 
52
51
  /**
53
52
  * The price striked component
@@ -1,10 +1,8 @@
1
1
  import React, { useEffect, useState, memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import Color from 'color';
4
3
  import Transition from 'react-transition-group/Transition';
5
4
  import UIEvents from '@shopgate/pwa-core/emitters/ui';
6
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
7
- import { getCSSCustomProp, makeStyles, keyframes } from '@shopgate/engage/styles';
5
+ import { makeStyles, keyframes, useTheme } from '@shopgate/engage/styles';
8
6
  import { jsx as _jsx } from "react/jsx-runtime";
9
7
  const duration = 150;
10
8
  const transitionStyles = {
@@ -21,9 +19,6 @@ const transitionStyles = {
21
19
  transform: 'scale(1, 0)'
22
20
  }
23
21
  };
24
- const {
25
- colors
26
- } = themeConfig;
27
22
  const progressBarHeight = 4;
28
23
  const indeterminateLong = keyframes({
29
24
  '0%': {
@@ -53,12 +48,12 @@ const indeterminateShort = keyframes({
53
48
  right: '-8%'
54
49
  }
55
50
  });
56
- const useStyles = makeStyles()({
51
+ const useStyles = makeStyles()(theme => ({
57
52
  innerElement: {
58
53
  ':before': {
59
54
  content: '""',
60
55
  position: 'absolute',
61
- background: 'var(--color-secondary)',
56
+ background: theme.palette.secondary.main,
62
57
  top: 0,
63
58
  left: 0,
64
59
  bottom: 0,
@@ -67,7 +62,7 @@ const useStyles = makeStyles()({
67
62
  ':after': {
68
63
  content: '""',
69
64
  position: 'absolute',
70
- background: 'var(--color-secondary)',
65
+ background: theme.palette.secondary.main,
71
66
  top: 0,
72
67
  left: 0,
73
68
  bottom: 0,
@@ -83,7 +78,7 @@ const useStyles = makeStyles()({
83
78
  animationDelay: '1.15s'
84
79
  }
85
80
  }
86
- });
81
+ }));
87
82
 
88
83
  /**
89
84
  * A component for visualizing any kind of progress.
@@ -96,6 +91,7 @@ const ProgressBar = /*#__PURE__*/memo(({
96
91
  classes,
97
92
  cx
98
93
  } = useStyles();
94
+ const theme = useTheme();
99
95
  const [isAnimating, setIsAnimating] = useState(isVisible);
100
96
  const [visible, setVisible] = useState(isVisible);
101
97
  useEffect(() => {
@@ -106,7 +102,6 @@ const ProgressBar = /*#__PURE__*/memo(({
106
102
  setVisible(false);
107
103
  }
108
104
  }, [isVisible]);
109
- const wrapperBackground = Color(getCSSCustomProp('--color-secondary') || colors.accent).fade(0.6);
110
105
  return /*#__PURE__*/_jsx(Transition, {
111
106
  in: visible,
112
107
  timeout: duration,
@@ -118,7 +113,7 @@ const ProgressBar = /*#__PURE__*/memo(({
118
113
  style: {
119
114
  position: 'absolute',
120
115
  bottom: 0,
121
- background: wrapperBackground,
116
+ background: theme.alpha(theme.palette.secondary.main, 0.6),
122
117
  width: '100%',
123
118
  height: progressBarHeight,
124
119
  overflow: 'hidden',
@@ -1,20 +1,19 @@
1
1
  import React from 'react';
2
2
  import { makeStyles } from '@shopgate/engage/styles';
3
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
4
3
  import BaseCheckbox from '@shopgate/pwa-common/components/Checkbox';
5
4
  import CheckedIcon from "../icons/RadioCheckedIcon";
6
5
  import UncheckedIcon from "../icons/RadioUncheckedIcon";
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
8
- const useStyles = makeStyles()(() => ({
7
+ const useStyles = makeStyles()(theme => ({
9
8
  checkedIcon: {
10
9
  width: 24,
11
10
  height: 24,
12
- color: 'var(--color-secondary)'
11
+ color: theme.palette.secondary.main
13
12
  },
14
13
  uncheckedIcon: {
15
14
  width: 24,
16
15
  height: 24,
17
- color: themeConfig.colors.shade6
16
+ color: theme.palette.grey.dark
18
17
  }
19
18
  }));
20
19
 
@@ -2,7 +2,6 @@ import React, { useCallback, useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import times from 'lodash/times';
4
4
  import { i18n } from '@shopgate/engage/core/helpers';
5
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
6
5
  import { makeStyles } from '@shopgate/engage/styles';
7
6
  import StarIcon from "../icons/StarIcon";
8
7
  import StarHalfIcon from "../icons/StarHalfIcon";
@@ -13,7 +12,7 @@ const ICON_SIZES = {
13
12
  big: '1.24em',
14
13
  large: '2.3em'
15
14
  };
16
- const useStyles = makeStyles()({
15
+ const useStyles = makeStyles()(theme => ({
17
16
  container: {
18
17
  position: 'relative',
19
18
  display: 'inline-block',
@@ -35,7 +34,7 @@ const useStyles = makeStyles()({
35
34
  marginRight: '0.23em'
36
35
  },
37
36
  emptyStars: {
38
- color: themeConfig.colors.shade7,
37
+ color: theme.components.ratingStars.empty,
39
38
  display: 'inline-flex',
40
39
  alignItems: 'center',
41
40
  flexWrap: 'nowrap'
@@ -44,12 +43,12 @@ const useStyles = makeStyles()({
44
43
  position: 'absolute',
45
44
  left: 0,
46
45
  top: 0,
47
- color: 'var(--color-primary)',
46
+ color: theme.components.ratingStars.filled,
48
47
  display: 'inline-flex',
49
48
  alignItems: 'center',
50
49
  flexWrap: 'nowrap'
51
50
  }
52
- });
51
+ }));
53
52
  const numStars = 5;
54
53
 
55
54
  /**
@@ -1,7 +1,6 @@
1
1
  import React, { memo, useRef, useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Transition } from 'react-transition-group';
4
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
5
4
  import { makeStyles } from '@shopgate/engage/styles';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  const useStyles = makeStyles()(() => ({
@@ -97,7 +96,7 @@ function RippleAnimation({
97
96
  });
98
97
  }
99
98
  RippleAnimation.defaultProps = {
100
- color: themeConfig.colors.dark,
99
+ color: 'var(--sg-palette-common-black)',
101
100
  duration: 300,
102
101
  onComplete: () => {},
103
102
  size: 48,
package/Ripple/index.js CHANGED
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3
3
  import clamp from 'lodash/clamp';
4
4
  import { shift } from '@shopgate/pwa-common/helpers/data';
5
5
  import { getOffset } from '@shopgate/pwa-common/helpers/dom';
6
- import { themeConfig } from '@shopgate/pwa-common/helpers/config';
7
6
  import { makeStyles } from '@shopgate/engage/styles';
8
7
  import RippleAnimation from "./components/RippleAnimation";
9
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -183,7 +182,7 @@ const Ripple = ({
183
182
  };
184
183
  Ripple.defaultProps = {
185
184
  className: '',
186
- color: themeConfig.colors.dark,
185
+ color: 'var(--sg-palette-common-black)',
187
186
  disabled: false,
188
187
  fill: false,
189
188
  onClick: () => {},
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import SurroundPortals from '@shopgate/pwa-common/components/SurroundPortals';
3
3
  import { SCANNER_CAMERA } from '@shopgate/pwa-common-commerce/scanner/constants/Portals';
4
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
5
4
  import { makeStyles } from '@shopgate/engage/styles';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  const edgeHeight = 45;
@@ -18,7 +17,7 @@ const useStyles = makeStyles()(theme => ({
18
17
  height: edgeHeight,
19
18
  position: 'absolute',
20
19
  borderStyle: 'solid',
21
- borderColor: themeColors.light
20
+ borderColor: theme.palette.common.white
22
21
  },
23
22
  ':before': {
24
23
  top: theme.spacing(8),
@@ -5,13 +5,13 @@ import { SCANNER_FLASH } from '@shopgate/engage/scanner/constants';
5
5
  import { i18n } from '@shopgate/engage/core/helpers';
6
6
  import { makeStyles } from '@shopgate/engage/styles';
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- const useStyles = makeStyles()({
8
+ const useStyles = makeStyles()(theme => ({
9
9
  button: {
10
10
  alignItems: 'center',
11
11
  color: 'inherit',
12
12
  display: 'flex',
13
13
  flexShrink: 0,
14
- fontSize: 24,
14
+ fontSize: theme.components.icon.medium,
15
15
  height: 44,
16
16
  justifyContent: 'center',
17
17
  outline: 0,
@@ -22,9 +22,9 @@ const useStyles = makeStyles()({
22
22
  },
23
23
  icon: {
24
24
  boxSizing: 'content-box',
25
- color: 'var(--color-secondary)'
25
+ color: theme.palette.secondary.main
26
26
  }
27
- });
27
+ }));
28
28
 
29
29
  /**
30
30
  * Renders the flashlight button for the scanner bar.
@@ -3,7 +3,6 @@ import { createPortal } from 'react-dom';
3
3
  import PropTypes from 'prop-types';
4
4
  import { Grid, SurroundPortals } from '@shopgate/engage/components';
5
5
  import { SCANNER_BAR } from '@shopgate/engage/scanner/constants';
6
- import { themeShadows, themeColors } from '@shopgate/pwa-common/helpers/config';
7
6
  import { makeStyles } from '@shopgate/engage/styles';
8
7
  import FlashlightButton from "./components/FlashlightButton";
9
8
  import ScannerInstructions from "./components/ScannerInstructions";
@@ -11,9 +10,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
10
  const useStyles = makeStyles()(theme => ({
12
11
  container: {
13
12
  bottom: 0,
14
- backgroundColor: themeColors.overlay,
15
- boxShadow: themeShadows.scannerBar,
16
- fontSize: 14,
13
+ backgroundColor: theme.palette.background.emphasized,
14
+ boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.1)',
15
+ fontSize: theme.typography.body2.fontSize,
17
16
  alignItems: 'center',
18
17
  paddingBottom: 'var(--safe-area-inset-bottom)'
19
18
  },
@@ -2,11 +2,10 @@ import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { I18n } from '@shopgate/engage/components';
4
4
  import Input from '@shopgate/pwa-common/components/Input';
5
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
6
5
  import { makeStyles } from '@shopgate/engage/styles';
7
6
  import MagnifierIcon from "../../../../../icons/MagnifierIcon";
8
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
- const useStyles = makeStyles()({
8
+ const useStyles = makeStyles()(theme => ({
10
9
  container: {
11
10
  display: 'flex',
12
11
  flexDirection: 'row',
@@ -27,13 +26,13 @@ const useStyles = makeStyles()({
27
26
  padding: '4px 10px 4px 30px',
28
27
  lineHeight: '28px',
29
28
  outline: 'none',
30
- background: themeColors.shade7,
29
+ background: theme.palette.grey.light,
31
30
  verticalAlign: 'middle',
32
31
  WebkitAppearance: 'none'
33
32
  },
34
33
  label: {
35
34
  alignItems: 'center',
36
- color: themeColors.shade3,
35
+ color: theme.palette.grey.medium,
37
36
  display: 'flex',
38
37
  height: '36px',
39
38
  position: 'absolute',
@@ -42,10 +41,10 @@ const useStyles = makeStyles()({
42
41
  },
43
42
  icon: {
44
43
  padding: '0 6px',
45
- color: themeColors.shade3,
46
- fontSize: '1.235rem'
44
+ color: theme.palette.grey.medium,
45
+ fontSize: theme.components.icon.small
47
46
  }
48
- });
47
+ }));
49
48
 
50
49
  /**
51
50
  * @param {Object} props Props.
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import Grid from '@shopgate/pwa-common/components/Grid';
4
4
  import { i18n } from '@shopgate/engage/core/helpers';
5
5
  import { themeConfig } from '@shopgate/pwa-common/helpers/config';
6
+ import { Typography } from '@shopgate/engage/components';
6
7
  import { makeStyles } from '@shopgate/engage/styles';
7
8
  import Ripple from "../../../Ripple";
8
9
  import CrossIcon from "../../../icons/CrossIcon";
@@ -15,11 +16,9 @@ const useStyles = makeStyles()(theme => ({
15
16
  },
16
17
  closePlaceholder: {
17
18
  height: themeConfig.variables.navigator.height,
18
- padding: 0,
19
- lineHeight: 1
19
+ padding: 0
20
20
  },
21
21
  closeButton: {
22
- lineHeight: 1,
23
22
  outline: 0,
24
23
  padding: 0,
25
24
  minWidth: themeConfig.variables.navigator.height,
@@ -36,18 +35,17 @@ const useStyles = makeStyles()(theme => ({
36
35
  alignItems: 'center'
37
36
  },
38
37
  title: {
39
- fontSize: '1.25rem',
40
- fontWeight: 500,
41
38
  position: 'relative',
42
39
  alignItems: 'center',
43
40
  padding: theme.spacing(0, 2),
44
- overflow: 'hidden',
45
- textOverflow: 'ellipsis',
46
- whiteSpace: 'nowrap',
47
- alignSelf: 'center'
41
+ alignSelf: 'center',
42
+ minWidth: 0
43
+ },
44
+ titleText: {
45
+ minWidth: 0
48
46
  },
49
47
  headerShadow: {
50
- boxShadow: themeConfig.shadows.material
48
+ boxShadow: '0 1px 6px rgba(0, 0, 0, .117647), 0 1px 4px rgba(0, 0, 0, .117647)'
51
49
  }
52
50
  }));
53
51
 
@@ -96,7 +94,13 @@ const Header = ({
96
94
  ...(allowClose ? {
97
95
  tabIndex: 0
98
96
  } : null),
99
- children: title
97
+ children: /*#__PURE__*/_jsx(Typography, {
98
+ variant: "h3",
99
+ component: "div",
100
+ noWrap: true,
101
+ className: classes.titleText,
102
+ children: title
103
+ })
100
104
  })]
101
105
  }), showSearch && /*#__PURE__*/_jsx(SearchBar, {
102
106
  handleChange: handleChange
@@ -10,6 +10,8 @@ describe('<Header />', () => {
10
10
  title: title
11
11
  }), mockRenderOptions);
12
12
  expect(wrapper).toMatchSnapshot();
13
- expect(wrapper.find('GridItem').first().props().children).toEqual(title);
13
+ expect(wrapper.find({
14
+ variant: 'h3'
15
+ }).first().props().children).toEqual(title);
14
16
  });
15
17
  });
package/Sheet/index.js CHANGED
@@ -67,7 +67,7 @@ const useStyles = makeStyles()(theme => ({
67
67
  },
68
68
  container: {
69
69
  bottom: 0,
70
- background: themeConfig.colors.light,
70
+ background: theme.palette.background.surface,
71
71
  width: '100vw',
72
72
  [responsiveMediaQuery('<xl', {
73
73
  appOnly: true
@@ -96,7 +96,7 @@ const useStyles = makeStyles()(theme => ({
96
96
  position: 'relative'
97
97
  },
98
98
  sheetShadow: {
99
- boxShadow: themeConfig.shadows.sheet
99
+ boxShadow: '0 -2px 4px rgba(0, 0, 0, 0.1)'
100
100
  },
101
101
  content: {
102
102
  maxHeight: [`calc(var(--vh-100, 100vh) - ${themeConfig.variables.navigator.height}px)`, `calc(var(--vh-100, 100vh) - ${themeConfig.variables.navigator.height}px - var(--safe-area-inset-top))`],
@@ -1,18 +1,15 @@
1
1
  import React from 'react';
2
2
  import SurroundPortals from '@shopgate/pwa-common/components/SurroundPortals';
3
3
  import { PRODUCT_TAX_DISCLAIMER } from '@shopgate/pwa-common-commerce/product/constants/Portals';
4
- import { I18n } from '@shopgate/engage/components';
4
+ import { I18n, Typography } from '@shopgate/engage/components';
5
5
  import showTaxDisclaimer from '@shopgate/pwa-common-commerce/market/helpers/showTaxDisclaimer';
6
6
  import { useWidgetSettings } from '@shopgate/engage/core/hooks/useWidgetSettings';
7
7
  import { makeStyles } from '@shopgate/engage/styles';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  const useStyles = makeStyles()(theme => ({
10
10
  text: {
11
- background: theme.palette.background.default,
12
- display: 'block',
13
- fontSize: 12,
14
- padding: theme.spacing(2.5, 2),
15
- textAlign: 'left'
11
+ background: theme.palette.background.surface,
12
+ padding: theme.spacing(2.5, 2)
16
13
  }
17
14
  }));
18
15
 
@@ -22,7 +19,8 @@ const useStyles = makeStyles()(theme => ({
22
19
  */
23
20
  const TaxDisclaimer = () => {
24
21
  const {
25
- classes
22
+ classes,
23
+ cx
26
24
  } = useStyles();
27
25
 
28
26
  // Added with PWA 6 - CCP-2372
@@ -38,12 +36,15 @@ const TaxDisclaimer = () => {
38
36
  portalProps: {
39
37
  showTaxDisclaimer: showDisclaimer
40
38
  },
41
- children: showDisclaimer && /*#__PURE__*/_jsx("div", {
39
+ children: showDisclaimer && /*#__PURE__*/_jsx(Typography, {
40
+ variant: "caption",
41
+ display: "block",
42
+ align: "left",
43
+ component: "div",
42
44
  "data-test-id": "taxDisclaimer",
43
45
  "aria-hidden": true,
44
- className: "ui-shared__tax-disclaimer",
46
+ className: cx(classes.text, 'ui-shared__tax-disclaimer'),
45
47
  children: /*#__PURE__*/_jsx(I18n.Text, {
46
- className: classes.text,
47
48
  string: text || 'product.tax_disclaimer'
48
49
  })
49
50
  })
@@ -9,7 +9,8 @@ jest.mock('@shopgate/engage/styles', () => ({
9
9
  return {
10
10
  classes: {
11
11
  text: 'mock-class-text'
12
- }
12
+ },
13
+ cx: (...classes) => classes.filter(Boolean).join(' ')
13
14
  };
14
15
  };
15
16
  },
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { I18n } from '@shopgate/engage/components';
3
+ import { I18n, Typography } from '@shopgate/engage/components';
4
4
  import { makeStyles } from '@shopgate/engage/styles';
5
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  const ellipsisLine = {
@@ -9,16 +9,13 @@ const ellipsisLine = {
9
9
  whiteSpace: 'nowrap',
10
10
  textOverflow: 'ellipsis'
11
11
  };
12
- const useStyles = makeStyles()(theme => ({
12
+ const useStyles = makeStyles()({
13
13
  error: {
14
14
  position: 'absolute',
15
15
  bottom: 2,
16
- fontSize: 12,
17
- lineHeight: '14px',
18
- color: theme.palette.error.main,
19
16
  ...ellipsisLine
20
17
  }
21
- }));
18
+ });
22
19
 
23
20
  /**
24
21
  * Error message component.
@@ -37,7 +34,10 @@ const ErrorText = ({
37
34
  classes,
38
35
  cx
39
36
  } = useStyles();
40
- return /*#__PURE__*/_jsxs("div", {
37
+ return /*#__PURE__*/_jsxs(Typography, {
38
+ variant: "caption",
39
+ component: "div",
40
+ color: "error",
41
41
  id: `ariaError-${elementName}`,
42
42
  className: cx(classes.error, className, 'errorText'),
43
43
  "aria-live": "assertive",
@@ -3,14 +3,14 @@ import PropTypes from 'prop-types';
3
3
  import Input from '@shopgate/pwa-common/components/Input';
4
4
  import { makeStyles } from '@shopgate/engage/styles';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
- const useStyles = makeStyles()({
6
+ const useStyles = makeStyles()(theme => ({
7
7
  input: {
8
8
  position: 'relative',
9
9
  padding: 0,
10
10
  width: '100%',
11
11
  marginTop: 24,
12
12
  outline: 0,
13
- fontSize: 16,
13
+ fontSize: theme.typography.body1.fontSize,
14
14
  lineHeight: '19px'
15
15
  },
16
16
  multiLine: {
@@ -25,7 +25,7 @@ const useStyles = makeStyles()({
25
25
  lineHeight: '19px',
26
26
  verticalAlign: 'top'
27
27
  }
28
- });
28
+ }));
29
29
 
30
30
  /**
31
31
  * Creates an input or a multiLine based on the type prop.