@anker-in/headless-ui 1.0.26-alpha.1761893017767 → 1.0.26-alpha.1762157400150
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 +3 -3
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
- package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +2 -2
- package/dist/cjs/biz-components/FeatureCards/types.d.ts +2 -2
- package/dist/cjs/biz-components/FeatureCards/types.js +1 -1
- package/dist/cjs/biz-components/FeatureCards/types.js.map +1 -1
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js +1 -1
- package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js.map +2 -2
- package/dist/cjs/biz-components/FeatureShowcase/types.d.ts +3 -2
- package/dist/cjs/biz-components/FeatureShowcase/types.js +1 -1
- package/dist/cjs/biz-components/FeatureShowcase/types.js.map +1 -1
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js +1 -1
- package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js.map +3 -3
- package/dist/cjs/biz-components/ImageTextFeature/types.d.ts +4 -4
- package/dist/cjs/biz-components/ImageTextFeature/types.js +1 -1
- package/dist/cjs/biz-components/ImageTextFeature/types.js.map +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
- package/dist/cjs/biz-components/ImageWithText/types.d.ts +4 -4
- package/dist/cjs/biz-components/ImageWithText/types.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/types.js.map +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +2 -2
- package/dist/cjs/biz-components/ProductHero/types.d.ts +3 -2
- package/dist/cjs/biz-components/ProductHero/types.js +1 -1
- package/dist/cjs/biz-components/ProductHero/types.js.map +1 -1
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +1 -1
- package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +3 -3
- package/dist/cjs/biz-components/TabWithImage/types.d.ts +6 -5
- package/dist/cjs/biz-components/TabWithImage/types.js +1 -1
- package/dist/cjs/biz-components/TabWithImage/types.js.map +1 -1
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
- package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
- package/dist/cjs/biz-components/TabsWithMedia/types.d.ts +8 -7
- package/dist/cjs/biz-components/TabsWithMedia/types.js +1 -1
- package/dist/cjs/biz-components/TabsWithMedia/types.js.map +1 -1
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.js +1 -1
- package/dist/cjs/biz-components/VideoFeature/VideoFeature.js.map +3 -3
- package/dist/cjs/biz-components/VideoFeature/types.d.ts +5 -4
- package/dist/cjs/biz-components/VideoFeature/types.js +1 -1
- package/dist/cjs/biz-components/VideoFeature/types.js.map +1 -1
- package/dist/cjs/stories/featureCards.stories.js +1 -1
- package/dist/cjs/stories/featureCards.stories.js.map +2 -2
- package/dist/cjs/stories/featureShowcase.stories.js +1 -1
- package/dist/cjs/stories/featureShowcase.stories.js.map +2 -2
- package/dist/cjs/stories/imageTextFeature.stories.js +1 -1
- package/dist/cjs/stories/imageTextFeature.stories.js.map +2 -2
- package/dist/cjs/stories/imageWithText.stories.js +1 -1
- package/dist/cjs/stories/imageWithText.stories.js.map +2 -2
- package/dist/cjs/stories/productHero.stories.js +1 -1
- package/dist/cjs/stories/productHero.stories.js.map +2 -2
- package/dist/cjs/stories/tabWithImage.stories.js +1 -1
- package/dist/cjs/stories/tabWithImage.stories.js.map +2 -2
- package/dist/cjs/stories/tabsWithMedia.stories.js +1 -1
- package/dist/cjs/stories/tabsWithMedia.stories.js.map +2 -2
- package/dist/cjs/stories/videoFeature.stories.js +1 -1
- package/dist/cjs/stories/videoFeature.stories.js.map +2 -2
- 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/FeatureCards/FeatureCards.js +1 -1
- package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +2 -2
- package/dist/esm/biz-components/FeatureCards/types.d.ts +2 -2
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js +1 -1
- package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js.map +2 -2
- package/dist/esm/biz-components/FeatureShowcase/types.d.ts +3 -2
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +1 -1
- package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +3 -3
- package/dist/esm/biz-components/ImageTextFeature/types.d.ts +4 -4
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
- package/dist/esm/biz-components/ImageWithText/types.d.ts +4 -4
- package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.js.map +2 -2
- package/dist/esm/biz-components/ProductHero/types.d.ts +3 -2
- package/dist/esm/biz-components/TabWithImage/TabWithImage.js +1 -1
- package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +3 -3
- package/dist/esm/biz-components/TabWithImage/types.d.ts +6 -5
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
- package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
- package/dist/esm/biz-components/TabsWithMedia/types.d.ts +8 -7
- package/dist/esm/biz-components/VideoFeature/VideoFeature.js +1 -1
- package/dist/esm/biz-components/VideoFeature/VideoFeature.js.map +3 -3
- package/dist/esm/biz-components/VideoFeature/types.d.ts +5 -4
- package/dist/esm/stories/featureCards.stories.js +1 -1
- package/dist/esm/stories/featureCards.stories.js.map +2 -2
- package/dist/esm/stories/featureShowcase.stories.js +1 -1
- package/dist/esm/stories/featureShowcase.stories.js.map +2 -2
- package/dist/esm/stories/imageTextFeature.stories.js +1 -1
- package/dist/esm/stories/imageTextFeature.stories.js.map +2 -2
- package/dist/esm/stories/imageWithText.stories.js +1 -1
- package/dist/esm/stories/imageWithText.stories.js.map +2 -2
- package/dist/esm/stories/productHero.stories.js +1 -1
- package/dist/esm/stories/productHero.stories.js.map +2 -2
- package/dist/esm/stories/tabWithImage.stories.js +1 -1
- package/dist/esm/stories/tabWithImage.stories.js.map +2 -2
- package/dist/esm/stories/tabsWithMedia.stories.js +1 -1
- package/dist/esm/stories/tabsWithMedia.stories.js.map +2 -2
- package/dist/esm/stories/videoFeature.stories.js +1 -1
- package/dist/esm/stories/videoFeature.stories.js.map +2 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var E=Object.create;var
|
|
1
|
+
"use strict";"use client";var E=Object.create;var m=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var I=(e,r)=>{for(var s in r)m(e,s,{get:r[s],enumerable:!0})},x=(e,r,s,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of M(r))!A.call(e,o)&&o!==s&&m(e,o,{get:()=>r[o],enumerable:!(p=P(r,o))||p.enumerable});return e};var d=(e,r,s)=>(s=e!=null?E(B(e)):{},x(r||!e||!e.__esModule?m(s,"default",{value:e,enumerable:!0}):s,e)),z=e=>x(m({},"__esModule",{value:!0}),e);var D={};I(D,{default:()=>R});module.exports=z(D);var t=require("react/jsx-runtime"),l=d(require("react")),w=d(require("../Title/index.js")),a=require("../../helpers/utils.js"),h=d(require("../../components/picture.js")),b=d(require("../SwiperBox/index.js")),g=require("../../shared/Styles.js"),n=require("../../components/avatar.js"),k=require("../../components/container.js"),N=require("../../components/text.js"),y=require("../../hooks/useExposure.js"),C=require("../../shared/trackUrlRef.js");const v="copy",f="product_review",F=({data:e,configuration:r})=>{const s=(0,l.useRef)(null),p=o=>{const i=Number(o||0);return typeof i=="number"&&!isNaN(i)&&isFinite(i)&&i>0&&i<=5&&i===Math.floor(i)?Array.from(new Array(i)):[]};return(0,y.useExposure)(s,{componentType:v,componentName:f,componentTitle:e?.title,componentDescription:e?.description,position:r?.index+1}),(0,t.jsx)("div",{ref:s,className:(0,a.cn)("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:(0,t.jsxs)("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[(0,t.jsxs)("div",{className:(0,a.cn)("lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between"),children:[(0,t.jsxs)("div",{className:"flex-1",children:[e?.title?(0,t.jsx)("h4",{className:"laptop:text-lg text-sm font-bold",children:e?.title}):null,(0,t.jsx)("div",{className:"mt-1 flex items-center",children:p(e?.rating)?.map?.((o,i)=>(0,t.jsx)("div",{className:"mr-1",children:(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("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"})})},i))})]}),(0,t.jsx)("div",{className:"desktop:size-12 size-10 overflow-hidden",children:e?.avatar?.url?(0,t.jsxs)(n.Avatar,{className:"size-full",isAdaptation:!e?.avatar?.url,children:[(0,t.jsx)(n.AvatarImage,{src:e?.avatar?.url}),(0,t.jsx)(n.AvatarFallback,{children:e?.title})]}):null})]}),(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(N.Text,{className:(0,a.cn)("desktop:max-h-[151px] tablet:max-h-[140px]","lg-desktop:text-2xl text-info-primary line-clamp-5 break-words text-xl font-bold leading-[1.2]"),children:e?.description||""})}),(0,t.jsx)("a",{href:(0,C.trackUrlRef)(e?.link,`${v}_${f}`),onClick:()=>{r?.event?.primaryButton(e,r?.index+1)},"data-headless-type-name":`${v}#${f}`,"data-headless-title-desc-button":`${e?.title}#${e?.description||e?.subTitle}`,"data-headless-nav-postion":`''#${r?.index+1}`,children:(0,t.jsxs)("div",{className:(0,a.cn)("mt-3 flex items-center cursor-pointer overflow-hidden bg-[#F7F8F9] p-3",r?.shape==="round"?"rounded-lg":"rounded-none"),children:[(0,t.jsx)("div",{className:"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center",children:(0,t.jsx)(h.default,{className:"w-full object-cover",source:e?.img?.url,alt:e?.img?.alt||""})}),(0,t.jsx)("p",{className:"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]",children:e?.subTitle||""})]})})]})})},$=l.default.forwardRef(({className:e="",data:r,key:s,...p},o)=>{const{products:i,title:c,theme:L,...T}=r,u=(0,l.useRef)(null);return(0,l.useImperativeHandle)(o,()=>u.current),(0,t.jsx)("div",{className:e,ref:u,children:(0,t.jsx)("div",{className:"evaluate-box relative z-10",children:(0,t.jsx)(k.Container,{...r?.containerProps||{},className:"overflow-hidden",children:(0,t.jsxs)("div",{ref:o,className:(0,a.cn)("w-full",e,{"aiui-dark":L==="dark"}),children:[c&&(0,t.jsx)(w.default,{data:{title:c}}),(0,t.jsx)(b.default,{className:"!overflow-visible",id:"Evaluate"+s,data:{list:i,configuration:{...T,title:c}},Slide:F,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 R=(0,g.withLayout)($);
|
|
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
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["Evaluate_exports", "__export", "Evaluate_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_Title", "import_utils", "import_picture", "import_SwiperBox", "import_Styles", "import_avatar", "import_container", "import_text", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "EvaluateItem", "data", "configuration", "ref", "handleRating", "num", "_", "index", "Picture", "Evaluate", "React", "className", "key", "rest", "products", "title", "theme", "ohter", "innerRef", "Title", "SwiperBox"]
|
|
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 rating = Number(num || 0)\n // \u9A8C\u8BC1\u662F\u5426\u4E3A\u6709\u6548\u7684\u6B63\u6574\u6570\u4E14\u5728\u5408\u7406\u8303\u56F4\u5185\uFF080-5 \u661F\u8BC4\u5206\uFF09\n if (\n typeof rating === 'number' &&\n !isNaN(rating) &&\n isFinite(rating) &&\n rating > 0 &&\n rating <= 5 &&\n rating === Math.floor(rating)\n ) {\n return Array.from(new Array(rating))\n }\n return []\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 'desktop:max-h-[151px] tablet:max-h-[140px]',\n 'lg-desktop:text-2xl text-info-primary line-clamp-5 break-words text-xl font-bold leading-[1.2]'\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": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAwFU,IAAAI,EAAA,6BAvFVC,EAAmD,oBACnDC,EAAkB,gCAClBC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAoD,sCACpDC,EAA0B,yCAC1BC,EAAqB,oCAErBC,EAA4B,sCAC5BC,EAA4B,uCAG5B,MAAMC,EAAgB,OAChBC,EAAgB,iBAiChBC,EAAe,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAAmD,CAC7F,MAAMC,KAAM,UAAuB,IAAI,EACjCC,EAAgBC,GAAgB,CACpC,MAAMC,EAAS,OAAOD,GAAO,CAAC,EAE9B,OACE,OAAOC,GAAW,UAClB,CAAC,MAAMA,CAAM,GACb,SAASA,CAAM,GACfA,EAAS,GACTA,GAAU,GACVA,IAAW,KAAK,MAAMA,CAAM,EAErB,MAAM,KAAK,IAAI,MAAMA,CAAM,CAAC,EAE9B,CAAC,CACV,EAEA,wBAAYH,EAAK,CACf,cAAAL,EACA,cAAAC,EACA,eAAgBE,GAAM,MACtB,qBAAsBA,GAAM,YAC5B,SAAUC,GAAe,MAAQ,CACnC,CAAC,KAGC,OAAC,OACC,IAAKC,EACL,aAAW,MACT,qGACAD,GAAe,QAAU,QAAU,cAAgB,eACnD,oGACA,qFACA,qBACF,EAEA,oBAAC,OAAI,UAAU,4EACb,qBAAC,OAAI,aAAW,MAAG,iEAAiE,EAClF,qBAAC,OAAI,UAAU,SACZ,UAAAD,GAAM,SAAQ,OAAC,MAAG,UAAU,mCAAoC,SAAAA,GAAM,MAAM,EAAQ,QACrF,OAAC,OAAI,UAAU,yBACZ,SAAAG,EAAaH,GAAM,MAAM,GAAG,MAAM,CAACM,EAAGC,OAEnC,OAAC,OAAgB,UAAU,OACzB,mBAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,mBAAC,QACC,EAAE,6oBACF,KAAK,UACP,EACF,GANQA,CAOV,CAEH,EACH,GACF,KACA,OAAC,OAAI,UAAU,0CACZ,SAAAP,GAAM,QAAQ,OACb,QAAC,UAAO,UAAU,YAAY,aAAc,CAACA,GAAM,QAAQ,IACzD,oBAAC,eAAY,IAAKA,GAAM,QAAQ,IAAK,KACrC,OAAC,kBAAgB,SAAAA,GAAM,MAAM,GAC/B,EACE,KACN,GACF,KACA,OAAC,OAAI,UAAU,SACb,mBAAC,QACC,aAAW,MACT,6CACA,gGACF,EAEC,SAAAA,GAAM,aAAe,GACxB,EACF,KACA,OAAC,KACC,QAAM,eAAYA,GAAM,KAAM,GAAGH,CAAa,IAAIC,CAAa,EAAE,EACjE,QAAS,IAAM,CACbG,GAAe,OAAO,cAAcD,EAAMC,GAAe,MAAQ,CAAC,CACpE,EACA,0BAAyB,GAAGJ,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAGE,GAAM,KAAK,IAAIA,GAAM,aAAeA,GAAM,QAAQ,GACtF,4BAA2B,MAAMC,GAAe,MAAQ,CAAC,GAEzD,oBAAC,OACC,aAAW,MACT,yEACAA,GAAe,QAAU,QAAU,aAAe,cACpD,EAEA,oBAAC,OAAI,UAAU,gEACb,mBAAC,EAAAO,QAAA,CAAQ,UAAU,sBAAsB,OAAQR,GAAM,KAAK,IAAK,IAAKA,GAAM,KAAK,KAAO,GAAI,EAC9F,KACA,OAAC,KAAE,UAAU,qGACV,SAAAA,GAAM,UAAY,GACrB,GACF,EACF,GACF,EACF,CAEJ,EAEMS,EAAW,EAAAC,QAAM,WAA0C,CAAC,CAAE,UAAAC,EAAY,GAAI,KAAAX,EAAM,IAAAY,EAAK,GAAGC,CAAK,EAAGX,IAAQ,CAChH,KAAM,CAAE,SAAAY,EAAU,MAAAC,EAAO,MAAAC,EAAO,GAAGC,CAAM,EAAIjB,EACvCkB,KAAW,UAAuB,IAAI,EAC5C,gCAAoBhB,EAAK,IAAMgB,EAAS,OAAyB,KAG/D,OAAC,OAAI,UAAWP,EAAW,IAAKO,EAC9B,mBAAC,OAAI,UAAU,6BACb,mBAAC,aAAW,GAAIlB,GAAM,gBAAkB,CAAC,EAAI,UAAU,kBACrD,oBAAC,OAAI,IAAKE,EAAK,aAAW,MAAG,SAAUS,EAAW,CAAE,YAAaK,IAAU,MAAO,CAAC,EAChF,UAAAD,MAAS,OAAC,EAAAI,QAAA,CAAM,KAAM,CAAE,MAAOJ,CAAM,EAAG,KACzC,OAAC,EAAAK,QAAA,CACC,UAAU,oBACV,GAAI,WAAaR,EACjB,KAAM,CAAE,KAAME,EAAU,cAAe,CAAE,GAAGG,EAAO,MAAOF,CAAM,CAAE,EAClE,MAAOhB,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,IAAOhB,KAAQ,cAAW0B,CAAQ",
|
|
6
|
+
"names": ["Evaluate_exports", "__export", "Evaluate_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_Title", "import_utils", "import_picture", "import_SwiperBox", "import_Styles", "import_avatar", "import_container", "import_text", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "EvaluateItem", "data", "configuration", "ref", "handleRating", "num", "rating", "_", "index", "Picture", "Evaluate", "React", "className", "key", "rest", "products", "title", "theme", "ohter", "innerRef", "Title", "SwiperBox"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var C=Object.create;var x=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var $=(p,a)=>{for(var s in a)x(p,s,{get:a[s],enumerable:!0})},
|
|
1
|
+
"use strict";"use client";var C=Object.create;var x=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var $=(p,a)=>{for(var s in a)x(p,s,{get:a[s],enumerable:!0})},v=(p,a,s,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of T(a))!H.call(p,o)&&o!==s&&x(p,o,{get:()=>a[o],enumerable:!(i=F(a,o))||i.enumerable});return p};var R=(p,a,s)=>(s=p!=null?C(z(p)):{},v(a||!p||!p.__esModule?x(s,"default",{value:p,enumerable:!0}):s,p)),S=p=>v(x({},"__esModule",{value:!0}),p);var D={};$(D,{default:()=>j});module.exports=S(D);var t=require("react/jsx-runtime"),r=R(require("react")),l=require("../../components/index.js"),d=require("../../helpers/utils.js"),N=require("../../shared/Styles.js"),y=require("../../hooks/useExposure.js"),w=require("../../shared/trackUrlRef.js"),n=require("swiper/react");const m="image",u="feature_cards",k=r.default.forwardRef(({data:p,className:a},s)=>{const{title:i,subtitle:o,items:f=[]}=p,c=(0,r.useRef)(null);(0,y.useExposure)(c,{componentType:m,componentName:u,componentTitle:i,componentDescription:o}),(0,r.useImperativeHandle)(s,()=>c.current);const b=e=>{const h=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Picture,{source:e.image.url,alt:e.image.alt||e.title,className:"absolute inset-0 !h-full",imgClassName:"!h-full object-cover"}),(0,t.jsxs)("div",{className:"z-10",children:[(0,t.jsx)(l.Heading,{size:3,as:"h2",className:"laptop:text-[20px] desktop:text-[32px] lg-desktop:text-[32px]",children:e.title}),(0,t.jsx)(l.Text,{size:4,as:"p",className:"mt-[4px] line-clamp-2 h-[40px] text-[14px] laptop:h-[44px] lg-desktop:text-[18px]",children:e.subtitle})]})]}),g=(0,d.cn)("relative flex h-[360px] max-h-[560px] flex-1 flex-col justify-end gap-[16px] overflow-hidden rounded-[12px] px-[16px] py-[12px] text-info-primary tablet:h-[336px] laptop:h-[336px] laptop:px-[16px] laptop:py-[16px] desktop:h-[448px] desktop:rounded-[16px] desktop:px-[32px] desktop:py-[24px] lg-desktop:h-[560px]",{"aiui-dark":e.theme==="dark","aiui-light":e.theme==="light"});return e.link?(0,t.jsx)("a",{href:(0,w.trackUrlRef)(e.link,`${m}_${u}`),className:g,"data-headless-type-name":`${m}#${u}`,"data-headless-title-desc-button":`${i}#${e.title}#${e.subtitle}`,children:h}):(0,t.jsx)("div",{className:g,children:h})};return(0,t.jsxs)("section",{ref:c,"data-ui-component-id":"FeatureCards",className:(0,d.cn)("flex w-full flex-col justify-center",a),children:[(0,t.jsx)(l.Heading,{size:4,as:"h1",className:"text-left laptop:text-center",children:i}),o&&(0,t.jsx)(l.Text,{size:2,as:"p",className:"mt-[4px] text-left text-[14px] laptop:text-center desktop:text-[16px] lg-desktop:text-[18px]",children:o}),(0,t.jsx)("div",{className:"mt-[24px] hidden w-full gap-[16px] laptop:mt-[32px] laptop:flex desktop:mt-[40px] lg-desktop:mt-[24px]",children:f.map(e=>(0,t.jsx)(r.default.Fragment,{children:b(e)},e.title))}),(0,t.jsx)("div",{className:"mt-[24px] w-full laptop:hidden",children:(0,t.jsx)(n.Swiper,{spaceBetween:12,slidesPerView:"auto",grabCursor:!0,className:"relative w-full !overflow-visible",children:f.map(e=>(0,t.jsx)(n.SwiperSlide,{className:"relative !h-[360px] !w-[296px]",children:(0,t.jsxs)("div",{className:(0,d.cn)("absolute inset-0 flex flex-1 flex-col justify-end gap-[16px] overflow-hidden rounded-[12px] px-[16px] py-[12px] text-info-primary laptop:px-[16px] laptop:py-[16px] desktop:rounded-[16px] desktop:px-[32px] desktop:py-[24px]",{"aiui-dark":e.theme==="dark","aiui-light":e.theme==="light"}),children:[(0,t.jsx)(l.Picture,{source:e.image.url,alt:e.image.alt||e.title,className:"absolute inset-0 !h-full",imgClassName:"!h-full object-cover"}),(0,t.jsxs)("div",{className:"z-10",children:[(0,t.jsx)(l.Heading,{size:3,as:"h2",children:e.title}),(0,t.jsx)(l.Text,{size:4,as:"p",className:"mt-[4px] line-clamp-2 h-[40px] overflow-visible text-[14px] laptop:h-[50px] lg-desktop:text-[18px]",children:e.subtitle})]})]},e.title)},e.title))})})]})});k.displayName="FeatureCards";var j=(0,N.withLayout)(k);
|
|
2
2
|
//# sourceMappingURL=FeatureCards.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/FeatureCards/FeatureCards.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { FeatureCardsProps, FeatureCardItem } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\n\nconst componentType = 'image'\nconst componentName = 'feature_cards'\n\nconst FeatureCards = React.forwardRef<HTMLDivElement, FeatureCardsProps>(({ data, className }, ref) => {\n const { title, subtitle, items = [] } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n const renderCard = (item: FeatureCardItem) => {\n const cardContent = (\n <>\n <Picture\n source={item.
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6BM,IAAAI,EAAA,6BA5BNC,EAAmD,oBACnDC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAC5BC,EAA4B,uCAE5BL,EAAoC,wBAEpC,MAAMM,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAe,EAAAC,QAAM,WAA8C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACrG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,MAAAC,EAAQ,CAAC,CAAE,EAAIL,EAElCM,KAAS,UAAuB,IAAI,KAE1C,eAAYA,EAAQ,CAClB,cAAAV,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMI,EAAO,OAAyB,EAE/D,MAAMC,EAAcC,GAA0B,CAC5C,MAAMC,KACJ,oBACE,oBAAC,WACC,OAAQD,EAAK,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { FeatureCardsProps, FeatureCardItem } from './types.js'\nimport { Swiper, SwiperSlide } from 'swiper/react'\n\nconst componentType = 'image'\nconst componentName = 'feature_cards'\n\nconst FeatureCards = React.forwardRef<HTMLDivElement, FeatureCardsProps>(({ data, className }, ref) => {\n const { title, subtitle, items = [] } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n const renderCard = (item: FeatureCardItem) => {\n const cardContent = (\n <>\n <Picture\n source={item.image.url}\n alt={item.image.alt || item.title}\n className=\"absolute inset-0 !h-full\"\n imgClassName=\"!h-full object-cover\"\n />\n <div className=\"z-10\">\n <Heading size={3} as=\"h2\" className=\"laptop:text-[20px] desktop:text-[32px] lg-desktop:text-[32px]\">\n {item.title}\n </Heading>\n <Text\n size={4}\n as=\"p\"\n className=\"mt-[4px] line-clamp-2 h-[40px] text-[14px] laptop:h-[44px] lg-desktop:text-[18px]\"\n >\n {item.subtitle}\n </Text>\n </div>\n </>\n )\n\n const cardClasses = cn(\n 'relative flex h-[360px] max-h-[560px] flex-1 flex-col justify-end gap-[16px] overflow-hidden rounded-[12px] px-[16px] py-[12px] text-info-primary tablet:h-[336px] laptop:h-[336px] laptop:px-[16px] laptop:py-[16px] desktop:h-[448px] desktop:rounded-[16px] desktop:px-[32px] desktop:py-[24px] lg-desktop:h-[560px]',\n {\n 'aiui-dark': item.theme === 'dark',\n 'aiui-light': item.theme === 'light',\n }\n )\n\n if (item.link) {\n return (\n <a\n href={trackUrlRef(item.link, `${componentType}_${componentName}`)}\n className={cardClasses}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${item.title}#${item.subtitle}`}\n >\n {cardContent}\n </a>\n )\n }\n\n return <div className={cardClasses}>{cardContent}</div>\n }\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"FeatureCards\"\n className={cn('flex w-full flex-col justify-center', className)}\n >\n {/* \u6807\u9898\u533A\u57DF */}\n <Heading size={4} as=\"h1\" className=\"text-left laptop:text-center\">\n {title}\n </Heading>\n {subtitle && (\n <Text\n size={2}\n as=\"p\"\n className=\"mt-[4px] text-left text-[14px] laptop:text-center desktop:text-[16px] lg-desktop:text-[18px]\"\n >\n {subtitle}\n </Text>\n )}\n\n {/* \u684C\u9762\u7AEF\u7F51\u683C\u5E03\u5C40 */}\n <div className=\"mt-[24px] hidden w-full gap-[16px] laptop:mt-[32px] laptop:flex desktop:mt-[40px] lg-desktop:mt-[24px]\">\n {items.map(item => (\n <React.Fragment key={item.title}>{renderCard(item)}</React.Fragment>\n ))}\n </div>\n\n {/* \u79FB\u52A8\u7AEF Swiper \u5E03\u5C40 */}\n <div className=\"mt-[24px] w-full laptop:hidden\">\n <Swiper spaceBetween={12} slidesPerView=\"auto\" grabCursor className=\"relative w-full !overflow-visible\">\n {items.map(item => (\n <SwiperSlide key={item.title} className=\"relative !h-[360px] !w-[296px]\">\n <div\n key={item.title}\n className={cn(\n 'absolute inset-0 flex flex-1 flex-col justify-end gap-[16px] overflow-hidden rounded-[12px] px-[16px] py-[12px] text-info-primary laptop:px-[16px] laptop:py-[16px] desktop:rounded-[16px] desktop:px-[32px] desktop:py-[24px]',\n {\n 'aiui-dark': item.theme === 'dark',\n 'aiui-light': item.theme === 'light',\n }\n )}\n >\n <Picture\n source={item.image.url}\n alt={item.image.alt || item.title}\n className=\"absolute inset-0 !h-full\"\n imgClassName=\"!h-full object-cover\"\n />\n <div className=\"z-10\">\n <Heading size={3} as=\"h2\">\n {item.title}\n </Heading>\n <Text\n size={4}\n as=\"p\"\n className=\"mt-[4px] line-clamp-2 h-[40px] overflow-visible text-[14px] laptop:h-[50px] lg-desktop:text-[18px]\"\n >\n {item.subtitle}\n </Text>\n </div>\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n </section>\n )\n})\n\nFeatureCards.displayName = 'FeatureCards'\n\nexport default withLayout(FeatureCards)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA6BM,IAAAI,EAAA,6BA5BNC,EAAmD,oBACnDC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAC5BC,EAA4B,uCAE5BL,EAAoC,wBAEpC,MAAMM,EAAgB,QAChBC,EAAgB,gBAEhBC,EAAe,EAAAC,QAAM,WAA8C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACrG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,MAAAC,EAAQ,CAAC,CAAE,EAAIL,EAElCM,KAAS,UAAuB,IAAI,KAE1C,eAAYA,EAAQ,CAClB,cAAAV,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMI,EAAO,OAAyB,EAE/D,MAAMC,EAAcC,GAA0B,CAC5C,MAAMC,KACJ,oBACE,oBAAC,WACC,OAAQD,EAAK,MAAM,IACnB,IAAKA,EAAK,MAAM,KAAOA,EAAK,MAC5B,UAAU,2BACV,aAAa,uBACf,KACA,QAAC,OAAI,UAAU,OACb,oBAAC,WAAQ,KAAM,EAAG,GAAG,KAAK,UAAU,gEACjC,SAAAA,EAAK,MACR,KACA,OAAC,QACC,KAAM,EACN,GAAG,IACH,UAAU,oFAET,SAAAA,EAAK,SACR,GACF,GACF,EAGIE,KAAc,MAClB,0TACA,CACE,YAAaF,EAAK,QAAU,OAC5B,aAAcA,EAAK,QAAU,OAC/B,CACF,EAEA,OAAIA,EAAK,QAEL,OAAC,KACC,QAAM,eAAYA,EAAK,KAAM,GAAGZ,CAAa,IAAIC,CAAa,EAAE,EAChE,UAAWa,EACX,0BAAyB,GAAGd,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,GAAGM,CAAK,IAAIK,EAAK,KAAK,IAAIA,EAAK,QAAQ,GAEvE,SAAAC,EACH,KAIG,OAAC,OAAI,UAAWC,EAAc,SAAAD,EAAY,CACnD,EAEA,SACE,QAAC,WACC,IAAKH,EACL,uBAAqB,eACrB,aAAW,MAAG,sCAAuCL,CAAS,EAG9D,oBAAC,WAAQ,KAAM,EAAG,GAAG,KAAK,UAAU,+BACjC,SAAAE,EACH,EACCC,MACC,OAAC,QACC,KAAM,EACN,GAAG,IACH,UAAU,+FAET,SAAAA,EACH,KAIF,OAAC,OAAI,UAAU,yGACZ,SAAAC,EAAM,IAAIG,MACT,OAAC,EAAAT,QAAM,SAAN,CAAiC,SAAAQ,EAAWC,CAAI,GAA5BA,EAAK,KAAyB,CACpD,EACH,KAGA,OAAC,OAAI,UAAU,iCACb,mBAAC,UAAO,aAAc,GAAI,cAAc,OAAO,WAAU,GAAC,UAAU,oCACjE,SAAAH,EAAM,IAAIG,MACT,OAAC,eAA6B,UAAU,iCACtC,oBAAC,OAEC,aAAW,MACT,iOACA,CACE,YAAaA,EAAK,QAAU,OAC5B,aAAcA,EAAK,QAAU,OAC/B,CACF,EAEA,oBAAC,WACC,OAAQA,EAAK,MAAM,IACnB,IAAKA,EAAK,MAAM,KAAOA,EAAK,MAC5B,UAAU,2BACV,aAAa,uBACf,KACA,QAAC,OAAI,UAAU,OACb,oBAAC,WAAQ,KAAM,EAAG,GAAG,KAClB,SAAAA,EAAK,MACR,KACA,OAAC,QACC,KAAM,EACN,GAAG,IACH,UAAU,qGAET,SAAAA,EAAK,SACR,GACF,IA1BKA,EAAK,KA2BZ,GA7BgBA,EAAK,KA8BvB,CACD,EACH,EACF,GACF,CAEJ,CAAC,EAEDV,EAAa,YAAc,eAE3B,IAAOX,KAAQ,cAAWW,CAAY",
|
|
6
6
|
"names": ["FeatureCards_exports", "__export", "FeatureCards_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "FeatureCards", "React", "data", "className", "ref", "title", "subtitle", "items", "boxRef", "renderCard", "item", "cardContent", "cardClasses"]
|
|
7
7
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Theme } from '../../types/props.js';
|
|
1
|
+
import type { Media, Theme } from '../../types/props.js';
|
|
2
2
|
export interface FeatureCardItem {
|
|
3
3
|
/** 卡片标题 */
|
|
4
4
|
title: string;
|
|
5
5
|
/** 卡片副标题/描述 */
|
|
6
6
|
subtitle: string;
|
|
7
7
|
/** 背景图片 URL */
|
|
8
|
-
|
|
8
|
+
image: Media;
|
|
9
9
|
/** 主题,默认 light */
|
|
10
10
|
theme?: Theme;
|
|
11
11
|
/** 链接地址 */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!p.call(t,r)&&r!==a&&s(t,r,{get:()=>e[r],enumerable:!(i=m(e,r))||i.enumerable});return t};var d=t=>g(s({},"__esModule",{value:!0}),t);var l={};module.exports=d(l);
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/FeatureCards/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Theme } from '../../types/props.js'\n\nexport interface FeatureCardItem {\n /** \u5361\u7247\u6807\u9898 */\n title: string\n /** \u5361\u7247\u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle: string\n /** \u80CC\u666F\u56FE\u7247 URL */\n
|
|
4
|
+
"sourcesContent": ["import type { Media, Theme } from '../../types/props.js'\n\nexport interface FeatureCardItem {\n /** \u5361\u7247\u6807\u9898 */\n title: string\n /** \u5361\u7247\u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle: string\n /** \u80CC\u666F\u56FE\u7247 URL */\n image: Media\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n /** \u94FE\u63A5\u5730\u5740 */\n link?: string\n}\n\nexport interface FeatureCardsProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle?: string\n /** \u5361\u7247\u5217\u8868 */\n items: FeatureCardItem[]\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["types_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var v=Object.create;var m=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var y=(t,p)=>{for(var s in p)m(t,s,{get:p[s],enumerable:!0})},
|
|
1
|
+
"use strict";"use client";var v=Object.create;var m=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var y=(t,p)=>{for(var s in p)m(t,s,{get:p[s],enumerable:!0})},c=(t,p,s,d)=>{if(p&&typeof p=="object"||typeof p=="function")for(let l of N(p))!g.call(t,l)&&l!==s&&m(t,l,{get:()=>p[l],enumerable:!(d=w(p,l))||d.enumerable});return t};var b=(t,p,s)=>(s=t!=null?v(k(t)):{},c(p||!t||!t.__esModule?m(s,"default",{value:t,enumerable:!0}):s,t)),F=t=>c(m({},"__esModule",{value:!0}),t);var M={};y(M,{default:()=>H});module.exports=F(M);var e=require("react/jsx-runtime"),x=b(require("react")),a=require("../../components/index.js"),u=require("../../helpers/utils.js"),f=require("../../shared/Styles.js"),h=require("../../hooks/useExposure.js");const S="image",T="feature_showcase",n=x.default.forwardRef(({data:t,className:p},s)=>{const{datalist:d=[],datalists:l=[]}=t||{},i=(0,x.useRef)(null);return(0,h.useExposure)(i,{componentType:S,componentName:T,componentTitle:"Feature Showcase"}),(0,x.useImperativeHandle)(s,()=>i.current),(0,e.jsxs)("section",{ref:i,"data-ui-component-id":"FeatureShowcase",className:(0,u.cn)("flex gap-[16px] scrollbar-hidden l:flex-row l:overflow-hidden l:overflow-x-scroll laptop:flex-col",p),children:[(0,e.jsx)("div",{className:"flex gap-[16px]",children:d?.map((o,r)=>(0,e.jsx)("div",{children:(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)(a.Picture,{source:`${o.imageMob.url}`,className:"w-[296px] rounded-[12px] laptop:hidden"}),(0,e.jsx)(a.Picture,{source:`${o.image.url} 1024`,className:"l:hidden"}),(0,e.jsxs)("div",{className:"absolute bottom-0 left-0 px-[16px] py-[12px] text-[#fff] laptop:px-[16px] laptop:py-[20px] desktop:px-[32px] desktop:py-[24px] lg-desktop:px-[32px] lg-desktop:py-[32px]",children:[(0,e.jsx)(a.Heading,{as:"h2",size:3,html:o?.title,className:"mt-[16px] md:text-[20px]"}),(0,e.jsx)(a.Text,{as:"p",html:o.desc,size:4,className:"mt-[4px] line-clamp-2 h-[40px] text-[14px] tablet:text-[14px] laptop:text-[14px] desktop:h-fit desktop:text-[16px] lg-desktop:text-[18px]"})]})]})},r))}),(0,e.jsx)("div",{className:"flex gap-[16px]",children:l?.map((o,r)=>(0,e.jsx)("div",{children:(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)(a.Picture,{source:`${o.imageMob.url}`,className:"w-[296px] rounded-[12px] laptop:hidden"}),(0,e.jsx)(a.Picture,{source:`${o.image.url} 1024`,className:"l:hidden"}),(0,e.jsxs)("div",{className:"absolute bottom-0 left-0 px-[16px] py-[12px] text-[#fff] laptop:px-[16px] laptop:py-[20px] desktop:px-[32px] desktop:py-[24px] lg-desktop:px-[32px] lg-desktop:py-[32px]",children:[(0,e.jsx)(a.Heading,{as:"h2",size:3,html:o?.title,className:"mt-[16px] md:text-[20px]"}),(0,e.jsx)(a.Text,{as:"p",html:o.desc,size:4,className:"mt-[4px] line-clamp-2 h-[40px] text-[14px] tablet:text-[14px] laptop:text-[14px] desktop:h-fit desktop:text-[16px] lg-desktop:text-[18px]"})]})]})},r))})]})});n.displayName="FeatureShowcase";var H=(0,f.withLayout)(n);
|
|
2
2
|
//# sourceMappingURL=FeatureShowcase.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/FeatureShowcase/FeatureShowcase.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Picture, Text, Heading } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { FeatureShowcaseProps, FeatureShowcaseItem } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'feature_showcase'\n\nconst FeatureShowcase = React.forwardRef<HTMLDivElement, FeatureShowcaseProps>(
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Picture, Text, Heading } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { FeatureShowcaseProps, FeatureShowcaseItem } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'feature_showcase'\n\nconst FeatureShowcase = React.forwardRef<HTMLDivElement, FeatureShowcaseProps>(({ data, className }, ref) => {\n const { datalist = [], datalists = [] } = data || {}\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: 'Feature Showcase',\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"FeatureShowcase\"\n className={cn(\n 'flex gap-[16px] scrollbar-hidden l:flex-row l:overflow-hidden l:overflow-x-scroll laptop:flex-col',\n className\n )}\n >\n <div className=\"flex gap-[16px]\">\n {datalist?.map((item: FeatureShowcaseItem, index: number) => (\n <div key={index}>\n <div className=\"relative\">\n <Picture source={`${item.imageMob.url}`} className=\"w-[296px] rounded-[12px] laptop:hidden\" />\n <Picture source={`${item.image.url} 1024`} className=\"l:hidden\" />\n <div className=\"absolute bottom-0 left-0 px-[16px] py-[12px] text-[#fff] laptop:px-[16px] laptop:py-[20px] desktop:px-[32px] desktop:py-[24px] lg-desktop:px-[32px] lg-desktop:py-[32px]\">\n <Heading as={'h2'} size={3} html={item?.title} className=\"mt-[16px] md:text-[20px]\" />\n\n <Text\n as={'p'}\n html={item.desc}\n size={4}\n className=\"mt-[4px] line-clamp-2 h-[40px] text-[14px] tablet:text-[14px] laptop:text-[14px] desktop:h-fit desktop:text-[16px] lg-desktop:text-[18px]\"\n />\n </div>\n </div>\n </div>\n ))}\n </div>\n <div className=\"flex gap-[16px]\">\n {datalists?.map((item: FeatureShowcaseItem, index: number) => (\n <div key={index}>\n <div className=\"relative\">\n <Picture source={`${item.imageMob.url}`} className=\"w-[296px] rounded-[12px] laptop:hidden\" />\n <Picture source={`${item.image.url} 1024`} className=\"l:hidden\" />\n <div className=\"absolute bottom-0 left-0 px-[16px] py-[12px] text-[#fff] laptop:px-[16px] laptop:py-[20px] desktop:px-[32px] desktop:py-[24px] lg-desktop:px-[32px] lg-desktop:py-[32px]\">\n <Heading as={'h2'} size={3} html={item?.title} className=\"mt-[16px] md:text-[20px]\" />\n\n <Text\n as={'p'}\n html={item.desc}\n size={4}\n className=\"mt-[4px] line-clamp-2 h-[40px] text-[14px] tablet:text-[14px] laptop:text-[14px] desktop:h-fit desktop:text-[16px] lg-desktop:text-[18px]\"\n />\n </div>\n </div>\n </div>\n ))}\n </div>\n </section>\n )\n})\n\nFeatureShowcase.displayName = 'FeatureShowcase'\n\nexport default withLayout(FeatureShowcase)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqCc,IAAAI,EAAA,6BApCdC,EAAmD,oBACnDC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,mBAEhBC,EAAkB,EAAAC,QAAM,WAAiD,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CAC3G,KAAM,CAAE,SAAAC,EAAW,CAAC,EAAG,UAAAC,EAAY,CAAC,CAAE,EAAIJ,GAAQ,CAAC,EAE7CK,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAT,EACA,cAAAC,EACA,eAAgB,kBAClB,CAAC,KAED,uBAAoBK,EAAK,IAAMG,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,kBACrB,aAAW,MACT,oGACAJ,CACF,EAEA,oBAAC,OAAI,UAAU,kBACZ,SAAAE,GAAU,IAAI,CAACG,EAA2BC,OACzC,OAAC,OACC,oBAAC,OAAI,UAAU,WACb,oBAAC,WAAQ,OAAQ,GAAGD,EAAK,SAAS,GAAG,GAAI,UAAU,yCAAyC,KAC5F,OAAC,WAAQ,OAAQ,GAAGA,EAAK,MAAM,GAAG,QAAS,UAAU,WAAW,KAChE,QAAC,OAAI,UAAU,2KACb,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAMA,GAAM,MAAO,UAAU,2BAA2B,KAEpF,OAAC,QACC,GAAI,IACJ,KAAMA,EAAK,KACX,KAAM,EACN,UAAU,4IACZ,GACF,GACF,GAdQC,CAeV,CACD,EACH,KACA,OAAC,OAAI,UAAU,kBACZ,SAAAH,GAAW,IAAI,CAACE,EAA2BC,OAC1C,OAAC,OACC,oBAAC,OAAI,UAAU,WACb,oBAAC,WAAQ,OAAQ,GAAGD,EAAK,SAAS,GAAG,GAAI,UAAU,yCAAyC,KAC5F,OAAC,WAAQ,OAAQ,GAAGA,EAAK,MAAM,GAAG,QAAS,UAAU,WAAW,KAChE,QAAC,OAAI,UAAU,2KACb,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAMA,GAAM,MAAO,UAAU,2BAA2B,KAEpF,OAAC,QACC,GAAI,IACJ,KAAMA,EAAK,KACX,KAAM,EACN,UAAU,4IACZ,GACF,GACF,GAdQC,CAeV,CACD,EACH,GACF,CAEJ,CAAC,EAEDT,EAAgB,YAAc,kBAE9B,IAAOV,KAAQ,cAAWU,CAAe",
|
|
6
6
|
"names": ["FeatureShowcase_exports", "__export", "FeatureShowcase_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "FeatureShowcase", "React", "data", "className", "ref", "datalist", "datalists", "boxRef", "item", "index"]
|
|
7
7
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import type { Media } from '../../types/props';
|
|
1
2
|
export interface FeatureShowcaseItem {
|
|
2
3
|
/** 标题 */
|
|
3
4
|
title: string;
|
|
4
5
|
/** 描述文本 */
|
|
5
6
|
desc: string;
|
|
6
7
|
/** 桌面端图片 URL */
|
|
7
|
-
image:
|
|
8
|
+
image: Media;
|
|
8
9
|
/** 移动端图片 URL */
|
|
9
|
-
imageMob:
|
|
10
|
+
imageMob: Media;
|
|
10
11
|
}
|
|
11
12
|
export interface FeatureShowcaseProps {
|
|
12
13
|
data: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of c(e))!m.call(t,a)&&a!==i&&r(t,a,{get:()=>e[a],enumerable:!(s=o(e,a))||s.enumerable});return t};var d=t=>p(r({},"__esModule",{value:!0}),t);var g={};module.exports=d(g);
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/FeatureShowcase/types.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
4
|
+
"sourcesContent": ["import type { Media } from '../../types/props'\n\nexport interface FeatureShowcaseItem {\n /** \u6807\u9898 */\n title: string\n /** \u63CF\u8FF0\u6587\u672C */\n desc: string\n /** \u684C\u9762\u7AEF\u56FE\u7247 URL */\n image: Media\n /** \u79FB\u52A8\u7AEF\u56FE\u7247 URL */\n imageMob: Media\n}\n\nexport interface FeatureShowcaseProps {\n data: {\n /** \u7B2C\u4E00\u7EC4\u6570\u636E\u5217\u8868 */\n datalist: FeatureShowcaseItem[]\n /** \u7B2C\u4E8C\u7EC4\u6570\u636E\u5217\u8868 */\n datalists: FeatureShowcaseItem[]\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["types_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var v=Object.create;var i=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var j=(t,e)=>{for(var p in e)i(t,p,{get:e[p],enumerable:!0})},f=(t,e,p,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of w(e))!H.call(t,l)&&l!==p&&i(t,l,{get:()=>e[l],enumerable:!(x=y(e,l))||x.enumerable});return t};var z=(t,e,p)=>(p=t!=null?v(F(t)):{},f(e||!t||!t.__esModule?i(p,"default",{value:t,enumerable:!0}):p,t)),D=t=>f(i({},"__esModule",{value:!0}),t);var R={};j(R,{default:()=>P});module.exports=D(R);var a=require("react/jsx-runtime"),s=z(require("react")),o=require("../../components/index.js"),n=require("../../helpers/utils.js"),g=require("../../shared/Styles.js"),b=require("../../hooks/useExposure.js");const E="image",L="image_text_feature",u=s.default.forwardRef(({data:t,className:e},p)=>{const{title:x,subtitle:l,pcImage:m,mobileImage:h,padImage:k,items:I=[],imagePosition:r="left",theme:N="light"}=t,c=(0,s.useRef)(null);return(0,b.useExposure)(c,{componentType:E,componentName:L,componentTitle:x,componentDescription:l}),(0,s.useImperativeHandle)(p,()=>c.current),(0,a.jsxs)("section",{ref:c,"data-ui-component-id":"ImageTextFeature",className:(0,n.cn)(N==="dark"?"aiui-dark":"","flex flex-col items-center gap-[24px] text-info-primary laptop:flex-row laptop:gap-[32px] desktop:gap-[48px] lg-desktop:gap-[64px]",e),children:[(0,a.jsx)(o.Picture,{source:`${m.url}, ${k?.url||m.url} 1024, ${h.url||m.url} 768`,alt:m.alt,className:(0,n.cn)("aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560]",{"order-2 laptop:order-1 laptop:basis-[63%] desktop:basis-[57%]":r==="left","order-2 laptop:basis-[63%] desktop:basis-[57%]":r==="right"})}),(0,a.jsxs)("div",{className:(0,n.cn)("flex w-full flex-col items-start justify-center laptop:w-fit",{"order-1 laptop:order-2":r==="left","order-1":r==="right"}),children:[(0,a.jsx)(o.Heading,{size:4,html:x,as:"h3",className:"w-full text-left"}),l&&(0,a.jsx)(o.Text,{size:4,html:l,as:"p",className:"mt-[4px] text-left text-[14px] min-xxl:mt-[8px] laptop:text-center laptop:text-[16px] lg-desktop:text-[18px]"}),(0,a.jsx)("div",{className:"flex w-full flex-col justify-around gap-0 tablet:flex-row tablet:justify-start tablet:gap-[90px] laptop:w-fit laptop:flex-col laptop:justify-around laptop:gap-0",children:I.map((d,T)=>(0,a.jsxs)("div",{className:"mt-[24px] laptop:mt-[32px] desktop:mt-[48px]",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center gap-[8px]",children:[(0,a.jsx)("img",{src:d.icon,alt:"icon",className:"h-[28px] -translate-y-[12%] md:text-[40px] min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px]"}),(0,a.jsx)(o.Heading,{size:5,as:"h6",className:"bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent",children:d.text})]}),(0,a.jsx)(o.Text,{size:4,as:"p",html:d.desc,className:"-mt-[2px] text-[14px] tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px]"})]},T))})]})]})});u.displayName="ImageTextFeature";var P=(0,g.withLayout)(u);
|
|
2
2
|
//# sourceMappingURL=ImageTextFeature.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ImageTextFeature/ImageTextFeature.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ImageTextFeatureProps, ImageTextFeatureItem } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'image_text_feature'\n\nconst ImageTextFeature = React.forwardRef<HTMLDivElement, ImageTextFeatureProps>(({ data, className }, ref) => {\n const {
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["ImageTextFeature_exports", "__export", "ImageTextFeature_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "ImageTextFeature", "React", "data", "className", "ref", "title", "subtitle", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ImageTextFeatureProps, ImageTextFeatureItem } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'image_text_feature'\n\nconst ImageTextFeature = React.forwardRef<HTMLDivElement, ImageTextFeatureProps>(({ data, className }, ref) => {\n const { title, subtitle, pcImage, mobileImage, padImage, items = [], imagePosition = 'left', theme = 'light' } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ImageTextFeature\"\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'flex flex-col items-center gap-[24px] text-info-primary laptop:flex-row laptop:gap-[32px] desktop:gap-[48px] lg-desktop:gap-[64px]',\n className\n )}\n >\n {/* \u56FE\u7247\u533A\u57DF */}\n <Picture\n source={`${pcImage.url}, ${padImage?.url || pcImage.url} 1024, ${mobileImage.url || pcImage.url} 768`}\n alt={pcImage.alt}\n className={cn('aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560]', {\n 'order-2 laptop:order-1 laptop:basis-[63%] desktop:basis-[57%]': imagePosition === 'left',\n 'order-2 laptop:basis-[63%] desktop:basis-[57%]': imagePosition === 'right',\n })}\n />\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div\n className={cn('flex w-full flex-col items-start justify-center laptop:w-fit', {\n 'order-1 laptop:order-2': imagePosition === 'left',\n 'order-1': imagePosition === 'right',\n })}\n >\n {/* \u6807\u9898 */}\n <Heading size={4} html={title} as=\"h3\" className=\"w-full text-left\" />\n\n {/* \u526F\u6807\u9898 */}\n {subtitle && (\n <Text\n size={4}\n html={subtitle}\n as=\"p\"\n className=\"mt-[4px] text-left text-[14px] min-xxl:mt-[8px] laptop:text-center laptop:text-[16px] lg-desktop:text-[18px]\"\n />\n )}\n\n {/* \u529F\u80FD\u5217\u8868 */}\n <div className=\"flex w-full flex-col justify-around gap-0 tablet:flex-row tablet:justify-start tablet:gap-[90px] laptop:w-fit laptop:flex-col laptop:justify-around laptop:gap-0\">\n {items.map((item: ImageTextFeatureItem, index: number) => (\n <div key={index} className=\"mt-[24px] laptop:mt-[32px] desktop:mt-[48px]\">\n <div className=\"flex flex-row items-center gap-[8px]\">\n <img\n src={item.icon}\n alt=\"icon\"\n className=\"h-[28px] -translate-y-[12%] md:text-[40px] min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px]\"\n />\n <Heading\n size={5}\n as=\"h6\"\n className=\"bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent\"\n >\n {item.text}\n </Heading>\n </div>\n <Text\n size={4}\n as=\"p\"\n html={item.desc}\n className=\"-mt-[2px] text-[14px] tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px]\"\n />\n </div>\n ))}\n </div>\n </div>\n </section>\n )\n})\n\nImageTextFeature.displayName = 'ImageTextFeature'\n\nexport default withLayout(ImageTextFeature)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoCM,IAAAI,EAAA,6BAnCNC,EAAmD,oBACnDC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,qBAEhBC,EAAmB,EAAAC,QAAM,WAAkD,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CAC7G,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,YAAAC,EAAa,SAAAC,EAAU,MAAAC,EAAQ,CAAC,EAAG,cAAAC,EAAgB,OAAQ,MAAAC,EAAQ,OAAQ,EAAIV,EAE3GW,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAf,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMS,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,mBACrB,aAAW,MACTD,IAAU,OAAS,YAAc,GACjC,qIACAT,CACF,EAGA,oBAAC,WACC,OAAQ,GAAGI,EAAQ,GAAG,KAAKE,GAAU,KAAOF,EAAQ,GAAG,UAAUC,EAAY,KAAOD,EAAQ,GAAG,OAC/F,IAAKA,EAAQ,IACb,aAAW,MAAG,+FAAgG,CAC5G,gEAAiEI,IAAkB,OACnF,iDAAkDA,IAAkB,OACtE,CAAC,EACH,KAGA,QAAC,OACC,aAAW,MAAG,+DAAgE,CAC5E,yBAA0BA,IAAkB,OAC5C,UAAWA,IAAkB,OAC/B,CAAC,EAGD,oBAAC,WAAQ,KAAM,EAAG,KAAMN,EAAO,GAAG,KAAK,UAAU,mBAAmB,EAGnEC,MACC,OAAC,QACC,KAAM,EACN,KAAMA,EACN,GAAG,IACH,UAAU,+GACZ,KAIF,OAAC,OAAI,UAAU,mKACZ,SAAAI,EAAM,IAAI,CAACI,EAA4BC,OACtC,QAAC,OAAgB,UAAU,+CACzB,qBAAC,OAAI,UAAU,uCACb,oBAAC,OACC,IAAKD,EAAK,KACV,IAAI,OACJ,UAAU,8JACZ,KACA,OAAC,WACC,KAAM,EACN,GAAG,KACH,UAAU,6EAET,SAAAA,EAAK,KACR,GACF,KACA,OAAC,QACC,KAAM,EACN,GAAG,IACH,KAAMA,EAAK,KACX,UAAU,yGACZ,IApBQC,CAqBV,CACD,EACH,GACF,GACF,CAEJ,CAAC,EAEDf,EAAiB,YAAc,mBAE/B,IAAOV,KAAQ,cAAWU,CAAgB",
|
|
6
|
+
"names": ["ImageTextFeature_exports", "__export", "ImageTextFeature_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "ImageTextFeature", "React", "data", "className", "ref", "title", "subtitle", "pcImage", "mobileImage", "padImage", "items", "imagePosition", "theme", "boxRef", "item", "index"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Media, Theme } from '../../types/props.js';
|
|
2
2
|
export interface ImageTextFeatureItem {
|
|
3
3
|
/** 功能图标 */
|
|
4
4
|
icon: string;
|
|
@@ -14,11 +14,11 @@ export interface ImageTextFeatureProps {
|
|
|
14
14
|
/** 副标题 */
|
|
15
15
|
subtitle?: string;
|
|
16
16
|
/** PC端图片 */
|
|
17
|
-
|
|
17
|
+
pcImage: Media;
|
|
18
18
|
/** 移动端图片 */
|
|
19
|
-
|
|
19
|
+
mobileImage: Media;
|
|
20
20
|
/** 平板端图片 */
|
|
21
|
-
|
|
21
|
+
padImage?: Media;
|
|
22
22
|
/** 功能项列表 */
|
|
23
23
|
items: ImageTextFeatureItem[];
|
|
24
24
|
/** 图片位置,默认 left */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var o=(t,e,m,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of g(e))!n.call(t,i)&&i!==m&&r(t,i,{get:()=>e[i],enumerable:!(a=s(e,i))||a.enumerable});return t};var p=t=>o(r({},"__esModule",{value:!0}),t);var I={};module.exports=p(I);
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ImageTextFeature/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type {
|
|
4
|
+
"sourcesContent": ["import type { Media, Theme } from '../../types/props.js'\n\nexport interface ImageTextFeatureItem {\n /** \u529F\u80FD\u56FE\u6807 */\n icon: string\n /** \u529F\u80FD\u6807\u9898 */\n text: string\n /** \u529F\u80FD\u63CF\u8FF0 */\n desc: string\n}\n\nexport interface ImageTextFeatureProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898 */\n subtitle?: string\n /** PC\u7AEF\u56FE\u7247 */\n pcImage: Media\n /** \u79FB\u52A8\u7AEF\u56FE\u7247 */\n mobileImage: Media\n /** \u5E73\u677F\u7AEF\u56FE\u7247 */\n padImage?: Media\n /** \u529F\u80FD\u9879\u5217\u8868 */\n items: ImageTextFeatureItem[]\n /** \u56FE\u7247\u4F4D\u7F6E\uFF0C\u9ED8\u8BA4 left */\n imagePosition?: 'left' | 'right'\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["types_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var I=Object.create;var
|
|
1
|
+
"use strict";"use client";var I=Object.create;var l=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var o in t)l(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of k(t))!D.call(e,a)&&a!==o&&l(e,a,{get:()=>t[a],enumerable:!(i=w(t,a))||i.enumerable});return e};var W=(e,t,o)=>(o=e!=null?I(y(e)):{},f(t||!e||!e.__esModule?l(o,"default",{value:e,enumerable:!0}):o,e)),b=e=>f(l({},"__esModule",{value:!0}),e);var z={};H(z,{default:()=>R});module.exports=b(z);var p=require("react/jsx-runtime"),x=W(require("react")),m=require("../../components/index.js"),g=require("../../helpers/utils.js"),h=require("../../shared/Styles.js"),T=require("../../hooks/useExposure.js");const E="image",L="image_with_text",u=x.default.forwardRef(({data:e,className:t},o)=>{const{title:i,subtitle:a,desc:n,descIcon:c,image:s,padImage:v,mobileImage:N,theme:d="dark"}=e,r=(0,x.useRef)(null);return(0,T.useExposure)(r,{componentType:E,componentName:L,componentTitle:i,componentDescription:a}),(0,x.useImperativeHandle)(o,()=>r.current),(0,p.jsxs)("section",{ref:r,"data-ui-component-id":"ImageWithText",className:(0,g.cn)("flex flex-col gap-[24px] laptop:flex-row laptop:gap-[48px] lg-desktop:gap-[64px]",{"text-white":d==="dark","text-[#1f1f1f]":d==="light"},t),children:[(0,p.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,p.jsx)(m.Heading,{as:"h2",size:4,html:i}),a&&(0,p.jsx)(m.Text,{as:"p",size:3,html:a,className:"mt-[4px] text-[14px] tablet:text-[14px] laptop:mt-[16px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px]"}),(0,p.jsxs)("div",{className:"flex flex-row gap-[8px]",children:[c&&(0,p.jsx)("img",{src:c,alt:"icon",className:"h-[36px] w-[36px] desktop:h-[48px] desktop:w-[48px]"}),n&&(0,p.jsx)(m.Heading,{as:"h4",size:5,html:n,className:"text-[#3AD1FF] md:text-[40px] min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px]"})]})]}),(0,p.jsx)("div",{className:"",children:(0,p.jsx)(m.Picture,{source:`${s.url},${v?.url||s.url} 1024, ${N?.url||s.url} 768`,className:"rounded-[10px] laptop:rounded-[16px]"})})]})});u.displayName="ImageWithText";var R=(0,h.withLayout)(u);
|
|
2
2
|
//# sourceMappingURL=ImageWithText.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ImageWithText/ImageWithText.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ImageWithTextProps } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'image_with_text'\n\nconst ImageWithText = React.forwardRef<HTMLDivElement, ImageWithTextProps>(({ data, className }, ref) => {\n const {
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,
|
|
6
|
-
"names": ["ImageWithText_exports", "__export", "ImageWithText_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "ImageWithText", "React", "data", "className", "ref", "title", "subtitle", "desc", "descIcon", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport { Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ImageWithTextProps } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'image_with_text'\n\nconst ImageWithText = React.forwardRef<HTMLDivElement, ImageWithTextProps>(({ data, className }, ref) => {\n const { title, subtitle, desc, descIcon, image, padImage, mobileImage, theme = 'dark' } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ImageWithText\"\n className={cn(\n 'flex flex-col gap-[24px] laptop:flex-row laptop:gap-[48px] lg-desktop:gap-[64px]',\n {\n 'text-white': theme === 'dark',\n 'text-[#1f1f1f]': theme === 'light',\n },\n className\n )}\n >\n <div className=\"flex flex-col justify-center\">\n <Heading as={'h2'} size={4} html={title} />\n {subtitle && (\n <Text\n as={'p'}\n size={3}\n html={subtitle}\n className=\"mt-[4px] text-[14px] tablet:text-[14px] laptop:mt-[16px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px]\"\n />\n )}\n <div className=\"flex flex-row gap-[8px]\">\n {descIcon && (\n <img src={descIcon} alt=\"icon\" className=\"h-[36px] w-[36px] desktop:h-[48px] desktop:w-[48px]\" />\n )}\n {desc && (\n <Heading\n as={'h4'}\n size={5}\n html={desc}\n className=\"text-[#3AD1FF] md:text-[40px] min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px]\"\n />\n )}\n </div>\n </div>\n <div className=\"\">\n <Picture\n source={`${image.url},${padImage?.url || image.url} 1024, ${mobileImage?.url || image.url} 768`}\n className=\"rounded-[10px] laptop:rounded-[16px]\"\n />\n </div>\n </section>\n )\n})\n\nImageWithText.displayName = 'ImageWithText'\n\nexport default withLayout(ImageWithText)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAuCQ,IAAAI,EAAA,6BAtCRC,EAAmD,oBACnDC,EAAuC,qCACvCC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,kBAEhBC,EAAgB,EAAAC,QAAM,WAA+C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACvG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,KAAAC,EAAM,SAAAC,EAAU,MAAAC,EAAO,SAAAC,EAAU,YAAAC,EAAa,MAAAC,EAAQ,MAAO,EAAIV,EAEpFW,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAf,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMS,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,gBACrB,aAAW,MACT,mFACA,CACE,aAAcD,IAAU,OACxB,iBAAkBA,IAAU,OAC9B,EACAT,CACF,EAEA,qBAAC,OAAI,UAAU,+BACb,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAME,EAAO,EACxCC,MACC,OAAC,QACC,GAAI,IACJ,KAAM,EACN,KAAMA,EACN,UAAU,yHACZ,KAEF,QAAC,OAAI,UAAU,0BACZ,UAAAE,MACC,OAAC,OAAI,IAAKA,EAAU,IAAI,OAAO,UAAU,sDAAsD,EAEhGD,MACC,OAAC,WACC,GAAI,KACJ,KAAM,EACN,KAAMA,EACN,UAAU,4GACZ,GAEJ,GACF,KACA,OAAC,OAAI,UAAU,GACb,mBAAC,WACC,OAAQ,GAAGE,EAAM,GAAG,IAAIC,GAAU,KAAOD,EAAM,GAAG,UAAUE,GAAa,KAAOF,EAAM,GAAG,OACzF,UAAU,uCACZ,EACF,GACF,CAEJ,CAAC,EAEDT,EAAc,YAAc,gBAE5B,IAAOV,KAAQ,cAAWU,CAAa",
|
|
6
|
+
"names": ["ImageWithText_exports", "__export", "ImageWithText_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "ImageWithText", "React", "data", "className", "ref", "title", "subtitle", "desc", "descIcon", "image", "padImage", "mobileImage", "theme", "boxRef"]
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Theme } from '../../types/props.js';
|
|
1
|
+
import type { Media, Theme } from '../../types/props.js';
|
|
2
2
|
export interface ImageWithTextProps {
|
|
3
3
|
data: {
|
|
4
4
|
/** 主标题 */
|
|
@@ -10,11 +10,11 @@ export interface ImageWithTextProps {
|
|
|
10
10
|
/** 描述文本图标 */
|
|
11
11
|
descIcon?: string;
|
|
12
12
|
/** PC端图片 URL */
|
|
13
|
-
|
|
13
|
+
image: Media;
|
|
14
14
|
/** 平板端图片 URL */
|
|
15
|
-
|
|
15
|
+
padImage?: Media;
|
|
16
16
|
/** 移动端图片 URL */
|
|
17
|
-
|
|
17
|
+
mobileImage?: Media;
|
|
18
18
|
/** 主题,默认 dark */
|
|
19
19
|
theme?: Theme;
|
|
20
20
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(t,e,m,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of g(e))!d.call(t,i)&&i!==m&&s(t,i,{get:()=>e[i],enumerable:!(a=r(e,i))||a.enumerable});return t};var n=t=>p(s({},"__esModule",{value:!0}),t);var o={};module.exports=n(o);
|
|
2
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ImageWithText/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Theme } from '../../types/props.js'\n\nexport interface ImageWithTextProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle?: string\n /** \u63CF\u8FF0\u6587\u672C\uFF08\u901A\u5E38\u662F\u5927\u53F7\u9AD8\u4EAE\u6587\u672C\uFF09 */\n desc?: string\n /** \u63CF\u8FF0\u6587\u672C\u56FE\u6807 */\n descIcon?: string\n /** PC\u7AEF\u56FE\u7247 URL */\n
|
|
4
|
+
"sourcesContent": ["import type { Media, Theme } from '../../types/props.js'\n\nexport interface ImageWithTextProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0 */\n subtitle?: string\n /** \u63CF\u8FF0\u6587\u672C\uFF08\u901A\u5E38\u662F\u5927\u53F7\u9AD8\u4EAE\u6587\u672C\uFF09 */\n desc?: string\n /** \u63CF\u8FF0\u6587\u672C\u56FE\u6807 */\n descIcon?: string\n /** PC\u7AEF\u56FE\u7247 URL */\n image: Media\n /** \u5E73\u677F\u7AEF\u56FE\u7247 URL */\n padImage?: Media\n /** \u79FB\u52A8\u7AEF\u56FE\u7247 URL */\n mobileImage?: Media\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 dark */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
|
|
5
5
|
"mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
|
|
6
6
|
"names": ["types_exports", "__toCommonJS"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var P=Object.create;var i=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var w=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},c=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of N(e))!k.call(t,p)&&p!==s&&i(t,p,{get:()=>e[p],enumerable:!(r=v(e,p))||r.enumerable});return t};var T=(t,e,s)=>(s=t!=null?P(g(t)):{},c(e||!t||!t.__esModule?i(s,"default",{value:t,enumerable:!0}):s,t)),y=t=>c(i({},"__esModule",{value:!0}),t);var R={};w(R,{default:()=>E});module.exports=y(R);var o=require("react/jsx-runtime"),l=T(require("react")),a=require("../../components/index.js"),
|
|
1
|
+
"use strict";"use client";var P=Object.create;var i=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var w=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},c=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of N(e))!k.call(t,p)&&p!==s&&i(t,p,{get:()=>e[p],enumerable:!(r=v(e,p))||r.enumerable});return t};var T=(t,e,s)=>(s=t!=null?P(g(t)):{},c(e||!t||!t.__esModule?i(s,"default",{value:t,enumerable:!0}):s,t)),y=t=>c(i({},"__esModule",{value:!0}),t);var R={};w(R,{default:()=>E});module.exports=y(R);var o=require("react/jsx-runtime"),l=T(require("react")),a=require("../../components/index.js"),u=require("../../helpers/utils.js"),d=require("../../shared/Styles.js"),f=require("../../hooks/useExposure.js");const L="image",D="product_hero",n=l.default.forwardRef(({data:t,className:e},s)=>{const{title:r,subtitle:p,ctaText:x,poster:b,mobPoster:h,ctaLink:H}=t,m=(0,l.useRef)(null);return(0,f.useExposure)(m,{componentType:L,componentName:D,componentTitle:r,componentDescription:p}),(0,l.useImperativeHandle)(s,()=>m.current),(0,o.jsxs)("section",{ref:m,"data-ui-component-id":"ProductHero",className:(0,u.cn)("flex w-full flex-col items-center justify-between gap-[32px] tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px]",e),children:[(0,o.jsxs)("div",{className:"flex w-full flex-col items-start gap-[24px] tablet:basis-[42%] laptop:basis-[36%]",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(a.Heading,{as:"h3",size:4,html:r}),(0,o.jsx)(a.Heading,{as:"h4",size:2,html:p,className:"mt-[4px] hidden laptop:mt-[12px] laptop:block desktop:mt-[16px]"}),(0,o.jsx)(a.Text,{as:"p",size:2,html:p,className:"mt-[4px] block laptop:mt-[12px] laptop:hidden desktop:mt-[16px]"})]}),(0,o.jsx)("a",{href:H,children:(0,o.jsx)(a.Button,{className:"w-fit",children:x})})]}),(0,o.jsx)(a.Picture,{className:"aspect-[358/360] flex-shrink tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%]",source:`${b.url}, ${h.url} 768`})]})});n.displayName="ProductHero";var E=(0,d.withLayout)(n);
|
|
2
2
|
//# sourceMappingURL=ProductHero.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ProductHero/ProductHero.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Heading, Button, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ProductHeroProps } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'product_hero'\n\nconst ProductHero = React.forwardRef<HTMLDivElement, ProductHeroProps>(({ data, className }, ref) => {\n const { title, subtitle, ctaText, poster, mobPoster, ctaLink } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ProductHero\"\n className={cn(\n 'flex w-full flex-col items-center justify-between gap-[32px] tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px]',\n className\n )}\n >\n <div className=\"flex w-full flex-col items-start gap-[24px] tablet:basis-[42%] laptop:basis-[36%]\">\n <div>\n <Heading as={'h3'} size={4} html={title} />\n <Heading\n as={'h4'}\n size={2}\n html={subtitle}\n className=\"mt-[4px] hidden laptop:mt-[12px] laptop:block desktop:mt-[16px]\"\n />\n <Text\n as={'p'}\n size={2}\n html={subtitle}\n className=\"mt-[4px] block laptop:mt-[12px] laptop:hidden desktop:mt-[16px]\"\n />\n </div>\n <a href={ctaLink}>\n <Button className=\"w-fit\">{ctaText}</Button>\n </a>\n </div>\n <Picture\n className=\"aspect-[358/360] flex-shrink tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%]\"\n source={`${poster}, ${mobPoster} 768`}\n />\n </section>\n )\n})\n\nProductHero.displayName = 'ProductHero'\n\nexport default withLayout(ProductHero)\n"],
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmCQ,IAAAI,EAAA,6BAlCRC,EAAmD,oBACnDC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,eAEhBC,EAAc,EAAAC,QAAM,WAA6C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACnG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,OAAAC,EAAQ,UAAAC,EAAW,QAAAC,CAAQ,EAAIR,EAE3DS,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAb,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMO,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,cACrB,aAAW,MACT,uHACAR,CACF,EAEA,qBAAC,OAAI,UAAU,oFACb,qBAAC,OACC,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAME,EAAO,KACzC,OAAC,WACC,GAAI,KACJ,KAAM,EACN,KAAMC,EACN,UAAU,kEACZ,KACA,OAAC,QACC,GAAI,IACJ,KAAM,EACN,KAAMA,EACN,UAAU,kEACZ,GACF,KACA,OAAC,KAAE,KAAMI,EACP,mBAAC,UAAO,UAAU,QAAS,SAAAH,EAAQ,EACrC,GACF,KACA,OAAC,WACC,UAAU,6FACV,OAAQ,GAAGC,
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Heading, Button, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ProductHeroProps } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'product_hero'\n\nconst ProductHero = React.forwardRef<HTMLDivElement, ProductHeroProps>(({ data, className }, ref) => {\n const { title, subtitle, ctaText, poster, mobPoster, ctaLink } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ProductHero\"\n className={cn(\n 'flex w-full flex-col items-center justify-between gap-[32px] tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px]',\n className\n )}\n >\n <div className=\"flex w-full flex-col items-start gap-[24px] tablet:basis-[42%] laptop:basis-[36%]\">\n <div>\n <Heading as={'h3'} size={4} html={title} />\n <Heading\n as={'h4'}\n size={2}\n html={subtitle}\n className=\"mt-[4px] hidden laptop:mt-[12px] laptop:block desktop:mt-[16px]\"\n />\n <Text\n as={'p'}\n size={2}\n html={subtitle}\n className=\"mt-[4px] block laptop:mt-[12px] laptop:hidden desktop:mt-[16px]\"\n />\n </div>\n <a href={ctaLink}>\n <Button className=\"w-fit\">{ctaText}</Button>\n </a>\n </div>\n <Picture\n className=\"aspect-[358/360] flex-shrink tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%]\"\n source={`${poster.url}, ${mobPoster.url} 768`}\n />\n </section>\n )\n})\n\nProductHero.displayName = 'ProductHero'\n\nexport default withLayout(ProductHero)\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmCQ,IAAAI,EAAA,6BAlCRC,EAAmD,oBACnDC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,eAEhBC,EAAc,EAAAC,QAAM,WAA6C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACnG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,OAAAC,EAAQ,UAAAC,EAAW,QAAAC,CAAQ,EAAIR,EAE3DS,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAb,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMO,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,cACrB,aAAW,MACT,uHACAR,CACF,EAEA,qBAAC,OAAI,UAAU,oFACb,qBAAC,OACC,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAME,EAAO,KACzC,OAAC,WACC,GAAI,KACJ,KAAM,EACN,KAAMC,EACN,UAAU,kEACZ,KACA,OAAC,QACC,GAAI,IACJ,KAAM,EACN,KAAMA,EACN,UAAU,kEACZ,GACF,KACA,OAAC,KAAE,KAAMI,EACP,mBAAC,UAAO,UAAU,QAAS,SAAAH,EAAQ,EACrC,GACF,KACA,OAAC,WACC,UAAU,6FACV,OAAQ,GAAGC,EAAO,GAAG,KAAKC,EAAU,GAAG,OACzC,GACF,CAEJ,CAAC,EAEDT,EAAY,YAAc,cAE1B,IAAOV,KAAQ,cAAWU,CAAW",
|
|
6
6
|
"names": ["ProductHero_exports", "__export", "ProductHero_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "ProductHero", "React", "data", "className", "ref", "title", "subtitle", "ctaText", "poster", "mobPoster", "ctaLink", "boxRef"]
|
|
7
7
|
}
|