@citygross/components 0.7.228 → 0.7.229

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.
@@ -2,6 +2,7 @@
2
2
  declare type TBaseTimelineList = {
3
3
  borderStyle: 'dashed' | 'solid';
4
4
  borderColor?: string;
5
+ length?: number;
5
6
  };
6
7
  export declare const BaseTimelineItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
8
  export declare const BaseTimeline: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -19,7 +19,7 @@ function Timeline(_a) {
19
19
  var isMobile = utils.useDetectDevice().isMobile;
20
20
  return (React__default["default"].createElement(Timeline_styles.BaseTimeline, null,
21
21
  React__default["default"].createElement(Timeline_styles.TimeLineH3, null, isMobile ? mobileTitle : title),
22
- React__default["default"].createElement(Timeline_styles.BaseTimelineList, { borderStyle: borderStyle, borderColor: borderColor }, items.map(function (item, index) { return (React__default["default"].createElement(Timeline_styles.BaseTimelineItem, { key: item.primaryText },
22
+ React__default["default"].createElement(Timeline_styles.BaseTimelineList, { borderStyle: borderStyle, borderColor: borderColor, length: items === null || items === void 0 ? void 0 : items.length }, items.map(function (item, index) { return (React__default["default"].createElement(Timeline_styles.BaseTimelineItem, { key: item.primaryText },
23
23
  React__default["default"].createElement(DotIndicator.Dot, { color: reversed
24
24
  ? index >= current
25
25
  ? dotActiveColor
@@ -13,9 +13,11 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
13
13
  var BaseTimelineItem = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n gap: ", "px;\n align-items: center;\n padding: ", "px 0;\n position: relative;\n > * {\n &:nth-child(2) {\n flex-grow: 1;\n }\n }\n"], ["\n display: flex;\n gap: ", "px;\n align-items: center;\n padding: ", "px 0;\n position: relative;\n > * {\n &:nth-child(2) {\n flex-grow: 1;\n }\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.md; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; });
14
14
  var BaseTimeline = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
15
15
  var TimeLineH3 = styled__default["default"](typography.H3)(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n padding-bottom: ", "px;\n"], ["\n padding-bottom: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; });
16
- var BaseTimelineList = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n position: relative;\n\n &::before {\n content: '';\n border-left: 1px\n ", ";\n height: calc(100% - 28px);\n position: absolute;\n top: 14px;\n left: 3.5px;\n }\n"], ["\n position: relative;\n\n &::before {\n content: '';\n border-left: 1px\n ", ";\n height: calc(100% - 28px);\n position: absolute;\n top: 14px;\n left: 3.5px;\n }\n"])), function (props) {
16
+ var BaseTimelineList = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n position: relative;\n\n &::before {\n content: '';\n ", ";\n\n height: calc(100% - 32px);\n position: absolute;\n top: 16px;\n left: 3.5px;\n }\n"], ["\n position: relative;\n\n &::before {\n content: '';\n ", ";\n\n height: calc(100% - 32px);\n position: absolute;\n top: 16px;\n left: 3.5px;\n }\n"])), function (props) {
17
17
  var _a, _b;
18
- return "".concat(props.borderStyle, " ").concat((_a = props === null || props === void 0 ? void 0 : props.borderColor) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.alertGreen);
18
+ return (props === null || props === void 0 ? void 0 : props.length) &&
19
+ props.length > 1 &&
20
+ "border-left: 1px ".concat(props.borderStyle, " ").concat((_a = props === null || props === void 0 ? void 0 : props.borderColor) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.alertGreen);
19
21
  });
20
22
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
21
23
 
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Timeline.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -11,7 +11,7 @@ function Timeline(_a) {
11
11
  var isMobile = useDetectDevice().isMobile;
12
12
  return (React.createElement(BaseTimeline, null,
13
13
  React.createElement(TimeLineH3, null, isMobile ? mobileTitle : title),
14
- React.createElement(BaseTimelineList, { borderStyle: borderStyle, borderColor: borderColor }, items.map(function (item, index) { return (React.createElement(BaseTimelineItem, { key: item.primaryText },
14
+ React.createElement(BaseTimelineList, { borderStyle: borderStyle, borderColor: borderColor, length: items === null || items === void 0 ? void 0 : items.length }, items.map(function (item, index) { return (React.createElement(BaseTimelineItem, { key: item.primaryText },
15
15
  React.createElement(Dot, { color: reversed
16
16
  ? index >= current
17
17
  ? dotActiveColor
@@ -5,9 +5,11 @@ import { H3 } from '@citygross/typography';
5
5
  var BaseTimelineItem = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n gap: ", "px;\n align-items: center;\n padding: ", "px 0;\n position: relative;\n > * {\n &:nth-child(2) {\n flex-grow: 1;\n }\n }\n"], ["\n display: flex;\n gap: ", "px;\n align-items: center;\n padding: ", "px 0;\n position: relative;\n > * {\n &:nth-child(2) {\n flex-grow: 1;\n }\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.md; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; });
6
6
  var BaseTimeline = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
7
7
  var TimeLineH3 = styled(H3)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-bottom: ", "px;\n"], ["\n padding-bottom: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; });
8
- var BaseTimelineList = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: relative;\n\n &::before {\n content: '';\n border-left: 1px\n ", ";\n height: calc(100% - 28px);\n position: absolute;\n top: 14px;\n left: 3.5px;\n }\n"], ["\n position: relative;\n\n &::before {\n content: '';\n border-left: 1px\n ", ";\n height: calc(100% - 28px);\n position: absolute;\n top: 14px;\n left: 3.5px;\n }\n"])), function (props) {
8
+ var BaseTimelineList = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: relative;\n\n &::before {\n content: '';\n ", ";\n\n height: calc(100% - 32px);\n position: absolute;\n top: 16px;\n left: 3.5px;\n }\n"], ["\n position: relative;\n\n &::before {\n content: '';\n ", ";\n\n height: calc(100% - 32px);\n position: absolute;\n top: 16px;\n left: 3.5px;\n }\n"])), function (props) {
9
9
  var _a, _b;
10
- return "".concat(props.borderStyle, " ").concat((_a = props === null || props === void 0 ? void 0 : props.borderColor) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.alertGreen);
10
+ return (props === null || props === void 0 ? void 0 : props.length) &&
11
+ props.length > 1 &&
12
+ "border-left: 1px ".concat(props.borderStyle, " ").concat((_a = props === null || props === void 0 ? void 0 : props.borderColor) !== null && _a !== void 0 ? _a : (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.alertGreen);
11
13
  });
12
14
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
13
15
 
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Timeline.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.7.228",
3
+ "version": "0.7.229",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "./build/cjs/components/src/index.js",
@@ -74,5 +74,5 @@
74
74
  "react-slick": "^0.30.1",
75
75
  "slick-carousel": "^1.8.1"
76
76
  },
77
- "gitHead": "bf63b6824164fb363118d54dbcc466db944c5a9c"
77
+ "gitHead": "8bcc4f7659b579cdce28dbc233303c0eacf3b4f0"
78
78
  }