@shopgate/pwa-ui-ios 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.
@@ -2,13 +2,13 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { makeStyles } from '@shopgate/engage/styles';
4
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
- const useStyles = makeStyles()({
5
+ const useStyles = makeStyles()(theme => ({
6
6
  root: {
7
7
  alignItems: 'center',
8
8
  color: 'inherit',
9
9
  display: 'flex',
10
10
  flexShrink: 0,
11
- fontSize: 24,
11
+ fontSize: theme.components.icon.medium,
12
12
  height: 44,
13
13
  justifyContent: 'center',
14
14
  outline: 0,
@@ -17,7 +17,7 @@ const useStyles = makeStyles()({
17
17
  width: 44,
18
18
  zIndex: 1
19
19
  }
20
- });
20
+ }));
21
21
 
22
22
  /**
23
23
  * The AppBarIcon component.
@@ -1,21 +1,16 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
+ import { Typography } from '@shopgate/engage/components';
3
4
  import { makeStyles } from '@shopgate/engage/styles';
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  const useStyles = makeStyles()({
6
7
  root: {
7
- fontSize: 17,
8
- fontWeight: 600,
9
8
  flexGrow: 1,
10
9
  lineHeight: '44px',
11
10
  left: 90,
12
- overflow: 'hidden',
13
11
  position: 'absolute',
14
12
  right: 90,
15
- textAlign: 'center',
16
- textOverflow: 'ellipsis',
17
- top: 0,
18
- whiteSpace: 'nowrap'
13
+ top: 0
19
14
  }
20
15
  });
21
16
 
@@ -34,15 +29,18 @@ const AppBarTitle = ({
34
29
  if (!title) {
35
30
  return null;
36
31
  }
37
- return /*#__PURE__*/_jsx("div", {
32
+ return /*#__PURE__*/_jsx(Typography, {
33
+ variant: "h4",
34
+ component: "div",
35
+ noWrap: true,
36
+ align: "center",
37
+ fontWeight: "bold",
38
38
  className: cx(classes.root, 'theme__app-bar__title'),
39
39
  role: "heading",
40
40
  "aria-level": "1",
41
41
  "aria-live": "polite",
42
42
  tabIndex: -1,
43
- "data-test-id": `title: ${title}`
44
- // eslint-disable-next-line react/no-danger
45
- ,
43
+ "data-test-id": `title: ${title}`,
46
44
  dangerouslySetInnerHTML: {
47
45
  __html: title
48
46
  }
package/AppBar/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import React, { useMemo, useRef, useLayoutEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { getAbsoluteHeight } from '@shopgate/pwa-common/helpers/dom';
4
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
5
4
  import { makeStyles, setCSSCustomProp } from '@shopgate/engage/styles';
6
5
  import { SurroundPortals } from '@shopgate/engage/components';
7
6
  import { APP_BAR_CONTENT } from '@shopgate/engage/core/constants';
@@ -100,7 +99,7 @@ const AppBar = ({
100
99
  };
101
100
  AppBar.defaultProps = {
102
101
  'aria-hidden': null,
103
- backgroundColor: themeColors.light,
102
+ backgroundColor: 'var(--sg-palette-background-default)',
104
103
  below: null,
105
104
  center: null,
106
105
  classes: {
@@ -109,7 +108,7 @@ AppBar.defaultProps = {
109
108
  },
110
109
  left: null,
111
110
  right: null,
112
- textColor: themeColors.dark
111
+ textColor: 'var(--sg-palette-text-primary)'
113
112
  };
114
113
  AppBar.Field = Field;
115
114
  AppBar.Icon = Icon;
@@ -10,7 +10,7 @@ const useStyles = makeStyles()(theme => ({
10
10
  color: 'var(--color-button-dialog-ios, #1a73e8)'
11
11
  },
12
12
  '&&': {
13
- fontWeight: 400,
13
+ fontWeight: theme.typography.fontWeightRegular,
14
14
  minWidth: '50%',
15
15
  flexGrow: 1,
16
16
  paddingTop: 10,
@@ -26,7 +26,7 @@ const useStyles = makeStyles()(theme => ({
26
26
  },
27
27
  buttonPrimary: {
28
28
  '&&': {
29
- fontWeight: 400
29
+ fontWeight: theme.typography.fontWeightRegular
30
30
  }
31
31
  },
32
32
  buttonText: {
@@ -1,17 +1,15 @@
1
1
  import React, { memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
3
+ import { Typography } from '@shopgate/engage/components';
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
  body: {
8
- color: themeColors.dark,
8
+ color: theme.palette.common.black,
9
9
  flexGrow: 1,
10
- fontSize: '13px',
11
- textAlign: 'center',
12
10
  overflow: 'auto'
13
11
  }
14
- });
12
+ }));
15
13
 
16
14
  /**
17
15
  * @param {Object} props The component props.
@@ -26,7 +24,10 @@ const Content = ({
26
24
  if (!content) {
27
25
  return null;
28
26
  }
29
- return /*#__PURE__*/_jsx("div", {
27
+ return /*#__PURE__*/_jsx(Typography, {
28
+ variant: "body2",
29
+ component: "div",
30
+ align: "center",
30
31
  className: classes.body,
31
32
  id: "basicDialogDesc",
32
33
  children: content
@@ -3,12 +3,12 @@ import PropTypes from 'prop-types';
3
3
  import { I18n, Ellipsis } from '@shopgate/engage/components';
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
  title: {
8
8
  textAlign: 'center',
9
- fontWeight: 600
9
+ fontWeight: theme.typography.fontWeightBold
10
10
  }
11
- });
11
+ }));
12
12
 
13
13
  /**
14
14
  * @param {Object} props The component props.
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { FocusTrap } from '@shopgate/engage/a11y/components';
4
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
5
4
  import { makeStyles } from '@shopgate/engage/styles';
6
5
  import Title from "./components/Title";
7
6
  import Content from "./components/Content";
@@ -18,7 +17,7 @@ const useStyles = makeStyles()({
18
17
  width: 270,
19
18
  maxHeight: `calc(100vh - ${outerGap * 2}px)`,
20
19
  borderRadius: 14,
21
- background: themeColors.lightTransparent,
20
+ background: 'rgba(255, 255, 255, 0.82)',
22
21
  backdropFilter: 'blur(20px)'
23
22
  },
24
23
  content: {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-ui-ios",
3
- "version": "7.31.4-beta.1",
3
+ "version": "7.32.0-beta.1",
4
4
  "description": "Shopgate's iOS UI components.",
5
5
  "main": "index.js",
6
6
  "license": "Apache-2.0",
7
7
  "devDependencies": {
8
- "@shopgate/pwa-common": "7.31.4-beta.1",
8
+ "@shopgate/pwa-common": "7.32.0-beta.1",
9
9
  "react": "^17.0.2"
10
10
  },
11
11
  "peerDependencies": {