@anker-in/headless-ui 0.0.27-alpha.50 → 0.0.27-alpha.52

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 (31) hide show
  1. package/dist/cjs/biz-components/Category/SwiperCategory.d.ts +16 -0
  2. package/dist/cjs/biz-components/Category/SwiperCategory.js +2 -0
  3. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +7 -0
  4. package/dist/cjs/biz-components/Category/index.js +1 -1
  5. package/dist/cjs/biz-components/Category/index.js.map +3 -3
  6. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  7. package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
  8. package/dist/cjs/biz-components/Slogan/index.js +1 -1
  9. package/dist/cjs/biz-components/Slogan/index.js.map +3 -3
  10. package/dist/cjs/biz-components/Slogan/types.d.ts +5 -1
  11. package/dist/cjs/biz-components/Slogan/types.js +1 -1
  12. package/dist/cjs/biz-components/Slogan/types.js.map +1 -1
  13. package/dist/cjs/components/drop-down.js +1 -1
  14. package/dist/cjs/components/drop-down.js.map +3 -3
  15. package/dist/cjs/stories/graphic.stories.js +1 -1
  16. package/dist/cjs/stories/graphic.stories.js.map +3 -3
  17. package/dist/esm/biz-components/Category/SwiperCategory.d.ts +16 -0
  18. package/dist/esm/biz-components/Category/SwiperCategory.js +2 -0
  19. package/dist/esm/biz-components/Category/SwiperCategory.js.map +7 -0
  20. package/dist/esm/biz-components/Category/index.js +1 -1
  21. package/dist/esm/biz-components/Category/index.js.map +3 -3
  22. package/dist/esm/biz-components/Graphic/index.js +1 -1
  23. package/dist/esm/biz-components/Graphic/index.js.map +3 -3
  24. package/dist/esm/biz-components/Slogan/index.js +1 -1
  25. package/dist/esm/biz-components/Slogan/index.js.map +3 -3
  26. package/dist/esm/biz-components/Slogan/types.d.ts +5 -1
  27. package/dist/esm/components/drop-down.js +1 -1
  28. package/dist/esm/components/drop-down.js.map +3 -3
  29. package/dist/esm/stories/graphic.stories.js +1 -1
  30. package/dist/esm/stories/graphic.stories.js.map +3 -3
  31. package/package.json +3 -1
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface SwiperBoxProps {
3
+ data: {
4
+ list: any[];
5
+ configuration?: any;
6
+ };
7
+ id: string;
8
+ className?: string;
9
+ breakpoints?: Record<number, Object>;
10
+ Slide: React.ComponentType<{
11
+ data: any;
12
+ configuration?: any;
13
+ }>;
14
+ }
15
+ declare const SwiperBox: React.ForwardRefExoticComponent<SwiperBoxProps & React.RefAttributes<HTMLDivElement>>;
16
+ export default SwiperBox;
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var w=Object.create;var t=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var g=(e,i)=>{for(var r in i)t(e,r,{get:i[r],enumerable:!0})},l=(e,i,r,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of m(i))!S.call(e,o)&&o!==r&&t(e,o,{get:()=>i[o],enumerable:!(s=c(i,o))||s.enumerable});return e};var x=(e,i,r)=>(r=e!=null?w(u(e)):{},l(i||!e||!e.__esModule?t(r,"default",{value:e,enumerable:!0}):r,e)),y=e=>l(t({},"__esModule",{value:!0}),e);var M={};g(M,{default:()=>B});module.exports=y(M);var n=require("react/jsx-runtime"),d=x(require("react")),b=require("../../helpers/utils.js"),p=require("swiper/react"),a=require("swiper/modules");const f=d.default.forwardRef(({data:e,Slide:i,id:r})=>(0,n.jsx)(p.Swiper,{freeMode:!0,mousewheel:{forceToAxis:!0},className:"!overflow-visible",modules:[a.FreeMode,a.Mousewheel,a.Pagination],breakpoints:{0:{spaceBetween:16,slidesPerView:1,freeMode:!1},374:{spaceBetween:16,freeMode:!1,slidesPerView:1},768:{spaceBetween:16,freeMode:!1,slidesPerView:6}},children:e?.list?.map((s,o)=>(0,n.jsx)(p.SwiperSlide,{className:"!flex !h-[unset]",children:(0,n.jsx)(i,{data:s,configuration:e?.configuration})},r+"SwiperSlide"+o))}));f.displayName="SwiperBox";var B=f;
2
+ //# sourceMappingURL=SwiperCategory.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/Category/SwiperCategory.tsx"],
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, Slide, id }) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n className=\"!overflow-visible\"\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 6,\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!flex !h-[unset]\">\n <Slide data={item} configuration={data?.configuration} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CU,IAAAI,EAAA,6BA7CVC,EAAkB,oBAClBC,EAAmB,kCACnBD,EAAoC,wBACpCE,EAAiD,0BAajD,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAAC,CAAG,OAElF,OAAC,UACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,UAAU,oBACV,QAAS,CAAC,WAAU,aAAY,YAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EAEC,SAAAF,GAAM,MAAM,IAAI,CAACG,EAAMC,OACtB,OAAC,eAA8C,UAAU,mBACvD,mBAACH,EAAA,CAAM,KAAME,EAAM,cAAeH,GAAM,cAAe,GADvCE,EAAK,cAAgBE,CAEvC,CACD,EACH,CAEH,EAEDN,EAAU,YAAc,YAExB,IAAON,EAAQM",
6
+ "names": ["SwiperCategory_exports", "__export", "SwiperCategory_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_modules", "SwiperBox", "React", "data", "Slide", "id", "item", "jIndex"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var g=Object.create;var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var y=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},n=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of x(t))!w.call(e,a)&&a!==r&&i(e,a,{get:()=>t[a],enumerable:!(s=u(t,a))||s.enumerable});return e};var l=(e,t,r)=>(r=e!=null?g(b(e)):{},n(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),h=e=>n(i({},"__esModule",{value:!0}),e);var N={};y(N,{default:()=>F});module.exports=h(N);var o=require("react/jsx-runtime"),k=require("react"),p=require("../../helpers/utils.js"),c=l(require("../../components/picture.js")),d=require("../../shared/Styles.js"),m=l(require("../Title/index.js")),f=l(require("../SwiperBox/index.js"));const C=({data:e,configuration:t})=>(0,o.jsxs)("div",{className:(0,p.cn)("box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]",t?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[(0,o.jsx)(c.default,{className:"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover",source:e?.image}),(0,o.jsx)("p",{className:"tablet:text-lg flex-1 text-center text-sm font-semibold",children:e?.name})]}),v=({data:e,buildData:t,className:r="",key:s})=>(0,o.jsxs)("div",{className:(0,p.cn)("w-full",r),children:[e?.title&&(0,o.jsx)(m.default,{data:{title:e?.title}}),(0,o.jsx)(f.default,{className:"!overflow-visible",id:"Category"+s,data:{list:e?.products,configuration:{shape:e?.shape}},Slide:C,breakpoints:{0:{spaceBetween:"12px",freeMode:!1,slidesPerView:1},374:{spaceBetween:"12px",freeMode:!1,slidesPerView:3.3},768:{spaceBetween:"16px",freeMode:!1,slidesPerView:6}}})]});var F=(0,d.withStyles)(v);
1
+ "use strict";"use client";var f=Object.create;var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var v=(e,r)=>{for(var o in r)i(e,o,{get:r[o],enumerable:!0})},p=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of x(r))!h.call(e,s)&&s!==o&&i(e,s,{get:()=>r[s],enumerable:!(a=g(r,s))||a.enumerable});return e};var c=(e,r,o)=>(o=e!=null?f(b(e)):{},p(r||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>p(i({},"__esModule",{value:!0}),e);var A={};v(A,{default:()=>E});module.exports=y(A);var t=require("react/jsx-runtime"),S=require("react"),l=require("../../helpers/utils.js"),n=c(require("../../components/picture.js")),m=require("../../shared/Styles.js"),u=c(require("../Title/index.js")),d=c(require("./SwiperCategory.js"));const F=(e,r)=>{const o=[];for(let a=0;a<e.length;a+=r)o.push(e.slice(a,a+r));return o},N=({data:e,configuration:r})=>(0,t.jsxs)("div",{className:(0,l.cn)("box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]",r?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[(0,t.jsx)(n.default,{className:"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover",source:e?.image}),(0,t.jsx)("p",{className:"tablet:text-lg flex-1 text-center text-sm font-semibold",children:e?.name})]}),C=({data:e,configuration:r})=>(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((o,a)=>(0,t.jsxs)("div",{className:(0,l.cn)("box-border max-h-[126px] w-full overflow-hidden bg-[#EAEAEC]","cursor-pointer px-3 py-4 hover:bg-[#FFFFFF]",r?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[(0,t.jsx)(n.default,{className:"mb-2 flex h-[74px] w-full items-center object-cover",source:o?.image}),(0,t.jsx)("p",{className:"flex-1 truncate text-center text-sm font-semibold",children:o?.name})]},`${o?.name}${a}`))}),w=({data:e,configuration:r})=>(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((o,a)=>(0,t.jsxs)("div",{className:(0,l.cn)("box-border flex w-[calc(20%-12px)] shrink-0 flex-col overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]",r?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[(0,t.jsx)(n.default,{className:"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover",source:o?.image}),(0,t.jsx)("p",{className:"tablet:text-lg flex-1 text-center text-sm font-semibold",children:o?.name})]},a))})}),(0,t.jsx)("div",{className:"tablet:hidden block",children:(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:e?.map((o,a)=>(0,t.jsxs)("div",{className:(0,l.cn)("box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden bg-[#EAEAEC]","cursor-pointer p-4 hover:bg-[#FFFFFF]",a===0?"row-span-2":"",r?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[(0,t.jsx)(n.default,{className:(0,l.cn)("mb-2 flex h-[74px] w-full items-center object-cover",a===0?"h-[140px]":"h-[74px]"),source:o?.image}),(0,t.jsx)("p",{className:"line-clamp-2 flex-1 text-center text-sm font-semibold",children:o?.name})]},a))})})]}),k=({data:e,buildData:r,className:o="",key:a})=>{const s=e?.products?.length<=5;return(0,t.jsxs)("div",{className:(0,l.cn)("w-full",o),children:[e?.title&&(0,t.jsx)(u.default,{data:{title:e?.title}}),s?(0,t.jsx)(w,{data:e?.products,configuration:{shape:e?.shape}}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"tablet:block hidden",children:(0,t.jsx)(d.default,{id:`Category${a}`,Slide:N,data:{list:e?.products,configuration:{shape:e?.shape}}})}),(0,t.jsx)("div",{className:"tablet:hidden block overflow-hidden",children:(0,t.jsx)(d.default,{id:`Category1${a}`,Slide:C,data:{list:F(e?.products,6),configuration:{shape:e?.shape}}})})]})]})};var E=(0,m.withStyles)(k);
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 '../SwiperBox/index.js'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: string\n name: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n data: {\n products: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n key?: string\n}\n\nconst CategoryItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture className=\"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover\" source={data?.image} />\n <p className=\"tablet:text-lg flex-1 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\nconst Category: React.FC<CategoryProps> = ({ data, buildData, className = '', key }) => {\n return (\n <div className={cn('w-full', className)}>\n {data?.title && <Title data={{ title: data?.title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Category' + key}\n data={{ list: data?.products, configuration: { shape: data?.shape } }}\n Slide={CategoryItem}\n breakpoints={{\n 0: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 3.3,\n },\n 768: {\n spaceBetween: '16px',\n freeMode: false,\n slidesPerView: 6,\n },\n }}\n />\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiCI,IAAAI,EAAA,6BAhCJC,EAAkB,iBAClBC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA2B,kCAC3BC,EAAkB,gCAClBC,EAAsB,oCAyBtB,MAAMC,EAAe,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,OAExC,QAAC,OACC,aAAW,MACT,+DACA,+DACAA,GAAe,QAAU,QAAU,iBAAmB,cACxD,EAEA,oBAAC,EAAAC,QAAA,CAAQ,UAAU,uEAAuE,OAAQF,GAAM,MAAO,KAC/G,OAAC,KAAE,UAAU,0DAA2D,SAAAA,GAAM,KAAK,GACrF,EAIEG,EAAoC,CAAC,CAAE,KAAAH,EAAM,UAAAI,EAAW,UAAAC,EAAY,GAAI,IAAAC,CAAI,OAE9E,QAAC,OAAI,aAAW,MAAG,SAAUD,CAAS,EACnC,UAAAL,GAAM,UAAS,OAAC,EAAAO,QAAA,CAAM,KAAM,CAAE,MAAOP,GAAM,KAAM,EAAG,KACrD,OAAC,EAAAQ,QAAA,CACC,UAAU,oBACV,GAAI,WAAaF,EACjB,KAAM,CAAE,KAAMN,GAAM,SAAU,cAAe,CAAE,MAAOA,GAAM,KAAM,CAAE,EACpE,MAAOD,EACP,YAAa,CACX,EAAG,CACD,aAAc,OACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,OACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,OACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EAIJ,IAAOT,KAAQ,cAAWa,CAAQ",
6
- "names": ["Category_exports", "__export", "Category_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperBox", "CategoryItem", "data", "configuration", "Picture", "Category", "buildData", "className", "key", "Title", "SwiperBox"]
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'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: string\n name: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n data: {\n products: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\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 'box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture className=\"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover\" source={data?.image} />\n <p className=\"tablet:text-lg flex-1 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\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 (\n <div\n key={`${item?.name}${index}`}\n className={cn(\n 'box-border max-h-[126px] w-full overflow-hidden bg-[#EAEAEC]',\n 'cursor-pointer px-3 py-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture className=\"mb-2 flex h-[74px] w-full items-center object-cover\" source={item?.image} />\n <p className=\"flex-1 truncate text-center text-sm font-semibold\">{item?.name}</p>\n </div>\n )\n })}\n </div>\n )\n}\n\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 (\n <div\n key={index}\n className={cn(\n 'box-border flex w-[calc(20%-12px)] shrink-0 flex-col overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture\n className=\"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover\"\n source={item?.image}\n />\n <p className=\"tablet:text-lg flex-1 text-center text-sm font-semibold\">{item?.name}</p>\n </div>\n )\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 (\n <div\n key={index}\n className={cn(\n 'box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden bg-[#EAEAEC]',\n 'cursor-pointer p-4 hover:bg-[#FFFFFF]',\n index === 0 ? 'row-span-2' : '',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture\n className={cn(\n 'mb-2 flex h-[74px] w-full items-center object-cover',\n index === 0 ? 'h-[140px]' : 'h-[74px]'\n )}\n source={item?.image}\n />\n <p className=\"line-clamp-2 flex-1 text-center text-sm font-semibold\">{item?.name}</p>\n </div>\n )\n })}\n </div>\n </div>\n </>\n )\n}\n\nconst Category: React.FC<CategoryProps> = ({ data, buildData, className = '', key }) => {\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const isSoundCore = data?.products?.length <= 5\n return (\n <div className={cn('w-full', className)}>\n {data?.title && <Title data={{ title: data?.title }} />}\n {isSoundCore ? (\n <SoundCoreCategoryItem data={data?.products} configuration={{ shape: data?.shape }} />\n ) : (\n <>\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: data?.products, configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"tablet:hidden block overflow-hidden\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(data?.products, 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,GAyCI,IAAAI,EAAA,6BAxCJC,EAAkB,iBAClBC,EAAmB,kCACnBC,EA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import_react", "import_utils", "import_picture", "import_Styles", "import_Title", "import_SwiperCategory", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "Picture", "CategoryMobileItem", "item", "index", "SoundCoreCategoryItem", "Category", "buildData", "className", "key", "isSoundCore", "Title", "SwiperBox"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var y=Object.create;var n=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var G=(t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of k(e))!P.call(t,l)&&l!==o&&n(t,l,{get:()=>e[l],enumerable:!(c=v(e,l))||c.enumerable});return t};var u=(t,e,o)=>(o=t!=null?y(N(t)):{},x(e||!t||!t.__esModule?n(o,"default",{value:t,enumerable:!0}):o,t)),I=t=>x(n({},"__esModule",{value:!0}),t);var w={};G(w,{default:()=>S});module.exports=I(w);var s=require("react/jsx-runtime"),m=u(require("react")),f=require("../../helpers/utils.js"),h=require("../../shared/Styles.js"),p=require("../../components/index.js"),d=require("../../components/index.js"),C=u(require("../Title/index.js"));const g=m.default.forwardRef(({data:t,shape:e,className:o,...c},l)=>{const a=t?.items?.length||0,b=(0,m.useMemo)(()=>{const i="basis-[296px]";let r="";return a===1&&(r="basis-[100%]"),a===2&&(r="tablet:basis-1/2"),a===3&&(r="laptop:basis-1/3"),a>3&&(r="laptop:basis-[288px] desktop:basis-[316px] lg-desktop:basis-[404px]"),`${i} ${r}`},[a]);return(0,s.jsxs)("div",{children:[t?.title&&(0,s.jsx)(C.default,{data:{title:t?.title}}),(0,s.jsx)(p.Carousel,{ref:l,opts:{align:"start"},className:o,children:(0,s.jsx)(m.default.Fragment,{children:(0,s.jsx)(p.CarouselContent,{children:t?.items?.map((i,r)=>(0,s.jsx)(p.CarouselItem,{className:(0,f.cn)("laptop:pl-4 h-[360px] shrink-0 pl-3",b),children:(0,s.jsxs)("div",{className:(0,f.cn)("relative h-full",{"rounded-xl overflow-hidden laptop:rounded-2xl":e==="round"}),children:[(0,s.jsx)(d.Picture,{className:"h-full ",imgClassName:"h-full object-cover",source:i?.imgUrl?.url}),(0,s.jsx)("div",{className:"laptop:p-6 absolute inset-0 z-[1] flex flex-col justify-end p-4",children:(0,s.jsx)(d.Text,{html:i?.title,style:{color:i?.textColor},className:"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium"})})]})},r+i?.title))})},".0")})]})});g.displayName="Graphic";var S=(0,h.withStyles)(g);
1
+ "use strict";"use client";var g=Object.create;var a=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var b=(t,e)=>{for(var l in e)a(t,l,{get:e[l],enumerable:!0})},d=(t,e,l,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!y.call(t,r)&&r!==l&&a(t,r,{get:()=>e[r],enumerable:!(m=v(e,r))||m.enumerable});return t};var x=(t,e,l)=>(l=t!=null?g(k(t)):{},d(e||!t||!t.__esModule?a(l,"default",{value:t,enumerable:!0}):l,t)),P=t=>d(a({},"__esModule",{value:!0}),t);var G={};b(G,{default:()=>w});module.exports=P(G);var o=require("react/jsx-runtime"),n=x(require("react")),c=require("../../helpers/utils.js"),f=require("../../shared/Styles.js"),s=require("../../components/index.js"),i=require("../../components/index.js"),h=x(require("../Title/index.js"));const u=n.default.forwardRef(({data:t,shape:e,className:l,...m},r)=>(0,o.jsxs)("div",{children:[t?.title&&(0,o.jsx)(h.default,{data:{title:t?.title}}),(0,o.jsx)(s.Carousel,{ref:r,opts:{align:"start"},className:l,children:(0,o.jsx)(n.default.Fragment,{children:(0,o.jsx)(s.CarouselContent,{children:t?.items?.map((p,C)=>(0,o.jsx)(s.CarouselItem,{className:"laptop:h-[384px] desktop:h-[480px] laptop:pl-4 h-[360px] flex-1 shrink-0 pl-3 md:basis-[296px]",children:(0,o.jsxs)("div",{className:(0,c.cn)("relative h-full",{"rounded-xl overflow-hidden laptop:rounded-2xl":e==="round"}),children:[(0,o.jsx)(i.Picture,{className:"h-full ",imgClassName:"h-full object-cover",source:p?.imgUrl?.url}),(0,o.jsx)("div",{className:"laptop:p-6 absolute bottom-0 z-[1] flex w-full flex-col p-4",children:(0,o.jsx)(i.Text,{html:p?.title,style:{color:p?.textColor},className:"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium"})})]})},C+p?.title))})},".0")})]}));u.displayName="Graphic";var w=(0,f.withStyles)(u);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Graphic/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useMemo } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/index.js'\nimport { Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport type { ComponentCommonProps, Img } from '../../types/props.js'\n\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: {\n imgUrl: Img\n title: string\n textColor?: string\n }[]\n }\n shape?: 'round' | 'square'\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, shape, className, ...props }, ref) => {\n const itemsLength = data?.items?.length || 0\n\n const itemStyle = useMemo(() => {\n const basisStyle = 'basis-[296px]'\n let breakPointStyle = ''\n if (itemsLength === 1) {\n breakPointStyle = 'basis-[100%]'\n }\n if (itemsLength === 2) {\n breakPointStyle = 'tablet:basis-1/2'\n }\n if (itemsLength === 3) {\n breakPointStyle = 'laptop:basis-1/3'\n }\n if (itemsLength > 3) {\n breakPointStyle = 'laptop:basis-[288px] desktop:basis-[316px] lg-desktop:basis-[404px]'\n }\n return `${basisStyle} ${breakPointStyle}`\n }, [itemsLength])\n\n return (\n <div>\n {data?.title && <Title data={{ title: data?.title }} />}\n <Carousel\n ref={ref}\n opts={{\n align: 'start',\n }}\n className={className}\n >\n <React.Fragment key=\".0\">\n <CarouselContent>\n {data?.items?.map((item, index) => (\n <CarouselItem key={index + item?.title} className={cn('laptop:pl-4 h-[360px] shrink-0 pl-3', itemStyle)}>\n <div\n className={cn('relative h-full', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: shape === 'round',\n })}\n >\n <Picture className=\"h-full \" imgClassName=\"h-full object-cover\" source={item?.imgUrl?.url} />\n <div className=\"laptop:p-6 absolute inset-0 z-[1] flex flex-col justify-end p-4\">\n <Text\n html={item?.title}\n style={{\n color: item?.textColor,\n }}\n className=\"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium\"\n />\n </div>\n </div>\n </CarouselItem>\n ))}\n </CarouselContent>\n </React.Fragment>\n </Carousel>\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withStyles(Graphic)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6CsB,IAAAI,EAAA,6BA5CtBC,EAA+B,oBAC/BC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAwD,qCACxDA,EAA8B,qCAC9BC,EAAkB,gCAgBlB,MAAMC,EAAU,EAAAC,QAAM,WAAyC,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAAQ,CAC5G,MAAMC,EAAcL,GAAM,OAAO,QAAU,EAErCM,KAAY,WAAQ,IAAM,CAC9B,MAAMC,EAAa,gBACnB,IAAIC,EAAkB,GACtB,OAAIH,IAAgB,IAClBG,EAAkB,gBAEhBH,IAAgB,IAClBG,EAAkB,oBAEhBH,IAAgB,IAClBG,EAAkB,oBAEhBH,EAAc,IAChBG,EAAkB,uEAEb,GAAGD,CAAU,IAAIC,CAAe,EACzC,EAAG,CAACH,CAAW,CAAC,EAEhB,SACE,QAAC,OACE,UAAAL,GAAM,UAAS,OAAC,EAAAS,QAAA,CAAM,KAAM,CAAE,MAAOT,GAAM,KAAM,EAAG,KACrD,OAAC,YACC,IAAKI,EACL,KAAM,CACJ,MAAO,OACT,EACA,UAAWF,EAEX,mBAAC,EAAAH,QAAM,SAAN,CACC,mBAAC,mBACE,SAAAC,GAAM,OAAO,IAAI,CAACU,EAAMC,OACvB,OAAC,gBAAuC,aAAW,MAAG,sCAAuCL,CAAS,EACpG,oBAAC,OACC,aAAW,MAAG,kBAAmB,CAC9B,gDAAkDL,IAAU,OAC/D,CAAC,EAED,oBAAC,WAAQ,UAAU,UAAU,aAAa,sBAAsB,OAAQS,GAAM,QAAQ,IAAK,KAC3F,OAAC,OAAI,UAAU,kEACb,mBAAC,QACC,KAAMA,GAAM,MACZ,MAAO,CACL,MAAOA,GAAM,SACf,EACA,UAAU,qKACZ,EACF,GACF,GAhBiBC,EAAQD,GAAM,KAiBjC,CACD,EACH,GAtBkB,IAuBpB,EACF,GACF,CAEJ,CAAC,EAEDZ,EAAQ,YAAc,UAEtB,IAAOR,KAAQ,cAAWQ,CAAO",
6
- "names": ["Graphic_exports", "__export", "Graphic_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "import_components", "import_Title", "Graphic", "React", "data", "shape", "className", "props", "ref", "itemsLength", "itemStyle", "basisStyle", "breakPointStyle", "Title", "item", "index"]
4
+ "sourcesContent": ["'use client'\nimport React, { useMemo } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/index.js'\nimport { Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport type { ComponentCommonProps, Img } from '../../types/props.js'\n\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: {\n imgUrl: Img\n title: string\n textColor?: string\n }[]\n }\n shape?: 'round' | 'square'\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, shape, className, ...props }, ref) => {\n return (\n <div>\n {data?.title && <Title data={{ title: data?.title }} />}\n <Carousel\n ref={ref}\n opts={{\n align: 'start',\n }}\n className={className}\n >\n <React.Fragment key=\".0\">\n <CarouselContent>\n {data?.items?.map((item, index) => (\n <CarouselItem\n key={index + item?.title}\n className=\"laptop:h-[384px] desktop:h-[480px] laptop:pl-4 h-[360px] flex-1 shrink-0 pl-3 md:basis-[296px]\"\n >\n <div\n className={cn('relative h-full', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: shape === 'round',\n })}\n >\n <Picture className=\"h-full \" imgClassName=\"h-full object-cover\" source={item?.imgUrl?.url} />\n <div className=\"laptop:p-6 absolute bottom-0 z-[1] flex w-full flex-col p-4\">\n <Text\n html={item?.title}\n style={{\n color: item?.textColor,\n }}\n className=\"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium\"\n />\n </div>\n </div>\n </CarouselItem>\n ))}\n </CarouselContent>\n </React.Fragment>\n </Carousel>\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withStyles(Graphic)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAyBsB,IAAAI,EAAA,6BAxBtBC,EAA+B,oBAC/BC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAwD,qCACxDA,EAA8B,qCAC9BC,EAAkB,gCAgBlB,MAAMC,EAAU,EAAAC,QAAM,WAAyC,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,OAElG,QAAC,OACE,UAAAJ,GAAM,UAAS,OAAC,EAAAK,QAAA,CAAM,KAAM,CAAE,MAAOL,GAAM,KAAM,EAAG,KACrD,OAAC,YACC,IAAKI,EACL,KAAM,CACJ,MAAO,OACT,EACA,UAAWF,EAEX,mBAAC,EAAAH,QAAM,SAAN,CACC,mBAAC,mBACE,SAAAC,GAAM,OAAO,IAAI,CAACM,EAAMC,OACvB,OAAC,gBAEC,UAAU,iGAEV,oBAAC,OACC,aAAW,MAAG,kBAAmB,CAC9B,gDAAkDN,IAAU,OAC/D,CAAC,EAED,oBAAC,WAAQ,UAAU,UAAU,aAAa,sBAAsB,OAAQK,GAAM,QAAQ,IAAK,KAC3F,OAAC,OAAI,UAAU,8DACb,mBAAC,QACC,KAAMA,GAAM,MACZ,MAAO,CACL,MAAOA,GAAM,SACf,EACA,UAAU,qKACZ,EACF,GACF,GAlBKC,EAAQD,GAAM,KAmBrB,CACD,EACH,GAzBkB,IA0BpB,EACF,GACF,CAEH,EAEDR,EAAQ,YAAc,UAEtB,IAAOR,KAAQ,cAAWQ,CAAO",
6
+ "names": ["Graphic_exports", "__export", "Graphic_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "import_components", "import_Title", "Graphic", "React", "data", "shape", "className", "props", "ref", "Title", "item", "index"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var c=Object.create;var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var D=(t,e)=>{for(var l in e)i(t,l,{get:e[l],enumerable:!0})},n=(t,e,l,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of w(e))!y.call(t,a)&&a!==l&&i(t,a,{get:()=>e[a],enumerable:!(s=u(e,a))||s.enumerable});return t};var h=(t,e,l)=>(l=t!=null?c(v(t)):{},n(e||!t||!t.__esModule?i(l,"default",{value:t,enumerable:!0}):l,t)),N=t=>n(i({},"__esModule",{value:!0}),t);var b={};D(b,{default:()=>S});module.exports=N(b);var p=require("react/jsx-runtime"),r=h(require("react")),f=require("../../helpers/utils.js"),o=require("../../components/index.js"),g=require("../../shared/Styles.js");const x=r.default.forwardRef(({data:t,className:e},l)=>{const{title:s,features:a}=t;return(0,p.jsxs)("div",{ref:l,className:(0,f.cn)("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex w-full flex-col items-start justify-center gap-[24px] text-center",e),children:[(0,p.jsx)(o.Heading,{as:"h2",size:2,weight:"bold",align:"left",className:"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]",children:s}),a&&a.length>0&&(0,p.jsx)("div",{className:"flex w-full max-w-[426px] flex-row items-stretch gap-3",children:a.slice(0,3).map((d,m)=>(0,p.jsxs)(r.default.Fragment,{children:[m>0&&(0,p.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),(0,p.jsx)("div",{className:"",children:(0,p.jsx)(o.Text,{align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]",html:d.title})})]},m))})]})});x.displayName="Slogan";var S=(0,g.withStyles)(x);
1
+ "use strict";"use client";var L=Object.create;var g=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var J=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Y(e))!B.call(t,s)&&s!==r&&g(t,s,{get:()=>e[s],enumerable:!(l=U(e,s))||l.enumerable});return t};var K=(t,e,r)=>(r=t!=null?L(q(t)):{},G(e||!t||!t.__esModule?g(r,"default",{value:t,enumerable:!0}):r,t)),O=t=>G(g({},"__esModule",{value:!0}),t);var W={};J(W,{default:()=>V});module.exports=O(W);var o=require("react/jsx-runtime"),n=K(require("react")),F=require("@gsap/react"),d=require("gsap"),b=require("gsap/SplitText"),x=require("gsap/ScrollTrigger"),D=require("../../helpers/utils.js"),h=require("../../components/index.js"),H=require("../../shared/Styles.js");d.gsap.registerPlugin(b.SplitText,x.ScrollTrigger);function Q(t=[],e=3){const r=[];for(let l=0;l<t.length;l+=e)r.push(t.slice(l,l+e));return r}const R=n.default.forwardRef(({data:t,className:e},r)=>{const{title:l,features:s=[],featureChunkSize:N=3}=t,[w,I]=n.default.useState(0),[P,v]=n.default.useState(!0),u=Q(s,N),y=u.length,p=s.length>N,A=p?[...u,u[0]]:u,S=40;n.default.useEffect(()=>{if(!p)return;const a=setInterval(()=>{I(i=>i+1),v(!0)},3e3);return()=>clearInterval(a)},[y,p]),n.default.useEffect(()=>{if(p)if(w===y){const a=setTimeout(()=>{v(!1),I(0)},500);return()=>clearTimeout(a)}else v(!0)},[w,y,p]);const f=(0,n.useRef)(null),m=(0,n.useRef)(null);return(0,F.useGSAP)(()=>{if(!f.current)return;m.current=new b.SplitText(f.current,{type:"words",wordsClass:"word"});const a=m.current.words;return d.gsap.set(a,{opacity:0}),x.ScrollTrigger.create({trigger:f.current,start:"top 80%",end:"top 50%",scrub:!0,onUpdate:i=>{const T=i.progress,c=a.length,C=1/c,E=.5;a.forEach((M,$)=>{const j=$/c*(1-E),z=C*(1+E);let k=(T-j)/z;k=Math.max(0,Math.min(k,1)),d.gsap.set(M,{opacity:k})})}}),()=>{m.current&&m.current.revert(),x.ScrollTrigger.getAll().forEach(i=>i.kill())}},[]),(0,o.jsxs)("div",{ref:r,className:(0,D.cn)("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary desktop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",e),children:[(0,o.jsx)(h.Heading,{ref:f,as:"h2",size:2,weight:"bold",align:"left",className:"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]",children:l}),s&&s.length>0&&(0,o.jsx)("div",{className:"relative w-full max-w-[500px] overflow-hidden",style:{height:`${S}px`},children:(0,o.jsx)("div",{className:(0,D.cn)(["flex flex-col",P?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${w*S}px)`},children:A.map((a,i)=>(0,o.jsx)("div",{className:"flex w-full flex-row items-stretch gap-3 overflow-hidden",style:{height:`${S}px`},children:a.map((T,c)=>(0,o.jsxs)(n.default.Fragment,{children:[c>0&&(0,o.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),(0,o.jsx)(h.Text,{align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]",html:T.title})]},c))},i))})})]})});R.displayName="Slogan";var V=(0,H.withStyles)(R);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Slogan/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className }, ref) => {\n const { title, features } = data\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className=\"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]\"\n >\n {title}\n </Heading>\n {features && features.length > 0 && (\n <div className=\"flex w-full max-w-[426px] flex-row items-stretch gap-3\">\n {features.slice(0, 3).map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]\" />}\n <div className=\"\">\n <Text\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </div>\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiBM,IAAAI,EAAA,6BAhBNC,EAAkB,oBAClBC,EAAmB,kCACnBC,EAA8B,qCAC9BC,EAA2B,kCAG3B,MAAMC,EAAS,EAAAC,QAAM,WAAwC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACzF,KAAM,CAAE,MAAAC,EAAO,SAAAC,CAAS,EAAIJ,EAC5B,SACE,QAAC,OACC,IAAKE,EACL,aAAW,MACT,mJACAD,CACF,EAEA,oBAAC,WACC,GAAG,KACH,KAAM,EACN,OAAQ,OACR,MAAO,OACP,UAAU,sHAET,SAAAE,EACH,EACCC,GAAYA,EAAS,OAAS,MAC7B,OAAC,OAAI,UAAU,yDACZ,SAAAA,EAAS,MAAM,EAAG,CAAC,EAAE,IAAI,CAACC,EAASC,OAClC,QAAC,EAAAP,QAAM,SAAN,CACE,UAAAO,EAAQ,MAAK,OAAC,OAAI,UAAU,wDAAwD,KACrF,OAAC,OAAI,UAAU,GACb,mBAAC,QACC,MAAM,OACN,GAAG,IACH,UAAU,8HACV,KAAMD,EAAQ,MAChB,EACF,IATmBC,CAUrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDR,EAAO,YAAc,SAErB,IAAOP,KAAQ,cAAWO,CAAM",
6
- "names": ["Slogan_exports", "__export", "Slogan_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_components", "import_Styles", "Slogan", "React", "data", "className", "ref", "title", "features", "feature", "index"]
4
+ "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/SplitText'\nimport { ScrollTrigger } from 'gsap/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\ngsap.registerPlugin(SplitText, ScrollTrigger)\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className }, ref) => {\n const { title, features = [], featureChunkSize = 3 } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const featuresGroups = chunkArray(features, featureChunkSize)\n const totalGroups = featuresGroups.length\n const needCarousel = features.length > featureChunkSize\n const displayGroups = needCarousel ? [...featuresGroups, featuresGroups[0]] : featuresGroups\n const groupHeight = 40\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n useGSAP(() => {\n if (!titleRef.current) return\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'top 80%',\n end: 'top 50%',\n scrub: true,\n onUpdate: self => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word, i) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n ScrollTrigger.getAll().forEach(t => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between text-info-primary desktop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n ref={titleRef}\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className=\"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]\"\n >\n {title}\n </Heading>\n {features && features.length > 0 && (\n <div className=\"relative w-full max-w-[500px] overflow-hidden\" style={{ height: `${groupHeight}px` }}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]' : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className=\"flex w-full flex-row items-stretch gap-3 overflow-hidden\"\n style={{ height: `${groupHeight}px` }}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]\" />}\n <Text\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmGM,IAAAI,EAAA,6BAlGNC,EAA8B,oBAC9BA,EAAwB,uBACxBC,EAAqB,gBACrBC,EAA0B,0BAC1BC,EAA8B,8BAC9BC,EAAmB,kCACnBC,EAA8B,qCAC9BC,EAA2B,kCAG3B,OAAK,eAAe,YAAW,eAAa,EAE5C,SAASC,EAAWC,EAA6B,CAAC,EAAGC,EAAe,EAAG,CACrE,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,GAAKF,EACrCC,EAAO,KAAKF,EAAM,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEtC,OAAOC,CACT,CAEA,MAAME,EAAS,EAAAC,QAAM,WAAwC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACzF,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAW,CAAC,EAAG,iBAAAC,EAAmB,CAAE,EAAIL,EACjD,CAACM,EAAYC,CAAa,EAAI,EAAAR,QAAM,SAAS,CAAC,EAC9C,CAACS,EAAiBC,CAAkB,EAAI,EAAAV,QAAM,SAAS,EAAI,EAC3DW,EAAiBjB,EAAWW,EAAUC,CAAgB,EACtDM,E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AAG,KAAK,IAAIA,EAAS,CAAC,CAAC,EAC1C,OAAK,IAAIH,EAAM,CAAE,QAAAG,CAAQ,CAAC,CAC5B,CAAC,CACH,CACF,CAAC,EACM,IAAM,CACXV,EAAkB,SAAWA,EAAkB,QAAQ,OAAO,EAC9D,gBAAc,OAAO,EAAE,QAAQW,GAAKA,EAAE,KAAK,CAAC,CAC9C,CACF,EAAG,CAAC,CAAC,KAGH,QAAC,OACC,IAAK3B,EACL,aAAW,MACT,wMACAD,CACF,EAEA,oBAAC,WACC,IAAKgB,EACL,GAAG,KACH,KAAM,EACN,OAAQ,OACR,MAAO,OACP,UAAU,sHAET,SAAAd,EACH,EACCC,GAAYA,EAAS,OAAS,MAC7B,OAAC,OAAI,UAAU,gDAAgD,MAAO,CAAE,OAAQ,GAAGU,CAAW,IAAK,EACjG,mBAAC,OACC,aAAW,MAAG,CACZ,gBACAN,EAAkB,mEAAqE,kBACzF,CAAC,EACD,MAAO,CACL,UAAW,eAAeF,EAAaQ,CAAW,KACpD,EAEC,SAAAD,EAAc,IAAI,CAACiB,EAAOC,OACzB,OAAC,OACC,UAAU,2DACV,MAAO,CAAE,OAAQ,GAAGjB,CAAW,IAAK,EAGnC,SAAAgB,EAAM,IAAI,CAACE,EAASC,OACnB,QAAC,EAAAlC,QAAM,SAAN,CACE,UAAAkC,EAAQ,MAAK,OAAC,OAAI,UAAU,wDAAwD,KACrF,OAAC,QACC,MAAM,OACN,GAAG,IACH,UAAU,8HACV,KAAMD,EAAQ,MAChB,IAPmBC,CAQrB,CACD,GAZIF,CAaP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDjC,EAAO,YAAc,SAErB,IAAOf,KAAQ,cAAWe,CAAM",
6
+ "names": ["Slogan_exports", "__export", "Slogan_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_components", "import_Styles", "chunkArray", "array", "size", "result", "i", "Slogan", "React", "data", "className", "ref", "title", "features", "featureChunkSize", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "timer", "handle", "titleRef", "splitTextInstance", "words", "self", "progress", "total", "interval", "overlap", "word", "start", "width", "opacity", "t", "group", "idx", "feature", "index"]
7
7
  }
@@ -11,7 +11,11 @@ export interface SloganProps {
11
11
  */
12
12
  title: string;
13
13
  /**
14
- * 特性列表,最多支持3
14
+ * 特性分组大小 默认为3
15
+ */
16
+ featureChunkSize?: number;
17
+ /**
18
+ * 特性列表
15
19
  */
16
20
  features?: Feature[];
17
21
  };
@@ -1,2 +1,2 @@
1
- "use strict";var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var o=(t,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!l.call(t,r)&&r!==s&&i(t,r,{get:()=>e[r],enumerable:!(a=n(e,r))||a.enumerable});return t};var c=t=>o(i({},"__esModule",{value:!0}),t);var f={};module.exports=c(f);
1
+ "use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var g=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!f.call(t,r)&&r!==n&&i(t,r,{get:()=>e[r],enumerable:!(a=s(e,r))||a.enumerable});return t};var l=t=>g(i({},"__esModule",{value:!0}),t);var o={};module.exports=l(o);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Slogan/types.ts"],
4
- "sourcesContent": ["export interface Feature {\n /**\n * \u7279\u6027\u6807\u9898\n */\n title: string\n}\n\nexport interface SloganProps {\n data: {\n /**\n * \u4E3B\u6807\u9898\n */\n title: string\n /**\n * \u7279\u6027\u5217\u8868\uFF0C\u6700\u591A\u652F\u63013\u4E2A\n */\n features?: Feature[]\n }\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n"],
4
+ "sourcesContent": ["export interface Feature {\n /**\n * \u7279\u6027\u6807\u9898\n */\n title: string\n}\n\nexport interface SloganProps {\n data: {\n /**\n * \u4E3B\u6807\u9898\n */\n title: string\n /**\n * \u7279\u6027\u5206\u7EC4\u5927\u5C0F \u9ED8\u8BA4\u4E3A3\n */\n featureChunkSize?: number\n /**\n * \u7279\u6027\u5217\u8868\n */\n features?: Feature[]\n }\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\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";"use client";var I=Object.create;var m=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var T=(e,o)=>{for(var n in o)m(e,n,{get:o[n],enumerable:!0})},v=(e,o,n,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of z(o))!E.call(e,s)&&s!==n&&m(e,s,{get:()=>o[s],enumerable:!(r=S(o,s))||r.enumerable});return e};var M=(e,o,n)=>(n=e!=null?I(k(e)):{},v(o||!e||!e.__esModule?m(n,"default",{value:e,enumerable:!0}):n,e)),W=e=>v(m({},"__esModule",{value:!0}),e);var L={};T(L,{DropdownMenu:()=>D,DropdownMenuCheckboxItem:()=>w,DropdownMenuContent:()=>l,DropdownMenuGroup:()=>h,DropdownMenuItem:()=>f,DropdownMenuLabel:()=>b,DropdownMenuPortal:()=>x,DropdownMenuRadioGroup:()=>C,DropdownMenuRadioItem:()=>R,DropdownMenuSeparator:()=>g,DropdownMenuShortcut:()=>y,DropdownMenuSub:()=>N,DropdownMenuSubContent:()=>u,DropdownMenuSubTrigger:()=>c,DropdownMenuTrigger:()=>P});module.exports=W(L);var a=require("react/jsx-runtime"),i=M(require("react")),t=M(require("@radix-ui/react-dropdown-menu")),p=require("@radix-ui/react-icons"),d=require("../helpers/index.js");const D=i.default.forwardRef(({children:e,...o})=>(0,a.jsx)(t.Root,{...o,children:e})),P=t.Trigger,h=t.Group,x=t.Portal,N=t.Sub,C=t.RadioGroup,c=i.default.forwardRef(({className:e,inset:o,children:n,...r},s)=>(0,a.jsxs)(t.SubTrigger,{ref:s,className:(0,d.cn)("focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",e),...r,children:[n,(0,a.jsx)(p.ChevronRightIcon,{className:"ml-auto"})]}));c.displayName=t.SubTrigger.displayName;const u=i.default.forwardRef(({className:e,...o},n)=>(0,a.jsx)(t.SubContent,{ref:n,className:(0,d.cn)("bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",e),...o}));u.displayName=t.SubContent.displayName;const l=i.default.forwardRef(({className:e,sideOffset:o=4,...n},r)=>(0,a.jsx)(t.Portal,{children:(0,a.jsx)(t.Content,{ref:r,sideOffset:o,className:(0,d.cn)("bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));l.displayName=t.Content.displayName;const f=i.default.forwardRef(({className:e,inset:o,...n},r)=>(0,a.jsx)(t.Item,{ref:r,className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",o&&"pl-8",e),...n}));f.displayName=t.Item.displayName;const w=i.default.forwardRef(({className:e,children:o,checked:n,...r},s)=>(0,a.jsxs)(t.CheckboxItem,{ref:s,className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[(0,a.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(t.ItemIndicator,{children:(0,a.jsx)(p.CheckIcon,{className:"size-4"})})}),o]}));w.displayName=t.CheckboxItem.displayName;const R=i.default.forwardRef(({className:e,children:o,...n},r)=>(0,a.jsxs)(t.RadioItem,{ref:r,className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,a.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(t.ItemIndicator,{children:(0,a.jsx)(p.CircleIcon,{className:"size-2 fill-current"})})}),o]}));R.displayName=t.RadioItem.displayName;const b=i.default.forwardRef(({className:e,inset:o,...n},r)=>(0,a.jsx)(t.Label,{ref:r,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",e),...n}));b.displayName=t.Label.displayName;const g=i.default.forwardRef(({className:e,...o},n)=>(0,a.jsx)(t.Separator,{ref:n,className:(0,d.cn)("bg-muted -mx-1 my-1 h-px",e),...o}));g.displayName=t.Separator.displayName;const y=({className:e,...o})=>(0,a.jsx)("span",{className:(0,d.cn)("ml-auto text-xs tracking-widest opacity-60",e),...o});y.displayName="DropdownMenuShortcut";
1
+ "use strict";"use client";var I=Object.create;var m=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var T=(e,o)=>{for(var t in o)m(e,t,{get:o[t],enumerable:!0})},v=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of z(o))!E.call(e,s)&&s!==t&&m(e,s,{get:()=>o[s],enumerable:!(r=S(o,s))||r.enumerable});return e};var M=(e,o,t)=>(t=e!=null?I(k(e)):{},v(o||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e)),W=e=>v(m({},"__esModule",{value:!0}),e);var L={};T(L,{DropdownMenu:()=>D,DropdownMenuCheckboxItem:()=>w,DropdownMenuContent:()=>u,DropdownMenuGroup:()=>h,DropdownMenuItem:()=>f,DropdownMenuLabel:()=>b,DropdownMenuPortal:()=>x,DropdownMenuRadioGroup:()=>C,DropdownMenuRadioItem:()=>R,DropdownMenuSeparator:()=>g,DropdownMenuShortcut:()=>y,DropdownMenuSub:()=>N,DropdownMenuSubContent:()=>l,DropdownMenuSubTrigger:()=>c,DropdownMenuTrigger:()=>P});module.exports=W(L);var a=require("react/jsx-runtime"),i=M(require("react")),n=M(require("@radix-ui/react-dropdown-menu")),p=require("@radix-ui/react-icons"),d=require("../helpers/index.js");const D=i.default.forwardRef(({children:e,...o},t)=>(0,a.jsx)(n.Root,{...o,children:e})),P=n.Trigger,h=n.Group,x=n.Portal,N=n.Sub,C=n.RadioGroup,c=i.default.forwardRef(({className:e,inset:o,children:t,...r},s)=>(0,a.jsxs)(n.SubTrigger,{ref:s,className:(0,d.cn)("focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",e),...r,children:[t,(0,a.jsx)(p.ChevronRightIcon,{className:"ml-auto"})]}));c.displayName=n.SubTrigger.displayName;const l=i.default.forwardRef(({className:e,...o},t)=>(0,a.jsx)(n.SubContent,{ref:t,className:(0,d.cn)("bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",e),...o}));l.displayName=n.SubContent.displayName;const u=i.default.forwardRef(({className:e,sideOffset:o=4,...t},r)=>(0,a.jsx)(n.Portal,{children:(0,a.jsx)(n.Content,{ref:r,sideOffset:o,className:(0,d.cn)("bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t})}));u.displayName=n.Content.displayName;const f=i.default.forwardRef(({className:e,inset:o,...t},r)=>(0,a.jsx)(n.Item,{ref:r,className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",o&&"pl-8",e),...t}));f.displayName=n.Item.displayName;const w=i.default.forwardRef(({className:e,children:o,checked:t,...r},s)=>(0,a.jsxs)(n.CheckboxItem,{ref:s,className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...r,children:[(0,a.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(n.ItemIndicator,{children:(0,a.jsx)(p.CheckIcon,{className:"size-4"})})}),o]}));w.displayName=n.CheckboxItem.displayName;const R=i.default.forwardRef(({className:e,children:o,...t},r)=>(0,a.jsxs)(n.RadioItem,{ref:r,className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[(0,a.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(n.ItemIndicator,{children:(0,a.jsx)(p.CircleIcon,{className:"size-2 fill-current"})})}),o]}));R.displayName=n.RadioItem.displayName;const b=i.default.forwardRef(({className:e,inset:o,...t},r)=>(0,a.jsx)(n.Label,{ref:r,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",e),...t}));b.displayName=n.Label.displayName;const g=i.default.forwardRef(({className:e,...o},t)=>(0,a.jsx)(n.Separator,{ref:t,className:(0,d.cn)("bg-muted -mx-1 my-1 h-px",e),...o}));g.displayName=n.Separator.displayName;const y=({className:e,...o})=>(0,a.jsx)("span",{className:(0,d.cn)("ml-auto text-xs tracking-widest opacity-60",e),...o});y.displayName="DropdownMenuShortcut";
2
2
  //# sourceMappingURL=drop-down.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/drop-down.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport React, { useState } from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from '@radix-ui/react-icons'\nimport { cn } from '../helpers/index.js'\n\nconst DropdownMenu = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>\n>(({ children, ...props }) => {\n return <DropdownMenuPrimitive.Root {...props}>{children}</DropdownMenuPrimitive.Root>\n})\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,EAAA,6BAAAC,EAAA,wBAAA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ACN,CACD,EACDlB,EAAkB,YAAca,EAAsB,MAAM,YAE5D,MAAMT,EAAwB,EAAAY,QAAM,WAGlC,CAAC,CAAE,UAAAG,EAAW,GAAGD,CAAM,EAAGG,OAC1B,OAACR,EAAsB,UAAtB,CAAgC,IAAKQ,EAAK,aAAW,MAAG,2BAA4BF,CAAS,EAAI,GAAGD,EAAO,CAC7G,EACDd,EAAsB,YAAcS,EAAsB,UAAU,YAEpE,MAAMR,EAAuB,CAAC,CAAE,UAAAc,EAAW,GAAGD,CAAM,OAC3C,OAAC,QAAK,aAAW,MAAG,6CAA8CC,CAAS,EAAI,GAAGD,EAAO,EAElGb,EAAqB,YAAc",
6
- "names": ["drop_down_exports", "__export", "DropdownMenu", "DropdownMenuCheckboxItem", "DropdownMenuContent", "DropdownMenuGroup", "DropdownMenuItem", "DropdownMenuLabel", "DropdownMenuPortal", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuSeparator", "DropdownMenuShortcut", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuTrigger", "__toCommonJS", "import_jsx_runtime", "import_react", "DropdownMenuPrimitive", "import_react_icons", "import_helpers", "React", "children", "props", "className", "inset", "ref", "sideOffset", "checked"]
4
+ "sourcesContent": ["'use client'\n\nimport React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from '@radix-ui/react-icons'\nimport { cn } from '../helpers/index.js'\n\nconst DropdownMenu = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>\n>(({ children, ...props }, ref) => {\n return <DropdownMenuPrimitive.Root {...props}>{children}</DropdownMenuPrimitive.Root>\n})\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,EAAA,6BAAAC,EAAA,wBAAAC,EAAA,sBAAAC,EAAA,qBAAAC,EAAA,sBAAAC,EAAA,uBAAAC,EAAA,2BAAAC,EAAA,0BAAAC,EAAA,0BAAAC,EAAA,yBAAAC,EAAA,oBAAAC,EAAA,2BAAAC,EAAA,2BAAAC,EAAA,wBAAAC,IAAA,eAAAC,EAAAjB,GAWS,IAAAkB,EAAA,6BATTC,EAAkB,oBAClBC,EAAuC,4CACvCC,EAAwD,iCACxDC,EAAmB,+BAEnB,MAAMpB,EAAe,EAAAqB,QAAM,WAGzB,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAM,EAAGC,OAClB,OAACN,EAAsB,KAAtB,CAA4B,GAAGK,EAAQ,SAAAD,EAAS,CACzD,EAEKR,EAAsBI,EAAsB,QAE5Cf,EAAoBe,EAAsB,MAE1CZ,EAAqBY,EAAsB,OAE3CP,EAAkBO,EAAsB,IAExCX,EAAyBW,EA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AAGL,EAEJ,oBAAC,QAAK,UAAU,4DACd,mBAACL,EAAsB,cAAtB,CACC,mBAAC,aAAU,UAAU,SAAS,EAChC,EACF,EACCI,GACH,CACD,EACDrB,EAAyB,YAAciB,EAAsB,aAAa,YAE1E,MAAMV,EAAwB,EAAAa,QAAM,WAGlC,CAAC,CAAE,UAAAI,EAAW,SAAAH,EAAU,GAAGC,CAAM,EAAGC,OACpC,QAACN,EAAsB,UAAtB,CACC,IAAKM,EACL,aAAW,MACT,uOACAC,CACF,EACC,GAAGF,EAEJ,oBAAC,QAAK,UAAU,4DACd,mBAACL,EAAsB,cAAtB,CACC,mBAAC,cAAW,UAAU,sBAAsB,EAC9C,EACF,EACCI,GACH,CACD,EACDd,EAAsB,YAAcU,EAAsB,UAAU,YAEpE,MAAMb,EAAoB,EAAAgB,QAAM,WAK9B,CAAC,CAAE,UAAAI,EAAW,MAAAC,EAAO,GAAGH,CAAM,EAAGC,OACjC,OAACN,EAAsB,MAAtB,CACC,IAAKM,EACL,aAAW,MAAG,oCAAqCE,GAAS,OAAQD,CAAS,EAC5E,GAAGF,EACN,CACD,EACDlB,EAAkB,YAAca,EAAsB,MAAM,YAE5D,MAAMT,EAAwB,EAAAY,QAAM,WAGlC,CAAC,CAAE,UAAAI,EAAW,GAAGF,CAAM,EAAGC,OAC1B,OAACN,EAAsB,UAAtB,CAAgC,IAAKM,EAAK,aAAW,MAAG,2BAA4BC,CAAS,EAAI,GAAGF,EAAO,CAC7G,EACDd,EAAsB,YAAcS,EAAsB,UAAU,YAEpE,MAAMR,EAAuB,CAAC,CAAE,UAAAe,EAAW,GAAGF,CAAM,OAC3C,OAAC,QAAK,aAAW,MAAG,6CAA8CE,CAAS,EAAI,GAAGF,EAAO,EAElGb,EAAqB,YAAc",
6
+ "names": ["drop_down_exports", "__export", "DropdownMenu", "DropdownMenuCheckboxItem", "DropdownMenuContent", "DropdownMenuGroup", "DropdownMenuItem", "DropdownMenuLabel", "DropdownMenuPortal", "DropdownMenuRadioGroup", "DropdownMenuRadioItem", "DropdownMenuSeparator", "DropdownMenuShortcut", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuTrigger", "__toCommonJS", "import_jsx_runtime", "import_react", "DropdownMenuPrimitive", "import_react_icons", "import_helpers", "React", "children", "props", "ref", "className", "inset", "sideOffset", "checked"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var c=Object.create;var s=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})},l=(e,t,r,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of m(t))!d.call(e,o)&&o!==r&&s(e,o,{get:()=>t[o],enumerable:!(p=f(t,o))||p.enumerable});return e};var u=(e,t,r)=>(r=e!=null?c(y(e)):{},l(t||!e||!e.__esModule?s(r,"default",{value:e,enumerable:!0}):r,e)),h=e=>l(s({},"__esModule",{value:!0}),e);var O={};g(O,{Default:()=>S,Round:()=>F,default:()=>U});module.exports=h(O);var a=require("react/jsx-runtime"),n=u(require("../biz-components/Graphic/index.js"));const b={title:"Biz-Components/Graphic",component:n.default,parameters:{layout:"fullscreen",docs:{description:{component:"\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/"}}},argTypes:{shape:{control:{type:"inline-radio"},options:["square","round"],description:"\u5706\u89D2",table:{defaultValue:{summary:"square"}}}},decorators:[e=>(0,a.jsx)("div",{style:{paddingTop:"2em"},children:(0,a.jsx)(e,{})})],tags:["autodocs"]};var U=b;const i=[{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"},{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"}],S={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:i.map(e=>({...e,imgUrl:{url:e.imgUrl,alt:e.title}}))}}},F={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:i.map(e=>({...e,imgUrl:{url:e.imgUrl,alt:e.title}}))},shape:"round"}};
1
+ "use strict";var n=Object.create;var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})},p=(e,t,r,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!d.call(e,o)&&o!==r&&s(e,o,{get:()=>t[o],enumerable:!(l=m(t,o))||l.enumerable});return e};var u=(e,t,r)=>(r=e!=null?n(y(e)):{},p(t||!e||!e.__esModule?s(r,"default",{value:e,enumerable:!0}):r,e)),h=e=>p(s({},"__esModule",{value:!0}),e);var O={};g(O,{Default:()=>S,Round:()=>F,default:()=>U});module.exports=h(O);var a=require("react/jsx-runtime"),c=u(require("../biz-components/Graphic/index.js"));const b={title:"Biz-Components/Graphic",component:c.default,parameters:{layout:"fullscreen",docs:{description:{component:"\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/"}}},argTypes:{shape:{control:{type:"inline-radio"},options:["square","round"],description:"\u5706\u89D2",table:{defaultValue:{summary:"square"}}}},decorators:[e=>(0,a.jsx)("div",{style:{paddingTop:"2em"},children:(0,a.jsx)(e,{})})],tags:["autodocs"]};var U=b;const i=[{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"},{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"}],S={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:i}}},F={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:i},shape:"round"}};
2
2
  //# sourceMappingURL=graphic.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/graphic.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Graphic from '../biz-components/Graphic/index.js'\n\nconst meta = {\n title: 'Biz-Components/Graphic',\n component: Graphic,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: '\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/',\n },\n },\n },\n argTypes: {\n shape: {\n control: {\n type: 'inline-radio',\n },\n options: ['square', 'round'],\n description: '\u5706\u89D2',\n table: {\n defaultValue: {\n summary: 'square',\n },\n },\n },\n },\n decorators: [\n Story => (\n <div style={{ paddingTop: '2em' }}>\n <Story />\n </div>\n ),\n ],\n tags: ['autodocs'],\n} satisfies Meta<typeof Graphic>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n]\n\nexport const Default: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems.map(item => ({\n ...item,\n imgUrl: {\n url: item.imgUrl,\n alt: item.title,\n },\n })),\n },\n },\n}\n\nexport const Round: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems.map(item => ({\n ...item,\n imgUrl: {\n url: item.imgUrl,\n alt: item.title,\n },\n })),\n },\n shape: 'round',\n },\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GA+BQ,IAAAM,EAAA,6BA9BRC,EAAoB,iDAEpB,MAAMC,EAAO,CACX,MAAO,yBACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,SAAU,CACR,MAAO,CACL,QAAS,CACP,KAAM,cACR,EACA,QAAS,CAAC,SAAU,OAAO,EAC3B,YAAa,eACb,MAAO,CACL,aAAc,CACZ,QAAS,QACX,CACF,CACF,CACF,EACA,WAAY,CACVC,MACE,OAAC,OAAI,MAAO,CAAE,WAAY,KAAM,EAC9B,mBAACA,EAAA,EAAM,EACT,CAEJ,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAON,EAAQI,EAGf,MAAMG,EAAY,CAChB,CACE,OAAQ,2FACR,MAAO,wEACT,EACA,CACE,OAAQ,2FACR,MAAO,yEACP,UAAW,MACb,EACA,CACE,OAAQ,2FACR,MAAO,wEACT,EACA,CACE,OAAQ,2FACR,MAAO,yEACP,UAAW,MACb,CACF,EAEaT,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOS,EAAU,IAAIC,IAAS,CAC5B,GAAGA,EACH,OAAQ,CACN,IAAKA,EAAK,OACV,IAAKA,EAAK,KACZ,CACF,EAAE,CACJ,CACF,CACF,EAEaT,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOQ,EAAU,IAAIC,IAAS,CAC5B,GAAGA,EACH,OAAQ,CACN,IAAKA,EAAK,OACV,IAAKA,EAAK,KACZ,CACF,EAAE,CACJ,EACA,MAAO,OACT,CACF",
6
- "names": ["graphic_stories_exports", "__export", "Default", "Round", "graphic_stories_default", "__toCommonJS", "import_jsx_runtime", "import_Graphic", "meta", "Graphic", "Story", "mockItems", "item"]
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Graphic from '../biz-components/Graphic/index.js'\n\nconst meta = {\n title: 'Biz-Components/Graphic',\n component: Graphic,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: '\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/',\n },\n },\n },\n argTypes: {\n shape: {\n control: {\n type: 'inline-radio',\n },\n options: ['square', 'round'],\n description: '\u5706\u89D2',\n table: {\n defaultValue: {\n summary: 'square',\n },\n },\n },\n },\n decorators: [\n Story => (\n <div style={{ paddingTop: '2em' }}>\n <Story />\n </div>\n ),\n ],\n tags: ['autodocs'],\n} satisfies Meta<typeof Graphic>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n]\n\nexport const Default: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems,\n },\n },\n}\n\nexport const Round: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems,\n },\n shape: 'round',\n },\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GA+BQ,IAAAM,EAAA,6BA9BRC,EAAoB,iDAEpB,MAAMC,EAAO,CACX,MAAO,yBACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,SAAU,CACR,MAAO,CACL,QAAS,CACP,KAAM,cACR,EACA,QAAS,CAAC,SAAU,OAAO,EAC3B,YAAa,eACb,MAAO,CACL,aAAc,CACZ,QAAS,QACX,CACF,CACF,CACF,EACA,WAAY,CACVC,MACE,OAAC,OAAI,MAAO,CAAE,WAAY,KAAM,EAC9B,mBAACA,EAAA,EAAM,EACT,CAEJ,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAON,EAAQI,EAGf,MAAMG,EAAY,CAChB,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,wEACT,EACA,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,yEACP,UAAW,MACb,EACA,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,wEACT,EACA,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,yEACP,UAAW,MACb,CACF,EAEaT,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOS,CACT,CACF,CACF,EAEaR,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOQ,CACT,EACA,MAAO,OACT,CACF",
6
+ "names": ["graphic_stories_exports", "__export", "Default", "Round", "graphic_stories_default", "__toCommonJS", "import_jsx_runtime", "import_Graphic", "meta", "Graphic", "Story", "mockItems"]
7
7
  }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface SwiperBoxProps {
3
+ data: {
4
+ list: any[];
5
+ configuration?: any;
6
+ };
7
+ id: string;
8
+ className?: string;
9
+ breakpoints?: Record<number, Object>;
10
+ Slide: React.ComponentType<{
11
+ data: any;
12
+ configuration?: any;
13
+ }>;
14
+ }
15
+ declare const SwiperBox: React.ForwardRefExoticComponent<SwiperBoxProps & React.RefAttributes<HTMLDivElement>>;
16
+ export default SwiperBox;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import n from"react";import"../../helpers/utils.js";import{Swiper as p,SwiperSlide as l}from"swiper/react";import{Pagination as f,FreeMode as d,Mousewheel as w}from"swiper/modules";const r=n.forwardRef(({data:i,Slide:o,id:a})=>e(p,{freeMode:!0,mousewheel:{forceToAxis:!0},className:"!overflow-visible",modules:[d,w,f],breakpoints:{0:{spaceBetween:16,slidesPerView:1,freeMode:!1},374:{spaceBetween:16,freeMode:!1,slidesPerView:1},768:{spaceBetween:16,freeMode:!1,slidesPerView:6}},children:i?.list?.map((s,t)=>e(l,{className:"!flex !h-[unset]",children:e(o,{data:s,configuration:i?.configuration})},a+"SwiperSlide"+t))}));r.displayName="SwiperBox";var x=r;export{x as default};
2
+ //# sourceMappingURL=SwiperCategory.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/Category/SwiperCategory.tsx"],
4
+ "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Pagination, FreeMode, Mousewheel } from 'swiper/modules'\n\nexport interface SwiperBoxProps {\n data: {\n list: any[]\n configuration?: any\n }\n id: string\n className?: string\n breakpoints?: Record<number, Object>\n Slide: React.ComponentType<{ data: any; configuration?: any }>\n}\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, Slide, id }) => {\n return (\n <Swiper\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n className=\"!overflow-visible\"\n modules={[FreeMode, Mousewheel, Pagination]}\n breakpoints={{\n 0: {\n spaceBetween: 16,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 6,\n },\n }}\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!flex !h-[unset]\">\n <Slide data={item} configuration={data?.configuration} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
+ "mappings": "aA8CU,cAAAA,MAAA,oBA7CV,OAAOC,MAAW,QAClB,MAAmB,yBACnB,OAAS,UAAAC,EAAQ,eAAAC,MAAmB,eACpC,OAAS,cAAAC,EAAY,YAAAC,EAAU,cAAAC,MAAkB,iBAajD,MAAMC,EAAYN,EAAM,WAA2C,CAAC,CAAE,KAAAO,EAAM,MAAAC,EAAO,GAAAC,CAAG,IAElFV,EAACE,EAAA,CACC,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,UAAU,oBACV,QAAS,CAACG,EAAUC,EAAYF,CAAU,EAC1C,YAAa,CACX,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EAEC,SAAAI,GAAM,MAAM,IAAI,CAACG,EAAMC,IACtBZ,EAACG,EAAA,CAA8C,UAAU,mBACvD,SAAAH,EAACS,EAAA,CAAM,KAAME,EAAM,cAAeH,GAAM,cAAe,GADvCE,EAAK,cAAgBE,CAEvC,CACD,EACH,CAEH,EAEDL,EAAU,YAAc,YAExB,IAAOM,EAAQN",
6
+ "names": ["jsx", "React", "Swiper", "SwiperSlide", "Pagination", "FreeMode", "Mousewheel", "SwiperBox", "data", "Slide", "id", "item", "jIndex", "SwiperCategory_default"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as t,jsxs as a}from"react/jsx-runtime";import"react";import{cn as o}from"../../helpers/utils.js";import l from"../../components/picture.js";import{withStyles as p}from"../../shared/Styles.js";import n from"../Title/index.js";import c from"../SwiperBox/index.js";const d=({data:e,configuration:r})=>a("div",{className:o("box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]",r?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[t(l,{className:"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover",source:e?.image}),t("p",{className:"tablet:text-lg flex-1 text-center text-sm font-semibold",children:e?.name})]}),m=({data:e,buildData:r,className:s="",key:i})=>a("div",{className:o("w-full",s),children:[e?.title&&t(n,{data:{title:e?.title}}),t(c,{className:"!overflow-visible",id:"Category"+i,data:{list:e?.products,configuration:{shape:e?.shape}},Slide:d,breakpoints:{0:{spaceBetween:"12px",freeMode:!1,slidesPerView:1},374:{spaceBetween:"12px",freeMode:!1,slidesPerView:3.3},768:{spaceBetween:"16px",freeMode:!1,slidesPerView:6}}})]});var h=p(m);export{h as default};
1
+ "use client";import{Fragment as c,jsx as t,jsxs as s}from"react/jsx-runtime";import"react";import{cn as l}from"../../helpers/utils.js";import n from"../../components/picture.js";import{withStyles as p}from"../../shared/Styles.js";import m from"../Title/index.js";import i from"./SwiperCategory.js";const u=(e,a)=>{const r=[];for(let o=0;o<e.length;o+=a)r.push(e.slice(o,o+a));return r},f=({data:e,configuration:a})=>s("div",{className:l("box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]",a?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[t(n,{className:"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover",source:e?.image}),t("p",{className:"tablet:text-lg flex-1 text-center text-sm font-semibold",children:e?.name})]}),g=({data:e,configuration:a})=>t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((r,o)=>s("div",{className:l("box-border max-h-[126px] w-full overflow-hidden bg-[#EAEAEC]","cursor-pointer px-3 py-4 hover:bg-[#FFFFFF]",a?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[t(n,{className:"mb-2 flex h-[74px] w-full items-center object-cover",source:r?.image}),t("p",{className:"flex-1 truncate text-center text-sm font-semibold",children:r?.name})]},`${r?.name}${o}`))}),x=({data:e,configuration:a})=>s(c,{children:[t("div",{className:"tablet:block hidden",children:t("div",{className:"mx-auto flex w-full gap-4",children:e?.map((r,o)=>s("div",{className:l("box-border flex w-[calc(20%-12px)] shrink-0 flex-col overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]",a?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[t(n,{className:"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover",source:r?.image}),t("p",{className:"tablet:text-lg flex-1 text-center text-sm font-semibold",children:r?.name})]},o))})}),t("div",{className:"tablet:hidden block",children:t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((r,o)=>s("div",{className:l("box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden bg-[#EAEAEC]","cursor-pointer p-4 hover:bg-[#FFFFFF]",o===0?"row-span-2":"",a?.shape==="round"?"rounded-[16px]":"rounded-none"),children:[t(n,{className:l("mb-2 flex h-[74px] w-full items-center object-cover",o===0?"h-[140px]":"h-[74px]"),source:r?.image}),t("p",{className:"line-clamp-2 flex-1 text-center text-sm font-semibold",children:r?.name})]},o))})})]}),b=({data:e,buildData:a,className:r="",key:o})=>{const d=e?.products?.length<=5;return s("div",{className:l("w-full",r),children:[e?.title&&t(m,{data:{title:e?.title}}),d?t(x,{data:e?.products,configuration:{shape:e?.shape}}):s(c,{children:[t("div",{className:"tablet:block hidden",children:t(i,{id:`Category${o}`,Slide:f,data:{list:e?.products,configuration:{shape:e?.shape}}})}),t("div",{className:"tablet:hidden block overflow-hidden",children:t(i,{id:`Category1${o}`,Slide:g,data:{list:u(e?.products,6),configuration:{shape:e?.shape}}})})]})]})};var k=p(b);export{k 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 '../SwiperBox/index.js'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: string\n name: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n data: {\n products: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n key?: string\n}\n\nconst CategoryItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture className=\"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover\" source={data?.image} />\n <p className=\"tablet:text-lg flex-1 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\nconst Category: React.FC<CategoryProps> = ({ data, buildData, className = '', key }) => {\n return (\n <div className={cn('w-full', className)}>\n {data?.title && <Title data={{ title: data?.title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Category' + key}\n data={{ list: data?.products, configuration: { shape: data?.shape } }}\n Slide={CategoryItem}\n breakpoints={{\n 0: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 3.3,\n },\n 768: {\n spaceBetween: '16px',\n freeMode: false,\n slidesPerView: 6,\n },\n }}\n />\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
5
- "mappings": "aAiCI,OAOE,OAAAA,EAPF,QAAAC,MAAA,oBAhCJ,MAAkB,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAW,oBAClB,OAAOC,MAAe,wBAyBtB,MAAMC,EAAe,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAExCR,EAAC,OACC,UAAWC,EACT,+DACA,+DACAO,GAAe,QAAU,QAAU,iBAAmB,cACxD,EAEA,UAAAT,EAACG,EAAA,CAAQ,UAAU,uEAAuE,OAAQK,GAAM,MAAO,EAC/GR,EAAC,KAAE,UAAU,0DAA2D,SAAAQ,GAAM,KAAK,GACrF,EAIEE,EAAoC,CAAC,CAAE,KAAAF,EAAM,UAAAG,EAAW,UAAAC,EAAY,GAAI,IAAAC,CAAI,IAE9EZ,EAAC,OAAI,UAAWC,EAAG,SAAUU,CAAS,EACnC,UAAAJ,GAAM,OAASR,EAACK,EAAA,CAAM,KAAM,CAAE,MAAOG,GAAM,KAAM,EAAG,EACrDR,EAACM,EAAA,CACC,UAAU,oBACV,GAAI,WAAaO,EACjB,KAAM,CAAE,KAAML,GAAM,SAAU,cAAe,CAAE,MAAOA,GAAM,KAAM,CAAE,EACpE,MAAOD,EACP,YAAa,CACX,EAAG,CACD,aAAc,OACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,OACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,OACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EAIJ,IAAOO,EAAQV,EAAWM,CAAQ",
6
- "names": ["jsx", "jsxs", "cn", "Picture", "withStyles", "Title", "SwiperBox", "CategoryItem", "data", "configuration", "Category", "buildData", "className", "key", "Category_default"]
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'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: string\n name: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n data: {\n products: CategoryItem[]\n /** \u5361\u7247\u5F62\u72B6 */\n shape?: 'round' | 'square'\n title?: string\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 'box-border flex w-full flex-col overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture className=\"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover\" source={data?.image} />\n <p className=\"tablet:text-lg flex-1 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\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 (\n <div\n key={`${item?.name}${index}`}\n className={cn(\n 'box-border max-h-[126px] w-full overflow-hidden bg-[#EAEAEC]',\n 'cursor-pointer px-3 py-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture className=\"mb-2 flex h-[74px] w-full items-center object-cover\" source={item?.image} />\n <p className=\"flex-1 truncate text-center text-sm font-semibold\">{item?.name}</p>\n </div>\n )\n })}\n </div>\n )\n}\n\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 (\n <div\n key={index}\n className={cn(\n 'box-border flex w-[calc(20%-12px)] shrink-0 flex-col overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture\n className=\"tablet:h-[146px] mb-2 flex h-[74px] w-full items-center object-cover\"\n source={item?.image}\n />\n <p className=\"tablet:text-lg flex-1 text-center text-sm font-semibold\">{item?.name}</p>\n </div>\n )\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 (\n <div\n key={index}\n className={cn(\n 'box-border flex w-full shrink-0 flex-col items-center justify-center overflow-hidden bg-[#EAEAEC]',\n 'cursor-pointer p-4 hover:bg-[#FFFFFF]',\n index === 0 ? 'row-span-2' : '',\n configuration?.shape === 'round' ? 'rounded-[16px]' : 'rounded-none'\n )}\n >\n <Picture\n className={cn(\n 'mb-2 flex h-[74px] w-full items-center object-cover',\n index === 0 ? 'h-[140px]' : 'h-[74px]'\n )}\n source={item?.image}\n />\n <p className=\"line-clamp-2 flex-1 text-center text-sm font-semibold\">{item?.name}</p>\n </div>\n )\n })}\n </div>\n </div>\n </>\n )\n}\n\nconst Category: React.FC<CategoryProps> = ({ data, buildData, className = '', key }) => {\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const isSoundCore = data?.products?.length <= 5\n return (\n <div className={cn('w-full', className)}>\n {data?.title && <Title data={{ title: data?.title }} />}\n {isSoundCore ? (\n <SoundCoreCategoryItem data={data?.products} configuration={{ shape: data?.shape }} />\n ) : (\n <>\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: data?.products, configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"tablet:hidden block overflow-hidden\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(data?.products, 6), configuration: { shape: data?.shape } }}\n />\n </div>\n </>\n )}\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
5
+ "mappings": "aAyCI,OAqCA,YAAAA,EA9BE,OAAAC,EAPF,QAAAC,MAAA,oBAxCJ,MAAkB,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAW,oBAClB,OAAOC,MAAe,sBAyBtB,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,IAE1Cb,EAAC,OACC,UAAWC,EACT,+DACA,+DACAY,GAAe,QAAU,QAAU,iBAAmB,cACxD,EAEA,UAAAd,EAACG,EAAA,CAAQ,UAAU,uEAAuE,OAAQU,GAAM,MAAO,EAC/Gb,EAAC,KAAE,UAAU,0DAA2D,SAAAa,GAAM,KAAK,GACrF,EAIEE,EAAqB,CAAC,CAAE,KAAAF,EAAM,cAAAC,CAAc,IAE9Cd,EAAC,OAAI,UAAU,yBACZ,SAAAa,GAAM,IAAI,CAACG,EAAMC,IAEdhB,EAAC,OAEC,UAAWC,EACT,+DACA,8CACAY,GAAe,QAAU,QAAU,iBAAmB,cACxD,EAEA,UAAAd,EAACG,EAAA,CAAQ,UAAU,sDAAsD,OAAQa,GAAM,MAAO,EAC9FhB,EAAC,KAAE,UAAU,oDAAqD,SAAAgB,GAAM,KAAK,IARxE,GAAGA,GAA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,UAAU,sBACb,SAAAA,EAACM,EAAA,CACC,GAAI,WAAWgB,CAAG,GAClB,MAAOV,EACP,KAAM,CAAE,KAAMC,GAAM,SAAU,cAAe,CAAE,MAAOA,GAAM,KAAM,CAAE,EACtE,EACF,EACAb,EAAC,OAAI,UAAU,sCACb,SAAAA,EAACM,EAAA,CACC,GAAI,YAAYgB,CAAG,GACnB,MAAOP,EACP,KAAM,CAAE,KAAMR,EAAWM,GAAM,SAAU,CAAC,EAAG,cAAe,CAAE,MAAOA,GAAM,KAAM,CAAE,EACrF,EACF,GACF,GAEJ,CAEJ,EAEA,IAAOW,EAAQpB,EAAWe,CAAQ",
6
+ "names": ["Fragment", "jsx", "jsxs", "cn", "Picture", "withStyles", "Title", "SwiperBox", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "CategoryMobileItem", "item", "index", "SoundCoreCategoryItem", "Category", "buildData", "className", "key", "isSoundCore", "Category_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as t,jsxs as a}from"react/jsx-runtime";import r,{useMemo as f}from"react";import{cn as i}from"../../helpers/utils.js";import{withStyles as x}from"../../shared/Styles.js";import{Carousel as u,CarouselContent as g,CarouselItem as h}from"../../components/index.js";import{Picture as C,Text as b}from"../../components/index.js";import y from"../Title/index.js";const p=r.forwardRef(({data:l,shape:m,className:n,...v},d)=>{const o=l?.items?.length||0,c=f(()=>{const s="basis-[296px]";let e="";return o===1&&(e="basis-[100%]"),o===2&&(e="tablet:basis-1/2"),o===3&&(e="laptop:basis-1/3"),o>3&&(e="laptop:basis-[288px] desktop:basis-[316px] lg-desktop:basis-[404px]"),`${s} ${e}`},[o]);return a("div",{children:[l?.title&&t(y,{data:{title:l?.title}}),t(u,{ref:d,opts:{align:"start"},className:n,children:t(r.Fragment,{children:t(g,{children:l?.items?.map((s,e)=>t(h,{className:i("laptop:pl-4 h-[360px] shrink-0 pl-3",c),children:a("div",{className:i("relative h-full",{"rounded-xl overflow-hidden laptop:rounded-2xl":m==="round"}),children:[t(C,{className:"h-full ",imgClassName:"h-full object-cover",source:s?.imgUrl?.url}),t("div",{className:"laptop:p-6 absolute inset-0 z-[1] flex flex-col justify-end p-4",children:t(b,{html:s?.title,style:{color:s?.textColor},className:"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium"})})]})},e+s?.title))})},".0")})]})});p.displayName="Graphic";var w=x(p);export{w as default};
1
+ "use client";import{jsx as t,jsxs as s}from"react/jsx-runtime";import l from"react";import{cn as n}from"../../helpers/utils.js";import{withStyles as d}from"../../shared/Styles.js";import{Carousel as x,CarouselContent as u,CarouselItem as c}from"../../components/index.js";import{Picture as f,Text as h}from"../../components/index.js";import C from"../Title/index.js";const r=l.forwardRef(({data:o,shape:p,className:a,...g},i)=>s("div",{children:[o?.title&&t(C,{data:{title:o?.title}}),t(x,{ref:i,opts:{align:"start"},className:a,children:t(l.Fragment,{children:t(u,{children:o?.items?.map((e,m)=>t(c,{className:"laptop:h-[384px] desktop:h-[480px] laptop:pl-4 h-[360px] flex-1 shrink-0 pl-3 md:basis-[296px]",children:s("div",{className:n("relative h-full",{"rounded-xl overflow-hidden laptop:rounded-2xl":p==="round"}),children:[t(f,{className:"h-full ",imgClassName:"h-full object-cover",source:e?.imgUrl?.url}),t("div",{className:"laptop:p-6 absolute bottom-0 z-[1] flex w-full flex-col p-4",children:t(h,{html:e?.title,style:{color:e?.textColor},className:"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium"})})]})},m+e?.title))})},".0")})]}));r.displayName="Graphic";var G=d(r);export{G as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Graphic/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useMemo } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/index.js'\nimport { Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport type { ComponentCommonProps, Img } from '../../types/props.js'\n\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: {\n imgUrl: Img\n title: string\n textColor?: string\n }[]\n }\n shape?: 'round' | 'square'\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, shape, className, ...props }, ref) => {\n const itemsLength = data?.items?.length || 0\n\n const itemStyle = useMemo(() => {\n const basisStyle = 'basis-[296px]'\n let breakPointStyle = ''\n if (itemsLength === 1) {\n breakPointStyle = 'basis-[100%]'\n }\n if (itemsLength === 2) {\n breakPointStyle = 'tablet:basis-1/2'\n }\n if (itemsLength === 3) {\n breakPointStyle = 'laptop:basis-1/3'\n }\n if (itemsLength > 3) {\n breakPointStyle = 'laptop:basis-[288px] desktop:basis-[316px] lg-desktop:basis-[404px]'\n }\n return `${basisStyle} ${breakPointStyle}`\n }, [itemsLength])\n\n return (\n <div>\n {data?.title && <Title data={{ title: data?.title }} />}\n <Carousel\n ref={ref}\n opts={{\n align: 'start',\n }}\n className={className}\n >\n <React.Fragment key=\".0\">\n <CarouselContent>\n {data?.items?.map((item, index) => (\n <CarouselItem key={index + item?.title} className={cn('laptop:pl-4 h-[360px] shrink-0 pl-3', itemStyle)}>\n <div\n className={cn('relative h-full', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: shape === 'round',\n })}\n >\n <Picture className=\"h-full \" imgClassName=\"h-full object-cover\" source={item?.imgUrl?.url} />\n <div className=\"laptop:p-6 absolute inset-0 z-[1] flex flex-col justify-end p-4\">\n <Text\n html={item?.title}\n style={{\n color: item?.textColor,\n }}\n className=\"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium\"\n />\n </div>\n </div>\n </CarouselItem>\n ))}\n </CarouselContent>\n </React.Fragment>\n </Carousel>\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withStyles(Graphic)\n"],
5
- "mappings": "aA6CsB,cAAAA,EAYN,QAAAC,MAZM,oBA5CtB,OAAOC,GAAS,WAAAC,MAAe,QAC/B,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,YAAAC,EAAU,mBAAAC,EAAiB,gBAAAC,MAAoB,4BACxD,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAOC,MAAW,oBAgBlB,MAAMC,EAAUV,EAAM,WAAyC,CAAC,CAAE,KAAAW,EAAM,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAAQ,CAC5G,MAAMC,EAAcL,GAAM,OAAO,QAAU,EAErCM,EAAYhB,EAAQ,IAAM,CAC9B,MAAMiB,EAAa,gBACnB,IAAIC,EAAkB,GACtB,OAAIH,IAAgB,IAClBG,EAAkB,gBAEhBH,IAAgB,IAClBG,EAAkB,oBAEhBH,IAAgB,IAClBG,EAAkB,oBAEhBH,EAAc,IAChBG,EAAkB,uEAEb,GAAGD,CAAU,IAAIC,CAAe,EACzC,EAAG,CAACH,CAAW,CAAC,EAEhB,OACEjB,EAAC,OACE,UAAAY,GAAM,OAASb,EAACW,EAAA,CAAM,KAAM,CAAE,MAAOE,GAAM,KAAM,EAAG,EACrDb,EAACM,EAAA,CACC,IAAKW,EACL,KAAM,CACJ,MAAO,OACT,EACA,UAAWF,EAEX,SAAAf,EAACE,EAAM,SAAN,CACC,SAAAF,EAACO,EAAA,CACE,SAAAM,GAAM,OAAO,IAAI,CAACS,EAAMC,IACvBvB,EAACQ,EAAA,CAAuC,UAAWJ,EAAG,sCAAuCe,CAAS,EACpG,SAAAlB,EAAC,OACC,UAAWG,EAAG,kBAAmB,CAC9B,gDAAkDU,IAAU,OAC/D,CAAC,EAED,UAAAd,EAACS,EAAA,CAAQ,UAAU,UAAU,aAAa,sBAAsB,OAAQa,GAAM,QAAQ,IAAK,EAC3FtB,EAAC,OAAI,UAAU,kEACb,SAAAA,EAACU,EAAA,CACC,KAAMY,GAAM,MACZ,MAAO,CACL,MAAOA,GAAM,SACf,EACA,UAAU,qKACZ,EACF,GACF,GAhBiBC,EAAQD,GAAM,KAiBjC,CACD,EACH,GAtBkB,IAuBpB,EACF,GACF,CAEJ,CAAC,EAEDV,EAAQ,YAAc,UAEtB,IAAOY,EAAQnB,EAAWO,CAAO",
6
- "names": ["jsx", "jsxs", "React", "useMemo", "cn", "withStyles", "Carousel", "CarouselContent", "CarouselItem", "Picture", "Text", "Title", "Graphic", "data", "shape", "className", "props", "ref", "itemsLength", "itemStyle", "basisStyle", "breakPointStyle", "item", "index", "Graphic_default"]
4
+ "sourcesContent": ["'use client'\nimport React, { useMemo } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/index.js'\nimport { Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport type { ComponentCommonProps, Img } from '../../types/props.js'\n\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: {\n imgUrl: Img\n title: string\n textColor?: string\n }[]\n }\n shape?: 'round' | 'square'\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, shape, className, ...props }, ref) => {\n return (\n <div>\n {data?.title && <Title data={{ title: data?.title }} />}\n <Carousel\n ref={ref}\n opts={{\n align: 'start',\n }}\n className={className}\n >\n <React.Fragment key=\".0\">\n <CarouselContent>\n {data?.items?.map((item, index) => (\n <CarouselItem\n key={index + item?.title}\n className=\"laptop:h-[384px] desktop:h-[480px] laptop:pl-4 h-[360px] flex-1 shrink-0 pl-3 md:basis-[296px]\"\n >\n <div\n className={cn('relative h-full', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: shape === 'round',\n })}\n >\n <Picture className=\"h-full \" imgClassName=\"h-full object-cover\" source={item?.imgUrl?.url} />\n <div className=\"laptop:p-6 absolute bottom-0 z-[1] flex w-full flex-col p-4\">\n <Text\n html={item?.title}\n style={{\n color: item?.textColor,\n }}\n className=\"lg-desktop:text-[32px] desktop:text-[24px] desktop:[&_span]:text-[18px] text-lines-2 text-[24px] font-bold leading-[1.2] [&_span]:text-[14px] [&_span]:font-medium\"\n />\n </div>\n </div>\n </CarouselItem>\n ))}\n </CarouselContent>\n </React.Fragment>\n </Carousel>\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withStyles(Graphic)\n"],
5
+ "mappings": "aAyBsB,cAAAA,EAeN,QAAAC,MAfM,oBAxBtB,OAAOC,MAAwB,QAC/B,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,YAAAC,EAAU,mBAAAC,EAAiB,gBAAAC,MAAoB,4BACxD,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAOC,MAAW,oBAgBlB,MAAMC,EAAUT,EAAM,WAAyC,CAAC,CAAE,KAAAU,EAAM,MAAAC,EAAO,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAElGf,EAAC,OACE,UAAAW,GAAM,OAASZ,EAACU,EAAA,CAAM,KAAM,CAAE,MAAOE,GAAM,KAAM,EAAG,EACrDZ,EAACK,EAAA,CACC,IAAKW,EACL,KAAM,CACJ,MAAO,OACT,EACA,UAAWF,EAEX,SAAAd,EAACE,EAAM,SAAN,CACC,SAAAF,EAACM,EAAA,CACE,SAAAM,GAAM,OAAO,IAAI,CAACK,EAAMC,IACvBlB,EAACO,EAAA,CAEC,UAAU,iGAEV,SAAAN,EAAC,OACC,UAAWE,EAAG,kBAAmB,CAC9B,gDAAkDU,IAAU,OAC/D,CAAC,EAED,UAAAb,EAACQ,EAAA,CAAQ,UAAU,UAAU,aAAa,sBAAsB,OAAQS,GAAM,QAAQ,IAAK,EAC3FjB,EAAC,OAAI,UAAU,8DACb,SAAAA,EAACS,EAAA,CACC,KAAMQ,GAAM,MACZ,MAAO,CACL,MAAOA,GAAM,SACf,EACA,UAAU,qKACZ,EACF,GACF,GAlBKC,EAAQD,GAAM,KAmBrB,CACD,EACH,GAzBkB,IA0BpB,EACF,GACF,CAEH,EAEDN,EAAQ,YAAc,UAEtB,IAAOQ,EAAQf,EAAWO,CAAO",
6
+ "names": ["jsx", "jsxs", "React", "cn", "withStyles", "Carousel", "CarouselContent", "CarouselItem", "Picture", "Text", "Title", "Graphic", "data", "shape", "className", "props", "ref", "item", "index", "Graphic_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as t,jsxs as s}from"react/jsx-runtime";import a from"react";import{cn as x}from"../../helpers/utils.js";import{Heading as f,Text as g}from"../../components/index.js";import{withStyles as d}from"../../shared/Styles.js";const p=a.forwardRef(({data:i,className:o},r)=>{const{title:m,features:e}=i;return s("div",{ref:r,className:x("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex w-full flex-col items-start justify-center gap-[24px] text-center",o),children:[t(f,{as:"h2",size:2,weight:"bold",align:"left",className:"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]",children:m}),e&&e.length>0&&t("div",{className:"flex w-full max-w-[426px] flex-row items-stretch gap-3",children:e.slice(0,3).map((n,l)=>s(a.Fragment,{children:[l>0&&t("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),t("div",{className:"",children:t(g,{align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]",html:n.title})})]},l))})]})});p.displayName="Slogan";var y=d(p);export{y as default};
1
+ "use client";import{jsx as n,jsxs as G}from"react/jsx-runtime";import s,{useRef as D}from"react";import{useGSAP as $}from"@gsap/react";import{gsap as y}from"gsap";import{SplitText as N}from"gsap/SplitText";import{ScrollTrigger as S}from"gsap/ScrollTrigger";import{cn as I}from"../../helpers/utils.js";import{Heading as j,Text as z}from"../../components/index.js";import{withStyles as L}from"../../shared/Styles.js";y.registerPlugin(N,S);function U(a=[],i=3){const p=[];for(let r=0;r<a.length;r+=i)p.push(a.slice(r,r+i));return p}const E=s.forwardRef(({data:a,className:i},p)=>{const{title:r,features:c=[],featureChunkSize:T=3}=a,[g,k]=s.useState(0),[R,d]=s.useState(!0),u=U(c,T),x=u.length,o=c.length>T,F=o?[...u,u[0]]:u,h=40;s.useEffect(()=>{if(!o)return;const t=setInterval(()=>{k(e=>e+1),d(!0)},3e3);return()=>clearInterval(t)},[x,o]),s.useEffect(()=>{if(o)if(g===x){const t=setTimeout(()=>{d(!1),k(0)},500);return()=>clearTimeout(t)}else d(!0)},[g,x,o]);const f=D(null),m=D(null);return $(()=>{if(!f.current)return;m.current=new N(f.current,{type:"words",wordsClass:"word"});const t=m.current.words;return y.set(t,{opacity:0}),S.create({trigger:f.current,start:"top 80%",end:"top 50%",scrub:!0,onUpdate:e=>{const w=e.progress,l=t.length,H=1/l,b=.5;t.forEach((P,A)=>{const C=A/l*(1-b),M=H*(1+b);let v=(w-C)/M;v=Math.max(0,Math.min(v,1)),y.set(P,{opacity:v})})}}),()=>{m.current&&m.current.revert(),S.getAll().forEach(e=>e.kill())}},[]),G("div",{ref:p,className:I("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary desktop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",i),children:[n(j,{ref:f,as:"h2",size:2,weight:"bold",align:"left",className:"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]",children:r}),c&&c.length>0&&n("div",{className:"relative w-full max-w-[500px] overflow-hidden",style:{height:`${h}px`},children:n("div",{className:I(["flex flex-col",R?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${g*h}px)`},children:F.map((t,e)=>n("div",{className:"flex w-full flex-row items-stretch gap-3 overflow-hidden",style:{height:`${h}px`},children:t.map((w,l)=>G(s.Fragment,{children:[l>0&&n("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),n(z,{align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]",html:w.title})]},l))},e))})})]})});E.displayName="Slogan";var W=L(E);export{W as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Slogan/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className }, ref) => {\n const { title, features } = data\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className=\"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]\"\n >\n {title}\n </Heading>\n {features && features.length > 0 && (\n <div className=\"flex w-full max-w-[426px] flex-row items-stretch gap-3\">\n {features.slice(0, 3).map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]\" />}\n <div className=\"\">\n <Text\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-3 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </div>\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
5
- "mappings": "aAiBM,cAAAA,EAYM,QAAAC,MAZN,oBAhBN,OAAOC,MAAW,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAS,cAAAC,MAAkB,yBAG3B,MAAMC,EAASL,EAAM,WAAwC,CAAC,CAAE,KAAAM,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACzF,KAAM,CAAE,MAAAC,EAAO,SAAAC,CAAS,EAAIJ,EAC5B,OACEP,EAAC,OACC,IAAKS,EACL,UAAWP,EACT,mJACAM,CACF,EAEA,UAAAT,EAACI,EAAA,CACC,GAAG,KACH,KAAM,EACN,OAAQ,OACR,MAAO,OACP,UAAU,sHAET,SAAAO,EACH,EACCC,GAAYA,EAAS,OAAS,GAC7BZ,EAAC,OAAI,UAAU,yDACZ,SAAAY,EAAS,MAAM,EAAG,CAAC,EAAE,IAAI,CAACC,EAASC,IAClCb,EAACC,EAAM,SAAN,CACE,UAAAY,EAAQ,GAAKd,EAAC,OAAI,UAAU,wDAAwD,EACrFA,EAAC,OAAI,UAAU,GACb,SAAAA,EAACK,EAAA,CACC,MAAM,OACN,GAAG,IACH,UAAU,8HACV,KAAMQ,EAAQ,MAChB,EACF,IATmBC,CAUrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDP,EAAO,YAAc,SAErB,IAAOQ,EAAQT,EAAWC,CAAM",
6
- "names": ["jsx", "jsxs", "React", "cn", "Heading", "Text", "withStyles", "Slogan", "data", "className", "ref", "title", "features", "feature", "index", "Slogan_default"]
4
+ "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/SplitText'\nimport { ScrollTrigger } from 'gsap/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\ngsap.registerPlugin(SplitText, ScrollTrigger)\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className }, ref) => {\n const { title, features = [], featureChunkSize = 3 } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const featuresGroups = chunkArray(features, featureChunkSize)\n const totalGroups = featuresGroups.length\n const needCarousel = features.length > featureChunkSize\n const displayGroups = needCarousel ? [...featuresGroups, featuresGroups[0]] : featuresGroups\n const groupHeight = 40\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n useGSAP(() => {\n if (!titleRef.current) return\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'top 80%',\n end: 'top 50%',\n scrub: true,\n onUpdate: self => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word, i) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n ScrollTrigger.getAll().forEach(t => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between text-info-primary desktop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n ref={titleRef}\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className=\"slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none text-[#1D1D1F]\"\n >\n {title}\n </Heading>\n {features && features.length > 0 && (\n <div className=\"relative w-full max-w-[500px] overflow-hidden\" style={{ height: `${groupHeight}px` }}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]' : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className=\"flex w-full flex-row items-stretch gap-3 overflow-hidden\"\n style={{ height: `${groupHeight}px` }}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]\" />}\n <Text\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </React.Fragment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,CACF,EAAG,CAAC,CAAC,EAGH9C,EAAC,OACC,IAAKmB,EACL,UAAWZ,EACT,wMACAW,CACF,EAEA,UAAAnB,EAACS,EAAA,CACC,IAAK0B,EACL,GAAG,KACH,KAAM,EACN,OAAQ,OACR,MAAO,OACP,UAAU,sHAET,SAAAd,EACH,EACCC,GAAYA,EAAS,OAAS,GAC7BtB,EAAC,OAAI,UAAU,gDAAgD,MAAO,CAAE,OAAQ,GAAGgC,CAAW,IAAK,EACjG,SAAAhC,EAAC,OACC,UAAWQ,EAAG,CACZ,gBACAkB,EAAkB,mEAAqE,kBACzF,CAAC,EACD,MAAO,CACL,UAAW,eAAeF,EAAaQ,CAAW,KACpD,EAEC,SAAAD,EAAc,IAAI,CAACiB,EAAOC,IACzBjD,EAAC,OACC,UAAU,2DACV,MAAO,CAAE,OAAQ,GAAGgC,CAAW,IAAK,EAGnC,SAAAgB,EAAM,IAAI,CAACE,EAASC,IACnBlD,EAACC,EAAM,SAAN,CACE,UAAAiD,EAAQ,GAAKnD,EAAC,OAAI,UAAU,wDAAwD,EACrFA,EAACU,EAAA,CACC,MAAM,OACN,GAAG,IACH,UAAU,8HACV,KAAMwC,EAAQ,MAChB,IAPmBC,CAQrB,CACD,GAZIF,CAaP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDhC,EAAO,YAAc,SAErB,IAAOmC,EAAQzC,EAAWM,CAAM",
6
+ "names": ["jsx", "jsxs", "React", "useRef", "useGSAP", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "Text", "withStyles", "chunkArray", "array", "size", "result", "i", "Slogan", "data", "className", "ref", "title", "features", "featureChunkSize", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "timer", "handle", "titleRef", "splitTextInstance", "words", "self", "progress", "total", "interval", "overlap", "word", "start", "width", "opacity", "t", "group", "idx", "feature", "index", "Slogan_default"]
7
7
  }
@@ -11,7 +11,11 @@ export interface SloganProps {
11
11
  */
12
12
  title: string;
13
13
  /**
14
- * 特性列表,最多支持3
14
+ * 特性分组大小 默认为3
15
+ */
16
+ featureChunkSize?: number;
17
+ /**
18
+ * 特性列表
15
19
  */
16
20
  features?: Feature[];
17
21
  };
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as a,jsxs as p}from"react/jsx-runtime";import i from"react";import*as e from"@radix-ui/react-dropdown-menu";import{CheckIcon as y,ChevronRightIcon as v,CircleIcon as M}from"@radix-ui/react-icons";import{cn as d}from"../helpers/index.js";const D=i.forwardRef(({children:o,...t})=>a(e.Root,{...t,children:o})),P=e.Trigger,h=e.Group,x=e.Portal,N=e.Sub,C=e.RadioGroup,m=i.forwardRef(({className:o,inset:t,children:n,...r},s)=>p(e.SubTrigger,{ref:s,className:d("focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",o),...r,children:[n,a(v,{className:"ml-auto"})]}));m.displayName=e.SubTrigger.displayName;const c=i.forwardRef(({className:o,...t},n)=>a(e.SubContent,{ref:n,className:d("bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",o),...t}));c.displayName=e.SubContent.displayName;const u=i.forwardRef(({className:o,sideOffset:t=4,...n},r)=>a(e.Portal,{children:a(e.Content,{ref:r,sideOffset:t,className:d("bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",o),...n})}));u.displayName=e.Content.displayName;const l=i.forwardRef(({className:o,inset:t,...n},r)=>a(e.Item,{ref:r,className:d("focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",o),...n}));l.displayName=e.Item.displayName;const f=i.forwardRef(({className:o,children:t,checked:n,...r},s)=>p(e.CheckboxItem,{ref:s,className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),checked:n,...r,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(y,{className:"size-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;const w=i.forwardRef(({className:o,children:t,...n},r)=>p(e.RadioItem,{ref:r,className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),...n,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(M,{className:"size-2 fill-current"})})}),t]}));w.displayName=e.RadioItem.displayName;const R=i.forwardRef(({className:o,inset:t,...n},r)=>a(e.Label,{ref:r,className:d("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));R.displayName=e.Label.displayName;const b=i.forwardRef(({className:o,...t},n)=>a(e.Separator,{ref:n,className:d("bg-muted -mx-1 my-1 h-px",o),...t}));b.displayName=e.Separator.displayName;const g=({className:o,...t})=>a("span",{className:d("ml-auto text-xs tracking-widest opacity-60",o),...t});g.displayName="DropdownMenuShortcut";export{D as DropdownMenu,f as DropdownMenuCheckboxItem,u as DropdownMenuContent,h as DropdownMenuGroup,l as DropdownMenuItem,R as DropdownMenuLabel,x as DropdownMenuPortal,C as DropdownMenuRadioGroup,w as DropdownMenuRadioItem,b as DropdownMenuSeparator,g as DropdownMenuShortcut,N as DropdownMenuSub,c as DropdownMenuSubContent,m as DropdownMenuSubTrigger,P as DropdownMenuTrigger};
1
+ "use client";import{jsx as a,jsxs as p}from"react/jsx-runtime";import i from"react";import*as e from"@radix-ui/react-dropdown-menu";import{CheckIcon as y,ChevronRightIcon as v,CircleIcon as M}from"@radix-ui/react-icons";import{cn as d}from"../helpers/index.js";const D=i.forwardRef(({children:o,...t},n)=>a(e.Root,{...t,children:o})),P=e.Trigger,h=e.Group,x=e.Portal,N=e.Sub,C=e.RadioGroup,m=i.forwardRef(({className:o,inset:t,children:n,...r},s)=>p(e.SubTrigger,{ref:s,className:d("focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",o),...r,children:[n,a(v,{className:"ml-auto"})]}));m.displayName=e.SubTrigger.displayName;const c=i.forwardRef(({className:o,...t},n)=>a(e.SubContent,{ref:n,className:d("bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",o),...t}));c.displayName=e.SubContent.displayName;const l=i.forwardRef(({className:o,sideOffset:t=4,...n},r)=>a(e.Portal,{children:a(e.Content,{ref:r,sideOffset:t,className:d("bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",o),...n})}));l.displayName=e.Content.displayName;const u=i.forwardRef(({className:o,inset:t,...n},r)=>a(e.Item,{ref:r,className:d("focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",o),...n}));u.displayName=e.Item.displayName;const f=i.forwardRef(({className:o,children:t,checked:n,...r},s)=>p(e.CheckboxItem,{ref:s,className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),checked:n,...r,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(y,{className:"size-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;const w=i.forwardRef(({className:o,children:t,...n},r)=>p(e.RadioItem,{ref:r,className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),...n,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(M,{className:"size-2 fill-current"})})}),t]}));w.displayName=e.RadioItem.displayName;const R=i.forwardRef(({className:o,inset:t,...n},r)=>a(e.Label,{ref:r,className:d("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...n}));R.displayName=e.Label.displayName;const b=i.forwardRef(({className:o,...t},n)=>a(e.Separator,{ref:n,className:d("bg-muted -mx-1 my-1 h-px",o),...t}));b.displayName=e.Separator.displayName;const g=({className:o,...t})=>a("span",{className:d("ml-auto text-xs tracking-widest opacity-60",o),...t});g.displayName="DropdownMenuShortcut";export{D as DropdownMenu,f as DropdownMenuCheckboxItem,l as DropdownMenuContent,h as DropdownMenuGroup,u as DropdownMenuItem,R as DropdownMenuLabel,x as DropdownMenuPortal,C as DropdownMenuRadioGroup,w as DropdownMenuRadioItem,b as DropdownMenuSeparator,g as DropdownMenuShortcut,N as DropdownMenuSub,c as DropdownMenuSubContent,m as DropdownMenuSubTrigger,P as DropdownMenuTrigger};
2
2
  //# sourceMappingURL=drop-down.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/drop-down.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport React, { useState } from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from '@radix-ui/react-icons'\nimport { cn } from '../helpers/index.js'\n\nconst DropdownMenu = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>\n>(({ children, ...props }) => {\n return <DropdownMenuPrimitive.Root {...props}>{children}</DropdownMenuPrimitive.Root>\n})\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],
5
- "mappings": "aAWS,cAAAA,EAiBP,QAAAC,MAjBO,oBATT,OAAOC,MAAyB,QAChC,UAAYC,MAA2B,gCACvC,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,cAAAC,MAAkB,wBACxD,OAAS,MAAAC,MAAU,sBAEnB,MAAMC,EAAeN,EAAM,WAGzB,CAAC,CAAE,SAAAO,EAAU,GAAGC,CAAM,IACfV,EAACG,EAAsB,KAAtB,CAA4B,GAAGO,EAAQ,SAAAD,EAAS,CACzD,EAEKE,EAAsBR,EAAsB,QAE5CS,EAAoBT,EAAsB,MAE1CU,EAAqBV,EAAsB,OAE3CW,EAAkBX,EAAsB,IAExCY,EAAyBZ,EAAsB,WAE/Ca,EAAyBd,EAAM,WAGnC,CAAC,CAAE,UAAAe,EAAW,MAAAC,EAAO,SAAAT,EAAU,GAAGC,CAAM,EAAGS,IAC3ClB,EAACE,EAAsB,WAAtB,CACC,IAAKgB,EACL,UAAWZ,EACT,yMACAW,GAAS,OACTD,CACF,EACC,GAA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uB,EAAwBxB,EAAM,WAGlC,CAAC,CAAE,UAAAe,EAAW,SAAAR,EAAU,GAAGC,CAAM,EAAGS,IACpClB,EAACE,EAAsB,UAAtB,CACC,IAAKgB,EACL,UAAWZ,EACT,uOACAU,CACF,EACC,GAAGP,EAEJ,UAAAV,EAAC,QAAK,UAAU,4DACd,SAAAA,EAACG,EAAsB,cAAtB,CACC,SAAAH,EAACM,EAAA,CAAW,UAAU,sBAAsB,EAC9C,EACF,EACCG,GACH,CACD,EACDiB,EAAsB,YAAcvB,EAAsB,UAAU,YAEpE,MAAMwB,EAAoBzB,EAAM,WAK9B,CAAC,CAAE,UAAAe,EAAW,MAAAC,EAAO,GAAGR,CAAM,EAAGS,IACjCnB,EAACG,EAAsB,MAAtB,CACC,IAAKgB,EACL,UAAWZ,EAAG,oCAAqCW,GAAS,OAAQD,CAAS,EAC5E,GAAGP,EACN,CACD,EACDiB,EAAkB,YAAcxB,EAAsB,MAAM,YAE5D,MAAMyB,EAAwB1B,EAAM,WAGlC,CAAC,CAAE,UAAAe,EAAW,GAAGP,CAAM,EAAGS,IAC1BnB,EAACG,EAAsB,UAAtB,CAAgC,IAAKgB,EAAK,UAAWZ,EAAG,2BAA4BU,CAAS,EAAI,GAAGP,EAAO,CAC7G,EACDkB,EAAsB,YAAczB,EAAsB,UAAU,YAEpE,MAAM0B,EAAuB,CAAC,CAAE,UAAAZ,EAAW,GAAGP,CAAM,IAC3CV,EAAC,QAAK,UAAWO,EAAG,6CAA8CU,CAAS,EAAI,GAAGP,EAAO,EAElGmB,EAAqB,YAAc",
6
- "names": ["jsx", "jsxs", "React", "DropdownMenuPrimitive", "CheckIcon", "ChevronRightIcon", "CircleIcon", "cn", "DropdownMenu", "children", "props", "DropdownMenuTrigger", "DropdownMenuGroup", "DropdownMenuPortal", "DropdownMenuSub", "DropdownMenuRadioGroup", "DropdownMenuSubTrigger", "className", "inset", "ref", "DropdownMenuSubContent", "DropdownMenuContent", "sideOffset", "DropdownMenuItem", "DropdownMenuCheckboxItem", "checked", "DropdownMenuRadioItem", "DropdownMenuLabel", "DropdownMenuSeparator", "DropdownMenuShortcut"]
4
+ "sourcesContent": ["'use client'\n\nimport React from 'react'\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from '@radix-ui/react-icons'\nimport { cn } from '../helpers/index.js'\n\nconst DropdownMenu = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>\n>(({ children, ...props }, ref) => {\n return <DropdownMenuPrimitive.Root {...props}>{children}</DropdownMenuPrimitive.Root>\n})\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n}\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut'\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],
5
+ "mappings": "aAWS,cAAAA,EAiBP,QAAAC,MAjBO,oBATT,OAAOC,MAAW,QAClB,UAAYC,MAA2B,gCACvC,OAA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AsB,UAAtB,CAAgC,IAAKQ,EAAK,UAAWJ,EAAG,2BAA4BW,CAAS,EAAI,GAAGR,EAAO,CAC7G,EACDkB,EAAsB,YAAczB,EAAsB,UAAU,YAEpE,MAAM0B,EAAuB,CAAC,CAAE,UAAAX,EAAW,GAAGR,CAAM,IAC3CV,EAAC,QAAK,UAAWO,EAAG,6CAA8CW,CAAS,EAAI,GAAGR,EAAO,EAElGmB,EAAqB,YAAc",
6
+ "names": ["jsx", "jsxs", "React", "DropdownMenuPrimitive", "CheckIcon", "ChevronRightIcon", "CircleIcon", "cn", "DropdownMenu", "children", "props", "ref", "DropdownMenuTrigger", "DropdownMenuGroup", "DropdownMenuPortal", "DropdownMenuSub", "DropdownMenuRadioGroup", "DropdownMenuSubTrigger", "className", "inset", "DropdownMenuSubContent", "DropdownMenuContent", "sideOffset", "DropdownMenuItem", "DropdownMenuCheckboxItem", "checked", "DropdownMenuRadioItem", "DropdownMenuLabel", "DropdownMenuSeparator", "DropdownMenuShortcut"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import o from"../biz-components/Graphic/index.js";const s={title:"Biz-Components/Graphic",component:o,parameters:{layout:"fullscreen",docs:{description:{component:"\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/"}}},argTypes:{shape:{control:{type:"inline-radio"},options:["square","round"],description:"\u5706\u89D2",table:{defaultValue:{summary:"square"}}}},decorators:[e=>r("div",{style:{paddingTop:"2em"},children:r(e,{})})],tags:["autodocs"]};var p=s;const t=[{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"},{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"}],l={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:t.map(e=>({...e,imgUrl:{url:e.imgUrl,alt:e.title}}))}}},i={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:t.map(e=>({...e,imgUrl:{url:e.imgUrl,alt:e.title}}))},shape:"round"}};export{l as Default,i as Round,p as default};
1
+ import{jsx as t}from"react/jsx-runtime";import o from"../biz-components/Graphic/index.js";const s={title:"Biz-Components/Graphic",component:o,parameters:{layout:"fullscreen",docs:{description:{component:"\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/"}}},argTypes:{shape:{control:{type:"inline-radio"},options:["square","round"],description:"\u5706\u89D2",table:{defaultValue:{summary:"square"}}}},decorators:[r=>t("div",{style:{paddingTop:"2em"},children:t(r,{})})],tags:["autodocs"]};var l=s;const e=[{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"},{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off"},{imgUrl:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318",alt:"imgUrlPc"},title:"<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices",textColor:"#FFF"}],p={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:e}}},i={args:{data:{title:"Explore Anker\u2019s Top Products By<br>Category",items:e},shape:"round"}};export{p as Default,i as Round,l as default};
2
2
  //# sourceMappingURL=graphic.stories.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/graphic.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Graphic from '../biz-components/Graphic/index.js'\n\nconst meta = {\n title: 'Biz-Components/Graphic',\n component: Graphic,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: '\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/',\n },\n },\n },\n argTypes: {\n shape: {\n control: {\n type: 'inline-radio',\n },\n options: ['square', 'round'],\n description: '\u5706\u89D2',\n table: {\n defaultValue: {\n summary: 'square',\n },\n },\n },\n },\n decorators: [\n Story => (\n <div style={{ paddingTop: '2em' }}>\n <Story />\n </div>\n ),\n ],\n tags: ['autodocs'],\n} satisfies Meta<typeof Graphic>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n]\n\nexport const Default: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems.map(item => ({\n ...item,\n imgUrl: {\n url: item.imgUrl,\n alt: item.title,\n },\n })),\n },\n },\n}\n\nexport const Round: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems.map(item => ({\n ...item,\n imgUrl: {\n url: item.imgUrl,\n alt: item.title,\n },\n })),\n },\n shape: 'round',\n },\n}\n"],
5
- "mappings": "AA+BQ,cAAAA,MAAA,oBA9BR,OAAOC,MAAa,qCAEpB,MAAMC,EAAO,CACX,MAAO,yBACP,UAAWD,EACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,SAAU,CACR,MAAO,CACL,QAAS,CACP,KAAM,cACR,EACA,QAAS,CAAC,SAAU,OAAO,EAC3B,YAAa,eACb,MAAO,CACL,aAAc,CACZ,QAAS,QACX,CACF,CACF,CACF,EACA,WAAY,CACVE,GACEH,EAAC,OAAI,MAAO,CAAE,WAAY,KAAM,EAC9B,SAAAA,EAACG,EAAA,EAAM,EACT,CAEJ,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOC,EAAQF,EAGf,MAAMG,EAAY,CAChB,CACE,OAAQ,2FACR,MAAO,wEACT,EACA,CACE,OAAQ,2FACR,MAAO,yEACP,UAAW,MACb,EACA,CACE,OAAQ,2FACR,MAAO,wEACT,EACA,CACE,OAAQ,2FACR,MAAO,yEACP,UAAW,MACb,CACF,EAEaC,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOD,EAAU,IAAIE,IAAS,CAC5B,GAAGA,EACH,OAAQ,CACN,IAAKA,EAAK,OACV,IAAKA,EAAK,KACZ,CACF,EAAE,CACJ,CACF,CACF,EAEaC,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOH,EAAU,IAAIE,IAAS,CAC5B,GAAGA,EACH,OAAQ,CACN,IAAKA,EAAK,OACV,IAAKA,EAAK,KACZ,CACF,EAAE,CACJ,EACA,MAAO,OACT,CACF",
6
- "names": ["jsx", "Graphic", "meta", "Story", "graphic_stories_default", "mockItems", "Default", "item", "Round"]
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Graphic from '../biz-components/Graphic/index.js'\n\nconst meta = {\n title: 'Biz-Components/Graphic',\n component: Graphic,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: '\u56FE\u6587\u5C55\u793A\u6A21\u5757\uFF0C\u57FA\u4E8Eembla-carousel-react\uFF0Chttps://www.embla-carousel.com/get-started/react/',\n },\n },\n },\n argTypes: {\n shape: {\n control: {\n type: 'inline-radio',\n },\n options: ['square', 'round'],\n description: '\u5706\u89D2',\n table: {\n defaultValue: {\n summary: 'square',\n },\n },\n },\n },\n decorators: [\n Story => (\n <div style={{ paddingTop: '2em' }}>\n <Story />\n </div>\n ),\n ],\n tags: ['autodocs'],\n} satisfies Meta<typeof Graphic>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772030.png?v=1745724316',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Sign Up for Special Offers Up to 20% Off',\n },\n {\n imgUrl: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772047.png?v=1745724318',\n alt: 'imgUrlPc',\n },\n title: '<span>Welcome Offer</span><br>Same Great Quality at Even Better Prices',\n textColor: '#FFF',\n },\n]\n\nexport const Default: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems,\n },\n },\n}\n\nexport const Round: Story = {\n args: {\n data: {\n title: 'Explore Anker\u2019s Top Products By<br>Category',\n items: mockItems,\n },\n shape: 'round',\n },\n}\n"],
5
+ "mappings": "AA+BQ,cAAAA,MAAA,oBA9BR,OAAOC,MAAa,qCAEpB,MAAMC,EAAO,CACX,MAAO,yBACP,UAAWD,EACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,SAAU,CACR,MAAO,CACL,QAAS,CACP,KAAM,cACR,EACA,QAAS,CAAC,SAAU,OAAO,EAC3B,YAAa,eACb,MAAO,CACL,aAAc,CACZ,QAAS,QACX,CACF,CACF,CACF,EACA,WAAY,CACVE,GACEH,EAAC,OAAI,MAAO,CAAE,WAAY,KAAM,EAC9B,SAAAA,EAACG,EAAA,EAAM,EACT,CAEJ,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOC,EAAQF,EAGf,MAAMG,EAAY,CAChB,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,wEACT,EACA,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,yEACP,UAAW,MACb,EACA,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,wEACT,EACA,CACE,OAAQ,CACN,IAAK,2FACL,IAAK,UACP,EACA,MAAO,yEACP,UAAW,MACb,CACF,EAEaC,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOD,CACT,CACF,CACF,EAEaE,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOF,CACT,EACA,MAAO,OACT,CACF",
6
+ "names": ["jsx", "Graphic", "meta", "Story", "graphic_stories_default", "mockItems", "Default", "Round"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "0.0.27-alpha.50",
3
+ "version": "0.0.27-alpha.52",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
@@ -91,6 +91,7 @@
91
91
  "stylelint": "^16.6.0"
92
92
  },
93
93
  "dependencies": {
94
+ "@gsap/react": "^2.1.2",
94
95
  "@payloadcms/richtext-lexical": "^3.37.0",
95
96
  "@radix-ui/react-avatar": "^1.1.9",
96
97
  "@radix-ui/react-checkbox": "^1.3.1",
@@ -110,6 +111,7 @@
110
111
  "embla-carousel-react": "^8.6.0",
111
112
  "embla-carousel-wheel-gestures": "^8.0.1",
112
113
  "fitty": "^2.4.2",
114
+ "gsap": "^3.13.0",
113
115
  "postcss": "^8.4.38",
114
116
  "react-fast-marquee": "^1.6.5",
115
117
  "swiper": "^11.1.3",