trepur_components 0.3.5 → 0.3.8

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.classes
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.classes = imageProps.classes + ' ' + imageClassList;
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.id && {
54
- id: imageProps.id + '_imageId'
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, {
@@ -71,7 +71,7 @@ const InformationIcon = _ref => {
71
71
  (informationIconProps === null || informationIconProps === void 0 ? void 0 : informationIconProps.withAnimation) && observer.observe(element);
72
72
  }, []);
73
73
  if (informationIconProps == undefined) return;
74
- const wrapperClasses = "h-96 flex items-center text-center \n py-12 hover:py-0 ease-out duration-300";
74
+ const wrapperClasses = "h-96 flex items-center text-center \n ease-out duration-300";
75
75
  const classList = (0, _classnames.default)({
76
76
  [informationIconProps.classes]: informationIconProps === null || informationIconProps === void 0 ? void 0 : informationIconProps.classes,
77
77
  'border': informationIconProps === null || informationIconProps === void 0 ? void 0 : informationIconProps.bordered,
@@ -84,7 +84,7 @@ const InformationIcon = _ref => {
84
84
  [informationIconProps.hoverBgColor]: informationIconProps === null || informationIconProps === void 0 ? void 0 : informationIconProps.hoverBgColor,
85
85
  'hover:text-white': !(informationIconProps !== null && informationIconProps !== void 0 && informationIconProps.hoverTextColor),
86
86
  'hover:bg-black': !(informationIconProps !== null && informationIconProps !== void 0 && informationIconProps.hoverBgColor)
87
- }, "flex flex-col justify-center w-full h-full items-center\n mx-12 my-12 ease-out duration-300 hover:m-0 text-lg hover:text-xl");
87
+ }, "flex flex-col justify-center w-full h-full items-center\n ease-out duration-300 text-md lg:text-md hover:text-lg");
88
88
 
89
89
  const counterAnimation = (obj, start, end, duration) => {
90
90
  let startTimestamp = null;
@@ -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 c = navItemProps !== null && navItemProps !== void 0 && navItemProps.isActive ? activeStyleClasses : styleClasses;
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(c),
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
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "trepur_components",
3
3
  "description": "component lib",
4
4
  "author": "trepur_ttenneb",
5
- "version": "0.3.5",
5
+ "version": "0.3.8",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",