@citygross/components 0.17.13 → 0.18.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.
- package/build/@types/components/PersonalCouponCard/PersonalCouponCard.d.ts +12 -0
- package/build/@types/components/PersonalCouponCard/PersonalCouponCard.styles.d.ts +12 -0
- package/build/@types/index.d.ts +1 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +2 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/PersonalCouponCard/PersonalCouponCard.js +41 -0
- package/build/cjs/components/src/components/PersonalCouponCard/PersonalCouponCard.js.map +1 -0
- package/build/cjs/components/src/components/PersonalCouponCard/PersonalCouponCard.styles.js +97 -0
- package/build/cjs/components/src/components/PersonalCouponCard/PersonalCouponCard.styles.js.map +1 -0
- package/build/cjs/components/src/index.js +2 -0
- package/build/cjs/components/src/index.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +2 -0
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/PersonalCouponCard/PersonalCouponCard.js +33 -0
- package/build/es/components/src/components/PersonalCouponCard/PersonalCouponCard.js.map +1 -0
- package/build/es/components/src/components/PersonalCouponCard/PersonalCouponCard.styles.js +82 -0
- package/build/es/components/src/components/PersonalCouponCard/PersonalCouponCard.styles.js.map +1 -0
- package/build/es/components/src/index.js +1 -0
- package/build/es/components/src/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type TPersonalCouponCard = {
|
|
3
|
+
description: string;
|
|
4
|
+
name: string;
|
|
5
|
+
expirationDate?: string;
|
|
6
|
+
usedDate?: string;
|
|
7
|
+
imageUrl: string;
|
|
8
|
+
voucherNbr: string;
|
|
9
|
+
available: boolean;
|
|
10
|
+
status?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const PersonalCouponCard: ({ description, name, expirationDate, usedDate, imageUrl, voucherNbr, available, status }: TPersonalCouponCard) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare type TFooter = {
|
|
2
|
+
available: boolean;
|
|
3
|
+
};
|
|
4
|
+
export declare const CouponCard: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const ContentRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const TextColumn: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const Description: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const UsedRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
|
+
export declare const CouponImage: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export declare const Footer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, TFooter, never>;
|
|
11
|
+
export declare const VoucherNbr: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, TFooter, never>;
|
|
12
|
+
export {};
|
package/build/@types/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export * from './components/Modal/Modal';
|
|
|
62
62
|
export * from './components/NavMainLink/NavMainLink';
|
|
63
63
|
export * from './components/Pagination/Pagination';
|
|
64
64
|
export * from './components/Pill/Pill';
|
|
65
|
+
export * from './components/PersonalCouponCard/PersonalCouponCard';
|
|
65
66
|
export * from './components/PriceStripe/PriceStripe';
|
|
66
67
|
export * from './components/PriceTag/PriceTag';
|
|
67
68
|
export * from './components/PriceTag/PriceTag.types';
|
|
@@ -81,6 +81,8 @@ require('../Modal/Modal.js');
|
|
|
81
81
|
require('../NavMainLink/NavMainLink.styled.js');
|
|
82
82
|
require('../Pagination/Pagination.styles.js');
|
|
83
83
|
require('../Pill/Pill.styles.js');
|
|
84
|
+
require('styled-components');
|
|
85
|
+
require('../PersonalCouponCard/PersonalCouponCard.styles.js');
|
|
84
86
|
require('../PriceTag/PriceTag.types.js');
|
|
85
87
|
require('../PriceStripe/PriceStripe.styles.js');
|
|
86
88
|
require('../PriceTag/PriceTag.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var icons = require('@citygross/icons');
|
|
7
|
+
var utils = require('@citygross/utils');
|
|
8
|
+
var styled = require('styled-components');
|
|
9
|
+
var PersonalCouponCard_styles = require('./PersonalCouponCard.styles.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
|
+
|
|
15
|
+
var PersonalCouponCard = function (_a) {
|
|
16
|
+
var _b, _c, _d;
|
|
17
|
+
var description = _a.description, name = _a.name, expirationDate = _a.expirationDate, usedDate = _a.usedDate, imageUrl = _a.imageUrl, voucherNbr = _a.voucherNbr, available = _a.available, status = _a.status;
|
|
18
|
+
var theme = styled.useTheme();
|
|
19
|
+
var isCouponAvailable = available !== null && available !== void 0 ? available : (status === null || status === void 0 ? void 0 : status.toLowerCase()) === 'available';
|
|
20
|
+
return (React__default["default"].createElement(PersonalCouponCard_styles.CouponCard, null,
|
|
21
|
+
React__default["default"].createElement(PersonalCouponCard_styles.ContentRow, null,
|
|
22
|
+
React__default["default"].createElement(PersonalCouponCard_styles.TextColumn, null,
|
|
23
|
+
React__default["default"].createElement(PersonalCouponCard_styles.Description, null, description),
|
|
24
|
+
React__default["default"].createElement("div", null,
|
|
25
|
+
name,
|
|
26
|
+
" ",
|
|
27
|
+
description),
|
|
28
|
+
isCouponAvailable ? (React__default["default"].createElement("div", null,
|
|
29
|
+
"Giltig till ",
|
|
30
|
+
utils.formatIsoDate(expirationDate))) : (React__default["default"].createElement(PersonalCouponCard_styles.UsedRow, null,
|
|
31
|
+
React__default["default"].createElement(icons.Icons.CheckMark, { "aria-hidden": "true", color: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.alertGreen, height: (_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.sm, width: (_d = theme.spacings) === null || _d === void 0 ? void 0 : _d.sm }),
|
|
32
|
+
"Anv\u00E4nd ",
|
|
33
|
+
utils.formatIsoDate(usedDate)))),
|
|
34
|
+
React__default["default"].createElement(PersonalCouponCard_styles.CouponImage, { alt: description, src: imageUrl })),
|
|
35
|
+
React__default["default"].createElement(PersonalCouponCard_styles.Footer, { available: isCouponAvailable },
|
|
36
|
+
React__default["default"].createElement("span", null, "Personlig kod"),
|
|
37
|
+
React__default["default"].createElement(PersonalCouponCard_styles.VoucherNbr, { available: isCouponAvailable }, voucherNbr))));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.PersonalCouponCard = PersonalCouponCard;
|
|
41
|
+
//# sourceMappingURL=PersonalCouponCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonalCouponCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
|
+
|
|
12
|
+
var CouponCard = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n display: flex;\n flex-direction: column;\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n display: flex;\n flex-direction: column;\n"])), function (_a) {
|
|
13
|
+
var _b;
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white;
|
|
16
|
+
}, function (_a) {
|
|
17
|
+
var _b;
|
|
18
|
+
var theme = _a.theme;
|
|
19
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.medium;
|
|
20
|
+
}, function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.small;
|
|
24
|
+
});
|
|
25
|
+
var ContentRow = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n"], ["\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n"])), function (_a) {
|
|
26
|
+
var _b;
|
|
27
|
+
var theme = _a.theme;
|
|
28
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
29
|
+
}, function (_a) {
|
|
30
|
+
var _b;
|
|
31
|
+
var theme = _a.theme;
|
|
32
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
33
|
+
});
|
|
34
|
+
var TextColumn = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n"])), function (_a) {
|
|
35
|
+
var _b;
|
|
36
|
+
var theme = _a.theme;
|
|
37
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
38
|
+
});
|
|
39
|
+
var Description = styled__default["default"].span(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n font-weight: ", ";\n"], ["\n font-weight: ", ";\n"])), function (_a) {
|
|
40
|
+
var _b;
|
|
41
|
+
var theme = _a.theme;
|
|
42
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight.medium;
|
|
43
|
+
});
|
|
44
|
+
var UsedRow = styled__default["default"].div(templateObject_5 || (templateObject_5 = _tslib.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", "px;\n"], ["\n display: flex;\n align-items: center;\n gap: ", "px;\n"])), function (_a) {
|
|
45
|
+
var _b;
|
|
46
|
+
var theme = _a.theme;
|
|
47
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs;
|
|
48
|
+
});
|
|
49
|
+
var CouponImage = styled__default["default"].img(templateObject_6 || (templateObject_6 = _tslib.__makeTemplateObject(["\n border-radius: ", "px;\n height: ", "px;\n width: ", "px;\n object-fit: cover;\n flex-shrink: 0;\n"], ["\n border-radius: ", "px;\n height: ", "px;\n width: ", "px;\n object-fit: cover;\n flex-shrink: 0;\n"])), function (_a) {
|
|
50
|
+
var _b;
|
|
51
|
+
var theme = _a.theme;
|
|
52
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall;
|
|
53
|
+
}, function (_a) {
|
|
54
|
+
var _b;
|
|
55
|
+
var theme = _a.theme;
|
|
56
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xl;
|
|
57
|
+
}, function (_a) {
|
|
58
|
+
var _b;
|
|
59
|
+
var theme = _a.theme;
|
|
60
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xl;
|
|
61
|
+
});
|
|
62
|
+
var Footer = styled__default["default"].div(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n background-color: ", ";\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n background-color: ", ";\n"])), function (_a) {
|
|
63
|
+
var _b;
|
|
64
|
+
var theme = _a.theme;
|
|
65
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
66
|
+
}, function (_a) {
|
|
67
|
+
var _b;
|
|
68
|
+
var theme = _a.theme;
|
|
69
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
70
|
+
}, function (_a) {
|
|
71
|
+
var _b;
|
|
72
|
+
var theme = _a.theme;
|
|
73
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.small;
|
|
74
|
+
}, function (_a) {
|
|
75
|
+
var _b;
|
|
76
|
+
var theme = _a.theme;
|
|
77
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.small;
|
|
78
|
+
}, function (_a) {
|
|
79
|
+
var _b, _c;
|
|
80
|
+
var available = _a.available, theme = _a.theme;
|
|
81
|
+
return available ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.blueLighter : (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.lighter;
|
|
82
|
+
});
|
|
83
|
+
var VoucherNbr = styled__default["default"].span(templateObject_8 || (templateObject_8 = _tslib.__makeTemplateObject(["\n text-decoration: ", ";\n"], ["\n text-decoration: ", ";\n"])), function (_a) {
|
|
84
|
+
var available = _a.available;
|
|
85
|
+
return (available ? 'none' : 'line-through');
|
|
86
|
+
});
|
|
87
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
88
|
+
|
|
89
|
+
exports.ContentRow = ContentRow;
|
|
90
|
+
exports.CouponCard = CouponCard;
|
|
91
|
+
exports.CouponImage = CouponImage;
|
|
92
|
+
exports.Description = Description;
|
|
93
|
+
exports.Footer = Footer;
|
|
94
|
+
exports.TextColumn = TextColumn;
|
|
95
|
+
exports.UsedRow = UsedRow;
|
|
96
|
+
exports.VoucherNbr = VoucherNbr;
|
|
97
|
+
//# sourceMappingURL=PersonalCouponCard.styles.js.map
|
package/build/cjs/components/src/components/PersonalCouponCard/PersonalCouponCard.styles.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonalCouponCard.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -69,6 +69,7 @@ var Modal = require('./components/Modal/Modal.js');
|
|
|
69
69
|
var NavMainLink = require('./components/NavMainLink/NavMainLink.js');
|
|
70
70
|
var Pagination = require('./components/Pagination/Pagination.js');
|
|
71
71
|
var Pill = require('./components/Pill/Pill.js');
|
|
72
|
+
var PersonalCouponCard = require('./components/PersonalCouponCard/PersonalCouponCard.js');
|
|
72
73
|
var PriceStripe = require('./components/PriceStripe/PriceStripe.js');
|
|
73
74
|
var PriceTag = require('./components/PriceTag/PriceTag.js');
|
|
74
75
|
var PriceTag_types = require('./components/PriceTag/PriceTag.types.js');
|
|
@@ -236,6 +237,7 @@ exports.Modal = Modal.Modal;
|
|
|
236
237
|
exports.NavMainLink = NavMainLink.NavMainLink;
|
|
237
238
|
exports.Pagination = Pagination.Pagination;
|
|
238
239
|
exports.Pill = Pill.Pill;
|
|
240
|
+
exports.PersonalCouponCard = PersonalCouponCard.PersonalCouponCard;
|
|
239
241
|
exports.PriceStripe = PriceStripe.PriceStripe;
|
|
240
242
|
exports.PriceTag = PriceTag.PriceTag;
|
|
241
243
|
Object.defineProperty(exports, 'EPriceSize', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -77,6 +77,8 @@ import '../Modal/Modal.js';
|
|
|
77
77
|
import '../NavMainLink/NavMainLink.styled.js';
|
|
78
78
|
import '../Pagination/Pagination.styles.js';
|
|
79
79
|
import '../Pill/Pill.styles.js';
|
|
80
|
+
import 'styled-components';
|
|
81
|
+
import '../PersonalCouponCard/PersonalCouponCard.styles.js';
|
|
80
82
|
import '../PriceTag/PriceTag.types.js';
|
|
81
83
|
import '../PriceStripe/PriceStripe.styles.js';
|
|
82
84
|
import '../PriceTag/PriceTag.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icons } from '@citygross/icons';
|
|
3
|
+
import { formatIsoDate } from '@citygross/utils';
|
|
4
|
+
import { useTheme } from 'styled-components';
|
|
5
|
+
import { CouponCard, ContentRow, TextColumn, Description, UsedRow, CouponImage, Footer, VoucherNbr } from './PersonalCouponCard.styles.js';
|
|
6
|
+
|
|
7
|
+
var PersonalCouponCard = function (_a) {
|
|
8
|
+
var _b, _c, _d;
|
|
9
|
+
var description = _a.description, name = _a.name, expirationDate = _a.expirationDate, usedDate = _a.usedDate, imageUrl = _a.imageUrl, voucherNbr = _a.voucherNbr, available = _a.available, status = _a.status;
|
|
10
|
+
var theme = useTheme();
|
|
11
|
+
var isCouponAvailable = available !== null && available !== void 0 ? available : (status === null || status === void 0 ? void 0 : status.toLowerCase()) === 'available';
|
|
12
|
+
return (React.createElement(CouponCard, null,
|
|
13
|
+
React.createElement(ContentRow, null,
|
|
14
|
+
React.createElement(TextColumn, null,
|
|
15
|
+
React.createElement(Description, null, description),
|
|
16
|
+
React.createElement("div", null,
|
|
17
|
+
name,
|
|
18
|
+
" ",
|
|
19
|
+
description),
|
|
20
|
+
isCouponAvailable ? (React.createElement("div", null,
|
|
21
|
+
"Giltig till ",
|
|
22
|
+
formatIsoDate(expirationDate))) : (React.createElement(UsedRow, null,
|
|
23
|
+
React.createElement(Icons.CheckMark, { "aria-hidden": "true", color: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.alertGreen, height: (_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.sm, width: (_d = theme.spacings) === null || _d === void 0 ? void 0 : _d.sm }),
|
|
24
|
+
"Anv\u00E4nd ",
|
|
25
|
+
formatIsoDate(usedDate)))),
|
|
26
|
+
React.createElement(CouponImage, { alt: description, src: imageUrl })),
|
|
27
|
+
React.createElement(Footer, { available: isCouponAvailable },
|
|
28
|
+
React.createElement("span", null, "Personlig kod"),
|
|
29
|
+
React.createElement(VoucherNbr, { available: isCouponAvailable }, voucherNbr))));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { PersonalCouponCard };
|
|
33
|
+
//# sourceMappingURL=PersonalCouponCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonalCouponCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
var CouponCard = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n display: flex;\n flex-direction: column;\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n display: flex;\n flex-direction: column;\n"])), function (_a) {
|
|
5
|
+
var _b;
|
|
6
|
+
var theme = _a.theme;
|
|
7
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white;
|
|
8
|
+
}, function (_a) {
|
|
9
|
+
var _b;
|
|
10
|
+
var theme = _a.theme;
|
|
11
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.medium;
|
|
12
|
+
}, function (_a) {
|
|
13
|
+
var _b;
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.small;
|
|
16
|
+
});
|
|
17
|
+
var ContentRow = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n"], ["\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n"])), function (_a) {
|
|
18
|
+
var _b;
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
21
|
+
}, function (_a) {
|
|
22
|
+
var _b;
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
25
|
+
});
|
|
26
|
+
var TextColumn = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: ", "px;\n"])), function (_a) {
|
|
27
|
+
var _b;
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
30
|
+
});
|
|
31
|
+
var Description = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: ", ";\n"], ["\n font-weight: ", ";\n"])), function (_a) {
|
|
32
|
+
var _b;
|
|
33
|
+
var theme = _a.theme;
|
|
34
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight.medium;
|
|
35
|
+
});
|
|
36
|
+
var UsedRow = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", "px;\n"], ["\n display: flex;\n align-items: center;\n gap: ", "px;\n"])), function (_a) {
|
|
37
|
+
var _b;
|
|
38
|
+
var theme = _a.theme;
|
|
39
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs;
|
|
40
|
+
});
|
|
41
|
+
var CouponImage = styled.img(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-radius: ", "px;\n height: ", "px;\n width: ", "px;\n object-fit: cover;\n flex-shrink: 0;\n"], ["\n border-radius: ", "px;\n height: ", "px;\n width: ", "px;\n object-fit: cover;\n flex-shrink: 0;\n"])), function (_a) {
|
|
42
|
+
var _b;
|
|
43
|
+
var theme = _a.theme;
|
|
44
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall;
|
|
45
|
+
}, function (_a) {
|
|
46
|
+
var _b;
|
|
47
|
+
var theme = _a.theme;
|
|
48
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xl;
|
|
49
|
+
}, function (_a) {
|
|
50
|
+
var _b;
|
|
51
|
+
var theme = _a.theme;
|
|
52
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xl;
|
|
53
|
+
});
|
|
54
|
+
var Footer = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n background-color: ", ";\n"], ["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: ", "px;\n padding: ", "px;\n border-bottom-left-radius: ", "px;\n border-bottom-right-radius: ", "px;\n background-color: ", ";\n"])), function (_a) {
|
|
55
|
+
var _b;
|
|
56
|
+
var theme = _a.theme;
|
|
57
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
58
|
+
}, function (_a) {
|
|
59
|
+
var _b;
|
|
60
|
+
var theme = _a.theme;
|
|
61
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
62
|
+
}, function (_a) {
|
|
63
|
+
var _b;
|
|
64
|
+
var theme = _a.theme;
|
|
65
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.small;
|
|
66
|
+
}, function (_a) {
|
|
67
|
+
var _b;
|
|
68
|
+
var theme = _a.theme;
|
|
69
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.small;
|
|
70
|
+
}, function (_a) {
|
|
71
|
+
var _b, _c;
|
|
72
|
+
var available = _a.available, theme = _a.theme;
|
|
73
|
+
return available ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.blueLighter : (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.lighter;
|
|
74
|
+
});
|
|
75
|
+
var VoucherNbr = styled.span(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n text-decoration: ", ";\n"], ["\n text-decoration: ", ";\n"])), function (_a) {
|
|
76
|
+
var available = _a.available;
|
|
77
|
+
return (available ? 'none' : 'line-through');
|
|
78
|
+
});
|
|
79
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
80
|
+
|
|
81
|
+
export { ContentRow, CouponCard, CouponImage, Description, Footer, TextColumn, UsedRow, VoucherNbr };
|
|
82
|
+
//# sourceMappingURL=PersonalCouponCard.styles.js.map
|
package/build/es/components/src/components/PersonalCouponCard/PersonalCouponCard.styles.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonalCouponCard.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -65,6 +65,7 @@ export { EModalSize, EModalVariant, Modal } from './components/Modal/Modal.js';
|
|
|
65
65
|
export { NavMainLink } from './components/NavMainLink/NavMainLink.js';
|
|
66
66
|
export { Pagination } from './components/Pagination/Pagination.js';
|
|
67
67
|
export { Pill } from './components/Pill/Pill.js';
|
|
68
|
+
export { PersonalCouponCard } from './components/PersonalCouponCard/PersonalCouponCard.js';
|
|
68
69
|
export { PriceStripe } from './components/PriceStripe/PriceStripe.js';
|
|
69
70
|
export { PriceTag } from './components/PriceTag/PriceTag.js';
|
|
70
71
|
export { EPriceSize, EPriceVariant } from './components/PriceTag/PriceTag.types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@citygross/design-tokens": "^0.5.4",
|
|
71
|
-
"@citygross/icons": "^0.3.
|
|
71
|
+
"@citygross/icons": "^0.3.6",
|
|
72
72
|
"@citygross/react-use-bg-wizard": "^0.0.14",
|
|
73
73
|
"@citygross/typography": "^0.0.128",
|
|
74
|
-
"@citygross/utils": "^0.0
|
|
74
|
+
"@citygross/utils": "^0.1.0",
|
|
75
75
|
"motion": "^12.34.3",
|
|
76
76
|
"react-slick": "^0.30.1",
|
|
77
77
|
"slick-carousel": "^1.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "c090ec61be66146f84c565e5ef2f252a7c70c90b"
|
|
80
80
|
}
|