@anker-in/headless-ui 0.0.27-alpha.86 → 0.0.27-alpha.88
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.
- package/dist/cjs/biz-components/AccordionCards/index.d.ts +1 -2
- package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
- package/dist/cjs/biz-components/AccordionCards/index.js.map +3 -3
- package/dist/cjs/biz-components/Category/index.d.ts +0 -1
- package/dist/cjs/biz-components/Category/index.js +1 -1
- package/dist/cjs/biz-components/Category/index.js.map +3 -3
- package/dist/cjs/biz-components/Evaluate/index.d.ts +0 -1
- package/dist/cjs/biz-components/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
- package/dist/cjs/biz-components/Graphic/index.d.ts +0 -1
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +0 -1
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.js +1 -1
- package/dist/cjs/biz-components/GraphicAttractionBlock/index.js.map +3 -3
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerMulti/types.d.ts +0 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/types.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/types.js.map +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/cjs/biz-components/MediaPlayerSticky/types.d.ts +0 -1
- package/dist/cjs/biz-components/MediaPlayerSticky/types.js.map +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +0 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +1 -1
- package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +0 -1
- package/dist/cjs/biz-components/ShelfDisplay/index.js +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/Slogan/index.js +1 -1
- package/dist/cjs/biz-components/Slogan/index.js.map +3 -3
- package/dist/cjs/biz-components/Slogan/types.d.ts +0 -1
- package/dist/cjs/biz-components/Slogan/types.js.map +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
- package/dist/cjs/biz-components/Tabs/types.d.ts +0 -1
- package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +3 -3
- package/dist/cjs/biz-components/Title/types.d.ts +0 -1
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/stories/HeroBanner.stories.js +1 -1
- package/dist/cjs/stories/HeroBanner.stories.js.map +3 -3
- package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.js +1 -1
- package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.js.map +2 -2
- package/dist/cjs/stories/accordionCards.stories.d.ts +1 -2
- package/dist/cjs/stories/accordionCards.stories.js +1 -1
- package/dist/cjs/stories/accordionCards.stories.js.map +2 -2
- package/dist/cjs/stories/category.stories.js +1 -1
- package/dist/cjs/stories/category.stories.js.map +2 -2
- package/dist/cjs/stories/evaluate.stories.js +1 -1
- package/dist/cjs/stories/evaluate.stories.js.map +3 -3
- package/dist/cjs/stories/graphic.stories.d.ts +0 -1
- package/dist/cjs/stories/graphic.stories.js +1 -1
- package/dist/cjs/stories/graphic.stories.js.map +2 -2
- package/dist/cjs/stories/graphicAttractionBlock.stories.js +1 -1
- package/dist/cjs/stories/graphicAttractionBlock.stories.js.map +2 -2
- package/dist/cjs/stories/mediaplayerMulti.stories.js +1 -1
- package/dist/cjs/stories/mediaplayerMulti.stories.js.map +2 -2
- package/dist/cjs/stories/shelfDisplay.stories.js +1 -1
- package/dist/cjs/stories/shelfDisplay.stories.js.map +2 -2
- package/dist/cjs/stories/slogan.stories.js +1 -1
- package/dist/cjs/stories/slogan.stories.js.map +3 -3
- package/dist/esm/biz-components/AccordionCards/index.d.ts +1 -2
- package/dist/esm/biz-components/AccordionCards/index.js +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js.map +3 -3
- package/dist/esm/biz-components/Category/index.d.ts +0 -1
- package/dist/esm/biz-components/Category/index.js +1 -1
- package/dist/esm/biz-components/Category/index.js.map +3 -3
- package/dist/esm/biz-components/Evaluate/index.d.ts +0 -1
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
- package/dist/esm/biz-components/Graphic/index.d.ts +0 -1
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +3 -3
- package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +0 -1
- package/dist/esm/biz-components/GraphicAttractionBlock/index.js +1 -1
- package/dist/esm/biz-components/GraphicAttractionBlock/index.js.map +3 -3
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerMulti/types.d.ts +0 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
- package/dist/esm/biz-components/MediaPlayerSticky/types.d.ts +0 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
- package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +0 -1
- package/dist/esm/biz-components/ShelfDisplay/index.d.ts +0 -1
- package/dist/esm/biz-components/ShelfDisplay/index.js +3 -3
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/Slogan/index.js +1 -1
- package/dist/esm/biz-components/Slogan/index.js.map +3 -3
- package/dist/esm/biz-components/Slogan/types.d.ts +0 -1
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
- package/dist/esm/biz-components/Tabs/types.d.ts +0 -1
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +3 -3
- package/dist/esm/biz-components/Title/types.d.ts +0 -1
- package/dist/esm/stories/HeroBanner.stories.js +2 -2
- package/dist/esm/stories/HeroBanner.stories.js.map +2 -2
- package/dist/esm/stories/MultiLayoutGraphicBlock.stories.js +1 -1
- package/dist/esm/stories/MultiLayoutGraphicBlock.stories.js.map +3 -3
- package/dist/esm/stories/accordionCards.stories.d.ts +1 -2
- package/dist/esm/stories/accordionCards.stories.js +1 -1
- package/dist/esm/stories/accordionCards.stories.js.map +3 -3
- package/dist/esm/stories/category.stories.js +1 -1
- package/dist/esm/stories/category.stories.js.map +3 -3
- package/dist/esm/stories/evaluate.stories.js +1 -1
- package/dist/esm/stories/evaluate.stories.js.map +3 -3
- package/dist/esm/stories/graphic.stories.d.ts +0 -1
- package/dist/esm/stories/graphic.stories.js +1 -1
- package/dist/esm/stories/graphic.stories.js.map +3 -3
- package/dist/esm/stories/graphicAttractionBlock.stories.js +1 -1
- package/dist/esm/stories/graphicAttractionBlock.stories.js.map +3 -3
- package/dist/esm/stories/mediaplayerMulti.stories.js +1 -1
- package/dist/esm/stories/mediaplayerMulti.stories.js.map +3 -3
- package/dist/esm/stories/shelfDisplay.stories.js +1 -1
- package/dist/esm/stories/shelfDisplay.stories.js.map +3 -3
- package/dist/esm/stories/slogan.stories.js +2 -2
- package/dist/esm/stories/slogan.stories.js.map +3 -3
- package/package.json +4 -3
|
@@ -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'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta = {\n title: 'Biz-Components/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 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
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GAqBQ,IAAAM,EAAA,6BApBRC,EAAoB,iDACpBC,EAAqB,gBACrBC,EAAwB,uBACxBC,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAAO,CACX,MAAO,yBACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,WAAY,CACVC,MACE,OAAC,OAAI,MAAO,CAAE,WAAY,KAAM,EAC9B,mBAACA,EAAA,EAAM,EACT,CAEJ,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOV,EAAQQ,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,EAEab,EAAiB,CAC5B,KAAM,CACJ,KAAM,
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport Graphic from '../biz-components/Graphic/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta = {\n title: 'Biz-Components/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 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 itemShape: 'round',\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GAqBQ,IAAAM,EAAA,6BApBRC,EAAoB,iDACpBC,EAAqB,gBACrBC,EAAwB,uBACxBC,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAAO,CACX,MAAO,yBACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,mIACb,CACF,CACF,EACA,WAAY,CACVC,MACE,OAAC,OAAI,MAAO,CAAE,WAAY,KAAM,EAC9B,mBAACA,EAAA,EAAM,EACT,CAEJ,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOV,EAAQQ,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,EAEab,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOa,CACT,CACF,CACF,EAEaZ,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAO,mDACP,MAAOY,EACP,UAAW,OACb,CACF,CACF",
|
|
6
6
|
"names": ["graphic_stories_exports", "__export", "Default", "Round", "graphic_stories_default", "__toCommonJS", "import_jsx_runtime", "import_Graphic", "import_gsap", "import_react", "import_ScrollTrigger", "import_SplitText", "meta", "Graphic", "Story", "mockItems"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var p=Object.create;var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of m(e))!g.call(t,i)&&i!==o&&a(t,i,{get:()=>e[i],enumerable:!(r=n(e,i))||r.enumerable});return t};var b=(t,e,o)=>(o=t!=null?p(f(t)):{},l(e||!t||!t.__esModule?a(o,"default",{value:t,enumerable:!0}):o,t)),d=t=>l(a({},"__esModule",{value:!0}),t);var I={};h(I,{Default:()=>k,default:()=>y});module.exports=d(I);var c=require("react/jsx-runtime"),v=require("react"),s=b(require("../biz-components/GraphicAttractionBlock/index.js")),P=require("gsap"),G=require("@gsap/react"),w=require("gsap/dist/ScrollTrigger"),_=require("gsap/dist/SplitText");const u={title:"Biz-Components/GraphicAttractionBlock",component:s.default,tags:["autodocs"],parameters:{layout:"fullscreen",docs:{description:{component:"\u56FE\u6587\u5438\u5F15\u533A\u5757"}}},decorators:[t=>(0,c.jsx)("div",{style:{backgroundColor:"#f5f5f5",padding:"2rem"},children:(0,c.jsx)(t,{})})]};var y=u;const k={args:{data:{shape:"square",sectionTitle:"Install and save electricity costs",imageTitle:"Whole-Home Backup Power",imageDescription:"Maintain a high quality of life during blackouts by powering all kinds of home appliances.",imageUrlPc:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_2121235230.png?v=1747301568",alt:"Image1",thumbnailURL:"https://placehold.co/1920x1080?text=Image1",mimeType:"image/png"},imageUrlMob:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772031.png?v=1747301554",alt:"Image1",thumbnailURL:"https://placehold.co/1920x1080?text=Image1",mimeType:"image/png"},attractionItems:[{title:"storing energy",description:"Maintain a high quality of life during blackouts",icon:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102",alt:"Image1"}},{title:"storing energy",description:"Store solar power for nighttime use with the solar bank.",icon:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102",alt:"Image1"}},{title:"Plug&Play",description:"Connect the Schuko plug to a power socket.",icon:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102",alt:"Image1"}},{title:"Plug&Play",description:"Connect the Schuko plug to a power socket.",icon:{url:"https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102",alt:"Image1"}}]}}};
|
|
2
2
|
//# sourceMappingURL=graphicAttractionBlock.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/graphicAttractionBlock.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport React from 'react'\nimport GraphicAttractionBlock from '../biz-components/GraphicAttractionBlock/index.js'\nimport type { GraphicAttractionBlockProps } from '../biz-components/GraphicAttractionBlock/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta: Meta<typeof GraphicAttractionBlock> = {\n title: 'Biz-Components/GraphicAttractionBlock',\n component: GraphicAttractionBlock,\n tags: ['autodocs'],\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: '\u56FE\u6587\u5438\u5F15\u533A\u5757',\n },\n },\n },\n decorators: [\n Story => (\n <div style={{ backgroundColor: '#f5f5f5', padding: '2rem' }}>\n <Story />\n </div>\n ),\n ],\n}\n\nexport default meta\n\ntype Story = StoryObj<typeof GraphicAttractionBlock>\n\nexport const Default: Story = {\n args: {\n
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAwBQ,IAAAK,EAAA,6BAvBRC,EAAkB,iBAClBC,EAAmC,gEAEnCC,EAAqB,gBACrBF,EAAwB,uBACxBG,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAA4C,CAChD,MAAO,wCACP,UAAW,EAAAC,QACX,KAAM,CAAC,UAAU,EACjB,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,sCACb,CACF,CACF,EACA,WAAY,CACVC,MACE,OAAC,OAAI,MAAO,CAAE,gBAAiB,UAAW,QAAS,MAAO,EACxD,mBAACA,EAAA,EAAM,EACT,CAEJ,CACF,EAEA,IAAOV,EAAQQ,EAIR,MAAMT,EAAiB,CAC5B,KAAM,CACJ,KAAM,
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport React from 'react'\nimport GraphicAttractionBlock from '../biz-components/GraphicAttractionBlock/index.js'\nimport type { GraphicAttractionBlockProps } from '../biz-components/GraphicAttractionBlock/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta: Meta<typeof GraphicAttractionBlock> = {\n title: 'Biz-Components/GraphicAttractionBlock',\n component: GraphicAttractionBlock,\n tags: ['autodocs'],\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: '\u56FE\u6587\u5438\u5F15\u533A\u5757',\n },\n },\n },\n decorators: [\n Story => (\n <div style={{ backgroundColor: '#f5f5f5', padding: '2rem' }}>\n <Story />\n </div>\n ),\n ],\n}\n\nexport default meta\n\ntype Story = StoryObj<typeof GraphicAttractionBlock>\n\nexport const Default: Story = {\n args: {\n data: {\n shape: 'square',\n sectionTitle: 'Install and save electricity costs',\n imageTitle: 'Whole-Home Backup Power',\n imageDescription: 'Maintain a high quality of life during blackouts by powering all kinds of home appliances.',\n imageUrlPc: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_2121235230.png?v=1747301568',\n alt: 'Image1',\n thumbnailURL: 'https://placehold.co/1920x1080?text=Image1',\n mimeType: 'image/png',\n },\n imageUrlMob: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Frame_1973772031.png?v=1747301554',\n alt: 'Image1',\n thumbnailURL: 'https://placehold.co/1920x1080?text=Image1',\n mimeType: 'image/png',\n },\n attractionItems: [\n {\n title: 'storing energy',\n description: 'Maintain a high quality of life during blackouts',\n icon: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102',\n alt: 'Image1',\n },\n },\n {\n title: 'storing energy',\n description: 'Store solar power for nighttime use with the solar bank.',\n icon: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102',\n alt: 'Image1',\n },\n },\n {\n title: 'Plug&Play',\n description: 'Connect the Schuko plug to a power socket.',\n icon: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102',\n alt: 'Image1',\n },\n },\n {\n title: 'Plug&Play',\n description: 'Connect the Schuko plug to a power socket.',\n icon: {\n url: 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/c3269421a5343c0e59065b53bd81c8f5_ba2fc271-206e-4480-b815-9eb76b45f691.png?v=1744612102',\n alt: 'Image1',\n },\n },\n ],\n },\n } satisfies GraphicAttractionBlockProps,\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,YAAAC,IAAA,eAAAC,EAAAJ,GAwBQ,IAAAK,EAAA,6BAvBRC,EAAkB,iBAClBC,EAAmC,gEAEnCC,EAAqB,gBACrBF,EAAwB,uBACxBG,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAA4C,CAChD,MAAO,wCACP,UAAW,EAAAC,QACX,KAAM,CAAC,UAAU,EACjB,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW,sCACb,CACF,CACF,EACA,WAAY,CACVC,MACE,OAAC,OAAI,MAAO,CAAE,gBAAiB,UAAW,QAAS,MAAO,EACxD,mBAACA,EAAA,EAAM,EACT,CAEJ,CACF,EAEA,IAAOV,EAAQQ,EAIR,MAAMT,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,SACP,aAAc,qCACd,WAAY,0BACZ,iBAAkB,6FAClB,WAAY,CACV,IAAK,2FACL,IAAK,SACL,aAAc,6CACd,SAAU,WACZ,EACA,YAAa,CACX,IAAK,2FACL,IAAK,SACL,aAAc,6CACd,SAAU,WACZ,EACA,gBAAiB,CACf,CACE,MAAO,iBACP,YAAa,mDACb,KAAM,CACJ,IAAK,gJACL,IAAK,QACP,CACF,EACA,CACE,MAAO,iBACP,YAAa,2DACb,KAAM,CACJ,IAAK,gJACL,IAAK,QACP,CACF,EACA,CACE,MAAO,YACP,YAAa,6CACb,KAAM,CACJ,IAAK,gJACL,IAAK,QACP,CACF,EACA,CACE,MAAO,YACP,YAAa,6CACb,KAAM,CACJ,IAAK,gJACL,IAAK,QACP,CACF,CACF,CACF,CACF,CACF",
|
|
6
6
|
"names": ["graphicAttractionBlock_stories_exports", "__export", "Default", "graphicAttractionBlock_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_GraphicAttractionBlock", "import_gsap", "import_ScrollTrigger", "import_SplitText", "meta", "GraphicAttractionBlock", "Story"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var m=Object.create;var i=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},c=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of p(t))!d.call(e,a)&&a!==o&&i(e,a,{get:()=>t[a],enumerable:!(s=n(t,a))||s.enumerable});return e};var y=(e,t,o)=>(o=e!=null?m(f(e)):{},c(t||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e)),u=e=>c(i({},"__esModule",{value:!0}),e);var S={};b(S,{Default:()=>g,Multi:()=>v,default:()=>M});module.exports=u(S);var l=y(require("../biz-components/MediaPlayerMulti/index.js")),k=require("gsap"),P=require("@gsap/react"),B=require("gsap/dist/ScrollTrigger"),I=require("gsap/dist/SplitText");const r=[{title:"MKBHD",name:"MKBHD",description:"18.2 Million Youtube subscribers",quote:'"If efficiency means something to you, then definitely check out Anker, who makes these chargers and cables that I really like."',img:{url:"https://cdn.shopify.com/s/files/1/0819/5735/5793/files/9b8ef5a9-97c5-4b81-9fdd-1c2805a12702_dca27557ea115cd0c51fa8ee0d7ebd7b.jpg?v=1745464110",alt:"MKBHD"},video:{url:"https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4"}},{title:"Unbox Therapy",name:"Unbox Therapy",description:"18.2 Million Youtube subscribers",quote:'"I highly recommend the Anker Nano Pro. This truly is a no-brainer."',img:{url:"https://cdn.shopify.com/s/files/1/0819/5735/5793/files/1dd1b39c-1206-48a5-96ec-1083627f51bb_3a34a11a40cbfb857cec1f91eeeaff29.jpg?v=1745464094",alt:"Unbox Therapy"},video:{url:"https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4"}}],h={title:"Biz-Components/MediaPlayerMulti",component:l.default,parameters:{layout:"fullscreen"},tags:["autodocs"]};var M=h;const g={args:{data:{items:r}}},v={args:{data:{items:r?.concat(r)}}};
|
|
2
2
|
//# sourceMappingURL=mediaplayerMulti.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/mediaplayerMulti.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MediaPlayerMulti from '../biz-components/MediaPlayerMulti/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst testimonialItems = [\n {\n title: 'MKBHD',\n name: 'MKBHD',\n description: '18.2 Million Youtube subscribers',\n quote:\n '\"If efficiency means something to you, then definitely check out Anker, who makes these chargers and cables that I really like.\"',\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/9b8ef5a9-97c5-4b81-9fdd-1c2805a12702_dca27557ea115cd0c51fa8ee0d7ebd7b.jpg?v=1745464110',\n alt: 'MKBHD',\n },\n video: {\n url: 'https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4',\n },\n },\n {\n title: 'Unbox Therapy',\n name: 'Unbox Therapy',\n description: '18.2 Million Youtube subscribers',\n quote: '\"I highly recommend the Anker Nano Pro. This truly is a no-brainer.\"',\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/1dd1b39c-1206-48a5-96ec-1083627f51bb_3a34a11a40cbfb857cec1f91eeeaff29.jpg?v=1745464094',\n alt: 'Unbox Therapy',\n },\n video: {\n url: 'https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4',\n },\n },\n]\n\nconst meta = {\n title: 'Biz-Components/MediaPlayerMulti',\n component: MediaPlayerMulti,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof MediaPlayerMulti>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GACA,IAAAM,EAA6B,0DAC7BC,EAAqB,gBACrBC,EAAwB,uBACxBC,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAAmB,CACvB,CACE,MAAO,QACP,KAAM,QACN,YAAa,mCACb,MACE,mIACF,IAAK,CACH,IAAK,gJACL,IAAK,OACP,EACA,MAAO,CACL,IAAK,2EACP,CACF,EACA,CACE,MAAO,gBACP,KAAM,gBACN,YAAa,mCACb,MAAO,uEACP,IAAK,CACH,IAAK,gJACL,IAAK,eACP,EACA,MAAO,CACL,IAAK,2EACP,CACF,CACF,EAEMC,EAAO,CACX,MAAO,kCACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOT,EAAQQ,EAGR,MAAMV,EAAiB,CAC5B,KAAM,CACJ,KAAM,
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MediaPlayerMulti from '../biz-components/MediaPlayerMulti/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst testimonialItems = [\n {\n title: 'MKBHD',\n name: 'MKBHD',\n description: '18.2 Million Youtube subscribers',\n quote:\n '\"If efficiency means something to you, then definitely check out Anker, who makes these chargers and cables that I really like.\"',\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/9b8ef5a9-97c5-4b81-9fdd-1c2805a12702_dca27557ea115cd0c51fa8ee0d7ebd7b.jpg?v=1745464110',\n alt: 'MKBHD',\n },\n video: {\n url: 'https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4',\n },\n },\n {\n title: 'Unbox Therapy',\n name: 'Unbox Therapy',\n description: '18.2 Million Youtube subscribers',\n quote: '\"I highly recommend the Anker Nano Pro. This truly is a no-brainer.\"',\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0819/5735/5793/files/1dd1b39c-1206-48a5-96ec-1083627f51bb_3a34a11a40cbfb857cec1f91eeeaff29.jpg?v=1745464094',\n alt: 'Unbox Therapy',\n },\n video: {\n url: 'https://cdn.shopify.com/videos/c/o/v/97144231c93943c4aae54f8056b1073b.mp4',\n },\n },\n]\n\nconst meta = {\n title: 'Biz-Components/MediaPlayerMulti',\n component: MediaPlayerMulti,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof MediaPlayerMulti>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n data: {\n items: testimonialItems,\n },\n },\n}\n\nexport const Multi: Story = {\n args: {\n data: {\n items: testimonialItems?.concat(testimonialItems),\n },\n },\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GACA,IAAAM,EAA6B,0DAC7BC,EAAqB,gBACrBC,EAAwB,uBACxBC,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAAmB,CACvB,CACE,MAAO,QACP,KAAM,QACN,YAAa,mCACb,MACE,mIACF,IAAK,CACH,IAAK,gJACL,IAAK,OACP,EACA,MAAO,CACL,IAAK,2EACP,CACF,EACA,CACE,MAAO,gBACP,KAAM,gBACN,YAAa,mCACb,MAAO,uEACP,IAAK,CACH,IAAK,gJACL,IAAK,eACP,EACA,MAAO,CACL,IAAK,2EACP,CACF,CACF,EAEMC,EAAO,CACX,MAAO,kCACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOT,EAAQQ,EAGR,MAAMV,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAOS,CACT,CACF,CACF,EAEaR,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAOQ,GAAkB,OAAOA,CAAgB,CAClD,CACF,CACF",
|
|
6
6
|
"names": ["mediaplayerMulti_stories_exports", "__export", "Default", "Multi", "mediaplayerMulti_stories_default", "__toCommonJS", "import_MediaPlayerMulti", "import_gsap", "import_react", "import_ScrollTrigger", "import_SplitText", "testimonialItems", "meta", "MediaPlayerMulti"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var c=Object.create;var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var y=(e,t)=>{for(var o in t)a(e,o,{get:t[o],enumerable:!0})},i=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!u.call(e,r)&&r!==o&&a(e,r,{get:()=>t[r],enumerable:!(s=n(t,r))||s.enumerable});return e};var g=(e,t,o)=>(o=e!=null?c(l(e)):{},i(t||!e||!e.__esModule?a(o,"default",{value:e,enumerable:!0}):o,e)),d=e=>i(a({},"__esModule",{value:!0}),e);var B={};y(B,{Default:()=>S,Round:()=>P,default:()=>h});module.exports=d(B);var m=g(require("../biz-components/ShelfDisplay/index.js")),w=require("gsap"),F=require("@gsap/react"),_=require("gsap/dist/ScrollTrigger"),C=require("gsap/dist/SplitText");const b={title:"Biz-Components/ShelfDisplay",component:m.default,parameters:{layout:"fullscreen"},tags:["autodocs"]};var h=b;const p=[{price:"$1,999.00",basePrice:"$2,999.00",subTitle:"Fast Charging for 3 Devices",title:"Anker Prime 27,650mAh Power Bank (250W)",tagItems:["New","20% OFF"],img:{url:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"}},{price:"$1,999.00",basePrice:"$2,999.00",subTitle:"Fast Charging for 3 Devices",title:"Anker Prime 27,650mAh Power Bank (250W)",tagItems:["New","20% OFF"],img:{url:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554"}}],S={args:{data:{productsCard:p,primaryButton:"Learn More",secondaryButton:"Shop Now"},className:"p-4"}},P={args:{data:{productsCard:p,shape:"round",itemShape:"round",primaryButton:"Learn More",secondaryButton:"Shop Now"},className:"p-4"}};
|
|
2
2
|
//# sourceMappingURL=shelfDisplay.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/shelfDisplay.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport ShelfDisplay from '../biz-components/ShelfDisplay/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta = {\n title: 'Biz-Components/ShelfDisplay',\n component: ShelfDisplay,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof ShelfDisplay>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n price: '$1,999.00',\n basePrice: '$2,999.00',\n subTitle: 'Fast Charging for 3 Devices',\n title: 'Anker Prime 27,650mAh Power Bank (250W)',\n tagItems: ['New', '20% OFF'],\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n },\n {\n price: '$1,999.00',\n basePrice: '$2,999.00',\n subTitle: 'Fast Charging for 3 Devices',\n title: 'Anker Prime 27,650mAh Power Bank (250W)',\n tagItems: ['New', '20% OFF'],\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n },\n]\n\nexport const Default: Story = {\n args: {\n
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GACA,IAAAM,EAAyB,sDACzBC,EAAqB,gBACrBC,EAAwB,uBACxBC,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAAO,CACX,MAAO,8BACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOR,EAAQO,EAGf,MAAME,EAAY,CAChB,CACE,MAAO,YACP,UAAW,YACX,SAAU,8BACV,MAAO,0CACP,SAAU,CAAC,MAAO,SAAS,EAC3B,IAAK,CACH,IAAK,8HACP,CACF,EACA,CACE,MAAO,YACP,UAAW,YACX,SAAU,8BACV,MAAO,0CACP,SAAU,CAAC,MAAO,SAAS,EAC3B,IAAK,CACH,IAAK,8HACP,CACF,CACF,EAEaX,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport ShelfDisplay from '../biz-components/ShelfDisplay/index.js'\nimport { gsap } from 'gsap'\nimport { useGSAP } from '@gsap/react'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { SplitText } from 'gsap/dist/SplitText'\n\nconst meta = {\n title: 'Biz-Components/ShelfDisplay',\n component: ShelfDisplay,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof ShelfDisplay>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\nconst mockItems = [\n {\n price: '$1,999.00',\n basePrice: '$2,999.00',\n subTitle: 'Fast Charging for 3 Devices',\n title: 'Anker Prime 27,650mAh Power Bank (250W)',\n tagItems: ['New', '20% OFF'],\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n },\n {\n price: '$1,999.00',\n basePrice: '$2,999.00',\n subTitle: 'Fast Charging for 3 Devices',\n title: 'Anker Prime 27,650mAh Power Bank (250W)',\n tagItems: ['New', '20% OFF'],\n img: {\n url: 'https://cdn.shopify.com/s/files/1/0517/6767/3016/files/e7be0a68-29b9-431c-8c0f-21bf968b1545_Product_Image_2.png?v=1744274554',\n },\n },\n]\n\nexport const Default: Story = {\n args: {\n data: {\n productsCard: mockItems,\n primaryButton: 'Learn More',\n secondaryButton: 'Shop Now',\n },\n className: 'p-4',\n },\n}\n\nexport const Round: Story = {\n args: {\n data: {\n productsCard: mockItems,\n shape: 'round',\n itemShape: 'round',\n primaryButton: 'Learn More',\n secondaryButton: 'Shop Now',\n },\n className: 'p-4',\n },\n}\n"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAL,GACA,IAAAM,EAAyB,sDACzBC,EAAqB,gBACrBC,EAAwB,uBACxBC,EAA8B,mCAC9BC,EAA0B,+BAE1B,MAAMC,EAAO,CACX,MAAO,8BACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOR,EAAQO,EAGf,MAAME,EAAY,CAChB,CACE,MAAO,YACP,UAAW,YACX,SAAU,8BACV,MAAO,0CACP,SAAU,CAAC,MAAO,SAAS,EAC3B,IAAK,CACH,IAAK,8HACP,CACF,EACA,CACE,MAAO,YACP,UAAW,YACX,SAAU,8BACV,MAAO,0CACP,SAAU,CAAC,MAAO,SAAS,EAC3B,IAAK,CACH,IAAK,8HACP,CACF,CACF,EAEaX,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,aAAcW,EACd,cAAe,aACf,gBAAiB,UACnB,EACA,UAAW,KACb,CACF,EAEaV,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,aAAcU,EACd,MAAO,QACP,UAAW,QACX,cAAe,aACf,gBAAiB,UACnB,EACA,UAAW,KACb,CACF",
|
|
6
6
|
"names": ["shelfDisplay_stories_exports", "__export", "Default", "Round", "shelfDisplay_stories_default", "__toCommonJS", "import_ShelfDisplay", "import_gsap", "import_react", "import_ScrollTrigger", "import_SplitText", "meta", "ShelfDisplay", "mockItems"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var f=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},b=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of g(e))!d.call(t,o)&&o!==r&&a(t,o,{get:()=>e[o],enumerable:!(i=s(e,o))||i.enumerable});return t};var p=t=>b(a({},"__esModule",{value:!0}),t);var x={};f(x,{CustomClassName:()=>S,CustomStyle:()=>M,Default:()=>c,SingleFeature:()=>h,TitleOnly:()=>u,TwoFeatures:()=>C,default:()=>m});module.exports=p(x);var n=require("react/jsx-runtime"),N=require("react"),l=require("../biz-components/index.js");const y={title:"Biz Components/Slogan",component:l.Slogan,parameters:{layout:"fullscreen"},tags:["autodocs"]};var m=y;const c={args:{data:{title:"The World's No.1 Mobile Charging Brand*",features:[{title:"47%<br/>R&D Employees"},{title:"100 Million<br/>Global Customers"},{title:"Pioneering in Charging<br/>Technology for 12 Years"}]}}},u={args:{data:{title:"The World's No.1 Mobile Charging Brand*"}}},h={args:{data:{title:"The World's No.1 Mobile Charging Brand*",features:[{title:"47%<br/>R&D Employees"}]}}},C={args:{data:{title:"The World's No.1 Mobile Charging Brand*",features:[{title:"47%<br/>R&D Employees"},{title:"100 Million<br/>Global Customers"}]}}},S={args:{data:{title:"The World's No.1 Mobile Charging Brand*",features:[{title:"47%<br/>R&D Employees"},{title:"100 Million<br/>Global Customers"},{title:"Pioneering in Charging<br/>Technology for 12 Years"}]},className:"bg-gray-100"}},M=()=>(0,n.jsx)(l.Slogan,{data:{title:"The World's No.1 Mobile Charging Brand*",features:[{title:"47%<br/>R&D Employees"},{title:"100 Million<br/>Global Customers"},{title:"Pioneering in Charging<br/>Technology for 12 Years"}]},className:"bg-gray-100",style:`
|
|
2
2
|
|
|
3
3
|
.slogan-title{
|
|
4
4
|
background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/slogan.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport type { Meta, StoryObj } from '@storybook/react'\nimport { Slogan } from '../biz-components/index.js'\
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,gBAAAC,EAAA,YAAAC,EAAA,kBAAAC,EAAA,cAAAC,EAAA,gBAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAT,
|
|
6
|
-
"names": ["slogan_stories_exports", "__export", "CustomClassName", "CustomStyle", "Default", "SingleFeature", "TitleOnly", "TwoFeatures", "slogan_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_biz_components", "
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { Meta, StoryObj } from '@storybook/react'\nimport { Slogan } from '../biz-components/index.js'\n\nconst meta = {\n title: 'Biz Components/Slogan',\n component: Slogan,\n parameters: {\n layout: 'fullscreen',\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Slogan>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n data: {\n title: \"The World's No.1 Mobile Charging Brand*\",\n features: [\n {\n title: '47%<br/>R&D Employees',\n },\n {\n title: '100 Million<br/>Global Customers',\n },\n {\n title: 'Pioneering in Charging<br/>Technology for 12 Years',\n },\n ],\n },\n },\n}\n\nexport const TitleOnly: Story = {\n args: {\n data: {\n title: \"The World's No.1 Mobile Charging Brand*\",\n },\n },\n}\n\nexport const SingleFeature: Story = {\n args: {\n data: {\n title: \"The World's No.1 Mobile Charging Brand*\",\n features: [\n {\n title: '47%<br/>R&D Employees',\n },\n ],\n },\n },\n}\n\nexport const TwoFeatures: Story = {\n args: {\n data: {\n title: \"The World's No.1 Mobile Charging Brand*\",\n features: [\n {\n title: '47%<br/>R&D Employees',\n },\n {\n title: '100 Million<br/>Global Customers',\n },\n ],\n },\n },\n}\n\nexport const CustomClassName: Story = {\n args: {\n data: {\n title: \"The World's No.1 Mobile Charging Brand*\",\n features: [\n {\n title: '47%<br/>R&D Employees',\n },\n {\n title: '100 Million<br/>Global Customers',\n },\n {\n title: 'Pioneering in Charging<br/>Technology for 12 Years',\n },\n ],\n },\n className: 'bg-gray-100',\n },\n}\n\nexport const CustomStyle = () => {\n return (\n <Slogan\n data={{\n title: \"The World's No.1 Mobile Charging Brand*\",\n features: [\n {\n title: '47%<br/>R&D Employees',\n },\n {\n title: '100 Million<br/>Global Customers',\n },\n {\n title: 'Pioneering in Charging<br/>Technology for 12 Years',\n },\n ],\n }}\n className=\"bg-gray-100\"\n style={`\n \n .slogan-title{\n background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff);\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n animation: fadeIn 1s ease-in forwards;\n }\n\n @keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n .slogan-feature-text {\n background-color: #f0f0f0;\n padding: 10px;\n border-radius: 10px;\n animation: fadeIn 1s ease-in forwards;\n }\n `}\n />\n )\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,gBAAAC,EAAA,YAAAC,EAAA,kBAAAC,EAAA,cAAAC,EAAA,gBAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAT,GA+FI,IAAAU,EAAA,6BA/FJC,EAAkB,iBAElBC,EAAuB,sCAEvB,MAAMC,EAAO,CACX,MAAO,wBACP,UAAW,SACX,WAAY,CACV,OAAQ,YACV,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOL,EAAQK,EAIR,MAAMT,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,0CACP,SAAU,CACR,CACE,MAAO,uBACT,EACA,CACE,MAAO,kCACT,EACA,CACE,MAAO,oDACT,CACF,CACF,CACF,CACF,EAEaE,EAAmB,CAC9B,KAAM,CACJ,KAAM,CACJ,MAAO,yCACT,CACF,CACF,EAEaD,EAAuB,CAClC,KAAM,CACJ,KAAM,CACJ,MAAO,0CACP,SAAU,CACR,CACE,MAAO,uBACT,CACF,CACF,CACF,CACF,EAEaE,EAAqB,CAChC,KAAM,CACJ,KAAM,CACJ,MAAO,0CACP,SAAU,CACR,CACE,MAAO,uBACT,EACA,CACE,MAAO,kCACT,CACF,CACF,CACF,CACF,EAEaL,EAAyB,CACpC,KAAM,CACJ,KAAM,CACJ,MAAO,0CACP,SAAU,CACR,CACE,MAAO,uBACT,EACA,CACE,MAAO,kCACT,EACA,CACE,MAAO,oDACT,CACF,CACF,EACA,UAAW,aACb,CACF,EAEaC,EAAc,OAEvB,OAAC,UACC,KAAM,CACJ,MAAO,0CACP,SAAU,CACR,CACE,MAAO,uBACT,EACA,CACE,MAAO,kCACT,EACA,CACE,MAAO,oDACT,CACF,CACF,EACA,UAAU,cACV,MAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAyBT",
|
|
6
|
+
"names": ["slogan_stories_exports", "__export", "CustomClassName", "CustomStyle", "Default", "SingleFeature", "TitleOnly", "TwoFeatures", "slogan_stories_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_biz_components", "meta"]
|
|
7
7
|
}
|
|
@@ -23,7 +23,6 @@ type AccordionCardsType = {
|
|
|
23
23
|
/** 主按钮配置 */
|
|
24
24
|
primaryButton?: string;
|
|
25
25
|
};
|
|
26
|
-
GSAP?: any;
|
|
27
26
|
};
|
|
28
|
-
declare const AccordionCards: ({ data, className
|
|
27
|
+
declare const AccordionCards: ({ data, className }: AccordionCardsType) => import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
export default AccordionCards;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as C,jsx as r,jsxs as l}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{Fragment as C,jsx as r,jsxs as l}from"react/jsx-runtime";import T from"../Title/index.js";import{cn as s}from"../../helpers/utils.js";import F from"../../components/picture.js";import v from"../../components/button.js";import B from"../SwiperBox/index.js";import{useState as b,useEffect as E,useRef as a}from"react";const S=({data:o,className:d=""})=>{const[c,x]=b(0),[h,y]=b({0:!0}),u=a([]),m=a({0:!0}),i=a(!1),w=(t,e)=>{e&&(u.current[t]=e)},p=t=>{m.current?.[t]&&(i.current=!1,y({[t]:!0}))};E(()=>{const t=u.current;return t?.forEach((e,n)=>{n?(e.style.flex="1 1 0%",e.style.transition="all 0.6s"):(e.style.flex="5 1 0%",e.style.transition="all 0.6s"),e.addEventListener("transitionend",()=>{p(n)})}),()=>{t?.forEach((e,n)=>{e.removeEventListener("transitionend",()=>p(n))})}},[]);const g=({data:t,configuration:e})=>l("div",{className:s("relative w-full shrink-0 grow-0 overflow-hidden border border-solid border-[#dddddd] bg-[#FFFFFF]",e?.itemShape==="round"?"rounded-2xl":""),children:[r(F,{className:"size-full object-cover [&_img]:h-full [&_img]:object-cover",source:t?.img?.url}),l("div",{className:s("absolute inset-x-0 bottom-0 flex flex-col overflow-hidden px-4 pb-4"),children:[l("div",{className:"tablet:mb-6 mb-4 flex-1 overflow-hidden",children:[r("p",{className:"text-2xl font-bold leading-[1.2] text-[#FFFFFF]",children:t?.title}),r("h3",{className:"line-clamp-2 text-sm font-semibold text-[#FFFFFF]",children:t?.subTitle})]}),r(v,{size:"sm",hoverEffect:"slide",variant:"secondary",className:s("w-[116px] overflow-hidden border-[#FFFFFF] bg-transparent text-sm font-bold text-[#FFFFFF]",e?.shape==="round"?"rounded-2xl":""),children:r("a",{href:t.link,children:e?.primaryButton})})]})]});return l(C,{children:[o?.title&&r(T,{data:{title:o?.title}}),r("div",{className:"laptop:block hidden",children:r("div",{className:s("lg-desktop:h-[560px] desktop:h-[448px] flex h-[336px] w-full gap-4 overflow-hidden",d),children:o?.products?.map((t,e)=>{const n=c===e,k=n?5:1,N=h?.[e]&&n;return l("div",{style:{flex:k},ref:f=>{f&&w(e,f)},className:s("relative cursor-pointer overflow-hidden",o?.itemShape==="round"?"rounded-2xl":""),onClick:()=>{c===e||i.current||(i.current=!0,m.current={[e]:!0},x(e))},children:[r(F,{source:t?.img?.url,className:"size-full object-cover [&_img]:h-full [&_img]:object-cover"}),l("div",{className:s("absolute inset-x-0 bottom-0 flex translate-x-4 items-end justify-between overflow-hidden px-8 pb-8",N?"w-full translate-x-0 opacity-100 transition-transform ease-out":"w-0 opacity-0"),children:[l("div",{className:"mr-16 flex-1 overflow-hidden",children:[r("p",{className:"laptop:text-2xl desktop:text-[32px] mb-1 text-xl font-bold text-[#FFFFFF]",children:t?.title}),r("h3",{className:"desktop:text-lg line-clamp-2 text-sm font-medium text-[#FFFFFF]",children:t?.subTitle})]}),r(v,{size:"sm",hoverEffect:"slide",variant:"secondary",className:s("desktop:text-base mb-1.5 overflow-hidden border-[#FFFFFF] bg-transparent text-sm font-bold text-[#FFFFFF]",o?.shape==="round"?"rounded-2xl":""),children:r("a",{href:t?.link,children:o?.primaryButton})})]})]},e)})})}),r("div",{className:"laptop:hidden block",children:r(B,{className:s("h-[400px] !overflow-visible",d),id:"AccordionCards"+o?.key,data:{list:o?.products,configuration:{shape:o?.shape,itemShape:o?.itemShape,primaryButton:o?.primaryButton}},Slide:g,breakpoints:{0:{spaceBetween:"12px",freeMode:!1,slidesPerView:1},374:{spaceBetween:"12px",freeMode:!1,slidesPerView:1.2},768:{spaceBetween:"12px",freeMode:!1,slidesPerView:2.3}}})})]})};var H=S;export{H as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/AccordionCards/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { useState, useEffect, useRef } from 'react'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\ntype ItemType = {\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: {\n url: string\n }\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n link?: string\n}\n\ntype AccordionCardsType = {\n className?: string\n data: {\n key?: string\n title?: string\n products: Array<ItemType>\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n }\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "Title", "cn", "Picture", "Button", "SwiperBox", "useState", "useEffect", "useRef", "AccordionCards", "data", "className", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { useState, useEffect, useRef } from 'react'\n\n/** Hook\uFF1A\u76D1\u542C\u7A97\u53E3\u5BBD\u5EA6 */\ntype ItemType = {\n /** \u6807\u9898\u6587\u672C */\n title: string\n /** \u56FE\u7247*/\n img: {\n url: string\n }\n /** \u5185\u5BB9\u8282\u70B9 */\n subTitle: string\n link?: string\n}\n\ntype AccordionCardsType = {\n className?: string\n data: {\n key?: string\n title?: string\n products: Array<ItemType>\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n }\n}\n\nconst AccordionCards = ({ data, className = '' }: AccordionCardsType) => {\n const [hoverIndex, setHoverIndex] = useState<number | null>(0)\n const [currentWidth, setCurrentWidth] = useState<{ [key: number]: boolean }>({ 0: true })\n\n const accordionRef = useRef<HTMLDivElement[]>([])\n const enterRef = useRef<{ [key: number]: boolean }>({ 0: true })\n const isAnimation = useRef<boolean>(false)\n\n const getRef = (index: number, el: HTMLDivElement) => {\n if (el) {\n accordionRef.current[index] = el\n }\n }\n\n const handleTransitionEnd = (index: number) => {\n if (enterRef.current?.[index]) {\n isAnimation.current = false\n setCurrentWidth({ [index]: true })\n }\n }\n\n useEffect(() => {\n const element = accordionRef.current\n element?.forEach((item, index) => {\n if (!index) {\n item.style.flex = '5 1 0%'\n item.style.transition = 'all 0.6s'\n } else {\n item.style.flex = '1 1 0%'\n item.style.transition = 'all 0.6s'\n }\n item.addEventListener('transitionend', () => {\n handleTransitionEnd(index)\n })\n })\n return () => {\n element?.forEach((item, index) => {\n item.removeEventListener('transitionend', () => handleTransitionEnd(index))\n })\n }\n }, [])\n\n const MobileItem = ({ data, configuration }: { data: ItemType; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'relative w-full shrink-0 grow-0 overflow-hidden border border-solid border-[#dddddd] bg-[#FFFFFF]',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <Picture className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\" source={data?.img?.url} />\n <div className={cn('absolute inset-x-0 bottom-0 flex flex-col overflow-hidden px-4 pb-4')}>\n <div className=\"tablet:mb-6 mb-4 flex-1 overflow-hidden\">\n <p className=\"text-2xl font-bold leading-[1.2] text-[#FFFFFF]\">{data?.title}</p>\n <h3 className=\"line-clamp-2 text-sm font-semibold text-[#FFFFFF]\">{data?.subTitle}</h3>\n </div>\n <Button\n size=\"sm\"\n hoverEffect=\"slide\"\n variant=\"secondary\"\n className={cn(\n 'w-[116px] overflow-hidden border-[#FFFFFF] bg-transparent text-sm font-bold text-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <a href={data.link}>{configuration?.primaryButton}</a>\n </Button>\n </div>\n </div>\n )\n }\n\n return (\n <>\n {data?.title && <Title data={{ title: data?.title }} />}\n <div className=\"laptop:block hidden\">\n <div\n className={cn(\n 'lg-desktop:h-[560px] desktop:h-[448px] flex h-[336px] w-full gap-4 overflow-hidden',\n className\n )}\n >\n {data?.products?.map((item, idx) => {\n const isExpanded = hoverIndex === idx\n const flexValue = isExpanded ? 5 : 1\n const isShowContent = currentWidth?.[idx] && isExpanded\n return (\n <div\n key={idx}\n style={{\n flex: flexValue,\n }}\n ref={(el: HTMLDivElement | null) => {\n if (el) getRef(idx, el)\n }}\n className={cn(\n 'relative cursor-pointer overflow-hidden',\n data?.itemShape === 'round' ? 'rounded-2xl' : ''\n )}\n onClick={() => {\n if (hoverIndex === idx || isAnimation.current) return\n isAnimation.current = true\n // \u66F4\u65B0 ref \u72B6\u6001\n enterRef.current = { [idx]: true }\n // \u66F4\u65B0\u5BBD\u5EA6\u76F8\u5173\u72B6\u6001\n setHoverIndex(idx)\n }}\n >\n <Picture\n source={item?.img?.url}\n className=\"size-full object-cover [&_img]:h-full [&_img]:object-cover\"\n />\n <div\n className={cn(\n 'absolute inset-x-0 bottom-0 flex translate-x-4 items-end justify-between overflow-hidden px-8 pb-8',\n isShowContent ? 'w-full translate-x-0 opacity-100 transition-transform ease-out' : 'w-0 opacity-0'\n )}\n >\n <div className=\"mr-16 flex-1 overflow-hidden\">\n <p className=\"laptop:text-2xl desktop:text-[32px] mb-1 text-xl font-bold text-[#FFFFFF]\">\n {item?.title}\n </p>\n <h3 className=\"desktop:text-lg line-clamp-2 text-sm font-medium text-[#FFFFFF]\">\n {item?.subTitle}\n </h3>\n </div>\n <Button\n size=\"sm\"\n hoverEffect=\"slide\"\n variant=\"secondary\"\n className={cn(\n 'desktop:text-base mb-1.5 overflow-hidden border-[#FFFFFF] bg-transparent text-sm font-bold text-[#FFFFFF]',\n data?.shape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <a href={item?.link}>{data?.primaryButton}</a>\n </Button>\n </div>\n </div>\n )\n })}\n </div>\n </div>\n <div className=\"laptop:hidden block\">\n <SwiperBox\n className={cn('h-[400px] !overflow-visible', className)}\n id={'AccordionCards' + data?.key}\n data={{\n list: data?.products,\n configuration: {\n shape: data?.shape,\n itemShape: data?.itemShape,\n primaryButton: data?.primaryButton,\n },\n }}\n Slide={MobileItem}\n breakpoints={{\n 0: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 2.3,\n },\n }}\n />\n </div>\n </>\n )\n}\n\nexport default AccordionCards\n"],
|
|
5
|
+
"mappings": "aAsF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OACC,UAAWE,EACT,qGACA4B,EAAgB,iEAAmE,eACrF,EAEA,UAAA9B,EAAC,OAAI,UAAU,+BACb,UAAAD,EAAC,KAAE,UAAU,4EACV,SAAAyB,GAAM,MACT,EACAzB,EAAC,MAAG,UAAU,kEACX,SAAAyB,GAAM,SACT,GACF,EACAzB,EAACK,EAAA,CACC,KAAK,KACL,YAAY,QACZ,QAAQ,YACR,UAAWF,EACT,4GACAQ,GAAM,QAAU,QAAU,cAAgB,EAC5C,EAEA,SAAAX,EAAC,KAAE,KAAMyB,GAAM,KAAO,SAAAd,GAAM,cAAc,EAC5C,GACF,IAjDKiB,CAkDP,CAEJ,CAAC,EACH,EACF,EACA5B,EAAC,OAAI,UAAU,sBACb,SAAAA,EAACM,EAAA,CACC,UAAWH,EAAG,8BAA+BS,CAAS,EACtD,GAAI,iBAAmBD,GAAM,IAC7B,KAAM,CACJ,KAAMA,GAAM,SACZ,cAAe,CACb,MAAOA,GAAM,MACb,UAAWA,GAAM,UACjB,cAAeA,GAAM,aACvB,CACF,EACA,MAAOe,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,GACjB,CACF,EACF,EACF,GACF,CAEJ,EAEA,IAAOM,EAAQtB",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "Title", "cn", "Picture", "Button", "SwiperBox", "useState", "useEffect", "useRef", "AccordionCards", "data", "className", "hoverIndex", "setHoverIndex", "currentWidth", "setCurrentWidth", "accordionRef", "enterRef", "isAnimation", "getRef", "index", "el", "handleTransitionEnd", "element", "item", "MobileItem", "configuration", "idx", "isExpanded", "flexValue", "isShowContent", "AccordionCards_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as m,jsx as t,jsxs as n}from"react/jsx-runtime";import"react";import{cn as i}from"../../helpers/utils.js";import s from"../../components/picture.js";import{withStyles as
|
|
1
|
+
"use client";import{Fragment as m,jsx as t,jsxs as n}from"react/jsx-runtime";import"react";import{cn as i}from"../../helpers/utils.js";import s from"../../components/picture.js";import{withStyles as u}from"../../shared/Styles.js";import p from"../Title/index.js";import c from"./SwiperCategory.js";const g=(e,o)=>{const a=[];for(let r=0;r<e.length;r+=o)a.push(e.slice(r,r+o));return a},f=({data:e,configuration:o})=>n("div",{className:i("group box-border flex h-auto w-full flex-col overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 duration-300 hover:bg-[#FFFFFF]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:"transition-all duration-300 group-hover:scale-110",children:t(s,{source:e?.image?.url||e?.image,className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"})}),t("p",{className:"tablet:text-lg box-border line-clamp-2 flex-1 text-center text-sm font-semibold",children:e?.name})]}),b=({data:e,configuration:o})=>n("div",{className:i("box-border max-h-[126px] w-full overflow-hidden bg-[#EAEAEC]","cursor-pointer px-3 py-4 duration-300 hover:bg-[#FFFFFF]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t(s,{className:"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image}),t("p",{className:"flex-1 truncate text-center text-sm font-semibold",children:e?.name})]},`${e?.name}`),h=({data:e,configuration:o})=>n("div",{className:i("aspect-h-[240] group box-border h-auto flex-1 shrink-0 overflow-hidden bg-[#EAEAEC]","laptop:p-6 desktop:p-8 cursor-pointer p-4 duration-300 hover:bg-[#FFFFFF]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:"transition-all duration-300 group-hover:scale-110",children:t(s,{className:"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover",source:e?.image?.url||e?.image})}),t("p",{className:"tablet:text-lg text-center text-sm font-semibold",children:e?.name})]}),v=({data:e,configuration:o,index:a})=>n("div",{className:i("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?"aspect-h-[252] row-span-2":"aspect-h-[120]",o?.shape==="round"?"rounded-2xl":"rounded-none"),children:[t("div",{className:i(a===0?"max-h-[146px]":"max-h-[72px] max-w-[72px]"),children:t(s,{className:i("m-auto mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover"),source:e?.image?.url||e?.image})}),t("p",{className:"line-clamp-2 text-center text-sm font-semibold",children:e?.name})]}),x=({data:e,configuration:o})=>t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((a,r)=>t(b,{data:a,configuration:o},r))}),y=({data:e,configuration:o})=>n(m,{children:[t("div",{className:"tablet:block hidden",children:t("div",{className:"mx-auto flex w-full gap-4",children:e?.map((a,r)=>t(h,{data:a,configuration:o},r))})}),t("div",{className:"tablet:hidden block",children:t("div",{className:"grid grid-cols-2 gap-3",children:e?.map((a,r)=>t(v,{index:r,data:a,configuration:o},r))})})]}),C=({data:e,buildData:o,className:a="",key:r})=>{const l=e?.isShowSelect?e?.products:e?.productData,d=l?.length<=5;return n("div",{className:i("w-full",a),children:[e?.title&&t(p,{data:{title:e?.title}}),d?t(y,{data:l,configuration:{shape:e?.shape}}):n(m,{children:[t("div",{className:"tablet:block hidden",children:t(c,{id:`Category${r}`,Slide:f,data:{list:l,configuration:{shape:e?.shape}}})}),t("div",{className:"tablet:hidden block overflow-hidden",children:t(c,{id:`Category1${r}`,Slide:x,data:{list:g(l,6),configuration:{shape:e?.shape}}})})]})]})};var E=u(C);export{E as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Category/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from './SwiperCategory.js'\n\nexport interface CategoryItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n image: any\n name: string\n}\n\nexport interface CategoryProps {\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "cn", "Picture", "withStyles", "Title", "SwiperBox", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "SingleItem", "SinglePcCategoryItem", "SingleMobileCategoryItem", "index", "CategoryMobileItem", "item", "SoundCoreCategoryItem", "Category", "buildData", "className", "key", "
|
|
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: any\n name: string\n}\n\nexport interface CategoryProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n data: {\n isShowSelect: boolean\n products: CategoryItem[]\n productData: 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 'group box-border flex h-auto w-full flex-col overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 duration-300 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Picture\n source={data?.image?.url || data?.image}\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n />\n </div>\n <p className=\"tablet:text-lg box-border line-clamp-2 flex-1 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\nconst SingleItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n key={`${data?.name}`}\n className={cn(\n 'box-border max-h-[126px] w-full overflow-hidden bg-[#EAEAEC]',\n 'cursor-pointer px-3 py-4 duration-300 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <Picture\n className=\"m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n <p className=\"flex-1 truncate text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore pc\u5C55\u793A\nconst SinglePcCategoryItem = ({ data, configuration }: { data: CategoryItem; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'aspect-h-[240] group box-border h-auto flex-1 shrink-0 overflow-hidden bg-[#EAEAEC]',\n 'laptop:p-6 desktop:p-8 cursor-pointer p-4 duration-300 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className=\"transition-all duration-300 group-hover:scale-110\">\n <Picture\n className=\"laptop:size-[146px] m-auto mb-2 flex size-[72px] justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover\"\n source={data?.image?.url || data?.image}\n />\n </div>\n <p className=\"tablet:text-lg text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// soundcore mobile\u5C55\u793A\nconst SingleMobileCategoryItem = ({\n data,\n configuration,\n index,\n}: {\n data: CategoryItem\n configuration?: any\n index: number\n}) => {\n return (\n <div\n className={cn(\n '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 ? 'aspect-h-[252] row-span-2' : 'aspect-h-[120]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className={cn(index === 0 ? 'max-h-[146px]' : 'max-h-[72px] max-w-[72px]')}>\n <Picture\n className={cn(\n 'm-auto mb-2 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto [&_img]:object-cover'\n )}\n source={data?.image?.url || data?.image}\n />\n </div>\n <p className=\"line-clamp-2 text-center text-sm font-semibold\">{data?.name}</p>\n </div>\n )\n}\n\n// \u5176\u5B83\u54C1\u724Cmobile\u5C55\u793A\nconst CategoryMobileItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n )\n}\n\n// soundcore\u5C55\u793A\nconst SoundCoreCategoryItem = ({ data, configuration }: { data: CategoryItem[]; configuration?: any }) => {\n return (\n <>\n <div className=\"tablet:block hidden\">\n <div className=\"mx-auto flex w-full gap-4\">\n {data?.map((item, index) => {\n return <SinglePcCategoryItem key={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n <div className=\"tablet:hidden block\">\n <div className=\"grid grid-cols-2 gap-3\">\n {data?.map((item, index) => {\n return <SingleMobileCategoryItem key={index} index={index} data={item} configuration={configuration} />\n })}\n </div>\n </div>\n </>\n )\n}\n\nconst Category: React.FC<CategoryProps> = ({ data, buildData, className = '', key }) => {\n // soundcore\u54C1\u724C\u54C1\u7C7B\u4E0D\u8D85\u8FC75\u4E2A\uFF0C\u5355\u72EC\u505A\u6837\u5F0F\u5904\u7406\n const currentData = data?.isShowSelect ? data?.products : data?.productData\n const isSoundCore = currentData?.length <= 5\n return (\n <div className={cn('w-full', className)}>\n {data?.title && <Title data={{ title: data?.title }} />}\n {isSoundCore ? (\n <SoundCoreCategoryItem data={currentData} configuration={{ shape: data?.shape }} />\n ) : (\n <>\n <div className=\"tablet:block hidden\">\n <SwiperBox\n id={`Category${key}`}\n Slide={CategoryPcItem}\n data={{ list: currentData, configuration: { shape: data?.shape } }}\n />\n </div>\n <div className=\"tablet:hidden block overflow-hidden\">\n <SwiperBox\n id={`Category1${key}`}\n Slide={CategoryMobileItem}\n data={{ list: chunkArray(currentData, 6), configuration: { shape: data?.shape } }}\n />\n </div>\n </>\n )}\n </div>\n )\n}\n\nexport default withStyles(Category)\n"],
|
|
5
|
+
"mappings": "aA2CI,OAwGA,YAAAA,EAhGI,OAAAC,EARJ,QAAAC,MAAA,oBA1CJ,MAAkB,QAClB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAW,oBAClB,OAAOC,MAAe,sBA2BtB,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,4EACA,4EACAY,GAAe,QAAU,QAAU,cAAgB,cACrD,EAEA,UAAAd,EAAC,OAAI,UAAU,oDACb,SAAAA,EAACG,EAAA,CACC,OAAQU,GAAM,OAAO,KAAOA,GAAM,MAClC,UAAU,kIACZ,EACF,EACAb,EAAC,KAAE,UAAU,kFAAmF,SAAAa,GAAM,KAAK,GAC7G,EAIEE,EAAa,CAAC,CAAE,KAAAF,EAAM,cAAAC,CAAc,IAEt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picture", "withStyles", "Title", "SwiperBox", "chunkArray", "arr", "size", "chunks", "i", "CategoryPcItem", "data", "configuration", "SingleItem", "SinglePcCategoryItem", "SingleMobileCategoryItem", "index", "CategoryMobileItem", "item", "SoundCoreCategoryItem", "Category", "buildData", "className", "key", "currentData", "isSoundCore", "Category_default"]
|
|
7
7
|
}
|
|
@@ -22,7 +22,6 @@ export interface EvaluateProps {
|
|
|
22
22
|
shape?: 'round' | 'square';
|
|
23
23
|
};
|
|
24
24
|
key?: string;
|
|
25
|
-
GSAP?: any;
|
|
26
25
|
}
|
|
27
26
|
declare const _default: {
|
|
28
27
|
(props: Omit<EvaluateProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as n,jsx as e,jsxs as r}from"react/jsx-runtime";import"react";import m from"../Title/index.js";import{cn as i}from"../../helpers/utils.js";import p from"../../components/picture.js";import c from"../SwiperBox/index.js";import{withStyles as f}from"../../shared/Styles.js";import{Avatar as v,AvatarImage as u,AvatarFallback as g}from"../../components/avatar.js";const w=({data:t,configuration:s})=>{const o=l=>l?Array.from(new Array(Number(l)))||[]:[];return r("div",{className:i("box-border flex w-full cursor-pointer flex-col overflow-hidden bg-[#EAEAEC] p-4 duration-300 hover:bg-[#FFFFFF]",s?.shape==="round"?"rounded-2xl":"rounded-none","desktop:h-[384px] lg-desktop:h-[480px] h-[360px]"),children:[r("div",{className:i("laptop:mb-11 desktop:mb-16 mb-8 flex w-full justify-between"),children:[r("div",{className:"flex-1",children:[e("h4",{className:"laptop:text-lg text-sm font-bold",children:t?.title}),e("div",{className:"mt-1 flex items-center",children:o(t?.rating)?.map?.((l,a)=>e("div",{className:"mr-1",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})})},a))})]}),e("div",{className:"desktop:size-12 size-10 overflow-hidden",children:e(v,{className:"size-full",isAdaptation:!t?.avatar?.url,children:t?.avatar?.url?r(n,{children:[e(u,{src:t?.avatar?.url}),e(g,{children:t?.title})]}):t?.title})})]}),e("p",{className:"desktop:text-2xl line-clamp-6 flex-1 text-xl font-bold text-[#1D1D1F]",children:t?.description||""}),r("div",{className:i("mt-11 flex items-center overflow-hidden bg-[#F7F8F9] p-3",s?.shape==="round"?"rounded-lg":"rounded-none"),children:[e("div",{className:"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center",children:e(p,{className:"w-full object-cover",source:t?.img?.url})}),e("p",{className:"lg-desktop:text-lg line-clamp-2 flex-1 text-sm font-bold",children:t?.subTitle||""})]})]})},x=({className:t="",data:s,key:o})=>{const{products:l,title:a,...d}=s;return e(n,{children:r("div",{className:i("w-full",t),children:[a&&e(m,{data:{title:a}}),e(c,{className:"!overflow-visible",id:"Evaluate"+o,data:{list:l,configuration:{...d}},Slide:w,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3.1},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})})};var L=f(x);export{L as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Evaluate/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React from 'react'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: {\n url: string\n }\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n}\n\nexport interface EvaluateProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n }\n key?: string\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "Title", "cn", "Picture", "SwiperBox", "withStyles", "Avatar", "AvatarImage", "AvatarFallback", "EvaluateItem", "data", "configuration", "handleRating", "num", "_", "index", "Evaluate", "className", "key", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: {\n url: string\n }\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n}\n\nexport interface EvaluateProps {\n className?: string\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const handleRating = (num: number) => {\n if (num) {\n return Array.from(new Array(Number(num))) || []\n }\n return []\n }\n\n return (\n <div\n className={cn(\n 'box-border flex w-full cursor-pointer flex-col overflow-hidden bg-[#EAEAEC] p-4 duration-300 hover:bg-[#FFFFFF]',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'desktop:h-[384px] lg-desktop:h-[480px] h-[360px]'\n )}\n >\n <div className={cn('laptop:mb-11 desktop:mb-16 mb-8 flex w-full justify-between')}>\n <div className=\"flex-1\">\n <h4 className=\"laptop:text-lg text-sm font-bold\">{data?.title}</h4>\n <div className=\"mt-1 flex items-center\">\n {handleRating(data?.rating)?.map?.((_, index) => {\n return (\n <div key={index} className=\"mr-1\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n </div>\n )\n })}\n </div>\n </div>\n <div className=\"desktop:size-12 size-10 overflow-hidden\">\n <Avatar className=\"size-full\" isAdaptation={!data?.avatar?.url}>\n {data?.avatar?.url ? (\n <>\n <AvatarImage src={data?.avatar?.url} />\n <AvatarFallback>{data?.title}</AvatarFallback>\n </>\n ) : (\n data?.title\n )}\n </Avatar>\n </div>\n </div>\n <p className=\"desktop:text-2xl line-clamp-6 flex-1 text-xl font-bold text-[#1D1D1F]\">{data?.description || ''}</p>\n <div\n className={cn(\n 'mt-11 flex items-center overflow-hidden bg-[#F7F8F9] p-3',\n configuration?.shape === 'round' ? 'rounded-lg' : 'rounded-none'\n )}\n >\n <div className=\"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center\">\n <Picture className=\"w-full object-cover\" source={data?.img?.url} />\n </div>\n <p className=\"lg-desktop:text-lg line-clamp-2 flex-1 text-sm font-bold\">{data?.subTitle || ''}</p>\n </div>\n </div>\n )\n}\n\nconst Evaluate: React.FC<EvaluateProps> = ({ className = '', data, key }) => {\n const { products, title, ...ohter } = data\n return (\n <>\n <div className={cn('w-full', className)}>\n {title && <Title data={{ title: title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Evaluate' + key}\n data={{ list: products, configuration: { ...ohter } }}\n Slide={EvaluateItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3.1,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n </>\n )\n}\n\nexport default withStyles(Evaluate)\n"],
|
|
5
|
+
"mappings": "aAqDQ,OAoBM,YAAAA,EAnBJ,OAAAC,EADF,QAAAC,MAAA,oBApDR,MAAkB,QAClB,OAAO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,cACpD,EAEA,UAAAZ,EAAC,OAAI,UAAU,gEACb,SAAAA,EAACI,EAAA,CAAQ,UAAU,sBAAsB,OAAQO,GAAM,KAAK,IAAK,EACnE,EACAX,EAAC,KAAE,UAAU,2DAA4D,SAAAW,GAAM,UAAY,GAAG,GAChG,GACF,CAEJ,EAEMM,EAAoC,CAAC,CAAE,UAAAC,EAAY,GAAI,KAAAP,EAAM,IAAAQ,CAAI,IAAM,CAC3E,KAAM,CAAE,SAAAC,EAAU,MAAAC,EAAO,GAAGC,CAAM,EAAIX,EACtC,OACEX,EAAAD,EAAA,CACE,SAAAE,EAAC,OAAI,UAAWE,EAAG,SAAUe,CAAS,EACnC,UAAAG,GAASrB,EAACE,EAAA,CAAM,KAAM,CAAE,MAAOmB,CAAM,EAAG,EACzCrB,EAACK,EAAA,CACC,UAAU,oBACV,GAAI,WAAac,EACjB,KAAM,CAAE,KAAMC,EAAU,cAAe,CAAE,GAAGE,CAAM,CAAE,EACpD,MAAOZ,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EACF,CAEJ,EAEA,IAAOa,EAAQjB,EAAWW,CAAQ",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "Title", "cn", "Picture", "SwiperBox", "withStyles", "Avatar", "AvatarImage", "AvatarFallback", "EvaluateItem", "data", "configuration", "handleRating", "num", "_", "index", "Evaluate", "className", "key", "products", "title", "ohter", "Evaluate_default"]
|
|
7
7
|
}
|
|
@@ -13,7 +13,6 @@ export interface GraphicProps extends ComponentCommonProps {
|
|
|
13
13
|
items?: GraphicType[];
|
|
14
14
|
itemShape?: 'round' | 'square';
|
|
15
15
|
};
|
|
16
|
-
GSAP?: any;
|
|
17
16
|
}
|
|
18
17
|
declare const _default: {
|
|
19
18
|
(props: Omit<GraphicProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps> & {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as o}from"react/jsx-runtime";import
|
|
1
|
+
"use client";import{jsx as t,jsxs as o}from"react/jsx-runtime";import p from"react";import{cn as r}from"../../helpers/utils.js";import{withStyles as a}from"../../shared/Styles.js";import n from"../SwiperBox/index.js";import{Heading as m}from"../../components/index.js";import{Picture as d,Text as c}from"../../components/index.js";import f from"../Title/index.js";const h=({data:e,configuration:i})=>t("div",{className:"lg-desktop:h-[480px] desktop:h-[384px] h-[360px] flex-1 shrink-0 md:basis-[296px]",children:o("div",{className:r("relative h-full",{"rounded-xl overflow-hidden laptop:rounded-2xl":i?.itemShape==="round"}),children:[t(d,{className:"h-full",imgClassName:"h-full object-cover hover:scale-110 transition-all duration-300",source:e?.imgUrl?.url}),o("div",{className:"laptop:p-6 absolute bottom-0 z-[1] flex w-full flex-col p-4",children:[t(c,{style:{color:e?.textColor},html:e?.title,className:"line-clamp-3 desktop:text-[18px] text-[14px] font-semibold leading-[1.2"}),e?.description&&t(m,{html:e?.description,style:{color:e?.textColor},as:"h3",className:"lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 text-[24px] font-bold leading-[1.2]"})]})]})}),l=p.forwardRef(({data:e,className:i,...x},u)=>{const s=e?.items?.length>2;return o("div",{children:[e?.title&&t(f,{data:{title:e?.title}}),t(n,{className:r("!overflow-visible",i),id:"Graphic",data:{list:e?.items||[],configuration:{itemShape:e.itemShape}},Slide:h,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:s?2.3:2},1024:{spaceBetween:16,freeMode:!1,slidesPerView:s?3.1:2},1440:{spaceBetween:16,freeMode:!1,slidesPerView:s?4:2}}})]})});l.displayName="Graphic";var G=a(l);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 from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Heading } 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\ntype GraphicType = {\n imgUrl: Img\n title: string\n description?: string\n textColor?: string\n}\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: GraphicType[]\n itemShape?: 'round' | 'square'\n }\n
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "cn", "withStyles", "SwiperBox", "Heading", "Picture", "Text", "Title", "Item", "data", "configuration", "Graphic", "className", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Heading } 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\ntype GraphicType = {\n imgUrl: Img\n title: string\n description?: string\n textColor?: string\n}\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: GraphicType[]\n itemShape?: 'round' | 'square'\n }\n}\n\nconst Item = ({ data, configuration }: { data: GraphicType; configuration?: any }) => {\n return (\n <div className=\"lg-desktop:h-[480px] desktop:h-[384px] h-[360px] flex-1 shrink-0 md:basis-[296px]\">\n <div\n className={cn('relative h-full', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: configuration?.itemShape === 'round',\n })}\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover hover:scale-110 transition-all duration-300\"\n source={data?.imgUrl?.url}\n />\n <div className=\"laptop:p-6 absolute bottom-0 z-[1] flex w-full flex-col p-4\">\n <Text\n style={{\n color: data?.textColor,\n }}\n html={data?.title}\n // eslint-disable-next-line tailwindcss/classnames-order\n className=\"line-clamp-3 desktop:text-[18px] text-[14px] font-semibold leading-[1.2\"\n />\n {data?.description && (\n <Heading\n html={data?.description}\n style={{\n color: data?.textColor,\n }}\n as=\"h3\"\n className=\"lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 text-[24px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, className, ...props }, ref) => {\n const isShow = (data?.items as GraphicType[])?.length > 2\n return (\n <div>\n {data?.title && <Title data={{ title: data?.title }} />}\n <SwiperBox\n className={cn('!overflow-visible', className)}\n id={'Graphic'}\n data={{ list: data?.items || [], configuration: { itemShape: data.itemShape } }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isShow ? 2.3 : 2,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isShow ? 3.1 : 2,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: isShow ? 4 : 2,\n },\n }}\n />\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withStyles(Graphic)\n"],
|
|
5
|
+
"mappings": "aAiCQ,cAAAA,EAKA,QAAAC,MALA,oBAhCR,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O,EAAS,IAAM,CAChC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAS,IAAM,CAChC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAS,EAAI,CAC9B,CACF,EACF,GACF,CAEJ,CAAC,EAEDJ,EAAQ,YAAc,UAEtB,IAAOK,EAAQd,EAAWS,CAAO",
|
|
6
|
+
"names": ["jsx", "jsxs", "React", "cn", "withStyles", "SwiperBox", "Heading", "Picture", "Text", "Title", "Item", "data", "configuration", "Graphic", "className", "props", "ref", "isShow", "Graphic_default"]
|
|
7
7
|
}
|