@citygross/components 0.8.41 → 0.8.43
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/index.d.ts +1 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +1 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/Pill/Pill.js +27 -0
- package/build/cjs/components/src/components/Pill/Pill.js.map +1 -0
- package/build/cjs/components/src/components/Pill/Pill.styles.js +38 -0
- package/build/cjs/components/src/components/Pill/Pill.styles.js.map +1 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +1 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/cjs/components/src/index.js +2 -0
- package/build/cjs/components/src/index.js.map +1 -1
- package/build/cjs/utils/build/index.js +2 -2
- package/build/cjs/utils/build/index.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +1 -0
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/Pill/Pill.js +19 -0
- package/build/es/components/src/components/Pill/Pill.js.map +1 -0
- package/build/es/components/src/components/Pill/Pill.styles.js +27 -0
- package/build/es/components/src/components/Pill/Pill.styles.js.map +1 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +1 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/es/components/src/index.js +1 -0
- package/build/es/components/src/index.js.map +1 -1
- package/build/es/utils/build/index.js +2 -2
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +3 -3
package/build/@types/index.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ require('../CouponCode/CouponCode.js');
|
|
|
96
96
|
require('../CartCardLabel/CartCardLabel.styles.js');
|
|
97
97
|
require('../CartCard/CartCard.styles.js');
|
|
98
98
|
require('../PriceTag/PriceTag.js');
|
|
99
|
+
require('../Pill/Pill.styles.js');
|
|
99
100
|
|
|
100
101
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
101
102
|
|
|
@@ -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,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var Pill_styles = require('./Pill.styles.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
|
|
12
|
+
var Pill = function (_a) {
|
|
13
|
+
var _b = _a.active, active = _b === void 0 ? false : _b, amount = _a.amount, onClick = _a.onClick, text = _a.text;
|
|
14
|
+
return (React__default["default"].createElement(Pill_styles.PillComponent, { active: active, onClick: onClick, onKeyDown: function (e) {
|
|
15
|
+
if (e.key === 'Enter')
|
|
16
|
+
onClick();
|
|
17
|
+
}, tabIndex: 0 },
|
|
18
|
+
React__default["default"].createElement(Pill_styles.PillContent, null,
|
|
19
|
+
React__default["default"].createElement(Pill_styles.Text, null, text),
|
|
20
|
+
amount !== undefined && React__default["default"].createElement(Pill_styles.Amount, null,
|
|
21
|
+
"(",
|
|
22
|
+
amount,
|
|
23
|
+
")"))));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.Pill = Pill;
|
|
27
|
+
//# sourceMappingURL=Pill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pill.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
var global_styles = require('../../shared/global.styles.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
|
+
|
|
13
|
+
var PillComponent = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n background-color: ", ";\n border: 1px solid\n ", ";\n border-radius: ", "px;\n cursor: pointer;\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n padding: ", "px\n ", "px;\n width: fit-content;\n\n ", "\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n border-color: ", ";\n }\n"], ["\n background-color: ", ";\n border: 1px solid\n ", ";\n border-radius: ", "px;\n cursor: pointer;\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n padding: ", "px\n ", "px;\n width: fit-content;\n\n ", "\n\n &:hover {\n background-color: ", ";\n border-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n border-color: ", ";\n }\n"])), function (props) { var _a, _b; return props.active ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.white; }, function (props) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
return props.active
|
|
16
|
+
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlue
|
|
17
|
+
: (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.medium;
|
|
18
|
+
}, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.big; }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size.s2; }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.weight.medium; }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.s2; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs2; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs2; }, global_styles.focusVisible, function (props) {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
return props.active
|
|
21
|
+
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight
|
|
22
|
+
: (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
|
|
23
|
+
}, function (props) { var _a; return props.active && ((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlueHover); }, function (props) {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
return props.active
|
|
26
|
+
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLighter
|
|
27
|
+
: (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.lighter;
|
|
28
|
+
}, function (props) { var _a; return props.active && ((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlueHover); });
|
|
29
|
+
var PillContent = styled__default["default"].span(templateObject_2 || (templateObject_2 = _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 (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; });
|
|
30
|
+
var Text = styled__default["default"].span(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.darkest; });
|
|
31
|
+
var Amount = styled__default["default"].span(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.placeholder; });
|
|
32
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
33
|
+
|
|
34
|
+
exports.Amount = Amount;
|
|
35
|
+
exports.PillComponent = PillComponent;
|
|
36
|
+
exports.PillContent = PillContent;
|
|
37
|
+
exports.Text = Text;
|
|
38
|
+
//# sourceMappingURL=Pill.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pill.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -96,6 +96,7 @@ require('../CouponCode/CouponCode.js');
|
|
|
96
96
|
require('../CartCardLabel/CartCardLabel.styles.js');
|
|
97
97
|
require('../CartCard/CartCard.styles.js');
|
|
98
98
|
require('../PriceTag/PriceTag.js');
|
|
99
|
+
require('../Pill/Pill.styles.js');
|
|
99
100
|
|
|
100
101
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
101
102
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -87,6 +87,7 @@ var CouponCode = require('./components/CouponCode/CouponCode.js');
|
|
|
87
87
|
var CartCardLabel = require('./components/CartCardLabel/CartCardLabel.js');
|
|
88
88
|
var CartCard = require('./components/CartCard/CartCard.js');
|
|
89
89
|
var PriceTag = require('./components/PriceTag/PriceTag.js');
|
|
90
|
+
var Pill = require('./components/Pill/Pill.js');
|
|
90
91
|
|
|
91
92
|
|
|
92
93
|
|
|
@@ -234,4 +235,5 @@ Object.defineProperty(exports, 'EPriceVariant', {
|
|
|
234
235
|
get: function () { return PriceTag.EPriceVariant; }
|
|
235
236
|
});
|
|
236
237
|
exports.PriceTag = PriceTag.PriceTag;
|
|
238
|
+
exports.Pill = Pill.Pill;
|
|
237
239
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18827,12 +18827,12 @@ function getDateInfo(dateStr) {
|
|
|
18827
18827
|
return {
|
|
18828
18828
|
day: {
|
|
18829
18829
|
name: date.format('dddd'),
|
|
18830
|
-
number: date.format('
|
|
18830
|
+
number: date.format('D')
|
|
18831
18831
|
},
|
|
18832
18832
|
isTomorrow: date.isSame(moment().add(1, 'day'), 'day'),
|
|
18833
18833
|
month: {
|
|
18834
18834
|
name: date.format('MMMM'),
|
|
18835
|
-
number: date.format('
|
|
18835
|
+
number: date.format('M')
|
|
18836
18836
|
},
|
|
18837
18837
|
year: date.format('YYYY')
|
|
18838
18838
|
};
|