@citygross/components 0.16.27 → 0.17.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/AvailabilityLabel/AvailabilityLabel.d.ts +7 -0
- package/build/@types/components/AvailabilityLabel/AvailabilityLabel.styles.d.ts +2 -0
- package/build/@types/components/ListItem/ListItem.d.ts +5 -0
- 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/AvailabilityLabel/AvailabilityLabel.js +21 -0
- package/build/cjs/components/src/components/AvailabilityLabel/AvailabilityLabel.js.map +1 -0
- package/build/cjs/components/src/components/AvailabilityLabel/AvailabilityLabel.styles.js +18 -0
- package/build/cjs/components/src/components/AvailabilityLabel/AvailabilityLabel.styles.js.map +1 -0
- package/build/cjs/components/src/components/ListItem/ListItem.js +4 -1
- package/build/cjs/components/src/components/ListItem/ListItem.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 +13 -3355
- 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/AvailabilityLabel/AvailabilityLabel.js +13 -0
- package/build/es/components/src/components/AvailabilityLabel/AvailabilityLabel.js.map +1 -0
- package/build/es/components/src/components/AvailabilityLabel/AvailabilityLabel.styles.js +9 -0
- package/build/es/components/src/components/AvailabilityLabel/AvailabilityLabel.styles.js.map +1 -0
- package/build/es/components/src/components/ListItem/ListItem.js +4 -1
- package/build/es/components/src/components/ListItem/ListItem.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 +11 -3355
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -5,6 +5,7 @@ import '@citygross/design-tokens';
|
|
|
5
5
|
import '@citygross/icons';
|
|
6
6
|
import '../Accordion/Accordion.styles.js';
|
|
7
7
|
import '../AlertBox/AlertBox.js';
|
|
8
|
+
import '../AvailabilityLabel/AvailabilityLabel.styles.js';
|
|
8
9
|
import '../BackButton/BackButton.styles.js';
|
|
9
10
|
import '../BackgroundImage/BackgroundImage.styles.js';
|
|
10
11
|
import '../Badge/Badge.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,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextTypes, BodyText } from '@citygross/typography';
|
|
3
|
+
import { Root, Dot } from './AvailabilityLabel.styles.js';
|
|
4
|
+
|
|
5
|
+
var AvailabilityLabel = function (_a) {
|
|
6
|
+
var label = _a.label, _b = _a.textSize, textSize = _b === void 0 ? TextTypes.TextSize.EXTRASMALL : _b;
|
|
7
|
+
return (React.createElement(Root, null,
|
|
8
|
+
React.createElement(Dot, null),
|
|
9
|
+
React.createElement(BodyText, { size: textSize }, label)));
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { AvailabilityLabel };
|
|
13
|
+
//# sourceMappingURL=AvailabilityLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvailabilityLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", "px;\n margin-top: ", "px;\n"], ["\n display: flex;\n align-items: center;\n gap: ", "px;\n margin-top: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; });
|
|
5
|
+
var Dot = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "px;\n height: ", "px;\n border-radius: 50%;\n flex-shrink: 0;\n background: ", ";\n"], ["\n width: ", "px;\n height: ", "px;\n border-radius: 50%;\n flex-shrink: 0;\n background: ", ";\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs1; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs1; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandYellow; });
|
|
6
|
+
var templateObject_1, templateObject_2;
|
|
7
|
+
|
|
8
|
+
export { Dot, Root };
|
|
9
|
+
//# sourceMappingURL=AvailabilityLabel.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvailabilityLabel.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -3,6 +3,7 @@ import Skeleton from 'react-loading-skeleton';
|
|
|
3
3
|
import { Fieldset } from '../Fieldset/Fieldset.js';
|
|
4
4
|
import { Checkbox } from '../FormElements/Checkbox/Checkbox.js';
|
|
5
5
|
import { PriceStripe } from '../PriceStripe/PriceStripe.js';
|
|
6
|
+
import { AvailabilityLabel } from '../AvailabilityLabel/AvailabilityLabel.js';
|
|
6
7
|
import { ProductHeader, EProductHeader } from '../ProductHeader/ProductHeader.js';
|
|
7
8
|
import { ListItemContainer, ListLeft, ListImageContainer, ListImage, ItemInformationContainer, VisuallyHiddenLegend, CheckboxContainer, ListRight } from './ListItem.styles.js';
|
|
8
9
|
import { EPriceSize, EPriceVariant } from '../PriceTag/PriceTag.types.js';
|
|
@@ -13,7 +14,8 @@ var EListItemAlignment;
|
|
|
13
14
|
EListItemAlignment["TOP"] = "flex-start";
|
|
14
15
|
})(EListItemAlignment || (EListItemAlignment = {}));
|
|
15
16
|
var ListItem = function (_a) {
|
|
16
|
-
var _b
|
|
17
|
+
var _b;
|
|
18
|
+
var _c = _a.alignment, alignment = _c === void 0 ? EListItemAlignment.CENTER : _c, children = _a.children, checkboxes = _a.checkboxes, fallBackImage = _a.fallBackImage, checkboxLegendLabel = _a.checkboxLegendLabel, imageAutoHeight = _a.imageAutoHeight, item = _a.item, isSmall = _a.isSmall, _d = _a.loading, loading = _d === void 0 ? false : _d, _e = _a.showPriceStripe, showPriceStripe = _e === void 0 ? false : _e, smallSkeleton = _a.smallSkeleton;
|
|
17
19
|
return (React.createElement(ListItemContainer, null,
|
|
18
20
|
React.createElement(ListLeft, { alignment: alignment },
|
|
19
21
|
React.createElement(ListImageContainer, { isSmall: isSmall },
|
|
@@ -34,6 +36,7 @@ var ListItem = function (_a) {
|
|
|
34
36
|
checkboxes && checkboxes.length > 0 && (React.createElement(Skeleton, { height: 20, width: smallSkeleton ? 150 : 200, count: checkboxes.length, style: { marginTop: '8px' } })))) : (React.createElement(Fragment, null,
|
|
35
37
|
showPriceStripe && (React.createElement(PriceStripe, { size: EPriceSize.SMALL, variant: EPriceVariant.PRIO })),
|
|
36
38
|
React.createElement(ProductHeader, { location: EProductHeader.LIST_ITEM, subtitle: item === null || item === void 0 ? void 0 : item.subtitle, title: item === null || item === void 0 ? void 0 : item.name }),
|
|
39
|
+
((_b = item === null || item === void 0 ? void 0 : item.status) === null || _b === void 0 ? void 0 : _b.label) && (React.createElement(AvailabilityLabel, { label: item.status.label, textSize: item.status.textSize })),
|
|
37
40
|
checkboxes && checkboxes.length > 0 && (React.createElement(Fieldset, null,
|
|
38
41
|
checkboxLegendLabel && (React.createElement(VisuallyHiddenLegend, null, checkboxLegendLabel)),
|
|
39
42
|
React.createElement(CheckboxContainer, null, checkboxes.map(function (checkbox, index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { AddressBlock } from './components/AddressBlock/AddressBlock.js';
|
|
2
2
|
export { Accordion } from './components/Accordion/Accordion.js';
|
|
3
3
|
export { AlertBox, EAlertBoxVariant } from './components/AlertBox/AlertBox.js';
|
|
4
|
+
export { AvailabilityLabel } from './components/AvailabilityLabel/AvailabilityLabel.js';
|
|
4
5
|
export { BackButton } from './components/BackButton/BackButton.js';
|
|
5
6
|
export { BackgroundImage } from './components/BackgroundImage/BackgroundImage.js';
|
|
6
7
|
export { Badge } from './components/Badge/Badge.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|