@anker-in/headless-ui 1.0.29 → 1.1.1
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/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +2 -2
- package/dist/cjs/biz-components/Features/index.d.ts +26 -0
- package/dist/cjs/biz-components/Features/index.js +2 -0
- package/dist/cjs/biz-components/Features/index.js.map +7 -0
- package/dist/cjs/biz-components/FootCharger/index.d.ts +12 -0
- package/dist/cjs/biz-components/FootCharger/index.js +2 -0
- package/dist/cjs/biz-components/FootCharger/index.js.map +7 -0
- package/dist/cjs/biz-components/GraphicMore/index.d.ts +22 -0
- package/dist/cjs/biz-components/GraphicMore/index.js +2 -0
- package/dist/cjs/biz-components/GraphicMore/index.js.map +7 -0
- 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/ShelfDisplay/shelfDisplayItem.js +4 -4
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/cjs/biz-components/Specs/index.js +1 -1
- package/dist/cjs/biz-components/Specs/index.js.map +3 -3
- package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
- package/dist/cjs/biz-components/Tabs/Tabs.js.map +2 -2
- package/dist/cjs/biz-components/Tabs/types.d.ts +1 -0
- package/dist/cjs/biz-components/Tabs/types.js +1 -1
- package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
- package/dist/cjs/biz-components/TextModal/index.js +1 -1
- package/dist/cjs/biz-components/TextModal/index.js.map +2 -2
- 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 +2 -0
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/biz-components/index.d.ts +3 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/stories/graphic.stories.d.ts +1 -0
- package/dist/cjs/types/props.d.ts +1 -0
- package/dist/cjs/types/props.js +1 -1
- package/dist/cjs/types/props.js.map +1 -1
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +2 -2
- package/dist/esm/biz-components/Features/index.d.ts +26 -0
- package/dist/esm/biz-components/Features/index.js +2 -0
- package/dist/esm/biz-components/Features/index.js.map +7 -0
- package/dist/esm/biz-components/FootCharger/index.d.ts +12 -0
- package/dist/esm/biz-components/FootCharger/index.js +2 -0
- package/dist/esm/biz-components/FootCharger/index.js.map +7 -0
- package/dist/esm/biz-components/GraphicMore/index.d.ts +22 -0
- package/dist/esm/biz-components/GraphicMore/index.js +2 -0
- package/dist/esm/biz-components/GraphicMore/index.js.map +7 -0
- 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/ShelfDisplay/shelfDisplayItem.js +5 -5
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
- package/dist/esm/biz-components/Specs/index.js +1 -1
- package/dist/esm/biz-components/Specs/index.js.map +3 -3
- package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
- package/dist/esm/biz-components/Tabs/Tabs.js.map +2 -2
- package/dist/esm/biz-components/Tabs/types.d.ts +1 -0
- package/dist/esm/biz-components/TextModal/index.js +1 -1
- package/dist/esm/biz-components/TextModal/index.js.map +2 -2
- 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 +2 -0
- package/dist/esm/biz-components/index.d.ts +3 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/stories/graphic.stories.d.ts +1 -0
- package/dist/esm/types/props.d.ts +1 -0
- package/dist/tokens/base.css +7 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'"],
|
|
5
|
-
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,
|
|
6
|
-
"names": ["biz_components_exports", "__export", "__toCommonJS", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_Title", "import_Spacer", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_MediaPlayerBase", "import_MediaPlayerSticky", "import_MediaPlayerMulti", "import_Marquee", "import_WhyChoose", "import_Faq", "import_MultiLayoutGraphicBlock", "import_GraphicAttractionBlock", "import_HeaderNavigation", "import_FooterNavigation", "import_SearchPage", "import_types", "import_Styles", "import_AiuiProvider", "import_Tabs", "import_CreativeModule", "import_GraphicOverlay", "import_Specs", "import_TabsGroup"]
|
|
4
|
+
"sourcesContent": ["export { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as Features } from './Features/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\nexport { default as GraphicMore } from './GraphicMore/index.js'"],
|
|
5
|
+
"mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,2hCAAAE,EAAAF,GAAA,IAAAG,EAAuC,qCACvCC,EAAwC,sCACxCC,EAAkC,gCAClCC,EAAiC,+BACjCC,EAAkC,gCAClCC,EAAwC,sCACxCC,EAAoC,kCACpCC,EAAoC,kCACpCC,EAAsC,oCACtCC,EAA0C,wCAC1CC,EAAmC,iCACnCC,EAA2C,yCAC3CC,EAA6C,2CAC7CC,EAA4C,0CAC5CC,EAAmC,iCACnCC,EAAqC,mCACrCC,EAA+B,6BAC/BF,EAAqE,8BACrEG,EAAmD,iDAEnDC,EAAkD,gDAElDC,EAA4C,0CAC5CC,EAA4C,0CAC5CC,EAAsC,oCAEtCC,EAAmD,iCAEnDC,EAA2B,+BAC3BC,EAAwC,sCACxCC,EAAgC,8BAChCC,EAA0C,wCAC1CC,EAA0C,wCAC1CC,EAAiC,+BACjCC,EAAoC,mCAEpCC,EAAoC,kCACpCC,EAAuC,qCACvCC,EAAuC",
|
|
6
|
+
"names": ["biz_components_exports", "__export", "__toCommonJS", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_Title", "import_Spacer", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_MediaPlayerBase", "import_MediaPlayerSticky", "import_MediaPlayerMulti", "import_Marquee", "import_WhyChoose", "import_Faq", "import_MultiLayoutGraphicBlock", "import_GraphicAttractionBlock", "import_HeaderNavigation", "import_FooterNavigation", "import_SearchPage", "import_types", "import_Styles", "import_AiuiProvider", "import_Tabs", "import_CreativeModule", "import_GraphicOverlay", "import_Specs", "import_TabsGroup", "import_Features", "import_FootCharger", "import_GraphicMore"]
|
|
7
7
|
}
|
package/dist/cjs/types/props.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var s=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of i(e))!g.call(t,p)&&p!==o&&n(t,p,{get:()=>e[p],enumerable:!(r=a(e,p))||r.enumerable});return t};var m=t=>s(n({},"__esModule",{value:!0}),t);var l={};module.exports=m(l);
|
|
2
2
|
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/types/props.ts"],
|
|
4
|
-
"sourcesContent": ["export interface ComponentCommonProps {\n style?: string\n event?: any\n condition?: any\n className?: string\n id?: string\n key?: string\n}\n\nexport type ContainerProps = {\n containerMode?: Mode\n spaceY?: SpaceY\n spaceTop?: SpaceTop\n spaceBottom?: SpaceBottom\n}\n\nexport type Mode = 'section' | 'fragment'\n\nexport type SpaceY = 'default' | 'none' | string\nexport type SpaceTop = 'default' | 'none' | string\nexport type SpaceBottom = 'default' | 'none' | string\n\nexport type Img = {\n url: string\n alt?: string\n}\n\nexport type Video = {\n url: string\n}\n\nexport type Theme = 'light' | 'dark'\nexport type Shape = 'rounded' | 'square'\nexport type Align = 'left' | 'center' | 'right'\n\nexport type Media = {\n alt: string\n url: string\n thumbnailURL: string\n mimeType: 'video/mp4' | 'image/jpeg' | 'image/png' | 'image/webp'\n width?: number\n height?: number\n focalX?: number\n focalY?: number\n}\n\nexport type GSAPContext = {\n gsap?: any\n ScrollTrigger?: any\n SplitText?: any\n}\n"],
|
|
4
|
+
"sourcesContent": ["export interface ComponentCommonProps {\n wrapperClassName?: string\n style?: string\n event?: any\n condition?: any\n className?: string\n id?: string\n key?: string\n}\n\nexport type ContainerProps = {\n containerMode?: Mode\n spaceY?: SpaceY\n spaceTop?: SpaceTop\n spaceBottom?: SpaceBottom\n}\n\nexport type Mode = 'section' | 'fragment'\n\nexport type SpaceY = 'default' | 'none' | string\nexport type SpaceTop = 'default' | 'none' | string\nexport type SpaceBottom = 'default' | 'none' | string\n\nexport type Img = {\n url: string\n alt?: string\n}\n\nexport type Video = {\n url: string\n}\n\nexport type Theme = 'light' | 'dark'\nexport type Shape = 'rounded' | 'square'\nexport type Align = 'left' | 'center' | 'right'\n\nexport type Media = {\n alt: string\n url: string\n thumbnailURL: string\n mimeType: 'video/mp4' | 'image/jpeg' | 'image/png' | 'image/webp'\n width?: number\n height?: number\n focalX?: number\n focalY?: number\n}\n\nexport type GSAPContext = {\n gsap?: any\n ScrollTrigger?: any\n SplitText?: any\n}\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["props_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as i}from"react/jsx-runtime";import x,{useImperativeHandle as
|
|
1
|
+
"use client";import{jsx as t,jsxs as i}from"react/jsx-runtime";import x,{useImperativeHandle as w,useRef as v}from"react";import h from"../Title/index.js";import{cn as a}from"../../helpers/utils.js";import b from"../../components/picture.js";import g from"../SwiperBox/index.js";import{withLayout as k}from"../../shared/Styles.js";import{Avatar as N,AvatarImage as y,AvatarFallback as C}from"../../components/avatar.js";import{Container as L}from"../../components/container.js";import{Text as T}from"../../components/text.js";import{useExposure as E}from"../../hooks/useExposure.js";import{trackUrlRef as M}from"../../shared/trackUrlRef.js";const p="copy",m="product_review",P=({data:e,configuration:r})=>{const n=v(null),d=o=>{const s=Number(o),l=Number.isFinite(s)?Math.max(0,Math.floor(s)):0;return Array.from({length:l})||[]};return E(n,{componentType:p,componentName:m,componentTitle:e?.title,componentDescription:e?.description,position:r?.index+1}),t("div",{ref:n,className:a("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300",r?.shape==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:i("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[i("div",{className:a("lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between"),children:[i("div",{className:"flex-1",children:[e?.title?t("h4",{className:"laptop:text-lg text-sm font-bold",children:e?.title}):null,t("div",{className:"mt-1 flex items-center",children:d(e?.rating)?.map?.((o,s)=>t("div",{className:"mr-1",children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:t("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"})})},s))})]}),t("div",{className:"desktop:size-12 size-10 overflow-hidden",children:e?.avatar?.url?i(N,{className:"size-full",isAdaptation:!e?.avatar?.url,children:[t(y,{src:e?.avatar?.url}),t(C,{children:e?.title})]}):null})]}),t("div",{className:"flex-1",children:t(T,{className:a("lg-desktop:text-2xl text-info-primary line-clamp-5 break-words text-xl font-bold leading-[1.2] evaluate-description"),children:e?.description||""})}),t("a",{href:M(e?.link,`${p}_${m}`),onClick:()=>{r?.event?.primaryButton(e,r?.index+1)},"data-headless-type-name":`${p}#${m}`,"data-headless-title-desc-button":`${e?.title}#${e?.description||e?.subTitle}`,"data-headless-nav-postion":`''#${r?.index+1}`,children:i("div",{className:a("mt-3 flex items-center cursor-pointer overflow-hidden bg-[#F7F8F9] p-3",r?.shape==="round"?"rounded-lg":"rounded-none"),children:[t("div",{className:"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center",children:t(b,{className:"w-full object-cover",source:e?.img?.url,alt:e?.img?.alt||""})}),t("p",{className:"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]",children:e?.subTitle||""})]})})]})})},B=x.forwardRef(({className:e="",data:r,key:n,...d},o)=>{const{products:s,title:l,theme:f,...u}=r,c=v(null);return w(o,()=>c.current),t("div",{className:e,ref:c,children:t("div",{className:"evaluate-box relative z-10",children:t(L,{...r?.containerProps||{},className:"overflow-hidden",children:i("div",{ref:o,className:a("w-full",e,{"aiui-dark":f==="dark"}),children:[l&&t(h,{data:{title:l}}),t(g,{className:"!overflow-visible",id:"Evaluate"+n,data:{list:s,configuration:{...u,title:l}},Slide:P,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})})})})});var S=k(B);export{S 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, { useImperativeHandle, useRef } 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 { withLayout } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\nimport { Container } from '../../components/container.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'copy'\nconst componentName = 'product_review'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: Img\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n link?: string\n}\n\nexport interface EvaluateProps {\n className?: string\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u4E3B\u9898\u8272*/\n theme?: Theme\n containerProps?: ContainerProps\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const handleRating = (num: number) => {\n const raw = Number(num)\n const count = Number.isFinite(raw) ? Math.max(0, Math.floor(raw)) : 0\n return Array.from({ length: count }) || []\n }\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n componentDescription: data?.description,\n position: configuration?.index + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div className={cn('lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between')}>\n <div className=\"flex-1\">\n {data?.title ? <h4 className=\"laptop:text-lg text-sm font-bold\">{data?.title}</h4> : null}\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 {data?.avatar?.url ? (\n <Avatar className=\"size-full\" isAdaptation={!data?.avatar?.url}>\n <AvatarImage src={data?.avatar?.url} />\n <AvatarFallback>{data?.title}</AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n </div>\n <div className=\"flex-1\">\n <Text\n className={cn(\n '
|
|
5
|
-
"mappings": "aA8EU,OACiB,OAAAA,EADjB,QAAAC,MAAA,oBA7EV,OAAOC,GAAS,uBAAAC,EAAqB,UAAAC,MAAc,QACnD,OAAOC,MAAW,oBAClB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAOC,MAAe,wBACtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,UAAAC,EAAQ,eAAAC,EAAa,kBAAAC,MAAsB,6BACpD,OAAS,aAAAC,MAAiB,gCAC1B,OAAS,QAAAC,MAAY,2BAErB,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,eAAAC,MAAmB,8BAG5B,MAAMC,EAAgB,OAChBC,EAAgB,iBAiChBC,EAAe,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAAmD,CAC7F,MAAMC,EAAMlB,EAAuB,IAAI,EACjCmB,EAAgBC,GAAgB,CACpC,MAAMC,EAAM,OAAOD,CAAG,EAChBE,EAAQ,OAAO,SAASD,CAAG,EAAI,KAAK,IAAI,EAAG,KAAK,MAAMA,CAAG,CAAC,EAAI,EACpE,OAAO,MAAM,KAAK,CAAE,OAAQC,CAAM,CAAC,GAAK,CAAC,CAC3C,EAEA,OAAAX,EAAYO,EAAK,CACf,cAAAL,EACA,cAAAC,EACA,eAAgBE,GAAM,MACtB,qBAAsBA,GAAM,YAC5B,SAAUC,GAAe,MAAQ,CACnC,CAAC,EAGCrB,EAAC,OACC,IAAKsB,EACL,UAAWhB,EACT,qGACAe,GAAe,QAAU,QAAU,cAAgB,eACnD,oGACA,qFACA,qBACF,EAEA,SAAApB,EAAC,OAAI,UAAU,4EACb,UAAAA,EAAC,OAAI,UAAWK,EAAG,iEAAiE,EAClF,UAAAL,EAAC,OAAI,UAAU,SACZ,UAAAmB,GAAM,MAAQpB,EAAC,MAAG,UAAU,mCAAoC,SAAAoB,GAAM,MAAM,EAAQ,KACrFpB,EAAC,OAAI,UAAU,yBACZ,SAAAuB,EAAaH,GAAM,MAAM,GAAG,MAAM,CAACO,EAAGC,IAEnC5B,EAAC,OAAgB,UAAU,OACzB,SAAAA,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,QACC,EAAE,6oBACF,KAAK,UACP,EACF,GANQ4B,CAOV,CAEH,EACH,GACF,EACA5B,EAAC,OAAI,UAAU,0CACZ,SAAAoB,GAAM,QAAQ,IACbnB,EAACS,EAAA,CAAO,UAAU,YAAY,aAAc,CAACU,GAAM,QAAQ,IACzD,UAAApB,EAACW,EAAA,CAAY,IAAKS,GAAM,QAAQ,IAAK,EACrCpB,EAACY,EAAA,CAAgB,SAAAQ,GAAM,MAAM,GAC/B,EACE,KACN,GACF,EACApB,EAAC,OAAI,UAAU,SACb,SAAAA,EAACc,EAAA,CACC,UAAWR,EACT,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } 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 { withLayout } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\nimport { Container } from '../../components/container.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'copy'\nconst componentName = 'product_review'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: Img\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n link?: string\n}\n\nexport interface EvaluateProps {\n className?: string\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u4E3B\u9898\u8272*/\n theme?: Theme\n containerProps?: ContainerProps\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n const handleRating = (num: number) => {\n const raw = Number(num)\n const count = Number.isFinite(raw) ? Math.max(0, Math.floor(raw)) : 0\n return Array.from({ length: count }) || []\n }\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n componentDescription: data?.description,\n position: configuration?.index + 1,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div className={cn('lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between')}>\n <div className=\"flex-1\">\n {data?.title ? <h4 className=\"laptop:text-lg text-sm font-bold\">{data?.title}</h4> : null}\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 {data?.avatar?.url ? (\n <Avatar className=\"size-full\" isAdaptation={!data?.avatar?.url}>\n <AvatarImage src={data?.avatar?.url} />\n <AvatarFallback>{data?.title}</AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n </div>\n <div className=\"flex-1\">\n <Text\n className={cn(\n 'lg-desktop:text-2xl text-info-primary line-clamp-5 break-words text-xl font-bold leading-[1.2] evaluate-description'\n )}\n >\n {data?.description || ''}\n </Text>\n </div>\n <a\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n onClick={() => {\n configuration?.event?.primaryButton(data, configuration?.index + 1)\n }}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description || data?.subTitle}`}\n data-headless-nav-postion={`''#${configuration?.index + 1}`}\n >\n <div\n className={cn(\n 'mt-3 flex items-center cursor-pointer 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} alt={data?.img?.alt || ''} />\n </div>\n <p className=\"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]\">\n {data?.subTitle || ''}\n </p>\n </div>\n </a>\n </div>\n </div>\n )\n}\n\nconst Evaluate = React.forwardRef<HTMLDivElement, EvaluateProps>(({ className = '', data, key, ...rest }, ref) => {\n const { products, title, theme, ...ohter } = data\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n return (\n <div className={className} ref={innerRef}>\n <div className=\"evaluate-box relative z-10\">\n <Container {...(data?.containerProps || {})} className=\"overflow-hidden\">\n <div ref={ref} className={cn('w-full', className, { 'aiui-dark': theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Evaluate' + key}\n data={{ list: products, configuration: { ...ohter, title: title } }}\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.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n </Container>\n </div>\n </div>\n )\n})\n\nexport default withLayout(Evaluate)\n"],
|
|
5
|
+
"mappings": "aA8EU,OACiB,OAAAA,EADjB,QAAAC,MAAA,oBA7EV,OAAOC,GAAS,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AAU,MAAAC,EAAO,MAAAC,EAAO,GAAGC,CAAM,EAAIhB,EACvCiB,EAAWjC,EAAuB,IAAI,EAC5C,OAAAD,EAAoBmB,EAAK,IAAMe,EAAS,OAAyB,EAG/DrC,EAAC,OAAI,UAAW8B,EAAW,IAAKO,EAC9B,SAAArC,EAAC,OAAI,UAAU,6BACb,SAAAA,EAACa,EAAA,CAAW,GAAIO,GAAM,gBAAkB,CAAC,EAAI,UAAU,kBACrD,SAAAnB,EAAC,OAAI,IAAKqB,EAAK,UAAWhB,EAAG,SAAUwB,EAAW,CAAE,YAAaK,IAAU,MAAO,CAAC,EAChF,UAAAD,GAASlC,EAACK,EAAA,CAAM,KAAM,CAAE,MAAO6B,CAAM,EAAG,EACzClC,EAACQ,EAAA,CACC,UAAU,oBACV,GAAI,WAAauB,EACjB,KAAM,CAAE,KAAME,EAAU,cAAe,CAAE,GAAGG,EAAO,MAAOF,CAAM,CAAE,EAClE,MAAOf,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,CACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EACF,EACF,EACF,CAEJ,CAAC,EAED,IAAOmB,EAAQ7B,EAAWoB,CAAQ",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "Title", "cn", "Picture", "SwiperBox", "withLayout", "Avatar", "AvatarImage", "AvatarFallback", "Container", "Text", "useExposure", "trackUrlRef", "componentType", "componentName", "EvaluateItem", "data", "configuration", "ref", "handleRating", "num", "raw", "count", "_", "index", "Evaluate", "className", "key", "rest", "products", "title", "theme", "ohter", "innerRef", "Evaluate_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Img } from '../../types/props.js';
|
|
2
|
+
export type FeaturesDataType = {
|
|
3
|
+
img: Img;
|
|
4
|
+
mobileImg: Img;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
numberOne: string;
|
|
8
|
+
textOne: string;
|
|
9
|
+
numberTwo: string;
|
|
10
|
+
textTwo: string;
|
|
11
|
+
icon: Img;
|
|
12
|
+
};
|
|
13
|
+
type FeaturesType = {
|
|
14
|
+
data: {
|
|
15
|
+
title: string;
|
|
16
|
+
img: Img;
|
|
17
|
+
mobileImg: Img;
|
|
18
|
+
list: FeaturesDataType[];
|
|
19
|
+
};
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<FeaturesType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
23
|
+
className?: string;
|
|
24
|
+
data?: Record<string, any>;
|
|
25
|
+
} & import("react").RefAttributes<any>>;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Fragment as n,jsx as t,jsxs as a}from"react/jsx-runtime";import"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as r}from"../../shared/Styles.js";import{Picture as p,Text as s}from"../../components/index.js";const x=d=>{const{data:l,className:g}=d,{list:i}=l;return t(n,{children:a("div",{className:"",children:[l?.title&&t("div",{className:"pb-[24px] desktop:w-[800px]",children:t(s,{html:l?.title,className:" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]"})}),l?.img?.url&&t(p,{className:"aspect-[1664/560] rounded-2xl md-tablet:hidden",imgClassName:"",source:l?.img?.url,alt:l?.img?.alt||""}),l?.mobileImg?.url&&t(p,{className:"aspect-[358/360] rounded-2xl tablet:hidden",imgClassName:"",source:l?.mobileImg?.url,alt:l?.mobileImg?.alt||""}),t("div",{className:"",children:t("div",{className:"flex flex-col gap-4",children:i.map((e,o)=>a("div",{className:`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${o%2===0?"laptop:flex-row-reverse":""}`,children:[a("div",{className:"flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]",children:[t(s,{html:e?.title,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]"}),t(s,{html:e?.description,className:"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]"}),e?.numberOne&&a("div",{className:"desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]",children:[a("div",{className:"",children:[t(s,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(s,{html:e?.textOne,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]}),a("div",{children:[t(s,{style:{background:"var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))",backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",color:"transparent"},html:e?.numberTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]"}),t(s,{html:e?.textTwo,className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]"})]})]}),e?.icon?.url&&t("div",{className:"pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]",children:t(p,{className:"w-[358px] desktop:w-[368px] lg-desktop:w-[488px]",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),t("div",{className:"aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]",children:t(p,{className:"w-full h-full object-cover ",source:e?.img?.url,alt:e?.img?.alt||""})}),t("div",{className:"aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]",children:t(p,{className:"w-full h-full object-cover",source:e?.mobileImg?.url,alt:e?.mobileImg?.alt||""})})]},o))})})]})})};var f=r(x);export{f as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/Features/index.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type FeaturesDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n numberOne: string\n textOne: string\n numberTwo: string\n textTwo: string\n icon: Img\n}\ntype FeaturesType = {\n data: {\n title: string\n img: Img\n mobileImg: Img\n list: FeaturesDataType[]\n }\n className?: string\n}\nconst Features = (props: FeaturesType) => {\n const { data, className } = props\n const { list } = data\n return (\n <>\n <div className=''>\n {data?.title && (\n <div className='pb-[24px] desktop:w-[800px]'>\n <Text\n html={data?.title}\n className=\" desktop:!text-[32px] line-clamp-3 lg-desktop:text-lg desktop:text-base !text-[24px] [&_*_strong]:!font-bold !leading-[1.2]\"\n />\n </div>\n )}\n {data?.img?.url && (\n <Picture\n className=\"aspect-[1664/560] rounded-2xl md-tablet:hidden\"\n imgClassName=\"\"\n source={data?.img?.url}\n alt={data?.img?.alt || ''}\n />\n )}\n {data?.mobileImg?.url && (\n <Picture\n className=\"aspect-[358/360] rounded-2xl tablet:hidden\"\n imgClassName=\"\"\n source={data?.mobileImg?.url}\n alt={data?.mobileImg?.alt || ''}\n />\n )}\n <div className=''>\n <div className='flex flex-col gap-4'>\n {list.map((item, index) => (\n <div key={index} className={`desktop:flex pt-[64px] gap-4 tablet:gap-8 laptop:gap-[64px] ${index % 2 === 0 ? 'laptop:flex-row-reverse' : ''}`}>\n <div className='flex flex-col flex-shrink-0 justify-center desktop:w-[500px] lg-desktop:w-[640px]'>\n <Text\n html={item?.title}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[32px] text-[24px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n <Text\n html={item?.description}\n className=\"graphic-title pt-[4px] desktop:pt-[8px] lg-desktop:text-lg desktop:text-base lg-desktop:text-[18px] desktop:text-[16px] text-[14px] [&_*_strong]:!font-bold leading-[1.2]\"\n />\n {/* \u6E10\u53D8\u8272 */}\n {item?.numberOne && \n <div className='desktop:pt-[48px] pt-[24px] flex desktop:flex-col flex-row desktop:gap-[48px] gap-[24px]'>\n <div className=''>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textOne}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n <div>\n <Text\n style={{\n background: 'var(--1, linear-gradient(90deg, #3AD1FF 0%, #008CD6 100%))',\n backgroundClip: 'text',\n WebkitBackgroundClip: 'text',\n WebkitTextFillColor: 'transparent',\n color: 'transparent', // \u5EFA\u8BAE\u52A0\u4E0A\uFF0C\u517C\u5BB9\u90E8\u5206\u6D4F\u89C8\u5668\n }}\n html={item?.numberTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[64px] text-[40px] [&_*_strong]:!font-bold leading-[1]\"\n />\n <Text\n html={item?.textTwo}\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base desktop:text-[18px] text-[14px] [&_*_strong]:!font-bold leading-[1.4]\"\n />\n </div>\n \n \n </div>\n }\n {item?.icon?.url && \n <div className='pt-[24px] desktop:pt-[24px] lg-desktop:pt-[48px]'><Picture className='w-[358px] desktop:w-[368px] lg-desktop:w-[488px]' source={item?.icon?.url} alt={item?.icon?.alt || ''} /></div>\n }\n </div>\n <div className='aspect-[964/560] md-tablet:hidden rounded-2xl overflow-hidden pt-[24px] laptop:pt-[32px] desktop:pt-[0px]'>\n <Picture className='w-full h-full object-cover ' source={item?.img?.url} alt={item?.img?.alt || ''} />\n </div>\n <div className='aspect-[358/360] tablet:hidden rounded-2xl overflow-hidden mt-[24px]'>\n <Picture className='w-full h-full object-cover' source={item?.mobileImg?.url} alt={item?.mobileImg?.alt || ''} />\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n </>\n )\n}\nexport default withLayout(Features)"],
|
|
5
|
+
"mappings": "aA8BI,mBAAAA,EAIQ,OAAAC,EAsCgB,QAAAC,MA1CxB,oBA7BJ,MAAmB,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAqB9B,MAAMC,EAAYC,GAAwB,CACxC,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,KAAAG,CAAK,EAAIF,EACjB,OACEP,EAAAD,EAAA,CACE,SAAAE,EAAC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AA,CAAQ,UAAU,mDAAmD,OAAQO,GAAM,MAAM,IAAK,IAAKA,GAAM,MAAM,KAAO,GAAI,EAAE,GAEnM,EACAV,EAAC,OAAI,UAAU,4GACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,8BAA8B,OAAQO,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EACxG,EACAV,EAAC,OAAI,UAAU,uEACX,SAAAA,EAACG,EAAA,CAAQ,UAAU,6BAA6B,OAAQO,GAAM,WAAW,IAAK,IAAKA,GAAM,WAAW,KAAO,GAAI,EACnH,IA5DMC,CA6DV,CACH,EACL,EACA,GACF,EACF,CAEJ,EACA,IAAOC,EAAQV,EAAWG,CAAQ",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "withLayout", "Picture", "Text", "Features", "props", "data", "className", "list", "item", "index", "Features_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type FootChargerType = {
|
|
2
|
+
data: {
|
|
3
|
+
title: string;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<FootChargerType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
9
|
+
className?: string;
|
|
10
|
+
data?: Record<string, any>;
|
|
11
|
+
} & import("react").RefAttributes<any>>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Fragment as l,jsx as t,jsxs as m}from"react/jsx-runtime";import"../../helpers/utils.js";import{withLayout as i}from"../../shared/Styles.js";import{Text as e}from"../../components/index.js";const p=o=>{const{data:s}=o,{title:a,text:r}=s;return t(l,{children:m("div",{className:"",children:[t("div",{children:t(e,{html:a,className:"text-[#6D6D6F] font-bold leading-[1.4] [&_span]:text-[#1D1D1F] text-[16px] desktop:text-[18px]"})}),t("div",{className:"mt-[24px]",children:t(e,{html:r,className:"text-[#3D3D3F] [&_*_strong]:!font-bold leading-[1.4] text-[14px]"})})]})})};var f=i(p);export{f as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/FootCharger/index.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Text } from '../../components/index.js'\ntype FootChargerType = {\n data: {\n title: string\n text: string\n }\n className?: string\n}\nconst FootCharger = (props: FootChargerType) => {\n const { data } = props\n const { title, text } = data\n return (\n <>\n <div className=''>\n <div>\n <Text html={title} className='text-[#6D6D6F] font-bold leading-[1.4] [&_span]:text-[#1D1D1F] text-[16px] desktop:text-[18px]' />\n </div>\n <div className='mt-[24px]'>\n <Text html={text} className='text-[#3D3D3F] [&_*_strong]:!font-bold leading-[1.4] text-[14px]' />\n </div>\n </div>\n </>\n )\n}\nexport default withLayout(FootCharger)"],
|
|
5
|
+
"mappings": "aAgBI,mBAAAA,EAGM,OAAAC,EAFJ,QAAAC,MADF,oBAfJ,MAAmB,yBAEnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAkB,QAAAC,MAAY,4BAQ9B,MAAMC,EAAeC,GAA2B,CAC9C,KAAM,CAAE,KAAAC,CAAK,EAAID,EACX,CAAE,MAAAE,EAAO,KAAAC,CAAK,EAAIF,EACxB,OACEN,EAAAD,EAAA,CACE,SAAAE,EAAC,OAAI,UAAU,GACb,UAAAD,EAAC,OACC,SAAAA,EAACG,EAAA,CAAK,KAAMI,EAAO,UAAU,iGAAiG,EAChI,EACAP,EAAC,OAAI,UAAU,YACb,SAAAA,EAACG,EAAA,CAAK,KAAMK,EAAM,UAAU,mEAAmE,EACjG,GACF,EACF,CAEJ,EACA,IAAOC,EAAQP,EAAWE,CAAW",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "withLayout", "Text", "FootCharger", "props", "data", "title", "text", "FootCharger_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Img } from '../../types/props.js';
|
|
2
|
+
export type GraphicMoreDataType = {
|
|
3
|
+
img: Img;
|
|
4
|
+
mobileImg: Img;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
theme: 'light' | 'dark';
|
|
8
|
+
fullWidth: 'true' | 'false';
|
|
9
|
+
span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
10
|
+
};
|
|
11
|
+
type GraphicMoreType = {
|
|
12
|
+
data: {
|
|
13
|
+
shape?: 'rounded' | 'square';
|
|
14
|
+
productsTab: GraphicMoreDataType[];
|
|
15
|
+
};
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<GraphicMoreType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
19
|
+
className?: string;
|
|
20
|
+
data?: Record<string, any>;
|
|
21
|
+
} & import("react").RefAttributes<any>>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";import{Fragment as g,jsx as t,jsxs as l}from"react/jsx-runtime";import{cn as o}from"../../helpers/utils.js";import"../SwiperBox/index.js";import{withLayout as c}from"../../shared/Styles.js";import{Grid as f,GridItem as u}from"../../components/gird.js";import{Picture as s,Text as a}from"../../components/index.js";const x=p=>{const{data:m,className:n}=p,{productsTab:i,shape:d}=m;return l(g,{children:[t("div",{className:o("creativeModuleBlock","text-info-primary tablet:block box-border hidden w-full overflow-hidden"),children:t(f,{className:o("tablet:gap-4 grid grid-cols-12 gap-3 ",n),children:i?.map((e,r)=>l(u,{span:e.span,className:o("text-info-primary relative w-full overflow-hidden",d==="rounded"?"rounded-2xl":"rounded-none","",{"aiui-dark":e.theme==="dark"}),children:[t(s,{source:e.img.url,className:"size-full",imgClassName:""}),l("div",{className:"footBottom lg-desktop:top-8 lg-desktop:px-8 desktop:top-6 desktop:px-6 absolute top-4 px-4 flex flex-col gap-[6px] left-0 right-0 overflow-hidden",children:[e.title&&t(a,{html:e.title,as:"p",className:"line-clamp-2 lg-desktop:text-[24px] text-[20px] leading-[1.2] font-bold"}),e.description&&t(a,{html:e.description,className:"line-clamp-2 desktop:text-lg text-sm font-bold"})]})]},r))})}),t("div",{className:"text-info-primary tablet:hidden block",children:t("div",{className:" flex gap-[12px] flex-wrap",children:i?.map((e,r)=>l("div",{className:o("text-info-primary relative overflow-hidden",d==="rounded"?"rounded-xl":"rounded-none",{"aiui-dark":e.theme==="dark"},e?.fullWidth==="true"?"w-full flex-none":" w-[calc(50%-6px)]"),children:[t(s,{source:e.mobileImg.url,className:"size-full",imgClassName:"h-full object-cover"}),l("div",{className:"footBottomMob absolute top-4 px-4 flex flex-col gap-[6px] left-0 right-0 overflow-hidden",children:[e.title&&t(a,{html:e.title,as:"p",className:"text-xl font-bold leading-[1.2] line-clamp-3"}),e.description&&t(a,{html:e.description,className:"text-xl font-bold line-clamp-2"})]})]},r))})})]})};var w=c(x);export{w as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/GraphicMore/index.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Picture, Text } from '../../components/index.js'\nexport type GraphicMoreDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n fullWidth: 'true' | 'false'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\ntype GraphicMoreType = {\n data: {\n shape?: 'rounded' | 'square'\n productsTab: GraphicMoreDataType[]\n }\n className?: string\n}\nconst GraphicMore = (props: GraphicMoreType) => {\n const { data, className } = props\n const { productsTab, shape } = data\n return (\n <>\n <div className={cn('creativeModuleBlock', 'text-info-primary tablet:block box-border hidden w-full overflow-hidden')}>\n <Grid className={cn('tablet:gap-4 grid grid-cols-12 gap-3 ', className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n '',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Picture source={item.img.url} className=\"size-full\" imgClassName=\"\" />\n <div className=\"footBottom lg-desktop:top-8 lg-desktop:px-8 desktop:top-6 desktop:px-6 absolute top-4 px-4 flex flex-col gap-[6px] left-0 right-0 overflow-hidden\">\n {item.title && (\n <Text\n html={item.title}\n as=\"p\"\n className=\"line-clamp-2 lg-desktop:text-[24px] text-[20px] leading-[1.2] font-bold\"\n />\n )}\n {item.description && (\n <Text html={item.description} className=\"line-clamp-2 desktop:text-lg text-sm font-bold\" />\n )}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className='text-info-primary tablet:hidden block'>\n <div className=\" flex gap-[12px] flex-wrap\">\n {productsTab?.map((it, ind) => {\n return (\n <div\n key={ind}\n className={cn(\n 'text-info-primary relative overflow-hidden',\n shape === 'rounded' ? 'rounded-xl' : 'rounded-none',\n { 'aiui-dark': it.theme === 'dark' },\n it?.fullWidth === 'true' \n ? 'w-full flex-none' // \u5360\u6EE1\u6574\u884C\n : ' w-[calc(50%-6px)]' // \u666E\u901A\u5143\u7D20\n )}\n >\n <Picture source={it.mobileImg.url} className=\"size-full\" imgClassName=\"h-full object-cover\" />\n <div className=\"footBottomMob absolute top-4 px-4 flex flex-col gap-[6px] left-0 right-0 overflow-hidden\">\n {it.title && <Text html={it.title} as=\"p\" className=\"text-xl font-bold leading-[1.2] line-clamp-3\" />}\n {it.description && <Text html={it.description} className=\"text-xl font-bold line-clamp-2\" />}\n </div>\n </div>\n )\n })}\n </div>\n </div>\n </>\n )\n}\nexport default withLayout(GraphicMore)"],
|
|
5
|
+
"mappings": "aA2BI,mBAAAA,EAiBY,OAAAC,EACA,QAAAC,MAlBZ,oBA1BJ,OAAS,MAAAC,MAAU,yBACnB,MAAsB,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAiB9B,MAAMC,EAAeC,GAA2B,CAC9C,KAAM,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAIF,EACtB,CAAE,YAAAG,EAAa,MAAAC,CAAM,EAAIH,EAC/B,OACET,EAAAF,EAAA,CACE,UAAAC,EAAC,OAAI,UAAWE,EAAG,sBAAuB,yEAAyE,EACjH,SAAAF,EAACI,EAAA,CAAK,UAAWF,EAAG,wCAAyCS,CAAS,EACnE,SAAAC,GAAa,IAAI,CAACE,EAAMC,IAErBd,EAACI,EAAA,CAEC,KAAMS,EAAK,KACX,UAAWZ,EACT,oDACAW,IAAU,UAAY,cAAgB,eACtC,GACA,CACE,YAAaC,EAAK,QAAU,MAC9B,CACF,EAEA,UAAAd,EAACM,EAAA,CAAQ,OAAQQ,EAAK,IAAI,IAAK,UAAU,YAAY,aAAa,GAAG,EACrEb,EAAC,OAAI,UAAU,oJACZ,UAAAa,EAAK,OACJd,EAACO,EAAA,CACC,KAAMO,EAAK,MACX,GAAG,IACH,UAAU,0EACZ,EAEDA,EAAK,aACJd,EAACO,EAAA,CAAK,KAAMO,EAAK,YAAa,UAAU,iDAAiD,GAE7F,IAvBKC,CAwBP,CAEH,EACH,EACF,EACAf,EAAC,OAAI,UAAU,wCACb,SAAAA,EAAC,OAAI,UAAU,6BACd,SAAAY,GAAa,IAAI,CAACI,EAAIC,IAEnBhB,EAAC,OAEC,UAAWC,EACT,6CACAW,IAAU,UAAY,aAAe,eACrC,CAAE,YAAaG,EAAG,QAAU,MAAO,EACnCA,GAAI,YAAc,OACd,mBACA,oBACN,EAEA,UAAAhB,EAACM,EAAA,CAAQ,OAAQU,EAAG,UAAU,IAAK,UAAU,YAAY,aAAa,sBAAsB,EAC5Ff,EAAC,OAAI,UAAU,2FACZ,UAAAe,EAAG,OAAShB,EAACO,EAAA,CAAK,KAAMS,EAAG,MAAO,GAAG,IAAI,UAAU,+CAA+C,EAClGA,EAAG,aAAehB,EAACO,EAAA,CAAK,KAAMS,EAAG,YAAa,UAAU,iCAAiC,GAC5F,IAdKC,CAeP,CAEH,EACD,EACF,GACF,CAEJ,EACA,IAAOC,EAAQf,EAAWK,CAAW",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "cn", "withLayout", "Grid", "GridItem", "Picture", "Text", "GraphicMore", "props", "data", "className", "productsTab", "shape", "item", "index", "it", "ind", "GraphicMore_default"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{Fragment as N,jsx as e,jsxs as
|
|
1
|
+
"use client";import{Fragment as N,jsx as e,jsxs as d}from"react/jsx-runtime";import K,{useState as c,useRef as u,useEffect as f,forwardRef as U}from"react";import{debounce as X}from"es-toolkit";import{useInView as Z}from"react-intersection-observer";import{cn as y}from"../../helpers/utils.js";import{withLayout as D}from"../../shared/Styles.js";import ee from"../Slogan/index.js";import{YouTubePlayer as te}from"../VideoModal/YouTubePlayer.js";import{Grid as re,GridItem as h}from"../../components/gird.js";import{Container as ae}from"../../components/container.js";import se from"../BrandEquity/index.js";import oe from"../MemberEquity/index.js";import ne from"../Spacer/index.js";import ie from"gsap";import{convertLexicalToHTML as S}from"@payloadcms/richtext-lexical/html";import{useMediaQuery as T}from"react-responsive";import le from"../../helpers/ScrollLoadVideo.js";const L=({defaultConverters:s})=>({...s,text:o=>{const{node:t}=o;return t.$&&t.$.color?`<span class="lexical-${t.$.color}">${t.text}</span>`:t.text}}),x=({children:s,spaceY:o,className:t})=>{const a=T({query:"(max-width: 768px)"});return e(ae,{spaceY:o,className:y("!bg-transparent",t),children:d(re,{children:[!a&&e(h,{span:1}),e(h,{span:a?12:10,children:s}),!a&&e(h,{span:1})]})})},ce=K.forwardRef(({children:s,id:o,components:t})=>{const a=u(null);return d("div",{ref:a,className:"relative z-10",children:[e(N,{children:s}),e(N,{children:t?.map(r=>{switch(r.blockType){case"ipc-brand-equity":return e("div",{className:"relative z-20 bg-transparent",children:e(x,{spaceY:"none",children:e(se,{data:r,style:r?.style})})});case"ipc-member-equity":return e("div",{className:"relative z-20 w-full bg-transparent",children:e(x,{spaceY:"none",children:e(oe,{data:r,className:"w-full",style:r?.style})})});case"ipc-spacer":return e(ne,{data:r,style:r?.style,className:"!bg-transparent"});default:return null}})})]})}),de=U(({className:s="",wrapperClassName:o="",id:t,data:{title:a,videoTitle:r,mobVideo:k,mobImg:p,img:m,isYouTube:P,youtubePcId:M,youtubeMobileId:$,video:v,theme:R,shape:B,components:Y}})=>{const H=u(null),b=u(null),{ref:q,inView:i}=Z(),[pe,F]=c(0),[z,I]=c(!1),[j,G]=c(!1),V=u(null),Q=typeof a=="string"?a:a&&S({data:a,converters:L});typeof r=="string"||r&&S({data:r,converters:L});const[O,W]=c(0),[n,_]=c(!1),C=T({query:"(max-width: 768px)"});f(()=>{_(C)},[C]);const w=X(()=>{if(b.current){const g=b.current.getBoundingClientRect(),l=n?window.screen.height:window.innerHeight,A=window.scrollY||window.pageYOffset,J=g.bottom+A,E=document.documentElement.scrollHeight-J;W(E>l?l:E),F(l)}},2e3);return f(()=>{i&&!z&&(H.current?.play(),I(!0))},[i,z]),f(()=>(w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}),[]),f(()=>{function g(){const l=n?window.screen.height:window.innerHeight;ie.timeline({scrollTrigger:{trigger:`#${t}`,start:"top top",end:`top+=${l*1.8}px bottom`,scrub:.5}}).from(`#${t} .media-content`,{top:"50%",transform:"translate(-50%, -50%)"}).to(`.${t} .sticky-cover`,{backdropFilter:"blur(8px)",duration:.4}).to(`#${t} .media-content`,{top:"100%",transform:"translate(-50%, -100%)",duration:1},"<")}i&&g()},[i]),d(N,{children:[e("div",{id:t,className:y("relative z-20 h-screen w-full",s,{"aiui-dark":R==="dark","rounded-box":B==="rounded"}),ref:V,children:e("div",{ref:q,className:"media-content translate-z-0 absolute left-1/2 top-1/2 z-10 w-full -translate-x-1/2 -translate-y-1/2 antialiased",style:{willChange:"transform",contain:"paint"},children:e(x,{spaceY:"tablet:my-[32px] my-[24px] space-y-4",children:e(ee,{className:"sticky-title antialiased",data:{title:Q||"",theme:R}})})})}),d("div",{ref:b,style:{marginBottom:`-${O}px`,zIndex:i?2:1},className:y(t,"relative mt-[-200vh]",o),children:[e("div",{className:"sticky top-0 ",children:d("div",{className:y("media-cover","relative h-screen w-full"),children:[P?e(te,{youTubeId:n&&$||M}):v?.url&&e(le,{videoRef:H,poster:n&&p?.url?p?.url:m?.url,src:n&&k?.url?k?.url:v?.url,className:"lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]",videoClassName:" object-cover object-[82%]",muted:!0,loop:!1,playsInline:!0,onEnded:()=>{G(!0)}}),m?.url&&(!v?.url||j)&&e("img",{src:n&&p?.url?p?.url:m?.url,alt:m?.alt,className:"z-1 absolute left-0 top-0 size-full object-cover object-[82%]"}),e("div",{className:"sticky-cover absolute left-0 top-0 z-10 size-full",style:{backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)",willChange:"backdrop-filter"}})]})}),e("div",{className:"relative h-screen w-full"}),e(ce,{components:Y}),e("div",{className:"relative h-screen w-full"})]})]})});var Ee=D(de);export{Ee as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/MediaPlayerSticky/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect, forwardRef } from 'react'\nimport { debounce } from 'es-toolkit'\nimport { useInView } from 'react-intersection-observer'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\n\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\n\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst SubContainer = ({\n children,\n spaceY,\n className,\n}: {\n children: React.ReactNode\n spaceY?: string\n className?: string\n}) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY} className={cn('!bg-transparent', className)}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst SubBox = React.forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n {\n children?: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n }\n>(({ children, id, components }) => {\n const mediaPlayerStickyRef = useRef<HTMLDivElement>(null)\n\n return (\n <div ref={mediaPlayerStickyRef} className=\"relative z-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"none\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"none\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} className=\"!bg-transparent\" />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n})\n\nconst MediaPlayerSticky = forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n MediaPlayerBaseProps\n>(\n ({\n className = '',\n id,\n data: {\n title,\n videoTitle,\n mobVideo,\n mobImg,\n img,\n isYouTube,\n youtubePcId,\n youtubeMobileId,\n video,\n theme,\n shape,\n components,\n },\n }) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n const { ref: inViewRef, inView } = useInView()\n const [screenHeight, setScreenHeight] = useState(0)\n const [isPlaying, setIsPlaying] = useState(false)\n const [isEntered, setIsEntered] = useState(false)\n const wrapperRef = useRef<HTMLDivElement>(null)\n
|
|
5
|
-
"mappings": "aA+CM,OAuBA,YAAAA,EAtBgB,OAAAC,EADhB,QAAAC,MAAA,oBA9CN,OAAOC,GAAS,YAAAC,EAAU,UAAAC,EAAQ,aAAAC,EAAW,cAAAC,MAAkB,QAC/D,OAAS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AA,CAAG,SAAA6B,EAAS,EACZ5B,EAAAD,EAAA,CACG,SAAAmC,GAAY,IAAKE,GAAuB,CACvC,OAAQA,EAAc,UAAW,CAC/B,IAAK,mBACH,OACEpC,EAAC,OAAI,UAAU,+BACb,SAAAA,EAAC2B,EAAA,CAAa,OAAO,OACnB,SAAA3B,EAACgB,GAAA,CAAY,KAAMoB,EAAe,MAAOA,GAAe,MAAO,EACjE,EACF,EAGJ,IAAK,oBACH,OACEpC,EAAC,OAAI,UAAU,sCACb,SAAAA,EAAC2B,EAAA,CAAa,OAAO,OACnB,SAAA3B,EAACiB,GAAA,CAAa,KAAMmB,EAAe,UAAU,SAAS,MAAOA,GAAe,MAAO,EACrF,EACF,EAGJ,IAAK,aACH,OAAOpC,EAACkB,GAAA,CAAO,KAAMkB,EAAe,MAAOA,GAAe,MAAO,UAAU,kBAAkB,EAE/F,QACE,OAAO,IACX,CACF,CAAC,EACH,GACF,CAEJ,CAAC,EAEKC,GAAoB/B,EAMxB,CAAC,CACC,UAAAwB,EAAY,GACZ,
|
|
6
|
-
"names": ["Fragment", "jsx", "jsxs", "React", "useState", "useRef", "useEffect", "forwardRef", "debounce", "useInView", "cn", "withLayout", "Slogan", "YouTubePlayer", "Grid", "GridItem", "Container", "BrandEquity", "MemberEquity", "Spacer", "gsap", "convertLexicalToHTML", "useMediaQuery", "ScrollLoadVideo", "htmlConverters", "defaultConverters", "args", "node", "SubContainer", "children", "spaceY", "className", "isMobile", "SubBox", "id", "components", "mediaPlayerStickyRef", "componentData", "MediaPlayerSticky", "title", "videoTitle", "mobVideo", "mobImg", "img", "isYouTube", "youtubePcId", "youtubeMobileId", "video", "theme", "shape", "videoRef", "boxRef", "inViewRef", "inView", "screenHeight", "setScreenHeight", "isPlaying", "setIsPlaying", "isEntered", "setIsEntered", "wrapperRef", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useState, useRef, useEffect, forwardRef } from 'react'\nimport { debounce } from 'es-toolkit'\nimport { useInView } from 'react-intersection-observer'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Slogan from '../Slogan/index.js'\nimport { YouTubePlayer } from '../VideoModal/YouTubePlayer.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Container } from '../../components/container.js'\nimport BrandEquity from '../BrandEquity/index.js'\nimport MemberEquity from '../MemberEquity/index.js'\nimport Spacer from '../Spacer/index.js'\nimport gsap from 'gsap'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\n\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\n\nimport { useMediaQuery } from 'react-responsive'\nimport type { MediaPlayerBaseProps, MediaPlayerComponent } from './types.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst SubContainer = ({\n children,\n spaceY,\n className,\n}: {\n children: React.ReactNode\n spaceY?: string\n className?: string\n}) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n return (\n <Container spaceY={spaceY} className={cn('!bg-transparent', className)}>\n <Grid>\n {!isMobile && <GridItem span={1} />}\n <GridItem span={isMobile ? 12 : 10}>{children}</GridItem>\n {!isMobile && <GridItem span={1} />}\n </Grid>\n </Container>\n )\n}\n\nconst SubBox = React.forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n {\n children?: React.ReactNode\n id?: string\n components?: MediaPlayerComponent[]\n }\n>(({ children, id, components }) => {\n const mediaPlayerStickyRef = useRef<HTMLDivElement>(null)\n\n return (\n <div ref={mediaPlayerStickyRef} className=\"relative z-10\">\n <>{children}</>\n <>\n {components?.map((componentData: any) => {\n switch (componentData.blockType) {\n case 'ipc-brand-equity': {\n return (\n <div className=\"relative z-20 bg-transparent\">\n <SubContainer spaceY=\"none\">\n <BrandEquity data={componentData} style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-member-equity': {\n return (\n <div className=\"relative z-20 w-full bg-transparent\">\n <SubContainer spaceY=\"none\">\n <MemberEquity data={componentData} className=\"w-full\" style={componentData?.style} />\n </SubContainer>\n </div>\n )\n }\n case 'ipc-spacer': {\n return <Spacer data={componentData} style={componentData?.style} className=\"!bg-transparent\" />\n }\n default:\n return null\n }\n })}\n </>\n </div>\n )\n})\n\nconst MediaPlayerSticky = forwardRef<\n {\n mediaPlayerStickyRef: HTMLDivElement\n },\n MediaPlayerBaseProps\n>(\n ({\n className = '',\n wrapperClassName = '',\n id,\n data: {\n title,\n videoTitle,\n mobVideo,\n mobImg,\n img,\n isYouTube,\n youtubePcId,\n youtubeMobileId,\n video,\n theme,\n shape,\n components,\n },\n }) => {\n const videoRef = useRef<HTMLVideoElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n const { ref: inViewRef, inView } = useInView()\n const [screenHeight, setScreenHeight] = useState(0)\n const [isPlaying, setIsPlaying] = useState(false)\n const [isEntered, setIsEntered] = useState(false)\n const wrapperRef = useRef<HTMLDivElement>(null)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n const [btb, setbtb] = useState(0)\n const [isMobile, setIsMobile] = useState(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const debouncedHandleResize = debounce(() => {\n if (boxRef.current) {\n const rect = boxRef.current.getBoundingClientRect()\n const screenHeight = isMobile ? window.screen.height : window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n setbtb(distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom)\n setScreenHeight(screenHeight)\n }\n }, 2000)\n\n useEffect(() => {\n if (inView && !isPlaying) {\n videoRef.current?.play()\n setIsPlaying(true)\n }\n }, [inView, isPlaying])\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [])\n\n useEffect(() => {\n function gsapResize() {\n const height = isMobile ? window.screen.height : window.innerHeight\n gsap\n .timeline({\n scrollTrigger: {\n trigger: `#${id}`,\n start: 'top top',\n end: `top+=${height * 1.8}px bottom`,\n scrub: 0.5,\n },\n })\n .from(`#${id} .media-content`, { top: '50%', transform: 'translate(-50%, -50%)' })\n .to(`.${id} .sticky-cover`, {\n backdropFilter: 'blur(8px)',\n duration: 0.4,\n })\n .to(\n `#${id} .media-content`,\n {\n top: '100%',\n transform: 'translate(-50%, -100%)',\n duration: 1,\n },\n '<'\n )\n }\n if (inView) {\n gsapResize()\n }\n }, [inView])\n\n return (\n <>\n <div\n id={id}\n className={cn('relative z-20 h-screen w-full', className, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n ref={wrapperRef}\n >\n <div\n ref={inViewRef}\n className=\"media-content translate-z-0 absolute left-1/2 top-1/2 z-10 w-full -translate-x-1/2 -translate-y-1/2 antialiased\"\n style={{ willChange: 'transform', contain: 'paint' }}\n >\n <SubContainer spaceY=\"tablet:my-[32px] my-[24px] space-y-4\">\n <Slogan className=\"sticky-title antialiased\" data={{ title: title_html || '', theme }} />\n </SubContainer>\n </div>\n </div>\n\n <div\n ref={boxRef}\n style={{ marginBottom: `-${btb}px`, zIndex: inView ? 2 : 1 }}\n className={cn(id, 'relative mt-[-200vh]', wrapperClassName)}\n >\n <div className=\"sticky top-0 \">\n <div className={cn('media-cover', 'relative h-screen w-full')}>\n {isYouTube ? (\n <YouTubePlayer youTubeId={isMobile ? youtubeMobileId || youtubePcId : youtubePcId} />\n ) : (\n video?.url && (\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={isMobile && mobImg?.url ? mobImg?.url : img?.url}\n src={isMobile && mobVideo?.url ? mobVideo?.url : video?.url}\n className=\"lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] lg:aspect-w-[1440] lg:aspect-h-[700] desktop:aspect-w-[1024] desktop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]\"\n videoClassName=\" object-cover object-[82%]\"\n muted\n loop={false}\n playsInline\n onEnded={() => {\n setIsEntered(true)\n }}\n />\n )\n )}\n {img?.url && (!video?.url || isEntered) && (\n <img\n src={isMobile && mobImg?.url ? mobImg?.url : img?.url}\n alt={img?.alt}\n className=\"z-1 absolute left-0 top-0 size-full object-cover object-[82%]\"\n />\n )}\n <div\n className=\"sticky-cover absolute left-0 top-0 z-10 size-full\"\n style={{\n backdropFilter: 'blur(0px)',\n WebkitBackdropFilter: 'blur(0px)',\n willChange: 'backdrop-filter',\n }}\n />\n </div>\n </div>\n\n <div className=\"relative h-screen w-full\" />\n <SubBox components={components}></SubBox>\n <div className=\"relative h-screen w-full\" />\n </div>\n </>\n )\n }\n)\n\nexport default withLayout(MediaPlayerSticky)\n"],
|
|
5
|
+
"mappings": "aA+CM,OAuBA,YAAAA,EAtBgB,OAAAC,EADhB,QAAAC,MAAA,oBA9CN,OAAOC,GAAS,YAAAC,EAAU,UAAAC,EAAQ,aAAAC,EAAW,cAAAC,MAAkB,QAC/D,OAAS,YAAAC,MAAgB,aACzB,OAAS,aAAAC,MAAiB,8BAC1B,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,OAAY,qBACnB,OAAS,iBAAAC,OAAqB,iCAC9B,OAAS,QAAAC,GAAM,YAAAC,MAAgB,2BAC/B,OAAS,aAAAC,OAAiB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AO,WAAYE,EAAY,EAChClC,EAAC,OAAI,UAAU,2BAA2B,GAC5C,GACF,CAEJ,CACF,EAEA,IAAOyE,GAAQ/D,EAAW2B,EAAiB",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "React", "useState", "useRef", "useEffect", "forwardRef", "debounce", "useInView", "cn", "withLayout", "Slogan", "YouTubePlayer", "Grid", "GridItem", "Container", "BrandEquity", "MemberEquity", "Spacer", "gsap", "convertLexicalToHTML", "useMediaQuery", "ScrollLoadVideo", "htmlConverters", "defaultConverters", "args", "node", "SubContainer", "children", "spaceY", "className", "isMobile", "SubBox", "id", "components", "mediaPlayerStickyRef", "componentData", "MediaPlayerSticky", "wrapperClassName", "title", "videoTitle", "mobVideo", "mobImg", "img", "isYouTube", "youtubePcId", "youtubeMobileId", "video", "theme", "shape", "videoRef", "boxRef", "inViewRef", "inView", "screenHeight", "setScreenHeight", "isPlaying", "setIsPlaying", "isEntered", "setIsEntered", "wrapperRef", "title_html", "btb", "setbtb", "setIsMobile", "mediaQuery", "debouncedHandleResize", "rect", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "gsapResize", "height", "MediaPlayerSticky_default"]
|
|
7
7
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as U,jsx as s,jsxs as c}from"react/jsx-runtime";import{useAiuiContext as W}from"../AiuiProvider/index.js";import{formatVariantPrice as A}from"./shelfDisplay.js";import L from"../../components/picture.js";import E from"../../components/badge.js";import{cn as u}from"../../helpers/utils.js";import{Text as R}from"../../components/text.js";import B from"../../components/button.js";import{gaTrack as M}from"../../shared/track.js";import{trackUrlRef as V}from"../../shared/trackUrlRef.js";import{Heading as q}from"../../components/heading.js";import{useExposure as G}from"../../hooks/useExposure.js";import{useRef as J,useEffect as K,useState as F}from"react";const D="image",C="product_shelf",Q=999999999e-2,ce=({data:e,configuration:t})=>{const{isDisplayBackImage:$=!1,itemShape:y,metafields:I,isTopTag:P=!1,isShowTag:v,isShowOriginalPrice:k}=t||{},{locale:x="us",copyWriting:j}=W(),{discounts:w}=I||{},S=J(null),[N,i]=F([]),[_,O]=F(""),T=(l,r,p)=>t?.event?.primaryButton?.(l,r+1,p),g=(l,r,p)=>t?.event?.secondaryButton?.(l,r+1,p),n=e?.variants?.find(l=>l?.sku===e?.sku)||e?.variants?.[0]||{},z=!n?.availableForSale&&n?.price?.amount===Q,m=n?.coupons?.[0],{price:H,basePrice:f,discount:d}=A({locale:x,amount:k&&m?m.variant_price4wscode:n.price,baseAmount:k&&m?n.price:0,currencyCode:e?.price?.currencyCode||"USD"}),b=()=>{const l=e?.sku,r=e?.variants;return r?.find(X=>X?.sku===l)?.image?.url||r?.[0]?.image?.url||""},h=e?.custom_name||e?.title,a=e?.custom_description||e?.description;K(()=>{let l=[];if(d){const p=`${d}${w?.off||""}`;O(p),l.push(p)}const r=e?.tags?.filter?.(p=>p?.startsWith?.("CLtag"))?.map?.(p=>p?.replace?.("CLtag:",""))?.slice?.(0,d?1:2);i(l.concat(r))},[e?.tags,d]),G(S,{componentType:D,componentName:C,componentTitle:h,componentDescription:a,position:t?.index+1});const o=()=>c(U,{children:[v&&N?.length>0?s("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:N?.map?.((l,r)=>s(E,{className:"shelf-items-tag",children:l},r))}):null,h?s(q,{as:"h3",title:h||"",size:2,className:"shelf-display-product-title line-clamp-2",html:h||""}):null,a?s(R,{size:2,className:"lg-desktop:text-lg desktop:text-base shelf-display-product-description line-clamp-1 text-sm",html:a||""}):null,s("div",{className:"mb-2 mt-4 flex items-center",children:z?s("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:j?.soldOutText}):c(U,{children:[s("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:n?.availableForSale&&H||""}),s("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:n?.availableForSale&&f||""})]})}),c("div",{className:u("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?s(B,{variant:"secondary",onClick:()=>g(e,t?.index,t),className:`
|
|
2
2
|
${t.direction==="vertical"?"w-full":""}
|
|
3
|
-
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(
|
|
3
|
+
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(B,{variant:"primary",onClick:()=>T(e,t?.index,t),className:`
|
|
4
4
|
${t.direction==="vertical"?"w-full":""}
|
|
5
|
-
`,children:t?.primaryButton||""}):null]})]});return s("div",{ref:
|
|
5
|
+
`,children:t?.primaryButton||""}):null]})]});return s("div",{ref:S,className:u("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full cursor-pointer overflow-hidden duration-300",y==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px] shelf-display-item"),children:$?s("div",{className:"absolute inset-0 box-border overflow-hidden",children:c("div",{className:"relative inset-0 size-full",children:[s(L,{source:b(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"}),s("div",{className:"desktop:p-6 absolute inset-x-0 bottom-0 box-border overflow-hidden p-4",children:o()})]})}):c("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col justify-between overflow-hidden p-4",children:[_&&P&&s(E,{className:"absolute left-4 top-4 z-10 shelf-prices-tag",children:_||""}),s("div",{className:u("lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] w-full flex-1 overflow-hidden shelf-display-item-image"),children:s("a",{"aria-label":h,target:t?.target,href:V(`${x==="us"||!x?"":`/${x}`}/products/${e?.handle}`,`${D}_${C}`),onClick:()=>{M({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||n?.sku,item_name:e?.name,item_variant:n?.name,price:n?.price,index:t?.index+1}]}})},children:s(L,{source:b(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),o()]})},e?.id||e?.handle)},me=({data:e,configuration:t})=>{const{itemShape:$,itemLength:y,metafields:I}=t||{},{discounts:P}=I||{},{locale:v="us",copyWriting:k}=W(),[x,j]=F([]),w=J(null),S=(a,o,l)=>t?.event?.primaryButton?.(a,o+1,l),N=(a,o,l)=>t?.event?.secondaryButton?.(a,o+1,l),i=e?.variants?.find(a=>a?.sku===e?.sku)||e?.variants?.[0]||{},_=!i?.availableForSale&&i?.price?.amount===Q,O=t?.isShowTag,T=t?.isShowOriginalPrice,g=i?.coupons?.[0],{price:n,basePrice:z,discount:m}=A({locale:v,amount:T&&g?g.variant_price4wscode:i.price,baseAmount:T&&g?i.price:0,currencyCode:e?.price?.currencyCode||"USD"}),H=()=>{const a=e?.sku,o=e?.variants;return o?.find(r=>r?.sku===a)?.image?.url||o?.[0]?.image?.url||""},f=e?.custom_name||e?.title,d=e?.custom_description||e?.description;G(w,{componentType:D,componentName:C,componentTitle:f,componentDescription:d,position:t?.index+1});const b=()=>y>=2?{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] max-w-full",imgItem:"m-tablet:m-auto lg-desktop:max-w-[330px] lg-desktop:max-h-[330px] desktop:max-w-[260px] desktop:max-h-[260px] max-w-[138px] max-h-[138px]",wrap:"lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480] desktop:aspect-w-[648] desktop:aspect-h-[380] laptop:aspect-w-[440] laptop:aspect-h-[356] tablet:aspect-w-[346] tablet:aspect-h-[360] md-tablet:w-full"}:{boxItem:"lg-desktop:max-w-[401px] desktop:max-w-[292px] laptop:max-w-[289px] max-w-[262px]",imgItem:"md-tablet:m-auto lg-desktop:max-w-[450px] lg-desktop:max-h-[450px] desktop:max-w-[332px] desktop:max-h-[332px] max-w-[312px] max-h-[312px]",wrap:"lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[480] desktop:aspect-w-[1312] desktop:aspect-h-[380] laptop:aspect-w-[896] laptop:aspect-h-[356] tablet:aspect-w-[704] tablet:aspect-h-[360] md-tablet:w-full"},h=()=>y>=2?"flex flex-col justify-between desktop:gap-12 desktop:flex-row desktop:justify-center desktop:items-center":"flex justify-center items-center gap-6 md-tablet:flex-col";return K(()=>{let a=[];if(m){const l=`${m}${P?.off||""}`;a.push(l)}const o=e?.tags?.filter?.(l=>l?.startsWith?.("CLtag"))?.map?.(l=>l?.replace?.("CLtag:",""))?.slice?.(0,m?1:2);j(a.concat(o))},[e?.tags,m]),s("div",{ref:w,className:u(b().wrap,$==="round"?"rounded-2xl":"rounded-none","shelf-display-item","bg-container-secondary-1 tablet:hover:bg-info-white duration-300 gap-6","box-border w-full cursor-pointer overflow-hidden relative md-tablet:h-[360px]"),children:c("div",{className:u(h(),"desktop:p-6 absolute inset-0 box-border overflow-hidden p-4"),children:[s("div",{className:u(b().imgItem,"relative overflow-hidden desktop:mb-0 mb-1"),children:s("a",{"aria-label":f,target:t?.target,href:V(`${v==="us"||!v?"":`/${v}`}/products/${e?.handle}`,`${D}_${C}`),onClick:()=>{M({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||i?.sku,item_name:e?.name,item_variant:i?.name,price:i?.price,index:t?.index+1}]}})},children:s(L,{source:H(),alt:"",className:"flex h-full justify-center object-cover [&_img]:w-auto"})})}),c("div",{className:u("flex flex-col justify-center items-start",b().boxItem),children:[O&&x?.length>0?s("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:x?.map?.((a,o)=>s(E,{className:"shelf-items-tag",children:a},o))}):null,f?s(q,{as:"h3",title:f||"",size:2,className:"shelf-display-product-title mb-1 line-clamp-2",html:f||""}):null,d?s(R,{size:2,className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 shelf-display-product-description line-clamp-1 h-5 text-sm",html:d||""}):null,s("div",{className:"mb-2 mt-5 flex items-center",children:_?s("div",{className:"tablet:text-2xl text-info-primary text-xl font-bold",children:k?.soldOutText}):c(U,{children:[s("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-bold",children:i?.availableForSale&&n||""}),s("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-bold line-through",children:i?.availableForSale&&z||""})]})}),c("div",{className:u("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?s(B,{variant:"secondary",onClick:()=>N(e,t?.index,t),className:`
|
|
6
6
|
${t.direction==="vertical"?"w-full":""}
|
|
7
|
-
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(
|
|
7
|
+
`,children:t?.secondaryButton||""}):null,t?.primaryButton?s(B,{variant:"primary",onClick:()=>S(e,t?.index,t),className:`
|
|
8
8
|
${t.direction==="vertical"?"w-full":""}
|
|
9
|
-
`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{
|
|
9
|
+
`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{me as ShelfDisplayHorizontalItem,ce as ShelfDisplayWrapItem};
|
|
10
10
|
//# sourceMappingURL=shelfDisplayItem.js.map
|