@shopgate/engage 7.32.0-beta.17 → 7.32.0-beta.19
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/components/Typography/Typography.d.ts +1 -1
- package/components/Typography/Typography.d.ts.map +1 -1
- package/components/Typography/Typography.js +2 -0
- package/filter/components/FilterItem/index.js +3 -0
- package/filter/components/PriceSlider/components/Label/index.js +11 -8
- package/filter/components/PriceSlider/index.js +1 -3
- package/package.json +7 -7
- package/product/components/ProductGridPrice/index.js +0 -5
- package/product/components/ProductRatingStars/ProductRatingStars.d.ts.map +1 -1
- package/product/components/ProductRatingStars/ProductRatingStars.js +2 -13
- package/product/components/Rating/index.js +2 -13
- package/styles/theme/createDefaultThemeOptions/index.d.ts.map +1 -1
- package/styles/theme/createDefaultThemeOptions/index.js +1 -2
- package/styles/theme/createTheme/createComponents.types.d.ts +6 -16
- package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
- package/styles/theme/createTheme/createComponents.types.js +6 -16
- package/styles/theme/createTheme/createTypography.d.ts +2 -1
- package/styles/theme/createTheme/createTypography.js +2 -1
|
@@ -9,7 +9,7 @@ declare const useStyles: (params: void, muiStyleOverridesParams?: {
|
|
|
9
9
|
props: Record<string, unknown>;
|
|
10
10
|
ownerState?: Record<string, unknown> | undefined;
|
|
11
11
|
} | undefined) => {
|
|
12
|
-
classes: Record<"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "caption" | "button" | "overline" | "root" | "fontWeightLight" | "fontWeightRegular" | "fontWeightMedium" | "fontWeightBold" | "gutterBottom" | "noWrap" | "paragraph" | "srOnly" | "alignLeft" | "alignCenter" | "alignRight" | "alignJustify" | "colorInherit" | "colorPrimary" | "colorSecondary" | "colorTextPrimary" | "colorTextSecondary" | "colorError" | "colorWarning" | "colorSuccess" | "displayInline" | "displayBlock", string>;
|
|
12
|
+
classes: Record<"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "caption" | "button" | "overline" | "price" | "root" | "fontWeightLight" | "fontWeightRegular" | "fontWeightMedium" | "fontWeightBold" | "gutterBottom" | "noWrap" | "paragraph" | "srOnly" | "alignLeft" | "alignCenter" | "alignRight" | "alignJustify" | "colorInherit" | "colorPrimary" | "colorSecondary" | "colorTextPrimary" | "colorTextSecondary" | "colorError" | "colorWarning" | "colorSuccess" | "displayInline" | "displayBlock", string>;
|
|
13
13
|
theme: import("@shopgate/engage/styles").Theme;
|
|
14
14
|
css: import("tss-react").Css;
|
|
15
15
|
cx: import("tss-react").Cx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../components/Typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAE/F,KAAK,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAUjE,QAAA,MAAM,SAAS;;
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../components/Typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAE/F,KAAK,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAUjE,QAAA,MAAM,SAAS;;cAyEQ,CAAA;;;;;;CA6DpB,CAAC;AAeJ;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CA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gErB,CAC7C,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,EAEpC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,KACxE,KAAK,CAAC,YAAY,GAAG,IAAI;AAJ9B,wBAI+B"}
|
|
@@ -63,6 +63,8 @@ const useStyles = makeStyles({
|
|
|
63
63
|
subtitle2: theme.typography.subtitle2,
|
|
64
64
|
/* Styles applied to the root element if `variant="overline"`. */
|
|
65
65
|
overline: theme.typography.overline,
|
|
66
|
+
/* Styles applied to the root element if `variant="price"`. */
|
|
67
|
+
price: theme.typography.price,
|
|
66
68
|
/* Styles applied to the root element if `variant="srOnly"`. Only accessible to screen readers. */
|
|
67
69
|
srOnly: {
|
|
68
70
|
position: 'absolute',
|
|
@@ -11,7 +11,11 @@ const {
|
|
|
11
11
|
} = appConfig;
|
|
12
12
|
const useStyles = makeStyles()(theme => ({
|
|
13
13
|
priceRange: {
|
|
14
|
-
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexWrap: 'wrap',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
columnGap: theme.spacing(0.5),
|
|
18
|
+
rowGap: theme.spacing(1)
|
|
15
19
|
},
|
|
16
20
|
editableField: {
|
|
17
21
|
color: theme.palette.text.primary,
|
|
@@ -67,11 +71,11 @@ const useStyles = makeStyles()(theme => ({
|
|
|
67
71
|
}));
|
|
68
72
|
|
|
69
73
|
/**
|
|
70
|
-
* Builds the width a price field needs to fit
|
|
71
|
-
* @param {number}
|
|
74
|
+
* Builds the width a price field needs to fit its current value.
|
|
75
|
+
* @param {number|string} value The value the field has to fit.
|
|
72
76
|
* @returns {string}
|
|
73
77
|
*/
|
|
74
|
-
const fieldWidth =
|
|
78
|
+
const fieldWidth = value => `${Math.max(String(value).length, 2) + 1}ch`;
|
|
75
79
|
|
|
76
80
|
/**
|
|
77
81
|
* The filter price range slider label component.
|
|
@@ -83,7 +87,6 @@ function Label(props) {
|
|
|
83
87
|
classes
|
|
84
88
|
} = useStyles();
|
|
85
89
|
const {
|
|
86
|
-
priceLength,
|
|
87
90
|
priceMax,
|
|
88
91
|
priceMin,
|
|
89
92
|
onChange
|
|
@@ -137,7 +140,6 @@ function Label(props) {
|
|
|
137
140
|
currency
|
|
138
141
|
}).format('0').replace('0.00', '');
|
|
139
142
|
return /*#__PURE__*/_jsxs("div", {
|
|
140
|
-
className: classes.priceRange,
|
|
141
143
|
children: [/*#__PURE__*/_jsx("span", {
|
|
142
144
|
className: classes.srOnly,
|
|
143
145
|
children: i18n.text('price.range', {
|
|
@@ -147,6 +149,7 @@ function Label(props) {
|
|
|
147
149
|
}), /*#__PURE__*/_jsxs(I18n.Text, {
|
|
148
150
|
string: "price.range",
|
|
149
151
|
"aria-hidden": true,
|
|
152
|
+
className: classes.priceRange,
|
|
150
153
|
children: [/*#__PURE__*/_jsx(I18n.Placeholder, {
|
|
151
154
|
forKey: "fromPrice",
|
|
152
155
|
children: /*#__PURE__*/_jsxs("span", {
|
|
@@ -166,7 +169,7 @@ function Label(props) {
|
|
|
166
169
|
onChange: handleChangeMin,
|
|
167
170
|
onClick: handleFieldClick,
|
|
168
171
|
style: {
|
|
169
|
-
width: fieldWidth(
|
|
172
|
+
width: fieldWidth(minValue)
|
|
170
173
|
},
|
|
171
174
|
className: classes.editableField,
|
|
172
175
|
"aria-label": i18n.text('price.range_from'),
|
|
@@ -192,7 +195,7 @@ function Label(props) {
|
|
|
192
195
|
onChange: handleChangeMax,
|
|
193
196
|
onClick: handleFieldClick,
|
|
194
197
|
style: {
|
|
195
|
-
width: fieldWidth(
|
|
198
|
+
width: fieldWidth(maxValue)
|
|
196
199
|
},
|
|
197
200
|
className: classes.editableField,
|
|
198
201
|
"aria-label": i18n.text('price.range_to'),
|
|
@@ -80,13 +80,11 @@ const PriceSlider = ({
|
|
|
80
80
|
}, [id, onChange]);
|
|
81
81
|
const priceMin = Math.floor(value[0] / 100);
|
|
82
82
|
const priceMax = Math.ceil(value[1] / 100);
|
|
83
|
-
const priceLength = (max / 100).toString().length;
|
|
84
83
|
const renderLabel = useCallback(() => /*#__PURE__*/_jsx(Label, {
|
|
85
|
-
priceLength: priceLength,
|
|
86
84
|
priceMax: priceMax,
|
|
87
85
|
priceMin: priceMin,
|
|
88
86
|
onChange: handleChange
|
|
89
|
-
}), [handleChange,
|
|
87
|
+
}), [handleChange, priceMax, priceMin]);
|
|
90
88
|
return /*#__PURE__*/_jsx(FilterItem, {
|
|
91
89
|
children: /*#__PURE__*/_jsx("div", {
|
|
92
90
|
"data-test-id": "priceRangeSlider",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/engage",
|
|
3
|
-
"version": "7.32.0-beta.
|
|
3
|
+
"version": "7.32.0-beta.19",
|
|
4
4
|
"description": "Shopgate's ENGAGE library.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@emotion/react": "^11.14.0",
|
|
20
20
|
"@shopgate/native-modules": "1.0.0-beta.34",
|
|
21
|
-
"@shopgate/pwa-common": "7.32.0-beta.
|
|
22
|
-
"@shopgate/pwa-common-commerce": "7.32.0-beta.
|
|
23
|
-
"@shopgate/pwa-core": "7.32.0-beta.
|
|
24
|
-
"@shopgate/pwa-ui-ios": "7.32.0-beta.
|
|
25
|
-
"@shopgate/pwa-ui-material": "7.32.0-beta.
|
|
26
|
-
"@shopgate/pwa-ui-shared": "7.32.0-beta.
|
|
21
|
+
"@shopgate/pwa-common": "7.32.0-beta.19",
|
|
22
|
+
"@shopgate/pwa-common-commerce": "7.32.0-beta.19",
|
|
23
|
+
"@shopgate/pwa-core": "7.32.0-beta.19",
|
|
24
|
+
"@shopgate/pwa-ui-ios": "7.32.0-beta.19",
|
|
25
|
+
"@shopgate/pwa-ui-material": "7.32.0-beta.19",
|
|
26
|
+
"@shopgate/pwa-ui-shared": "7.32.0-beta.19",
|
|
27
27
|
"@stripe/react-stripe-js": "^1.16.5",
|
|
28
28
|
"@stripe/stripe-js": "^1.44.1",
|
|
29
29
|
"@virtuous/conductor": "~2.5.0",
|
|
@@ -9,9 +9,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
9
9
|
priceWrapper: {
|
|
10
10
|
alignItems: 'center'
|
|
11
11
|
},
|
|
12
|
-
strikedPrice: {
|
|
13
|
-
fontSize: `calc(${theme.components.price.fontSize} * 0.75)`
|
|
14
|
-
},
|
|
15
12
|
basicPrice: {
|
|
16
13
|
fontSize: theme.typography.body2.fontSize
|
|
17
14
|
}
|
|
@@ -48,13 +45,11 @@ const ProductGridPrice = ({
|
|
|
48
45
|
})
|
|
49
46
|
}), price.msrp > 0 && price.unitPrice !== price.msrp && /*#__PURE__*/_jsx(Grid.Item, {
|
|
50
47
|
children: /*#__PURE__*/_jsx(PriceStriked, {
|
|
51
|
-
className: classes.strikedPrice,
|
|
52
48
|
value: price.msrp,
|
|
53
49
|
currency: price.currency
|
|
54
50
|
})
|
|
55
51
|
}), !price.msrp && price.unitPriceStriked > 0 && price.unitPrice !== price.unitPriceStriked && /*#__PURE__*/_jsx(Grid.Item, {
|
|
56
52
|
children: /*#__PURE__*/_jsx(PriceStriked, {
|
|
57
|
-
className: classes.strikedPrice,
|
|
58
53
|
value: price.unitPriceStriked,
|
|
59
54
|
currency: price.currency
|
|
60
55
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductRatingStars.d.ts","sourceRoot":"","sources":["../../../../product/components/ProductRatingStars/ProductRatingStars.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductRatingStars.d.ts","sourceRoot":"","sources":["../../../../product/components/ProductRatingStars/ProductRatingStars.tsx"],"names":[],"mappings":"AAeA,UAAU,WAAW;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;CAClC;mFAQE,WAAW;AAmBd,wBAAwC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { memo
|
|
1
|
+
import { memo } from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
3
|
import appConfig from '@shopgate/pwa-common/helpers/config';
|
|
4
4
|
import { getProductRating } from '@shopgate/pwa-common-commerce/product/selectors/product';
|
|
5
5
|
import { RatingStars } from '@shopgate/engage/components';
|
|
6
6
|
import useShowEmptyRatingStars from "../../hooks/useShowEmptyRatingStars";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const {
|
|
9
|
-
hasReviews
|
|
10
|
-
} = appConfig;
|
|
11
8
|
/**
|
|
12
9
|
* The product RatingStars component.
|
|
13
10
|
*/
|
|
@@ -21,15 +18,7 @@ const ProductRatingStars = ({
|
|
|
21
18
|
productId
|
|
22
19
|
}));
|
|
23
20
|
const showEmptyRatingStars = useShowEmptyRatingStars();
|
|
24
|
-
const showRatings =
|
|
25
|
-
if (hasReviews && (rating?.average ?? 0) > 0) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
if (hasReviews && showEmptyRatingStars && rating) {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
return false;
|
|
32
|
-
}, [rating, showEmptyRatingStars]);
|
|
21
|
+
const showRatings = appConfig.hasReviews && ((rating?.average ?? 0) > 0 || showEmptyRatingStars && Boolean(rating));
|
|
33
22
|
if (!showRatings) {
|
|
34
23
|
return null;
|
|
35
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { memo
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
4
|
import appConfig from '@shopgate/pwa-common/helpers/config';
|
|
@@ -9,9 +9,6 @@ import RatingCount from '@shopgate/engage/reviews/components/Reviews/components/
|
|
|
9
9
|
import { useShowEmptyRatingStars } from '@shopgate/engage/product/hooks';
|
|
10
10
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const {
|
|
13
|
-
hasReviews
|
|
14
|
-
} = appConfig;
|
|
15
12
|
const useStyles = makeStyles()(theme => ({
|
|
16
13
|
container: {
|
|
17
14
|
display: 'flex',
|
|
@@ -47,15 +44,7 @@ const Rating = ({
|
|
|
47
44
|
productId
|
|
48
45
|
}));
|
|
49
46
|
const showEmptyRatingStars = useShowEmptyRatingStars();
|
|
50
|
-
const showRatings =
|
|
51
|
-
if (hasReviews && (rating?.average ?? 0) > 0) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
if (hasReviews && showEmptyRatingStars && rating) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
}, [rating, showEmptyRatingStars]);
|
|
47
|
+
const showRatings = appConfig.hasReviews && ((rating?.average ?? 0) > 0 || showEmptyRatingStars && Boolean(rating));
|
|
59
48
|
return /*#__PURE__*/_jsx(SurroundPortals, {
|
|
60
49
|
portalName: PRODUCT_RATING,
|
|
61
50
|
children: showRatings && /*#__PURE__*/_jsxs("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createDefaultThemeOptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD;;GAEG;AACH,KAAK,mBAAmB,GAAG;IACzB,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,iBAAwB,mBAAwB,KAC/C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createDefaultThemeOptions/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD;;GAEG;AACH,KAAK,mBAAmB,GAAG;IACzB,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,iBAAwB,mBAAwB,KAC/C,YA2ND,CAAC"}
|
|
@@ -56,7 +56,7 @@ export const createDefaultThemeOptions = ({
|
|
|
56
56
|
},
|
|
57
57
|
price: {
|
|
58
58
|
vars: {
|
|
59
|
-
|
|
59
|
+
saleColor: getCSSCustomProp('--color-primary')
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
input: {
|
|
@@ -96,7 +96,6 @@ export const createDefaultThemeOptions = ({
|
|
|
96
96
|
border: '#E6E6E6',
|
|
97
97
|
inactive: 'var(--tab-bar-item-default-color, #747474)',
|
|
98
98
|
active: `var(--tab-bar-item-highlighted-color, ${getCSSCustomProp('--color-secondary')})`,
|
|
99
|
-
floatingBorderRadius: 'var(--tab-bar-floating-border-radius, 16px)',
|
|
100
99
|
floatingBoxShadow: 'var(--tab-bar-floating-box-shadow, 0 0 12px rgba(0, 0, 0, 0.24))',
|
|
101
100
|
floatingMinHeight: 'var(--tab-bar-floating-min-height, 59px)',
|
|
102
101
|
badgeColor: 'var(--tab-bar-item-badge-color, #FFFFFF)',
|
|
@@ -104,13 +104,9 @@ export declare const componentsSchema: {
|
|
|
104
104
|
};
|
|
105
105
|
readonly price: {
|
|
106
106
|
readonly vars: {
|
|
107
|
-
readonly
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly striked: "";
|
|
111
|
-
readonly fontFamily: "";
|
|
112
|
-
readonly fontWeight: "";
|
|
113
|
-
readonly fontSize: "";
|
|
107
|
+
readonly defaultColor: "";
|
|
108
|
+
readonly saleColor: "";
|
|
109
|
+
readonly strikedColor: "";
|
|
114
110
|
};
|
|
115
111
|
};
|
|
116
112
|
readonly button: {
|
|
@@ -182,7 +178,6 @@ export declare const componentsSchema: {
|
|
|
182
178
|
readonly border: "";
|
|
183
179
|
readonly inactive: "";
|
|
184
180
|
readonly active: "";
|
|
185
|
-
readonly floatingBorderRadius: "";
|
|
186
181
|
readonly floatingBoxShadow: "";
|
|
187
182
|
readonly floatingMinHeight: "";
|
|
188
183
|
readonly badgeColor: "";
|
|
@@ -282,13 +277,9 @@ export declare const componentsDefaults: {
|
|
|
282
277
|
};
|
|
283
278
|
price: {
|
|
284
279
|
vars: {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
striked: (t: Theme) => string;
|
|
289
|
-
fontFamily: string;
|
|
290
|
-
fontWeight: string;
|
|
291
|
-
fontSize: string;
|
|
280
|
+
defaultColor: (t: Theme) => string;
|
|
281
|
+
saleColor: (t: Theme) => string;
|
|
282
|
+
strikedColor: (t: Theme) => string;
|
|
292
283
|
};
|
|
293
284
|
};
|
|
294
285
|
input: {
|
|
@@ -345,7 +336,6 @@ export declare const componentsDefaults: {
|
|
|
345
336
|
border: string;
|
|
346
337
|
inactive: string;
|
|
347
338
|
active: (t: Theme) => string;
|
|
348
|
-
floatingBorderRadius: string;
|
|
349
339
|
floatingBoxShadow: string;
|
|
350
340
|
floatingMinHeight: string;
|
|
351
341
|
badgeColor: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponents.types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createComponents.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GA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4BAA4B,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;CAAE,GAC3E,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,uBAAuB,CAAC,OAAO,IAAI;KAC5C,CAAC,IAAI,MAAM,OAAO,GACnB,OAAO,CAAC,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,KAAK,CAAA;KAAE,GACtC,oBAAoB,CAAC,KAAK,CAAC,GAC3B,KAAK;CACR,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"createComponents.types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createComponents.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,CAAC,MAAM,IAClC,MAAM,GACN,MAAM,GACN,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,CAAC,OAAO,IACtC,OAAO,SAAS,IAAI,GAAG,MAAM,GAC3B,OAAO,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,SAAS,oBAAoB,CAAC,CAAC,CAAC,EAAE,GACzE,OAAO,SAAS,MAAM,GAAG;KAAG,CAAC,IAAI,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAAE,GACnF,MAAM,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyJnB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqJD,CAAC;AAE/B,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAC5B,4BAA4B,CAAC,OAAO,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAG/D,MAAM,MAAM,iBAAiB,GAC3B,4BAA4B,CAAC,OAAO,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAG/D,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEvE,MAAM,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -92,13 +92,9 @@ export const componentsSchema = {
|
|
|
92
92
|
},
|
|
93
93
|
price: {
|
|
94
94
|
vars: {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
striked: '',
|
|
99
|
-
fontFamily: '',
|
|
100
|
-
fontWeight: '',
|
|
101
|
-
fontSize: ''
|
|
95
|
+
defaultColor: '',
|
|
96
|
+
saleColor: '',
|
|
97
|
+
strikedColor: ''
|
|
102
98
|
}
|
|
103
99
|
},
|
|
104
100
|
button: {
|
|
@@ -170,7 +166,6 @@ export const componentsSchema = {
|
|
|
170
166
|
border: '',
|
|
171
167
|
inactive: '',
|
|
172
168
|
active: '',
|
|
173
|
-
floatingBorderRadius: '',
|
|
174
169
|
floatingBoxShadow: '',
|
|
175
170
|
floatingMinHeight: '',
|
|
176
171
|
badgeColor: '',
|
|
@@ -271,13 +266,9 @@ export const componentsDefaults = {
|
|
|
271
266
|
},
|
|
272
267
|
price: {
|
|
273
268
|
vars: {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
striked: t => t.palette.grey.dark,
|
|
278
|
-
fontFamily: 'inherit',
|
|
279
|
-
fontWeight: 'inherit',
|
|
280
|
-
fontSize: '16px'
|
|
269
|
+
defaultColor: t => t.palette.text.primary,
|
|
270
|
+
saleColor: t => t.palette.primary.main,
|
|
271
|
+
strikedColor: t => t.palette.grey.dark
|
|
281
272
|
}
|
|
282
273
|
},
|
|
283
274
|
input: {
|
|
@@ -334,7 +325,6 @@ export const componentsDefaults = {
|
|
|
334
325
|
border: '#E6E6E6',
|
|
335
326
|
inactive: '#747474',
|
|
336
327
|
active: t => t.palette.secondary.main,
|
|
337
|
-
floatingBorderRadius: '16px',
|
|
338
328
|
floatingBoxShadow: '0 0 12px rgba(0, 0, 0, 0.24)',
|
|
339
329
|
floatingMinHeight: '59px',
|
|
340
330
|
badgeColor: '#FFFFFF',
|
|
@@ -114,7 +114,8 @@ export default function createTypography(palette, typography, cssVarPrefix = 'sg
|
|
|
114
114
|
body2: buildVariant('fontWeightRegular', 14, 1.43),
|
|
115
115
|
button: buildVariant(buttonFontWeight > fontWeightMedium ? 'fontWeightBold' : 'fontWeightMedium', 16, 1.75, caseButton),
|
|
116
116
|
caption: buildVariant('fontWeightRegular', 12, 1.66),
|
|
117
|
-
overline: buildVariant('fontWeightRegular', 12, 2.66, caseAllCaps)
|
|
117
|
+
overline: buildVariant('fontWeightRegular', 12, 2.66, caseAllCaps),
|
|
118
|
+
price: buildVariant('fontWeightRegular', 16, 1.5)
|
|
118
119
|
};
|
|
119
120
|
return _merge({
|
|
120
121
|
pxToRem,
|