@shopgate/pwa-ui-ios 7.31.6 → 7.32.0-beta.10

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';
@@ -13,19 +12,20 @@ import Center from "./components/Center";
13
12
  import Left from "./components/Left";
14
13
  import Below from "./components/Below";
15
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
- const useStyles = makeStyles()({
15
+ const useStyles = makeStyles()(theme => ({
17
16
  outer: {
18
17
  boxSizing: 'content-box',
19
18
  minHeight: 44,
20
- paddingTop: 'var(--safe-area-inset-top)'
19
+ paddingTop: theme.layout.safeArea.top
21
20
  },
22
21
  inner: {
23
22
  display: 'flex',
23
+ alignItems: 'center',
24
24
  justifyContent: 'space-between',
25
25
  position: 'relative',
26
26
  zIndex: 1
27
27
  }
28
- });
28
+ }));
29
29
 
30
30
  /**
31
31
  * Updates the --app-bar-height custom property
@@ -100,7 +100,7 @@ const AppBar = ({
100
100
  };
101
101
  AppBar.defaultProps = {
102
102
  'aria-hidden': null,
103
- backgroundColor: themeColors.light,
103
+ backgroundColor: 'var(--sg-components-appBar-background)',
104
104
  below: null,
105
105
  center: null,
106
106
  classes: {
@@ -109,7 +109,7 @@ AppBar.defaultProps = {
109
109
  },
110
110
  left: null,
111
111
  right: null,
112
- textColor: themeColors.dark
112
+ textColor: 'var(--sg-components-appBar-color)'
113
113
  };
114
114
  AppBar.Field = Field;
115
115
  AppBar.Icon = Icon;
@@ -1,33 +1,44 @@
1
1
  import React, { memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { I18n, Button } from '@shopgate/engage/components';
3
+ import { I18n } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { makeStyles } from '@shopgate/engage/styles';
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  const borderColor = 'rgba(0,0,0,0.2)';
8
+ const pressedColor = 'rgba(0,0,0,0.08)';
9
+ const hoverColor = 'rgba(0,0,0,0.04)';
7
10
  const useStyles = makeStyles()(theme => ({
8
11
  button: {
9
- '&& > *': {
12
+ '& > *': {
10
13
  color: 'var(--color-button-dialog-ios, #1a73e8)'
11
14
  },
12
- '&&': {
13
- fontWeight: 400,
14
- minWidth: '50%',
15
- flexGrow: 1,
16
- paddingTop: 10,
17
- paddingBottom: 10
18
- },
15
+ fontWeight: theme.typography.fontWeightRegular,
16
+ minWidth: '50%',
17
+ flexGrow: 1,
18
+ lineHeight: 1.2,
19
+ paddingTop: 11,
20
+ paddingBottom: 11,
19
21
  marginBottom: -1,
20
22
  marginRight: theme.spacing(-0.5),
23
+ '&:active': {
24
+ background: pressedColor
25
+ },
26
+ '&:focus-visible': {
27
+ background: pressedColor
28
+ },
29
+ '@media (hover: hover)': {
30
+ '&:hover': {
31
+ background: hoverColor
32
+ }
33
+ },
21
34
  '&:not(:last-child)': {
22
- borderRadius: '0 !important',
35
+ borderRadius: 0,
23
36
  borderRight: `0.5px solid ${borderColor}`,
24
37
  borderBottom: `0.5px solid ${borderColor}`
25
38
  }
26
39
  },
27
40
  buttonPrimary: {
28
- '&&': {
29
- fontWeight: 400
30
- }
41
+ fontWeight: theme.typography.fontWeightRegular
31
42
  },
32
43
  buttonText: {
33
44
  overflow: 'hidden',
@@ -54,10 +65,11 @@ const Buttons = ({
54
65
  disabled = false
55
66
  }) => /*#__PURE__*/_jsx(Button, {
56
67
  className: cx(classes.button, type === 'primary' && classes.buttonPrimary),
57
- type: "primary",
68
+ variant: "link",
69
+ color: "secondary",
58
70
  onClick: action,
59
71
  disabled: disabled,
60
- flat: true,
72
+ disableRipple: true,
61
73
  children: /*#__PURE__*/_jsx(I18n.Text, {
62
74
  className: classes.buttonText,
63
75
  string: label
@@ -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: {
@@ -2,6 +2,6 @@ import type { IconProps } from '@shopgate/pwa-common/components/Icon';
2
2
  /**
3
3
  * The cart icon component.
4
4
  */
5
- declare const CartIcon: (props: Omit<IconProps, "content">) => import("react/jsx-runtime").JSX.Element;
5
+ declare const CartIcon: (props: Omit<IconProps, "content">) => import("react").JSX.Element;
6
6
  export default CartIcon;
7
7
  //# sourceMappingURL=CartIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CartIcon.d.ts","sourceRoot":"","sources":["../../icons/CartIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,4CACI,CAAC;AAExD,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"CartIcon.d.ts","sourceRoot":"","sources":["../../icons/CartIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,gCACI,CAAC;AAExD,eAAe,QAAQ,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import type { IconProps } from '@shopgate/pwa-common/components/Icon';
2
3
  /**
3
4
  * The filter icon component.
4
5
  */
5
- declare const Filter: (props: Omit<IconProps, "content">) => import("react/jsx-runtime").JSX.Element;
6
+ declare const Filter: (props: Omit<IconProps, "content">) => React.JSX.Element;
6
7
  export default Filter;
7
8
  //# sourceMappingURL=FilterIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterIcon.d.ts","sourceRoot":"","sources":["../../icons/FilterIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,MAAM,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,4CACQ,CAAC;AAE1D,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"FilterIcon.d.ts","sourceRoot":"","sources":["../../icons/FilterIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,MAAM,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,sBACQ,CAAC;AAE1D,eAAe,MAAM,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import type { IconProps } from '@shopgate/pwa-common/components/Icon';
2
3
  /**
3
4
  * The home icon component.
4
5
  */
5
- declare const Home: (props: Omit<IconProps, "content">) => import("react/jsx-runtime").JSX.Element;
6
+ declare const Home: (props: Omit<IconProps, "content">) => React.JSX.Element;
6
7
  export default Home;
7
8
  //# sourceMappingURL=HomeIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HomeIcon.d.ts","sourceRoot":"","sources":["../../icons/HomeIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGtE;;GAEG;AACH,QAAA,MAAM,IAAI,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,4CAE9C,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"HomeIcon.d.ts","sourceRoot":"","sources":["../../icons/HomeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAGtE;;GAEG;AACH,QAAA,MAAM,IAAI,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,sBAE9C,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import type { IconProps } from '@shopgate/pwa-common/components/Icon';
2
3
  /**
3
4
  * The Share icon component.
4
5
  */
5
- declare const ShareIcon: (props: Omit<IconProps, "content">) => import("react/jsx-runtime").JSX.Element;
6
+ declare const ShareIcon: (props: Omit<IconProps, "content">) => React.JSX.Element;
6
7
  export default ShareIcon;
7
8
  //# sourceMappingURL=ShareIcon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShareIcon.d.ts","sourceRoot":"","sources":["../../icons/ShareIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,4CACI,CAAC;AAEzD,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"ShareIcon.d.ts","sourceRoot":"","sources":["../../icons/ShareIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,SAAS,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,sBACI,CAAC;AAEzD,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-ui-ios",
3
- "version": "7.31.6",
3
+ "version": "7.32.0-beta.10",
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.6",
8
+ "@shopgate/pwa-common": "7.32.0-beta.10",
9
9
  "react": "^17.0.2"
10
10
  },
11
11
  "peerDependencies": {