@lanaco/lnc-react-ui 4.0.66 → 4.0.67

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.
@@ -140,4 +140,4 @@
140
140
  display: none;
141
141
  }
142
142
  }
143
- `,Te=N.forwardRef(({carouselItems:t=[],onSelectItem:n=()=>{},buttonText:r,onButtonAction:i=()=>{}},e)=>{const o=Ce.useDetectMobile();return D.jsx(Ot,{ref:e,children:D.jsx(Pe.Carousel,{autoPlay:!0,infiniteLoop:!0,showArrows:!1,showStatus:!1,showThumbs:!1,transitionTime:500,onClickItem:a=>{o||n==null||n(t==null?void 0:t.at(a),a)},children:t&&(t==null?void 0:t.map((a,s)=>D.jsxs(Rt,{children:[D.jsx("img",{loading:"lazy",src:a.imageUrl}),D.jsx(Et,{children:D.jsxs("div",{className:"banner-content",children:[D.jsxs("div",{className:"banner-text",children:[D.jsx("div",{className:"banner-title",children:a.title}),a.description]}),De.isDefined(r)&&D.jsx(Le,{color:"neutral",trailingIcon:"arrow-right",onClick:()=>i(a),children:a.buttonText})]})})]},`banner-${s+1}`)))})})});Te.propTypes={items:le.PropTypes.array,handleClick:le.PropTypes.func};module.exports=Te;
143
+ `,Te=N.forwardRef(({carouselItems:t=[],onSelectItem:n=()=>{},onButtonAction:r=()=>{}},i)=>{const e=Ce.useDetectMobile();return D.jsx(Ot,{ref:i,children:D.jsx(Pe.Carousel,{autoPlay:!0,infiniteLoop:!0,showArrows:!1,showStatus:!1,showThumbs:!1,transitionTime:500,onClickItem:o=>{e||n==null||n(t==null?void 0:t.at(o),o)},children:t&&(t==null?void 0:t.map((o,a)=>D.jsxs(Rt,{children:[D.jsx("img",{loading:"lazy",src:o.imageUrl}),D.jsx(Et,{children:D.jsxs("div",{className:"banner-content",children:[D.jsxs("div",{className:"banner-text",children:[D.jsx("div",{className:"banner-title",children:o.title}),o.description]}),De.isDefined(o==null?void 0:o.buttonText)&&D.jsx(Le,{color:"neutral",trailingIcon:"arrow-right",onClick:()=>r(o),children:o.buttonText})]})})]},`banner-${a+1}`)))})})});Te.propTypes={items:le.PropTypes.array,handleClick:le.PropTypes.func};module.exports=Te;
@@ -16,7 +16,7 @@ function We() {
16
16
  })(Pe, function(n, r, i) {
17
17
  Object.defineProperty(n, "__esModule", {
18
18
  value: !0
19
- }), n.setHasSupportToCaptureOption = E;
19
+ }), n.setHasSupportToCaptureOption = T;
20
20
  var e = a(r), o = a(i);
21
21
  function a(l) {
22
22
  return l && l.__esModule ? l : {
@@ -44,8 +44,8 @@ function We() {
44
44
  var m = /* @__PURE__ */ function() {
45
45
  function l(d, S) {
46
46
  for (var u = 0; u < S.length; u++) {
47
- var b = S[u];
48
- b.enumerable = b.enumerable || !1, b.configurable = !0, "value" in b && (b.writable = !0), Object.defineProperty(d, b.key, b);
47
+ var g = S[u];
48
+ g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(d, g.key, g);
49
49
  }
50
50
  }
51
51
  return function(d, S, u) {
@@ -69,36 +69,36 @@ function We() {
69
69
  }
70
70
  }), d && (Object.setPrototypeOf ? Object.setPrototypeOf(l, d) : l.__proto__ = d);
71
71
  }
72
- var g = !1;
73
- function E(l) {
74
- g = l;
72
+ var b = !1;
73
+ function T(l) {
74
+ b = l;
75
75
  }
76
76
  try {
77
77
  addEventListener("test", null, Object.defineProperty({}, "capture", { get: function() {
78
- E(!0);
78
+ T(!0);
79
79
  } }));
80
80
  } catch {
81
81
  }
82
82
  function X() {
83
83
  var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { capture: !0 };
84
- return g ? l : l.capture;
84
+ return b ? l : l.capture;
85
85
  }
86
86
  function se(l) {
87
87
  if ("touches" in l) {
88
88
  var d = l.touches[0], S = d.pageX, u = d.pageY;
89
89
  return { x: S, y: u };
90
90
  }
91
- var b = l.screenX, T = l.screenY;
92
- return { x: b, y: T };
91
+ var g = l.screenX, E = l.screenY;
92
+ return { x: g, y: E };
93
93
  }
94
94
  var z = function(l) {
95
95
  _(d, l);
96
96
  function d() {
97
97
  var S;
98
98
  h(this, d);
99
- for (var u = arguments.length, b = Array(u), T = 0; T < u; T++)
100
- b[T] = arguments[T];
101
- var y = v(this, (S = d.__proto__ || Object.getPrototypeOf(d)).call.apply(S, [this].concat(b)));
99
+ for (var u = arguments.length, g = Array(u), E = 0; E < u; E++)
100
+ g[E] = arguments[E];
101
+ var y = v(this, (S = d.__proto__ || Object.getPrototypeOf(d)).call.apply(S, [this].concat(g)));
102
102
  return y._handleSwipeStart = y._handleSwipeStart.bind(y), y._handleSwipeMove = y._handleSwipeMove.bind(y), y._handleSwipeEnd = y._handleSwipeEnd.bind(y), y._onMouseDown = y._onMouseDown.bind(y), y._onMouseMove = y._onMouseMove.bind(y), y._onMouseUp = y._onMouseUp.bind(y), y._setSwiperRef = y._setSwiperRef.bind(y), y;
103
103
  }
104
104
  return m(d, [{
@@ -135,14 +135,14 @@ function We() {
135
135
  }, {
136
136
  key: "_handleSwipeStart",
137
137
  value: function(u) {
138
- var b = se(u), T = b.x, y = b.y;
139
- this.moveStart = { x: T, y }, this.props.onSwipeStart(u);
138
+ var g = se(u), E = g.x, y = g.y;
139
+ this.moveStart = { x: E, y }, this.props.onSwipeStart(u);
140
140
  }
141
141
  }, {
142
142
  key: "_handleSwipeMove",
143
143
  value: function(u) {
144
144
  if (this.moveStart) {
145
- var b = se(u), T = b.x, y = b.y, Y = T - this.moveStart.x, we = y - this.moveStart.y;
145
+ var g = se(u), E = g.x, y = g.y, Y = E - this.moveStart.x, we = y - this.moveStart.y;
146
146
  this.moving = !0;
147
147
  var Me = this.props.onSwipeMove({
148
148
  x: Y,
@@ -155,8 +155,8 @@ function We() {
155
155
  key: "_handleSwipeEnd",
156
156
  value: function(u) {
157
157
  this.props.onSwipeEnd(u);
158
- var b = this.props.tolerance;
159
- this.moving && this.movePosition && (this.movePosition.deltaX < -b ? this.props.onSwipeLeft(1, u) : this.movePosition.deltaX > b && this.props.onSwipeRight(1, u), this.movePosition.deltaY < -b ? this.props.onSwipeUp(1, u) : this.movePosition.deltaY > b && this.props.onSwipeDown(1, u)), this.moveStart = null, this.moving = !1, this.movePosition = null;
158
+ var g = this.props.tolerance;
159
+ this.moving && this.movePosition && (this.movePosition.deltaX < -g ? this.props.onSwipeLeft(1, u) : this.movePosition.deltaX > g && this.props.onSwipeRight(1, u), this.movePosition.deltaY < -g ? this.props.onSwipeUp(1, u) : this.movePosition.deltaY > g && this.props.onSwipeDown(1, u)), this.moveStart = null, this.moving = !1, this.movePosition = null;
160
160
  }
161
161
  }, {
162
162
  key: "_setSwiperRef",
@@ -168,7 +168,7 @@ function We() {
168
168
  value: function() {
169
169
  var u = this.props;
170
170
  u.tagName;
171
- var b = u.className, T = u.style, y = u.children;
171
+ var g = u.className, E = u.style, y = u.children;
172
172
  u.allowMouseEvents, u.onSwipeUp, u.onSwipeDown, u.onSwipeLeft, u.onSwipeRight, u.onSwipeStart, u.onSwipeMove, u.onSwipeEnd, u.innerRef, u.tolerance;
173
173
  var Y = f(u, ["tagName", "className", "style", "children", "allowMouseEvents", "onSwipeUp", "onSwipeDown", "onSwipeLeft", "onSwipeRight", "onSwipeStart", "onSwipeMove", "onSwipeEnd", "innerRef", "tolerance"]);
174
174
  return e.default.createElement(
@@ -178,8 +178,8 @@ function We() {
178
178
  onMouseDown: this._onMouseDown,
179
179
  onTouchStart: this._handleSwipeStart,
180
180
  onTouchEnd: this._handleSwipeEnd,
181
- className: b,
182
- style: T
181
+ className: g,
182
+ style: E
183
183
  }, Y),
184
184
  y
185
185
  );
@@ -341,7 +341,7 @@ Object.defineProperty(j, "__esModule", {
341
341
  value: !0
342
342
  });
343
343
  j.default = void 0;
344
- var M = je(F), k = oe(K), Fe = ie, be = oe(x), Ke = oe(he), V = oe(q);
344
+ var M = je(F), k = oe(K), Fe = ie, ge = oe(x), Ke = oe(he), V = oe(q);
345
345
  function oe(t) {
346
346
  return t && t.__esModule ? t : { default: t };
347
347
  }
@@ -492,9 +492,9 @@ var Je = function(n) {
492
492
  return !1;
493
493
  var s = 0, f = M.Children.count(e.props.children), h = -(e.state.firstItem * 100) / e.state.visibleItems, m = Math.max(f - e.state.visibleItems, 0), v = -m * 100 / e.state.visibleItems;
494
494
  h === s && a > 0 && (a = 0), h === v && a < 0 && (a = 0);
495
- var _ = e.itemsWrapperRef.clientWidth, g = h + 100 / (_ / a);
496
- return e.itemsListRef && ["WebkitTransform", "MozTransform", "MsTransform", "OTransform", "transform", "msTransform"].forEach(function(E) {
497
- e.itemsListRef.style[E] = (0, be.default)(g, "%", e.props.axis);
495
+ var _ = e.itemsWrapperRef.clientWidth, b = h + 100 / (_ / a);
496
+ return e.itemsListRef && ["WebkitTransform", "MozTransform", "MsTransform", "OTransform", "transform", "msTransform"].forEach(function(T) {
497
+ e.itemsListRef.style[T] = (0, ge.default)(b, "%", e.props.axis);
498
498
  }), !0;
499
499
  }), P(O(e), "slideRight", function(o) {
500
500
  e.moveTo(e.state.firstItem - (typeof o == "number" ? o : 1));
@@ -577,7 +577,7 @@ var Je = function(n) {
577
577
  var e = this;
578
578
  if (!this.props.children)
579
579
  return null;
580
- var o = M.Children.count(this.props.children) > 1, a = this.state.showArrows && this.state.firstItem > 0, s = this.state.showArrows && this.state.firstItem < this.state.lastPosition, f = {}, h = -this.state.firstItem * (this.state.itemSize || 0), m = (0, be.default)(h, "px", this.props.axis), v = this.props.transitionTime + "ms";
580
+ var o = M.Children.count(this.props.children) > 1, a = this.state.showArrows && this.state.firstItem > 0, s = this.state.showArrows && this.state.firstItem < this.state.lastPosition, f = {}, h = -this.state.firstItem * (this.state.itemSize || 0), m = (0, ge.default)(h, "px", this.props.axis), v = this.props.transitionTime + "ms";
581
581
  return f = {
582
582
  WebkitTransform: m,
583
583
  MozTransform: m,
@@ -616,8 +616,8 @@ var Je = function(n) {
616
616
  allowMouseEvents: this.props.emulateTouch
617
617
  }, this.renderItems()) : /* @__PURE__ */ M.default.createElement("ul", {
618
618
  className: k.default.SLIDER(!1, this.state.swiping),
619
- ref: function(g) {
620
- return e.setItemsListRef(g);
619
+ ref: function(b) {
620
+ return e.setItemsListRef(b);
621
621
  },
622
622
  style: f
623
623
  }, this.renderItems()), /* @__PURE__ */ M.default.createElement("button", {
@@ -696,11 +696,11 @@ Object.defineProperty(C, "__esModule", {
696
696
  value: !0
697
697
  });
698
698
  C.fadeAnimationHandler = C.slideStopSwipingHandler = C.slideSwipeAnimationHandler = C.slideAnimationHandler = void 0;
699
- var Ee = F, ut = lt(x), L = R;
699
+ var Te = F, ut = lt(x), L = R;
700
700
  function lt(t) {
701
701
  return t && t.__esModule ? t : { default: t };
702
702
  }
703
- function ge(t, n) {
703
+ function be(t, n) {
704
704
  var r = Object.keys(t);
705
705
  if (Object.getOwnPropertySymbols) {
706
706
  var i = Object.getOwnPropertySymbols(t);
@@ -713,9 +713,9 @@ function ge(t, n) {
713
713
  function W(t) {
714
714
  for (var n = 1; n < arguments.length; n++) {
715
715
  var r = arguments[n] != null ? arguments[n] : {};
716
- n % 2 ? ge(Object(r), !0).forEach(function(i) {
716
+ n % 2 ? be(Object(r), !0).forEach(function(i) {
717
717
  ft(t, i, r[i]);
718
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : ge(Object(r)).forEach(function(i) {
718
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : be(Object(r)).forEach(function(i) {
719
719
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(r, i));
720
720
  });
721
721
  }
@@ -725,7 +725,7 @@ function ft(t, n, r) {
725
725
  return n in t ? Object.defineProperty(t, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = r, t;
726
726
  }
727
727
  var ct = function(n, r) {
728
- var i = {}, e = r.selectedItem, o = e, a = Ee.Children.count(n.children) - 1, s = n.infiniteLoop && (e < 0 || e > a);
728
+ var i = {}, e = r.selectedItem, o = e, a = Te.Children.count(n.children) - 1, s = n.infiniteLoop && (e < 0 || e > a);
729
729
  if (s)
730
730
  return o < 0 ? n.centerMode && n.centerSlidePercentage && n.axis === "horizontal" ? i.itemListStyle = (0, L.setPosition)(-(a + 2) * n.centerSlidePercentage - (100 - n.centerSlidePercentage) / 2, n.axis) : i.itemListStyle = (0, L.setPosition)(-(a + 2) * 100, n.axis) : o > a && (i.itemListStyle = (0, L.setPosition)(0, n.axis)), i;
731
731
  var f = (0, L.getPosition)(e, n), h = (0, ut.default)(f, "%", n.axis), m = n.transitionTime + "ms";
@@ -744,12 +744,12 @@ var ct = function(n, r) {
744
744
  };
745
745
  C.slideAnimationHandler = ct;
746
746
  var pt = function(n, r, i, e) {
747
- var o = {}, a = r.axis === "horizontal", s = Ee.Children.count(r.children), f = 0, h = (0, L.getPosition)(i.selectedItem, r), m = r.infiniteLoop ? (0, L.getPosition)(s - 1, r) - 100 : (0, L.getPosition)(s - 1, r), v = a ? n.x : n.y, _ = v;
747
+ var o = {}, a = r.axis === "horizontal", s = Te.Children.count(r.children), f = 0, h = (0, L.getPosition)(i.selectedItem, r), m = r.infiniteLoop ? (0, L.getPosition)(s - 1, r) - 100 : (0, L.getPosition)(s - 1, r), v = a ? n.x : n.y, _ = v;
748
748
  h === f && v > 0 && (_ = 0), h === m && v < 0 && (_ = 0);
749
- var g = h + 100 / (i.itemSize / _), E = Math.abs(v) > r.swipeScrollTolerance;
750
- return r.infiniteLoop && E && (i.selectedItem === 0 && g > -100 ? g -= s * 100 : i.selectedItem === s - 1 && g < -s * 100 && (g += s * 100)), (!r.preventMovementUntilSwipeScrollTolerance || E || i.swipeMovementStarted) && (i.swipeMovementStarted || e({
749
+ var b = h + 100 / (i.itemSize / _), T = Math.abs(v) > r.swipeScrollTolerance;
750
+ return r.infiniteLoop && T && (i.selectedItem === 0 && b > -100 ? b -= s * 100 : i.selectedItem === s - 1 && b < -s * 100 && (b += s * 100)), (!r.preventMovementUntilSwipeScrollTolerance || T || i.swipeMovementStarted) && (i.swipeMovementStarted || e({
751
751
  swipeMovementStarted: !0
752
- }), o.itemListStyle = (0, L.setPosition)(g, r.axis)), E && !i.cancelClick && e({
752
+ }), o.itemListStyle = (0, L.setPosition)(b, r.axis)), T && !i.cancelClick && e({
753
753
  cancelClick: !0
754
754
  }), o;
755
755
  };
@@ -802,10 +802,10 @@ var w = wt(F), mt = B(he), D = B(K), vt = B(j), G = B(ae), Z = B(q), H = R, Q =
802
802
  function B(t) {
803
803
  return t && t.__esModule ? t : { default: t };
804
804
  }
805
- function Te() {
805
+ function Ee() {
806
806
  if (typeof WeakMap != "function") return null;
807
807
  var t = /* @__PURE__ */ new WeakMap();
808
- return Te = function() {
808
+ return Ee = function() {
809
809
  return t;
810
810
  }, t;
811
811
  }
@@ -814,7 +814,7 @@ function wt(t) {
814
814
  return t;
815
815
  if (t === null || U(t) !== "object" && typeof t != "function")
816
816
  return { default: t };
817
- var n = Te();
817
+ var n = Ee();
818
818
  if (n && n.has(t))
819
819
  return n.get(t);
820
820
  var r = {}, i = Object.defineProperty && Object.getOwnPropertyDescriptor;
@@ -874,10 +874,10 @@ function St(t, n) {
874
874
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
875
875
  }
876
876
  }
877
- function bt(t, n, r) {
877
+ function gt(t, n, r) {
878
878
  return n && St(t.prototype, n), t;
879
879
  }
880
- function gt(t, n) {
880
+ function bt(t, n) {
881
881
  if (typeof n != "function" && n !== null)
882
882
  throw new TypeError("Super expression must either be null or a function");
883
883
  t.prototype = Object.create(n && n.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), n && de(t, n);
@@ -926,7 +926,7 @@ function c(t, n, r) {
926
926
  return n in t ? Object.defineProperty(t, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = r, t;
927
927
  }
928
928
  var ve = /* @__PURE__ */ function(t) {
929
- gt(r, t);
929
+ bt(r, t);
930
930
  var n = _t(r);
931
931
  function r(i) {
932
932
  var e;
@@ -1056,8 +1056,8 @@ var ve = /* @__PURE__ */ function(t) {
1056
1056
  if (f.length > 0) {
1057
1057
  var h = f[0];
1058
1058
  if (!h.complete) {
1059
- var m = function g() {
1060
- e.forceUpdate(), h.removeEventListener("load", g);
1059
+ var m = function b() {
1060
+ e.forceUpdate(), h.removeEventListener("load", b);
1061
1061
  };
1062
1062
  h.addEventListener("load", m);
1063
1063
  }
@@ -1085,7 +1085,7 @@ var ve = /* @__PURE__ */ function(t) {
1085
1085
  };
1086
1086
  return e.animationHandler = typeof i.animationHandler == "function" && i.animationHandler || i.animationHandler === "fade" && Q.fadeAnimationHandler || Q.slideAnimationHandler, e.state = I(I({}, o), e.animationHandler(i, o)), e;
1087
1087
  }
1088
- return bt(r, [{
1088
+ return gt(r, [{
1089
1089
  key: "componentDidMount",
1090
1090
  value: function() {
1091
1091
  this.props.children && this.setupCarousel();
@@ -1162,8 +1162,8 @@ var ve = /* @__PURE__ */ function(t) {
1162
1162
  pointerEvents: "none"
1163
1163
  }));
1164
1164
  var v = {
1165
- ref: function(g) {
1166
- return o.setItemsRef(g, s);
1165
+ ref: function(b) {
1166
+ return o.setItemsRef(b, s);
1167
1167
  },
1168
1168
  key: "itemKey" + s + (e ? "clone" : ""),
1169
1169
  className: D.default.ITEM(!0, s === o.state.selectedItem, s === o.state.previousItem),
@@ -1212,23 +1212,23 @@ var ve = /* @__PURE__ */ function(t) {
1212
1212
  var e = this;
1213
1213
  if (!this.props.children || w.Children.count(this.props.children) === 0)
1214
1214
  return null;
1215
- var o = this.props.swipeable && w.Children.count(this.props.children) > 1, a = this.props.axis === "horizontal", s = this.props.showArrows && w.Children.count(this.props.children) > 1, f = s && (this.state.selectedItem > 0 || this.props.infiniteLoop) || !1, h = s && (this.state.selectedItem < w.Children.count(this.props.children) - 1 || this.props.infiniteLoop) || !1, m = this.renderItems(!0), v = m.shift(), _ = m.pop(), g = {
1215
+ var o = this.props.swipeable && w.Children.count(this.props.children) > 1, a = this.props.axis === "horizontal", s = this.props.showArrows && w.Children.count(this.props.children) > 1, f = s && (this.state.selectedItem > 0 || this.props.infiniteLoop) || !1, h = s && (this.state.selectedItem < w.Children.count(this.props.children) - 1 || this.props.infiniteLoop) || !1, m = this.renderItems(!0), v = m.shift(), _ = m.pop(), b = {
1216
1216
  className: D.default.SLIDER(!0, this.state.swiping),
1217
1217
  onSwipeMove: this.onSwipeMove,
1218
1218
  onSwipeStart: this.onSwipeStart,
1219
1219
  onSwipeEnd: this.onSwipeEnd,
1220
1220
  style: this.state.itemListStyle,
1221
1221
  tolerance: this.props.swipeScrollTolerance
1222
- }, E = {};
1222
+ }, T = {};
1223
1223
  if (a) {
1224
- if (g.onSwipeLeft = this.onSwipeForward, g.onSwipeRight = this.onSwipeBackwards, this.props.dynamicHeight) {
1224
+ if (b.onSwipeLeft = this.onSwipeForward, b.onSwipeRight = this.onSwipeBackwards, this.props.dynamicHeight) {
1225
1225
  var X = this.getVariableItemHeight(this.state.selectedItem);
1226
- E.height = X || "auto";
1226
+ T.height = X || "auto";
1227
1227
  }
1228
1228
  } else
1229
- g.onSwipeUp = this.props.verticalSwipe === "natural" ? this.onSwipeBackwards : this.onSwipeForward, g.onSwipeDown = this.props.verticalSwipe === "natural" ? this.onSwipeForward : this.onSwipeBackwards, g.style = I(I({}, g.style), {}, {
1229
+ b.onSwipeUp = this.props.verticalSwipe === "natural" ? this.onSwipeBackwards : this.onSwipeForward, b.onSwipeDown = this.props.verticalSwipe === "natural" ? this.onSwipeForward : this.onSwipeBackwards, b.style = I(I({}, b.style), {}, {
1230
1230
  height: this.state.itemSize
1231
- }), E.height = this.state.itemSize;
1231
+ }), T.height = this.state.itemSize;
1232
1232
  return /* @__PURE__ */ w.default.createElement("div", {
1233
1233
  "aria-label": this.props.ariaLabel,
1234
1234
  className: D.default.ROOT(this.props.className),
@@ -1241,11 +1241,11 @@ var ve = /* @__PURE__ */ function(t) {
1241
1241
  }
1242
1242
  }, this.renderControls(), this.props.renderArrowPrev(this.onClickPrev, f, this.props.labels.leftArrow), /* @__PURE__ */ w.default.createElement("div", {
1243
1243
  className: D.default.WRAPPER(!0, this.props.axis),
1244
- style: E
1244
+ style: T
1245
1245
  }, o ? /* @__PURE__ */ w.default.createElement(mt.default, pe({
1246
1246
  tagName: "ul",
1247
1247
  innerRef: this.setListRef
1248
- }, g, {
1248
+ }, b, {
1249
1249
  allowMouseEvents: this.props.emulateTouch
1250
1250
  }), this.props.infiniteLoop && _, this.renderItems(), this.props.infiniteLoop && v) : /* @__PURE__ */ w.default.createElement("ul", {
1251
1251
  className: D.default.SLIDER(!0, this.state.swiping),
@@ -1364,7 +1364,7 @@ var Rt = {};
1364
1364
  return o && o.__esModule ? o : { default: o };
1365
1365
  }
1366
1366
  })(Oe);
1367
- const Et = te.div`
1367
+ const Tt = te.div`
1368
1368
  position: relative;
1369
1369
 
1370
1370
  & .image-carousel {
@@ -1434,7 +1434,7 @@ te.div`
1434
1434
  display: none;
1435
1435
  }
1436
1436
  `;
1437
- const Tt = te.div`
1437
+ const Et = te.div`
1438
1438
  position: relative;
1439
1439
  border-radius: 0.75rem;
1440
1440
 
@@ -1513,12 +1513,11 @@ const Tt = te.div`
1513
1513
  carouselItems: t = [],
1514
1514
  onSelectItem: n = () => {
1515
1515
  },
1516
- buttonText: r,
1517
- onButtonAction: i = () => {
1516
+ onButtonAction: r = () => {
1518
1517
  }
1519
- }, e) => {
1520
- const o = De();
1521
- return /* @__PURE__ */ N(Et, { ref: e, children: /* @__PURE__ */ N(
1518
+ }, i) => {
1519
+ const e = De();
1520
+ return /* @__PURE__ */ N(Tt, { ref: i, children: /* @__PURE__ */ N(
1522
1521
  Oe.Carousel,
1523
1522
  {
1524
1523
  autoPlay: !0,
@@ -1527,27 +1526,27 @@ const Tt = te.div`
1527
1526
  showStatus: !1,
1528
1527
  showThumbs: !1,
1529
1528
  transitionTime: 500,
1530
- onClickItem: (a) => {
1531
- o || n == null || n(t == null ? void 0 : t.at(a), a);
1529
+ onClickItem: (o) => {
1530
+ e || n == null || n(t == null ? void 0 : t.at(o), o);
1532
1531
  },
1533
- children: t && (t == null ? void 0 : t.map((a, s) => /* @__PURE__ */ ue(Tt, { children: [
1534
- /* @__PURE__ */ N("img", { loading: "lazy", src: a.imageUrl }),
1532
+ children: t && (t == null ? void 0 : t.map((o, a) => /* @__PURE__ */ ue(Et, { children: [
1533
+ /* @__PURE__ */ N("img", { loading: "lazy", src: o.imageUrl }),
1535
1534
  /* @__PURE__ */ N(Mt, { children: /* @__PURE__ */ ue("div", { className: "banner-content", children: [
1536
1535
  /* @__PURE__ */ ue("div", { className: "banner-text", children: [
1537
- /* @__PURE__ */ N("div", { className: "banner-title", children: a.title }),
1538
- a.description
1536
+ /* @__PURE__ */ N("div", { className: "banner-title", children: o.title }),
1537
+ o.description
1539
1538
  ] }),
1540
- ke(r) && /* @__PURE__ */ N(
1539
+ ke(o == null ? void 0 : o.buttonText) && /* @__PURE__ */ N(
1541
1540
  Ae,
1542
1541
  {
1543
1542
  color: "neutral",
1544
1543
  trailingIcon: "arrow-right",
1545
- onClick: () => i(a),
1546
- children: a.buttonText
1544
+ onClick: () => r(o),
1545
+ children: o.buttonText
1547
1546
  }
1548
1547
  )
1549
1548
  ] }) })
1550
- ] }, `banner-${s + 1}`)))
1549
+ ] }, `banner-${a + 1}`)))
1551
1550
  }
1552
1551
  ) });
1553
1552
  }
@@ -1,9 +1,9 @@
1
- "use strict";const r=require("react/jsx-runtime"),s=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-CtNoHdBj.cjs"),C=require("./useDetectMobile-D6d5LpdL.cjs"),u=require("./utils-BXPz9bck.cjs"),q=require("./style-C571ywKV.cjs"),k=require("./Button.cjs"),m=require("./suspense-categories-card-simple-o7JK0fA4.cjs"),v=j.styled.div`
1
+ "use strict";const r=require("react/jsx-runtime"),s=require("react"),w=require("./emotion-styled.browser.esm-BtEseadx.cjs"),C=require("./consts-CtNoHdBj.cjs"),q=require("./useDetectMobile-D6d5LpdL.cjs"),d=require("./utils-BXPz9bck.cjs"),k=require("./style-C571ywKV.cjs"),v=require("./Button.cjs"),p=require("./suspense-categories-card-simple-o7JK0fA4.cjs"),M=w.styled.div`
2
2
  display: grid;
3
3
  grid-template-columns: ${a=>"repeat(6, minmax(0, 1fr))"};
4
4
  gap: 2rem;
5
5
 
6
- @media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
6
+ @media (max-width: ${C.MOBILE_SIZE_PX+"px"}) {
7
7
  display: flex;
8
8
  gap: 1rem;
9
9
  overflow-x: auto;
@@ -22,4 +22,4 @@
22
22
  /* Safari and Chrome */
23
23
  }
24
24
  }
25
- `,d=s.memo(m.CategorySimpleCard),M=s.forwardRef((a,p)=>{const{icon:l,title:g="Shop by category",items:i,buttonText:y="Shop now",buttonLink:c,limit:o=12,onButtonAction:b=()=>{},onSelectCard:t=()=>{},isLoading:h=!1}=a,f=C.useDetectMobile(),S=s.useMemo(()=>r.jsx(r.Fragment,{children:f===!0?i==null?void 0:i.map((e,n)=>r.jsx(d,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},n)):i==null?void 0:i.slice(0,o).map((e,n)=>r.jsx(d,{uuid:e==null?void 0:e.uuid,image:e==null?void 0:e.image,name:e==null?void 0:e.name,onSelectCard:()=>t==null?void 0:t(e==null?void 0:e.uuid)},n))}),[i]);return r.jsxs(q.RegulatTitleSectionWrapper,{ref:p,children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[u.isDefinedNotEmptyString(l)&&r.jsx("i",{className:l}),r.jsx("span",{children:g})]}),u.isDefinedNotEmptyString(c)&&r.jsx(k,{type:"button",btnType:"tinted",color:"gray",onClick:()=>b(c),borderRadius:"curved",children:y})]}),r.jsx(v,{limit:o,children:r.jsx(m.SuspenseSimpleCategoryCard,{isLoading:h,limit:o,keyPrefix:"explore-landing",children:S})})]})});module.exports=M;
25
+ `,m=s.memo(p.CategorySimpleCard),E=s.forwardRef((a,g)=>{const{icon:l,title:y="Shop by category",items:t,buttonText:b="Shop now",buttonLink:c,limit:o=12,onButtonAction:h=()=>{},onSelectCard:i=()=>{},isLoading:f=!1,getImage:u=()=>{}}=a,S=q.useDetectMobile(),j=s.useMemo(()=>r.jsx(r.Fragment,{children:S===!0?t==null?void 0:t.map((e,n)=>r.jsx(m,{uuid:e==null?void 0:e.uuid,image:u(e==null?void 0:e.image)||null,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e==null?void 0:e.uuid)},n)):t==null?void 0:t.slice(0,o).map((e,n)=>r.jsx(m,{uuid:e==null?void 0:e.uuid,image:u(e==null?void 0:e.image)||null,name:e==null?void 0:e.name,onSelectCard:()=>i==null?void 0:i(e)},n))}),[t]);return r.jsxs(k.RegulatTitleSectionWrapper,{ref:g,children:[r.jsxs("div",{className:"regular-title",children:[r.jsxs("div",{className:"regular-title-text",children:[d.isDefinedNotEmptyString(l)&&r.jsx("i",{className:l}),r.jsx("span",{children:y})]}),d.isDefinedNotEmptyString(c)&&r.jsx(v,{type:"button",btnType:"tinted",color:"gray",onClick:()=>h(c),borderRadius:"curved",children:b})]}),r.jsx(M,{limit:o,children:r.jsx(p.SuspenseSimpleCategoryCard,{isLoading:f,limit:o,keyPrefix:"explore-landing",children:j})})]})});module.exports=E;
@@ -1,18 +1,18 @@
1
- import { jsx as r, Fragment as w, jsxs as n } from "react/jsx-runtime";
2
- import { memo as S, forwardRef as C, useMemo as k } from "react";
3
- import { s as v } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { M } from "./consts-C1uHV4xc.js";
5
- import { u as E } from "./useDetectMobile-BC6EGaBc.js";
6
- import { k as d } from "./utils-DCs-SbIv.js";
1
+ import { jsx as r, Fragment as S, jsxs as n } from "react/jsx-runtime";
2
+ import { memo as C, forwardRef as k, useMemo as v } from "react";
3
+ import { s as M } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { M as E } from "./consts-C1uHV4xc.js";
5
+ import { u as I } from "./useDetectMobile-BC6EGaBc.js";
6
+ import { k as p } from "./utils-DCs-SbIv.js";
7
7
  import { R as N } from "./style-CsMpu4iC.js";
8
8
  import R from "./Button.js";
9
- import { C as B, S as I } from "./suspense-categories-card-simple-Tiure3NX.js";
10
- const L = v.div`
9
+ import { C as B, S as L } from "./suspense-categories-card-simple-Tiure3NX.js";
10
+ const P = M.div`
11
11
  display: grid;
12
12
  grid-template-columns: ${(l) => "repeat(6, minmax(0, 1fr))"};
13
13
  gap: 2rem;
14
14
 
15
- @media (max-width: ${M + "px"}) {
15
+ @media (max-width: ${E + "px"}) {
16
16
  display: flex;
17
17
  gap: 1rem;
18
18
  overflow-x: auto;
@@ -31,67 +31,69 @@ const L = v.div`
31
31
  /* Safari and Chrome */
32
32
  }
33
33
  }
34
- `, p = S(B), A = C((l, c) => {
34
+ `, c = C(B), G = k((l, u) => {
35
35
  const {
36
36
  icon: m,
37
- title: u = "Shop by category",
37
+ title: g = "Shop by category",
38
38
  items: o,
39
39
  buttonText: f = "Shop now",
40
40
  buttonLink: s,
41
41
  limit: t = 12,
42
- onButtonAction: g = () => {
42
+ onButtonAction: b = () => {
43
43
  },
44
44
  onSelectCard: i = () => {
45
45
  },
46
- isLoading: b = !1
47
- } = l, y = E(), h = k(() => /* @__PURE__ */ r(w, { children: y === !0 ? o == null ? void 0 : o.map((e, a) => /* @__PURE__ */ r(
48
- p,
46
+ isLoading: y = !1,
47
+ getImage: d = () => {
48
+ }
49
+ } = l, h = I(), w = v(() => /* @__PURE__ */ r(S, { children: h === !0 ? o == null ? void 0 : o.map((e, a) => /* @__PURE__ */ r(
50
+ c,
49
51
  {
50
52
  uuid: e == null ? void 0 : e.uuid,
51
- image: e == null ? void 0 : e.image,
53
+ image: d(e == null ? void 0 : e.image) || null,
52
54
  name: e == null ? void 0 : e.name,
53
55
  onSelectCard: () => i == null ? void 0 : i(e == null ? void 0 : e.uuid)
54
56
  },
55
57
  a
56
58
  )) : o == null ? void 0 : o.slice(0, t).map((e, a) => /* @__PURE__ */ r(
57
- p,
59
+ c,
58
60
  {
59
61
  uuid: e == null ? void 0 : e.uuid,
60
- image: e == null ? void 0 : e.image,
62
+ image: d(e == null ? void 0 : e.image) || null,
61
63
  name: e == null ? void 0 : e.name,
62
- onSelectCard: () => i == null ? void 0 : i(e == null ? void 0 : e.uuid)
64
+ onSelectCard: () => i == null ? void 0 : i(e)
63
65
  },
64
66
  a
65
67
  )) }), [o]);
66
- return /* @__PURE__ */ n(N, { ref: c, children: [
68
+ return /* @__PURE__ */ n(N, { ref: u, children: [
67
69
  /* @__PURE__ */ n("div", { className: "regular-title", children: [
68
70
  /* @__PURE__ */ n("div", { className: "regular-title-text", children: [
69
- d(m) && /* @__PURE__ */ r("i", { className: m }),
70
- /* @__PURE__ */ r("span", { children: u })
71
+ p(m) && /* @__PURE__ */ r("i", { className: m }),
72
+ /* @__PURE__ */ r("span", { children: g })
71
73
  ] }),
72
- d(s) && /* @__PURE__ */ r(
74
+ p(s) && /* @__PURE__ */ r(
73
75
  R,
74
76
  {
75
77
  type: "button",
76
78
  btnType: "tinted",
77
79
  color: "gray",
78
- onClick: () => g(s),
80
+ onClick: () => b(s),
79
81
  borderRadius: "curved",
80
82
  children: f
81
83
  }
82
84
  )
83
85
  ] }),
84
- /* @__PURE__ */ r(L, { limit: t, children: /* @__PURE__ */ r(
85
- I,
86
+ /* @__PURE__ */ r(P, { limit: t, children: /* @__PURE__ */ r(
87
+ L,
86
88
  {
87
- isLoading: b,
89
+ isLoading: y,
88
90
  limit: t,
89
91
  keyPrefix: "explore-landing",
90
- children: h
92
+ children: w
91
93
  }
92
94
  ) })
93
95
  ] });
94
96
  });
95
97
  export {
96
- A as default
98
+ G as default
97
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.66",
3
+ "version": "4.0.67",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [