@citygross/components 0.13.3 → 0.13.5
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/build/@types/components/Box/Box.d.ts +0 -1
- package/build/@types/components/Box/Box.styles.d.ts +6 -7
- package/build/cjs/components/src/components/Box/Box.styles.js +1 -1
- package/build/cjs/components/src/components/CartSummary/CartSummary.js +4 -6
- package/build/cjs/components/src/components/CartSummary/CartSummary.js.map +1 -1
- package/build/es/components/src/components/Box/Box.styles.js +1 -1
- package/build/es/components/src/components/CartSummary/CartSummary.js +4 -6
- package/build/es/components/src/components/CartSummary/CartSummary.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
2
3
|
background: string;
|
|
3
|
-
rounded?: boolean;
|
|
4
|
-
padding?: number;
|
|
5
|
-
paddingVertical?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare const BoxContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TBoxContainer, never>;
|
|
8
|
-
export {};
|
|
4
|
+
rounded?: boolean | undefined;
|
|
5
|
+
padding?: number | undefined;
|
|
6
|
+
paddingVertical?: number | undefined;
|
|
7
|
+
} & import("react").HTMLAttributes<HTMLDivElement>, never>;
|
|
@@ -14,7 +14,7 @@ var BoxContainer = styled__default["default"].div(templateObject_1 || (templateO
|
|
|
14
14
|
return props.padding &&
|
|
15
15
|
"\n @media (min-width: ".concat((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.breakpoints) === null || _b === void 0 ? void 0 : _b.lg, "px) {\n padding: ").concat(props.paddingVertical
|
|
16
16
|
? props.paddingVertical
|
|
17
|
-
: (_c = props.padding) !== null && _c !== void 0 ? _c : (_e = (_d = props === null || props === void 0 ? void 0 : props.theme) === null || _d === void 0 ? void 0 : _d.spacings) === null || _e === void 0 ? void 0 : _e.lg, "px ").concat(props.padding ? props.padding : (_g = (_f = props === null || props === void 0 ? void 0 : props.theme) === null || _f === void 0 ? void 0 : _f.spacings) === null || _g === void 0 ? void 0 : _g.lg, "px;\n
|
|
17
|
+
: (_c = props.padding) !== null && _c !== void 0 ? _c : (_e = (_d = props === null || props === void 0 ? void 0 : props.theme) === null || _d === void 0 ? void 0 : _d.spacings) === null || _e === void 0 ? void 0 : _e.lg, "px ").concat(props.padding ? props.padding : (_g = (_f = props === null || props === void 0 ? void 0 : props.theme) === null || _f === void 0 ? void 0 : _f.spacings) === null || _g === void 0 ? void 0 : _g.lg, "px;\n\n }\n\n padding: ").concat(props.paddingVertical ? props.paddingVertical : props.padding, "px ").concat(props.padding, "px");
|
|
18
18
|
});
|
|
19
19
|
var templateObject_1;
|
|
20
20
|
|
|
@@ -33,8 +33,8 @@ var calculateSummaryLine = function (items) {
|
|
|
33
33
|
return sumOfItems;
|
|
34
34
|
};
|
|
35
35
|
function CartSummary(_a) {
|
|
36
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
37
|
-
var
|
|
36
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
37
|
+
var _u = _a.saveLabel, saveLabel = _u === void 0 ? 'Varav rabatt' : _u, _v = _a.totalLabel, totalLabel = _v === void 0 ? 'Totalt' : _v, _w = _a.itemsLabel, itemsLabel = _w === void 0 ? 'Varor' : _w, cartSummary = _tslib.__rest(_a, ["saveLabel", "totalLabel", "itemsLabel"]);
|
|
38
38
|
var charges = (_b = cartSummary.charges) !== null && _b !== void 0 ? _b : [];
|
|
39
39
|
var bags = (_c = cartSummary.bags) !== null && _c !== void 0 ? _c : [];
|
|
40
40
|
var groceries = (_d = cartSummary.groceries) !== null && _d !== void 0 ? _d : [];
|
|
@@ -116,10 +116,8 @@ function CartSummary(_a) {
|
|
|
116
116
|
React__default["default"].createElement(typography.H3, { fontWeight: "semiBold" }, totalLabel),
|
|
117
117
|
React__default["default"].createElement(typography.H3, { fontWeight: "semiBold" }, utils.formatPrice(cartSummary.totalAmount))),
|
|
118
118
|
cartSummary.totalDiscount > 0 && (React__default["default"].createElement(CartSummary_styles.CartLine, { role: "listitem", "aria-label": "".concat(saveLabel, " ").concat(utils.formatPrice(cartSummary.totalDiscount)) },
|
|
119
|
-
React__default["default"].createElement(typography.BodyText, {
|
|
120
|
-
React__default["default"].createElement(typography.BodyText, { color: (
|
|
121
|
-
"-",
|
|
122
|
-
utils.formatPrice(cartSummary.totalDiscount))))))));
|
|
119
|
+
React__default["default"].createElement(typography.BodyText, { size: typography.TextTypes.TextSize.SMALL }, saveLabel),
|
|
120
|
+
React__default["default"].createElement(typography.BodyText, { color: (_t = index.theme === null || index.theme === void 0 ? void 0 : index.theme.palette) === null || _t === void 0 ? void 0 : _t.alertRed, size: typography.TextTypes.TextSize.SMALL, "aria-label": "Discount ".concat(utils.formatPrice(cartSummary.totalDiscount)) }, utils.formatPrice(cartSummary.totalDiscount))))))));
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
exports.CartSummary = CartSummary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartSummary.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartSummary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ var BoxContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemp
|
|
|
6
6
|
return props.padding &&
|
|
7
7
|
"\n @media (min-width: ".concat((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.breakpoints) === null || _b === void 0 ? void 0 : _b.lg, "px) {\n padding: ").concat(props.paddingVertical
|
|
8
8
|
? props.paddingVertical
|
|
9
|
-
: (_c = props.padding) !== null && _c !== void 0 ? _c : (_e = (_d = props === null || props === void 0 ? void 0 : props.theme) === null || _d === void 0 ? void 0 : _d.spacings) === null || _e === void 0 ? void 0 : _e.lg, "px ").concat(props.padding ? props.padding : (_g = (_f = props === null || props === void 0 ? void 0 : props.theme) === null || _f === void 0 ? void 0 : _f.spacings) === null || _g === void 0 ? void 0 : _g.lg, "px;\n
|
|
9
|
+
: (_c = props.padding) !== null && _c !== void 0 ? _c : (_e = (_d = props === null || props === void 0 ? void 0 : props.theme) === null || _d === void 0 ? void 0 : _d.spacings) === null || _e === void 0 ? void 0 : _e.lg, "px ").concat(props.padding ? props.padding : (_g = (_f = props === null || props === void 0 ? void 0 : props.theme) === null || _f === void 0 ? void 0 : _f.spacings) === null || _g === void 0 ? void 0 : _g.lg, "px;\n\n }\n\n padding: ").concat(props.paddingVertical ? props.paddingVertical : props.padding, "px ").concat(props.padding, "px");
|
|
10
10
|
});
|
|
11
11
|
var templateObject_1;
|
|
12
12
|
|
|
@@ -25,8 +25,8 @@ var calculateSummaryLine = function (items) {
|
|
|
25
25
|
return sumOfItems;
|
|
26
26
|
};
|
|
27
27
|
function CartSummary(_a) {
|
|
28
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
29
|
-
var
|
|
28
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
29
|
+
var _u = _a.saveLabel, saveLabel = _u === void 0 ? 'Varav rabatt' : _u, _v = _a.totalLabel, totalLabel = _v === void 0 ? 'Totalt' : _v, _w = _a.itemsLabel, itemsLabel = _w === void 0 ? 'Varor' : _w, cartSummary = __rest(_a, ["saveLabel", "totalLabel", "itemsLabel"]);
|
|
30
30
|
var charges = (_b = cartSummary.charges) !== null && _b !== void 0 ? _b : [];
|
|
31
31
|
var bags = (_c = cartSummary.bags) !== null && _c !== void 0 ? _c : [];
|
|
32
32
|
var groceries = (_d = cartSummary.groceries) !== null && _d !== void 0 ? _d : [];
|
|
@@ -108,10 +108,8 @@ function CartSummary(_a) {
|
|
|
108
108
|
React.createElement(H3, { fontWeight: "semiBold" }, totalLabel),
|
|
109
109
|
React.createElement(H3, { fontWeight: "semiBold" }, formatPrice(cartSummary.totalAmount))),
|
|
110
110
|
cartSummary.totalDiscount > 0 && (React.createElement(CartLine, { role: "listitem", "aria-label": "".concat(saveLabel, " ").concat(formatPrice(cartSummary.totalDiscount)) },
|
|
111
|
-
React.createElement(BodyText, {
|
|
112
|
-
React.createElement(BodyText, { color: (
|
|
113
|
-
"-",
|
|
114
|
-
formatPrice(cartSummary.totalDiscount))))))));
|
|
111
|
+
React.createElement(BodyText, { size: TextTypes.TextSize.SMALL }, saveLabel),
|
|
112
|
+
React.createElement(BodyText, { color: (_t = theme_1 === null || theme_1 === void 0 ? void 0 : theme_1.palette) === null || _t === void 0 ? void 0 : _t.alertRed, size: TextTypes.TextSize.SMALL, "aria-label": "Discount ".concat(formatPrice(cartSummary.totalDiscount)) }, formatPrice(cartSummary.totalDiscount))))))));
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
export { CartSummary };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartSummary.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartSummary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@citygross/design-tokens": "^0.2.80",
|
|
68
68
|
"@citygross/icons": "^0.3.0",
|
|
69
69
|
"@citygross/react-use-bg-wizard": "^0.0.8",
|
|
70
|
-
"@citygross/typography": "^0.0.
|
|
70
|
+
"@citygross/typography": "^0.0.114",
|
|
71
71
|
"@citygross/utils": "^0.0.43",
|
|
72
72
|
"framer-motion": "^4.1.17",
|
|
73
73
|
"moment": "^2.29.1",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"react-slick": "^0.30.1",
|
|
76
76
|
"slick-carousel": "^1.8.1"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "7a7435f04a5b91e178d11d60f7886dd947bbd6a2"
|
|
79
79
|
}
|