@coinswap-app/uikit 1.0.24 → 1.0.25

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
@@ -8874,18 +8874,34 @@ var BannerSlider = function BannerSlider(_ref4) {
8874
8874
  });
8875
8875
  }
8876
8876
  };
8877
+ // If single prop is true, always render first item without slider to prevent duplication
8878
+ if (single && items.length > 0) {
8879
+ return /*#__PURE__*/jsxRuntime.jsx(CarouselWrapper, {
8880
+ children: /*#__PURE__*/jsxRuntime.jsx(BannerSlide, {
8881
+ src: items[0].src,
8882
+ mobileSrc: items[0].mobileSrc,
8883
+ title: items[0].title,
8884
+ buttonUrl: items[0].buttonUrl
8885
+ })
8886
+ });
8887
+ }
8888
+ if (!items || items.length === 0) {
8889
+ return null;
8890
+ }
8891
+ // If only one item, render without slider to prevent duplication
8892
+ if (items.length === 1) {
8893
+ return /*#__PURE__*/jsxRuntime.jsx(CarouselWrapper, {
8894
+ children: /*#__PURE__*/jsxRuntime.jsx(BannerSlide, {
8895
+ src: items[0].src,
8896
+ mobileSrc: items[0].mobileSrc,
8897
+ title: items[0].title,
8898
+ buttonUrl: items[0].buttonUrl
8899
+ })
8900
+ });
8901
+ }
8877
8902
  return /*#__PURE__*/jsxRuntime.jsx(CarouselWrapper, {
8878
8903
  children: /*#__PURE__*/jsxRuntime.jsx(StyledSlider$2, _objectSpread2(_objectSpread2({}, settings), {}, {
8879
- children: single ? items.map(function (item, key) {
8880
- return /*#__PURE__*/jsxRuntime.jsx("div", {
8881
- children: /*#__PURE__*/jsxRuntime.jsx(BannerSlide, {
8882
- src: item.src,
8883
- mobileSrc: item.mobileSrc,
8884
- title: item.title,
8885
- buttonUrl: item.buttonUrl
8886
- })
8887
- }, key);
8888
- }).shift() : items.map(function (item, key) {
8904
+ children: items.map(function (item, key) {
8889
8905
  return /*#__PURE__*/jsxRuntime.jsx("div", {
8890
8906
  children: /*#__PURE__*/jsxRuntime.jsx(BannerSlide, {
8891
8907
  src: item.src,
package/dist/index.esm.js CHANGED
@@ -8852,18 +8852,34 @@ var BannerSlider = function BannerSlider(_ref4) {
8852
8852
  });
8853
8853
  }
8854
8854
  };
8855
+ // If single prop is true, always render first item without slider to prevent duplication
8856
+ if (single && items.length > 0) {
8857
+ return /*#__PURE__*/jsx(CarouselWrapper, {
8858
+ children: /*#__PURE__*/jsx(BannerSlide, {
8859
+ src: items[0].src,
8860
+ mobileSrc: items[0].mobileSrc,
8861
+ title: items[0].title,
8862
+ buttonUrl: items[0].buttonUrl
8863
+ })
8864
+ });
8865
+ }
8866
+ if (!items || items.length === 0) {
8867
+ return null;
8868
+ }
8869
+ // If only one item, render without slider to prevent duplication
8870
+ if (items.length === 1) {
8871
+ return /*#__PURE__*/jsx(CarouselWrapper, {
8872
+ children: /*#__PURE__*/jsx(BannerSlide, {
8873
+ src: items[0].src,
8874
+ mobileSrc: items[0].mobileSrc,
8875
+ title: items[0].title,
8876
+ buttonUrl: items[0].buttonUrl
8877
+ })
8878
+ });
8879
+ }
8855
8880
  return /*#__PURE__*/jsx(CarouselWrapper, {
8856
8881
  children: /*#__PURE__*/jsx(StyledSlider$2, _objectSpread2(_objectSpread2({}, settings), {}, {
8857
- children: single ? items.map(function (item, key) {
8858
- return /*#__PURE__*/jsx("div", {
8859
- children: /*#__PURE__*/jsx(BannerSlide, {
8860
- src: item.src,
8861
- mobileSrc: item.mobileSrc,
8862
- title: item.title,
8863
- buttonUrl: item.buttonUrl
8864
- })
8865
- }, key);
8866
- }).shift() : items.map(function (item, key) {
8882
+ children: items.map(function (item, key) {
8867
8883
  return /*#__PURE__*/jsx("div", {
8868
8884
  children: /*#__PURE__*/jsx(BannerSlide, {
8869
8885
  src: item.src,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinswap-app/uikit",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Set of UI components for CoinSwap projects",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",