trepur_components 0.3.6 → 0.3.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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.assign.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
8
|
-
require("core-js/modules/es.object.assign.js");
|
|
9
|
-
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
12
|
var _index = _interopRequireDefault(require("../Image/index"));
|
|
@@ -21,7 +21,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
21
|
|
|
22
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
23
|
|
|
24
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
+
|
|
26
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
+
|
|
28
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
|
|
24
30
|
const CardWithTopImage = _ref => {
|
|
31
|
+
var _imageProps, _imageProps2, _imageProps3, _imageProps4, _imageProps5;
|
|
32
|
+
|
|
25
33
|
let {
|
|
26
34
|
id,
|
|
27
35
|
contentId,
|
|
@@ -39,19 +47,21 @@ const CardWithTopImage = _ref => {
|
|
|
39
47
|
[imageWrapperClasses]: imageWrapperClasses
|
|
40
48
|
});
|
|
41
49
|
const imageClassList = (0, _classnames.default)({
|
|
42
|
-
[imageProps.classes]: imageProps === null ||
|
|
50
|
+
[(_imageProps = imageProps) === null || _imageProps === void 0 ? void 0 : _imageProps.classes]: (_imageProps2 = imageProps) === null || _imageProps2 === void 0 ? void 0 : _imageProps2.classes
|
|
43
51
|
}, 'flex mx-auto w-24 bg-white p-4');
|
|
44
52
|
const contentClassList = (0, _classnames.default)({
|
|
45
53
|
'border border-grey border-opacity-100': bordered,
|
|
46
54
|
[contentClasses]: contentClasses
|
|
47
55
|
}, 'pt-12 px-4 h-auto pb-16 -mt-12 bg-white');
|
|
48
|
-
imageProps
|
|
56
|
+
imageProps = _objectSpread(_objectSpread({}, imageProps), {}, {
|
|
57
|
+
classes: ((_imageProps3 = imageProps) === null || _imageProps3 === void 0 ? void 0 : _imageProps3.classes) + ' ' + imageClassList
|
|
58
|
+
});
|
|
49
59
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
|
|
50
60
|
id: id
|
|
51
61
|
}, {
|
|
52
62
|
className: classList
|
|
53
|
-
}), /*#__PURE__*/_react.default.createElement("div", _extends({}, (imageProps === null ||
|
|
54
|
-
id: (imageProps === null ||
|
|
63
|
+
}), /*#__PURE__*/_react.default.createElement("div", _extends({}, ((_imageProps4 = imageProps) === null || _imageProps4 === void 0 ? void 0 : _imageProps4.id) && {
|
|
64
|
+
id: ((_imageProps5 = imageProps) === null || _imageProps5 === void 0 ? void 0 : _imageProps5.id) + '_imageId'
|
|
55
65
|
}, {
|
|
56
66
|
className: imageWrapperClassList
|
|
57
67
|
}), /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
@@ -93,7 +93,10 @@ const NavItem = _ref => {
|
|
|
93
93
|
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.hoverBorderColor]: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.hoverBorderColor,
|
|
94
94
|
'hover:border-black': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.hoverBorderColor)
|
|
95
95
|
});
|
|
96
|
-
const
|
|
96
|
+
const styles = (0, _classnames.default)({
|
|
97
|
+
[activeStyleClasses]: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.isActive,
|
|
98
|
+
[styleClasses]: !(navItemProps !== null && navItemProps !== void 0 && navItemProps.isActive)
|
|
99
|
+
});
|
|
97
100
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, (navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.id) && {
|
|
98
101
|
id: navItemProps.id
|
|
99
102
|
}, {
|
|
@@ -101,7 +104,7 @@ const NavItem = _ref => {
|
|
|
101
104
|
}), /*#__PURE__*/_react.default.createElement("a", {
|
|
102
105
|
href: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.url
|
|
103
106
|
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
104
|
-
className: "".concat(linkClassList, " ").concat(hoverStyles, " ").concat(
|
|
107
|
+
className: "".concat(linkClassList, " ").concat(hoverStyles, " ").concat(styles),
|
|
105
108
|
onClick: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.onClick
|
|
106
109
|
}, navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.name)));
|
|
107
110
|
};
|
|
@@ -60,9 +60,9 @@ const StarRating = _ref => {
|
|
|
60
60
|
var _starRatingProps$icon2;
|
|
61
61
|
|
|
62
62
|
starsArr.push( /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
63
|
+
key: "unchecked_star_".concat(i + 0),
|
|
63
64
|
iconProps: {
|
|
64
65
|
id: "unchecked-".concat(i),
|
|
65
|
-
key: "unchecked_star_".concat(i + 0),
|
|
66
66
|
classes: "".concat(iconClassList, " checked"),
|
|
67
67
|
type: 'star',
|
|
68
68
|
size: starRatingProps === null || starRatingProps === void 0 ? void 0 : (_starRatingProps$icon2 = starRatingProps.iconProps) === null || _starRatingProps$icon2 === void 0 ? void 0 : _starRatingProps$icon2.size
|
|
@@ -80,9 +80,9 @@ const StarRating = _ref => {
|
|
|
80
80
|
var _starRatingProps$icon3;
|
|
81
81
|
|
|
82
82
|
starsArr.push( /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
83
|
+
key: "checked_star_".concat(i + 0),
|
|
83
84
|
iconProps: {
|
|
84
85
|
id: "checked-".concat(i),
|
|
85
|
-
key: "checked_star_".concat(i + 0),
|
|
86
86
|
classes: "".concat(iconClassList, " unchecked"),
|
|
87
87
|
type: 'star',
|
|
88
88
|
size: starRatingProps === null || starRatingProps === void 0 ? void 0 : (_starRatingProps$icon3 = starRatingProps.iconProps) === null || _starRatingProps$icon3 === void 0 ? void 0 : _starRatingProps$icon3.size
|
|
@@ -81,8 +81,8 @@ const Timeline = _ref => {
|
|
|
81
81
|
|
|
82
82
|
if (isHorizontal) {
|
|
83
83
|
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
84
|
+
key: "horizontal_col_".concat(i + 0),
|
|
84
85
|
columnProps: {
|
|
85
|
-
key: "horizontal_col_".concat(i + 0),
|
|
86
86
|
id: 'timeline-item',
|
|
87
87
|
classes: "".concat(liClasses, " py-4 mb-8")
|
|
88
88
|
}
|
|
@@ -110,8 +110,8 @@ const Timeline = _ref => {
|
|
|
110
110
|
}, !before && item.component));
|
|
111
111
|
} else {
|
|
112
112
|
return /*#__PURE__*/_react.default.createElement(_Row.default, {
|
|
113
|
+
key: "vertical_row_".concat(i + 0),
|
|
113
114
|
rowProps: {
|
|
114
|
-
key: "vertical_row_".concat(i + 0),
|
|
115
115
|
id: 'timeline-item',
|
|
116
116
|
classes: "".concat(liClasses, " py-4")
|
|
117
117
|
}
|