@pelcro/react-pelcro-js 4.0.0-alpha.104 → 4.0.0-alpha.106

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.
package/dist/index.cjs.js CHANGED
@@ -26455,16 +26455,17 @@ class SelectModal extends React.Component {
26455
26455
  onClick: e => this.selectPlan(e, true)
26456
26456
  }, this.locale("buttons.gift"))))));
26457
26457
  });
26458
- if (items.length > 3) {
26458
+ const isMobile = this.state.windowWidth < 768;
26459
+ const shouldRenderCarousel = items.length >= 2 && (isMobile || items.length > 2);
26460
+ if (shouldRenderCarousel) {
26459
26461
  return /*#__PURE__*/React__default['default'].createElement(Carousel, {
26460
26462
  slidesCount: items.length,
26461
- mobileArrowDown: true
26462
- }, items);
26463
- } else {
26464
- return /*#__PURE__*/React__default['default'].createElement("div", {
26465
- className: "plc-flex plc-flex-col md:plc-flex-row plc-gap-4 plc-items-center sm:plc-px-8 plc-px-0"
26463
+ mobileArrowDown: isMobile
26466
26464
  }, items);
26467
26465
  }
26466
+ return /*#__PURE__*/React__default['default'].createElement("div", {
26467
+ className: "plc-flex plc-flex-col md:plc-flex-row plc-gap-4 plc-items-center sm:plc-px-8 plc-px-0"
26468
+ }, items);
26468
26469
  });
26469
26470
  _defineProperty$4(this, "selectProduct", e => {
26470
26471
  const id = e.target.dataset.key;
package/dist/index.esm.js CHANGED
@@ -26425,16 +26425,17 @@ class SelectModal extends Component {
26425
26425
  onClick: e => this.selectPlan(e, true)
26426
26426
  }, this.locale("buttons.gift"))))));
26427
26427
  });
26428
- if (items.length > 3) {
26428
+ const isMobile = this.state.windowWidth < 768;
26429
+ const shouldRenderCarousel = items.length >= 2 && (isMobile || items.length > 2);
26430
+ if (shouldRenderCarousel) {
26429
26431
  return /*#__PURE__*/React__default.createElement(Carousel, {
26430
26432
  slidesCount: items.length,
26431
- mobileArrowDown: true
26432
- }, items);
26433
- } else {
26434
- return /*#__PURE__*/React__default.createElement("div", {
26435
- className: "plc-flex plc-flex-col md:plc-flex-row plc-gap-4 plc-items-center sm:plc-px-8 plc-px-0"
26433
+ mobileArrowDown: isMobile
26436
26434
  }, items);
26437
26435
  }
26436
+ return /*#__PURE__*/React__default.createElement("div", {
26437
+ className: "plc-flex plc-flex-col md:plc-flex-row plc-gap-4 plc-items-center sm:plc-px-8 plc-px-0"
26438
+ }, items);
26438
26439
  });
26439
26440
  _defineProperty$4(this, "selectProduct", e => {
26440
26441
  const id = e.target.dataset.key;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "4.0.0-alpha.104",
4
+ "version": "4.0.0-alpha.106",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",