@anker-in/headless-ui 1.0.19-temp-101016 → 1.0.19-temp-101018

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.
@@ -1,2 +1,2 @@
1
- "use strict";var z=Object.create;var f=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var G=(e,t)=>{for(var r in t)f(e,r,{get:t[r],enumerable:!0})},N=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of W(t))!q.call(e,c)&&c!==r&&f(e,c,{get:()=>t[c],enumerable:!(a=M(t,c))||a.enumerable});return e};var x=(e,t,r)=>(r=e!=null?z(V(e)):{},N(t||!e||!e.__esModule?f(r,"default",{value:e,enumerable:!0}):r,e)),J=e=>N(f({},"__esModule",{value:!0}),e);var Z={};G(Z,{CollectionShelvesWrapItem:()=>Y});module.exports=J(Z);var s=require("react/jsx-runtime"),d=require("../../helpers/utils.js"),T=x(require("../../components/badge.js")),B=require("../../components/text.js"),y=x(require("../../components/button.js")),C=require("../../shared/track.js"),m=require("react"),b=x(require("../../components/picture.js")),D=require("../../components/heading.js"),$=require("../AiuiProvider/index.js"),F=require("../../shared/trackUrlRef.js"),O=require("../ShelfDisplay/shelfDisplay.js");const K="image",Q="collectio_shelves",X=999999999e-2,Y=({data:e,configuration:t})=>{const{itemShape:r}=t||{},{locale:a="us"}=(0,$.useAiuiContext)(),[c,P]=(0,m.useState)(""),I=(o,i,n)=>t?.event?.primaryButton?.(o,i+1,n),E=(o,i,n)=>t?.event?.secondaryButton?.(o,i+1,n),l=e?.variants?.find(o=>o?.sku===e?.sku)||e?.variants?.[0]||{},g=!l?.availableForSale||l?.price?.amount===X,j=t?.isShowTag,k=t?.isShowOriginalPrice,[S,A]=(0,m.useState)([]),[L,w]=(0,m.useState)(!1),h=l?.coupons?.[0],{price:U,basePrice:H,discount:p}=(0,O.formatVariantPrice)({locale:a,amount:k&&h?h.variant_price4wscode:l.price,baseAmount:k&&h?l.price:0,currencyCode:e?.price?.currencyCode||"USD"}),R=()=>{const o=e?.sku,i=e?.variants;return i?.find(v=>v?.sku===o)?.image?.url||i?.[0]?.image?.url||""},u=e?.custom_name||e?.title||e?.name,_=e?.custom_description||e?.description;return(0,m.useEffect)(()=>{let o=[];if(p){const n=`${p}${t?.metafields?.discounts?.off||""}`;o.push(n)}const i=e?.tags?.filter?.(n=>n?.startsWith?.("CLtag"))?.map?.(n=>n?.replace?.("CLtag:",""))?.slice?.(0,p?1:2);A(o.concat(i))},[p,t?.metafields?.discounts,e?.tags]),(0,m.useEffect)(()=>{const{infos:o}=l?.metafields||{},{productInfos:i,preRender:n}=e?.metafields||{},{shopCommon:v}=t?.metafields||{};P(o?.comingSoon||i?.comingSoon||n?.soldOut||v?.soldOut||"")},[e,l]),(0,s.jsx)("div",{className:(0,d.cn)(r==="rounded"?"rounded-2xl":"rounded-none","lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] tablet:aspect-h-[400] tablet:aspect-w-[296]","relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300","md-tablet:h-[400px] collection-shelves-item",{"aiui-dark":e?.custom_theme==="dark"}),children:(0,s.jsxs)("div",{className:"absolute inset-0 box-border flex flex-col justify-between overflow-hidden",children:[(0,s.jsx)("div",{onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),className:(0,d.cn)("desktop:p-6 relative inline-block w-full lg-desktop:h-[280px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer"),children:(0,s.jsxs)("a",{"aria-label":u,target:t?.target,href:(0,F.trackUrlRef)(`${a==="us"||!a?"":`/${a}`}/products/${e?.handle}`,`${K}_${Q}`),onClick:()=>{(0,C.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||l?.sku,item_name:e?.name,item_variant:l?.name,price:l?.price,index:t?.index+1}]}})},children:[(0,s.jsx)(b.default,{alt:"",source:R(),className:"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto"}),(0,s.jsx)(b.default,{alt:"",source:e?.custom_image,className:(0,d.cn)(L?"opacity-100":"opacity-0","absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300")})]})}),(0,s.jsxs)("div",{className:"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content",children:[j&&S?.length?(0,s.jsx)("div",{className:"mb-1 box-border flex flex-wrap gap-1 overflow-hidden",children:S?.map?.((o,i)=>(0,s.jsx)(T.default,{children:o},i))}):null,u?(0,s.jsx)(D.Heading,{as:"h3",title:u||"",html:u||"",className:"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold"}):null,_?(0,s.jsx)(B.Text,{size:2,html:_||"",className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary"}):null,(0,s.jsx)("div",{className:"mb-2 mt-4 flex items-center",children:g?(0,s.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-semibold",children:c||""}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-semibold",children:l?.availableForSale&&U||""}),(0,s.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through",children:l?.availableForSale&&H||""})]})}),(0,s.jsxs)("div",{className:(0,d.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,s.jsx)(y.default,{variant:"secondary",onClick:()=>E(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,s.jsx)(y.default,{variant:"primary",disabled:g,onClick:()=>I(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};
1
+ "use strict";var z=Object.create;var f=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var G=(e,t)=>{for(var r in t)f(e,r,{get:t[r],enumerable:!0})},N=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of W(t))!q.call(e,c)&&c!==r&&f(e,c,{get:()=>t[c],enumerable:!(a=M(t,c))||a.enumerable});return e};var x=(e,t,r)=>(r=e!=null?z(V(e)):{},N(t||!e||!e.__esModule?f(r,"default",{value:e,enumerable:!0}):r,e)),J=e=>N(f({},"__esModule",{value:!0}),e);var Z={};G(Z,{CollectionShelvesWrapItem:()=>Y});module.exports=J(Z);var s=require("react/jsx-runtime"),p=require("../../helpers/utils.js"),T=x(require("../../components/badge.js")),B=require("../../components/text.js"),y=x(require("../../components/button.js")),C=require("../../shared/track.js"),m=require("react"),b=x(require("../../components/picture.js")),D=require("../../components/heading.js"),$=require("../AiuiProvider/index.js"),F=require("../../shared/trackUrlRef.js"),O=require("../ShelfDisplay/shelfDisplay.js");const K="image",Q="collectio_shelves",X=999999999e-2,Y=({data:e,configuration:t})=>{const{itemShape:r}=t||{},{locale:a="us"}=(0,$.useAiuiContext)(),[c,P]=(0,m.useState)(""),I=(o,i,n)=>t?.event?.primaryButton?.(o,i+1,n),E=(o,i,n)=>t?.event?.secondaryButton?.(o,i+1,n),l=e?.variants?.find(o=>o?.sku===e?.sku)||e?.variants?.[0]||{},g=!l?.availableForSale||l?.price?.amount===X,j=t?.isShowTag,k=t?.isShowOriginalPrice,[w,A]=(0,m.useState)([]),[L,S]=(0,m.useState)(!1),h=l?.coupons?.[0],{price:U,basePrice:H,discount:d}=(0,O.formatVariantPrice)({locale:a,amount:k&&h?h.variant_price4wscode:l.price,baseAmount:k&&h?l.price:0,currencyCode:e?.price?.currencyCode||"USD"}),R=()=>{const o=e?.sku,i=e?.variants;return i?.find(v=>v?.sku===o)?.image?.url||i?.[0]?.image?.url||""},u=e?.custom_name||e?.title||e?.name,_=e?.custom_description||e?.description;return(0,m.useEffect)(()=>{let o=[];if(d){const n=`${d}${t?.metafields?.discounts?.off||""}`;o.push(n)}const i=e?.tags?.filter?.(n=>n?.startsWith?.("CLtag"))?.map?.(n=>n?.replace?.("CLtag:",""))?.slice?.(0,d?1:2);A(o.concat(i))},[d,t?.metafields?.discounts,e?.tags]),(0,m.useEffect)(()=>{const{infos:o}=l?.metafields||{},{productInfos:i,preRender:n}=e?.metafields||{},{shopCommon:v}=t?.metafields||{};P(o?.comingSoon||i?.comingSoon||n?.soldOut||v?.soldOut||"")},[e,l]),(0,s.jsx)("div",{className:(0,p.cn)(r==="rounded"?"rounded-2xl":"rounded-none","lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] laptop:aspect-h-[400] laptop:aspect-w-[288] tablet:aspect-h-[400] tablet:aspect-w-[296]","relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300","md-tablet:h-[400px] collection-shelves-item",{"aiui-dark":e?.custom_theme==="dark"}),children:(0,s.jsxs)("div",{className:"absolute inset-0 box-border flex flex-col justify-between overflow-hidden",children:[(0,s.jsx)("div",{onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:(0,p.cn)("desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[150px] overflow-hidden cursor-pointer"),children:(0,s.jsxs)("a",{"aria-label":u,target:t?.target,href:(0,F.trackUrlRef)(`${a==="us"||!a?"":`/${a}`}/products/${e?.handle}`,`${K}_${Q}`),onClick:()=>{(0,C.gaTrack)({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||l?.sku,item_name:e?.name,item_variant:l?.name,price:l?.price,index:t?.index+1}]}})},children:[(0,s.jsx)(b.default,{alt:"",source:R(),className:"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto"}),(0,s.jsx)(b.default,{alt:"",source:e?.custom_image,className:(0,p.cn)(L?"opacity-100":"opacity-0","absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300")})]})}),(0,s.jsxs)("div",{className:"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content",children:[j&&w?.length?(0,s.jsx)("div",{className:"mb-1 box-border flex flex-wrap gap-1 overflow-hidden",children:w?.map?.((o,i)=>(0,s.jsx)(T.default,{children:o},i))}):null,u?(0,s.jsx)(D.Heading,{as:"h3",title:u||"",html:u||"",className:"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold"}):null,_?(0,s.jsx)(B.Text,{size:2,html:_||"",className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary"}):null,(0,s.jsx)("div",{className:"mb-2 mt-4 flex items-center",children:g?(0,s.jsx)("div",{className:"tablet:text-2xl text-info-primary text-xl font-semibold",children:c||""}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-semibold",children:l?.availableForSale&&U||""}),(0,s.jsx)("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through",children:l?.availableForSale&&H||""})]})}),(0,s.jsxs)("div",{className:(0,p.cn)("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?(0,s.jsx)(y.default,{variant:"secondary",onClick:()=>E(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.secondaryButton||""}):null,t?.primaryButton?(0,s.jsx)(y.default,{variant:"primary",disabled:g,onClick:()=>I(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};
2
2
  //# sourceMappingURL=CollectionShelvesItem.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/CollectionShelves/CollectionShelvesItem.tsx"],
4
- "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport Badge from '../../components/badge.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useState, useEffect } from 'react'\nimport Picture from '../../components/picture.js'\nimport { Heading } from '../../components/heading.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const CollectionShelvesWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape } = configuration || {}\n const { locale = 'us' } = useAiuiContext()\n\n const [soldOutText, setSoldOutText] = useState<string>('')\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n const [showTags, setShowTags] = useState<string[]>([])\n const [showImage, setShowImage] = useState<boolean>(false)\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description\n\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${configuration?.metafields?.discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [discount, configuration?.metafields?.discounts, data?.tags])\n\n useEffect(() => {\n const { infos } = variant?.metafields || {}\n const { productInfos, preRender } = data?.metafields || {}\n const { shopCommon } = configuration?.metafields || {}\n setSoldOutText(infos?.comingSoon || productInfos?.comingSoon || preRender?.soldOut || shopCommon?.soldOut || '')\n }, [data, variant])\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n itemShape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] tablet:aspect-h-[400] tablet:aspect-w-[296]',\n 'relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300',\n 'md-tablet:h-[400px] collection-shelves-item',\n {\n 'aiui-dark': data?.custom_theme === 'dark',\n }\n )}\n >\n <div className=\"absolute inset-0 box-border flex flex-col justify-between overflow-hidden\">\n <div\n onMouseEnter={() => setShowImage(true)}\n onMouseLeave={() => setShowImage(false)}\n className={cn(\n 'desktop:p-6 relative inline-block w-full lg-desktop:h-[280px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n alt=\"\"\n source={handleUrl()}\n className=\"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto\"\n />\n <Picture\n alt=\"\"\n source={data?.custom_image}\n className={cn(\n showImage ? 'opacity-100' : 'opacity-0',\n 'absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300'\n )}\n />\n </a>\n </div>\n <div className=\"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content\">\n {isShowTag && showTags?.length ? (\n <div className=\"mb-1 box-border flex flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n html={displayTitle || ''}\n className=\"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold\"\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n html={displayDescription || ''}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary\"\n />\n ) : null}\n <div className=\"mb-2 mt-4 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-semibold\">{soldOutText || ''}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-semibold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n disabled={isSoldOut}\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,+BAAAE,IAAA,eAAAC,EAAAH,GAoGU,IAAAI,EAAA,6BApGVC,EAAmB,kCACnBC,EAAkB,wCAClBC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AAA,GAAe,mBACd,OAAC,EAAAoC,QAAA,CACC,QAAQ,YACR,QAAS,IAAM5B,EAAkBT,EAAMC,GAAe,MAAOA,CAAa,EAC1E,UAAW,iCAAiCA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAE5J,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,iBACd,OAAC,EAAAoC,QAAA,CACC,QAAQ,UACR,SAAUzB,EACV,QAAS,IAAMN,EAAgBN,EAAMC,GAAe,MAAOA,CAAa,EACxE,UAAW,iCAAiCA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAE5J,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA7HKD,GAAM,IAAMA,GAAM,MA8HzB,CAEJ",
4
+ "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport Badge from '../../components/badge.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useState, useEffect } from 'react'\nimport Picture from '../../components/picture.js'\nimport { Heading } from '../../components/heading.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const CollectionShelvesWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape } = configuration || {}\n const { locale = 'us' } = useAiuiContext()\n\n const [soldOutText, setSoldOutText] = useState<string>('')\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n const [showTags, setShowTags] = useState<string[]>([])\n const [showImage, setShowImage] = useState<boolean>(false)\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description\n\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${configuration?.metafields?.discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [discount, configuration?.metafields?.discounts, data?.tags])\n\n useEffect(() => {\n const { infos } = variant?.metafields || {}\n const { productInfos, preRender } = data?.metafields || {}\n const { shopCommon } = configuration?.metafields || {}\n setSoldOutText(infos?.comingSoon || productInfos?.comingSoon || preRender?.soldOut || shopCommon?.soldOut || '')\n }, [data, variant])\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n itemShape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] laptop:aspect-h-[400] laptop:aspect-w-[288] tablet:aspect-h-[400] tablet:aspect-w-[296]',\n 'relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300',\n 'md-tablet:h-[400px] collection-shelves-item',\n {\n 'aiui-dark': data?.custom_theme === 'dark',\n }\n )}\n >\n <div className=\"absolute inset-0 box-border flex flex-col justify-between overflow-hidden\">\n <div\n onMouseEnter={() => setShowImage(true)}\n onMouseLeave={() => setShowImage(false)}\n className={cn(\n 'desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[150px] overflow-hidden cursor-pointer'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n alt=\"\"\n source={handleUrl()}\n className=\"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto\"\n />\n <Picture\n alt=\"\"\n source={data?.custom_image}\n className={cn(\n showImage ? 'opacity-100' : 'opacity-0',\n 'absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300'\n )}\n />\n </a>\n </div>\n <div className=\"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content\">\n {isShowTag && showTags?.length ? (\n <div className=\"mb-1 box-border flex flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n html={displayTitle || ''}\n className=\"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold\"\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n html={displayDescription || ''}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary\"\n />\n ) : null}\n <div className=\"mb-2 mt-4 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-semibold\">{soldOutText || ''}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-semibold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n disabled={isSoldOut}\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": "0jBAAA,IA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AAS,kBAAmBW,GAAa,GAC5C,GACF,EAEJ,KAEA,QAAC,OACC,aAAW,MACT,0BACA,2CACApB,EAAc,YAAc,WAAa,WAAa,EACxD,EAEC,UAAAA,GAAe,mBACd,OAAC,EAAAoC,QAAA,CACC,QAAQ,YACR,QAAS,IAAM5B,EAAkBT,EAAMC,GAAe,MAAOA,CAAa,EAC1E,UAAW,iCAAiCA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAE5J,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,iBACd,OAAC,EAAAoC,QAAA,CACC,QAAQ,UACR,SAAUzB,EACV,QAAS,IAAMN,EAAgBN,EAAMC,GAAe,MAAOA,CAAa,EACxE,UAAW,iCAAiCA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAE5J,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA7HKD,GAAM,IAAMA,GAAM,MA8HzB,CAEJ",
6
6
  "names": ["CollectionShelvesItem_exports", "__export", "CollectionShelvesWrapItem", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_badge", "import_text", "import_button", "import_track", "import_react", "import_picture", "import_heading", "import_AiuiProvider", "import_trackUrlRef", "import_shelfDisplay", "componentType", "componentName", "SOLD_OUT_PRICE", "data", "configuration", "itemShape", "locale", "soldOutText", "setSoldOutText", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "showTags", "setShowTags", "showImage", "setShowImage", "coupon", "price", "basePrice", "discount", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "handleTags", "discountTag", "newTags", "infos", "productInfos", "preRender", "shopCommon", "Picture", "Badge", "Button"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{Fragment as W,jsx as o,jsxs as r}from"react/jsx-runtime";import{cn as d}from"../../helpers/utils.js";import I from"../../components/badge.js";import{Text as E}from"../../components/text.js";import g from"../../components/button.js";import{gaTrack as j}from"../../shared/track.js";import{useState as f,useEffect as k}from"react";import S from"../../components/picture.js";import{Heading as A}from"../../components/heading.js";import{useAiuiContext as L}from"../AiuiProvider/index.js";import{trackUrlRef as U}from"../../shared/trackUrlRef.js";import{formatVariantPrice as H}from"../ShelfDisplay/shelfDisplay.js";const R="image",z="collectio_shelves",M=999999999e-2,se=({data:e,configuration:t})=>{const{itemShape:w}=t||{},{locale:a="us"}=L(),[_,N]=f(""),T=(s,i,n)=>t?.event?.primaryButton?.(s,i+1,n),B=(s,i,n)=>t?.event?.secondaryButton?.(s,i+1,n),l=e?.variants?.find(s=>s?.sku===e?.sku)||e?.variants?.[0]||{},h=!l?.availableForSale||l?.price?.amount===M,C=t?.isShowTag,v=t?.isShowOriginalPrice,[x,D]=f([]),[$,y]=f(!1),p=l?.coupons?.[0],{price:F,basePrice:O,discount:c}=H({locale:a,amount:v&&p?p.variant_price4wscode:l.price,baseAmount:v&&p?l.price:0,currencyCode:e?.price?.currencyCode||"USD"}),P=()=>{const s=e?.sku,i=e?.variants;return i?.find(u=>u?.sku===s)?.image?.url||i?.[0]?.image?.url||""},m=e?.custom_name||e?.title||e?.name,b=e?.custom_description||e?.description;return k(()=>{let s=[];if(c){const n=`${c}${t?.metafields?.discounts?.off||""}`;s.push(n)}const i=e?.tags?.filter?.(n=>n?.startsWith?.("CLtag"))?.map?.(n=>n?.replace?.("CLtag:",""))?.slice?.(0,c?1:2);D(s.concat(i))},[c,t?.metafields?.discounts,e?.tags]),k(()=>{const{infos:s}=l?.metafields||{},{productInfos:i,preRender:n}=e?.metafields||{},{shopCommon:u}=t?.metafields||{};N(s?.comingSoon||i?.comingSoon||n?.soldOut||u?.soldOut||"")},[e,l]),o("div",{className:d(w==="rounded"?"rounded-2xl":"rounded-none","lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] tablet:aspect-h-[400] tablet:aspect-w-[296]","relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300","md-tablet:h-[400px] collection-shelves-item",{"aiui-dark":e?.custom_theme==="dark"}),children:r("div",{className:"absolute inset-0 box-border flex flex-col justify-between overflow-hidden",children:[o("div",{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:d("desktop:p-6 relative inline-block w-full lg-desktop:h-[280px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer"),children:r("a",{"aria-label":m,target:t?.target,href:U(`${a==="us"||!a?"":`/${a}`}/products/${e?.handle}`,`${R}_${z}`),onClick:()=>{j({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||l?.sku,item_name:e?.name,item_variant:l?.name,price:l?.price,index:t?.index+1}]}})},children:[o(S,{alt:"",source:P(),className:"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto"}),o(S,{alt:"",source:e?.custom_image,className:d($?"opacity-100":"opacity-0","absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300")})]})}),r("div",{className:"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content",children:[C&&x?.length?o("div",{className:"mb-1 box-border flex flex-wrap gap-1 overflow-hidden",children:x?.map?.((s,i)=>o(I,{children:s},i))}):null,m?o(A,{as:"h3",title:m||"",html:m||"",className:"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold"}):null,b?o(E,{size:2,html:b||"",className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary"}):null,o("div",{className:"mb-2 mt-4 flex items-center",children:h?o("div",{className:"tablet:text-2xl text-info-primary text-xl font-semibold",children:_||""}):r(W,{children:[o("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-semibold",children:l?.availableForSale&&F||""}),o("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through",children:l?.availableForSale&&O||""})]})}),r("div",{className:d("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?o(g,{variant:"secondary",onClick:()=>B(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.secondaryButton||""}):null,t?.primaryButton?o(g,{variant:"primary",disabled:h,onClick:()=>T(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{se as CollectionShelvesWrapItem};
1
+ import{Fragment as W,jsx as o,jsxs as r}from"react/jsx-runtime";import{cn as p}from"../../helpers/utils.js";import I from"../../components/badge.js";import{Text as E}from"../../components/text.js";import g from"../../components/button.js";import{gaTrack as j}from"../../shared/track.js";import{useState as f,useEffect as k}from"react";import w from"../../components/picture.js";import{Heading as A}from"../../components/heading.js";import{useAiuiContext as L}from"../AiuiProvider/index.js";import{trackUrlRef as U}from"../../shared/trackUrlRef.js";import{formatVariantPrice as H}from"../ShelfDisplay/shelfDisplay.js";const R="image",z="collectio_shelves",M=999999999e-2,se=({data:e,configuration:t})=>{const{itemShape:S}=t||{},{locale:a="us"}=L(),[_,N]=f(""),T=(s,i,n)=>t?.event?.primaryButton?.(s,i+1,n),B=(s,i,n)=>t?.event?.secondaryButton?.(s,i+1,n),l=e?.variants?.find(s=>s?.sku===e?.sku)||e?.variants?.[0]||{},h=!l?.availableForSale||l?.price?.amount===M,C=t?.isShowTag,v=t?.isShowOriginalPrice,[x,D]=f([]),[$,y]=f(!1),d=l?.coupons?.[0],{price:F,basePrice:O,discount:c}=H({locale:a,amount:v&&d?d.variant_price4wscode:l.price,baseAmount:v&&d?l.price:0,currencyCode:e?.price?.currencyCode||"USD"}),P=()=>{const s=e?.sku,i=e?.variants;return i?.find(u=>u?.sku===s)?.image?.url||i?.[0]?.image?.url||""},m=e?.custom_name||e?.title||e?.name,b=e?.custom_description||e?.description;return k(()=>{let s=[];if(c){const n=`${c}${t?.metafields?.discounts?.off||""}`;s.push(n)}const i=e?.tags?.filter?.(n=>n?.startsWith?.("CLtag"))?.map?.(n=>n?.replace?.("CLtag:",""))?.slice?.(0,c?1:2);D(s.concat(i))},[c,t?.metafields?.discounts,e?.tags]),k(()=>{const{infos:s}=l?.metafields||{},{productInfos:i,preRender:n}=e?.metafields||{},{shopCommon:u}=t?.metafields||{};N(s?.comingSoon||i?.comingSoon||n?.soldOut||u?.soldOut||"")},[e,l]),o("div",{className:p(S==="rounded"?"rounded-2xl":"rounded-none","lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] laptop:aspect-h-[400] laptop:aspect-w-[288] tablet:aspect-h-[400] tablet:aspect-w-[296]","relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300","md-tablet:h-[400px] collection-shelves-item",{"aiui-dark":e?.custom_theme==="dark"}),children:r("div",{className:"absolute inset-0 box-border flex flex-col justify-between overflow-hidden",children:[o("div",{onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:p("desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[150px] overflow-hidden cursor-pointer"),children:r("a",{"aria-label":m,target:t?.target,href:U(`${a==="us"||!a?"":`/${a}`}/products/${e?.handle}`,`${R}_${z}`),onClick:()=>{j({event:"ga4Event",event_name:"select_item",event_parameters:{page_group:"Home Page",item_list_name:"Home_Page_Bundle",items:[{item_id:e?.sku||l?.sku,item_name:e?.name,item_variant:l?.name,price:l?.price,index:t?.index+1}]}})},children:[o(w,{alt:"",source:P(),className:"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto"}),o(w,{alt:"",source:e?.custom_image,className:p($?"opacity-100":"opacity-0","absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300")})]})}),r("div",{className:"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content",children:[C&&x?.length?o("div",{className:"mb-1 box-border flex flex-wrap gap-1 overflow-hidden",children:x?.map?.((s,i)=>o(I,{children:s},i))}):null,m?o(A,{as:"h3",title:m||"",html:m||"",className:"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold"}):null,b?o(E,{size:2,html:b||"",className:"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary"}):null,o("div",{className:"mb-2 mt-4 flex items-center",children:h?o("div",{className:"tablet:text-2xl text-info-primary text-xl font-semibold",children:_||""}):r(W,{children:[o("div",{className:"final-price tablet:text-2xl text-info-primary text-xl font-semibold",children:l?.availableForSale&&F||""}),o("div",{className:"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through",children:l?.availableForSale&&O||""})]})}),r("div",{className:p("shelf-flex-button-group","lg-desktop:gap-3 flex items-center gap-2",t.direction==="vertical"?"flex-col":""),children:[t?.secondaryButton?o(g,{variant:"secondary",onClick:()=>B(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.secondaryButton||""}):null,t?.primaryButton?o(g,{variant:"primary",disabled:h,onClick:()=>T(e,t?.index,t),className:`overflow-hidden font-semibold ${t.direction==="vertical"?"w-full":""} ${t?.shape==="rounded"?"rounded-2xl":""}`,children:t?.primaryButton||""}):null]})]})]})},e?.id||e?.handle)};export{se as CollectionShelvesWrapItem};
2
2
  //# sourceMappingURL=CollectionShelvesItem.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/CollectionShelves/CollectionShelvesItem.tsx"],
4
- "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport Badge from '../../components/badge.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useState, useEffect } from 'react'\nimport Picture from '../../components/picture.js'\nimport { Heading } from '../../components/heading.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const CollectionShelvesWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape } = configuration || {}\n const { locale = 'us' } = useAiuiContext()\n\n const [soldOutText, setSoldOutText] = useState<string>('')\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n const [showTags, setShowTags] = useState<string[]>([])\n const [showImage, setShowImage] = useState<boolean>(false)\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description\n\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${configuration?.metafields?.discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [discount, configuration?.metafields?.discounts, data?.tags])\n\n useEffect(() => {\n const { infos } = variant?.metafields || {}\n const { productInfos, preRender } = data?.metafields || {}\n const { shopCommon } = configuration?.metafields || {}\n setSoldOutText(infos?.comingSoon || productInfos?.comingSoon || preRender?.soldOut || shopCommon?.soldOut || '')\n }, [data, variant])\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n itemShape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] tablet:aspect-h-[400] tablet:aspect-w-[296]',\n 'relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300',\n 'md-tablet:h-[400px] collection-shelves-item',\n {\n 'aiui-dark': data?.custom_theme === 'dark',\n }\n )}\n >\n <div className=\"absolute inset-0 box-border flex flex-col justify-between overflow-hidden\">\n <div\n onMouseEnter={() => setShowImage(true)}\n onMouseLeave={() => setShowImage(false)}\n className={cn(\n 'desktop:p-6 relative inline-block w-full lg-desktop:h-[280px] desktop:h-[234px] h-[182px] overflow-hidden cursor-pointer'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n alt=\"\"\n source={handleUrl()}\n className=\"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto\"\n />\n <Picture\n alt=\"\"\n source={data?.custom_image}\n className={cn(\n showImage ? 'opacity-100' : 'opacity-0',\n 'absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300'\n )}\n />\n </a>\n </div>\n <div className=\"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content\">\n {isShowTag && showTags?.length ? (\n <div className=\"mb-1 box-border flex flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n html={displayTitle || ''}\n className=\"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold\"\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n html={displayDescription || ''}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary\"\n />\n ) : null}\n <div className=\"mb-2 mt-4 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-semibold\">{soldOutText || ''}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-semibold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n disabled={isSoldOut}\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
- "mappings": "AAoGU,OAmEI,YAAAA,EAxCF,OAAAC,EA3BF,QAAAC,MAAA,oBApGV,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAW,4BAClB,OAAS,QAAAC,MAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,wBACxB,OAAS,YAAAC,EAAU,aAAAC,MAAiB,QACpC,OAAOC,MAAa,8BACpB,OAAS,WAAAC,MAAe,8BACxB,OAAS,kBAAAC,MAAsB,2BAC/B,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,sBAAAC,MAA0B,kCAGnC,MAAMC,EAAgB,QAChBC,EAAgB,oBAEhBC,EAAiB,aAEVC,GAA4B,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAA0C,CACxG,KAAM,CAAE,UAAAC,CAAU,EAAID,GAAiB,CAAC,EAClC,CAAE,OAAAE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GACrC,EACE,KACHA,GAAe,cACdnB,EAACK,EAAA,CACC,QAAQ,UACR,SAAUyB,EACV,QAAS,IAAMN,EAAgBN,EAAMC,GAAe,MAAOA,CAAa,EACxE,UAAW,iCAAiCA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAE5J,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA7HKD,GAAM,IAAMA,GAAM,MA8HzB,CAEJ",
4
+ "sourcesContent": ["import { cn } from '../../helpers/utils.js'\nimport Badge from '../../components/badge.js'\nimport { Text } from '../../components/text.js'\nimport Button from '../../components/button.js'\nimport { gaTrack } from '../../shared/track.js'\nimport { useState, useEffect } from 'react'\nimport Picture from '../../components/picture.js'\nimport { Heading } from '../../components/heading.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { formatVariantPrice } from '../ShelfDisplay/shelfDisplay.js'\nimport type { ShelfDisplayItem, ShelfDisplayType } from '../ShelfDisplay/shelfDisplay.js'\n\nconst componentType = 'image'\nconst componentName = 'collectio_shelves'\n\nconst SOLD_OUT_PRICE = 9999999.99\n\nexport const CollectionShelvesWrapItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const { itemShape } = configuration || {}\n const { locale = 'us' } = useAiuiContext()\n\n const [soldOutText, setSoldOutText] = useState<string>('')\n\n const onPrimaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.primaryButton?.(params, index + 1, data)\n\n const onSecondaryButton = (params: ShelfDisplayItem, index: number, data: ShelfDisplayType) =>\n configuration?.event?.secondaryButton?.(params, index + 1, data)\n\n const variant = data?.variants?.find((item: any) => item?.sku === data?.sku) || data?.variants?.[0] || {}\n\n const isSoldOut = !variant?.availableForSale || variant?.price?.amount === SOLD_OUT_PRICE\n const isShowTag = configuration?.isShowTag\n const isShowOriginalPrice = configuration?.isShowOriginalPrice\n\n const [showTags, setShowTags] = useState<string[]>([])\n const [showImage, setShowImage] = useState<boolean>(false)\n\n // active \u7684 \u901A\u7528\u6298\u6263\n const coupon = variant?.coupons?.[0]\n\n const { price, basePrice, discount } = formatVariantPrice({\n locale: locale,\n amount: isShowOriginalPrice && coupon ? coupon.variant_price4wscode : variant.price,\n baseAmount: isShowOriginalPrice && coupon ? variant.price : 0,\n currencyCode: data?.price?.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n const displayTitle = data?.custom_name || data?.title || data?.name\n const displayDescription = data?.custom_description || data?.description\n\n useEffect(() => {\n let handleTags: string[] = []\n if (discount) {\n const discountTag = `${discount}${configuration?.metafields?.discounts?.off || ''}`\n handleTags.push(discountTag)\n }\n const newTags = data?.tags\n ?.filter?.((item: string) => item?.startsWith?.('CLtag'))\n ?.map?.((item: string) => item?.replace?.('CLtag:', ''))\n ?.slice?.(0, discount ? 1 : 2)\n setShowTags(handleTags.concat(newTags))\n }, [discount, configuration?.metafields?.discounts, data?.tags])\n\n useEffect(() => {\n const { infos } = variant?.metafields || {}\n const { productInfos, preRender } = data?.metafields || {}\n const { shopCommon } = configuration?.metafields || {}\n setSoldOutText(infos?.comingSoon || productInfos?.comingSoon || preRender?.soldOut || shopCommon?.soldOut || '')\n }, [data, variant])\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n itemShape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-h-[560] lg-desktop:aspect-w-[544] desktop:aspect-h-[448] desktop:aspect-w-[427] laptop:aspect-h-[400] laptop:aspect-w-[288] tablet:aspect-h-[400] tablet:aspect-w-[296]',\n 'relative bg-[#EAEAEC] tablet:hover:bg-[#FFFFFF] box-border w-full cursor-pointer overflow-hidden duration-300',\n 'md-tablet:h-[400px] collection-shelves-item',\n {\n 'aiui-dark': data?.custom_theme === 'dark',\n }\n )}\n >\n <div className=\"absolute inset-0 box-border flex flex-col justify-between overflow-hidden\">\n <div\n onMouseEnter={() => setShowImage(true)}\n onMouseLeave={() => setShowImage(false)}\n className={cn(\n 'desktop:p-6 p-4 relative inline-block w-full lg-desktop:h-[288px] desktop:h-[234px] h-[150px] overflow-hidden cursor-pointer'\n )}\n >\n <a\n aria-label={displayTitle}\n target={configuration?.target}\n href={trackUrlRef(\n `${locale === 'us' || !locale ? '' : `/${locale}`}/products/${data?.handle}`,\n `${componentType}_${componentName}`\n )}\n onClick={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'select_item',\n event_parameters: {\n page_group: 'Home Page',\n item_list_name: 'Home_Page_Bundle',\n items: [\n {\n item_id: data?.sku || variant?.sku,\n item_name: data?.name,\n item_variant: variant?.name,\n price: variant?.price,\n index: configuration?.index + 1,\n },\n ],\n },\n })\n }}\n >\n <Picture\n alt=\"\"\n source={handleUrl()}\n className=\"desktop:mt-6 mt-4 flex h-full justify-center object-cover [&_img]:h-full [&_img]:w-auto\"\n />\n <Picture\n alt=\"\"\n source={data?.custom_image}\n className={cn(\n showImage ? 'opacity-100' : 'opacity-0',\n 'absolute inset-x-0 top-0 h-full object-cover [&_img]:size-full transition-all duration-300'\n )}\n />\n </a>\n </div>\n <div className=\"overflow-hidden flex flex-col justify-end desktop:p-6 p-4 flex-1 collection-shelves-product-content\">\n {isShowTag && showTags?.length ? (\n <div className=\"mb-1 box-border flex flex-wrap gap-1 overflow-hidden\">\n {showTags?.map?.((item: any, index: number) => <Badge key={index}>{item}</Badge>)}\n </div>\n ) : null}\n {displayTitle ? (\n <Heading\n as=\"h3\"\n title={displayTitle || ''}\n html={displayTitle || ''}\n className=\"lg-desktop:text-2xl text-xl collection-shelves-product-title mb-1 line-clamp-2 text-info-primary font-semibold\"\n />\n ) : null}\n {displayDescription ? (\n <Text\n size={2}\n html={displayDescription || ''}\n className=\"lg-desktop:text-lg lg-desktop:h-[26px] desktop:text-base desktop:h-6 collection-shelves-product-description line-clamp-1 h-5 text-sm font-semibold text-info-primary\"\n />\n ) : null}\n <div className=\"mb-2 mt-4 flex items-center\">\n {isSoldOut ? (\n <div className=\"tablet:text-2xl text-info-primary text-xl font-semibold\">{soldOutText || ''}</div>\n ) : (\n <>\n <div className=\"final-price tablet:text-2xl text-info-primary text-xl font-semibold\">\n {variant?.availableForSale ? price || '' : ''}\n </div>\n <div className=\"origin-price tablet:text-xl text-info-secondary ml-1 text-lg font-semibold line-through\">\n {variant?.availableForSale ? basePrice || '' : ''}\n </div>\n </>\n )}\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div\n className={cn(\n 'shelf-flex-button-group',\n 'lg-desktop:gap-3 flex items-center gap-2',\n configuration.direction === 'vertical' ? 'flex-col' : ''\n )}\n >\n {configuration?.secondaryButton ? (\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n ) : null}\n {configuration?.primaryButton ? (\n <Button\n variant=\"primary\"\n disabled={isSoldOut}\n onClick={() => onPrimaryButton(data, configuration?.index, configuration)}\n className={`overflow-hidden font-semibold ${configuration.direction === 'vertical' ? 'w-full' : ''} ${configuration?.shape === 'rounded' ? 'rounded-2xl' : ''}`}\n >\n {configuration?.primaryButton || ''}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n </div>\n )\n}\n"],
5
+ "mappings": "AAoGU,OAmEI,YAAAA,EAxCF,OAAAC,EA3BF,QAAAC,MAAA,oBApGV,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAW,4BAClB,OAAS,QAAAC,MAAY,2BACrB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,wBACxB,OAAS,YAAAC,EAAU,aAAAC,MAAiB,QACpC,OAAOC,MAAa,8BACp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AAC,OACC,UAAWC,EACT,0BACA,2CACAiB,EAAc,YAAc,WAAa,WAAa,EACxD,EAEC,UAAAA,GAAe,gBACdnB,EAACK,EAAA,CACC,QAAQ,YACR,QAAS,IAAMsB,EAAkBT,EAAMC,GAAe,MAAOA,CAAa,EAC1E,UAAW,iCAAiCA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAE5J,SAAAA,GAAe,iBAAmB,GACrC,EACE,KACHA,GAAe,cACdnB,EAACK,EAAA,CACC,QAAQ,UACR,SAAUyB,EACV,QAAS,IAAMN,EAAgBN,EAAMC,GAAe,MAAOA,CAAa,EACxE,UAAW,iCAAiCA,EAAc,YAAc,WAAa,SAAW,EAAE,IAAIA,GAAe,QAAU,UAAY,cAAgB,EAAE,GAE5J,SAAAA,GAAe,eAAiB,GACnC,EACE,MACN,GACF,GACF,GA7HKD,GAAM,IAAMA,GAAM,MA8HzB,CAEJ",
6
6
  "names": ["Fragment", "jsx", "jsxs", "cn", "Badge", "Text", "Button", "gaTrack", "useState", "useEffect", "Picture", "Heading", "useAiuiContext", "trackUrlRef", "formatVariantPrice", "componentType", "componentName", "SOLD_OUT_PRICE", "CollectionShelvesWrapItem", "data", "configuration", "itemShape", "locale", "soldOutText", "setSoldOutText", "onPrimaryButton", "params", "index", "onSecondaryButton", "variant", "item", "isSoldOut", "isShowTag", "isShowOriginalPrice", "showTags", "setShowTags", "showImage", "setShowImage", "coupon", "price", "basePrice", "discount", "handleUrl", "sku", "skuArray", "displayTitle", "displayDescription", "handleTags", "discountTag", "newTags", "infos", "productInfos", "preRender", "shopCommon"]
7
7
  }
@@ -0,0 +1,373 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { Tabs } from '../components/index.js';
3
+ import React, { type ComponentType } from 'react';
4
+ declare const meta: {
5
+ title: string;
6
+ component: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
7
+ align?: import("../types/props.js").Align;
8
+ shape?: import("../types/props.js").Shape;
9
+ } & React.RefAttributes<HTMLDivElement>>;
10
+ subcomponents: {
11
+ TabsList: ComponentType<unknown>;
12
+ TabsTrigger: ComponentType<unknown>;
13
+ TabsContent: ComponentType<unknown>;
14
+ };
15
+ decorators: ((Story: import("@storybook/core/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
16
+ content?: string | undefined | undefined;
17
+ translate?: "yes" | "no" | undefined | undefined;
18
+ prefix?: string | undefined | undefined;
19
+ className?: string | undefined | undefined;
20
+ asChild?: boolean | undefined;
21
+ value?: string | undefined;
22
+ defaultChecked?: boolean | undefined | undefined;
23
+ defaultValue?: string | undefined;
24
+ suppressContentEditableWarning?: boolean | undefined | undefined;
25
+ suppressHydrationWarning?: boolean | undefined | undefined;
26
+ accessKey?: string | undefined | undefined;
27
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
28
+ autoFocus?: boolean | undefined | undefined;
29
+ contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
30
+ contextMenu?: string | undefined | undefined;
31
+ dir?: ("ltr" | "rtl") | undefined;
32
+ draggable?: (boolean | "true" | "false") | undefined;
33
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
34
+ hidden?: boolean | undefined | undefined;
35
+ id?: string | undefined | undefined;
36
+ lang?: string | undefined | undefined;
37
+ nonce?: string | undefined | undefined;
38
+ slot?: string | undefined | undefined;
39
+ spellCheck?: (boolean | "true" | "false") | undefined;
40
+ style?: React.CSSProperties | undefined;
41
+ tabIndex?: number | undefined | undefined;
42
+ title?: string | undefined | undefined;
43
+ radioGroup?: string | undefined | undefined;
44
+ role?: React.AriaRole | undefined;
45
+ about?: string | undefined | undefined;
46
+ datatype?: string | undefined | undefined;
47
+ inlist?: any;
48
+ property?: string | undefined | undefined;
49
+ rel?: string | undefined | undefined;
50
+ resource?: string | undefined | undefined;
51
+ rev?: string | undefined | undefined;
52
+ typeof?: string | undefined | undefined;
53
+ vocab?: string | undefined | undefined;
54
+ autoCorrect?: string | undefined | undefined;
55
+ autoSave?: string | undefined | undefined;
56
+ color?: string | undefined | undefined;
57
+ itemProp?: string | undefined | undefined;
58
+ itemScope?: boolean | undefined | undefined;
59
+ itemType?: string | undefined | undefined;
60
+ itemID?: string | undefined | undefined;
61
+ itemRef?: string | undefined | undefined;
62
+ results?: number | undefined | undefined;
63
+ security?: string | undefined | undefined;
64
+ unselectable?: "on" | "off" | undefined | undefined;
65
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
66
+ is?: string | undefined | undefined;
67
+ exportparts?: string | undefined | undefined;
68
+ part?: string | undefined | undefined;
69
+ popover?: "" | "auto" | "manual" | undefined | undefined;
70
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
71
+ popoverTarget?: string | undefined | undefined;
72
+ onToggle?: React.ToggleEventHandler<HTMLDivElement> | undefined;
73
+ onBeforeToggle?: React.ToggleEventHandler<HTMLDivElement> | undefined;
74
+ inert?: boolean | undefined | undefined;
75
+ tw?: string | undefined;
76
+ "aria-activedescendant"?: string | undefined | undefined;
77
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
78
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
79
+ "aria-braillelabel"?: string | undefined | undefined;
80
+ "aria-brailleroledescription"?: string | undefined | undefined;
81
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
82
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
83
+ "aria-colcount"?: number | undefined | undefined;
84
+ "aria-colindex"?: number | undefined | undefined;
85
+ "aria-colindextext"?: string | undefined | undefined;
86
+ "aria-colspan"?: number | undefined | undefined;
87
+ "aria-controls"?: string | undefined | undefined;
88
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
89
+ "aria-describedby"?: string | undefined | undefined;
90
+ "aria-description"?: string | undefined | undefined;
91
+ "aria-details"?: string | undefined | undefined;
92
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
93
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
94
+ "aria-errormessage"?: string | undefined | undefined;
95
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
96
+ "aria-flowto"?: string | undefined | undefined;
97
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
98
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
99
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
100
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
101
+ "aria-keyshortcuts"?: string | undefined | undefined;
102
+ "aria-label"?: string | undefined | undefined;
103
+ "aria-labelledby"?: string | undefined | undefined;
104
+ "aria-level"?: number | undefined | undefined;
105
+ "aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
106
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
107
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
108
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
109
+ "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
110
+ "aria-owns"?: string | undefined | undefined;
111
+ "aria-placeholder"?: string | undefined | undefined;
112
+ "aria-posinset"?: number | undefined | undefined;
113
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
114
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
115
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
116
+ "aria-required"?: (boolean | "true" | "false") | undefined;
117
+ "aria-roledescription"?: string | undefined | undefined;
118
+ "aria-rowcount"?: number | undefined | undefined;
119
+ "aria-rowindex"?: number | undefined | undefined;
120
+ "aria-rowindextext"?: string | undefined | undefined;
121
+ "aria-rowspan"?: number | undefined | undefined;
122
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
123
+ "aria-setsize"?: number | undefined | undefined;
124
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
125
+ "aria-valuemax"?: number | undefined | undefined;
126
+ "aria-valuemin"?: number | undefined | undefined;
127
+ "aria-valuenow"?: number | undefined | undefined;
128
+ "aria-valuetext"?: string | undefined | undefined;
129
+ children?: React.ReactNode;
130
+ dangerouslySetInnerHTML?: {
131
+ __html: string | TrustedHTML;
132
+ } | undefined;
133
+ onCopy?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
134
+ onCopyCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
135
+ onCut?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
136
+ onCutCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
137
+ onPaste?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
138
+ onPasteCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
139
+ onCompositionEnd?: React.CompositionEventHandler<HTMLDivElement> | undefined;
140
+ onCompositionEndCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
141
+ onCompositionStart?: React.CompositionEventHandler<HTMLDivElement> | undefined;
142
+ onCompositionStartCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
143
+ onCompositionUpdate?: React.CompositionEventHandler<HTMLDivElement> | undefined;
144
+ onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
145
+ onFocus?: React.FocusEventHandler<HTMLDivElement> | undefined;
146
+ onFocusCapture?: React.FocusEventHandler<HTMLDivElement> | undefined;
147
+ onBlur?: React.FocusEventHandler<HTMLDivElement> | undefined;
148
+ onBlurCapture?: React.FocusEventHandler<HTMLDivElement> | undefined;
149
+ onChange?: React.FormEventHandler<HTMLDivElement> | undefined;
150
+ onChangeCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
151
+ onBeforeInput?: React.FormEventHandler<HTMLDivElement> | undefined;
152
+ onBeforeInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
153
+ onInput?: React.FormEventHandler<HTMLDivElement> | undefined;
154
+ onInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
155
+ onReset?: React.FormEventHandler<HTMLDivElement> | undefined;
156
+ onResetCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
157
+ onSubmit?: React.FormEventHandler<HTMLDivElement> | undefined;
158
+ onSubmitCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
159
+ onInvalid?: React.FormEventHandler<HTMLDivElement> | undefined;
160
+ onInvalidCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
161
+ onLoad?: React.ReactEventHandler<HTMLDivElement> | undefined;
162
+ onLoadCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
163
+ onError?: React.ReactEventHandler<HTMLDivElement> | undefined;
164
+ onErrorCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
165
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
166
+ onKeyDownCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
167
+ onKeyPress?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
168
+ onKeyPressCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
169
+ onKeyUp?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
170
+ onKeyUpCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
171
+ onAbort?: React.ReactEventHandler<HTMLDivElement> | undefined;
172
+ onAbortCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
173
+ onCanPlay?: React.ReactEventHandler<HTMLDivElement> | undefined;
174
+ onCanPlayCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
175
+ onCanPlayThrough?: React.ReactEventHandler<HTMLDivElement> | undefined;
176
+ onCanPlayThroughCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
177
+ onDurationChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
178
+ onDurationChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
179
+ onEmptied?: React.ReactEventHandler<HTMLDivElement> | undefined;
180
+ onEmptiedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
181
+ onEncrypted?: React.ReactEventHandler<HTMLDivElement> | undefined;
182
+ onEncryptedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
183
+ onEnded?: React.ReactEventHandler<HTMLDivElement> | undefined;
184
+ onEndedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
185
+ onLoadedData?: React.ReactEventHandler<HTMLDivElement> | undefined;
186
+ onLoadedDataCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
187
+ onLoadedMetadata?: React.ReactEventHandler<HTMLDivElement> | undefined;
188
+ onLoadedMetadataCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
189
+ onLoadStart?: React.ReactEventHandler<HTMLDivElement> | undefined;
190
+ onLoadStartCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
191
+ onPause?: React.ReactEventHandler<HTMLDivElement> | undefined;
192
+ onPauseCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
193
+ onPlay?: React.ReactEventHandler<HTMLDivElement> | undefined;
194
+ onPlayCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
195
+ onPlaying?: React.ReactEventHandler<HTMLDivElement> | undefined;
196
+ onPlayingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
197
+ onProgress?: React.ReactEventHandler<HTMLDivElement> | undefined;
198
+ onProgressCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
199
+ onRateChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
200
+ onRateChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
201
+ onSeeked?: React.ReactEventHandler<HTMLDivElement> | undefined;
202
+ onSeekedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
203
+ onSeeking?: React.ReactEventHandler<HTMLDivElement> | undefined;
204
+ onSeekingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
205
+ onStalled?: React.ReactEventHandler<HTMLDivElement> | undefined;
206
+ onStalledCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
207
+ onSuspend?: React.ReactEventHandler<HTMLDivElement> | undefined;
208
+ onSuspendCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
209
+ onTimeUpdate?: React.ReactEventHandler<HTMLDivElement> | undefined;
210
+ onTimeUpdateCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
211
+ onVolumeChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
212
+ onVolumeChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
213
+ onWaiting?: React.ReactEventHandler<HTMLDivElement> | undefined;
214
+ onWaitingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
215
+ onAuxClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
216
+ onAuxClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
217
+ onClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
218
+ onClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
219
+ onContextMenu?: React.MouseEventHandler<HTMLDivElement> | undefined;
220
+ onContextMenuCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
221
+ onDoubleClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
222
+ onDoubleClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
223
+ onDrag?: React.DragEventHandler<HTMLDivElement> | undefined;
224
+ onDragCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
225
+ onDragEnd?: React.DragEventHandler<HTMLDivElement> | undefined;
226
+ onDragEndCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
227
+ onDragEnter?: React.DragEventHandler<HTMLDivElement> | undefined;
228
+ onDragEnterCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
229
+ onDragExit?: React.DragEventHandler<HTMLDivElement> | undefined;
230
+ onDragExitCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
231
+ onDragLeave?: React.DragEventHandler<HTMLDivElement> | undefined;
232
+ onDragLeaveCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
233
+ onDragOver?: React.DragEventHandler<HTMLDivElement> | undefined;
234
+ onDragOverCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
235
+ onDragStart?: React.DragEventHandler<HTMLDivElement> | undefined;
236
+ onDragStartCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
237
+ onDrop?: React.DragEventHandler<HTMLDivElement> | undefined;
238
+ onDropCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
239
+ onMouseDown?: React.MouseEventHandler<HTMLDivElement> | undefined;
240
+ onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
241
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
242
+ onMouseLeave?: React.MouseEventHandler<HTMLDivElement> | undefined;
243
+ onMouseMove?: React.MouseEventHandler<HTMLDivElement> | undefined;
244
+ onMouseMoveCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
245
+ onMouseOut?: React.MouseEventHandler<HTMLDivElement> | undefined;
246
+ onMouseOutCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
247
+ onMouseOver?: React.MouseEventHandler<HTMLDivElement> | undefined;
248
+ onMouseOverCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
249
+ onMouseUp?: React.MouseEventHandler<HTMLDivElement> | undefined;
250
+ onMouseUpCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
251
+ onSelect?: React.ReactEventHandler<HTMLDivElement> | undefined;
252
+ onSelectCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
253
+ onTouchCancel?: React.TouchEventHandler<HTMLDivElement> | undefined;
254
+ onTouchCancelCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
255
+ onTouchEnd?: React.TouchEventHandler<HTMLDivElement> | undefined;
256
+ onTouchEndCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
257
+ onTouchMove?: React.TouchEventHandler<HTMLDivElement> | undefined;
258
+ onTouchMoveCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
259
+ onTouchStart?: React.TouchEventHandler<HTMLDivElement> | undefined;
260
+ onTouchStartCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
261
+ onPointerDown?: React.PointerEventHandler<HTMLDivElement> | undefined;
262
+ onPointerDownCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
263
+ onPointerMove?: React.PointerEventHandler<HTMLDivElement> | undefined;
264
+ onPointerMoveCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
265
+ onPointerUp?: React.PointerEventHandler<HTMLDivElement> | undefined;
266
+ onPointerUpCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
267
+ onPointerCancel?: React.PointerEventHandler<HTMLDivElement> | undefined;
268
+ onPointerCancelCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
269
+ onPointerEnter?: React.PointerEventHandler<HTMLDivElement> | undefined;
270
+ onPointerLeave?: React.PointerEventHandler<HTMLDivElement> | undefined;
271
+ onPointerOver?: React.PointerEventHandler<HTMLDivElement> | undefined;
272
+ onPointerOverCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
273
+ onPointerOut?: React.PointerEventHandler<HTMLDivElement> | undefined;
274
+ onPointerOutCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
275
+ onGotPointerCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
276
+ onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
277
+ onLostPointerCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
278
+ onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
279
+ onScroll?: React.UIEventHandler<HTMLDivElement> | undefined;
280
+ onScrollCapture?: React.UIEventHandler<HTMLDivElement> | undefined;
281
+ onWheel?: React.WheelEventHandler<HTMLDivElement> | undefined;
282
+ onWheelCapture?: React.WheelEventHandler<HTMLDivElement> | undefined;
283
+ onAnimationStart?: React.AnimationEventHandler<HTMLDivElement> | undefined;
284
+ onAnimationStartCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
285
+ onAnimationEnd?: React.AnimationEventHandler<HTMLDivElement> | undefined;
286
+ onAnimationEndCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
287
+ onAnimationIteration?: React.AnimationEventHandler<HTMLDivElement> | undefined;
288
+ onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
289
+ onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
290
+ onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
291
+ onTransitionCancel?: React.TransitionEventHandler<HTMLDivElement> | undefined;
292
+ onTransitionCancelCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
293
+ onTransitionRun?: React.TransitionEventHandler<HTMLDivElement> | undefined;
294
+ onTransitionRunCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
295
+ onTransitionStart?: React.TransitionEventHandler<HTMLDivElement> | undefined;
296
+ onTransitionStartCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
297
+ key?: React.Key | null | undefined;
298
+ orientation?: "horizontal" | "vertical" | undefined;
299
+ onValueChange?: ((value: string) => void) | undefined;
300
+ activationMode?: "automatic" | "manual" | undefined;
301
+ align?: import("../types/props.js").Align | undefined;
302
+ shape?: import("../types/props.js").Shape | undefined;
303
+ ref?: React.LegacyRef<HTMLDivElement> | undefined;
304
+ }>) => import("react/jsx-runtime").JSX.Element)[];
305
+ parameters: {
306
+ layout: string;
307
+ docs: {
308
+ description: {
309
+ component: string;
310
+ };
311
+ };
312
+ };
313
+ tags: string[];
314
+ args: {
315
+ defaultValue: string;
316
+ align: "left";
317
+ };
318
+ argTypes: {
319
+ defaultValue: {
320
+ description: string;
321
+ control: "text";
322
+ table: {
323
+ summary: string;
324
+ readonly: boolean;
325
+ };
326
+ };
327
+ value: {
328
+ description: string;
329
+ control: {
330
+ type: "radio";
331
+ };
332
+ options: string[];
333
+ };
334
+ align: {
335
+ description: string;
336
+ };
337
+ onValueChange: {
338
+ description: string;
339
+ action: string;
340
+ type: "function";
341
+ };
342
+ orientation: {
343
+ control: {
344
+ type: "inline-radio";
345
+ };
346
+ options: string[];
347
+ description: string;
348
+ table: {
349
+ defaultValue: {
350
+ summary: string;
351
+ };
352
+ };
353
+ };
354
+ dir: {
355
+ control: {
356
+ type: "inline-radio";
357
+ };
358
+ options: string[];
359
+ description: string;
360
+ table: {
361
+ defaultValue: {
362
+ summary: string;
363
+ };
364
+ };
365
+ };
366
+ };
367
+ };
368
+ export default meta;
369
+ type Story = StoryObj<typeof Tabs>;
370
+ export declare const Default: Story;
371
+ export declare const AlignCenter: Story;
372
+ export declare const AlignRight: Story;
373
+ export declare const Disabled: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "1.0.19-temp-101016",
3
+ "version": "1.0.19-temp-101018",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",