@conboai/storybook.components 0.2.73 → 0.2.74

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,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- declare function ImageBox({ images }: {
3
+ declare function ImageBox({ images, imgIndex }: {
4
4
  images: string[];
5
+ imgIndex?: number;
5
6
  }): React.JSX.Element;
6
7
  export default ImageBox;
@@ -59932,12 +59932,12 @@ const oee = {
59932
59932
  }
59933
59933
  );
59934
59934
  };
59935
- function pre({ images: t }) {
59936
- const [e, n] = je(0), [r, i] = je(!1), o = () => {
59937
- n((l) => (l + 1) % t.length);
59938
- }, s = () => {
59939
- n(
59940
- (l) => l === 0 ? t.length - 1 : l - 1
59935
+ function pre({ images: t, imgIndex: e = 0 }) {
59936
+ const [n, r] = je(e), [i, o] = je(!1), s = () => {
59937
+ r((c) => (c + 1) % t.length);
59938
+ }, l = () => {
59939
+ r(
59940
+ (c) => c === 0 ? t.length - 1 : c - 1
59941
59941
  );
59942
59942
  };
59943
59943
  return /* @__PURE__ */ te.jsxs(te.Fragment, { children: [
@@ -59960,7 +59960,7 @@ function pre({ images: t }) {
59960
59960
  display: "flex",
59961
59961
  height: "100%",
59962
59962
  transition: "transform 0.2s ease-in-out",
59963
- transform: `translateX(-${e * 100 / t.length}%)`,
59963
+ transform: `translateX(-${n * 100 / t.length}%)`,
59964
59964
  width: `${t.length * 100}%`
59965
59965
  },
59966
59966
  children: [
@@ -59968,18 +59968,18 @@ function pre({ images: t }) {
59968
59968
  vee,
59969
59969
  {
59970
59970
  onModalClose: () => {
59971
- i(!1);
59971
+ o(!1);
59972
59972
  },
59973
- startIndex: e,
59974
- isModalOpen: r,
59973
+ startIndex: n,
59974
+ isModalOpen: i,
59975
59975
  images: t
59976
59976
  }
59977
59977
  ),
59978
- t.map((l, c) => /* @__PURE__ */ te.jsx(
59978
+ t.map((c, u) => /* @__PURE__ */ te.jsx(
59979
59979
  It,
59980
59980
  {
59981
59981
  onClick: () => {
59982
- i(!0);
59982
+ o(!0);
59983
59983
  },
59984
59984
  sx: {
59985
59985
  width: `${100 / t.length}%`,
@@ -59992,7 +59992,7 @@ function pre({ images: t }) {
59992
59992
  It,
59993
59993
  {
59994
59994
  component: "img",
59995
- src: l,
59995
+ src: c,
59996
59996
  sx: {
59997
59997
  width: "100%",
59998
59998
  height: "100%",
@@ -60002,7 +60002,7 @@ function pre({ images: t }) {
60002
60002
  }
60003
60003
  )
60004
60004
  },
60005
- c
60005
+ u
60006
60006
  ))
60007
60007
  ]
60008
60008
  }
@@ -60019,9 +60019,9 @@ function pre({ images: t }) {
60019
60019
  justifyContent: "center",
60020
60020
  gap: 4,
60021
60021
  children: [
60022
- /* @__PURE__ */ te.jsx(Hn, { onClick: s, children: /* @__PURE__ */ te.jsx(In, { icon: "arrowLeft", fill: Ng }) }),
60023
- /* @__PURE__ */ te.jsx(dn, { children: `${e + 1} / ${t.length}` }),
60024
- /* @__PURE__ */ te.jsx(Hn, { onClick: o, children: /* @__PURE__ */ te.jsx(In, { icon: "arrowRight", fill: Ng }) })
60022
+ /* @__PURE__ */ te.jsx(Hn, { onClick: l, children: /* @__PURE__ */ te.jsx(In, { icon: "arrowLeft", fill: Ng }) }),
60023
+ /* @__PURE__ */ te.jsx(dn, { children: `${n + 1} / ${t.length}` }),
60024
+ /* @__PURE__ */ te.jsx(Hn, { onClick: s, children: /* @__PURE__ */ te.jsx(In, { icon: "arrowRight", fill: Ng }) })
60025
60025
  ]
60026
60026
  }
60027
60027
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/storybook.components",
3
- "version": "0.2.73",
3
+ "version": "0.2.74",
4
4
  "main": "dist/storybook.components.mjs",
5
5
  "types": "dist/build/index.d.ts",
6
6
  "files": [