trepur_components 0.2.12 → 0.2.15

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,7 +1,34 @@
1
- .slick-next {
2
- border: 2px solid black;
1
+ .slick-prev {
2
+ left: -55px;
3
+ }
4
+ .slick-prev:before {
5
+ height: 50px;
6
+ color: #31a3dd;
7
+ font-family: "slick";
8
+ font-size: 50px;
9
+ line-height: 1;
10
+ opacity: 1;
11
+ z-index: 5;
3
12
  }
4
13
 
5
- .slick-prev {
6
- border: 2px solid black;
14
+ .slick-next:before {
15
+ height: 50px;
16
+ color: #31a3dd;
17
+ font-family: "slick";
18
+ font-size: 50px;
19
+ line-height: 1;
20
+ opacity: 1;
21
+ z-index: 5;
22
+ }
23
+
24
+ .slick-dots li.slick-active button:before {
25
+ color: #31a3dd;
26
+ font-size: 12px;
27
+ opacity: 1;
28
+ }
29
+
30
+ .slick-dots li button:before {
31
+ color: pink;
32
+ font-size: 12px;
33
+ opacity: 1;
7
34
  }
@@ -25,15 +25,18 @@ const ImageLink = _ref => {
25
25
  altText,
26
26
  title,
27
27
  ctaText,
28
- ctaLink,
29
- rounded
28
+ link,
29
+ rounded,
30
+ openInNewTab
30
31
  } = _ref;
31
32
  const classList = 'cursor-pointer lg:mx-3 md:mx-1 mx-1 lg:mb-5 md:mb-2 mb-2 hover:opacity-50 overflow-hidden text-center ' + classes;
32
33
  let roundedClass = rounded ? 'rounded-full' : '';
33
34
  return /*#__PURE__*/_react.default.createElement("a", _extends({}, id && {
34
35
  id: id
35
36
  }, {
36
- href: ctaLink
37
+ href: link
38
+ }, openInNewTab && {
39
+ target: 'blank'
37
40
  }), /*#__PURE__*/_react.default.createElement("div", {
38
41
  className: roundedClass + ' ' + classList + ' relative overflow-hidden'
39
42
  }, /*#__PURE__*/_react.default.createElement("img", {
@@ -171,10 +171,10 @@ const Nav = _ref => {
171
171
  }, firstRow && firstRow.map(rowItem => {
172
172
  return /*#__PURE__*/_react.default.createElement(_Column.default, {
173
173
  classes: 'h-16 ' + rowItem.columnClasses,
174
- xs: rowItem.xsColumnWidth,
175
174
  sm: rowItem.smColumnWidth,
176
175
  md: rowItem.columnWidth,
177
- lg: rowItem.lgColumnWidth
176
+ lg: rowItem.lgColumnWidth,
177
+ xl: rowItem.xlColumnWidth
178
178
  }, /*#__PURE__*/_react.default.createElement("div", {
179
179
  className: rowItem.classes
180
180
  }, rowItem.component));
@@ -183,18 +183,20 @@ const Nav = _ref => {
183
183
  }, secondRow && secondRow.map(rowItem => {
184
184
  return /*#__PURE__*/_react.default.createElement(_Column.default, {
185
185
  classes: "h-16 ",
186
- xs: rowItem.xsColumnWidth,
187
186
  sm: rowItem.smColumnWidth,
188
- md: rowItem.columnWidth
187
+ md: rowItem.columnWidth,
188
+ lg: rowItem.lgColumnWidth,
189
+ xl: rowItem.xlColumnWidth
189
190
  }, rowItem.component);
190
191
  })), /*#__PURE__*/_react.default.createElement("div", {
191
192
  className: 'flex ' + thirdRowClasses
192
193
  }, thirdRow && thirdRow.map(rowItem => {
193
194
  return /*#__PURE__*/_react.default.createElement(_Column.default, {
194
195
  classes: "h-16",
195
- xs: rowItem.xsColumnWidth,
196
196
  sm: rowItem.smColumnWidth,
197
- md: rowItem.columnWidth
197
+ md: rowItem.columnWidth,
198
+ lg: rowItem.lgColumnWidth,
199
+ xl: rowItem.xlColumnWidth
198
200
  }, rowItem.component);
199
201
  })))), asSideBar ? /*#__PURE__*/_react.default.createElement("div", {
200
202
  style: sideNavWidth,
@@ -35,38 +35,52 @@ const NavItem = _ref => {
35
35
  hoverBgColor,
36
36
  bordered,
37
37
  rounded,
38
- underlineOnHover
38
+ underlineOnHover,
39
+ isActive,
40
+ activeBorderColor,
41
+ activeTextColor,
42
+ activeBgColor
39
43
  } = _ref;
40
44
  let classList = 'w-auto list-none ';
41
45
  classList += classes ? classes : '';
42
- let linkClassList = linkClasses && linkClasses;
43
- const underline = underlineOnHover && ' hover:underline'; //---------- Styling ---------------
46
+ let linkClassList = 'px-4 mx-2 mb-4 text-center whitespace-nowrap ';
47
+ linkClassList += bordered ? 'border ' : '';
48
+ linkClassList += rounded ? 'rounded-lg ' : '';
49
+ linkClassList += underlineOnHover ? 'hover:underline ' : '';
50
+ linkClassList += linkClasses ? linkClasses : ''; //---------- Styling ---------------
44
51
 
45
52
  const [styles, setStyles] = (0, _react.useState)({
46
53
  'backgroundColor': bgColor ? bgColor : 'white',
47
54
  color: textColor ? textColor : 'black',
48
55
  'borderColor': borderColor ? borderColor : 'black'
49
56
  });
57
+ const [activeStyles, setActiveStyles] = (0, _react.useState)({
58
+ 'backgroundColor': activeBgColor ? activeBgColor : 'white',
59
+ color: activeTextColor ? activeTextColor : 'black',
60
+ 'borderColor': activeBorderColor ? activeBorderColor : 'black'
61
+ });
50
62
 
51
63
  const setHoverState = isHovering => {
52
- if (isHovering) {
53
- setStyles({
54
- 'backgroundColor': hoverBgColor ? hoverBgColor : 'black',
55
- color: hoverTextColor ? hoverTextColor : 'white',
56
- 'borderColor': hoverBorderColor ? hoverBorderColor : 'black'
57
- });
58
- } else {
59
- setStyles({
60
- 'backgroundColor': bgColor ? bgColor : 'white',
61
- color: textColor ? textColor : 'black',
62
- 'borderColor': borderColor ? borderColor : 'black'
63
- });
64
- }
64
+ isHovering ? isActive ? setActiveStyles({
65
+ 'backgroundColor': activeBgColor ? activeBgColor : 'black',
66
+ color: activeTextColor ? activeTextColor : 'white',
67
+ 'borderColor': activeBorderColor ? activeBorderColor : 'black'
68
+ }) : setStyles({
69
+ 'backgroundColor': hoverBgColor ? hoverBgColor : 'black',
70
+ color: hoverTextColor ? hoverTextColor : 'white',
71
+ 'borderColor': hoverBorderColor ? hoverBorderColor : 'black'
72
+ }) : isActive ? setActiveStyles({
73
+ 'backgroundColor': activeBgColor ? activeBgColor : 'white',
74
+ color: activeTextColor ? activeTextColor : 'black',
75
+ 'borderColor': activeBorderColor ? activeBorderColor : 'black'
76
+ }) : setStyles({
77
+ 'backgroundColor': bgColor ? bgColor : 'white',
78
+ color: textColor ? textColor : 'black',
79
+ 'borderColor': borderColor ? borderColor : 'black'
80
+ });
65
81
  }; //-----------------------------------
66
82
 
67
83
 
68
- let borderClass = bordered ? ' border ' : '';
69
- let round = rounded ? ' rounded-lg ' : '';
70
84
  return /*#__PURE__*/_react.default.createElement("div", _extends({}, id && {
71
85
  id: id
72
86
  }, {
@@ -74,11 +88,11 @@ const NavItem = _ref => {
74
88
  }), /*#__PURE__*/_react.default.createElement("a", {
75
89
  href: url
76
90
  }, /*#__PURE__*/_react.default.createElement("li", {
77
- style: styles,
91
+ style: isActive ? activeStyles : styles,
78
92
  onMouseOver: () => setHoverState(true),
79
93
  onMouseOut: () => setHoverState(false),
80
94
  key: name,
81
- className: 'px-4 mx-2 mb-4 text-center ' + linkClassList + borderClass + round + underline,
95
+ className: linkClassList,
82
96
  onClick: onClick
83
97
  }, name)));
84
98
  };
@@ -25,12 +25,12 @@ const StarRating = _ref => {
25
25
  let {
26
26
  id,
27
27
  classes,
28
- stars = 5,
28
+ stars,
29
29
  size,
30
30
  iconClasses
31
31
  } = _ref;
32
32
  let classList = 'flex ';
33
- classList += classes ? classes : classes;
33
+ classList += classes ? classes : '';
34
34
  let iconClassList = iconClasses ? iconClasses : '';
35
35
 
36
36
  const getStars = () => {
@@ -38,7 +38,8 @@ const StarRating = _ref => {
38
38
 
39
39
  for (var i = 0; i < stars; i++) {
40
40
  starsArr.push( /*#__PURE__*/_react.default.createElement(_Icon.default, _extends({
41
- className: "".concat(iconClassList, " checked"),
41
+ id: "checked-".concat(i),
42
+ classes: "".concat(iconClassList, " checked"),
42
43
  type: "star"
43
44
  }, size && {
44
45
  size: size
@@ -53,7 +54,7 @@ const StarRating = _ref => {
53
54
 
54
55
  for (var i = 0; i < 5 - stars; i++) {
55
56
  starsArr.push( /*#__PURE__*/_react.default.createElement(_Icon.default, _extends({
56
- className: "".concat(iconClassList, " unchecked"),
57
+ classes: "".concat(iconClassList, " unchecked"),
57
58
  type: "star"
58
59
  }, size && {
59
60
  size: size
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.2.12",
5
+ "version": "0.2.15",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",