@anker-in/headless-ui 0.0.32-alpha.5 → 0.0.32-alpha.8

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.
Files changed (57) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.d.ts +3 -6
  2. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  3. package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
  4. package/dist/cjs/biz-components/Category/index.d.ts +2 -1
  5. package/dist/cjs/biz-components/Category/index.js +1 -1
  6. package/dist/cjs/biz-components/Category/index.js.map +2 -2
  7. package/dist/cjs/biz-components/Evaluate/index.d.ts +2 -3
  8. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  9. package/dist/cjs/biz-components/Evaluate/index.js.map +2 -2
  10. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  11. package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
  12. package/dist/cjs/biz-components/GraphicAttractionBlock/index.js +1 -1
  13. package/dist/cjs/biz-components/GraphicAttractionBlock/index.js.map +2 -2
  14. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  15. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  16. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  17. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  18. package/dist/cjs/biz-components/ShelfDisplay/index.js +5 -5
  19. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
  20. package/dist/cjs/cpn-components/CpnCountDown/index.js +1 -1
  21. package/dist/cjs/cpn-components/CpnCountDown/index.js.map +2 -2
  22. package/dist/cjs/cpn-components/CpnProductCard/index.js +1 -1
  23. package/dist/cjs/cpn-components/CpnProductCard/index.js.map +2 -2
  24. package/dist/cjs/cpn-components/CpnTitle/index.js +1 -1
  25. package/dist/cjs/cpn-components/CpnTitle/index.js.map +2 -2
  26. package/dist/cjs/stories/accordionCards.stories.d.ts +2 -6
  27. package/dist/cjs/stories/category.stories.js +1 -1
  28. package/dist/cjs/stories/category.stories.js.map +2 -2
  29. package/dist/esm/biz-components/AccordionCards/index.d.ts +3 -6
  30. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  31. package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
  32. package/dist/esm/biz-components/Category/index.d.ts +2 -1
  33. package/dist/esm/biz-components/Category/index.js +1 -1
  34. package/dist/esm/biz-components/Category/index.js.map +2 -2
  35. package/dist/esm/biz-components/Evaluate/index.d.ts +2 -3
  36. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  37. package/dist/esm/biz-components/Evaluate/index.js.map +2 -2
  38. package/dist/esm/biz-components/Graphic/index.js +1 -1
  39. package/dist/esm/biz-components/Graphic/index.js.map +2 -2
  40. package/dist/esm/biz-components/GraphicAttractionBlock/index.js +1 -1
  41. package/dist/esm/biz-components/GraphicAttractionBlock/index.js.map +2 -2
  42. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  43. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  44. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  45. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  46. package/dist/esm/biz-components/ShelfDisplay/index.js +5 -5
  47. package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
  48. package/dist/esm/cpn-components/CpnCountDown/index.js +1 -1
  49. package/dist/esm/cpn-components/CpnCountDown/index.js.map +2 -2
  50. package/dist/esm/cpn-components/CpnProductCard/index.js +1 -1
  51. package/dist/esm/cpn-components/CpnProductCard/index.js.map +2 -2
  52. package/dist/esm/cpn-components/CpnTitle/index.js +1 -1
  53. package/dist/esm/cpn-components/CpnTitle/index.js.map +2 -2
  54. package/dist/esm/stories/accordionCards.stories.d.ts +2 -6
  55. package/dist/esm/stories/category.stories.js +1 -1
  56. package/dist/esm/stories/category.stories.js.map +2 -2
  57. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";var H=Object.create;var x=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var q=(s,o)=>{for(var p in o)x(s,p,{get:o[p],enumerable:!0})},G=(s,o,p,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of D(o))!Q.call(s,l)&&l!==p&&x(s,l,{get:()=>o[l],enumerable:!(i=z(o,l))||i.enumerable});return s};var w=(s,o,p)=>(p=s!=null?H(U(s)):{},G(o||!s||!s.__esModule?x(p,"default",{value:s,enumerable:!0}):p,s)),A=s=>G(x({},"__esModule",{value:!0}),s);var J={};q(J,{default:()=>F});module.exports=A(J);var t=require("react/jsx-runtime"),c=w(require("react")),I=require("react-responsive"),L=require("../../shared/Styles.js"),T=w(require("../../components/picture.js")),N=w(require("../../components/button.js")),_=require("../../components/heading.js"),$=require("../../components/text.js"),g=require("../../components/gird.js"),S=w(require("../Title/index.js")),R=require("../../helpers/utils.js"),M=w(require("../SwiperBox/index.js")),n=require("../../components/tabs.js"),C=require("../../hooks/useExposure.js"),P=require("../../shared/trackUrlRef.js"),E=require("../../shared/track.js");const y="image",B="p1_banner",k=({data:s,configuration:o,jIndex:p,spanType:i})=>{const[l,d]=(0,c.useState)(!1),r=(0,I.useMediaQuery)({query:"(max-width: 768px)"}),h=(0,c.useRef)(null),m=()=>{if(i)switch(i){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(o?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,C.useExposure)(h,{componentType:y,componentName:B,position:p,componentTitle:s.title,componentDescription:s.description,navigation:o?.activeTab}),(0,c.useEffect)(()=>{d(r)},[r]);const{theme:b="light",title:f,description:e,imageUrl:a,primaryButton:u,secondaryButton:v,imageMobileUrl:j}=s,V="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,t.jsx)("div",{className:(0,R.cn)("item-wrapper text-info-primary group relative box-border w-full overflow-hidden",m(),{"rounded-2xl":o?.shape==="rounded","aiui-dark":b==="dark","h-[480px]":l&&!o?.isTab,"h-[400px]":l&&o?.isTab},"text-info-primary"),ref:h,children:(0,t.jsxs)("div",{className:"absolute inset-0",children:[(0,t.jsx)(T.default,{source:a?.url,className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${a?.width}/${a?.height}`}}),(0,t.jsx)(T.default,{source:j?.url||a?.url,className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),(0,t.jsxs)("div",{className:"laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(_.Heading,{size:3,className:"item-title",html:f}),(0,t.jsx)($.Text,{size:2,className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:e})]}),(0,t.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[v&&v.text&&(0,t.jsx)("a",{href:(0,P.trackUrlRef)(v.link,`${y}_${B}`),children:(0,t.jsx)(N.default,{className:V,variant:"secondary",children:v.text})}),u&&u.text&&(0,t.jsx)("a",{href:(0,P.trackUrlRef)(u.link,`${y}_${B}`),children:(0,t.jsx)(N.default,{className:V,variant:"primary",children:u.text})})]})]})]})})},O=c.default.forwardRef((s,o)=>{const{shape:p,sectionTitle:i,groupByTab:l=!1,items:d=[],carousel:r}=s.data,h=e=>{switch(e){case"full":return 12;case"half":return 6;case"one-third":return 4}},m=d.map(e=>e.tabName).filter(Boolean).filter((e,a,u)=>u.indexOf(e)===a),b=(e,a)=>{switch(e){case 1:return 1;case 2:return 2;default:return a?2.3:3}},f=m.map(e=>({tabName:e,items:d.filter(a=>a.tabName===e)})).reduce((e,a)=>(e[a.tabName]=a.items,e),{});return(0,t.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:o,className:"text-info-primary",children:[i&&(0,t.jsx)(S.default,{data:{title:i},className:"section-title"}),l?(0,t.jsxs)(n.Tabs,{shape:p,align:"left",defaultValue:m[0],children:[(0,t.jsx)(n.TabsList,{children:m.map((e,a)=>(0,t.jsx)(n.TabsTrigger,{value:e,onClick:()=>{(0,E.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:y,component_name:B,component_title:i,component_position:1,navigation:e,button_name:e}})},children:e},a))}),m.map((e,a)=>(0,t.jsx)(n.TabsContent,{value:e,className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:f?.[e]||[],configuration:{shape:p,isTab:l,activeTab:e,num:f?.[e]?.length||0}},Slide:k,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:b(f?.[e]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:b(f?.[e]?.length||0)}}}),r&&r?.items.length>0?(0,t.jsx)(M.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:r?.items||[],configuration:{shape:p,isTab:l}},Slide:k,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},a))]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Grid,{className:"w-full",children:[d.map((e,a)=>(0,t.jsx)(g.GridItem,{span:h(e.width??"full"),className:"laptop:block hidden",children:(0,t.jsx)(k,{data:e,configuration:{shape:p},jIndex:a,spanType:e.width})},`${e?.title||""}${a}`)),d.map((e,a)=>(0,t.jsx)(g.GridItem,{span:h("full"),className:"laptop:hidden block",children:(0,t.jsx)(k,{data:e,configuration:{shape:p},jIndex:a,spanType:"full"})},`${e?.title||""}${a}`))]}),r&&r?.items.length>0?(0,t.jsx)(M.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:r?.items||[],configuration:{shape:p}},Slide:k,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})]})});var F=(0,L.withStyles)(O);
1
+ "use strict";var H=Object.create;var x=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var q=(s,o)=>{for(var l in o)x(s,l,{get:o[l],enumerable:!0})},I=(s,o,l,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of D(o))!Q.call(s,p)&&p!==l&&x(s,p,{get:()=>o[p],enumerable:!(i=z(o,p))||i.enumerable});return s};var w=(s,o,l)=>(l=s!=null?H(U(s)):{},I(o||!s||!s.__esModule?x(l,"default",{value:s,enumerable:!0}):l,s)),A=s=>I(x({},"__esModule",{value:!0}),s);var J={};q(J,{default:()=>F});module.exports=A(J);var t=require("react/jsx-runtime"),c=w(require("react")),L=require("react-responsive"),_=require("../../shared/Styles.js"),T=w(require("../../components/picture.js")),N=w(require("../../components/button.js")),$=require("../../components/heading.js"),S=require("../../components/text.js"),g=require("../../components/gird.js"),R=w(require("../Title/index.js")),C=require("../../helpers/utils.js"),M=w(require("../SwiperBox/index.js")),n=require("../../components/tabs.js"),E=require("../../hooks/useExposure.js"),P=require("../../shared/trackUrlRef.js"),j=require("../../shared/track.js");const y="image",B="p1_banner",k=({data:s,configuration:o,jIndex:l,spanType:i})=>{const[p,d]=(0,c.useState)(!1),r=(0,L.useMediaQuery)({query:"(max-width: 768px)"}),h=(0,c.useRef)(null),m=()=>{if(i)switch(i){case"full":return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case"half":return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}else switch(o?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};(0,E.useExposure)(h,{componentType:y,componentName:B,position:l,componentTitle:s.title,componentDescription:s.description,navigation:o?.activeTab}),(0,c.useEffect)(()=>{d(r)},[r]);const{theme:b="light",title:f,description:e,imageUrl:a,primaryButton:u,secondaryButton:v,imageMobileUrl:V}=s,G="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,t.jsx)("div",{className:(0,C.cn)("item-wrapper text-info-primary group relative box-border w-full overflow-hidden",m(),{"rounded-2xl":o?.shape==="rounded","aiui-dark":b==="dark","h-[480px]":p&&!o?.isTab,"h-[400px]":p&&o?.isTab},"text-info-primary"),ref:h,children:(0,t.jsxs)("div",{className:"absolute inset-0",children:[(0,t.jsx)(T.default,{source:a?.url,alt:a?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${a?.width}/${a?.height}`}}),(0,t.jsx)(T.default,{source:V?.url||a?.url,alt:V?.alt||a?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),(0,t.jsxs)("div",{className:"laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)($.Heading,{size:3,className:"item-title",html:f}),(0,t.jsx)(S.Text,{size:2,className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:e})]}),(0,t.jsxs)("div",{className:"lg-desktop:gap-3 flex gap-2",children:[v&&v.text&&(0,t.jsx)("a",{href:(0,P.trackUrlRef)(v.link,`${y}_${B}`),children:(0,t.jsx)(N.default,{className:G,variant:"secondary",children:v.text})}),u&&u.text&&(0,t.jsx)("a",{href:(0,P.trackUrlRef)(u.link,`${y}_${B}`),children:(0,t.jsx)(N.default,{className:G,variant:"primary",children:u.text})})]})]})]})})},O=c.default.forwardRef((s,o)=>{const{shape:l,sectionTitle:i,groupByTab:p=!1,items:d=[],carousel:r}=s.data,h=e=>{switch(e){case"full":return 12;case"half":return 6;case"one-third":return 4}},m=d.map(e=>e.tabName).filter(Boolean).filter((e,a,u)=>u.indexOf(e)===a),b=(e,a)=>{switch(e){case 1:return 1;case 2:return 2;default:return a?2.3:3}},f=m.map(e=>({tabName:e,items:d.filter(a=>a.tabName===e)})).reduce((e,a)=>(e[a.tabName]=a.items,e),{});return(0,t.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:o,className:"text-info-primary",children:[i&&(0,t.jsx)(R.default,{data:{title:i},className:"section-title"}),p?(0,t.jsxs)(n.Tabs,{shape:l,align:"left",defaultValue:m[0],children:[(0,t.jsx)(n.TabsList,{children:m.map((e,a)=>(0,t.jsx)(n.TabsTrigger,{value:e,onClick:()=>{(0,j.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:y,component_name:B,component_title:i,component_position:1,navigation:e,button_name:e}})},children:e},a))}),m.map((e,a)=>(0,t.jsx)(n.TabsContent,{value:e,className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock1",data:{list:f?.[e]||[],configuration:{shape:l,isTab:p,activeTab:e,num:f?.[e]?.length||0}},Slide:k,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:b(f?.[e]?.length||0,!0)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:b(f?.[e]?.length||0)}}}),r&&r?.items.length>0?(0,t.jsx)(M.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock2",data:{list:r?.items||[],configuration:{shape:l,isTab:p}},Slide:k,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})},a))]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(g.Grid,{className:"w-full",children:[d.map((e,a)=>(0,t.jsx)(g.GridItem,{span:h(e.width??"full"),className:"laptop:block hidden",children:(0,t.jsx)(k,{data:e,configuration:{shape:l},jIndex:a,spanType:e.width})},`${e?.title||""}${a}`)),d.map((e,a)=>(0,t.jsx)(g.GridItem,{span:h("full"),className:"laptop:hidden block",children:(0,t.jsx)(k,{data:e,configuration:{shape:l},jIndex:a,spanType:"full"})},`${e?.title||""}${a}`))]}),r&&r?.items.length>0?(0,t.jsx)(M.default,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:r?.items||[],configuration:{shape:l}},Slide:k,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}}):null]})]})});var F=(0,_.withStyles)(O);
2
2
  //# sourceMappingURL=MultiLayoutGraphicBlock.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
4
- "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton, imageMobileUrl } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !configuration?.isTab,\n 'h-[400px]': isMobile && configuration?.isTab,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n <div className=\"absolute inset-0\">\n <Picture\n source={imageUrl?.url}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n <div className=\"laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3\">\n <div>\n <Heading size={3} className=\"item-title\" html={title} />\n <Text\n size={2}\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <a href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}>\n <Button className={lgButtonSize} variant=\"secondary\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}>\n <Button className={lgButtonSize} variant=\"primary\">\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref} className=\"text-info-primary\">\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={tabNames[0]!}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={tabName!}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={tabName!} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n num: tabItemsMaps?.[tabName]?.length || 0,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{ list: carousel?.items || [], configuration: { shape: shape, isTab: groupByTab } }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock data={item} configuration={{ shape: shape }} jIndex={index} spanType={item.width} />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock data={item} configuration={{ shape: shape }} jIndex={index} spanType={'full'} />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n // <Carousel className=\"laptop:mt-4 mt-3\">\n // <CarouselContent className=\"flex\">\n // {carousel.items.map((item, index) => (\n // <CarouselItem\n // key={`${item?.title || ''}${index}`}\n // className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\"\n // >\n // <ItemBlock item={item} shape={shape} />\n // </CarouselItem>\n // ))}\n // </CarouselContent>\n // </Carousel>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{ list: carousel?.items || [], configuration: { shape: shape } }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA0FQ,IAAAI,EAAA,6BA1FRC,EAAmD,oBACnDC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAAqB,oCACrBC,EAA+B,oCAC/BC,EAAkB,gCAClBC,EAAmB,kCACnBC,EAAsB,oCACtBC,EAAyD,oCACzDC,EAA4B,sCAC5BC,EAA4B,uCAC5BC,EAAwB,iCAExB,MAAMC,EAAgB,QAChBC,EAAgB,YAEhBC,EAAY,CAAC,CACjB,KAAMC,EACN,cAAAC,EACA,OAAAC,EACA,SAAAC,CACF,IAKM,CACJ,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAkB,EAAK,EACjDC,KAAa,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EAE1DC,KAAM,UAAuB,IAAI,EAEjCC,EAAe,IAAM,CACzB,GAAIL,EACF,OAAQA,EAAU,CAChB,IAAK,OACH,MAAO,8LACT,IAAK,OACH,MAAO,4LACT,QACE,MAAO,2LACX,KAEA,QAAQF,GAAe,IAAK,CAC1B,IAAK,GACH,MAAO,8LACT,IAAK,GACH,MAAO,4LACT,QACE,MAAO,2LACX,CAEJ,KAEA,eAAYM,EAAK,CACf,cAAeV,EACf,cAAeC,EACf,SAAUI,EACV,eAAgBF,EAAK,MACrB,qBAAsBA,EAAK,YAC3B,WAAYC,GAAe,SAC7B,CAAC,KAED,aAAU,IAAM,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AQ3B,EAAK,OAAS,MAAM,EAClC,UAAU,sBAEV,mBAACD,EAAA,CAAU,KAAMC,EAAM,cAAe,CAAE,MAAOsB,CAAM,EAAG,OAAQQ,EAAO,SAAU9B,EAAK,MAAO,GAJxF,GAAGA,GAAM,OAAS,EAAE,GAAG8B,CAAK,EAKnC,CAEH,EACAL,EAAM,IAAI,CAACzB,EAAM8B,OAChB,OAAC,YAA8C,KAAMH,EAAQ,MAAM,EAAG,UAAU,sBAC9E,mBAAC5B,EAAA,CAAU,KAAMC,EAAM,cAAe,CAAE,MAAOsB,CAAM,EAAG,OAAQQ,EAAO,SAAU,OAAQ,GAD5E,GAAG9B,GAAM,OAAS,EAAE,GAAG8B,CAAK,EAE3C,CACD,GACH,EACCJ,GAAYA,GAAU,MAAM,OAAS,KAapC,OAAC,EAAAc,QAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CAAE,KAAMd,GAAU,OAAS,CAAC,EAAG,cAAe,CAAE,MAAOJ,CAAM,CAAE,EACrE,MAAOvB,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACE,MACN,GAEJ,CAEJ,CAAC,EAED,IAAOpB,KAAQ,cAAWwC,CAAuB",
4
+ "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { gaTrack } from '../../shared/track.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n if (spanType) {\n switch (spanType) {\n case 'full':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 'half':\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n } else {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[480] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[427] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton, imageMobileUrl } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !configuration?.isTab,\n 'h-[400px]': isMobile && configuration?.isTab,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n <div className=\"absolute inset-0\">\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n <div className=\"laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3\">\n <div>\n <Heading size={3} className=\"item-title\" html={title} />\n <Text\n size={2}\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <a href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}>\n <Button className={lgButtonSize} variant=\"secondary\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}>\n <Button className={lgButtonSize} variant=\"primary\">\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const handleTabNumber = (num: Number, flag?: boolean) => {\n switch (num) {\n case 1:\n return 1\n case 2:\n return 2\n default:\n return flag ? 2.3 : 3\n }\n }\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref} className=\"text-info-primary\">\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={tabNames[0]!}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger\n key={index}\n value={tabName!}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: sectionTitle,\n component_position: 1,\n navigation: tabName,\n button_name: tabName,\n },\n })\n }}\n >\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={tabName!} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock1'}\n data={{\n list: tabItemsMaps?.[tabName] || [],\n configuration: {\n shape: shape,\n isTab: groupByTab,\n activeTab: tabName,\n num: tabItemsMaps?.[tabName]?.length || 0,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0, true),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleTabNumber(tabItemsMaps?.[tabName]?.length || 0),\n },\n }}\n />\n {carousel && carousel?.items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock2'}\n data={{ list: carousel?.items || [], configuration: { shape: shape, isTab: groupByTab } }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => {\n return (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock data={item} configuration={{ shape: shape }} jIndex={index} spanType={item.width} />\n </GridItem>\n )\n })}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock data={item} configuration={{ shape: shape }} jIndex={index} spanType={'full'} />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n // <Carousel className=\"laptop:mt-4 mt-3\">\n // <CarouselContent className=\"flex\">\n // {carousel.items.map((item, index) => (\n // <CarouselItem\n // key={`${item?.title || ''}${index}`}\n // className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\"\n // >\n // <ItemBlock item={item} shape={shape} />\n // </CarouselItem>\n // ))}\n // </CarouselContent>\n // </Carousel>\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{ list: carousel?.items || [], configuration: { shape: shape } }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n ) : null}\n </>\n )}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA0FQ,IAAAI,EAAA,6BA1FRC,EAAmD,oBACnDC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAAqB,oCACrBC,EAA+B,oCAC/BC,EAAkB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,EACCJ,GAAYA,GAAU,MAAM,OAAS,KAapC,OAAC,EAAAc,QAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CAAE,KAAMd,GAAU,OAAS,CAAC,EAAG,cAAe,CAAE,MAAOJ,CAAM,CAAE,EACrE,MAAOvB,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACE,MACN,GAEJ,CAEJ,CAAC,EAED,IAAOpB,KAAQ,cAAWwC,CAAuB",
6
6
  "names": ["MultiLayoutGraphicBlock_exports", "__export", "MultiLayoutGraphicBlock_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_responsive", "import_Styles", "import_picture", "import_button", "import_heading", "import_text", "import_gird", "import_Title", "import_utils", "import_SwiperBox", "import_tabs", "import_useExposure", "import_trackUrlRef", "import_track", "componentType", "componentName", "ItemBlock", "item", "configuration", "jIndex", "spanType", "isMobile", "setIsMobile", "mediaQuery", "ref", "handleAspect", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "imageMobileUrl", "lgButtonSize", "Picture", "Button", "MultiLayoutGraphicBlock", "React", "props", "shape", "sectionTitle", "groupByTab", "items", "carousel", "getSpan", "width", "tabNames", "index", "arr", "handleTabNumber", "num", "flag", "tabItemsMaps", "tabName", "acc", "cur", "Title", "SwiperBox"]
7
7
  }
@@ -1,6 +1,6 @@
1
- "use strict";"use client";var J=Object.create;var y=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,Z=Object.prototype.hasOwnProperty;var ee=(e,o)=>{for(var r in o)y(e,r,{get:o[r],enumerable:!0})},D=(e,o,r,p)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of X(o))!Z.call(e,a)&&a!==r&&y(e,a,{get:()=>o[a],enumerable:!(p=K(o,a))||p.enumerable});return e};var l=(e,o,r)=>(r=e!=null?J(Y(e)):{},D(o||!e||!e.__esModule?y(r,"default",{value:e,enumerable:!0}):r,e)),te=e=>D(y({},"__esModule",{value:!0}),e);var ne={};ee(ne,{default:()=>se});module.exports=te(ne);var t=require("react/jsx-runtime"),n=l(require("react")),h=require("../../helpers/utils.js"),I=l(require("../../components/picture.js")),_=l(require("./tabSwitch.js")),T=l(require("../../components/button.js")),M=l(require("../Title/index.js")),E=l(require("../SwiperBox/index.js")),H=require("../../shared/Styles.js"),q=require("./shelfDisplay.js"),L=require("../../components/container.js"),N=require("react-responsive"),V=require("../../hooks/useExposure.js"),R=require("../../shared/track.js"),$=require("../AiuiProvider/index.js"),A=l(require("../../components/badge.js")),O=require("../../components/heading.js"),z=require("../../components/text.js");const P="image",C="product_shelf",oe=999999999e-2,ie=({data:e,configuration:o})=>{const{locale:r="us",copyWriting:p}=(0,$.useAiuiContext)(),a=(0,N.useMediaQuery)({query:"(max-width: 768px)"}),b=(i,s)=>o?.event?.primaryButton?.(i,s+1),m=(i,s)=>o?.event?.secondaryButton?.(i,s+1),c=e?.variants?.find(i=>i?.sku===e?.sku)||e?.variants?.[0]||{},g=!c?.availableForSale&&c?.price?.amount===oe,w=o?.isShowTag,{price:k,basePrice:d}=(0,q.formatVariantPrice)({locale:r,amount:c?.price?.amount||0,baseAmount:e?.compareAtPrice?.amount||e?.price?.amount||0,currencyCode:e?.price?.currencyCode||"USD"}),u=()=>{const i=e?.sku,s=e?.variants;return s?.find(v=>v?.sku===i)?.image?.url||s?.[0]?.image?.url||""};return(0,t.jsx)("div",{className:(0,h.cn)("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative",{"h-[360px]":a}),children:(0,t.jsxs)("div",{className:"absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[(0,t.jsx)("div",{className:(0,h.cn)("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden"),children:(0,t.jsx)(I.default,{source:u(),className:"flex h-full justify-center object-cover [&_img]:w-auto"})}),(0,t.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:w?e?.tags?.filter(i=>i.startsWith("CLtag"))?.map(i=>i.replace("CLtag:",""))?.slice(0,2)?.map?.((i,s)=>(0,t.jsx)(A.default,{children:i},s)):null}),(0,t.jsx)(O.Heading,{title:e?.title||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] mb-1 line-clamp-2 h-[48px]",children:e?.title||""}),(0,t.jsx)(z.Text,{size:2,className:"shelf-display-product-description lg-desktop:text-[18px] lg-desktop:h-[26px] desktop:text-[16px] desktop:h-[24px] line-clamp-1 h-[20px] text-[14px]",children:e?.description||""}),(0,t.jsx)("div",{className:"mb-2 mt-[20px] flex items-center",children:g?(0,t.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:p?.soldOutText}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:k||""}),(0,t.jsx)("div",{className:"tablet:text-2xl text-info-secondary ml-1 text-xl font-bold",children:d||""})]})}),(0,t.jsxs)("div",{className:(0,h.cn)("lg-desktop:gap-3 flex items-center gap-2",o.direction==="vertical"?"flex-col":""),children:[(0,t.jsx)(T.default,{variant:"secondary",onClick:()=>m(e,o?.index),className:`
2
- ${o.direction==="vertical"?"w-full":""}
3
- `,children:o?.secondaryButton||""}),(0,t.jsx)(T.default,{variant:"primary",onClick:()=>b(e,o?.index),className:`
4
- ${o.direction==="vertical"?"w-full":""}
5
- `,children:o?.primaryButton||""})]})]})},e?.id||e?.handle)},re=n.default.forwardRef(({data:e,buildData:o,className:r="",key:p,event:a},b)=>{const[m,c]=(0,n.useState)(""),[g,w]=(0,n.useState)([]),k=(0,N.useMediaQuery)({query:"(max-width: 768px)"}),d=(0,n.useRef)(null);(0,n.useImperativeHandle)(b,()=>d.current),(0,V.useExposure)(d,{componentType:P,componentName:C,componentTitle:e?.title,navigation:m});const{productsTab:u=[],productsCard:i=[],title:s,align:U="left",isShowTab:v=!0,tabShape:j="square",isShowTag:W=!1,...F}=e,S=f=>{const Q=f?.map(x=>{const B=o?.products?.find(G=>G?.handle===x?.handle);if(B)return{sku:x.sku,...B}})?.filter(x=>x);w(Q)};return(0,n.useEffect)(()=>{if(v){c(u?.[0]?.tab||""),S(u?.[0]?.data||[]);return}S(i)},[]),(0,t.jsx)(L.Container,{...e?.containerProps||{},className:"overflow-hidden",children:(0,t.jsxs)("div",{ref:d,className:(0,h.cn)("w-full",r,{"aiui-dark":e?.theme==="dark"}),children:[s&&(0,t.jsx)(M.default,{data:{title:s}}),v&&(0,t.jsx)("div",{className:`${k?"w-full overflow-hidden":""}`,children:(0,t.jsx)(_.default,{value:m,tabs:u,tabShape:j,onTabClick:f=>{c(f?.tab),S(f?.data||[]),(0,R.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:P,component_name:C,component_title:e?.title,component_position:1,navigation:f?.tab}})}})}),(0,t.jsx)("div",{className:"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]",children:(0,t.jsx)(E.default,{className:"mt-6 !overflow-visible",id:`ShelfDisplay${p}${m}`,data:{list:g,configuration:{...F,event:a,isShowTag:W}},Slide:ie,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})})]})})});var se=(0,H.withStyles)(re);
1
+ "use strict";"use client";var G=Object.create;var y=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var Z=(e,i)=>{for(var r in i)y(e,r,{get:i[r],enumerable:!0})},D=(e,i,r,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of K(i))!Y.call(e,n)&&n!==r&&y(e,n,{get:()=>i[n],enumerable:!(p=J(i,n))||p.enumerable});return e};var l=(e,i,r)=>(r=e!=null?G(X(e)):{},D(i||!e||!e.__esModule?y(r,"default",{value:e,enumerable:!0}):r,e)),ee=e=>D(y({},"__esModule",{value:!0}),e);var se={};Z(se,{default:()=>re});module.exports=ee(se);var t=require("react/jsx-runtime"),a=l(require("react")),h=require("../../helpers/utils.js"),I=l(require("../../components/picture.js")),_=l(require("./tabSwitch.js")),T=l(require("../../components/button.js")),M=l(require("../Title/index.js")),E=l(require("../SwiperBox/index.js")),H=require("../../shared/Styles.js"),q=require("./shelfDisplay.js"),ne=require("../../components/container.js"),B=require("react-responsive"),L=require("../../hooks/useExposure.js"),V=require("../../shared/track.js"),R=require("../AiuiProvider/index.js"),$=l(require("../../components/badge.js")),A=require("../../components/heading.js"),O=require("../../components/text.js");const P="image",C="product_shelf",te=999999999e-2,ie=({data:e,configuration:i})=>{const{locale:r="us",copyWriting:p}=(0,R.useAiuiContext)(),n=(0,B.useMediaQuery)({query:"(max-width: 768px)"}),b=(o,s)=>i?.event?.primaryButton?.(o,s+1),m=(o,s)=>i?.event?.secondaryButton?.(o,s+1),c=e?.variants?.find(o=>o?.sku===e?.sku)||e?.variants?.[0]||{},g=!c?.availableForSale&&c?.price?.amount===te,w=i?.isShowTag,{price:k,basePrice:d}=(0,q.formatVariantPrice)({locale:r,amount:c?.price?.amount||0,baseAmount:e?.compareAtPrice?.amount||e?.price?.amount||0,currencyCode:e?.price?.currencyCode||"USD"}),u=()=>{const o=e?.sku,s=e?.variants;return s?.find(v=>v?.sku===o)?.image?.url||s?.[0]?.image?.url||""};return(0,t.jsx)("div",{className:(0,h.cn)("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",i?.shape==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative",{"h-[360px]":n}),children:(0,t.jsxs)("div",{className:"absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[(0,t.jsx)("div",{className:(0,h.cn)("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden"),children:(0,t.jsx)(I.default,{source:u(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})}),(0,t.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:w?e?.tags?.filter(o=>o.startsWith("CLtag"))?.map(o=>o.replace("CLtag:",""))?.slice(0,2)?.map?.((o,s)=>(0,t.jsx)($.default,{children:o},s)):null}),(0,t.jsx)(A.Heading,{title:e?.title||"",size:2,className:"shelf-display-product-title lg-desktop:h-[58px] mb-1 line-clamp-2 h-[48px]",children:e?.title||""}),(0,t.jsx)(O.Text,{size:2,className:"shelf-display-product-description lg-desktop:text-[18px] lg-desktop:h-[26px] desktop:text-[16px] desktop:h-[24px] line-clamp-1 h-[20px] text-[14px]",children:e?.description||""}),(0,t.jsx)("div",{className:"mb-2 mt-[20px] flex items-center",children:g?(0,t.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:p?.soldOutText}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:k||""}),(0,t.jsx)("div",{className:"tablet:text-2xl text-info-secondary ml-1 text-xl font-bold",children:d||""})]})}),(0,t.jsxs)("div",{className:(0,h.cn)("lg-desktop:gap-3 flex items-center gap-2",i.direction==="vertical"?"flex-col":""),children:[(0,t.jsx)(T.default,{variant:"secondary",onClick:()=>m(e,i?.index),className:`
2
+ ${i.direction==="vertical"?"w-full":""}
3
+ `,children:i?.secondaryButton||""}),(0,t.jsx)(T.default,{variant:"primary",onClick:()=>b(e,i?.index),className:`
4
+ ${i.direction==="vertical"?"w-full":""}
5
+ `,children:i?.primaryButton||""})]})]})},e?.id||e?.handle)},oe=a.default.forwardRef(({data:e,buildData:i,className:r="",key:p,event:n},b)=>{const[m,c]=(0,a.useState)(""),[g,w]=(0,a.useState)([]),k=(0,B.useMediaQuery)({query:"(max-width: 768px)"}),d=(0,a.useRef)(null);(0,a.useImperativeHandle)(b,()=>d.current),(0,L.useExposure)(d,{componentType:P,componentName:C,componentTitle:e?.title,navigation:m});const{productsTab:u=[],productsCard:o=[],title:s,align:z="left",isShowTab:v=!0,tabShape:U="square",isShowTag:j=!1,...W}=e,S=f=>{const F=f?.map(x=>{const N=i?.products?.find(Q=>Q?.handle===x?.handle);if(N)return{sku:x.sku,...N}})?.filter(x=>x);w(F)};return(0,a.useEffect)(()=>{if(v){c(u?.[0]?.tab||""),S(u?.[0]?.data||[]);return}S(o)},[]),(0,t.jsxs)("div",{ref:d,className:(0,h.cn)("w-full",r,{"aiui-dark":e?.theme==="dark"}),children:[s&&(0,t.jsx)(M.default,{data:{title:s}}),v&&(0,t.jsx)("div",{className:`${k?"w-full overflow-hidden":""}`,children:(0,t.jsx)(_.default,{value:m,tabs:u,tabShape:U,onTabClick:f=>{c(f?.tab),S(f?.data||[]),(0,V.gaTrack)({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:P,component_name:C,component_title:e?.title,component_position:1,navigation:f?.tab}})}})}),(0,t.jsx)("div",{className:"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]",children:(0,t.jsx)(E.default,{className:"mt-6 !overflow-visible",id:`ShelfDisplay${p}${m}`,data:{list:g,configuration:{...W,event:n,isShowTag:j}},Slide:ie,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})})]})});var re=(0,H.withStyles)(oe);
6
6
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ShelfDisplay/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport TabSwitch from './tabSwitch.js'\nimport Button from '../../components/button.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport { Container } from '../../components/container.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport Badge from '../../components/badge.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport interface ShelfDisplayItem {\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n}\n\ntype EventType = {\n primaryButton?: (v: any, index: number) => void\n secondaryButton?: (v: any, index: number) => void\n}\n\nexport interface ShelfDisplayProps {\n data: {\n title?: string\n isShowTab?: boolean\n isShowTag?: boolean\n direction?: 'horizontal' | 'vertical'\n align?: 'left' | 'center' | 'right'\n productsTab?: any\n productsCard?: any\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n theme?: 'light' | 'dark'\n containerProps?: ContainerProps\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: EventType\n className?: string\n key?: string\n}\n\nconst ShelfDisplayItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number) =>\n configuration?.event?.primaryButton?.(params, index + 1)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number) =>\n configuration?.event?.secondaryButton?.(params, index + 1)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n\n const { price, basePrice } = formatVariantPrice({\n locale: locale,\n amount: variant?.price?.amount || 0,\n baseAmount: data?.compareAtPrice?.amount || data?.price?.amount || 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n {\n 'h-[360px]': isMobile,\n }\n )}\n >\n <div className=\"absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div\n className={cn('lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden')}\n >\n <Picture source={handleUrl()} className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </div>\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {isShowTag\n ? data?.tags\n ?.filter((item: any) => item.startsWith('CLtag'))\n ?.map((item: any) => item.replace('CLtag:', ''))\n ?.slice(0, 2)\n ?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)\n : null}\n </div>\n <Heading\n title={data?.title || ''}\n size={2}\n className=\"shelf-display-product-title lg-desktop:h-[58px] mb-1 line-clamp-2 h-[48px]\"\n >\n {data?.title || ''}\n </Heading>\n <Text\n size={2}\n className=\"shelf-display-product-description lg-desktop:text-[18px] lg-desktop:h-[26px] desktop:text-[16px] desktop:h-[24px] line-clamp-1 h-[20px] text-[14px]\"\n >\n {data?.description || ''}\n </Text>\n <div className=\"mb-2 mt-[20px] flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{price || ''}</div>\n <div className=\"tablet:text-2xl text-info-secondary ml-1 text-xl font-bold\">{basePrice || ''}</div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\nconst ShelfDisplay = React.forwardRef<HTMLDivElement, ShelfDisplayProps>(\n ({ data, buildData, className = '', key, event }, ref) => {\n const [tabId, setTabId] = useState<string>('')\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType: componentType,\n componentName: componentName,\n componentTitle: data?.title,\n navigation: tabId,\n })\n\n const {\n productsTab = [],\n productsCard = [],\n title,\n align = 'left',\n isShowTab = true,\n tabShape = 'square',\n isShowTag = false,\n ...other\n } = data\n\n const handleCurrentTab = (currentData: ShelfDisplayItem[]) => {\n const newCurrentData = currentData\n ?.map(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData)\n }\n\n useEffect(() => {\n if (isShowTab) {\n setTabId(productsTab?.[0]?.tab || '')\n handleCurrentTab(productsTab?.[0]?.data || [])\n return\n }\n handleCurrentTab(productsCard)\n }, [])\n\n return (\n <Container {...(data?.containerProps || {})} className=\"overflow-hidden\">\n <div ref={innerRef} className={cn('w-full', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n {isShowTab && (\n <div className={`${isMobile ? 'w-full overflow-hidden' : ''}`}>\n <TabSwitch\n value={tabId}\n tabs={productsTab}\n tabShape={tabShape}\n onTabClick={v => {\n setTabId(v?.tab)\n handleCurrentTab(v?.data || [])\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: data?.title,\n component_position: 1,\n navigation: v?.tab,\n },\n })\n }}\n />\n </div>\n )}\n <div className=\"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]\">\n <SwiperBox\n className=\"mt-6 !overflow-visible\"\n id={`ShelfDisplay${key}${tabId}`}\n data={{ list: currentItems, configuration: { ...other, event: event, isShowTag } }}\n Slide={ShelfDisplayItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n </div>\n </Container>\n )\n }\n)\n\nexport default withStyles(ShelfDisplay)\n"],
5
- "mappings": "ykBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAgIU,IAAAI,EAAA,6BA/HVC,EAAwE,oBACxEC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAAsB,6BACtBC,EAAmB,yCACnBC,EAAkB,gCAClBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAmC,6BACnCC,EAA0B,yCAC1BC,EAA8B,4BAC9BC,EAA4B,sCAC5BC,EAAwB,iCACxBC,EAA+B,oCAC/BC,EAAkB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C,EAAW,yBAA2B,EAAE,GACzD,mBAAC,EAAAyC,QAAA,CACC,MAAOjB,EACP,KAAMK,EACN,SAAUK,EACV,WAAYQ,GAAK,CACfjB,EAASiB,GAAG,GAAG,EACfN,EAAiBM,GAAG,MAAQ,CAAC,CAAC,KAC9B,WAAQ,CACN,MAAO,WACP,WAAY,kBACZ,iBAAkB,CAChB,WAAY,YACZ,eAAgBlD,EAChB,eAAgBC,EAChB,gBAAiBG,GAAM,MACvB,mBAAoB,EACpB,WAAY8C,GAAG,GACjB,CACF,CAAC,CACH,EACF,EACF,KAEF,OAAC,OAAI,UAAU,2FACb,mBAAC,EAAAC,QAAA,CACC,UAAU,yBACV,GAAI,eAAetB,CAAG,GAAGG,CAAK,GAC9B,KAAM,CAAE,KAAME,EAAc,cAAe,CAAE,GAAGS,EAAO,MAAOb,EAAO,UAAAd,CAAU,CAAE,EACjF,MAAOb,GACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACF,GACF,EACF,CAEJ,CACF,EAEA,IAAOvB,MAAQ,cAAW6C,EAAY",
4
+ "sourcesContent": ["'use client'\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport TabSwitch from './tabSwitch.js'\nimport Button from '../../components/button.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nimport { Container } from '../../components/container.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport Badge from '../../components/badge.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'product_shelf'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport interface ShelfDisplayItem {\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n}\n\ntype EventType = {\n primaryButton?: (v: any, index: number) => void\n secondaryButton?: (v: any, index: number) => void\n}\n\nexport interface ShelfDisplayProps {\n data: {\n title?: string\n isShowTab?: boolean\n isShowTag?: boolean\n direction?: 'horizontal' | 'vertical'\n align?: 'left' | 'center' | 'right'\n productsTab?: any\n productsCard?: any\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n theme?: 'light' | 'dark'\n containerProps?: ContainerProps\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: EventType\n className?: string\n key?: string\n}\n\nconst ShelfDisplayItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number) =>\n configuration?.event?.primaryButton?.(params, index + 1)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number) =>\n configuration?.event?.secondaryButton?.(params, index + 1)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale && variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n\n const { price, basePrice } = formatVariantPrice({\n locale: locale,\n amount: variant?.price?.amount || 0,\n baseAmount: data?.compareAtPrice?.amount || data?.price?.amount || 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n {\n 'h-[360px]': isMobile,\n }\n )}\n >\n <div className=\"absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div\n className={cn('lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden')}\n >\n <Picture source={handleUrl()} alt=\"\" className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </div>\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {isShowTag\n ? data?.tags\n ?.filter((item: any) => item.startsWith('CLtag'))\n ?.map((item: any) => item.replace('CLtag:', ''))\n ?.slice(0, 2)\n ?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)\n : null}\n </div>\n <Heading\n title={data?.title || ''}\n size={2}\n className=\"shelf-display-product-title lg-desktop:h-[58px] mb-1 line-clamp-2 h-[48px]\"\n >\n {data?.title || ''}\n </Heading>\n <Text\n size={2}\n className=\"shelf-display-product-description lg-desktop:text-[18px] lg-desktop:h-[26px] desktop:text-[16px] desktop:h-[24px] line-clamp-1 h-[20px] text-[14px]\"\n >\n {data?.description || ''}\n </Text>\n <div className=\"mb-2 mt-[20px] flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{copyWriting?.soldOutText}</div>\n ) : (\n <>\n <div className=\"tablet:text-2xl text-info-primary text-xl font-bold\">{price || ''}</div>\n <div className=\"tablet:text-2xl text-info-secondary ml-1 text-xl font-bold\">{basePrice || ''}</div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data, configuration?.index)}\n className={`\n ${configuration.direction === 'vertical' ? 'w-full' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\nconst ShelfDisplay = React.forwardRef<HTMLDivElement, ShelfDisplayProps>(\n ({ data, buildData, className = '', key, event }, ref) => {\n const [tabId, setTabId] = useState<string>('')\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType: componentType,\n componentName: componentName,\n componentTitle: data?.title,\n navigation: tabId,\n })\n\n const {\n productsTab = [],\n productsCard = [],\n title,\n align = 'left',\n isShowTab = true,\n tabShape = 'square',\n isShowTag = false,\n ...other\n } = data\n\n const handleCurrentTab = (currentData: ShelfDisplayItem[]) => {\n const newCurrentData = currentData\n ?.map(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData)\n }\n\n useEffect(() => {\n if (isShowTab) {\n setTabId(productsTab?.[0]?.tab || '')\n handleCurrentTab(productsTab?.[0]?.data || [])\n return\n }\n handleCurrentTab(productsCard)\n }, [])\n\n return (\n <div ref={innerRef} className={cn('w-full', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n {isShowTab && (\n <div className={`${isMobile ? 'w-full overflow-hidden' : ''}`}>\n <TabSwitch\n value={tabId}\n tabs={productsTab}\n tabShape={tabShape}\n onTabClick={v => {\n setTabId(v?.tab)\n handleCurrentTab(v?.data || [])\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_click',\n event_parameters: {\n page_group: 'Home Page',\n component_type: componentType,\n component_name: componentName,\n component_title: data?.title,\n component_position: 1,\n navigation: v?.tab,\n },\n })\n }}\n />\n </div>\n )}\n <div className=\"tablet:min-h-[393px] laptop:min-h-[425px] desktop:min-h-[405px] lg-desktop:min-h-[409px]\">\n <SwiperBox\n className=\"mt-6 !overflow-visible\"\n id={`ShelfDisplay${key}${tabId}`}\n data={{ list: currentItems, configuration: { ...other, event: event, isShowTag } }}\n Slide={ShelfDisplayItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}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AY",
6
6
  "names": ["ShelfDisplay_exports", "__export", "ShelfDisplay_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_tabSwitch", "import_button", "import_Title", "import_SwiperBox", "import_Styles", "import_shelfDisplay", "import_container", "import_react_responsive", "import_useExposure", "import_track", "import_AiuiProvider", "import_badge", "import_heading", "import_text", "componentType", "componentName", "SOLD_OUT_PRICE", "ShelfDisplayItem", "data", "configuration", "locale", "copyWriting", "isMobile", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "price", "basePrice", "handleUrl", "sku", "skuArray", "Picture", "Badge", "Button", "ShelfDisplay", "React", "buildData", "className", "key", "event", "ref", "tabId", "setTabId", "currentItems", "setCurrentItems", "innerRef", "productsTab", "productsCard", "title", "align", "isShowTab", "tabShape", "other", "handleCurrentTab", "currentData", "newCurrentData", "findData", "Title", "TabSwitch", "v", "SwiperBox"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var v=Object.create;var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var N=(t,c)=>{for(var n in c)l(t,n,{get:c[n],enumerable:!0})},u=(t,c,n,e)=>{if(c&&typeof c=="object"||typeof c=="function")for(let p of w(c))!g.call(t,p)&&p!==n&&l(t,p,{get:()=>c[p],enumerable:!(e=b(c,p))||e.enumerable});return t};var h=(t,c,n)=>(n=t!=null?v(y(t)):{},u(c||!t||!t.__esModule?l(n,"default",{value:t,enumerable:!0}):n,t)),z=t=>u(l({},"__esModule",{value:!0}),t);var D={};N(D,{default:()=>P});module.exports=z(D);var o=require("react/jsx-runtime"),s=require("../../helpers/utils.js"),x=require("../../components/index.js"),f=h(require("../../hooks/useCountDown.js"));const i=({time:t,copy:c,image:n,cns:e})=>(0,o.jsx)(o.Fragment,{children:t?(0,o.jsxs)("div",{className:(0,s.cn)("cpn-countdown-item laptop:size-[54px] tablet:size-[3.2vw] relative size-[34px] rounded bg-black",e?.item),children:[n&&(0,o.jsx)(x.Picture,{className:(0,s.cn)("cpn-countdown-picture absolute left-0 top-0 size-full",e?.picture),imgClassName:(0,s.cn)("cpn-countdown-image h-full object-cover",e?.image),source:`${n}`}),(0,o.jsx)("div",{className:(0,s.cn)("cpn-countdown-time tablet:text-[1.25vw] laptop:text-[24px] absolute left-0 top-0 flex size-full items-center justify-center text-[16px] font-[600] text-white",e?.time),children:t}),c&&(0,o.jsx)("div",{className:(0,s.cn)("cpn-countdown-copy tablet:text-[12px] laptop:text-[14px] tablet:-bottom-6 absolute -bottom-4 left-1/2 -translate-x-1/2 text-[9px] font-medium",e?.copy),children:c})]}):(0,o.jsx)("div",{className:(0,s.cn)("cpn-countdown-colonBox relative flex flex-col gap-1",e?.colonBox),children:Array.from({length:2}).map((p,a)=>(0,o.jsx)("span",{className:(0,s.cn)("cpn-countdown-colon size-1 rounded-full bg-black",e?.colon)},a))})}),C=t=>{const{endTime:c,copy:n,cns:e,expiredHidden:p}=t,{days:a,hours:m,minutes:r,seconds:d}=(0,f.default)({endTime:c});return(0,o.jsxs)("div",{className:(0,s.cn)("cpn-countdown-container laptop:gap-4 relative flex items-center justify-center gap-2",{"mb-5":n?.days,"!hidden":p&&a==="00"&&m==="00"&&r==="00"&&d==="00"},e?.container),children:[(0,o.jsx)(i,{time:a,copy:n?.days,cns:e}),(0,o.jsx)(i,{cns:e}),(0,o.jsx)(i,{time:m,copy:n?.hours,cns:e}),(0,o.jsx)(i,{cns:e}),(0,o.jsx)(i,{time:r,copy:n?.minutes,cns:e}),(0,o.jsx)(i,{cns:e}),(0,o.jsx)(i,{time:d,copy:n?.seconds,cns:e})]})};var P=C;
1
+ "use strict";var v=Object.create;var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var N=(t,c)=>{for(var n in c)l(t,n,{get:c[n],enumerable:!0})},u=(t,c,n,e)=>{if(c&&typeof c=="object"||typeof c=="function")for(let p of w(c))!g.call(t,p)&&p!==n&&l(t,p,{get:()=>c[p],enumerable:!(e=b(c,p))||e.enumerable});return t};var h=(t,c,n)=>(n=t!=null?v(y(t)):{},u(c||!t||!t.__esModule?l(n,"default",{value:t,enumerable:!0}):n,t)),z=t=>u(l({},"__esModule",{value:!0}),t);var D={};N(D,{default:()=>P});module.exports=z(D);var o=require("react/jsx-runtime"),s=require("../../helpers/utils.js"),x=require("../../components/index.js"),f=h(require("../../hooks/useCountDown.js"));const a=({time:t,copy:c,image:n,cns:e})=>(0,o.jsx)(o.Fragment,{children:t?(0,o.jsxs)("div",{className:(0,s.cn)("cpn-countdown-item laptop:size-[54px] tablet:size-[3.2vw] relative size-[34px] rounded bg-black",e?.item),children:[n&&(0,o.jsx)(x.Picture,{className:(0,s.cn)("cpn-countdown-picture absolute left-0 top-0 size-full",e?.picture),imgClassName:(0,s.cn)("cpn-countdown-image h-full object-cover",e?.image),source:`${n}`,alt:""}),(0,o.jsx)("div",{className:(0,s.cn)("cpn-countdown-time tablet:text-[1.25vw] laptop:text-[24px] absolute left-0 top-0 flex size-full items-center justify-center text-[16px] font-[600] text-white",e?.time),children:t}),c&&(0,o.jsx)("div",{className:(0,s.cn)("cpn-countdown-copy tablet:text-[12px] laptop:text-[14px] tablet:-bottom-6 absolute -bottom-4 left-1/2 -translate-x-1/2 text-[9px] font-medium",e?.copy),children:c})]}):(0,o.jsx)("div",{className:(0,s.cn)("cpn-countdown-colonBox relative flex flex-col gap-1",e?.colonBox),children:Array.from({length:2}).map((p,i)=>(0,o.jsx)("span",{className:(0,s.cn)("cpn-countdown-colon size-1 rounded-full bg-black",e?.colon)},i))})}),C=t=>{const{endTime:c,copy:n,cns:e,expiredHidden:p}=t,{days:i,hours:m,minutes:r,seconds:d}=(0,f.default)({endTime:c});return(0,o.jsxs)("div",{className:(0,s.cn)("cpn-countdown-container laptop:gap-4 relative flex items-center justify-center gap-2",{"mb-5":n?.days,"!hidden":p&&i==="00"&&m==="00"&&r==="00"&&d==="00"},e?.container),children:[(0,o.jsx)(a,{time:i,copy:n?.days,cns:e}),(0,o.jsx)(a,{cns:e}),(0,o.jsx)(a,{time:m,copy:n?.hours,cns:e}),(0,o.jsx)(a,{cns:e}),(0,o.jsx)(a,{time:r,copy:n?.minutes,cns:e}),(0,o.jsx)(a,{cns:e}),(0,o.jsx)(a,{time:d,copy:n?.seconds,cns:e})]})};var P=C;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cpn-components/CpnCountDown/index.tsx"],
4
- "sourcesContent": ["import type { CountDownProps, ItemProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Picture } from '../../components/index.js'\nimport useCountDown from '../../hooks/useCountDown.js'\n\nconst Item = ({ time, copy, image, cns }: ItemProps) => (\n <>\n {time ? (\n <div\n className={cn(\n 'cpn-countdown-item laptop:size-[54px] tablet:size-[3.2vw] relative size-[34px] rounded bg-black',\n cns?.item\n )}\n >\n {image && (\n <Picture\n className={cn('cpn-countdown-picture absolute left-0 top-0 size-full', cns?.picture)}\n imgClassName={cn('cpn-countdown-image h-full object-cover', cns?.image)}\n source={`${image}`}\n />\n )}\n <div\n className={cn(\n 'cpn-countdown-time tablet:text-[1.25vw] laptop:text-[24px] absolute left-0 top-0 flex size-full items-center justify-center text-[16px] font-[600] text-white',\n cns?.time\n )}\n >\n {time}\n </div>\n {copy && (\n <div\n className={cn(\n 'cpn-countdown-copy tablet:text-[12px] laptop:text-[14px] tablet:-bottom-6 absolute -bottom-4 left-1/2 -translate-x-1/2 text-[9px] font-medium',\n cns?.copy\n )}\n >\n {copy}\n </div>\n )}\n </div>\n ) : (\n <div className={cn('cpn-countdown-colonBox relative flex flex-col gap-1', cns?.colonBox)}>\n {Array.from({ length: 2 }).map((_, index) => (\n <span key={index} className={cn('cpn-countdown-colon size-1 rounded-full bg-black', cns?.colon)}></span>\n ))}\n </div>\n )}\n </>\n)\n\nconst CpnCountDown = (props: CountDownProps) => {\n const { endTime, copy, cns, expiredHidden } = props\n\n const { days, hours, minutes, seconds } = useCountDown({ endTime })\n\n return (\n <div\n className={cn(\n 'cpn-countdown-container laptop:gap-4 relative flex items-center justify-center gap-2',\n {\n 'mb-5': copy?.days,\n '!hidden': expiredHidden && days === '00' && hours === '00' && minutes === '00' && seconds === '00',\n },\n cns?.container\n )}\n >\n <Item time={days} copy={copy?.days} cns={cns} />\n <Item cns={cns} />\n <Item time={hours} copy={copy?.hours} cns={cns} />\n <Item cns={cns} />\n <Item time={minutes} copy={copy?.minutes} cns={cns} />\n <Item cns={cns} />\n <Item time={seconds} copy={copy?.seconds} cns={cns} />\n </div>\n )\n}\n\nexport default CpnCountDown\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAME,IAAAI,EAAA,6BALFC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAAyB,0CAEzB,MAAMC,EAAO,CAAC,CAAE,KAAAC,EAAM,KAAAC,EAAM,MAAAC,EAAO,IAAAC,CAAI,OACrC,mBACG,SAAAH,KACC,QAAC,OACC,aAAW,MACT,kGACAG,GAAK,IACP,EAEC,UAAAD,MACC,OAAC,WACC,aAAW,MAAG,wDAAyDC,GAAK,OAAO,EACnF,gBAAc,MAAG,0CAA2CA,GAAK,KAAK,EACtE,OAAQ,GAAGD,CAAK,GAClB,KAEF,OAAC,OACC,aAAW,MACT,gKACAC,GAAK,IACP,EAEC,SAAAH,EACH,EACCC,MACC,OAAC,OACC,aAAW,MACT,gJACAE,GAAK,IACP,EAEC,SAAAF,EACH,GAEJ,KAEA,OAAC,OAAI,aAAW,MAAG,sDAAuDE,GAAK,QAAQ,EACpF,eAAM,KAAK,CAAE,OAAQ,CAAE,CAAC,EAAE,IAAI,CAACC,EAAGC,OACjC,OAAC,QAAiB,aAAW,MAAG,mDAAoDF,GAAK,KAAK,GAAnFE,CAAsF,CAClG,EACH,EAEJ,EAGIC,EAAgBC,GAA0B,CAC9C,KAAM,CAAE,QAAAC,EAAS,KAAAP,EAAM,IAAAE,EAAK,cAAAM,CAAc,EAAIF,EAExC,CAAE,KAAAG,EAAM,MAAAC,EAAO,QAAAC,EAAS,QAAAC,CAAQ,KAAI,EAAAC,SAAa,CAAE,QAAAN,CAAQ,CAAC,EAElE,SACE,QAAC,OACC,aAAW,MACT,uFACA,CACE,OAAQP,GAAM,KACd,UAAWQ,GAAiBC,IAAS,MAAQC,IAAU,MAAQC,IAAY,MAAQC,IAAY,IACjG,EACAV,GAAK,SACP,EAEA,oBAACJ,EAAA,CAAK,KAAMW,EAAM,KAAMT,GAAM,KAAM,IAAKE,EAAK,KAC9C,OAACJ,EAAA,CAAK,IAAKI,EAAK,KAChB,OAACJ,EAAA,CAAK,KAAMY,EAAO,KAAMV,GAAM,MAAO,IAAKE,EAAK,KAChD,OAACJ,EAAA,CAAK,IAAKI,EAAK,KAChB,OAACJ,EAAA,CAAK,KAAMa,EAAS,KAAMX,GAAM,QAAS,IAAKE,EAAK,KACpD,OAACJ,EAAA,CAAK,IAAKI,EAAK,KAChB,OAACJ,EAAA,CAAK,KAAMc,EAAS,KAAMZ,GAAM,QAAS,IAAKE,EAAK,GACtD,CAEJ,EAEA,IAAOV,EAAQa",
4
+ "sourcesContent": ["import type { CountDownProps, ItemProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Picture } from '../../components/index.js'\nimport useCountDown from '../../hooks/useCountDown.js'\n\nconst Item = ({ time, copy, image, cns }: ItemProps) => (\n <>\n {time ? (\n <div\n className={cn(\n 'cpn-countdown-item laptop:size-[54px] tablet:size-[3.2vw] relative size-[34px] rounded bg-black',\n cns?.item\n )}\n >\n {image && (\n <Picture\n className={cn('cpn-countdown-picture absolute left-0 top-0 size-full', cns?.picture)}\n imgClassName={cn('cpn-countdown-image h-full object-cover', cns?.image)}\n source={`${image}`}\n alt=\"\"\n />\n )}\n <div\n className={cn(\n 'cpn-countdown-time tablet:text-[1.25vw] laptop:text-[24px] absolute left-0 top-0 flex size-full items-center justify-center text-[16px] font-[600] text-white',\n cns?.time\n )}\n >\n {time}\n </div>\n {copy && (\n <div\n className={cn(\n 'cpn-countdown-copy tablet:text-[12px] laptop:text-[14px] tablet:-bottom-6 absolute -bottom-4 left-1/2 -translate-x-1/2 text-[9px] font-medium',\n cns?.copy\n )}\n >\n {copy}\n </div>\n )}\n </div>\n ) : (\n <div className={cn('cpn-countdown-colonBox relative flex flex-col gap-1', cns?.colonBox)}>\n {Array.from({ length: 2 }).map((_, index) => (\n <span key={index} className={cn('cpn-countdown-colon size-1 rounded-full bg-black', cns?.colon)}></span>\n ))}\n </div>\n )}\n </>\n)\n\nconst CpnCountDown = (props: CountDownProps) => {\n const { endTime, copy, cns, expiredHidden } = props\n\n const { days, hours, minutes, seconds } = useCountDown({ endTime })\n\n return (\n <div\n className={cn(\n 'cpn-countdown-container laptop:gap-4 relative flex items-center justify-center gap-2',\n {\n 'mb-5': copy?.days,\n '!hidden': expiredHidden && days === '00' && hours === '00' && minutes === '00' && seconds === '00',\n },\n cns?.container\n )}\n >\n <Item time={days} copy={copy?.days} cns={cns} />\n <Item cns={cns} />\n <Item time={hours} copy={copy?.hours} cns={cns} />\n <Item cns={cns} />\n <Item time={minutes} copy={copy?.minutes} cns={cns} />\n <Item cns={cns} />\n <Item time={seconds} copy={copy?.seconds} cns={cns} />\n </div>\n )\n}\n\nexport default CpnCountDown\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAME,IAAAI,EAAA,6BALFC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAAyB,0CAEzB,MAAMC,EAAO,CAAC,CAAE,KAAAC,EAAM,KAAAC,EAAM,MAAAC,EAAO,IAAAC,CAAI,OACrC,mBACG,SAAAH,KACC,QAAC,OACC,aAAW,MACT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AAMc,EAAS,KAAMZ,GAAM,QAAS,IAAKE,EAAK,GACtD,CAEJ,EAEA,IAAOV,EAAQa",
6
6
  "names": ["CpnCountDown_exports", "__export", "CpnCountDown_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_components", "import_useCountDown", "Item", "time", "copy", "image", "cns", "_", "index", "CpnCountDown", "props", "endTime", "expiredHidden", "days", "hours", "minutes", "seconds", "useCountDown"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var p=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var u=(a,t)=>{for(var o in t)p(a,o,{get:t[o],enumerable:!0})},v=(a,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of d(t))!x.call(a,r)&&r!==o&&p(a,r,{get:()=>t[r],enumerable:!(e=i(t,r))||e.enumerable});return a};var f=a=>v(p({},"__esModule",{value:!0}),a);var g={};u(g,{default:()=>b});module.exports=f(g);var s=require("react/jsx-runtime"),l=require("../../helpers/utils.js"),c=require("../../components/index.js");const N=a=>{const{content:t,cns:o}=a;return(0,s.jsx)("div",{className:(0,l.cn)("cpn-card-container relative box-border w-[177px] px-2 pb-3 pt-4 text-center",o?.container),children:t?.map((e,r)=>{switch(e.type){case"tag":return(0,s.jsx)(c.Text,{as:"div",html:e.text},r);case"image":return(0,s.jsx)(c.Picture,{source:`${e.image}, ${e.imageMob||e.image} 768`,className:(0,l.cn)("mx-auto h-[100px]"),imgClassName:(0,l.cn)("h-full object-cover")},r);case"title":return(0,s.jsx)(c.Text,{as:"div",html:e.text,className:(0,l.cn)("text-[14px] font-semibold text-[#333]")},r);case"price":return(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)(c.Text,{html:`${e.text}`,className:(0,l.cn)("text-[14px] font-semibold text-[#333]")})});case"buttons":return(0,s.jsx)("div",{className:"mt-2 flex flex-col gap-2",children:e.buttons?.map((n,m)=>(0,s.jsx)(c.Button,{variant:n.variant,className:"w-full",onClick:n.onClick,children:n.text},m))})}})})};var b=N;
1
+ "use strict";var p=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var u=(a,t)=>{for(var o in t)p(a,o,{get:t[o],enumerable:!0})},v=(a,t,o,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of d(t))!x.call(a,r)&&r!==o&&p(a,r,{get:()=>t[r],enumerable:!(e=i(t,r))||e.enumerable});return a};var f=a=>v(p({},"__esModule",{value:!0}),a);var g={};u(g,{default:()=>b});module.exports=f(g);var s=require("react/jsx-runtime"),l=require("../../helpers/utils.js"),c=require("../../components/index.js");const N=a=>{const{content:t,cns:o}=a;return(0,s.jsx)("div",{className:(0,l.cn)("cpn-card-container relative box-border w-[177px] px-2 pb-3 pt-4 text-center",o?.container),children:t?.map((e,r)=>{switch(e.type){case"tag":return(0,s.jsx)(c.Text,{as:"div",html:e.text},r);case"image":return(0,s.jsx)(c.Picture,{source:`${e.image}, ${e.imageMob||e.image} 768`,className:(0,l.cn)("mx-auto h-[100px]"),alt:"",imgClassName:(0,l.cn)("h-full object-cover")},r);case"title":return(0,s.jsx)(c.Text,{as:"div",html:e.text,className:(0,l.cn)("text-[14px] font-semibold text-[#333]")},r);case"price":return(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)(c.Text,{html:`${e.text}`,className:(0,l.cn)("text-[14px] font-semibold text-[#333]")})});case"buttons":return(0,s.jsx)("div",{className:"mt-2 flex flex-col gap-2",children:e.buttons?.map((n,m)=>(0,s.jsx)(c.Button,{variant:n.variant,className:"w-full",onClick:n.onClick,children:n.text},m))})}})})};var b=N;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cpn-components/CpnProductCard/index.tsx"],
4
- "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport type { ProductCardProps } from './types.js'\nimport { Button, Picture, Text } from '../../components/index.js'\n\nconst CpnProductCard = (props: ProductCardProps) => {\n const { content, cns } = props\n\n return (\n <div className={cn('cpn-card-container relative box-border w-[177px] px-2 pb-3 pt-4 text-center', cns?.container)}>\n {content?.map((item, index) => {\n switch (item.type) {\n case 'tag':\n return <Text key={index} as=\"div\" html={item.text} />\n case 'image':\n return (\n <Picture\n key={index}\n source={`${item.image}, ${item.imageMob || item.image} 768`}\n className={cn('mx-auto h-[100px]')}\n imgClassName={cn('h-full object-cover')}\n />\n )\n case 'title':\n return (\n <Text key={index} as=\"div\" html={item.text} className={cn('text-[14px] font-semibold text-[#333]')} />\n )\n case 'price':\n return (\n <div className=\"mt-3\">\n <Text html={`${item.text}`} className={cn('text-[14px] font-semibold text-[#333]')} />\n </div>\n )\n case 'buttons':\n return (\n <div className=\"mt-2 flex flex-col gap-2\">\n {item.buttons?.map((button, index) => (\n <Button key={index} variant={button.variant} className=\"w-full\" onClick={button.onClick}>\n {button.text}\n </Button>\n ))}\n </div>\n )\n }\n })}\n </div>\n )\n}\n\nexport default CpnProductCard\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAYmB,IAAAI,EAAA,6BAZnBC,EAAmB,kCAEnBC,EAAsC,qCAEtC,MAAMC,EAAkBC,GAA4B,CAClD,KAAM,CAAE,QAAAC,EAAS,IAAAC,CAAI,EAAIF,EAEzB,SACE,OAAC,OAAI,aAAW,MAAG,8EAA+EE,GAAK,SAAS,EAC7G,SAAAD,GAAS,IAAI,CAACE,EAAMC,IAAU,CAC7B,OAAQD,EAAK,KAAM,CACjB,IAAK,MACH,SAAO,OAAC,QAAiB,GAAG,MAAM,KAAMA,EAAK,MAA3BC,CAAiC,EACrD,IAAK,QACH,SACE,OAAC,WAEC,OAAQ,GAAGD,EAAK,KAAK,KAAKA,EAAK,UAAYA,EAAK,KAAK,OACrD,aAAW,MAAG,mBAAmB,EACjC,gBAAc,MAAG,qBAAqB,GAHjCC,CAIP,EAEJ,IAAK,QACH,SACE,OAAC,QAAiB,GAAG,MAAM,KAAMD,EAAK,KAAM,aAAW,MAAG,uCAAuC,GAAtFC,CAAyF,EAExG,IAAK,QACH,SACE,OAAC,OAAI,UAAU,OACb,mBAAC,QAAK,KAAM,GAAGD,EAAK,IAAI,GAAI,aAAW,MAAG,uCAAuC,EAAG,EACtF,EAEJ,IAAK,UACH,SACE,OAAC,OAAI,UAAU,2BACZ,SAAAA,EAAK,SAAS,IAAI,CAACE,EAAQD,OAC1B,OAAC,UAAmB,QAASC,EAAO,QAAS,UAAU,SAAS,QAASA,EAAO,QAC7E,SAAAA,EAAO,MADGD,CAEb,CACD,EACH,CAEN,CACF,CAAC,EACH,CAEJ,EAEA,IAAOV,EAAQK",
4
+ "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport type { ProductCardProps } from './types.js'\nimport { Button, Picture, Text } from '../../components/index.js'\n\nconst CpnProductCard = (props: ProductCardProps) => {\n const { content, cns } = props\n\n return (\n <div className={cn('cpn-card-container relative box-border w-[177px] px-2 pb-3 pt-4 text-center', cns?.container)}>\n {content?.map((item, index) => {\n switch (item.type) {\n case 'tag':\n return <Text key={index} as=\"div\" html={item.text} />\n case 'image':\n return (\n <Picture\n key={index}\n source={`${item.image}, ${item.imageMob || item.image} 768`}\n className={cn('mx-auto h-[100px]')}\n alt={''}\n imgClassName={cn('h-full object-cover')}\n />\n )\n case 'title':\n return (\n <Text key={index} as=\"div\" html={item.text} className={cn('text-[14px] font-semibold text-[#333]')} />\n )\n case 'price':\n return (\n <div className=\"mt-3\">\n <Text html={`${item.text}`} className={cn('text-[14px] font-semibold text-[#333]')} />\n </div>\n )\n case 'buttons':\n return (\n <div className=\"mt-2 flex flex-col gap-2\">\n {item.buttons?.map((button, index) => (\n <Button key={index} variant={button.variant} className=\"w-full\" onClick={button.onClick}>\n {button.text}\n </Button>\n ))}\n </div>\n )\n }\n })}\n </div>\n )\n}\n\nexport default CpnProductCard\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAYmB,IAAAI,EAAA,6BAZnBC,EAAmB,kCAEnBC,EAAsC,qCAEtC,MAAMC,EAAkBC,GAA4B,CAClD,KAAM,CAAE,QAAAC,EAAS,IAAAC,CAAI,EAAIF,EAEzB,SACE,OAAC,OAAI,aAAW,MAAG,8EAA+EE,GAAK,SAAS,EAC7G,SAAAD,GAAS,IAAI,CAACE,EAAMC,IAAU,CAC7B,OAAQD,EAAK,KAAM,CACjB,IAAK,MACH,SAAO,OAAC,QAAiB,GAAG,MAAM,KAAMA,EAAK,MAA3BC,CAAiC,EACrD,IAAK,QACH,SACE,OAAC,WAEC,OAAQ,GAAGD,EAAK,KAAK,KAAKA,EAAK,UAAYA,EAAK,KAAK,OACrD,aAAW,MAAG,mBAAmB,EACjC,IAAK,GACL,gBAAc,MAAG,qBAAqB,GAJjCC,CAKP,EAEJ,IAAK,QACH,SACE,OAAC,QAAiB,GAAG,MAAM,KAAMD,EAAK,KAAM,aAAW,MAAG,uCAAuC,GAAtFC,CAAyF,EAExG,IAAK,QACH,SACE,OAAC,OAAI,UAAU,OACb,mBAAC,QAAK,KAAM,GAAGD,EAAK,IAAI,GAAI,aAAW,MAAG,uCAAuC,EAAG,EACtF,EAEJ,IAAK,UACH,SACE,OAAC,OAAI,UAAU,2BACZ,SAAAA,EAAK,SAAS,IAAI,CAACE,EAAQD,OAC1B,OAAC,UAAmB,QAASC,EAAO,QAAS,UAAU,SAAS,QAASA,EAAO,QAC7E,SAAAA,EAAO,MADGD,CAEb,CACD,EACH,CAEN,CACF,CAAC,EACH,CAEJ,EAEA,IAAOV,EAAQK",
6
6
  "names": ["CpnProductCard_exports", "__export", "CpnProductCard_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_components", "CpnProductCard", "props", "content", "cns", "item", "index", "button"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of a(t))!m.call(e,c)&&c!==o&&s(e,c,{get:()=>t[c],enumerable:!(n=p(t,c))||n.enumerable});return e};var u=e=>f(s({},"__esModule",{value:!0}),e);var T={};x(T,{default:()=>N});module.exports=u(T);var i=require("react/jsx-runtime"),r=require("../../helpers/utils.js"),l=require("../../components/index.js");const d=e=>{const{html:t,icon_l:o,icon_r:n,cns:c}=e;return(0,i.jsxs)("div",{className:(0,r.cn)("cpn-title-container flex items-start justify-center gap-5 text-center",c?.container),children:[o&&(0,i.jsx)(l.Picture,{source:o,className:(0,r.cn)("cpn-title-icon-l",c?.icon_l)}),(0,i.jsx)(l.Text,{html:t,className:"cpn-title-text laptop:text-[40px] text-[24px] font-bold"}),n&&(0,i.jsx)(l.Picture,{source:n,className:(0,r.cn)("cpn-title-icon-r",c?.icon_r)})]})};var N=d;
1
+ "use strict";var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of a(t))!m.call(e,c)&&c!==o&&s(e,c,{get:()=>t[c],enumerable:!(l=p(t,c))||l.enumerable});return e};var u=e=>f(s({},"__esModule",{value:!0}),e);var T={};x(T,{default:()=>N});module.exports=u(T);var i=require("react/jsx-runtime"),r=require("../../helpers/utils.js"),n=require("../../components/index.js");const d=e=>{const{html:t,icon_l:o,icon_r:l,cns:c}=e;return(0,i.jsxs)("div",{className:(0,r.cn)("cpn-title-container flex items-start justify-center gap-5 text-center",c?.container),children:[o&&(0,i.jsx)(n.Picture,{source:o,alt:"",className:(0,r.cn)("cpn-title-icon-l",c?.icon_l)}),(0,i.jsx)(n.Text,{html:t,className:"cpn-title-text laptop:text-[40px] text-[24px] font-bold"}),l&&(0,i.jsx)(n.Picture,{source:l,alt:"",className:(0,r.cn)("cpn-title-icon-r",c?.icon_r)})]})};var N=d;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/cpn-components/CpnTitle/index.tsx"],
4
- "sourcesContent": ["import type { TitleProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Picture, Text } from '../../components/index.js'\n\nconst CpnTitle = (props: TitleProps) => {\n const { html, icon_l, icon_r, cns } = props\n\n return (\n <div className={cn('cpn-title-container flex items-start justify-center gap-5 text-center', cns?.container)}>\n {icon_l && <Picture source={icon_l} className={cn('cpn-title-icon-l', cns?.icon_l)} />}\n <Text html={html} className=\"cpn-title-text laptop:text-[40px] text-[24px] font-bold\" />\n {icon_r && <Picture source={icon_r} className={cn('cpn-title-icon-r', cns?.icon_r)} />}\n </div>\n )\n}\n\nexport default CpnTitle\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAQI,IAAAI,EAAA,6BAPJC,EAAmB,kCACnBC,EAA8B,qCAE9B,MAAMC,EAAYC,GAAsB,CACtC,KAAM,CAAE,KAAAC,EAAM,OAAAC,EAAQ,OAAAC,EAAQ,IAAAC,CAAI,EAAIJ,EAEtC,SACE,QAAC,OAAI,aAAW,MAAG,wEAAyEI,GAAK,SAAS,EACvG,UAAAF,MAAU,OAAC,WAAQ,OAAQA,EAAQ,aAAW,MAAG,mBAAoBE,GAAK,MAAM,EAAG,KACpF,OAAC,QAAK,KAAMH,EAAM,UAAU,0DAA0D,EACrFE,MAAU,OAAC,WAAQ,OAAQA,EAAQ,aAAW,MAAG,mBAAoBC,GAAK,MAAM,EAAG,GACtF,CAEJ,EAEA,IAAOV,EAAQK",
4
+ "sourcesContent": ["import type { TitleProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { Picture, Text } from '../../components/index.js'\n\nconst CpnTitle = (props: TitleProps) => {\n const { html, icon_l, icon_r, cns } = props\n\n return (\n <div className={cn('cpn-title-container flex items-start justify-center gap-5 text-center', cns?.container)}>\n {icon_l && <Picture source={icon_l} alt={''} className={cn('cpn-title-icon-l', cns?.icon_l)} />}\n <Text html={html} className=\"cpn-title-text laptop:text-[40px] text-[24px] font-bold\" />\n {icon_r && <Picture source={icon_r} alt={''} className={cn('cpn-title-icon-r', cns?.icon_r)} />}\n </div>\n )\n}\n\nexport default CpnTitle\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAQI,IAAAI,EAAA,6BAPJC,EAAmB,kCACnBC,EAA8B,qCAE9B,MAAMC,EAAYC,GAAsB,CACtC,KAAM,CAAE,KAAAC,EAAM,OAAAC,EAAQ,OAAAC,EAAQ,IAAAC,CAAI,EAAIJ,EAEtC,SACE,QAAC,OAAI,aAAW,MAAG,wEAAyEI,GAAK,SAAS,EACvG,UAAAF,MAAU,OAAC,WAAQ,OAAQA,EAAQ,IAAK,GAAI,aAAW,MAAG,mBAAoBE,GAAK,MAAM,EAAG,KAC7F,OAAC,QAAK,KAAMH,EAAM,UAAU,0DAA0D,EACrFE,MAAU,OAAC,WAAQ,OAAQA,EAAQ,IAAK,GAAI,aAAW,MAAG,mBAAoBC,GAAK,MAAM,EAAG,GAC/F,CAEJ,EAEA,IAAOV,EAAQK",
6
6
  "names": ["CpnTitle_exports", "__export", "CpnTitle_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_components", "CpnTitle", "props", "html", "icon_l", "icon_r", "cns"]
7
7
  }
@@ -8,12 +8,8 @@ declare const meta: {
8
8
  title?: string;
9
9
  products: Array<{
10
10
  title: string;
11
- img: {
12
- url: string;
13
- };
14
- mobileImg?: {
15
- url: string;
16
- };
11
+ img: import("../types/props.js").Img;
12
+ mobileImg?: import("../types/props.js").Img;
17
13
  subTitle: string;
18
14
  link?: string;
19
15
  }>;
@@ -1,2 +1,2 @@
1
- "use strict";var i=Object.create;var c=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var r in e)c(t,r,{get:e[r],enumerable:!0})},n=(t,e,r,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of l(e))!u.call(t,s)&&s!==r&&c(t,s,{get:()=>e[s],enumerable:!(m=f(e,s))||m.enumerable});return t};var g=(t,e,r)=>(r=t!=null?i(d(t)):{},n(e||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),b=t=>n(c({},"__esModule",{value:!0}),t);var v={};y(v,{Default:()=>x,MoreThanFive:()=>P,Round:()=>_,default:()=>h});module.exports=b(v);var a=require("react/jsx-runtime"),p=g(require("../biz-components/Category/index.js")),I=require("gsap"),k=require("@gsap/react"),A=require("gsap/dist/ScrollTrigger"),M=require("gsap/dist/SplitText");const S={title:"Biz-Components/Category",component:p.default,parameters:{layout:"fullscreen"},tags:["autodocs"]};var h=S;const o=[{name:"Anker Prime 27",image:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"},{name:"Anker Prime 27",image:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"},{name:"Anker Prime 27",image:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"}],x={args:{data:{isShowSelect:!0,productData:[],products:o},className:"p-4"}},_={args:{data:{isShowSelect:!0,productData:[],shape:"round",products:o},className:"p-4"}},P=()=>(0,a.jsxs)("div",{className:"flex size-full flex-col gap-6 p-4",children:[(0,a.jsx)("span",{className:"text-info-primary text-center text-sm font-bold",children:" 5 Items"}),(0,a.jsx)(p.default,{data:{shape:"round",isShowSelect:!0,productData:[],products:[...o,...o.slice(0,2)]}}),(0,a.jsx)("span",{className:"text-info-primary text-center text-sm font-bold",children:" 6 Items"}),(0,a.jsx)(p.default,{data:{shape:"round",isShowSelect:!0,productData:[],products:[...o,...o]}}),(0,a.jsx)("span",{className:"text-info-primary text-center text-sm font-bold",children:" 9 Items"}),(0,a.jsx)(p.default,{data:{shape:"round",isShowSelect:!0,productData:[],products:[...o,...o,...o]}})]});
1
+ "use strict";var i=Object.create;var c=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var a in e)c(t,a,{get:e[a],enumerable:!0})},n=(t,e,a,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of f(e))!u.call(t,s)&&s!==a&&c(t,s,{get:()=>e[s],enumerable:!(m=l(e,s))||m.enumerable});return t};var g=(t,e,a)=>(a=t!=null?i(d(t)):{},n(e||!t||!t.__esModule?c(a,"default",{value:t,enumerable:!0}):a,t)),b=t=>n(c({},"__esModule",{value:!0}),t);var k={};y(k,{Default:()=>x,MoreThanFive:()=>_,Round:()=>P,default:()=>h});module.exports=b(k);var r=require("react/jsx-runtime"),p=g(require("../biz-components/Category/index.js")),v=require("gsap"),I=require("@gsap/react"),w=require("gsap/dist/ScrollTrigger"),M=require("gsap/dist/SplitText");const S={title:"Biz-Components/Category",component:p.default,parameters:{layout:"fullscreen"},tags:["autodocs"]};var h=S;const o=[{name:"Anker Prime 27",image:{url:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554",alt:"Anker Prime 27"}},{name:"Anker Prime 27",image:{url:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554",alt:"Anker Prime 27"}},{name:"Anker Prime 27",image:{url:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554",alt:"Anker Prime 27"}}],x={args:{data:{isShowSelect:!0,productData:[],products:o},className:"p-4"}},P={args:{data:{isShowSelect:!0,productData:[],shape:"round",products:o},className:"p-4"}},_=()=>(0,r.jsxs)("div",{className:"flex size-full flex-col gap-6 p-4",children:[(0,r.jsx)("span",{className:"text-info-primary text-center text-sm font-bold",children:" 5 Items"}),(0,r.jsx)(p.default,{data:{shape:"round",isShowSelect:!0,productData:[],products:[...o,...o.slice(0,2)]}}),(0,r.jsx)("span",{className:"text-info-primary text-center text-sm font-bold",children:" 6 Items"}),(0,r.jsx)(p.default,{data:{shape:"round",isShowSelect:!0,productData:[],products:[...o,...o]}}),(0,r.jsx)("span",{className:"text-info-primary text-center text-sm font-bold",children:" 9 Items"}),(0,r.jsx)(p.default,{data:{shape:"round",isShowSelect:!0,productData:[],products:[...o,...o,...o]}})]});
2
2
  //# sourceMappingURL=category.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/category.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Category from '../biz-components/Category/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta = {\n title: 'Biz-Components/Category',\n component: Category,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Category>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mock = [\n {\n name: 'Anker Prime 27',\n image:\n 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n {\n name: 'Anker Prime 27',\n image:\n 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n {\n name: 'Anker Prime 27',\n image:\n 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n]\n\nexport const Default: Story = {\n args: {\n data: {\n isShowSelect: true,\n productData: [],\n products: mock,\n },\n className: 'p-4',\n },\n}\n\nexport const Round: Story = {\n args: {\n data: {\n isShowSelect: true,\n productData: [],\n shape: 'round',\n products: mock,\n },\n className: 'p-4',\n },\n}\n\nexport const MoreThanFive = () => {\n return (\n <div className=\"flex size-full flex-col gap-6 p-4\">\n <span className=\"text-info-primary text-center text-sm font-bold\"> 5 Items</span>\n <Category\n data={{\n shape: 'round',\n isShowSelect: true,\n productData: [],\n products: [...mock, ...mock.slice(0, 2)],\n }}\n />\n <span className=\"text-info-primary text-center text-sm font-bold\"> 6 Items</span>\n <Category\n data={{\n shape: 'round',\n isShowSelect: true,\n productData: [],\n products: [...mock, ...mock],\n }}\n />\n <span className=\"text-info-primary text-center text-sm font-bold\"> 9 Items</span>\n <Category\n data={{\n shape: 'round',\n isShowSelect: true,\n productData: [],\n products: [...mock, ...mock, ...mock],\n }}\n />\n </div>\n )\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,iBAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GA8DI,IAAAO,EAAA,6BA7DJC,EAAqB,kDACrBC,EAAqB,gBACrBC,EAAwB,uBACxBC,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAAO,CACX,MAAO,0BACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOT,EAAQQ,EAGf,MAAME,EAAO,CACX,CACE,KAAM,iBACN,MACE,8HACJ,EACA,CACE,KAAM,iBACN,MACE,8HACJ,EACA,CACE,KAAM,iBACN,MACE,8HACJ,CACF,EAEab,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,aAAc,GACd,YAAa,CAAC,EACd,SAAUa,CACZ,EACA,UAAW,KACb,CACF,EAEaX,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,aAAc,GACd,YAAa,CAAC,EACd,MAAO,QACP,SAAUW,CACZ,EACA,UAAW,KACb,CACF,EAEaZ,EAAe,OAExB,QAAC,OAAI,UAAU,oCACb,oBAAC,QAAK,UAAU,kDAAkD,oBAAQ,KAC1E,OAAC,EAAAW,QAAA,CACC,KAAM,CACJ,MAAO,QACP,aAAc,GACd,YAAa,CAAC,EACd,SAAU,CAAC,GAAGC,EAAM,GAAGA,EAAK,MAAM,EAAG,CAAC,CAAC,CACzC,EACF,KACA,OAAC,QAAK,UAAU,kDAAkD,oBAAQ,KAC1E,OAAC,EAAAD,QAAA,CACC,KAAM,CACJ,MAAO,QACP,aAAc,GACd,YAAa,CAAC,EACd,SAAU,CAAC,GAAGC,EAAM,GAAGA,CAAI,CAC7B,EACF,KACA,OAAC,QAAK,UAAU,kDAAkD,oBAAQ,KAC1E,OAAC,EAAAD,QAAA,CACC,KAAM,CACJ,MAAO,QACP,aAAc,GACd,YAAa,CAAC,EACd,SAAU,CAAC,GAAGC,EAAM,GAAGA,EAAM,GAAGA,CAAI,CACtC,EACF,GACF",
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Category from '../biz-components/Category/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta = {\n title: 'Biz-Components/Category',\n component: Category,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Category>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mock = [\n {\n name: 'Anker Prime 27',\n image: {\n url: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n alt: 'Anker Prime 27',\n },\n },\n {\n name: 'Anker Prime 27',\n image: {\n url: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n alt: 'Anker Prime 27',\n },\n },\n {\n name: 'Anker Prime 27',\n image: {\n url: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n alt: 'Anker Prime 27',\n },\n },\n]\n\nexport const Default: Story = {\n args: {\n data: {\n isShowSelect: true,\n productData: [],\n products: mock,\n },\n className: 'p-4',\n },\n}\n\nexport const Round: Story = {\n args: {\n data: {\n isShowSelect: true,\n productData: [],\n shape: 'round',\n products: mock,\n },\n className: 'p-4',\n },\n}\n\nexport const MoreThanFive = () => {\n return (\n <div className=\"flex size-full flex-col gap-6 p-4\">\n <span className=\"text-info-primary text-center text-sm font-bold\"> 5 Items</span>\n <Category\n data={{\n shape: 'round',\n isShowSelect: true,\n productData: [],\n products: [...mock, ...mock.slice(0, 2)],\n }}\n />\n <span className=\"text-info-primary text-center text-sm font-bold\"> 6 Items</span>\n <Category\n data={{\n shape: 'round',\n isShowSelect: true,\n productData: [],\n products: [...mock, ...mock],\n }}\n />\n <span className=\"text-info-primary text-center text-sm font-bold\"> 9 Items</span>\n <Category\n data={{\n shape: 'round',\n isShowSelect: true,\n productData: [],\n products: [...mock, ...mock, ...mock],\n }}\n />\n </div>\n )\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,iBAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAN,GAoEI,IAAAO,EAAA,6BAnE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6
6
  "names": ["category_stories_exports", "__export", "Default", "MoreThanFive", "Round", "category_stories_default", "__toCommonJS", "import_jsx_runtime", "import_Category", "import_gsap", "import_react", "import_ScrollTrigger", "import_SplitText", "meta", "Category", "mock"]
7
7
  }
@@ -1,15 +1,12 @@
1
1
  import React from 'react';
2
+ import type { Img } from '../../types/props.js';
2
3
  /** Hook:监听窗口宽度 */
3
4
  type ItemType = {
4
5
  /** 标题文本 */
5
6
  title: string;
6
7
  /** 图片*/
7
- img: {
8
- url: string;
9
- };
10
- mobileImg?: {
11
- url: string;
12
- };
8
+ img: Img;
9
+ mobileImg?: Img;
13
10
  /** 内容节点 */
14
11
  subTitle: string;
15
12
  link?: string;
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as P,jsx as o,jsxs as i}from"react/jsx-runtime";import M from"../Title/index.js";import{cn as n}from"../../helpers/utils.js";import y from"../../components/picture.js";import w from"../../components/button.js";import C from"../SwiperBox/index.js";import{withStyles as I}from"../../shared/Styles.js";import S,{useState as g,useRef as d,useCallback as H,useImperativeHandle as L,useEffect as R}from"react";import{useExposure as A}from"../../hooks/useExposure.js";import{trackUrlRef as k}from"../../shared/trackUrlRef.js";import{gaTrack as D}from"../../shared/track.js";const s="image",l="scene_banner",z=S.forwardRef(({data:t,className:u="",event:f},_)=>{const[a,N]=g(0),m=d([]),c=d(!1),[v,T]=g(0),p=d(null);L(_,()=>p.current),A(p,{componentType:s,componentName:l,componentTitle:t?.title});const B=(e,r)=>{r&&(m.current[e]=r)};R(()=>{const e=()=>{m.current[0]&&T(m.current[0].offsetWidth)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const E=({data:e,configuration:r})=>i("div",{className:n("bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid",r?.itemShape==="round"?"rounded-2xl":""),children:[o(y,{className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",source:e?.mobileImg?.url||""}),i("div",{className:n("absolute inset-x-0 bottom-0 flex flex-col overflow-hidden px-4 pb-4"),children:[i("div",{className:"tablet:mb-6 mb-4 flex-1 overflow-hidden",children:[o("p",{className:"text-info-primary text-2xl font-bold leading-[1.2]",children:e?.title}),o("h3",{className:"text-info-primary line-clamp-2 text-sm font-semibold",children:e?.subTitle})]}),o("a",{href:k(e.link,`${s}_${l}`),onClick:()=>r?.event?.primaryButton(e,r),children:o(w,{variant:"secondary",className:n("text-info-primary text-sm font-bold"),children:r?.primaryButton})})]})]}),b=H(e=>{a===e||c.current||(c.current=!0,N(e),D({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:s,component_name:l,component_title:t?.products[e]?.title,component_description:t?.products[e]?.subTitle,position:e+1}}))},[t?.products,a]);return i(P,{children:[t?.title&&o(M,{data:{title:t?.title}}),o("div",{ref:p,className:n("laptop:block hidden",{"aiui-dark":t?.theme==="dark"}),children:o("div",{className:n("lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden",u),children:t?.products?.map((e,r)=>{const h=a===r;return i("div",{style:{flex:`${h?8:1} 1 0%`,transition:"all 0.6s"},ref:x=>{x&&B(r,x)},className:n("relative cursor-pointer overflow-hidden",t?.itemShape==="round"?"rounded-2xl":""),onMouseEnter:()=>b(r),onMouseLeave:()=>{c.current=!1},onClick:()=>b(r),children:[o(y,{source:e?.img?.url,className:"size-full object-cover [&_img]:h-full [&_img]:object-cover"}),i("div",{style:{width:v},className:n("absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in",h&&v?"opacity-100":"opacity-0"),children:[i("div",{className:"mr-16 flex-1 overflow-hidden",children:[o("p",{className:"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold",children:e?.title}),o("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]",children:e?.subTitle})]}),o("a",{href:k(e?.link,`${s}_${l}`),onClick:()=>f?.primaryButton?.(t,r),children:o(w,{className:n("desktop:text-base mb-1.5 text-sm font-bold"),children:t?.primaryButton})})]})]},r)})})}),o("div",{className:n("laptop:hidden block",{"aiui-dark":t?.theme==="dark"}),children:o(C,{className:n("h-[400px] !overflow-visible",u),id:"AccordionCards"+t?.key,data:{list:t?.products,configuration:{shape:t?.shape,itemShape:t?.itemShape,primaryButton:t?.primaryButton,event:f}},Slide:E,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3}}})})]})});var Q=I(z);export{Q as default};
1
+ "use client";import{Fragment as z,jsx as o,jsxs as n}from"react/jsx-runtime";import E from"../Title/index.js";import{cn as i}from"../../helpers/utils.js";import x from"../../components/picture.js";import g from"../../components/button.js";import M from"../SwiperBox/index.js";import{withStyles as C}from"../../shared/Styles.js";import S,{useState as w,useRef as d,useCallback as H,useImperativeHandle as L,useEffect as R}from"react";import{useExposure as A}from"../../hooks/useExposure.js";import{trackUrlRef as k}from"../../shared/trackUrlRef.js";import{gaTrack as D}from"../../shared/track.js";const l="image",s="scene_banner",j=S.forwardRef(({data:t,className:u="",event:f},_)=>{const[m,N]=w(0),a=d([]),p=d(!1),[v,T]=w(0),c=d(null);L(_,()=>c.current),A(c,{componentType:l,componentName:s,componentTitle:t?.title});const B=(e,r)=>{r&&(a.current[e]=r)};R(()=>{const e=()=>{a.current[0]&&T(a.current[0].offsetWidth)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const I=({data:e,configuration:r})=>n("div",{className:i("bg-container-secondary-1 relative w-full shrink-0 grow-0 overflow-hidden border border-solid",r?.itemShape==="round"?"rounded-2xl":""),children:[o(x,{className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",source:e?.mobileImg?.url||"",alt:e?.mobileImg?.alt||""}),n("div",{className:i("absolute inset-x-0 bottom-0 flex flex-col overflow-hidden px-4 pb-4"),children:[n("div",{className:"tablet:mb-6 mb-4 flex-1 overflow-hidden",children:[o("p",{className:"text-info-primary text-2xl font-bold leading-[1.2]",children:e?.title}),o("h3",{className:"text-info-primary line-clamp-2 text-sm font-semibold",children:e?.subTitle})]}),o("a",{href:k(e.link,`${l}_${s}`),onClick:()=>r?.event?.primaryButton(e,r),children:o(g,{variant:"secondary",className:i("text-info-primary text-sm font-bold"),children:r?.primaryButton})})]})]}),b=H(e=>{m===e||p.current||(p.current=!0,N(e),D({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:"Home Page",component_type:l,component_name:s,component_title:t?.products[e]?.title,component_description:t?.products[e]?.subTitle,position:e+1}}))},[t?.products,m]);return n(z,{children:[t?.title&&o(E,{data:{title:t?.title}}),o("div",{ref:c,className:i("laptop:block hidden",{"aiui-dark":t?.theme==="dark"}),children:o("div",{className:i("lg-desktop:h-[calc(560_/_1920*100vw)] desktop:h-[calc(448_/_1440*100vw)] laptop:h-[calc(336_/_1025*100vw)] flex max-h-[560px] min-h-[336px] w-full gap-4 overflow-hidden",u),children:t?.products?.map((e,r)=>{const h=m===r;return n("div",{style:{flex:`${h?8:1} 1 0%`,transition:"all 0.6s"},ref:y=>{y&&B(r,y)},className:i("relative cursor-pointer overflow-hidden",t?.itemShape==="round"?"rounded-2xl":""),onMouseEnter:()=>b(r),onMouseLeave:()=>{p.current=!1},onClick:()=>b(r),children:[o(x,{source:e?.img?.url,className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",alt:e?.img?.alt||""}),n("div",{style:{width:v},className:i("absolute inset-x-0 bottom-0 flex w-full items-end justify-between overflow-hidden px-8 pb-8 opacity-0 transition-opacity duration-[600ms] ease-in",h&&v?"opacity-100":"opacity-0"),children:[n("div",{className:"mr-16 flex-1 overflow-hidden",children:[o("p",{className:"laptop:text-2xl desktop:text-[32px] text-info-primary mb-1 text-xl font-bold",children:e?.title}),o("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary line-clamp-2 text-[14px] font-[700]",children:e?.subTitle})]}),o("a",{href:k(e?.link,`${l}_${s}`),onClick:()=>f?.primaryButton?.(t,r),children:o(g,{className:i("desktop:text-base mb-1.5 text-sm font-bold"),children:t?.primaryButton})})]})]},r)})})}),o("div",{className:i("laptop:hidden block",{"aiui-dark":t?.theme==="dark"}),children:o(M,{className:i("h-[400px] !overflow-visible",u),id:"AccordionCards"+t?.key,data:{list:t?.products,configuration:{shape:t?.shape,itemShape:t?.itemShape,primaryButton:t?.primaryButton,event:f}},Slide:I,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3}}})})]})});var Q=C(j);export{Q as default};
2
2
  //# sourceMappingURL=index.js.map