trepur_components 0.3.3 → 0.3.4

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.
@@ -25,6 +25,8 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
25
25
 
26
26
  //https://keen-slider.io/docs#usage-in-react
27
27
  const CarouselV2 = _ref => {
28
+ var _instanceRef$current3, _instanceRef$current4, _instanceRef$current5, _instanceRef$current6, _instanceRef$current7, _instanceRef$current8, _instanceRef$current9, _instanceRef$current10;
29
+
28
30
  let {
29
31
  id,
30
32
  classes,
@@ -136,17 +138,17 @@ const CarouselV2 = _ref => {
136
138
 
137
139
  return e.stopPropagation() || ((_instanceRef$current2 = instanceRef.current) === null || _instanceRef$current2 === void 0 ? void 0 : _instanceRef$current2.next());
138
140
  },
139
- disabled: currentSlide === instanceRef.current.track.details.slides.length - 1,
141
+ disabled: currentSlide === (instanceRef === null || instanceRef === void 0 ? void 0 : (_instanceRef$current3 = instanceRef.current) === null || _instanceRef$current3 === void 0 ? void 0 : (_instanceRef$current4 = _instanceRef$current3.track) === null || _instanceRef$current4 === void 0 ? void 0 : (_instanceRef$current5 = _instanceRef$current4.details) === null || _instanceRef$current5 === void 0 ? void 0 : (_instanceRef$current6 = _instanceRef$current5.slides) === null || _instanceRef$current6 === void 0 ? void 0 : _instanceRef$current6.length) - 1,
140
142
  arrows: arrows
141
143
  }))), (dots === null || dots === void 0 ? void 0 : dots.visible) && loaded && instanceRef.current && /*#__PURE__*/_react.default.createElement("div", {
142
144
  className: "flex py-4 justify-center"
143
- }, [...Array(instanceRef.current.track.details.slides.length).keys()].map(idx => {
145
+ }, [...Array(instanceRef === null || instanceRef === void 0 ? void 0 : (_instanceRef$current7 = instanceRef.current) === null || _instanceRef$current7 === void 0 ? void 0 : (_instanceRef$current8 = _instanceRef$current7.track) === null || _instanceRef$current8 === void 0 ? void 0 : (_instanceRef$current9 = _instanceRef$current8.details) === null || _instanceRef$current9 === void 0 ? void 0 : (_instanceRef$current10 = _instanceRef$current9.slides) === null || _instanceRef$current10 === void 0 ? void 0 : _instanceRef$current10.length).keys()].map(idx => {
144
146
  return /*#__PURE__*/_react.default.createElement("button", {
145
147
  key: idx,
146
148
  onClick: () => {
147
- var _instanceRef$current3;
149
+ var _instanceRef$current11;
148
150
 
149
- (_instanceRef$current3 = instanceRef.current) === null || _instanceRef$current3 === void 0 ? void 0 : _instanceRef$current3.moveToIdx(idx);
151
+ (_instanceRef$current11 = instanceRef.current) === null || _instanceRef$current11 === void 0 ? void 0 : _instanceRef$current11.moveToIdx(idx);
150
152
  },
151
153
  className: dotClasses + (currentSlide === idx ? " active ".concat(dots === null || dots === void 0 ? void 0 : dots.activeColours) : " ".concat(dots === null || dots === void 0 ? void 0 : dots.colours))
152
154
  });
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.3",
5
+ "version": "0.3.4",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "react",