@citygross/components 0.19.5 → 0.19.7
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/Label/Label.d.ts +10 -0
- package/build/@types/components/Label/Label.styles.d.ts +11 -0
- package/build/@types/components/ListItem/ListItem.d.ts +1 -0
- package/build/@types/index.d.ts +1 -1
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +1 -1
- package/build/cjs/components/src/components/Label/Label.js +18 -0
- package/build/cjs/components/src/components/Label/Label.js.map +1 -0
- package/build/cjs/components/src/components/Label/Label.styles.js +52 -0
- package/build/cjs/components/src/components/Label/Label.styles.js.map +1 -0
- package/build/cjs/components/src/components/ListItem/ListItem.js +8 -5
- package/build/cjs/components/src/components/ListItem/ListItem.js.map +1 -1
- package/build/cjs/components/src/index.js +2 -2
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +1 -1
- package/build/es/components/src/components/Label/Label.js +10 -0
- package/build/es/components/src/components/Label/Label.js.map +1 -0
- package/build/es/components/src/components/Label/Label.styles.js +44 -0
- package/build/es/components/src/components/Label/Label.styles.js.map +1 -0
- package/build/es/components/src/components/ListItem/ListItem.js +8 -5
- package/build/es/components/src/components/ListItem/ListItem.js.map +1 -1
- package/build/es/components/src/index.js +1 -1
- package/package.json +2 -2
- package/build/@types/components/CartCardLabel/CartCardLabel.d.ts +0 -6
- package/build/@types/components/CartCardLabel/CartCardLabel.styles.d.ts +0 -5
- package/build/cjs/components/src/components/CartCardLabel/CartCardLabel.js +0 -18
- package/build/cjs/components/src/components/CartCardLabel/CartCardLabel.js.map +0 -1
- package/build/cjs/components/src/components/CartCardLabel/CartCardLabel.styles.js +0 -36
- package/build/cjs/components/src/components/CartCardLabel/CartCardLabel.styles.js.map +0 -1
- package/build/es/components/src/components/CartCardLabel/CartCardLabel.js +0 -10
- package/build/es/components/src/components/CartCardLabel/CartCardLabel.js.map +0 -1
- package/build/es/components/src/components/CartCardLabel/CartCardLabel.styles.js +0 -28
- package/build/es/components/src/components/CartCardLabel/CartCardLabel.styles.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TLabelFontWeight, TLabelSize } from './Label.styles';
|
|
3
|
+
export declare type TLabel = {
|
|
4
|
+
background?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
fontWeight?: TLabelFontWeight;
|
|
7
|
+
label: string;
|
|
8
|
+
size?: TLabelSize;
|
|
9
|
+
};
|
|
10
|
+
export declare const Label: ({ background, color, fontWeight, label, size }: TLabel) => React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Typography } from '@citygross/design-tokens';
|
|
2
|
+
export declare type TLabelSize = 'small' | 'medium';
|
|
3
|
+
export declare type TLabelFontWeight = keyof Typography['weight'];
|
|
4
|
+
declare type TStyledLabel = {
|
|
5
|
+
$background?: string;
|
|
6
|
+
$color?: string;
|
|
7
|
+
$fontWeight?: TLabelFontWeight;
|
|
8
|
+
$size: TLabelSize;
|
|
9
|
+
};
|
|
10
|
+
export declare const Label: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, TStyledLabel, never>;
|
|
11
|
+
export {};
|
package/build/@types/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from './components/Box/Box';
|
|
|
9
9
|
export * from './components/Button';
|
|
10
10
|
export * from './components/Button/Button';
|
|
11
11
|
export * from './components/CartCard/CartCard';
|
|
12
|
-
export * from './components/CartCardLabel/CartCardLabel';
|
|
13
12
|
export * from './components/CartItemSummary/CartItemSummary';
|
|
14
13
|
export * from './components/CartSubTotal/CartSubTotal';
|
|
15
14
|
export * from './components/CartSummary/CartSummary';
|
|
@@ -48,6 +47,7 @@ export * from './components/IconText/IconText';
|
|
|
48
47
|
export * from './components/IconToolTip/IconToolTip';
|
|
49
48
|
export * from './components/InfoTextBlock/InfoTextBlock';
|
|
50
49
|
export * from './components/LayoutBox/LayoutBox';
|
|
50
|
+
export * from './components/Label/Label';
|
|
51
51
|
export * from './components/Links/Link';
|
|
52
52
|
export * from './components/ListItem/ListItem';
|
|
53
53
|
export * from './components/ListItemWithRadio/ListItemWithRadio';
|
|
@@ -22,7 +22,6 @@ require('../Button/NavButton.js');
|
|
|
22
22
|
require('../CgButton/CgButton.js');
|
|
23
23
|
require('../CartCard/CartCard.styles.js');
|
|
24
24
|
require('../CgButton/CgButton.types.js');
|
|
25
|
-
require('../CartCardLabel/CartCardLabel.styles.js');
|
|
26
25
|
require('react-loading-skeleton');
|
|
27
26
|
require('@citygross/utils');
|
|
28
27
|
require('../CartItemSummary/CartItemSummary.styles.js');
|
|
@@ -69,6 +68,7 @@ var Spacer = require('../Spacer/Spacer.js');
|
|
|
69
68
|
require('../IconToolTip/IconToolTip.styles.js');
|
|
70
69
|
require('../InfoTextBlock/InfoTextBlock.styles.js');
|
|
71
70
|
require('../LayoutBox/LayoutBox.styles.js');
|
|
71
|
+
require('../Label/Label.styles.js');
|
|
72
72
|
require('../Links/Link.js');
|
|
73
73
|
require('../ListItem/ListItem.js');
|
|
74
74
|
require('../ListItemWithRadio/ListItemWithRadio.styles.js');
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var Label_styles = require('./Label.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 Label = function (_a) {
|
|
13
|
+
var background = _a.background, color = _a.color, fontWeight = _a.fontWeight, label = _a.label, _b = _a.size, size = _b === void 0 ? 'medium' : _b;
|
|
14
|
+
return (React__default["default"].createElement(Label_styles.Label, { "$background": background, "$color": color, "$fontWeight": fontWeight, "$size": size }, label));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.Label = Label;
|
|
18
|
+
//# sourceMappingURL=Label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 labelSizeMap = {
|
|
13
|
+
small: 's0',
|
|
14
|
+
medium: 's3'
|
|
15
|
+
};
|
|
16
|
+
var labelLineHeightMap = {
|
|
17
|
+
small: 's1',
|
|
18
|
+
medium: 'm1'
|
|
19
|
+
};
|
|
20
|
+
var Label = styled__default["default"].span(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: inline-block;\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"], ["\n display: inline-block;\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"])), function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
24
|
+
}, function (_a) {
|
|
25
|
+
var _b;
|
|
26
|
+
var theme = _a.theme;
|
|
27
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall;
|
|
28
|
+
}, function (_a) {
|
|
29
|
+
var _b;
|
|
30
|
+
var $background = _a.$background, theme = _a.theme;
|
|
31
|
+
return $background !== null && $background !== void 0 ? $background : (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lighter;
|
|
32
|
+
}, function (_a) {
|
|
33
|
+
var _b;
|
|
34
|
+
var $color = _a.$color, theme = _a.theme;
|
|
35
|
+
return $color !== null && $color !== void 0 ? $color : (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.black;
|
|
36
|
+
}, function (_a) {
|
|
37
|
+
var _b, _c;
|
|
38
|
+
var $size = _a.$size, theme = _a.theme;
|
|
39
|
+
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.size) === null || _c === void 0 ? void 0 : _c[labelSizeMap[$size]];
|
|
40
|
+
}, function (_a) {
|
|
41
|
+
var _b, _c;
|
|
42
|
+
var $fontWeight = _a.$fontWeight, theme = _a.theme;
|
|
43
|
+
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight) === null || _c === void 0 ? void 0 : _c[$fontWeight !== null && $fontWeight !== void 0 ? $fontWeight : 'regular'];
|
|
44
|
+
}, function (_a) {
|
|
45
|
+
var _b, _c;
|
|
46
|
+
var $size = _a.$size, theme = _a.theme;
|
|
47
|
+
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.lineHeight) === null || _c === void 0 ? void 0 : _c[labelLineHeightMap[$size]];
|
|
48
|
+
});
|
|
49
|
+
var templateObject_1;
|
|
50
|
+
|
|
51
|
+
exports.Label = Label;
|
|
52
|
+
//# sourceMappingURL=Label.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var Skeleton = require('react-loading-skeleton');
|
|
7
|
+
var designTokens = require('@citygross/design-tokens');
|
|
8
|
+
var AvailabilityLabel = require('../AvailabilityLabel/AvailabilityLabel.js');
|
|
7
9
|
var Fieldset = require('../Fieldset/Fieldset.js');
|
|
8
10
|
var Checkbox = require('../FormElements/Checkbox/Checkbox.js');
|
|
11
|
+
var Label = require('../Label/Label.js');
|
|
9
12
|
var PriceStripe = require('../PriceStripe/PriceStripe.js');
|
|
10
|
-
var AvailabilityLabel = require('../AvailabilityLabel/AvailabilityLabel.js');
|
|
11
13
|
var ProductHeader = require('../ProductHeader/ProductHeader.js');
|
|
12
14
|
var ListItem_styles = require('./ListItem.styles.js');
|
|
13
15
|
var PriceTag_types = require('../PriceTag/PriceTag.types.js');
|
|
@@ -23,8 +25,8 @@ exports.EListItemAlignment = void 0;
|
|
|
23
25
|
EListItemAlignment["TOP"] = "flex-start";
|
|
24
26
|
})(exports.EListItemAlignment || (exports.EListItemAlignment = {}));
|
|
25
27
|
var ListItem = function (_a) {
|
|
26
|
-
var _b;
|
|
27
|
-
var
|
|
28
|
+
var _b, _c, _d;
|
|
29
|
+
var _e = _a.alignment, alignment = _e === void 0 ? exports.EListItemAlignment.CENTER : _e, children = _a.children, checkboxes = _a.checkboxes, fallBackImage = _a.fallBackImage, checkboxLegendLabel = _a.checkboxLegendLabel, imageAutoHeight = _a.imageAutoHeight, item = _a.item, isSmall = _a.isSmall, label = _a.label, _f = _a.loading, loading = _f === void 0 ? false : _f, _g = _a.showPriceStripe, showPriceStripe = _g === void 0 ? false : _g, smallSkeleton = _a.smallSkeleton;
|
|
28
30
|
return (React__default["default"].createElement(ListItem_styles.ListItemContainer, null,
|
|
29
31
|
React__default["default"].createElement(ListItem_styles.ListLeft, { alignment: alignment },
|
|
30
32
|
React__default["default"].createElement(ListItem_styles.ListImageContainer, { isSmall: isSmall },
|
|
@@ -54,9 +56,10 @@ var ListItem = function (_a) {
|
|
|
54
56
|
checkbox.onChange(e.target.checked);
|
|
55
57
|
}
|
|
56
58
|
}, value: checkbox.value, alignItems: "flex-start" }));
|
|
57
|
-
}))))
|
|
59
|
+
})))),
|
|
60
|
+
label && (React__default["default"].createElement(Label.Label, { background: (_c = designTokens.theme.palette) === null || _c === void 0 ? void 0 : _c.blueLighter, color: (_d = designTokens.theme.palette) === null || _d === void 0 ? void 0 : _d.disabledDarkGray, label: label })))),
|
|
58
61
|
(item === null || item === void 0 ? void 0 : item.secondaryDescription) && item.secondaryDescription)),
|
|
59
|
-
children &&
|
|
62
|
+
children && React__default["default"].createElement(ListItem_styles.ListRight, null, children)));
|
|
60
63
|
};
|
|
61
64
|
|
|
62
65
|
exports.ListItem = ListItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -16,7 +16,6 @@ var PaginationButton = require('./components/Button/PaginationButton.js');
|
|
|
16
16
|
var SaveButton = require('./components/Button/SaveButton.js');
|
|
17
17
|
var NavButton = require('./components/Button/NavButton.js');
|
|
18
18
|
var CartCard = require('./components/CartCard/CartCard.js');
|
|
19
|
-
var CartCardLabel = require('./components/CartCardLabel/CartCardLabel.js');
|
|
20
19
|
var CartItemSummary = require('./components/CartItemSummary/CartItemSummary.js');
|
|
21
20
|
var CartSubTotal = require('./components/CartSubTotal/CartSubTotal.js');
|
|
22
21
|
var CartSummary = require('./components/CartSummary/CartSummary.js');
|
|
@@ -55,6 +54,7 @@ var IconText = require('./components/IconText/IconText.js');
|
|
|
55
54
|
var IconToolTip = require('./components/IconToolTip/IconToolTip.js');
|
|
56
55
|
var InfoTextBlock = require('./components/InfoTextBlock/InfoTextBlock.js');
|
|
57
56
|
var LayoutBox = require('./components/LayoutBox/LayoutBox.js');
|
|
57
|
+
var Label = require('./components/Label/Label.js');
|
|
58
58
|
var Link = require('./components/Links/Link.js');
|
|
59
59
|
var ListItem = require('./components/ListItem/ListItem.js');
|
|
60
60
|
var ListItemWithRadio = require('./components/ListItemWithRadio/ListItemWithRadio.js');
|
|
@@ -137,7 +137,6 @@ exports.PaginationButton = PaginationButton.PaginationButton;
|
|
|
137
137
|
exports.SaveButton = SaveButton.SaveButton;
|
|
138
138
|
exports.NavButton = NavButton.NavButton;
|
|
139
139
|
exports.CartCard = CartCard.CartCard;
|
|
140
|
-
exports.CartCardLabel = CartCardLabel.CartCardLabel;
|
|
141
140
|
exports.CartItemSummary = CartItemSummary.CartItemSummary;
|
|
142
141
|
exports.CartSubTotal = CartSubTotal.CartSubTotal;
|
|
143
142
|
Object.defineProperty(exports, 'ECartSubTotalTypes', {
|
|
@@ -198,6 +197,7 @@ exports.IconText = IconText.IconText;
|
|
|
198
197
|
exports.IconToolTip = IconToolTip.IconToolTip;
|
|
199
198
|
exports.InfoWithButtonBlock = InfoTextBlock.InfoWithButtonBlock;
|
|
200
199
|
exports.LayoutBox = LayoutBox.LayoutBox;
|
|
200
|
+
exports.Label = Label.Label;
|
|
201
201
|
Object.defineProperty(exports, 'ELinkVariant', {
|
|
202
202
|
enumerable: true,
|
|
203
203
|
get: function () { return Link.ELinkVariant; }
|
|
@@ -18,7 +18,6 @@ import '../Button/NavButton.js';
|
|
|
18
18
|
import '../CgButton/CgButton.js';
|
|
19
19
|
import '../CartCard/CartCard.styles.js';
|
|
20
20
|
import '../CgButton/CgButton.types.js';
|
|
21
|
-
import '../CartCardLabel/CartCardLabel.styles.js';
|
|
22
21
|
import 'react-loading-skeleton';
|
|
23
22
|
import '@citygross/utils';
|
|
24
23
|
import '../CartItemSummary/CartItemSummary.styles.js';
|
|
@@ -65,6 +64,7 @@ import { Spacer } from '../Spacer/Spacer.js';
|
|
|
65
64
|
import '../IconToolTip/IconToolTip.styles.js';
|
|
66
65
|
import '../InfoTextBlock/InfoTextBlock.styles.js';
|
|
67
66
|
import '../LayoutBox/LayoutBox.styles.js';
|
|
67
|
+
import '../Label/Label.styles.js';
|
|
68
68
|
import '../Links/Link.js';
|
|
69
69
|
import '../ListItem/ListItem.js';
|
|
70
70
|
import '../ListItemWithRadio/ListItemWithRadio.styles.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Label as Label$1 } from './Label.styles.js';
|
|
3
|
+
|
|
4
|
+
var Label = function (_a) {
|
|
5
|
+
var background = _a.background, color = _a.color, fontWeight = _a.fontWeight, label = _a.label, _b = _a.size, size = _b === void 0 ? 'medium' : _b;
|
|
6
|
+
return (React.createElement(Label$1, { "$background": background, "$color": color, "$fontWeight": fontWeight, "$size": size }, label));
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { Label };
|
|
10
|
+
//# sourceMappingURL=Label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
var labelSizeMap = {
|
|
5
|
+
small: 's0',
|
|
6
|
+
medium: 's3'
|
|
7
|
+
};
|
|
8
|
+
var labelLineHeightMap = {
|
|
9
|
+
small: 's1',
|
|
10
|
+
medium: 'm1'
|
|
11
|
+
};
|
|
12
|
+
var Label = styled.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"], ["\n display: inline-block;\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"])), function (_a) {
|
|
13
|
+
var _b;
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
16
|
+
}, function (_a) {
|
|
17
|
+
var _b;
|
|
18
|
+
var theme = _a.theme;
|
|
19
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall;
|
|
20
|
+
}, function (_a) {
|
|
21
|
+
var _b;
|
|
22
|
+
var $background = _a.$background, theme = _a.theme;
|
|
23
|
+
return $background !== null && $background !== void 0 ? $background : (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lighter;
|
|
24
|
+
}, function (_a) {
|
|
25
|
+
var _b;
|
|
26
|
+
var $color = _a.$color, theme = _a.theme;
|
|
27
|
+
return $color !== null && $color !== void 0 ? $color : (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.black;
|
|
28
|
+
}, function (_a) {
|
|
29
|
+
var _b, _c;
|
|
30
|
+
var $size = _a.$size, theme = _a.theme;
|
|
31
|
+
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.size) === null || _c === void 0 ? void 0 : _c[labelSizeMap[$size]];
|
|
32
|
+
}, function (_a) {
|
|
33
|
+
var _b, _c;
|
|
34
|
+
var $fontWeight = _a.$fontWeight, theme = _a.theme;
|
|
35
|
+
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight) === null || _c === void 0 ? void 0 : _c[$fontWeight !== null && $fontWeight !== void 0 ? $fontWeight : 'regular'];
|
|
36
|
+
}, function (_a) {
|
|
37
|
+
var _b, _c;
|
|
38
|
+
var $size = _a.$size, theme = _a.theme;
|
|
39
|
+
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.lineHeight) === null || _c === void 0 ? void 0 : _c[labelLineHeightMap[$size]];
|
|
40
|
+
});
|
|
41
|
+
var templateObject_1;
|
|
42
|
+
|
|
43
|
+
export { Label };
|
|
44
|
+
//# sourceMappingURL=Label.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
import Skeleton from 'react-loading-skeleton';
|
|
3
|
+
import { theme } from '@citygross/design-tokens';
|
|
4
|
+
import { AvailabilityLabel } from '../AvailabilityLabel/AvailabilityLabel.js';
|
|
3
5
|
import { Fieldset } from '../Fieldset/Fieldset.js';
|
|
4
6
|
import { Checkbox } from '../FormElements/Checkbox/Checkbox.js';
|
|
7
|
+
import { Label } from '../Label/Label.js';
|
|
5
8
|
import { PriceStripe } from '../PriceStripe/PriceStripe.js';
|
|
6
|
-
import { AvailabilityLabel } from '../AvailabilityLabel/AvailabilityLabel.js';
|
|
7
9
|
import { ProductHeader, EProductHeader } from '../ProductHeader/ProductHeader.js';
|
|
8
10
|
import { ListItemContainer, ListLeft, ListImageContainer, ListImage, ItemInformationContainer, VisuallyHiddenLegend, CheckboxContainer, ListRight } from './ListItem.styles.js';
|
|
9
11
|
import { EPriceSize, EPriceVariant } from '../PriceTag/PriceTag.types.js';
|
|
@@ -14,8 +16,8 @@ var EListItemAlignment;
|
|
|
14
16
|
EListItemAlignment["TOP"] = "flex-start";
|
|
15
17
|
})(EListItemAlignment || (EListItemAlignment = {}));
|
|
16
18
|
var ListItem = function (_a) {
|
|
17
|
-
var _b;
|
|
18
|
-
var
|
|
19
|
+
var _b, _c, _d;
|
|
20
|
+
var _e = _a.alignment, alignment = _e === void 0 ? EListItemAlignment.CENTER : _e, children = _a.children, checkboxes = _a.checkboxes, fallBackImage = _a.fallBackImage, checkboxLegendLabel = _a.checkboxLegendLabel, imageAutoHeight = _a.imageAutoHeight, item = _a.item, isSmall = _a.isSmall, label = _a.label, _f = _a.loading, loading = _f === void 0 ? false : _f, _g = _a.showPriceStripe, showPriceStripe = _g === void 0 ? false : _g, smallSkeleton = _a.smallSkeleton;
|
|
19
21
|
return (React.createElement(ListItemContainer, null,
|
|
20
22
|
React.createElement(ListLeft, { alignment: alignment },
|
|
21
23
|
React.createElement(ListImageContainer, { isSmall: isSmall },
|
|
@@ -45,9 +47,10 @@ var ListItem = function (_a) {
|
|
|
45
47
|
checkbox.onChange(e.target.checked);
|
|
46
48
|
}
|
|
47
49
|
}, value: checkbox.value, alignItems: "flex-start" }));
|
|
48
|
-
}))))
|
|
50
|
+
})))),
|
|
51
|
+
label && (React.createElement(Label, { background: (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.blueLighter, color: (_d = theme.palette) === null || _d === void 0 ? void 0 : _d.disabledDarkGray, label: label })))),
|
|
49
52
|
(item === null || item === void 0 ? void 0 : item.secondaryDescription) && item.secondaryDescription)),
|
|
50
|
-
children &&
|
|
53
|
+
children && React.createElement(ListRight, null, children)));
|
|
51
54
|
};
|
|
52
55
|
|
|
53
56
|
export { EListItemAlignment, ListItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -12,7 +12,6 @@ export { PaginationButton } from './components/Button/PaginationButton.js';
|
|
|
12
12
|
export { SaveButton } from './components/Button/SaveButton.js';
|
|
13
13
|
export { NavButton } from './components/Button/NavButton.js';
|
|
14
14
|
export { CartCard } from './components/CartCard/CartCard.js';
|
|
15
|
-
export { CartCardLabel } from './components/CartCardLabel/CartCardLabel.js';
|
|
16
15
|
export { CartItemSummary } from './components/CartItemSummary/CartItemSummary.js';
|
|
17
16
|
export { CartSubTotal, ECartSubTotalTypes } from './components/CartSubTotal/CartSubTotal.js';
|
|
18
17
|
export { CartSummary } from './components/CartSummary/CartSummary.js';
|
|
@@ -51,6 +50,7 @@ export { IconText } from './components/IconText/IconText.js';
|
|
|
51
50
|
export { IconToolTip } from './components/IconToolTip/IconToolTip.js';
|
|
52
51
|
export { InfoWithButtonBlock } from './components/InfoTextBlock/InfoTextBlock.js';
|
|
53
52
|
export { LayoutBox } from './components/LayoutBox/LayoutBox.js';
|
|
53
|
+
export { Label } from './components/Label/Label.js';
|
|
54
54
|
export { ELinkVariant, Link, LinkColors, LinkSize } from './components/Links/Link.js';
|
|
55
55
|
export { EListItemAlignment, ListItem } from './components/ListItem/ListItem.js';
|
|
56
56
|
export { ListItemWithRadio } from './components/ListItemWithRadio/ListItemWithRadio.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.7",
|
|
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": "
|
|
79
|
+
"gitHead": "271816201612dcad31d394bb60132d361fcb83dd"
|
|
80
80
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var CartCardLabel_styles = require('./CartCardLabel.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 CartCardLabel = function (_a) {
|
|
13
|
-
var background = _a.background, label = _a.label;
|
|
14
|
-
return (React__default["default"].createElement(CartCardLabel_styles.CartCardLabel, { background: background }, label));
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
exports.CartCardLabel = CartCardLabel;
|
|
18
|
-
//# sourceMappingURL=CartCardLabel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartCardLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,36 +0,0 @@
|
|
|
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 CartCardLabel = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: 11px;\n display: inline-block;\n font-weight: ", ";\n"], ["\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: 11px;\n display: inline-block;\n font-weight: ", ";\n"])), function (_a) {
|
|
13
|
-
var _b;
|
|
14
|
-
var theme = _a.theme;
|
|
15
|
-
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
16
|
-
}, function (_a) {
|
|
17
|
-
var _b;
|
|
18
|
-
var theme = _a.theme;
|
|
19
|
-
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxxs;
|
|
20
|
-
}, function (_a) {
|
|
21
|
-
var _b;
|
|
22
|
-
var background = _a.background, theme = _a.theme;
|
|
23
|
-
return background !== null && background !== void 0 ? background : (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lighter;
|
|
24
|
-
}, function (_a) {
|
|
25
|
-
var _b, _c;
|
|
26
|
-
var background = _a.background, theme = _a.theme;
|
|
27
|
-
return background ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white : (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.disabledDarkGray;
|
|
28
|
-
}, function (_a) {
|
|
29
|
-
var _b, _c;
|
|
30
|
-
var theme = _a.theme;
|
|
31
|
-
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight) === null || _c === void 0 ? void 0 : _c.medium;
|
|
32
|
-
});
|
|
33
|
-
var templateObject_1;
|
|
34
|
-
|
|
35
|
-
exports.CartCardLabel = CartCardLabel;
|
|
36
|
-
//# sourceMappingURL=CartCardLabel.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartCardLabel.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CartCardLabel as CartCardLabel$1 } from './CartCardLabel.styles.js';
|
|
3
|
-
|
|
4
|
-
var CartCardLabel = function (_a) {
|
|
5
|
-
var background = _a.background, label = _a.label;
|
|
6
|
-
return (React.createElement(CartCardLabel$1, { background: background }, label));
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export { CartCardLabel };
|
|
10
|
-
//# sourceMappingURL=CartCardLabel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartCardLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
var CartCardLabel = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: 11px;\n display: inline-block;\n font-weight: ", ";\n"], ["\n padding: 1px ", "px;\n border-radius: ", "px;\n background: ", ";\n color: ", ";\n font-size: 11px;\n display: inline-block;\n font-weight: ", ";\n"])), function (_a) {
|
|
5
|
-
var _b;
|
|
6
|
-
var theme = _a.theme;
|
|
7
|
-
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs;
|
|
8
|
-
}, function (_a) {
|
|
9
|
-
var _b;
|
|
10
|
-
var theme = _a.theme;
|
|
11
|
-
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxxs;
|
|
12
|
-
}, function (_a) {
|
|
13
|
-
var _b;
|
|
14
|
-
var background = _a.background, theme = _a.theme;
|
|
15
|
-
return background !== null && background !== void 0 ? background : (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.lighter;
|
|
16
|
-
}, function (_a) {
|
|
17
|
-
var _b, _c;
|
|
18
|
-
var background = _a.background, theme = _a.theme;
|
|
19
|
-
return background ? (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white : (_c = theme.palette) === null || _c === void 0 ? void 0 : _c.disabledDarkGray;
|
|
20
|
-
}, function (_a) {
|
|
21
|
-
var _b, _c;
|
|
22
|
-
var theme = _a.theme;
|
|
23
|
-
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight) === null || _c === void 0 ? void 0 : _c.medium;
|
|
24
|
-
});
|
|
25
|
-
var templateObject_1;
|
|
26
|
-
|
|
27
|
-
export { CartCardLabel };
|
|
28
|
-
//# sourceMappingURL=CartCardLabel.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CartCardLabel.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|