@gem-sdk/components 4.0.9 → 4.0.11

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,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var jsxRuntime=require("react/jsx-runtime"),React=require("react"),helper=require("../../../../common/helper.js"),system=require("@gem-sdk/system"),Arrow=require("./Arrow.js"),CarouselPostPurchase=require("./CarouselPostPurchase.js"),useCarousel=require("../../../hooks/useCarousel.js"),classes=require("../../../common/classes.js"),styles=require("../../../common/styles.js");const CarouselWrapperPostPurchase=({styles:e,setting:s,productImages:r,objectFit:t="cover",aspectRatio:a,itemPerSlide:o=1,spacing:u,navigation:c="none",vertical:l=!1,border:i="none",idxActive:n})=>{let m={...e,...s},{layoutType:P}=m||{},{setMoveToIdx:h,setMaxIdx:p}=useCarousel.useCarousel(),j=helper.postPurchaseSpacing[u||"none"]??"0px",x="one-col"===P,y=system.createClass(classes.getImageListClass()),C=system.createStyle(styles.getImageListStyle({gap:j,vertical:l}));return React.useEffect(()=>{let e=r.length-Number(o||0);p(e)},[r.length,o,p]),React.useEffect(()=>{n&&1===o&&h(n)},[n,o,h]),jsxRuntime.jsxs("div",{className:y,style:C,children:[jsxRuntime.jsx(Arrow.ArrowPostPurchase,{type:"prev",navigation:c,vertical:l,hidden:x}),jsxRuntime.jsx(CarouselPostPurchase.CarouselPostPurchase,{productImages:r,itemPerRow:o,border:i,aspectRatio:a,objectFit:t,vertical:l}),jsxRuntime.jsx(Arrow.ArrowPostPurchase,{type:"next",navigation:c,vertical:l,hidden:x})]})};exports.CarouselWrapperPostPurchase=CarouselWrapperPostPurchase;
2
+ "use strict";var jsxRuntime=require("react/jsx-runtime"),React=require("react"),helper=require("../../../../common/helper.js"),system=require("@gem-sdk/system"),Arrow=require("./Arrow.js"),CarouselPostPurchase=require("./CarouselPostPurchase.js"),useCarousel=require("../../../hooks/useCarousel.js"),classes=require("../../../common/classes.js"),styles=require("../../../common/styles.js");const CarouselWrapperPostPurchase=({styles:e,setting:s,productImages:r,objectFit:t="cover",aspectRatio:a,itemPerSlide:o=1,spacing:u,navigation:c="none",vertical:l=!1,border:i="none",idxActive:n})=>{let m={...e,...s},{layoutType:P}=m||{},{setMoveToIdx:h,setMaxIdx:p}=useCarousel.useCarousel(),j=helper.postPurchaseSpacing[u||"none"]??"0px",x="one-col"===P,y=system.createClass(classes.getImageListClass()),C=system.createStyle(styles.getImageListStyle({gap:j,vertical:l}));return React.useEffect(()=>{let e=r.length-Number(o||0);p(e)},[r.length,o,p]),React.useEffect(()=>{(n||0===n)&&1===o&&h(n)},[n,o,h]),jsxRuntime.jsxs("div",{className:y,style:C,children:[jsxRuntime.jsx(Arrow.ArrowPostPurchase,{type:"prev",navigation:c,vertical:l,hidden:x}),jsxRuntime.jsx(CarouselPostPurchase.CarouselPostPurchase,{productImages:r,itemPerRow:o,border:i,aspectRatio:a,objectFit:t,vertical:l}),jsxRuntime.jsx(Arrow.ArrowPostPurchase,{type:"next",navigation:c,vertical:l,hidden:x})]})};exports.CarouselWrapperPostPurchase=CarouselWrapperPostPurchase;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useEffect as o}from"react";import{postPurchaseSpacing as t}from"../../../../common/helper.js";import{createClass as s,createStyle as m}from"@gem-sdk/system";import{ArrowPostPurchase as a}from"./Arrow.js";import{CarouselPostPurchase as i}from"./CarouselPostPurchase.js";import{useCarousel as n}from"../../../hooks/useCarousel.js";import{getImageListClass as p}from"../../../common/classes.js";import{getImageListStyle as c}from"../../../common/styles.js";let CarouselWrapperPostPurchase=({styles:l,setting:u,productImages:h,objectFit:d="cover",aspectRatio:f,itemPerSlide:j=1,spacing:v,navigation:g="none",vertical:P=!1,border:y="none",idxActive:x})=>{let C={...l,...u},{layoutType:b}=C||{},{setMoveToIdx:k,setMaxIdx:w}=n(),N=t[v||"none"]??"0px",R="one-col"===b,W=s(p()),A=m(c({gap:N,vertical:P}));return o(()=>{let e=h.length-Number(j||0);w(e)},[h.length,j,w]),o(()=>{x&&1===j&&k(x)},[x,j,k]),e("div",{className:W,style:A,children:[r(a,{type:"prev",navigation:g,vertical:P,hidden:R}),r(i,{productImages:h,itemPerRow:j,border:y,aspectRatio:f,objectFit:d,vertical:P}),r(a,{type:"next",navigation:g,vertical:P,hidden:R})]})};export{CarouselWrapperPostPurchase};
2
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useEffect as o}from"react";import{postPurchaseSpacing as t}from"../../../../common/helper.js";import{createClass as s,createStyle as m}from"@gem-sdk/system";import{ArrowPostPurchase as a}from"./Arrow.js";import{CarouselPostPurchase as i}from"./CarouselPostPurchase.js";import{useCarousel as n}from"../../../hooks/useCarousel.js";import{getImageListClass as p}from"../../../common/classes.js";import{getImageListStyle as c}from"../../../common/styles.js";let CarouselWrapperPostPurchase=({styles:l,setting:u,productImages:h,objectFit:d="cover",aspectRatio:f,itemPerSlide:j=1,spacing:v,navigation:g="none",vertical:P=!1,border:y="none",idxActive:x})=>{let C={...l,...u},{layoutType:b}=C||{},{setMoveToIdx:k,setMaxIdx:w}=n(),N=t[v||"none"]??"0px",R="one-col"===b,W=s(p()),A=m(c({gap:N,vertical:P}));return o(()=>{let e=h.length-Number(j||0);w(e)},[h.length,j,w]),o(()=>{(x||0===x)&&1===j&&k(x)},[x,j,k]),e("div",{className:W,style:A,children:[r(a,{type:"prev",navigation:g,vertical:P,hidden:R}),r(i,{productImages:h,itemPerRow:j,border:y,aspectRatio:f,objectFit:d,vertical:P}),r(a,{type:"next",navigation:g,vertical:P,hidden:R})]})};export{CarouselWrapperPostPurchase};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "3.1.17",
28
+ "@gem-sdk/core": "4.0.11",
29
29
  "@gem-sdk/styles": "3.1.0",
30
30
  "@gem-sdk/system": "3.1.0",
31
31
  "tsup": "^8.5.0",