@shopgate/pwa-ui-shared 7.33.3-beta.2 → 7.34.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.
|
@@ -4,7 +4,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
4
4
|
import spring from 'css-spring';
|
|
5
5
|
import { withForwardedRef } from '@shopgate/engage/core';
|
|
6
6
|
import { keyframes, makeStyles, useTheme } from '@shopgate/engage/styles';
|
|
7
|
-
import
|
|
7
|
+
import CartIcon from "../icons/CartIcon";
|
|
8
8
|
import TickIcon from "../icons/TickIcon";
|
|
9
9
|
import IndicatorCircle from "../IndicatorCircle";
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -163,7 +163,7 @@ const AddToCartButton = ({
|
|
|
163
163
|
}, [showCheckmark, onReset]);
|
|
164
164
|
let buttonStateClass = classes.buttonReady;
|
|
165
165
|
let tickIconClass = classes.icon;
|
|
166
|
-
let
|
|
166
|
+
let cartIconClass = classes.icon;
|
|
167
167
|
const iconOpacity = isLoading ? {
|
|
168
168
|
opacity: 0
|
|
169
169
|
} : {
|
|
@@ -186,7 +186,7 @@ const AddToCartButton = ({
|
|
|
186
186
|
buttonStateClass = classes.buttonDisabled;
|
|
187
187
|
} else if (showCheckmark) {
|
|
188
188
|
tickIconClass = cx(classes.icon, classes.springFromBottom);
|
|
189
|
-
|
|
189
|
+
cartIconClass = cx(classes.icon, classes.springToTop);
|
|
190
190
|
buttonStateClass = classes.buttonSuccess;
|
|
191
191
|
tickInlineStyle = {
|
|
192
192
|
transform: 'translate3d(0, -50%, 0)',
|
|
@@ -198,7 +198,7 @@ const AddToCartButton = ({
|
|
|
198
198
|
};
|
|
199
199
|
} else if (showCheckmark !== null) {
|
|
200
200
|
tickIconClass = cx(classes.icon, classes.springToBottom);
|
|
201
|
-
|
|
201
|
+
cartIconClass = cx(classes.icon, classes.springFromTop);
|
|
202
202
|
cartInlineStyle = {
|
|
203
203
|
transform: 'translate3d(0, -50%, 0)',
|
|
204
204
|
...iconOpacity
|
|
@@ -232,10 +232,10 @@ const AddToCartButton = ({
|
|
|
232
232
|
style: tickInlineStyle,
|
|
233
233
|
children: /*#__PURE__*/_jsx(TickIcon, {})
|
|
234
234
|
}), /*#__PURE__*/_jsx("div", {
|
|
235
|
-
className:
|
|
235
|
+
className: cartIconClass,
|
|
236
236
|
style: cartInlineStyle,
|
|
237
237
|
onAnimationEnd: handleCartAnimationEnd,
|
|
238
|
-
children: /*#__PURE__*/_jsx(
|
|
238
|
+
children: /*#__PURE__*/_jsx(CartIcon, {})
|
|
239
239
|
})]
|
|
240
240
|
});
|
|
241
241
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocatorIcon.d.ts","sourceRoot":"","sources":["../../icons/LocatorIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"LocatorIcon.d.ts","sourceRoot":"","sources":["../../icons/LocatorIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAMtE;;GAEG;AACH,QAAA,MAAM,OAAO,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,sBACoB,CAAC;AAEvE,eAAe,OAAO,CAAC"}
|
package/icons/LocatorIcon.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Icon from '@shopgate/pwa-common/components/Icon';
|
|
3
3
|
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const fallback = '<path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"/>';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* The locator icon component.
|
|
7
9
|
*/
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
const Locator = props => /*#__PURE__*/_jsx(Icon, {
|
|
10
|
-
content: themeConfig.icons.locator,
|
|
11
|
+
content: themeConfig.icons.locator || fallback,
|
|
11
12
|
...props
|
|
12
13
|
});
|
|
13
14
|
export default Locator;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/pwa-ui-shared",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.34.0-beta.1",
|
|
4
4
|
"description": "Shopgate's shared UI components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
"directory": "libraries/ui-shared"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@shopgate/pwa-ui-ios": "7.
|
|
14
|
-
"@shopgate/pwa-ui-material": "7.
|
|
13
|
+
"@shopgate/pwa-ui-ios": "7.34.0-beta.1",
|
|
14
|
+
"@shopgate/pwa-ui-material": "7.34.0-beta.1",
|
|
15
15
|
"css-spring": "git+https://github.com/shopgate/css-spring.git#master"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@shopgate/pwa-common": "7.
|
|
19
|
-
"@shopgate/pwa-common-commerce": "7.
|
|
18
|
+
"@shopgate/pwa-common": "7.34.0-beta.1",
|
|
19
|
+
"@shopgate/pwa-common-commerce": "7.34.0-beta.1",
|
|
20
20
|
"classnames": "2.5.1",
|
|
21
21
|
"react": "^17.0.2"
|
|
22
22
|
},
|