@citygross/components 0.8.41 → 0.8.42

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.
@@ -81,3 +81,4 @@ export * from './components/CgButton/CgButton';
81
81
  export * from './components/CartCardLabel/CartCardLabel';
82
82
  export * from './components/CartCard/CartCard';
83
83
  export * from './components/PriceTag/PriceTag';
84
+ export * from './components/Pill/Pill';
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -92,6 +92,7 @@ import '../CouponCode/CouponCode.js';
92
92
  import '../CartCardLabel/CartCardLabel.styles.js';
93
93
  import '../CartCard/CartCard.styles.js';
94
94
  import '../PriceTag/PriceTag.js';
95
+ import '../Pill/Pill.styles.js';
95
96
 
96
97
  function AddressBlock(_a) {
97
98
  var _b = _a.deliverOption, deliverOption = _b === void 0 ? 'Address' : _b, icon = _a.icon, storeName = _a.storeName, customerName = _a.customerName, street = _a.street, zipCode = _a.zipCode, city = _a.city, doorCode = _a.doorCode, floor = _a.floor, deliveryInstructions = _a.deliveryInstructions, xsSpacing = _a.xsSpacing, lgSpacing = _a.lgSpacing;
@@ -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,19 @@
1
+ import React from 'react';
2
+ import { PillComponent, PillContent, Text, Amount } from './Pill.styles.js';
3
+
4
+ var Pill = function (_a) {
5
+ var _b = _a.active, active = _b === void 0 ? false : _b, amount = _a.amount, onClick = _a.onClick, text = _a.text;
6
+ return (React.createElement(PillComponent, { active: active, onClick: onClick, onKeyDown: function (e) {
7
+ if (e.key === 'Enter')
8
+ onClick();
9
+ }, tabIndex: 0 },
10
+ React.createElement(PillContent, null,
11
+ React.createElement(Text, null, text),
12
+ amount !== undefined && React.createElement(Amount, null,
13
+ "(",
14
+ amount,
15
+ ")"))));
16
+ };
17
+
18
+ export { Pill };
19
+ //# sourceMappingURL=Pill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pill.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,27 @@
1
+ import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
2
+ import styled from 'styled-components';
3
+ import { focusVisible } from '../../shared/global.styles.js';
4
+
5
+ var PillComponent = styled.div(templateObject_1 || (templateObject_1 = __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) {
6
+ var _a, _b;
7
+ return props.active
8
+ ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlue
9
+ : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.medium;
10
+ }, 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; }, focusVisible, function (props) {
11
+ var _a, _b;
12
+ return props.active
13
+ ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight
14
+ : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.lightest;
15
+ }, function (props) { var _a; return props.active && ((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlueHover); }, function (props) {
16
+ var _a, _b;
17
+ return props.active
18
+ ? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLighter
19
+ : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.lighter;
20
+ }, function (props) { var _a; return props.active && ((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlueHover); });
21
+ var PillContent = styled.span(templateObject_2 || (templateObject_2 = __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; });
22
+ var Text = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.darkest; });
23
+ var Amount = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.placeholder; });
24
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
25
+
26
+ export { Amount, PillComponent, PillContent, Text };
27
+ //# sourceMappingURL=Pill.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pill.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -92,6 +92,7 @@ import '../CouponCode/CouponCode.js';
92
92
  import '../CartCardLabel/CartCardLabel.styles.js';
93
93
  import '../CartCard/CartCard.styles.js';
94
94
  import '../PriceTag/PriceTag.js';
95
+ import '../Pill/Pill.styles.js';
95
96
 
96
97
  function WarningLabel(_a) {
97
98
  var children = _a.children, background = _a.background, toolTip = _a.toolTip;
@@ -1 +1 @@
1
- {"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -83,4 +83,5 @@ export { CouponCode, ECouponCodeStatus } from './components/CouponCode/CouponCod
83
83
  export { CartCardLabel } from './components/CartCardLabel/CartCardLabel.js';
84
84
  export { CartCard } from './components/CartCard/CartCard.js';
85
85
  export { EPriceVariant, PriceTag } from './components/PriceTag/PriceTag.js';
86
+ export { Pill } from './components/Pill/Pill.js';
86
87
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.8.41",
3
+ "version": "0.8.42",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "./build/cjs/components/src/index.js",
@@ -76,5 +76,5 @@
76
76
  "react-slick": "^0.30.1",
77
77
  "slick-carousel": "^1.8.1"
78
78
  },
79
- "gitHead": "ba1dc21fcdad63cdc0da65cec1a9a7c490d9b880"
79
+ "gitHead": "6756c8b3fe74377a3f52958295e8c7854cbd3eac"
80
80
  }