@citygross/components 0.18.1 → 0.18.3
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 +1 -0
- package/build/@types/components/AvailabilityLabel/AvailabilityLabel.styles.d.ts +5 -1
- package/build/@types/components/ListItem/ListItem.d.ts +1 -0
- package/build/cjs/components/src/components/AvailabilityLabel/AvailabilityLabel.js +2 -2
- package/build/cjs/components/src/components/AvailabilityLabel/AvailabilityLabel.styles.js +1 -1
- package/build/cjs/components/src/components/ListItem/ListItem.js +1 -1
- package/build/es/components/src/components/AvailabilityLabel/AvailabilityLabel.js +2 -2
- package/build/es/components/src/components/AvailabilityLabel/AvailabilityLabel.styles.js +1 -1
- package/build/es/components/src/components/ListItem/ListItem.js +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export declare const Root: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
|
|
2
|
+
declare type DotProps = {
|
|
3
|
+
color?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const Dot: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, DotProps, never>;
|
|
6
|
+
export {};
|
|
@@ -11,9 +11,9 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
|
|
13
13
|
var AvailabilityLabel = function (_a) {
|
|
14
|
-
var label = _a.label, _b = _a.textSize, textSize = _b === void 0 ? typography.TextTypes.TextSize.EXTRASMALL : _b;
|
|
14
|
+
var label = _a.label, _b = _a.textSize, textSize = _b === void 0 ? typography.TextTypes.TextSize.EXTRASMALL : _b, color = _a.color;
|
|
15
15
|
return (React__default["default"].createElement(AvailabilityLabel_styles.Root, null,
|
|
16
|
-
React__default["default"].createElement(AvailabilityLabel_styles.Dot,
|
|
16
|
+
React__default["default"].createElement(AvailabilityLabel_styles.Dot, { color: color }),
|
|
17
17
|
React__default["default"].createElement(typography.BodyText, { size: textSize, as: "span" }, label)));
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
12
|
var Root = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__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; });
|
|
13
|
-
var Dot = styled__default["default"].span(templateObject_2 || (templateObject_2 = _tslib.__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 ||
|
|
13
|
+
var Dot = styled__default["default"].span(templateObject_2 || (templateObject_2 = _tslib.__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, _b; return (_a = props.color) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.brandYellow; });
|
|
14
14
|
var templateObject_1, templateObject_2;
|
|
15
15
|
|
|
16
16
|
exports.Dot = Dot;
|
|
@@ -45,7 +45,7 @@ var ListItem = function (_a) {
|
|
|
45
45
|
checkboxes && checkboxes.length > 0 && (React__default["default"].createElement(Skeleton__default["default"], { height: 20, width: smallSkeleton ? 150 : 200, count: checkboxes.length, style: { marginTop: '8px' } })))) : (React__default["default"].createElement(React.Fragment, null,
|
|
46
46
|
showPriceStripe && (React__default["default"].createElement(PriceStripe.PriceStripe, { size: PriceTag_types.EPriceSize.SMALL, variant: PriceTag_types.EPriceVariant.PRIO })),
|
|
47
47
|
React__default["default"].createElement(ProductHeader.ProductHeader, { location: ProductHeader.EProductHeader.LIST_ITEM, subtitle: item === null || item === void 0 ? void 0 : item.subtitle, title: item === null || item === void 0 ? void 0 : item.name }),
|
|
48
|
-
((_b = item === null || item === void 0 ? void 0 : item.status) === null || _b === void 0 ? void 0 : _b.label) && (React__default["default"].createElement(AvailabilityLabel.AvailabilityLabel, { label: item.status.label, textSize: item.status.textSize })),
|
|
48
|
+
((_b = item === null || item === void 0 ? void 0 : item.status) === null || _b === void 0 ? void 0 : _b.label) && (React__default["default"].createElement(AvailabilityLabel.AvailabilityLabel, { label: item.status.label, textSize: item.status.textSize, color: item.status.color })),
|
|
49
49
|
checkboxes && checkboxes.length > 0 && (React__default["default"].createElement(Fieldset.Fieldset, null,
|
|
50
50
|
checkboxLegendLabel && (React__default["default"].createElement(ListItem_styles.VisuallyHiddenLegend, null, checkboxLegendLabel)),
|
|
51
51
|
React__default["default"].createElement(ListItem_styles.CheckboxContainer, null, checkboxes.map(function (checkbox, index) {
|
|
@@ -3,9 +3,9 @@ import { TextTypes, BodyText } from '@citygross/typography';
|
|
|
3
3
|
import { Root, Dot } from './AvailabilityLabel.styles.js';
|
|
4
4
|
|
|
5
5
|
var AvailabilityLabel = function (_a) {
|
|
6
|
-
var label = _a.label, _b = _a.textSize, textSize = _b === void 0 ? TextTypes.TextSize.EXTRASMALL : _b;
|
|
6
|
+
var label = _a.label, _b = _a.textSize, textSize = _b === void 0 ? TextTypes.TextSize.EXTRASMALL : _b, color = _a.color;
|
|
7
7
|
return (React.createElement(Root, null,
|
|
8
|
-
React.createElement(Dot,
|
|
8
|
+
React.createElement(Dot, { color: color }),
|
|
9
9
|
React.createElement(BodyText, { size: textSize, as: "span" }, label)));
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@ import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
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 ||
|
|
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, _b; return (_a = props.color) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.brandYellow; });
|
|
6
6
|
var templateObject_1, templateObject_2;
|
|
7
7
|
|
|
8
8
|
export { Dot, Root };
|
|
@@ -36,7 +36,7 @@ var ListItem = function (_a) {
|
|
|
36
36
|
checkboxes && checkboxes.length > 0 && (React.createElement(Skeleton, { height: 20, width: smallSkeleton ? 150 : 200, count: checkboxes.length, style: { marginTop: '8px' } })))) : (React.createElement(Fragment, null,
|
|
37
37
|
showPriceStripe && (React.createElement(PriceStripe, { size: EPriceSize.SMALL, variant: EPriceVariant.PRIO })),
|
|
38
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 })),
|
|
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, color: item.status.color })),
|
|
40
40
|
checkboxes && checkboxes.length > 0 && (React.createElement(Fieldset, null,
|
|
41
41
|
checkboxLegendLabel && (React.createElement(VisuallyHiddenLegend, null, checkboxLegendLabel)),
|
|
42
42
|
React.createElement(CheckboxContainer, null, checkboxes.map(function (checkbox, index) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
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": "d975dbe9fb37b36aa91332c1bd4dc2efa01fb1f3"
|
|
80
80
|
}
|