@anker-in/headless-ui 0.0.27-alpha.104 → 0.0.27-alpha.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/cjs/biz-components/Category/index.js +1 -1
  2. package/dist/cjs/biz-components/Category/index.js.map +2 -2
  3. package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
  4. package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +2 -2
  5. package/dist/cjs/biz-components/MemberEquity/index.js +6 -5
  6. package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
  7. package/dist/cjs/biz-components/MemberEquity/types.d.ts +2 -0
  8. package/dist/cjs/biz-components/MemberEquity/types.js +1 -1
  9. package/dist/cjs/biz-components/MemberEquity/types.js.map +1 -1
  10. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  11. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  12. package/dist/cjs/shared/mimeType.d.ts +1 -0
  13. package/dist/cjs/shared/mimeType.js +2 -0
  14. package/dist/cjs/shared/mimeType.js.map +7 -0
  15. package/dist/esm/biz-components/Category/index.js +1 -1
  16. package/dist/esm/biz-components/Category/index.js.map +2 -2
  17. package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
  18. package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +2 -2
  19. package/dist/esm/biz-components/MemberEquity/index.js +7 -6
  20. package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
  21. package/dist/esm/biz-components/MemberEquity/types.d.ts +2 -0
  22. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  23. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  24. package/dist/esm/shared/mimeType.d.ts +1 -0
  25. package/dist/esm/shared/mimeType.js +2 -0
  26. package/dist/esm/shared/mimeType.js.map +7 -0
  27. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var x=Object.create;var m=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var N=(e,o)=>{for(var r in o)m(e,r,{get:o[r],enumerable:!0})},p=(e,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of y(o))!k.call(e,i)&&i!==r&&m(e,i,{get:()=>o[i],enumerable:!(a=b(o,i))||a.enumerable});return e};var d=(e,o,r)=>(r=e!=null?x(v(e)):{},p(o||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),w=e=>p(m({},"__esModule",{value:!0}),e);var $={};N($,{default:()=>P});module.exports=w($);var t=require("react/jsx-runtime"),R=require("react"),n=require("../../helpers/utils.js"),s=d(require("../../components/picture.js")),g=require("../../shared/Styles.js"),f=d(require("../Title/index.js")),u=d(require("./SwiperCategory.js")),l=d(require("../../components/link.js"));const C=(e,o)=>{const r=[];for(let a=0;a<e.length;a+=o)r.push(e.slice(a,a+o));return r},I=({data:e,configuration:o})=>(0,t.jsxs)("div",{className:(0,n.cn)("bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)("div",{className:"transition-all duration-300 group-hover:scale-110",children:(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{source:e?.image?.url||e?.image,className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),(0,t.jsx)("p",{className:"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold",children:e?.name})]}),S=({data:e,configuration:o})=>(0,t.jsxs)("div",{className:(0,n.cn)("bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden","hover:bg-info-white cursor-pointer px-3 py-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{className:"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})}),(0,t.jsx)("p",{className:"text-info-primary flex-1 truncate text-center text-sm font-semibold",children:e?.name})]},`${e?.name}`),j=({data:e,configuration:o})=>(0,t.jsxs)("div",{className:(0,n.cn)("aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)("div",{className:"transition-all duration-300 group-hover:scale-110",children:(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})})}),(0,t.jsx)("p",{className:"tablet:text-lg text-info-primary text-center text-sm font-semibold",children:e?.name})]}),_=({data:e,configuration:o,index:r})=>(0,t.jsxs)("div",{className:(0,n.cn)("bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer p-4",r===0?"aspect-h-[252] row-span-2":"aspect-h-[120]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{source:e?.image?.url||e?.image,className:(0,n.cn)("mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",r===0?"max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]")})}),(0,t.jsx)("p",{className:"text-info-primary line-clamp-2 text-center text-sm font-semibold",children:e?.name})]}),z=({data:e,configuration:o})=>(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((r,a)=>(0,t.jsx)(S,{data:r,configuration:o},a))}),D=({data:e,configuration:o})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"tablet:block hidden",children:(0,t.jsx)("div",{className:"mx-auto flex w-full gap-4",children:e?.map((r,a)=>(0,t.jsx)(j,{data:r,configuration:o},a))})}),(0,t.jsx)("div",{className:"tablet:hidden block",children:(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((r,a)=>(0,t.jsx)(_,{index:a,data:r,configuration:o},a))})})]}),L=e=>{const{data:o,buildData:r,className:a="",key:i}=e,c=o?.isShowSelect?o?.products:o?.productData,h=c?.length<=5;return(0,t.jsxs)("div",{className:(0,n.cn)("w-full",a,{"aiui-dark":o?.theme==="dark"}),children:[o?.title&&(0,t.jsx)(f.default,{data:{title:o?.title}}),h?(0,t.jsx)(D,{data:c,configuration:{shape:o?.shape}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"tablet:block hidden",children:(0,t.jsx)(u.default,{id:`Category${i}`,Slide:I,data:{list:c,configuration:{shape:o?.shape}}})}),(0,t.jsx)("div",{className:"tablet:hidden block",children:(0,t.jsx)(u.default,{id:`Category1${i}`,Slide:z,data:{list:C(c,6),configuration:{shape:o?.shape}}})})]})]})};var P=(0,g.withStyles)(L);
1
+ "use strict";"use client";var x=Object.create;var m=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var N=(e,o)=>{for(var r in o)m(e,r,{get:o[r],enumerable:!0})},p=(e,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of y(o))!k.call(e,i)&&i!==r&&m(e,i,{get:()=>o[i],enumerable:!(a=b(o,i))||a.enumerable});return e};var d=(e,o,r)=>(r=e!=null?x(v(e)):{},p(o||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),w=e=>p(m({},"__esModule",{value:!0}),e);var $={};N($,{default:()=>P});module.exports=w($);var t=require("react/jsx-runtime"),R=require("react"),n=require("../../helpers/utils.js"),s=d(require("../../components/picture.js")),g=require("../../shared/Styles.js"),f=d(require("../Title/index.js")),u=d(require("./SwiperCategory.js")),l=d(require("../../components/link.js"));const C=(e,o)=>{const r=[];for(let a=0;a<e.length;a+=o)r.push(e.slice(a,a+o));return r},I=({data:e,configuration:o})=>(0,t.jsxs)("div",{className:(0,n.cn)("bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)("div",{className:"transition-all duration-300 group-hover:scale-110",children:(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{source:e?.image?.url||e?.image,className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),(0,t.jsx)("p",{className:"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold",children:e?.name})]}),S=({data:e,configuration:o})=>(0,t.jsxs)("div",{className:(0,n.cn)("bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden","hover:bg-info-white cursor-pointer px-3 py-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{className:"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})}),(0,t.jsx)("p",{className:"text-info-primary flex-1 truncate text-center text-sm font-semibold",children:e?.name})]},`${e?.name}`),j=({data:e,configuration:o})=>(0,t.jsxs)("div",{className:(0,n.cn)("aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)("div",{className:"transition-all duration-300 group-hover:scale-110",children:(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})})}),(0,t.jsx)("p",{className:"tablet:text-lg text-info-primary text-center text-sm font-semibold",children:e?.name})]}),_=({data:e,configuration:o,index:r})=>(0,t.jsxs)("div",{className:(0,n.cn)("bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer p-4",r===0?"aspect-h-[252] row-span-2":"aspect-h-[120]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[(0,t.jsx)(l.default,{href:e?.link||"",children:(0,t.jsx)(s.default,{source:e?.image?.url||e?.image,className:(0,n.cn)("mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",r===0?"max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]")})}),(0,t.jsx)("p",{className:"text-info-primary line-clamp-2 text-center text-sm font-semibold",children:e?.name})]}),z=({data:e,configuration:o})=>(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((r,a)=>(0,t.jsx)(S,{data:r,configuration:o},a))}),D=({data:e,configuration:o})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"tablet:block hidden",children:(0,t.jsx)("div",{className:"mx-auto flex w-full gap-4",children:e?.map((r,a)=>(0,t.jsx)(j,{data:r,configuration:o},a))})}),(0,t.jsx)("div",{className:"tablet:hidden block",children:(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((r,a)=>(0,t.jsx)(_,{index:a,data:r,configuration:o},a))})})]}),L=e=>{const{data:o,buildData:r,className:a="",key:i}=e,c=o?.isShowSelect?o?.products:o?.productData,h=c?.length<=5;return(0,t.jsxs)("div",{className:(0,n.cn)("w-full overflow-hidden",a,{"aiui-dark":o?.theme==="dark"}),children:[o?.title&&(0,t.jsx)(f.default,{data:{title:o?.title}}),h?(0,t.jsx)(D,{data:c,configuration:{shape:o?.shape}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"tablet:block hidden",children:(0,t.jsx)(u.default,{id:`Category${i}`,Slide:I,data:{list:c,configuration:{shape:o?.shape}}})}),(0,t.jsx)("div",{className:"tablet:hidden block",children:(0,t.jsx)(u.default,{id:`Category1${i}`,Slide:z,data:{list:C(c,6),configuration:{shape:o?.shape}}})}),(0,t.jsx)("div",{className:"h-7"})]})]})};var P=(0,g.withStyles)(L);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Category/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport Link from '../../components/link.js'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: any\n name: string\n link?: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n link?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold\">\n {data?.name}\n </p>\n </div>\n )\n}\n\nconst SingleItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n key={`${data?.name}`}\n className={cn(\n 'bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden',\n 'hover:bg-info-white cursor-pointer px-3 py-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n className=\"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n <p className=\"text-info-primary flex-1 truncate text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore pc\u5C55\u793A\nconst SinglePcCategoryItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore mobile\u5C55\u793A\nconst SingleMobileCategoryItem = ({\n data,\n configuration,\n index,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer p-4',\n index === 0 ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className={cn(\n 'mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover',\n index === 0 ? 'max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]'\n )}\n />\n </Link>\n <p className=\"text-info-primary line-clamp-2 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// \u5176\u5B83\u54C1\u724Cmobile\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n )\n}\n\n// soundcore\u5C55\u793A\nconst SoundCoreCategoryItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <>\n <div className=\"tablet:block hidden\">\n <div className=\"mx-auto flex w-full gap-4\">\n {data?.map((item, index) => {\n return <SinglePcCategoryItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n <div className=\"tablet:hidden block\">\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleMobileCategoryItem key={index} index={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n </>\n )\n}\n\nconst Category: React.FC<CategoryProps> = props => {\n const { data, buildData, className = '', key } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = data?.isShowSelect ? data?.products : data?.productData\n const isSoundCore = currentData?.length <= 5\n return (\n <div className={cn('w-full', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {data?.title && <Title data={{ title: data?.title }} />}\n {isSoundCore ? (\n <SoundCoreCategoryItem data={currentData} configuration={{ shape: data?.shape }} />\n ) : (\n <>\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: currentData, configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(currentData, 6), configuration: { shape: data?.shape } }}\n />\n </div>\n </>\n )}\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CI,IAAAI,EAAA,6BA7CJC,EAAkB,iBAClBC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAC3BC,EAAkB,gCAClBC,EAAsB,kCACtBC,EAAiB,uCA6BjB,MAAMC,EAAa,CAACC,EAAYC,IAAiB,CAC/C,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAI,OAAQG,GAAKF,EACnCC,EAAO,KAAKF,EAAI,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEpC,OAAOC,CACT,EAEME,EAAiB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,OAE1C,QAAC,OACC,aAAW,MACT,oFACA,6EACAA,GAAe,QAAU,QAAU,cAAgB,cACrD,EAEA,oBAAC,OAAI,UAAU,oDACb,mBAAC,EAAAC,QAAA,CAAK,KAAMF,GAAM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CAAE,EACnE,EACF,KACA,OAAC,OAAI,UAAU,sBACb,mBAAC,EAAAmB,QAAA,CACC,GAAI,YAAYJ,CAAG,GACnB,MAAOP,EACP,KAAM,CAAE,KAAMd,EAAWsB,EAAa,CAAC,EAAG,cAAe,CAAE,MAAOhB,GAAM,KAAM,CAAE,EAClF,EACF,GACF,GAEJ,CAEJ,EAEA,IAAOhB,KAAQ,cAAW2B,CAAQ",
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport Link from '../../components/link.js'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: any\n name: string\n link?: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n link?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold\">\n {data?.name}\n </p>\n </div>\n )\n}\n\nconst SingleItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n key={`${data?.name}`}\n className={cn(\n 'bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden',\n 'hover:bg-info-white cursor-pointer px-3 py-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n className=\"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n <p className=\"text-info-primary flex-1 truncate text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore pc\u5C55\u793A\nconst SinglePcCategoryItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore mobile\u5C55\u793A\nconst SingleMobileCategoryItem = ({\n data,\n configuration,\n index,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer p-4',\n index === 0 ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className={cn(\n 'mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover',\n index === 0 ? 'max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]'\n )}\n />\n </Link>\n <p className=\"text-info-primary line-clamp-2 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// \u5176\u5B83\u54C1\u724Cmobile\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n )\n}\n\n// soundcore\u5C55\u793A\nconst SoundCoreCategoryItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <>\n <div className=\"tablet:block hidden\">\n <div className=\"mx-auto flex w-full gap-4\">\n {data?.map((item, index) => {\n return <SinglePcCategoryItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n <div className=\"tablet:hidden block\">\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleMobileCategoryItem key={index} index={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n </>\n )\n}\n\nconst Category: React.FC<CategoryProps> = props => {\n const { data, buildData, className = '', key } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = data?.isShowSelect ? data?.products : data?.productData\n const isSoundCore = currentData?.length <= 5\n return (\n <div className={cn('w-full overflow-hidden', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {data?.title && <Title data={{ title: data?.title }} />}\n {isSoundCore ? (\n <SoundCoreCategoryItem data={currentData} configuration={{ shape: data?.shape }} />\n ) : (\n <>\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: currentData, configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(currentData, 6), configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"h-7\" />\n </>\n )}\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CI,IAAAI,EAAA,6BA7CJC,EAAkB,iBAClBC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAC3BC,EAAkB,gCAClBC,EAAsB,kCACtBC,EAAiB,uCA6BjB,MAAMC,EAAa,CAACC,EAAYC,IAAiB,CAC/C,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAI,OAAQG,GAAKF,EACnCC,EAAO,KAAKF,EAAI,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEpC,OAAOC,CACT,EAEME,EAAiB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,OAE1C,QAAC,OACC,aAAW,MACT,oFACA,6EACAA,GAAe,QAAU,QAAU,cAAgB,cACrD,EAEA,oBAAC,OAAI,UAAU,oDACb,mBAAC,EAAAC,QAAA,CAAK,KAAMF,GAAM,MAAQ,GACxB,mBAAC,EAAAG,QAAA,CACC,OAAQH,GAAM,OAAO,KAAOA,GAAM,MAClC,UAAU,kIACZ,EACF,EACF,KACA,OAAC,KAAE,UAAU,oGACV,SAAAA,GAAM,KACT,GACF,EAIEI,EAAa,CAAC,CAAE,KAAAJ,EAAM,cAAAC,CAAc,OAEtC,QAAC,OAEC,aAAW,MACT,2EACA,4DACAA,GAAe,QAAU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EA,IAAOhB,KAAQ,cAAW2B,CAAQ",
6
6
  "names": ["Category_exports", "__export", "Category_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperCategory", "import_link", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "Link", "Picture", "SingleItem", "SinglePcCategoryItem", "SingleMobileCategoryItem", "index", "CategoryMobileItem", "item", "SoundCoreCategoryItem", "Category", "props", "buildData", "className", "key", "currentData", "isSoundCore", "Title", "SwiperBox"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var R=Object.create;var c=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var E=(t,a)=>{for(var r in a)c(t,r,{get:a[r],enumerable:!0})},y=(t,a,r,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of q(a))!Y.call(t,i)&&i!==r&&c(t,i,{get:()=>a[i],enumerable:!(s=z(a,i))||s.enumerable});return t};var l=(t,a,r)=>(r=t!=null?R(B(t)):{},y(a||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),G=t=>y(c({},"__esModule",{value:!0}),t);var F={};E(F,{default:()=>T});module.exports=G(F);var e=require("react/jsx-runtime"),p=require("react"),d=require("../../helpers/utils.js"),f=require("../../shared/Styles.js"),b=l(require("../Slogan/index.js")),o=require("../../components/gird.js"),g=require("../../components/container.js"),v=l(require("../BrandEquity/index.js")),h=l(require("../MemberEquity/index.js")),k=l(require("../Spacer/index.js")),w=l(require("gsap")),m=require("@payloadcms/richtext-lexical/html"),N=require("react-responsive");const n=({children:t,spaceY:a})=>{const r=(0,N.useMediaQuery)({query:"(max-width: 768px)"});return(0,e.jsx)(g.Container,{spaceY:a,children:(0,e.jsxs)(o.Grid,{children:[!r&&(0,e.jsx)(o.GridItem,{span:1}),(0,e.jsx)(o.GridItem,{span:r?12:10,children:t}),!r&&(0,e.jsx)(o.GridItem,{span:1})]})})},$=({children:t,id:a,components:r})=>((0,p.useEffect)(()=>{const s=window.screen.height;w.default.timeline({scrollTrigger:{trigger:`#${a}`,start:"top top",end:`top+=${s*1.8}px bottom`,scrub:0}}).to(`#${a} .sticky-cover`,{opacity:1,duration:.3}).to(`#${a} .media-content`,{top:"100%",transform:"translate(-50%, -100%)",duration:1},"<")},[]),(0,e.jsxs)("div",{id:a,className:"relative z-10 pb-10",children:[(0,e.jsx)(e.Fragment,{children:t}),(0,e.jsx)(e.Fragment,{children:r?.map(s=>{switch(s.blockType){case"ipc-brand-equity":return(0,e.jsx)("div",{className:"relative z-20 bg-transparent",children:(0,e.jsx)(n,{spaceY:"!my-0",children:(0,e.jsx)(v.default,{data:s,style:s?.style})})});case"ipc-member-equity":return(0,e.jsx)("div",{className:"relative z-20 w-full bg-transparent",children:(0,e.jsx)(n,{spaceY:"!my-0",children:(0,e.jsx)(h.default,{data:s,className:"w-full",style:s?.style})})});case"ipc-spacer":return(0,e.jsx)(k.default,{data:s,style:s?.style});default:return null}})})]})),L=({className:t="",id:a,data:{title:r,videoTitle:s,btnText:i,img:H,video:x,theme:u,shape:S,components:M}})=>{const C=(0,p.useRef)(null),P=typeof r=="string"?r:r&&(0,m.convertLexicalToHTML)({data:r});return typeof s=="string"||s&&(0,m.convertLexicalToHTML)({data:s}),(0,e.jsxs)($,{id:a,components:M,children:[(0,e.jsx)("div",{className:(0,d.cn)("sticky-box absolute left-0 top-0 h-screen w-full",t,{"aiui-dark":u==="dark","rounded-box":S==="rounded"}),children:(0,e.jsx)("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2",children:(0,e.jsx)(n,{spaceY:"tablet:my-[32px] my-[24px] space-y-4",children:(0,e.jsx)(b.default,{className:"sticky-title",data:{title:P||"",theme:u}})})})}),(0,e.jsx)("div",{className:"sticky left-0 top-0 w-full",children:(0,e.jsxs)("div",{className:(0,d.cn)("media-cover","relative h-screen w-full","lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]"),children:[(0,e.jsx)("video",{ref:C,className:"size-full object-cover",src:x?.url,autoPlay:!0,muted:!0,loop:!0}),(0,e.jsx)("div",{className:"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)"}})]})})]})};var T=(0,f.withStyles)(L);
1
+ "use strict";"use client";var R=Object.create;var c=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var E=(t,a)=>{for(var r in a)c(t,r,{get:a[r],enumerable:!0})},y=(t,a,r,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of q(a))!Y.call(t,i)&&i!==r&&c(t,i,{get:()=>a[i],enumerable:!(s=z(a,i))||s.enumerable});return t};var l=(t,a,r)=>(r=t!=null?R(B(t)):{},y(a||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),G=t=>y(c({},"__esModule",{value:!0}),t);var T={};E(T,{default:()=>L});module.exports=G(T);var e=require("react/jsx-runtime"),n=require("react"),d=require("../../helpers/utils.js"),f=require("../../shared/Styles.js"),b=l(require("../Slogan/index.js")),o=require("../../components/gird.js"),g=require("../../components/container.js"),v=l(require("../BrandEquity/index.js")),h=l(require("../MemberEquity/index.js")),k=l(require("../Spacer/index.js")),w=l(require("gsap")),m=require("@payloadcms/richtext-lexical/html"),N=require("react-responsive");const p=({children:t,spaceY:a})=>{const r=(0,N.useMediaQuery)({query:"(max-width: 768px)"});return(0,e.jsx)(g.Container,{spaceY:a,children:(0,e.jsxs)(o.Grid,{children:[!r&&(0,e.jsx)(o.GridItem,{span:1}),(0,e.jsx)(o.GridItem,{span:r?12:10,children:t}),!r&&(0,e.jsx)(o.GridItem,{span:1})]})})},$=({children:t,id:a,components:r})=>((0,n.useEffect)(()=>{const s=window.screen.height;w.default.timeline({scrollTrigger:{trigger:`#${a}`,start:"top top",end:`top+=${s*1.8}px bottom`,scrub:0}}).to(`#${a} .sticky-cover`,{opacity:1,duration:.3}).to(`#${a} .media-content`,{top:"100%",transform:"translate(-50%, -100%)",duration:1},"<")},[]),(0,e.jsxs)("div",{id:a,className:"relative z-10 pb-10",children:[(0,e.jsx)(e.Fragment,{children:t}),(0,e.jsx)(e.Fragment,{children:r?.map(s=>{switch(s.blockType){case"ipc-brand-equity":return(0,e.jsx)("div",{className:"relative z-20 bg-transparent",children:(0,e.jsx)(p,{spaceY:"!my-0",children:(0,e.jsx)(v.default,{data:s,style:s?.style})})});case"ipc-member-equity":return(0,e.jsx)("div",{className:"relative z-20 w-full bg-transparent",children:(0,e.jsx)(p,{spaceY:"!my-0",children:(0,e.jsx)(h.default,{data:s,className:"w-full",style:s?.style})})});case"ipc-spacer":return(0,e.jsx)(k.default,{data:s,style:s?.style});default:return null}})})]})),I=({className:t="",id:a,data:{title:r,videoTitle:s,btnText:i,img:F,video:x,theme:u,shape:S,components:M}})=>{const C=(0,n.useRef)(null),P=typeof r=="string"?r:r&&(0,m.convertLexicalToHTML)({data:r});return typeof s=="string"||s&&(0,m.convertLexicalToHTML)({data:s}),(0,e.jsxs)($,{id:a,components:M,children:[(0,e.jsx)("div",{className:(0,d.cn)("sticky-box absolute left-0 top-0 h-screen w-full",t,{"aiui-dark":u==="dark","rounded-box":S==="rounded"}),children:(0,e.jsx)("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2",children:(0,e.jsx)(p,{spaceY:"tablet:my-[32px] my-[24px] space-y-4",children:(0,e.jsx)(b.default,{className:"sticky-title",data:{title:P||"",theme:u}})})})}),(0,e.jsx)("div",{className:"sticky left-0 top-0 w-full",children:(0,e.jsxs)("div",{className:(0,d.cn)("media-cover","relative h-screen w-full","lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]"),children:[(0,e.jsx)("video",{ref:C,className:"size-full object-cover",src:x?.url,autoPlay:!0,muted:!0,loop:!0,playsInline:!0}),(0,e.jsx)("div",{className:"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)"}})]})})]})};var L=(0,f.withStyles)(I);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaPlayerSticky/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\n// import ScrollTrigger from 'gsap/ScrollTrigger'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\n\nconst SubContainer = ({ children, spaceY }: { children: React.ReactNode; spaceY?: string }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst StickyBox = ({\n children,\n id,\n components,\n}: {\n children: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n}) => {\n useEffect(() => {\n const height = window.screen.height\n\n gsap\n .timeline({\n scrollTrigger: {\n trigger: `#${id}`,\n start: 'top top',\n end: `top+=${height * 1.8}px bottom`,\n scrub: 0,\n },\n })\n .to(`#${id} .sticky-cover`, {\n opacity: 1,\n duration: 0.3,\n })\n .to(\n `#${id} .media-content`,\n {\n top: '100%',\n transform: 'translate(-50%, -100%)',\n duration: 1,\n },\n '<'\n )\n }, [])\n\n return (\n <div id={id} className=\"relative z-10 pb-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n}\n\nconst MediaPlayerSticky: React.FC<MediaPlayerBaseProps> = ({\n className = '',\n id,\n data: { title, videoTitle, btnText, img, video, theme, shape, components },\n}) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n\n const title_html = typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title })\n typeof videoTitle === 'string' ? videoTitle : videoTitle && convertLexicalToHTML({ data: videoTitle })\n\n return (\n <StickyBox id={id} components={components}>\n <div\n className={cn('sticky-box absolute left-0 top-0 h-screen w-full', className, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2\">\n <SubContainer spaceY=\"tablet:my-[32px] my-[24px] space-y-4\">\n <Slogan className=\"sticky-title\" data={{ title: title_html || '', theme }} />\n </SubContainer>\n </div>\n </div>\n <div className=\"sticky left-0 top-0 w-full\">\n <div\n className={cn(\n 'media-cover',\n 'relative h-screen w-full',\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n )}\n >\n <video ref={videoRef} className=\"size-full object-cover\" src={video?.url} autoPlay muted loop />\n <div\n className=\"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)',\n }}\n />\n </div>\n </div>\n </StickyBox>\n )\n}\n\nexport default withStyles(MediaPlayerSticky)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoBM,IAAAI,EAAA,6BAnBNC,EAAmD,iBACnDC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAmB,iCACnBC,EAA+B,oCAC/BC,EAA0B,yCAC1BC,EAAwB,sCACxBC,EAAyB,uCACzBC,EAAmB,iCACnBC,EAAiB,mBAEjBC,EAAqC,6CACrCC,EAA8B,4BAG9B,MAAMC,EAAe,CAAC,CAAE,SAAAC,EAAU,OAAAC,CAAO,IAAsD,CAC7F,MAAMC,KAAW,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EAC9D,SACE,OAAC,aAAU,OAAQD,EACjB,oBAAC,QACE,WAACC,MAAY,OAAC,YAAS,KAAM,EAAG,KACjC,OAAC,YAAS,KAAMA,EAAW,GAAK,GAAK,SAAAF,EAAS,EAC7C,CAACE,MAAY,OAAC,YAAS,KAAM,EAAG,GACnC,EACF,CAEJ,EAEMC,EAAY,CAAC,CACjB,SAAAH,EACA,GAAAI,EACA,WAAAC,CACF,QAKE,aAA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BA,MAAc,wBAAqB,CAAE,KAAMA,CAAW,CAAC,KAGnG,QAACZ,EAAA,CAAU,GAAIC,EAAI,WAAYC,EAC7B,oBAAC,OACC,aAAW,MAAG,mDAAoDQ,EAAW,CAC3E,YAAaM,IAAU,OACvB,cAAeC,IAAU,SAC3B,CAAC,EAED,mBAAC,OAAI,UAAU,wFACb,mBAACrB,EAAA,CAAa,OAAO,uCACnB,mBAAC,EAAAwB,QAAA,CAAO,UAAU,eAAe,KAAM,CAAE,MAAOD,GAAc,GAAI,MAAAH,CAAM,EAAG,EAC7E,EACF,EACF,KACA,OAAC,OAAI,UAAU,6BACb,oBAAC,OACC,aAAW,MACT,cACA,2BACA,oNACF,EAEA,oBAAC,SAAM,IAAKE,EAAU,UAAU,yBAAyB,IAAKH,GAAO,IAAK,SAAQ,GAAC,MAAK,GAAC,KAAI,GAAC,KAC9F,OAAC,OACC,UAAU,8DACV,MAAO,CACL,WAAY,+DACd,EACF,GACF,EACF,GACF,CAEJ,EAEA,IAAOlC,KAAQ,cAAW4B,CAAiB",
4
+ "sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\n// import ScrollTrigger from 'gsap/ScrollTrigger'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\n\nconst SubContainer = ({ children, spaceY }: { children: React.ReactNode; spaceY?: string }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst StickyBox = ({\n children,\n id,\n components,\n}: {\n children: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n}) => {\n useEffect(() => {\n const height = window.screen.height\n\n gsap\n .timeline({\n scrollTrigger: {\n trigger: `#${id}`,\n start: 'top top',\n end: `top+=${height * 1.8}px bottom`,\n scrub: 0,\n },\n })\n .to(`#${id} .sticky-cover`, {\n opacity: 1,\n duration: 0.3,\n })\n .to(\n `#${id} .media-content`,\n {\n top: '100%',\n transform: 'translate(-50%, -100%)',\n duration: 1,\n },\n '<'\n )\n }, [])\n\n return (\n <div id={id} className=\"relative z-10 pb-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n}\n\nconst MediaPlayerSticky: React.FC<MediaPlayerBaseProps> = ({\n className = '',\n id,\n data: { title, videoTitle, btnText, img, video, theme, shape, components },\n}) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n\n const title_html = typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title })\n typeof videoTitle === 'string' ? videoTitle : videoTitle && convertLexicalToHTML({ data: videoTitle })\n\n return (\n <StickyBox id={id} components={components}>\n <div\n className={cn('sticky-box absolute left-0 top-0 h-screen w-full', className, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2\">\n <SubContainer spaceY=\"tablet:my-[32px] my-[24px] space-y-4\">\n <Slogan className=\"sticky-title\" data={{ title: title_html || '', theme }} />\n </SubContainer>\n </div>\n </div>\n <div className=\"sticky left-0 top-0 w-full\">\n <div\n className={cn(\n 'media-cover',\n 'relative h-screen w-full',\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n )}\n >\n <video ref={videoRef} className=\"size-full object-cover\" src={video?.url} autoPlay muted loop playsInline />\n <div\n className=\"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)',\n }}\n />\n </div>\n </div>\n </StickyBox>\n )\n}\n\nexport default withStyles(MediaPlayerSticky)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoBM,IAAAI,EAAA,6BAnBNC,EAAmD,iBACnDC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAmB,iCACnBC,EAA+B,oCAC/BC,EAA0B,yCAC1BC,EAAwB,sCACxBC,EAAyB,uCACzBC,EAAmB,iCACnBC,EAAiB,mBAEjBC,EAAqC,6CACrCC,EAA8B,4BAG9B,MAAMC,EAAe,CAAC,CAAE,SAAAC,EAAU,OAAAC,CAAO,IAAsD,CAC7F,MAAMC,KAAW,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EAC9D,SACE,OAAC,aAAU,OAAQD,EACjB,oBAAC,QACE,WAACC,MAAY,OAAC,YAAS,KAAM,EAAG,KACjC,OAAC,YAAS,KAAMA,EAAW,GAAK,GAAK,SAAAF,EAAS,EAC7C,C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KAAW,UAAyB,IAAI,EAExCC,EAAa,OAAOR,GAAU,SAAWA,EAAQA,MAAS,wBAAqB,CAAE,KAAMA,CAAM,CAAC,EACpG,cAAOC,GAAe,UAAwBA,MAAc,wBAAqB,CAAE,KAAMA,CAAW,CAAC,KAGnG,QAACZ,EAAA,CAAU,GAAIC,EAAI,WAAYC,EAC7B,oBAAC,OACC,aAAW,MAAG,mDAAoDQ,EAAW,CAC3E,YAAaM,IAAU,OACvB,cAAeC,IAAU,SAC3B,CAAC,EAED,mBAAC,OAAI,UAAU,wFACb,mBAACrB,EAAA,CAAa,OAAO,uCACnB,mBAAC,EAAAwB,QAAA,CAAO,UAAU,eAAe,KAAM,CAAE,MAAOD,GAAc,GAAI,MAAAH,CAAM,EAAG,EAC7E,EACF,EACF,KACA,OAAC,OAAI,UAAU,6BACb,oBAAC,OACC,aAAW,MACT,cACA,2BACA,oNACF,EAEA,oBAAC,SAAM,IAAKE,EAAU,UAAU,yBAAyB,IAAKH,GAAO,IAAK,SAAQ,GAAC,MAAK,GAAC,KAAI,GAAC,YAAW,GAAC,KAC1G,OAAC,OACC,UAAU,8DACV,MAAO,CACL,WAAY,+DACd,EACF,GACF,EACF,GACF,CAEJ,EAEA,IAAOlC,KAAQ,cAAW4B,CAAiB",
6
6
  "names": ["MediaPlayerSticky_exports", "__export", "MediaPlayerSticky_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "import_Slogan", "import_gird", "import_container", "import_BrandEquity", "import_MemberEquity", "import_Spacer", "import_gsap", "import_html", "import_react_responsive", "SubContainer", "children", "spaceY", "isMobile", "StickyBox", "id", "components", "height", "gsap", "componentData", "BrandEquity", "MemberEquity", "Spacer", "MediaPlayerSticky", "className", "title", "videoTitle", "btnText", "img", "video", "theme", "shape", "videoRef", "title_html", "Slogan"]
7
7
  }
@@ -1,10 +1,11 @@
1
- "use strict";"use client";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var k=(a,t)=>{for(var i in t)d(a,i,{get:t[i],enumerable:!0})},h=(a,t,i,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!v.call(a,o)&&o!==i&&d(a,o,{get:()=>t[o],enumerable:!(p=x(t,o))||p.enumerable});return a};var N=a=>h(d({},"__esModule",{value:!0}),a);var C={};k(C,{default:()=>B});module.exports=N(C);var e=require("react/jsx-runtime"),w=require("react"),l=require("../../components/index.js"),m=require("../../shared/Styles.js"),n=require("../../helpers/utils.js");const q=({data:a,className:t=""})=>{const{title:i,description:p,backgroundImage:o,mobileBackgroundImage:c,primaryButton:s,secondaryButton:r,theme:u,shape:b}=a,y=()=>{},g=()=>{};return(0,e.jsxs)("section",{"data-ui-component-id":"MemberEquity",className:(0,n.cn)(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
- aspect-[390/480] overflow-hidden`,t,{"aiui-dark":u==="dark","rounded-box":b==="rounded"}),children:[(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:(0,e.jsx)("source",{src:o?.url,type:"video/mp4"})}),(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:(0,e.jsx)("source",{src:c?.url,type:"video/mp4"})}),(0,e.jsx)("div",{className:`
1
+ "use strict";"use client";var m=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var B=(l,t)=>{for(var i in t)m(l,i,{get:t[i],enumerable:!0})},q=(l,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of h(t))!N.call(l,a)&&a!==i&&m(l,a,{get:()=>t[a],enumerable:!(s=k(t,a))||s.enumerable});return l};var z=l=>q(m({},"__esModule",{value:!0}),l);var j={};B(j,{default:()=>C});module.exports=z(j);var e=require("react/jsx-runtime"),E=require("react"),o=require("../../components/index.js"),u=require("../../shared/Styles.js"),c=require("../../helpers/utils.js"),d=require("../../shared/mimeType.js");const P=({data:l,className:t=""})=>{const{title:i,description:s,backgroundImage:a,mobileBackgroundImage:p,primaryButton:r,secondaryButton:n,theme:b,shape:y,primaryButtonHandler:g,secondaryButtonHandler:f}=l,v=()=>{g?.()},x=()=>{f?.()};return(0,e.jsxs)("section",{"data-ui-component-id":"MemberEquity",className:(0,c.cn)(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
+ aspect-[390/480] overflow-hidden`,t,{"aiui-dark":b==="dark","rounded-box":y==="rounded"}),children:[(0,d.isVideo)(a?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:(0,e.jsx)("source",{src:a?.url,type:"video/mp4"})}):(0,e.jsx)(o.Picture,{source:a?.url,alt:a?.alt,className:"tablet:block absolute inset-0 hidden size-full object-cover"}),(0,d.isVideo)(p?.mimeType)?(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:(0,e.jsx)("source",{src:p?.url,type:"video/mp4"})}):(0,e.jsx)(o.Picture,{source:p?.url,alt:p?.alt,className:"tablet:hidden absolute inset-0 size-full object-cover"}),(0,e.jsx)("div",{className:`
3
3
  laptop:items-center
4
4
  absolute
5
- inset-0 flex w-full items-end
5
+ inset-0
6
+ flex w-full items-end py-[16px]
6
7
  `,children:(0,e.jsxs)("div",{className:`
7
8
  tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6
8
- desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-4 px-4
9
- `,children:[(0,e.jsxs)("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[(0,e.jsx)(l.Heading,{as:"h2",size:3,className:"member-equity-title ",html:i}),(0,e.jsx)(l.Text,{size:2,className:"member-equity-description",html:p})]}),(0,e.jsxs)("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[r&&r.text&&(0,e.jsx)("a",{href:r.link,children:(0,e.jsx)(l.Button,{variant:"secondary",onClick:g,className:(0,n.cn)("member-equity-button-secondary"),children:r.text})}),s&&s.text&&(0,e.jsx)("a",{href:s.link,children:(0,e.jsx)(l.Button,{variant:"primary",onClick:y,className:(0,n.cn)("member-equity-button-primary"),children:s.text})})]})]})})]})};var B=(0,m.withStyles)(q);
9
+ desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-6 px-4
10
+ `,children:[(0,e.jsxs)("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[(0,e.jsx)(o.Heading,{as:"h2",size:3,className:"member-equity-title ",html:i}),(0,e.jsx)(o.Text,{size:2,className:"member-equity-description",html:s})]}),(0,e.jsxs)("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[n&&n.text&&(0,e.jsx)("a",{href:n.link,children:(0,e.jsx)(o.Button,{variant:"secondary",onClick:x,className:(0,c.cn)("member-equity-button-secondary"),children:n.text})}),r&&r.text&&(0,e.jsx)("a",{href:r.link,children:(0,e.jsx)(o.Button,{variant:"primary",onClick:v,className:(0,c.cn)("member-equity-button-primary"),children:r.text})})]})]})})]})};var C=(0,u.withStyles)(P);
10
11
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MemberEquity/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Button, Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { MemberEquityProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\n\nconst MemberEquity: React.FC<MemberEquityProps> = ({ data, className = '' }) => {\n const { title, description, backgroundImage, mobileBackgroundImage, primaryButton, secondaryButton, theme, shape } =\n data\n const handleButtonPrimaryClick = () => {\n // \u6267\u884C\u4E3B\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n const handleButtonSecondaryClick = () => {\n // \u6267\u884C\u526F\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n return (\n <section\n data-ui-component-id=\"MemberEquity\"\n className={cn(\n `tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative\n aspect-[390/480] overflow-hidden`,\n className,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n }\n )}\n >\n <video autoPlay muted playsInline loop className=\"tablet:block absolute inset-0 hidden size-full object-cover\">\n <source src={backgroundImage?.url} type=\"video/mp4\" />\n </video>\n <video autoPlay muted playsInline loop className=\"tablet:hidden absolute inset-0 size-full object-cover\">\n <source src={mobileBackgroundImage?.url} type=\"video/mp4\" />\n </video>\n <div\n className={`\n laptop:items-center \n absolute\n inset-0 flex w-full items-end\n `}\n >\n <div\n className={`\n tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6\n desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-4 px-4\n `}\n >\n <div className=\"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2\">\n <Heading as=\"h2\" size={3} className={`member-equity-title `} html={title} />\n <Text size={2} className={`member-equity-description`} html={description} />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button\n variant=\"secondary\"\n onClick={handleButtonSecondaryClick}\n className={cn('member-equity-button-secondary')}\n >\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button\n variant=\"primary\"\n onClick={handleButtonPrimaryClick}\n className={cn('member-equity-button-primary')}\n >\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n </section>\n )\n}\n\nexport default withStyles(MemberEquity)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgCQ,IAAAI,EAAA,6BA/BRC,EAAkB,iBAClBC,EAAsC,qCACtCC,EAA2B,kCAE3BC,EAAmB,kCAEnB,MAAMC,EAA4C,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAY,EAAG,IAAM,CAC9E,KAAM,CAAE,MAAAC,EAAO,YAAAC,EAAa,gBAAAC,EAAiB,sBAAAC,EAAuB,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAO,MAAAC,CAAM,EAC/GT,EACIU,EAA2B,IAAM,CAEvC,EAEMC,EAA6B,IAAM,CAEzC,EAEA,SACE,QAAC,WACC,uBAAqB,eACrB,aAAW,MACT;AAAA,0CAEAV,EACA,CACE,YAAaO,IAAU,OACvB,cAAeC,IAAU,SAC3B,CACF,EAEA,oBAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,8DAC/C,mBAAC,UAAO,IAAKL,GAAiB,IAAK,KAAK,YAAY,EACtD,KACA,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,wDAC/C,mBAAC,UAAO,IAAKC,GAAuB,IAAK,KAAK,YAAY,EAC5D,KACA,OAAC,OACC,UAAW;AAAA;AAAA;AAAA;AAAA,QAMX,oBAAC,OACC,UAAW;AAAA;AAAA;AAAA,UAKX,qBAAC,OAAI,UAAU,+EACb,oBAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,UAAW,uBAAwB,KAAMH,EAAO,KAC1E,OAAC,QAAK,KAAM,EAAG,UAAW,4BAA6B,KAAMC,EAAa,GAC5E,KAEA,QAAC,OAAI,UAAU,mFACZ,UAAAI,GAAmBA,EAAgB,SAClC,OAAC,KAAE,KAAMA,EAAgB,KACvB,mBAAC,UACC,QAAQ,YACR,QAASI,EACT,aAAW,MAAG,gCAAgC,EAE7C,SAAAJ,EAAgB,KACnB,EACF,EAEDD,GAAiBA,EAAc,SAC9B,OAAC,KAAE,KAAMA,EAAc,KACrB,mBAAC,UACC,QAAQ,UACR,QAASI,EACT,aAAW,MAAG,8BAA8B,EAE3C,SAAAJ,EAAc,KACjB,EACF,GAEJ,GACF,EACF,GACF,CAEJ,EAEA,IAAOd,KAAQ,cAAWO,CAAY",
6
- "names": ["MemberEquity_exports", "__export", "MemberEquity_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_Styles", "import_utils", "MemberEquity", "data", "className", "title", "description", "backgroundImage", "mobileBackgroundImage", "primaryButton", "secondaryButton", "theme", "shape", "handleButtonPrimaryClick", "handleButtonSecondaryClick"]
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { MemberEquityProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { isVideo } from '../../shared/mimeType.js'\n\nconst MemberEquity: React.FC<MemberEquityProps> = ({ data, className = '' }) => {\n const {\n title,\n description,\n backgroundImage,\n mobileBackgroundImage,\n primaryButton,\n secondaryButton,\n theme,\n shape,\n primaryButtonHandler,\n secondaryButtonHandler,\n } = data\n const handleButtonPrimaryClick = () => {\n // \u6267\u884C\u4E3B\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n primaryButtonHandler?.()\n }\n\n const handleButtonSecondaryClick = () => {\n // \u6267\u884C\u526F\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n secondaryButtonHandler?.()\n }\n\n return (\n <section\n data-ui-component-id=\"MemberEquity\"\n className={cn(\n `tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative\n aspect-[390/480] overflow-hidden`,\n className,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n }\n )}\n >\n {isVideo(backgroundImage?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block absolute inset-0 hidden size-full object-cover\">\n <source src={backgroundImage?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={backgroundImage?.url}\n alt={backgroundImage?.alt}\n className=\"tablet:block absolute inset-0 hidden size-full object-cover\"\n />\n )}\n {isVideo(mobileBackgroundImage?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden absolute inset-0 size-full object-cover\">\n <source src={mobileBackgroundImage?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={mobileBackgroundImage?.url}\n alt={mobileBackgroundImage?.alt}\n className=\"tablet:hidden absolute inset-0 size-full object-cover\"\n />\n )}\n <div\n className={`\n laptop:items-center \n absolute\n inset-0\n flex w-full items-end py-[16px]\n `}\n >\n <div\n className={`\n tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6\n desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-6 px-4\n `}\n >\n <div className=\"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2\">\n <Heading as=\"h2\" size={3} className={`member-equity-title `} html={title} />\n <Text size={2} className={`member-equity-description`} html={description} />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button\n variant=\"secondary\"\n onClick={handleButtonSecondaryClick}\n className={cn('member-equity-button-secondary')}\n >\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button\n variant=\"primary\"\n onClick={handleButtonPrimaryClick}\n className={cn('member-equity-button-primary')}\n >\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n </section>\n )\n}\n\nexport default withStyles(MemberEquity)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CU,IAAAI,EAAA,6BA7CVC,EAAkB,iBAClBC,EAA+C,qCAC/CC,EAA2B,kCAE3BC,EAAmB,kCACnBC,EAAwB,oCAExB,MAAMC,EAA4C,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAY,EAAG,IAAM,CAC9E,KAAM,CACJ,MAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,sBAAAC,EACA,cAAAC,EACA,gBAAAC,EACA,MAAAC,EACA,MAAAC,EACA,qBAAAC,EACA,uBAAAC,CACF,EAAIX,EACEY,EAA2B,IAAM,CAErCF,IAAuB,CACzB,EAEMG,EAA6B,IAAM,CAEvCF,IAAyB,CAC3B,EAEA,SACE,QAAC,WACC,uBAAqB,eACrB,aAAW,MACT;AAAA,0CAEAV,EACA,CACE,YAAaO,IAAU,OACvB,cAAeC,IAAU,SAC3B,CACF,EAEC,wBAAQL,GAAiB,QAAQ,KAChC,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,8DAC/C,mBAAC,UAAO,IAAKA,GAAiB,IAAK,KAAK,YAAY,EACtD,KAEA,OAAC,WACC,OAAQA,GAAiB,IACzB,IAAKA,GAAiB,IACtB,UAAU,8DACZ,KAED,WAAQC,GAAuB,QAAQ,KACtC,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,wDAC/C,mBAAC,UAAO,IAAKA,GAAuB,IAAK,KAAK,YAAY,EAC5D,KAEA,OAAC,WACC,OAAQA,GAAuB,IAC/B,IAAKA,GAAuB,IAC5B,UAAU,wDACZ,KAEF,OAAC,OACC,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA,QAOX,oBAAC,OACC,UAAW;AAAA;AAAA;AAAA,UAKX,qBAAC,OAAI,UAAU,+EACb,oBAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,UAAW,uBAAwB,KAAMH,EAAO,KAC1E,OAAC,QAAK,KAAM,EAAG,UAAW,4BAA6B,KAAMC,EAAa,GAC5E,KAEA,QAAC,OAAI,UAAU,mFACZ,UAAAI,GAAmBA,EAAgB,SAClC,OAAC,KAAE,KAAMA,EAAgB,KACvB,mBAAC,UACC,QAAQ,YACR,QAASM,EACT,aAAW,MAAG,gCAAgC,EAE7C,SAAAN,EAAgB,KACnB,EACF,EAEDD,GAAiBA,EAAc,SAC9B,OAAC,KAAE,KAAMA,EAAc,KACrB,mBAAC,UACC,QAAQ,UACR,QAASM,EACT,aAAW,MAAG,8BAA8B,EAE3C,SAAAN,EAAc,KACjB,EACF,GAEJ,GACF,EACF,GACF,CAEJ,EAEA,IAAOf,KAAQ,cAAWQ,CAAY",
6
+ "names": ["MemberEquity_exports", "__export", "MemberEquity_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_Styles", "import_utils", "import_mimeType", "MemberEquity", "data", "className", "title", "description", "backgroundImage", "mobileBackgroundImage", "primaryButton", "secondaryButton", "theme", "shape", "primaryButtonHandler", "secondaryButtonHandler", "handleButtonPrimaryClick", "handleButtonSecondaryClick"]
7
7
  }
@@ -13,11 +13,13 @@ export interface MemberEquityProps extends ComponentCommonProps {
13
13
  text: string;
14
14
  link?: string;
15
15
  };
16
+ primaryButtonHandler?: () => void;
16
17
  /** 副按钮配置 */
17
18
  secondaryButton: {
18
19
  text: string;
19
20
  link?: string;
20
21
  };
22
+ secondaryButtonHandler?: () => void;
21
23
  /** 形状 */
22
24
  shape?: Shape;
23
25
  /** 主题 */
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!m.call(t,n)&&n!==i&&r(t,n,{get:()=>e[n],enumerable:!(o=s(e,n))||o.enumerable});return t};var g=t=>p(r({},"__esModule",{value:!0}),t);var d={};module.exports=g(d);
1
+ "use strict";var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!m.call(t,n)&&n!==i&&r(t,n,{get:()=>e[n],enumerable:!(o=a(e,n))||o.enumerable});return t};var d=t=>p(r({},"__esModule",{value:!0}),t);var g={};module.exports=d(g);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MemberEquity/types.ts"],
4
- "sourcesContent": ["import type { ComponentCommonProps, Media, Shape, Theme } from '../../types/props.js'\n\nexport interface MemberEquityProps extends ComponentCommonProps {\n data: {\n /** \u6807\u9898 */\n title: string\n /** \u63CF\u8FF0\u6587\u672C */\n description: string\n /** \u80CC\u666F\u56FE\u7247/\u89C6\u9891 URL */\n backgroundImage?: Media\n mobileBackgroundImage?: Media\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton: {\n text: string\n link?: string\n }\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton: {\n text: string\n link?: string\n }\n /** \u5F62\u72B6 */\n shape?: Shape\n /** \u4E3B\u9898 */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { ComponentCommonProps, Media, Shape, Theme } from '../../types/props.js'\n\nexport interface MemberEquityProps extends ComponentCommonProps {\n data: {\n /** \u6807\u9898 */\n title: string\n /** \u63CF\u8FF0\u6587\u672C */\n description: string\n /** \u80CC\u666F\u56FE\u7247/\u89C6\u9891 URL */\n backgroundImage?: Media\n mobileBackgroundImage?: Media\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton: {\n text: string\n link?: string\n }\n primaryButtonHandler?: () => void\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton: {\n text: string\n link?: string\n }\n secondaryButtonHandler?: () => void\n /** \u5F62\u72B6 */\n shape?: Shape\n /** \u4E3B\u9898 */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var L=Object.create;var y=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var q=(s,o)=>{for(var a in o)y(s,a,{get:o[a],enumerable:!0})},C=(s,o,a,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of P(o))!z.call(s,i)&&i!==a&&y(s,i,{get:()=>o[i],enumerable:!(n=S(o,i))||n.enumerable});return s};var N=(s,o,a)=>(a=s!=null?L(R(s)):{},C(o||!s||!s.__esModule?y(a,"default",{value:s,enumerable:!0}):a,s)),H=s=>C(y({},"__esModule",{value:!0}),s);var O={};q(O,{default:()=>E});module.exports=H(O);var e=require("react/jsx-runtime"),v=N(require("react")),T=require("react-responsive"),w=require("../../shared/Styles.js"),B=N(require("../../components/picture.js")),g=N(require("../../components/button.js")),I=require("../../components/heading.js"),G=require("../../components/text.js"),r=require("../../components/carousel.js"),u=require("../../components/gird.js"),$=N(require("../Title/index.js")),M=require("../../helpers/utils.js"),d=require("../../components/tabs.js");const b=({item:s,shape:o="square",isTab:a=!1})=>{const n=(0,T.useMediaQuery)({query:"(max-width: 1024px)"}),{theme:i="light",title:x,description:c,imageUrl:f,primaryButton:m,secondaryButton:h}=s,t="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,M.cn)("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":o==="rounded","aiui-dark":i==="dark","h-[480px]":n&&!a,"h-[400px]":n&&a},"text-info-primary"),children:[(0,e.jsx)(B.default,{source:f?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${f?.width}/${f?.height}`}}),(0,e.jsxs)("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)(I.Heading,{size:3,className:"item-title",html:x}),(0,e.jsx)(G.Text,{size:3,className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3",html:c})]}),(0,e.jsxs)("div",{className:"flex gap-[16px]",children:[h&&h.text&&(0,e.jsx)("a",{href:h.link,children:(0,e.jsx)(g.default,{className:t,variant:"secondary",children:h.text})}),m&&m.text&&(0,e.jsx)("a",{href:m.link,children:(0,e.jsx)(g.default,{className:t,variant:"primary",children:m.text})})]})]})]})},D=v.default.forwardRef((s,o)=>{const{shape:a,sectionTitle:n,groupByTab:i=!1,items:x=[],carousel:c}=s.data,f=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},m=x.map(t=>t.tabName).filter(Boolean).filter((t,l,p)=>p.indexOf(t)===l),h=m.map(t=>({tabName:t,items:x.filter(l=>l.tabName===t)})).reduce((t,l)=>(t[l.tabName]=l.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:o,className:"text-info-primary",children:[n&&(0,e.jsx)($.default,{data:{title:n},className:"section-title"}),i?(0,e.jsxs)(d.Tabs,{shape:a,align:"left",defaultValue:m[0],children:[(0,e.jsx)(d.TabsList,{children:m.map((t,l)=>(0,e.jsx)(d.TabsTrigger,{value:t,children:t},l))}),m.map((t,l)=>(0,e.jsx)(d.TabsContent,{value:t,className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(u.Grid,{className:"w-full",children:[h[t].map((p,k)=>(0,e.jsx)(u.GridItem,{span:f(p.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(b,{item:p,shape:a,isTab:i})},`${p?.title||""}${k}`)),(0,e.jsx)(u.GridItem,{className:"laptop:hidden block",span:12,children:(0,e.jsx)(r.Carousel,{className:"",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:h[t].map((p,k)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:p,shape:a,isTab:i})},`${p?.title||""}${k}`))})})})]}),c&&c?.items.length>0?(0,e.jsx)(r.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:c.items.map((p,k)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:p,shape:a,isTab:i})},k))})}):null]})},l))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(u.Grid,{className:"w-full",children:[x.map((t,l)=>(0,e.jsx)(u.GridItem,{span:f(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(b,{item:t,shape:a})},`${t?.title||""}${l}`)),x.map((t,l)=>(0,e.jsx)(u.GridItem,{span:f("full"),className:"laptop:hidden block",children:(0,e.jsx)(b,{item:t,shape:a})},`${t?.title||""}${l}`))]}),c&&c?.items.length>0?(0,e.jsx)(r.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:c.items.map((t,l)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:t,shape:a})},`${t?.title||""}${l}`))})}):null]})]})});var E=(0,w.withStyles)(D);
1
+ "use strict";var L=Object.create;var N=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var q=(l,o)=>{for(var s in o)N(l,s,{get:o[s],enumerable:!0})},v=(l,o,s,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of P(o))!z.call(l,r)&&r!==s&&N(l,r,{get:()=>o[r],enumerable:!(m=S(o,r))||m.enumerable});return l};var g=(l,o,s)=>(s=l!=null?L(R(l)):{},v(o||!l||!l.__esModule?N(s,"default",{value:l,enumerable:!0}):s,l)),E=l=>v(N({},"__esModule",{value:!0}),l);var D={};q(D,{default:()=>Q});module.exports=E(D);var e=require("react/jsx-runtime"),x=g(require("react")),T=require("react-responsive"),w=require("../../shared/Styles.js"),I=g(require("../../components/picture.js")),C=g(require("../../components/button.js")),B=require("../../components/heading.js"),G=require("../../components/text.js"),p=require("../../components/carousel.js"),c=require("../../components/gird.js"),$=g(require("../Title/index.js")),M=require("../../helpers/utils.js"),u=require("../../components/tabs.js");const b=({item:l,shape:o="square",isTab:s=!1})=>{const[m,r]=(0,x.useState)(!1),d=(0,T.useMediaQuery)({query:"(max-width: 1024px)"});(0,x.useEffect)(()=>{r(d)},[d]);const{theme:n="light",title:k,description:f,imageUrl:h,primaryButton:t,secondaryButton:a}=l,i="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,M.cn)("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":o==="rounded","aiui-dark":n==="dark","h-[480px]":m&&!s,"h-[400px]":m&&s},"text-info-primary"),children:[(0,e.jsx)(I.default,{source:h?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${h?.width}/${h?.height}`}}),(0,e.jsxs)("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)(B.Heading,{size:3,className:"item-title",html:k}),(0,e.jsx)(G.Text,{size:3,className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-4",html:f})]}),(0,e.jsxs)("div",{className:"flex gap-[16px]",children:[a&&a.text&&(0,e.jsx)("a",{href:a.link,children:(0,e.jsx)(C.default,{className:i,variant:"secondary",children:a.text})}),t&&t.text&&(0,e.jsx)("a",{href:t.link,children:(0,e.jsx)(C.default,{className:i,variant:"primary",children:t.text})})]})]})]})},H=x.default.forwardRef((l,o)=>{const{shape:s,sectionTitle:m,groupByTab:r=!1,items:d=[],carousel:n}=l.data,k=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},f=d.map(t=>t.tabName).filter(Boolean).filter((t,a,i)=>i.indexOf(t)===a),h=f.map(t=>({tabName:t,items:d.filter(a=>a.tabName===t)})).reduce((t,a)=>(t[a.tabName]=a.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:o,className:"text-info-primary",children:[m&&(0,e.jsx)($.default,{data:{title:m},className:"section-title"}),r?(0,e.jsxs)(u.Tabs,{shape:s,align:"left",defaultValue:f[0],children:[(0,e.jsx)(u.TabsList,{children:f.map((t,a)=>(0,e.jsx)(u.TabsTrigger,{value:t,children:t},a))}),f.map((t,a)=>(0,e.jsx)(u.TabsContent,{value:t,className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(c.Grid,{className:"w-full",children:[h[t].map((i,y)=>(0,e.jsx)(c.GridItem,{span:k(i.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(b,{item:i,shape:s,isTab:r})},`${i?.title||""}${y}`)),(0,e.jsx)(c.GridItem,{className:"laptop:hidden block",span:12,children:(0,e.jsx)(p.Carousel,{className:"",children:(0,e.jsx)(p.CarouselContent,{className:"flex",children:h[t].map((i,y)=>(0,e.jsx)(p.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:i,shape:s,isTab:r})},`${i?.title||""}${y}`))})})})]}),n&&n?.items.length>0?(0,e.jsx)(p.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(p.CarouselContent,{className:"flex",children:n.items.map((i,y)=>(0,e.jsx)(p.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:i,shape:s,isTab:r})},y))})}):null]})},a))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(c.Grid,{className:"w-full",children:[d.map((t,a)=>(0,e.jsx)(c.GridItem,{span:k(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(b,{item:t,shape:s})},`${t?.title||""}${a}`)),d.map((t,a)=>(0,e.jsx)(c.GridItem,{span:k("full"),className:"laptop:hidden block",children:(0,e.jsx)(b,{item:t,shape:s})},`${t?.title||""}${a}`))]}),n&&n?.items.length>0?(0,e.jsx)(p.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(p.CarouselContent,{className:"flex",children:n.items.map((t,a)=>(0,e.jsx)(p.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:t,shape:s})},`${t?.title||""}${a}`))})}):null]})]})});var Q=(0,w.withStyles)(H);
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 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 { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport type { Shape } from '../../types/props'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nconst ItemBlock = ({\n item,\n shape = 'square',\n isTab = false,\n}: { item: Item } & { shape?: Shape } & { isTab?: boolean }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton } = 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 group relative box-border w-full overflow-hidden',\n {\n 'rounded-2xl': shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !isTab,\n 'h-[400px]': isMobile && isTab,\n },\n `text-info-primary`\n )}\n >\n <Picture\n source={imageUrl?.url}\n className=\"inset-0 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 <div className=\"laptop:p-6 desktop:p-[32px] 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={3}\n className=\"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3\"\n html={description}\n />\n </div>\n <div className=\"flex gap-[16px]\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button className={lgButtonSize} variant=\"secondary\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button className={lgButtonSize} variant=\"primary\">\n {primaryButton.text}\n </Button>\n </a>\n )}\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 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 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 key={index} value={tabName!}>\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 <Grid className=\"w-full\">\n {tabItemsMaps[tabName].map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </GridItem>\n ))}\n {\n <GridItem className=\"laptop:hidden block\" span={12}>\n <Carousel className=\"\">\n <CarouselContent className=\"flex\">\n {tabItemsMaps[tabName].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} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\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 key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock item={item} shape={shape} />\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 ) : 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,GAqCM,IAAAI,EAAA,6BArCNC,EAAkB,oBAClBC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAAqB,oCACrBC,EAAwD,wCACxDC,EAA+B,oCAC/BC,EAAkB,gCAElBC,EAAmB,kCACnBC,EAAyD,oCACzD,MAAMC,EAAY,CAAC,CACjB,KAAAC,EACA,MAA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B,CAAuB",
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_carousel", "import_gird", "import_Title", "import_utils", "import_tabs", "ItemBlock", "item", "shape", "isTab", "isMobile", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "lgButtonSize", "Picture", "Button", "MultiLayoutGraphicBlock", "React", "props", "ref", "sectionTitle", "groupByTab", "items", "carousel", "getSpan", "width", "tabNames", "index", "arr", "tabItemsMaps", "tabName", "acc", "cur", "Title"]
4
+ "sourcesContent": ["import React, { useState, useEffect } 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 { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport type { Shape } from '../../types/props'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nconst ItemBlock = ({\n item,\n shape = 'square',\n isTab = false,\n}: { item: Item } & { shape?: Shape } & { isTab?: boolean }) => {\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 1024px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton } = 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 group relative box-border w-full overflow-hidden',\n {\n 'rounded-2xl': shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !isTab,\n 'h-[400px]': isMobile && isTab,\n },\n `text-info-primary`\n )}\n >\n <Picture\n source={imageUrl?.url}\n className=\"inset-0 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 <div className=\"laptop:p-6 desktop:p-[32px] 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={3}\n className=\"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-4\"\n html={description}\n />\n </div>\n <div className=\"flex gap-[16px]\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button className={lgButtonSize} variant=\"secondary\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button className={lgButtonSize} variant=\"primary\">\n {primaryButton.text}\n </Button>\n </a>\n )}\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 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 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 key={index} value={tabName!}>\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 <Grid className=\"w-full\">\n {tabItemsMaps[tabName].map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </GridItem>\n ))}\n {\n <GridItem className=\"laptop:hidden block\" span={12}>\n <Carousel className=\"\">\n <CarouselContent className=\"flex\">\n {tabItemsMaps[tabName].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} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\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 key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock item={item} shape={shape} />\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 ) : 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,GA0CM,IAAAI,EAAA,6BA1CNC,EAA2C,oBAC3CC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAAqB,oCACrBC,EAAwD,wCACxDC,EAA+B,oCAC/BC,EAAkB,gCAElBC,EAAmB,kCACnBC,EAAyD,oCACzD,MAAMC,EAAY,CAAC,CACjB,KAAAC,EACA,MAAAC,EAAQ,SACR,MAAAC,EAAQ,EACV,IAAgE,CAC9D,KAAM,CAACC,EAAUC,CAAW,KAAI,YAAS,EAAK,EACxCC,KAAa,iBAAc,CAAE,MAAO,qBAAsB,CAAC,KAEjE,aAAU,IAAM,CACdD,EAAYC,CAAU,CACxB,EAAG,CAACA,CAAU,CAAC,EAEf,KAAM,CAAE,MAAAC,EAAQ,QAAS,MAAAC,EAAO,YAAAC,EAAa,SAAAC,EAAU,cAAAC,EAAe,gBAAAC,CAAgB,EAAIX,EACpFY,EAAe,mFAErB,SACE,QAAC,OACC,aAAW,MACT,gEACA,CACE,cAAeX,IAAU,UACzB,YAAaK,IAAU,OACvB,YAAaH,GAAY,CAACD,EAC1B,YAAaC,GAAYD,CAC3B,EACA,mBACF,EAEA,oBAAC,EAAAW,QAAA,CACC,OAAQJ,GAAU,IAClB,UAA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EACE,MACN,GAxCgBA,CAyClB,CACD,GACH,KAEA,oBACE,qBAAC,QAAK,UAAU,SACb,UAAAL,EAAM,IAAI,CAACrB,EAAM0B,OAChB,OAAC,YAEC,KAAMH,EAAQvB,EAAK,OAAS,MAAM,EAClC,UAAU,sBAEV,mBAACD,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GAJhC,GAAGD,GAAM,OAAS,EAAE,GAAG0B,CAAK,EAKnC,CACD,EACAL,EAAM,IAAI,CAACrB,EAAM0B,OAChB,OAAC,YAA8C,KAAMH,EAAQ,MAAM,EAAG,UAAU,sBAC9E,mBAACxB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GADxB,GAAGD,GAAM,OAAS,EAAE,GAAG0B,CAAK,EAE3C,CACD,GACH,EACCJ,GAAYA,GAAU,MAAM,OAAS,KACpC,OAAC,YAAS,UAAU,mBAClB,mBAAC,mBAAgB,UAAU,OACxB,SAAAA,EAAS,MAAM,IAAI,CAACtB,EAAM0B,OACzB,OAAC,gBAEC,UAAU,qDAEV,mBAAC3B,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GAHhC,GAAGD,GAAM,OAAS,EAAE,GAAG0B,CAAK,EAInC,CACD,EACH,EACF,EACE,MACN,GAEJ,CAEJ,CAAC,EAED,IAAO1C,KAAQ,cAAW+B,CAAuB",
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_carousel", "import_gird", "import_Title", "import_utils", "import_tabs", "ItemBlock", "item", "shape", "isTab", "isMobile", "setIsMobile", "mediaQuery", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "lgButtonSize", "Picture", "Button", "MultiLayoutGraphicBlock", "React", "props", "ref", "sectionTitle", "groupByTab", "items", "carousel", "getSpan", "width", "tabNames", "index", "arr", "tabItemsMaps", "tabName", "acc", "cur", "Title"]
7
7
  }
@@ -0,0 +1 @@
1
+ export declare const isVideo: (mimeType?: string) => boolean;
@@ -0,0 +1,2 @@
1
+ "use strict";var e=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(t,i)=>{for(var o in i)e(t,o,{get:i[o],enumerable:!0})},g=(t,i,o,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of n(i))!a.call(t,s)&&s!==o&&e(t,s,{get:()=>i[s],enumerable:!(r=d(i,s))||r.enumerable});return t};var h=t=>g(e({},"__esModule",{value:!0}),t);var v={};c(v,{isVideo:()=>p});module.exports=h(v);const p=(t="")=>t?.startsWith("video/");
2
+ //# sourceMappingURL=mimeType.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/shared/mimeType.ts"],
4
+ "sourcesContent": ["export const isVideo = (mimeType: string = '') => mimeType?.startsWith('video/')\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAAO,MAAME,EAAU,CAACE,EAAmB,KAAOA,GAAU,WAAW,QAAQ",
6
+ "names": ["mimeType_exports", "__export", "isVideo", "__toCommonJS", "mimeType"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as u,jsx as t,jsxs as i}from"react/jsx-runtime";import"react";import{cn as n}from"../../helpers/utils.js";import l from"../../components/picture.js";import{withStyles as g}from"../../shared/Styles.js";import f from"../Title/index.js";import d from"./SwiperCategory.js";import c from"../../components/link.js";const h=(e,o)=>{const a=[];for(let r=0;r<e.length;r+=o)a.push(e.slice(r,r+o));return a},x=({data:e,configuration:o})=>i("div",{className:n("bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:"transition-all duration-300 group-hover:scale-110",children:t(c,{href:e?.link||"",children:t(l,{source:e?.image?.url||e?.image,className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),t("p",{className:"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold",children:e?.name})]}),b=({data:e,configuration:o})=>i("div",{className:n("bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden","hover:bg-info-white cursor-pointer px-3 py-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t(c,{href:e?.link||"",children:t(l,{className:"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})}),t("p",{className:"text-info-primary flex-1 truncate text-center text-sm font-semibold",children:e?.name})]},`${e?.name}`),y=({data:e,configuration:o})=>i("div",{className:n("aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:"transition-all duration-300 group-hover:scale-110",children:t(c,{href:e?.link||"",children:t(l,{className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})})}),t("p",{className:"tablet:text-lg text-info-primary text-center text-sm font-semibold",children:e?.name})]}),v=({data:e,configuration:o,index:a})=>i("div",{className:n("bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer p-4",a===0?"aspect-h-[252] row-span-2":"aspect-h-[120]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t(c,{href:e?.link||"",children:t(l,{source:e?.image?.url||e?.image,className:n("mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",a===0?"max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]")})}),t("p",{className:"text-info-primary line-clamp-2 text-center text-sm font-semibold",children:e?.name})]}),k=({data:e,configuration:o})=>t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((a,r)=>t(b,{data:a,configuration:o},r))}),N=({data:e,configuration:o})=>i(u,{children:[t("div",{className:"tablet:block hidden",children:t("div",{className:"mx-auto flex w-full gap-4",children:e?.map((a,r)=>t(y,{data:a,configuration:o},r))})}),t("div",{className:"tablet:hidden block",children:t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((a,r)=>t(v,{index:r,data:a,configuration:o},r))})})]}),w=e=>{const{data:o,buildData:a,className:r="",key:m}=e,s=o?.isShowSelect?o?.products:o?.productData,p=s?.length<=5;return i("div",{className:n("w-full",r,{"aiui-dark":o?.theme==="dark"}),children:[o?.title&&t(f,{data:{title:o?.title}}),p?t(N,{data:s,configuration:{shape:o?.shape}}):i(u,{children:[t("div",{className:"tablet:block hidden",children:t(d,{id:`Category${m}`,Slide:x,data:{list:s,configuration:{shape:o?.shape}}})}),t("div",{className:"tablet:hidden block",children:t(d,{id:`Category1${m}`,Slide:k,data:{list:h(s,6),configuration:{shape:o?.shape}}})})]})]})};var P=g(w);export{P as default};
1
+ "use client";import{Fragment as u,jsx as t,jsxs as i}from"react/jsx-runtime";import"react";import{cn as n}from"../../helpers/utils.js";import l from"../../components/picture.js";import{withStyles as g}from"../../shared/Styles.js";import f from"../Title/index.js";import d from"./SwiperCategory.js";import c from"../../components/link.js";const h=(e,o)=>{const a=[];for(let r=0;r<e.length;r+=o)a.push(e.slice(r,r+o));return a},x=({data:e,configuration:o})=>i("div",{className:n("bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:"transition-all duration-300 group-hover:scale-110",children:t(c,{href:e?.link||"",children:t(l,{source:e?.image?.url||e?.image,className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})})}),t("p",{className:"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold",children:e?.name})]}),b=({data:e,configuration:o})=>i("div",{className:n("bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden","hover:bg-info-white cursor-pointer px-3 py-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t(c,{href:e?.link||"",children:t(l,{className:"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})}),t("p",{className:"text-info-primary flex-1 truncate text-center text-sm font-semibold",children:e?.name})]},`${e?.name}`),y=({data:e,configuration:o})=>i("div",{className:n("aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden","laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:"transition-all duration-300 group-hover:scale-110",children:t(c,{href:e?.link||"",children:t(l,{className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})})}),t("p",{className:"tablet:text-lg text-info-primary text-center text-sm font-semibold",children:e?.name})]}),v=({data:e,configuration:o,index:a})=>i("div",{className:n("bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden","hover:bg-info-white cursor-pointer p-4",a===0?"aspect-h-[252] row-span-2":"aspect-h-[120]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t(c,{href:e?.link||"",children:t(l,{source:e?.image?.url||e?.image,className:n("mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",a===0?"max-h-[146px] overflow-hidden":"max-h-[72px] max-w-[72px]")})}),t("p",{className:"text-info-primary line-clamp-2 text-center text-sm font-semibold",children:e?.name})]}),k=({data:e,configuration:o})=>t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((a,r)=>t(b,{data:a,configuration:o},r))}),N=({data:e,configuration:o})=>i(u,{children:[t("div",{className:"tablet:block hidden",children:t("div",{className:"mx-auto flex w-full gap-4",children:e?.map((a,r)=>t(y,{data:a,configuration:o},r))})}),t("div",{className:"tablet:hidden block",children:t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((a,r)=>t(v,{index:r,data:a,configuration:o},r))})})]}),w=e=>{const{data:o,buildData:a,className:r="",key:m}=e,s=o?.isShowSelect?o?.products:o?.productData,p=s?.length<=5;return i("div",{className:n("w-full overflow-hidden",r,{"aiui-dark":o?.theme==="dark"}),children:[o?.title&&t(f,{data:{title:o?.title}}),p?t(N,{data:s,configuration:{shape:o?.shape}}):i(u,{children:[t("div",{className:"tablet:block hidden",children:t(d,{id:`Category${m}`,Slide:x,data:{list:s,configuration:{shape:o?.shape}}})}),t("div",{className:"tablet:hidden block",children:t(d,{id:`Category1${m}`,Slide:k,data:{list:h(s,6),configuration:{shape:o?.shape}}})}),t("div",{className:"h-7"})]})]})};var P=g(w);export{P as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Category/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport Link from '../../components/link.js'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: any\n name: string\n link?: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n link?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold\">\n {data?.name}\n </p>\n </div>\n )\n}\n\nconst SingleItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n key={`${data?.name}`}\n className={cn(\n 'bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden',\n 'hover:bg-info-white cursor-pointer px-3 py-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n className=\"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n <p className=\"text-info-primary flex-1 truncate text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore pc\u5C55\u793A\nconst SinglePcCategoryItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore mobile\u5C55\u793A\nconst SingleMobileCategoryItem = ({\n data,\n configuration,\n index,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer p-4',\n index === 0 ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className={cn(\n 'mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover',\n index === 0 ? 'max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]'\n )}\n />\n </Link>\n <p className=\"text-info-primary line-clamp-2 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// \u5176\u5B83\u54C1\u724Cmobile\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n )\n}\n\n// soundcore\u5C55\u793A\nconst SoundCoreCategoryItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <>\n <div className=\"tablet:block hidden\">\n <div className=\"mx-auto flex w-full gap-4\">\n {data?.map((item, index) => {\n return <SinglePcCategoryItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n <div className=\"tablet:hidden block\">\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleMobileCategoryItem key={index} index={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n </>\n )\n}\n\nconst Category: React.FC<CategoryProps> = props => {\n const { data, buildData, className = '', key } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = data?.isShowSelect ? data?.products : data?.productData\n const isSoundCore = currentData?.length <= 5\n return (\n <div className={cn('w-full', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {data?.title && <Title data={{ title: data?.title }} />}\n {isSoundCore ? (\n <SoundCoreCategoryItem data={currentData} configuration={{ shape: data?.shape }} />\n ) : (\n <>\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: currentData, configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(currentData, 6), configuration: { shape: data?.shape } }}\n />\n </div>\n </>\n )}\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
5
- "mappings": "aA8CI,OAiHA,YAAAA,EAxGM,OAAAC,EATN,QAAAC,MAAA,oBA7CJ,MAAkB,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAW,oBAClB,OAAOC,MAAe,sBACtB,OAAOC,MAAU,2BA6BjB,MAAMC,EAAa,CAACC,EAAYC,IAAiB,CAC/C,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAI,OAAQ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M,QAAU,MAAO,CAAC,EAC5E,UAAAA,GAAM,OAASd,EAACK,EAAA,CAAM,KAAM,CAAE,MAAOS,GAAM,KAAM,EAAG,EACpDe,EACC7B,EAACsB,EAAA,CAAsB,KAAMM,EAAa,cAAe,CAAE,MAAOd,GAAM,KAAM,EAAG,EAEjFb,EAAAF,EAAA,CACE,UAAAC,EAAC,OAAI,UAAU,sBACb,SAAAA,EAACM,EAAA,CACC,GAAI,WAAWqB,CAAG,GAClB,MAAOd,EACP,KAAM,CAAE,KAAMe,EAAa,cAAe,CAAE,MAAOd,GAAM,KAAM,CAAE,EACnE,EACF,EACAd,EAAC,OAAI,UAAU,sBACb,SAAAA,EAACM,EAAA,CACC,GAAI,YAAYqB,CAAG,GACnB,MAAOP,EACP,KAAM,CAAE,KAAMZ,EAAWoB,EAAa,CAAC,EAAG,cAAe,CAAE,MAAOd,GAAM,KAAM,CAAE,EAClF,EACF,GACF,GAEJ,CAEJ,EAEA,IAAOgB,EAAQ1B,EAAWmB,CAAQ",
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\nimport Link from '../../components/link.js'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: any\n name: string\n link?: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n link?: string\n theme?: 'light' | 'dark'\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n key?: string\n}\n\nconst chunkArray = (arr: any[], size: number) => {\n const chunks = []\n for (let i = 0; i < arr.length; i += size) {\n chunks.push(arr.slice(i, i + size))\n }\n return chunks\n}\n\nconst CategoryPcItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 group box-border flex size-full flex-col overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary box-border line-clamp-2 flex-1 text-center text-sm font-semibold\">\n {data?.name}\n </p>\n </div>\n )\n}\n\nconst SingleItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n key={`${data?.name}`}\n className={cn(\n 'bg-container-secondary-1 box-border max-h-[126px] w-full overflow-hidden',\n 'hover:bg-info-white cursor-pointer px-3 py-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n className=\"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n <p className=\"text-info-primary flex-1 truncate text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore pc\u5C55\u793A\nconst SinglePcCategoryItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'aspect-h-[240] bg-container-secondary-1 group box-border h-auto flex-1 shrink-0 overflow-hidden',\n 'laptop:p-6 desktop:p-8 hover:bg-info-white cursor-pointer p-4 duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Link href={data?.link || ''}>\n <Picture\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </Link>\n </div>\n <p className=\"tablet:text-lg text-info-primary text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore mobile\u5C55\u793A\nconst SingleMobileCategoryItem = ({\n data,\n configuration,\n index,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n}) => {\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden',\n 'hover:bg-info-white cursor-pointer p-4',\n index === 0 ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Link href={data?.link || ''}>\n <Picture\n source={data?.image?.url || data?.image}\n className={cn(\n 'mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover',\n index === 0 ? 'max-h-[146px] overflow-hidden' : 'max-h-[72px] max-w-[72px]'\n )}\n />\n </Link>\n <p className=\"text-info-primary line-clamp-2 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// \u5176\u5B83\u54C1\u724Cmobile\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n )\n}\n\n// soundcore\u5C55\u793A\nconst SoundCoreCategoryItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <>\n <div className=\"tablet:block hidden\">\n <div className=\"mx-auto flex w-full gap-4\">\n {data?.map((item, index) => {\n return <SinglePcCategoryItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n <div className=\"tablet:hidden block\">\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleMobileCategoryItem key={index} index={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n </>\n )\n}\n\nconst Category: React.FC<CategoryProps> = props => {\n const { data, buildData, className = '', key } = props\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = data?.isShowSelect ? data?.products : data?.productData\n const isSoundCore = currentData?.length <= 5\n return (\n <div className={cn('w-full overflow-hidden', className, { 'aiui-dark': data?.theme === 'dark' })}>\n {data?.title && <Title data={{ title: data?.title }} />}\n {isSoundCore ? (\n <SoundCoreCategoryItem data={currentData} configuration={{ shape: data?.shape }} />\n ) : (\n <>\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: currentData, configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"tablet:hidden block\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(currentData, 6), configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"h-7\" />\n </>\n )}\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
5
+ "mappings": "aA8CI,OAiHA,YAAAA,EAxGM,OAAAC,EATN,QAAAC,MAAA,oBA7CJ,MAAkB,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAW,oBAClB,OAAOC,MAAe,sBACtB,OAAOC,MAAU,2BA6BjB,MAAMC,EAAa,CAACC,EAAYC,IAAiB,CAC/C,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAI,OAAQG,GAAKF,EACnCC,EAAO,KAAKF,EAAI,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEpC,OAAOC,CACT,EAEME,EAAiB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAE1Cd,EAAC,OACC,UAAWC,EACT,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AAM,KAAM,EAAG,EAEjFb,EAAAF,EAAA,CACE,UAAAC,EAAC,OAAI,UAAU,sBACb,SAAAA,EAACM,EAAA,CACC,GAAI,WAAWqB,CAAG,GAClB,MAAOd,EACP,KAAM,CAAE,KAAMe,EAAa,cAAe,CAAE,MAAOd,GAAM,KAAM,CAAE,EACnE,EACF,EACAd,EAAC,OAAI,UAAU,sBACb,SAAAA,EAACM,EAAA,CACC,GAAI,YAAYqB,CAAG,GACnB,MAAOP,EACP,KAAM,CAAE,KAAMZ,EAAWoB,EAAa,CAAC,EAAG,cAAe,CAAE,MAAOd,GAAM,KAAM,CAAE,EAClF,EACF,EACAd,EAAC,OAAI,UAAU,MAAM,GACvB,GAEJ,CAEJ,EAEA,IAAO8B,EAAQ1B,EAAWmB,CAAQ",
6
6
  "names": ["Fragment", "jsx", "jsxs", "cn", "Picture", "withStyles", "Title", "SwiperBox", "Link", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "SingleItem", "SinglePcCategoryItem", "SingleMobileCategoryItem", "index", "CategoryMobileItem", "item", "SoundCoreCategoryItem", "Category", "props", "buildData", "className", "key", "currentData", "isSoundCore", "Category_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as d,jsx as e,jsxs as i}from"react/jsx-runtime";import{useRef as g,useEffect as v}from"react";import{cn as p}from"../../helpers/utils.js";import{withStyles as h}from"../../shared/Styles.js";import k from"../Slogan/index.js";import{Grid as w,GridItem as o}from"../../components/gird.js";import{Container as N}from"../../components/container.js";import x from"../BrandEquity/index.js";import S from"../MemberEquity/index.js";import M from"../Spacer/index.js";import C from"gsap";import{convertLexicalToHTML as n}from"@payloadcms/richtext-lexical/html";import{useMediaQuery as P}from"react-responsive";const l=({children:s,spaceY:r})=>{const a=P({query:"(max-width: 768px)"});return e(N,{spaceY:r,children:i(w,{children:[!a&&e(o,{span:1}),e(o,{span:a?12:10,children:s}),!a&&e(o,{span:1})]})})},R=({children:s,id:r,components:a})=>(v(()=>{const t=window.screen.height;C.timeline({scrollTrigger:{trigger:`#${r}`,start:"top top",end:`top+=${t*1.8}px bottom`,scrub:0}}).to(`#${r} .sticky-cover`,{opacity:1,duration:.3}).to(`#${r} .media-content`,{top:"100%",transform:"translate(-50%, -100%)",duration:1},"<")},[]),i("div",{id:r,className:"relative z-10 pb-10",children:[e(d,{children:s}),e(d,{children:a?.map(t=>{switch(t.blockType){case"ipc-brand-equity":return e("div",{className:"relative z-20 bg-transparent",children:e(l,{spaceY:"!my-0",children:e(x,{data:t,style:t?.style})})});case"ipc-member-equity":return e("div",{className:"relative z-20 w-full bg-transparent",children:e(l,{spaceY:"!my-0",children:e(S,{data:t,className:"w-full",style:t?.style})})});case"ipc-spacer":return e(M,{data:t,style:t?.style});default:return null}})})]})),z=({className:s="",id:r,data:{title:a,videoTitle:t,btnText:q,img:B,video:m,theme:c,shape:u,components:y}})=>{const f=g(null),b=typeof a=="string"?a:a&&n({data:a});return typeof t=="string"||t&&n({data:t}),i(R,{id:r,components:y,children:[e("div",{className:p("sticky-box absolute left-0 top-0 h-screen w-full",s,{"aiui-dark":c==="dark","rounded-box":u==="rounded"}),children:e("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2",children:e(l,{spaceY:"tablet:my-[32px] my-[24px] space-y-4",children:e(k,{className:"sticky-title",data:{title:b||"",theme:c}})})})}),e("div",{className:"sticky left-0 top-0 w-full",children:i("div",{className:p("media-cover","relative h-screen w-full","lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]"),children:[e("video",{ref:f,className:"size-full object-cover",src:m?.url,autoPlay:!0,muted:!0,loop:!0}),e("div",{className:"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)"}})]})})]})};var J=h(z);export{J as default};
1
+ "use client";import{Fragment as d,jsx as e,jsxs as i}from"react/jsx-runtime";import{useRef as g,useEffect as v}from"react";import{cn as n}from"../../helpers/utils.js";import{withStyles as h}from"../../shared/Styles.js";import k from"../Slogan/index.js";import{Grid as w,GridItem as o}from"../../components/gird.js";import{Container as N}from"../../components/container.js";import x from"../BrandEquity/index.js";import S from"../MemberEquity/index.js";import M from"../Spacer/index.js";import C from"gsap";import{convertLexicalToHTML as p}from"@payloadcms/richtext-lexical/html";import{useMediaQuery as P}from"react-responsive";const l=({children:s,spaceY:r})=>{const a=P({query:"(max-width: 768px)"});return e(N,{spaceY:r,children:i(w,{children:[!a&&e(o,{span:1}),e(o,{span:a?12:10,children:s}),!a&&e(o,{span:1})]})})},R=({children:s,id:r,components:a})=>(v(()=>{const t=window.screen.height;C.timeline({scrollTrigger:{trigger:`#${r}`,start:"top top",end:`top+=${t*1.8}px bottom`,scrub:0}}).to(`#${r} .sticky-cover`,{opacity:1,duration:.3}).to(`#${r} .media-content`,{top:"100%",transform:"translate(-50%, -100%)",duration:1},"<")},[]),i("div",{id:r,className:"relative z-10 pb-10",children:[e(d,{children:s}),e(d,{children:a?.map(t=>{switch(t.blockType){case"ipc-brand-equity":return e("div",{className:"relative z-20 bg-transparent",children:e(l,{spaceY:"!my-0",children:e(x,{data:t,style:t?.style})})});case"ipc-member-equity":return e("div",{className:"relative z-20 w-full bg-transparent",children:e(l,{spaceY:"!my-0",children:e(S,{data:t,className:"w-full",style:t?.style})})});case"ipc-spacer":return e(M,{data:t,style:t?.style});default:return null}})})]})),z=({className:s="",id:r,data:{title:a,videoTitle:t,btnText:q,img:B,video:m,theme:c,shape:u,components:y}})=>{const f=g(null),b=typeof a=="string"?a:a&&p({data:a});return typeof t=="string"||t&&p({data:t}),i(R,{id:r,components:y,children:[e("div",{className:n("sticky-box absolute left-0 top-0 h-screen w-full",s,{"aiui-dark":c==="dark","rounded-box":u==="rounded"}),children:e("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2",children:e(l,{spaceY:"tablet:my-[32px] my-[24px] space-y-4",children:e(k,{className:"sticky-title",data:{title:b||"",theme:c}})})})}),e("div",{className:"sticky left-0 top-0 w-full",children:i("div",{className:n("media-cover","relative h-screen w-full","lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]"),children:[e("video",{ref:f,className:"size-full object-cover",src:m?.url,autoPlay:!0,muted:!0,loop:!0,playsInline:!0}),e("div",{className:"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)"}})]})})]})};var J=h(z);export{J as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaPlayerSticky/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\n// import ScrollTrigger from 'gsap/ScrollTrigger'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\n\nconst SubContainer = ({ children, spaceY }: { children: React.ReactNode; spaceY?: string }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst StickyBox = ({\n children,\n id,\n components,\n}: {\n children: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n}) => {\n useEffect(() => {\n const height = window.screen.height\n\n gsap\n .timeline({\n scrollTrigger: {\n trigger: `#${id}`,\n start: 'top top',\n end: `top+=${height * 1.8}px bottom`,\n scrub: 0,\n },\n })\n .to(`#${id} .sticky-cover`, {\n opacity: 1,\n duration: 0.3,\n })\n .to(\n `#${id} .media-content`,\n {\n top: '100%',\n transform: 'translate(-50%, -100%)',\n duration: 1,\n },\n '<'\n )\n }, [])\n\n return (\n <div id={id} className=\"relative z-10 pb-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n}\n\nconst MediaPlayerSticky: React.FC<MediaPlayerBaseProps> = ({\n className = '',\n id,\n data: { title, videoTitle, btnText, img, video, theme, shape, components },\n}) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n\n const title_html = typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title })\n typeof videoTitle === 'string' ? videoTitle : videoTitle && convertLexicalToHTML({ data: videoTitle })\n\n return (\n <StickyBox id={id} components={components}>\n <div\n className={cn('sticky-box absolute left-0 top-0 h-screen w-full', className, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2\">\n <SubContainer spaceY=\"tablet:my-[32px] my-[24px] space-y-4\">\n <Slogan className=\"sticky-title\" data={{ title: title_html || '', theme }} />\n </SubContainer>\n </div>\n </div>\n <div className=\"sticky left-0 top-0 w-full\">\n <div\n className={cn(\n 'media-cover',\n 'relative h-screen w-full',\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n )}\n >\n <video ref={videoRef} className=\"size-full object-cover\" src={video?.url} autoPlay muted loop />\n <div\n className=\"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)',\n }}\n />\n </div>\n </div>\n </StickyBox>\n )\n}\n\nexport default withStyles(MediaPlayerSticky)\n"],
5
- "mappings": "aAoBM,OA+CA,YAAAA,EA9CgB,OAAAC,EADhB,QAAAC,MAAA,oBAnBN,OAA0B,UAAAC,EAAQ,aAAAC,MAAiB,QACnD,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAY,qBACnB,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAS,aAAAC,MAAiB,gCAC1B,OAAOC,MAAiB,0BACxB,OAAOC,MAAkB,2BACzB,OAAOC,MAAY,qBACnB,OAAOC,MAAU,OAEjB,OAAS,wBAAAC,MAA4B,oCACrC,OAAS,iBAAAC,MAAqB,mBAG9B,MAAMC,EAAe,CAAC,CAAE,SAAAC,EAAU,OAAAC,CAAO,IAAsD,CAC7F,MAAMC,EAAWJ,EAAc,CAAE,MAAO,oBAAqB,CAAC,EAC9D,OACE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,OAAO,IACX,CACF,CAAC,EACH,GACF,GAIEC,EAAoD,CAAC,CACzD,UAAAC,EAAY,GACZ,GAAAL,EACA,KAAM,CAAE,MAAAM,EAAO,WAAAC,EAAY,QAAAC,EAAS,IAAAC,EAAK,MAAAC,EAAO,MAAAC,EAAO,MAAAC,EAAO,WAAAX,CAAW,CAC3E,IAAM,CACJ,MAAMY,EAAWhC,EAAyB,IAAI,EAExCiC,EAAa,OAAOR,GAAU,SAAWA,EAAQA,GAASb,EAAqB,CAAE,KAAMa,CAAM,CAAC,EACpG,cAAOC,GAAe,UAAwBA,GAAcd,EAAqB,CAAE,KAAMc,CAAW,CAAC,EAGnG3B,EAACmB,EAAA,CAAU,GAAIC,EAAI,WAAYC,EAC7B,UAAAtB,EAAC,OACC,UAAWI,EAAG,mDAAoDsB,EAAW,CAC3E,YAAaM,IAAU,OACvB,cAAeC,IAAU,SAC3B,CAAC,EAED,SAAAjC,EAAC,OAAI,UAAU,wFACb,SAAAA,EAACgB,EAAA,CAAa,OAAO,uCACnB,SAAAhB,EAACM,EAAA,CAAO,UAAU,eAAe,KAAM,CAAE,MAAO6B,GAAc,GAAI,MAAAH,CAAM,EAAG,EAC7E,EACF,EACF,EACAhC,EAAC,OAAI,UAAU,6BACb,SAAAC,EAAC,OACC,UAAWG,EACT,cACA,2BACA,oNACF,EAEA,UAAAJ,EAAC,SAAM,IAAKkC,EAAU,UAAU,yBAAyB,IAAKH,GAAO,IAAK,SAAQ,GAAC,MAAK,GAAC,KAAI,GAAC,EAC9F/B,EAAC,OACC,UAAU,8DACV,MAAO,CACL,WAAY,+DACd,EACF,GACF,EACF,GACF,CAEJ,EAEA,IAAOoC,EAAQ/B,EAAWoB,CAAiB",
4
+ "sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\n// import ScrollTrigger from 'gsap/ScrollTrigger'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\n\nconst SubContainer = ({ children, spaceY }: { children: React.ReactNode; spaceY?: string }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst StickyBox = ({\n children,\n id,\n components,\n}: {\n children: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n}) => {\n useEffect(() => {\n const height = window.screen.height\n\n gsap\n .timeline({\n scrollTrigger: {\n trigger: `#${id}`,\n start: 'top top',\n end: `top+=${height * 1.8}px bottom`,\n scrub: 0,\n },\n })\n .to(`#${id} .sticky-cover`, {\n opacity: 1,\n duration: 0.3,\n })\n .to(\n `#${id} .media-content`,\n {\n top: '100%',\n transform: 'translate(-50%, -100%)',\n duration: 1,\n },\n '<'\n )\n }, [])\n\n return (\n <div id={id} className=\"relative z-10 pb-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"!my-0\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n}\n\nconst MediaPlayerSticky: React.FC<MediaPlayerBaseProps> = ({\n className = '',\n id,\n data: { title, videoTitle, btnText, img, video, theme, shape, components },\n}) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n\n const title_html = typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title })\n typeof videoTitle === 'string' ? videoTitle : videoTitle && convertLexicalToHTML({ data: videoTitle })\n\n return (\n <StickyBox id={id} components={components}>\n <div\n className={cn('sticky-box absolute left-0 top-0 h-screen w-full', className, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2\">\n <SubContainer spaceY=\"tablet:my-[32px] my-[24px] space-y-4\">\n <Slogan className=\"sticky-title\" data={{ title: title_html || '', theme }} />\n </SubContainer>\n </div>\n </div>\n <div className=\"sticky left-0 top-0 w-full\">\n <div\n className={cn(\n 'media-cover',\n 'relative h-screen w-full',\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n )}\n >\n <video ref={videoRef} className=\"size-full object-cover\" src={video?.url} autoPlay muted loop playsInline />\n <div\n className=\"sticky-cover absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #1D1D1F 100%)',\n }}\n />\n </div>\n </div>\n </StickyBox>\n )\n}\n\nexport default withStyles(MediaPlayerSticky)\n"],
5
+ "mappings": "aAoBM,OA+CA,YAAAA,EA9CgB,OAAAC,EADhB,QAAAC,MAAA,oBAnBN,OAA0B,UAAAC,EAAQ,aAAAC,MAAiB,QACnD,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,M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C,EAAU,UAAU,yBAAyB,IAAKH,GAAO,IAAK,SAAQ,GAAC,MAAK,GAAC,KAAI,GAAC,YAAW,GAAC,EAC1G/B,EAAC,OACC,UAAU,8DACV,MAAO,CACL,WAAY,+DACd,EACF,GACF,EACF,GACF,CAEJ,EAEA,IAAOoC,EAAQ/B,EAAWoB,CAAiB",
6
6
  "names": ["Fragment", "jsx", "jsxs", "useRef", "useEffect", "cn", "withStyles", "Slogan", "Grid", "GridItem", "Container", "BrandEquity", "MemberEquity", "Spacer", "gsap", "convertLexicalToHTML", "useMediaQuery", "SubContainer", "children", "spaceY", "isMobile", "StickyBox", "id", "components", "height", "componentData", "MediaPlayerSticky", "className", "title", "videoTitle", "btnText", "img", "video", "theme", "shape", "videoRef", "title_html", "MediaPlayerSticky_default"]
7
7
  }
@@ -1,10 +1,11 @@
1
- "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import"react";import{Button as i,Heading as g,Text as x}from"../../components/index.js";import{withStyles as f}from"../../shared/Styles.js";import{cn as l}from"../../helpers/utils.js";const v=({data:p,className:s=""})=>{const{title:r,description:n,backgroundImage:d,mobileBackgroundImage:m,primaryButton:t,secondaryButton:a,theme:c,shape:u}=p,b=()=>{},y=()=>{};return o("section",{"data-ui-component-id":"MemberEquity",className:l(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
- aspect-[390/480] overflow-hidden`,s,{"aiui-dark":c==="dark","rounded-box":u==="rounded"}),children:[e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:e("source",{src:d?.url,type:"video/mp4"})}),e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:e("source",{src:m?.url,type:"video/mp4"})}),e("div",{className:`
1
+ "use client";import{jsx as e,jsxs as i}from"react/jsx-runtime";import"react";import{Button as p,Heading as k,Picture as r,Text as h}from"../../components/index.js";import{withStyles as N}from"../../shared/Styles.js";import{cn as s}from"../../helpers/utils.js";import{isVideo as n}from"../../shared/mimeType.js";const B=({data:c,className:m=""})=>{const{title:d,description:u,backgroundImage:t,mobileBackgroundImage:a,primaryButton:o,secondaryButton:l,theme:b,shape:y,primaryButtonHandler:g,secondaryButtonHandler:f}=c,v=()=>{g?.()},x=()=>{f?.()};return i("section",{"data-ui-component-id":"MemberEquity",className:s(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
+ aspect-[390/480] overflow-hidden`,m,{"aiui-dark":b==="dark","rounded-box":y==="rounded"}),children:[n(t?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:e("source",{src:t?.url,type:"video/mp4"})}):e(r,{source:t?.url,alt:t?.alt,className:"tablet:block absolute inset-0 hidden size-full object-cover"}),n(a?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:e("source",{src:a?.url,type:"video/mp4"})}):e(r,{source:a?.url,alt:a?.alt,className:"tablet:hidden absolute inset-0 size-full object-cover"}),e("div",{className:`
3
3
  laptop:items-center
4
4
  absolute
5
- inset-0 flex w-full items-end
6
- `,children:o("div",{className:`
5
+ inset-0
6
+ flex w-full items-end py-[16px]
7
+ `,children:i("div",{className:`
7
8
  tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6
8
- desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-4 px-4
9
- `,children:[o("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[e(g,{as:"h2",size:3,className:"member-equity-title ",html:r}),e(x,{size:2,className:"member-equity-description",html:n})]}),o("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[a&&a.text&&e("a",{href:a.link,children:e(i,{variant:"secondary",onClick:y,className:l("member-equity-button-secondary"),children:a.text})}),t&&t.text&&e("a",{href:t.link,children:e(i,{variant:"primary",onClick:b,className:l("member-equity-button-primary"),children:t.text})})]})]})})]})};var C=f(v);export{C as default};
9
+ desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-6 px-4
10
+ `,children:[i("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[e(k,{as:"h2",size:3,className:"member-equity-title ",html:d}),e(h,{size:2,className:"member-equity-description",html:u})]}),i("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[l&&l.text&&e("a",{href:l.link,children:e(p,{variant:"secondary",onClick:x,className:s("member-equity-button-secondary"),children:l.text})}),o&&o.text&&e("a",{href:o.link,children:e(p,{variant:"primary",onClick:v,className:s("member-equity-button-primary"),children:o.text})})]})]})})]})};var E=N(B);export{E as default};
10
11
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MemberEquity/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Button, Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { MemberEquityProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\n\nconst MemberEquity: React.FC<MemberEquityProps> = ({ data, className = '' }) => {\n const { title, description, backgroundImage, mobileBackgroundImage, primaryButton, secondaryButton, theme, shape } =\n data\n const handleButtonPrimaryClick = () => {\n // \u6267\u884C\u4E3B\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n const handleButtonSecondaryClick = () => {\n // \u6267\u884C\u526F\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n return (\n <section\n data-ui-component-id=\"MemberEquity\"\n className={cn(\n `tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative\n aspect-[390/480] overflow-hidden`,\n className,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n }\n )}\n >\n <video autoPlay muted playsInline loop className=\"tablet:block absolute inset-0 hidden size-full object-cover\">\n <source src={backgroundImage?.url} type=\"video/mp4\" />\n </video>\n <video autoPlay muted playsInline loop className=\"tablet:hidden absolute inset-0 size-full object-cover\">\n <source src={mobileBackgroundImage?.url} type=\"video/mp4\" />\n </video>\n <div\n className={`\n laptop:items-center \n absolute\n inset-0 flex w-full items-end\n `}\n >\n <div\n className={`\n tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6\n desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-4 px-4\n `}\n >\n <div className=\"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2\">\n <Heading as=\"h2\" size={3} className={`member-equity-title `} html={title} />\n <Text size={2} className={`member-equity-description`} html={description} />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button\n variant=\"secondary\"\n onClick={handleButtonSecondaryClick}\n className={cn('member-equity-button-secondary')}\n >\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button\n variant=\"primary\"\n onClick={handleButtonPrimaryClick}\n className={cn('member-equity-button-primary')}\n >\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n </section>\n )\n}\n\nexport default withStyles(MemberEquity)\n"],
5
- "mappings": "aAgCQ,cAAAA,EAkBE,QAAAC,MAlBF,oBA/BR,MAAkB,QAClB,OAAS,UAAAC,EAAQ,WAAAC,EAAS,QAAAC,MAAY,4BACtC,OAAS,cAAAC,MAAkB,yBAE3B,OAAS,MAAAC,MAAU,y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EAAA,CACC,QAAQ,UACR,QAASgB,EACT,UAAWZ,EAAG,8BAA8B,EAE3C,SAAAQ,EAAc,KACjB,EACF,GAEJ,GACF,EACF,GACF,CAEJ,EAEA,IAAOM,EAAQf,EAAWE,CAAY",
6
- "names": ["jsx", "jsxs", "Button", "Heading", "Text", "withStyles", "cn", "MemberEquity", "data", "className", "title", "description", "backgroundImage", "mobileBackgroundImage", "primaryButton", "secondaryButton", "theme", "shape", "handleButtonPrimaryClick", "handleButtonSecondaryClick", "MemberEquity_default"]
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { MemberEquityProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\nimport { isVideo } from '../../shared/mimeType.js'\n\nconst MemberEquity: React.FC<MemberEquityProps> = ({ data, className = '' }) => {\n const {\n title,\n description,\n backgroundImage,\n mobileBackgroundImage,\n primaryButton,\n secondaryButton,\n theme,\n shape,\n primaryButtonHandler,\n secondaryButtonHandler,\n } = data\n const handleButtonPrimaryClick = () => {\n // \u6267\u884C\u4E3B\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n primaryButtonHandler?.()\n }\n\n const handleButtonSecondaryClick = () => {\n // \u6267\u884C\u526F\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n secondaryButtonHandler?.()\n }\n\n return (\n <section\n data-ui-component-id=\"MemberEquity\"\n className={cn(\n `tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative\n aspect-[390/480] overflow-hidden`,\n className,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n }\n )}\n >\n {isVideo(backgroundImage?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block absolute inset-0 hidden size-full object-cover\">\n <source src={backgroundImage?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={backgroundImage?.url}\n alt={backgroundImage?.alt}\n className=\"tablet:block absolute inset-0 hidden size-full object-cover\"\n />\n )}\n {isVideo(mobileBackgroundImage?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden absolute inset-0 size-full object-cover\">\n <source src={mobileBackgroundImage?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={mobileBackgroundImage?.url}\n alt={mobileBackgroundImage?.alt}\n className=\"tablet:hidden absolute inset-0 size-full object-cover\"\n />\n )}\n <div\n className={`\n laptop:items-center \n absolute\n inset-0\n flex w-full items-end py-[16px]\n `}\n >\n <div\n className={`\n tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6\n desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-6 px-4\n `}\n >\n <div className=\"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2\">\n <Heading as=\"h2\" size={3} className={`member-equity-title `} html={title} />\n <Text size={2} className={`member-equity-description`} html={description} />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button\n variant=\"secondary\"\n onClick={handleButtonSecondaryClick}\n className={cn('member-equity-button-secondary')}\n >\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button\n variant=\"primary\"\n onClick={handleButtonPrimaryClick}\n className={cn('member-equity-button-primary')}\n >\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n </section>\n )\n}\n\nexport default withStyles(MemberEquity)\n"],
5
+ "mappings": "aA8CU,cAAAA,EAkCA,QAAAC,MAlCA,oBA7CV,MAAkB,QAClB,OAAS,UAAAC,EAAQ,WAAAC,EAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC/C,OAAS,cAAAC,MAAkB,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KAAM,EAAG,UAAW,4BAA6B,KAAMQ,EAAa,GAC5E,EAEAZ,EAAC,OAAI,UAAU,mFACZ,UAAAgB,GAAmBA,EAAgB,MAClCjB,EAAC,KAAE,KAAMiB,EAAgB,KACvB,SAAAjB,EAACE,EAAA,CACC,QAAQ,YACR,QAASqB,EACT,UAAWhB,EAAG,gCAAgC,EAE7C,SAAAU,EAAgB,KACnB,EACF,EAEDD,GAAiBA,EAAc,MAC9BhB,EAAC,KAAE,KAAMgB,EAAc,KACrB,SAAAhB,EAACE,EAAA,CACC,QAAQ,UACR,QAASoB,EACT,UAAWf,EAAG,8BAA8B,EAE3C,SAAAS,EAAc,KACjB,EACF,GAEJ,GACF,EACF,GACF,CAEJ,EAEA,IAAOQ,EAAQlB,EAAWG,CAAY",
6
+ "names": ["jsx", "jsxs", "Button", "Heading", "Picture", "Text", "withStyles", "cn", "isVideo", "MemberEquity", "data", "className", "title", "description", "backgroundImage", "mobileBackgroundImage", "primaryButton", "secondaryButton", "theme", "shape", "primaryButtonHandler", "secondaryButtonHandler", "handleButtonPrimaryClick", "handleButtonSecondaryClick", "MemberEquity_default"]
7
7
  }
@@ -13,11 +13,13 @@ export interface MemberEquityProps extends ComponentCommonProps {
13
13
  text: string;
14
14
  link?: string;
15
15
  };
16
+ primaryButtonHandler?: () => void;
16
17
  /** 副按钮配置 */
17
18
  secondaryButton: {
18
19
  text: string;
19
20
  link?: string;
20
21
  };
22
+ secondaryButtonHandler?: () => void;
21
23
  /** 形状 */
22
24
  shape?: Shape;
23
25
  /** 主题 */
@@ -1,2 +1,2 @@
1
- import{Fragment as v,jsx as t,jsxs as o}from"react/jsx-runtime";import T from"react";import{useMediaQuery as w}from"react-responsive";import{withStyles as B}from"../../shared/Styles.js";import I from"../../components/picture.js";import g from"../../components/button.js";import{Heading as G}from"../../components/heading.js";import{Text as $}from"../../components/text.js";import{Carousel as k,CarouselContent as y,CarouselItem as N}from"../../components/carousel.js";import{Grid as C,GridItem as h}from"../../components/gird.js";import M from"../Title/index.js";import{cn as L}from"../../helpers/utils.js";import{Tabs as S,TabsList as P,TabsTrigger as R,TabsContent as z}from"../../components/tabs.js";const u=({item:x,shape:b="square",isTab:s=!1})=>{const d=w({query:"(max-width: 1024px)"}),{theme:n="light",title:c,description:r,imageUrl:p,primaryButton:i,secondaryButton:m}=x,e="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return o("div",{className:L("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":b==="rounded","aiui-dark":n==="dark","h-[480px]":d&&!s,"h-[400px]":d&&s},"text-info-primary"),children:[t(I,{source:p?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${p?.width}/${p?.height}`}}),o("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[o("div",{children:[t(G,{size:3,className:"item-title",html:c}),t($,{size:3,className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3",html:r})]}),o("div",{className:"flex gap-[16px]",children:[m&&m.text&&t("a",{href:m.link,children:t(g,{className:e,variant:"secondary",children:m.text})}),i&&i.text&&t("a",{href:i.link,children:t(g,{className:e,variant:"primary",children:i.text})})]})]})]})},q=T.forwardRef((x,b)=>{const{shape:s,sectionTitle:d,groupByTab:n=!1,items:c=[],carousel:r}=x.data,p=e=>{switch(e){case"full":return 12;case"half":return 6;case"one-third":return 4}},i=c.map(e=>e.tabName).filter(Boolean).filter((e,a,l)=>l.indexOf(e)===a),m=i.map(e=>({tabName:e,items:c.filter(a=>a.tabName===e)})).reduce((e,a)=>(e[a.tabName]=a.items,e),{});return o("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:b,className:"text-info-primary",children:[d&&t(M,{data:{title:d},className:"section-title"}),n?o(S,{shape:s,align:"left",defaultValue:i[0],children:[t(P,{children:i.map((e,a)=>t(R,{value:e,children:e},a))}),i.map((e,a)=>t(z,{value:e,className:"desktop:mt-[36px] mt-[24px] w-full",children:o(v,{children:[o(C,{className:"w-full",children:[m[e].map((l,f)=>t(h,{span:p(l.width??"full"),className:"laptop:block hidden",children:t(u,{item:l,shape:s,isTab:n})},`${l?.title||""}${f}`)),t(h,{className:"laptop:hidden block",span:12,children:t(k,{className:"",children:t(y,{className:"flex",children:m[e].map((l,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(u,{item:l,shape:s,isTab:n})},`${l?.title||""}${f}`))})})})]}),r&&r?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:r.items.map((l,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(u,{item:l,shape:s,isTab:n})},f))})}):null]})},a))]}):o(v,{children:[o(C,{className:"w-full",children:[c.map((e,a)=>t(h,{span:p(e.width??"full"),className:"laptop:block hidden",children:t(u,{item:e,shape:s})},`${e?.title||""}${a}`)),c.map((e,a)=>t(h,{span:p("full"),className:"laptop:hidden block",children:t(u,{item:e,shape:s})},`${e?.title||""}${a}`))]}),r&&r?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:r.items.map((e,a)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(u,{item:e,shape:s})},`${e?.title||""}${a}`))})}):null]})]})});var W=B(q);export{W as default};
1
+ import{Fragment as v,jsx as t,jsxs as o}from"react/jsx-runtime";import T,{useState as w,useEffect as I}from"react";import{useMediaQuery as B}from"react-responsive";import{withStyles as G}from"../../shared/Styles.js";import $ from"../../components/picture.js";import g from"../../components/button.js";import{Heading as M}from"../../components/heading.js";import{Text as L}from"../../components/text.js";import{Carousel as k,CarouselContent as y,CarouselItem as N}from"../../components/carousel.js";import{Grid as C,GridItem as h}from"../../components/gird.js";import S from"../Title/index.js";import{cn as P}from"../../helpers/utils.js";import{Tabs as R,TabsList as z,TabsTrigger as q,TabsContent as E}from"../../components/tabs.js";const c=({item:b,shape:x="square",isTab:l=!1})=>{const[u,p]=w(!1),r=B({query:"(max-width: 1024px)"});I(()=>{p(r)},[r]);const{theme:i="light",title:d,description:m,imageUrl:n,primaryButton:e,secondaryButton:a}=b,s="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return o("div",{className:P("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":x==="rounded","aiui-dark":i==="dark","h-[480px]":u&&!l,"h-[400px]":u&&l},"text-info-primary"),children:[t($,{source:n?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${n?.width}/${n?.height}`}}),o("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[o("div",{children:[t(M,{size:3,className:"item-title",html:d}),t(L,{size:3,className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-4",html:m})]}),o("div",{className:"flex gap-[16px]",children:[a&&a.text&&t("a",{href:a.link,children:t(g,{className:s,variant:"secondary",children:a.text})}),e&&e.text&&t("a",{href:e.link,children:t(g,{className:s,variant:"primary",children:e.text})})]})]})]})},H=T.forwardRef((b,x)=>{const{shape:l,sectionTitle:u,groupByTab:p=!1,items:r=[],carousel:i}=b.data,d=e=>{switch(e){case"full":return 12;case"half":return 6;case"one-third":return 4}},m=r.map(e=>e.tabName).filter(Boolean).filter((e,a,s)=>s.indexOf(e)===a),n=m.map(e=>({tabName:e,items:r.filter(a=>a.tabName===e)})).reduce((e,a)=>(e[a.tabName]=a.items,e),{});return o("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:x,className:"text-info-primary",children:[u&&t(S,{data:{title:u},className:"section-title"}),p?o(R,{shape:l,align:"left",defaultValue:m[0],children:[t(z,{children:m.map((e,a)=>t(q,{value:e,children:e},a))}),m.map((e,a)=>t(E,{value:e,className:"desktop:mt-[36px] mt-[24px] w-full",children:o(v,{children:[o(C,{className:"w-full",children:[n[e].map((s,f)=>t(h,{span:d(s.width??"full"),className:"laptop:block hidden",children:t(c,{item:s,shape:l,isTab:p})},`${s?.title||""}${f}`)),t(h,{className:"laptop:hidden block",span:12,children:t(k,{className:"",children:t(y,{className:"flex",children:n[e].map((s,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(c,{item:s,shape:l,isTab:p})},`${s?.title||""}${f}`))})})})]}),i&&i?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:i.items.map((s,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(c,{item:s,shape:l,isTab:p})},f))})}):null]})},a))]}):o(v,{children:[o(C,{className:"w-full",children:[r.map((e,a)=>t(h,{span:d(e.width??"full"),className:"laptop:block hidden",children:t(c,{item:e,shape:l})},`${e?.title||""}${a}`)),r.map((e,a)=>t(h,{span:d("full"),className:"laptop:hidden block",children:t(c,{item:e,shape:l})},`${e?.title||""}${a}`))]}),i&&i?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:i.items.map((e,a)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(c,{item:e,shape:l})},`${e?.title||""}${a}`))})}):null]})]})});var Y=G(H);export{Y as default};
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 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 { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport type { Shape } from '../../types/props'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nconst ItemBlock = ({\n item,\n shape = 'square',\n isTab = false,\n}: { item: Item } & { shape?: Shape } & { isTab?: boolean }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton } = 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 group relative box-border w-full overflow-hidden',\n {\n 'rounded-2xl': shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !isTab,\n 'h-[400px]': isMobile && isTab,\n },\n `text-info-primary`\n )}\n >\n <Picture\n source={imageUrl?.url}\n className=\"inset-0 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 <div className=\"laptop:p-6 desktop:p-[32px] 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={3}\n className=\"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3\"\n html={description}\n />\n </div>\n <div className=\"flex gap-[16px]\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button className={lgButtonSize} variant=\"secondary\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button className={lgButtonSize} variant=\"primary\">\n {primaryButton.text}\n </Button>\n </a>\n )}\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 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 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 key={index} value={tabName!}>\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 <Grid className=\"w-full\">\n {tabItemsMaps[tabName].map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </GridItem>\n ))}\n {\n <GridItem className=\"laptop:hidden block\" span={12}>\n <Carousel className=\"\">\n <CarouselContent className=\"flex\">\n {tabItemsMaps[tabName].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} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\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 key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock item={item} shape={shape} />\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 ) : null}\n </>\n )}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
- "mappings": "AAqCM,OAkFQ,YAAAA,EAlFR,OAAAC,EAOE,QAAAC,MAPF,oBArCN,OAAOC,MAAW,QAClB,OAAS,iBAAAC,MAAqB,mBAE9B,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,QAAAC,MAAY,2BACrB,OAAS,YAAAC,EAAU,mBAAAC,EAAiB,gBAAAC,MAAoB,+BACxD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAOC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,KAAMC,EAAM,MAAOC,EAAO,GADxB,GAAGD,GAAM,OAAS,EAAE,GAAGqB,CAAK,EAE3C,CACD,GACH,EACCJ,GAAYA,GAAU,MAAM,OAAS,EACpCtC,EAACS,EAAA,CAAS,UAAU,mBAClB,SAAAT,EAACU,EAAA,CAAgB,UAAU,OACxB,SAAA4B,EAAS,MAAM,IAAI,CAACjB,EAAMqB,IACzB1C,EAACW,EAAA,CAEC,UAAU,qDAEV,SAAAX,EAACoB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GAHhC,GAAGD,GAAM,OAAS,EAAE,GAAGqB,CAAK,EAInC,CACD,EACH,EACF,EACE,MACN,GAEJ,CAEJ,CAAC,EAED,IAAOM,EAAQ5C,EAAW4B,CAAuB",
6
- "names": ["Fragment", "jsx", "jsxs", "React", "useMediaQuery", "withStyles", "Picture", "Button", "Heading", "Text", "Carousel", "CarouselContent", "CarouselItem", "Grid", "GridItem", "Title", "cn", "Tabs", "TabsList", "TabsTrigger", "TabsContent", "ItemBlock", "item", "shape", "isTab", "isMobile", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "lgButtonSize", "MultiLayoutGraphicBlock", "props", "ref", "sectionTitle", "groupByTab", "items", "carousel", "getSpan", "width", "tabNames", "index", "arr", "tabItemsMaps", "tabName", "acc", "cur", "MultiLayoutGraphicBlock_default"]
4
+ "sourcesContent": ["import React, { useState, useEffect } 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 { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport type { Shape } from '../../types/props'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nconst ItemBlock = ({\n item,\n shape = 'square',\n isTab = false,\n}: { item: Item } & { shape?: Shape } & { isTab?: boolean }) => {\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 1024px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton } = 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 group relative box-border w-full overflow-hidden',\n {\n 'rounded-2xl': shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !isTab,\n 'h-[400px]': isMobile && isTab,\n },\n `text-info-primary`\n )}\n >\n <Picture\n source={imageUrl?.url}\n className=\"inset-0 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 <div className=\"laptop:p-6 desktop:p-[32px] 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={3}\n className=\"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-4\"\n html={description}\n />\n </div>\n <div className=\"flex gap-[16px]\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button className={lgButtonSize} variant=\"secondary\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button className={lgButtonSize} variant=\"primary\">\n {primaryButton.text}\n </Button>\n </a>\n )}\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 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 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 key={index} value={tabName!}>\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 <Grid className=\"w-full\">\n {tabItemsMaps[tabName].map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </GridItem>\n ))}\n {\n <GridItem className=\"laptop:hidden block\" span={12}>\n <Carousel className=\"\">\n <CarouselContent className=\"flex\">\n {tabItemsMaps[tabName].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} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\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 key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock item={item} shape={shape} />\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 ) : null}\n </>\n )}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
+ "mappings": "AA0CM,OAkFQ,YAAAA,EAlFR,OAAAC,EAOE,QAAAC,MAPF,oBA1CN,OAAOC,GAAS,YAAAC,EAAU,aAAAC,MAAiB,QAC3C,OAAS,iBAAAC,MAAqB,mBAE9B,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,QAAAC,MAAY,2BACrB,OAAS,YAAAC,EAAU,mBAAAC,EAAiB,gBAAAC,MAAoB,+BACxD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAOC,MAAW,oBAElB,OAAS,MAAAC,MAAU,yBACnB,OAAS,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EAAA,CAA8C,KAAM4B,EAAQ,MAAM,EAAG,UAAU,sBAC9E,SAAA3C,EAACsB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GADxB,GAAGD,GAAM,OAAS,EAAE,GAAGuB,CAAK,EAE3C,CACD,GACH,EACCJ,GAAYA,GAAU,MAAM,OAAS,EACpC1C,EAACW,EAAA,CAAS,UAAU,mBAClB,SAAAX,EAACY,EAAA,CAAgB,UAAU,OACxB,SAAA8B,EAAS,MAAM,IAAI,CAACnB,EAAMuB,IACzB9C,EAACa,EAAA,CAEC,UAAU,qDAEV,SAAAb,EAACsB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GAHhC,GAAGD,GAAM,OAAS,EAAE,GAAGuB,CAAK,EAInC,CACD,EACH,EACF,EACE,MACN,GAEJ,CAEJ,CAAC,EAED,IAAOM,EAAQ9C,EAAW8B,CAAuB",
6
+ "names": ["Fragment", "jsx", "jsxs", "React", "useState", "useEffect", "useMediaQuery", "withStyles", "Picture", "Button", "Heading", "Text", "Carousel", "CarouselContent", "CarouselItem", "Grid", "GridItem", "Title", "cn", "Tabs", "TabsList", "TabsTrigger", "TabsContent", "ItemBlock", "item", "shape", "isTab", "isMobile", "setIsMobile", "mediaQuery", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "lgButtonSize", "MultiLayoutGraphicBlock", "props", "ref", "sectionTitle", "groupByTab", "items", "carousel", "getSpan", "width", "tabNames", "index", "arr", "tabItemsMaps", "tabName", "acc", "cur", "MultiLayoutGraphicBlock_default"]
7
7
  }
@@ -0,0 +1 @@
1
+ export declare const isVideo: (mimeType?: string) => boolean;
@@ -0,0 +1,2 @@
1
+ const i=(t="")=>t?.startsWith("video/");export{i as isVideo};
2
+ //# sourceMappingURL=mimeType.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/shared/mimeType.ts"],
4
+ "sourcesContent": ["export const isVideo = (mimeType: string = '') => mimeType?.startsWith('video/')\n"],
5
+ "mappings": "AAAO,MAAMA,EAAU,CAACC,EAAmB,KAAOA,GAAU,WAAW,QAAQ",
6
+ "names": ["isVideo", "mimeType"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "0.0.27-alpha.104",
3
+ "version": "0.0.27-alpha.106",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",