@anker-in/headless-ui 1.3.45 → 1.3.47

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";"use client";var dt=Object.create;var w=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var mt=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty;var ft=(t,n)=>{for(var e in n)w(t,e,{get:n[e],enumerable:!0})},N=(t,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of ut(n))!pt.call(t,r)&&r!==e&&w(t,r,{get:()=>n[r],enumerable:!(s=ct(n,r))||s.enumerable});return t};var ht=(t,n,e)=>(e=t!=null?dt(mt(t)):{},N(n||!t||!t.__esModule?w(e,"default",{value:t,enumerable:!0}):e,t)),gt=t=>N(w({},"__esModule",{value:!0}),t);var yt={};ft(yt,{default:()=>vt});module.exports=gt(yt);var i=require("react/jsx-runtime"),a=ht(require("react")),b=require("gsap"),F=require("gsap/dist/SplitText"),H=require("gsap/dist/ScrollTrigger"),l=require("../../helpers/utils.js"),L=require("class-variance-authority"),d=require("../../components/index.js"),B=require("../../shared/Styles.js"),I=require("../../shared/trackUrlRef.js"),j=require("react-intersection-observer");const P="link",S="title";function xt(t){if(!t)return!1;if(typeof t=="string")return t.trim().length>0;const n=t?.root?.children;return!Array.isArray(n)||n.length===0?!1:n.some(e=>{const s=e?.children;return!Array.isArray(s)||s.length===0?!1:s.some(r=>typeof r?.text=="string"&&r.text.length>0)})}const wt=(0,L.cva)("",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),bt=(0,L.cva)("desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),$=({data:t,onClick:n,className:e})=>{const{theme:s="light",extensions:r,title:h,caption:v,align:g}=t;if(!r?.textLink)return null;const u=r?.link?(0,I.trackUrlRef)(r.link,`${P}_${S}`):void 0;return(0,i.jsxs)("a",{className:(0,l.cn)({"aiui-dark":s==="dark"},"hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]",{"text-[#080A0F]":s==="light"},{"text-[#F5F6F7]":s==="dark"},{"justify-center mt-4":g==="center"},{"mt-1 laptop:mt-0":g==="left"},e),...u?{href:u}:{},"data-headless-type-name":`${P}#${S}`,"data-headless-title-desc-button":`${h}#${v}`,...n?{onClick:n}:{},children:[(0,i.jsx)("div",{className:"truncate whitespace-nowrap",children:r?.textLink}),(0,i.jsx)("div",{className:"lg-desktop:size-5 size-4",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",children:(0,i.jsx)("path",{d:"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z",fill:s==="dark"?"#F5F6F7":"#080A0F",className:"transition-all duration-[0.4s]"})})})]})},_=a.default.forwardRef(({data:t,className:n,classNames:e,as:s="h2",weight:r="bold",onButtonClick:h,...v},g)=>{const{title:u,titleSize:O=4,caption:C,subtitle:D,content:M,countdown:o,showCountdown:U=!1,theme:x="light",extensions:W,align:m="left"}=t,E=(0,a.useRef)(null),p=(0,a.useRef)(null),c=(0,a.useRef)(null),f=(0,a.useRef)(null),[Z,q]=(0,a.useState)(!0),{ref:G,inView:z}=(0,j.useInView)();(0,a.useImperativeHandle)(g,()=>E.current);const J=()=>{q(!1)},K=o?.targetDateTime||o?.targetDate||"",Q=o?.targetDateTime_tz,X=o?.labels?{day:o.labels.days||"Day",hour:o.labels.hours||"Hours",minute:o.labels.minutes||"Mins",second:o.labels.seconds||"Secs"}:void 0;return(0,a.useEffect)(()=>{b.gsap.registerPlugin(F.SplitText,H.ScrollTrigger);function Y(){if(!p.current)return;const tt=p.current?.clientHeight||80;c.current&&c.current.revert(),f.current&&f.current.kill(),c.current=new F.SplitText(p.current,{type:"words",wordsClass:"word"});const y=c.current.words;b.gsap.set(y,{opacity:0}),f.current=H.ScrollTrigger.create({trigger:p.current,start:"bottom bottom-=4%",end:`bottom+=${tt*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:et=>{const nt=et.progress,R=y.length||1,rt=.5,k=1/R,V=k*(1-rt),A=(R-1)*V+k,it=Math.min(1,A>0?nt/A:0);y.forEach((st,ot)=>{const at=ot*V,lt=k;let T=(it-at)/lt;T=Math.max(0,Math.min(1,T)),b.gsap.set(st,{opacity:T})})}})}return z&&Y(),()=>{c.current&&c.current.revert(),f.current&&f.current.kill()}},[z]),(0,i.jsxs)("div",{...v,id:W?.id,className:(0,l.cn)("titleBottom title-box flex items-end justify-between gap-2 pb-6",n,e?.wrapper),ref:E,children:[(0,i.jsxs)("div",{ref:G,className:(0,l.cn)("flex-1",e?.container,{"aiui-dark":x==="dark","text-center":m==="center","text-left":m==="left"}),children:[(C||u)&&(0,i.jsx)(d.Heading,{ref:p,as:s,size:O,html:C||u,weight:r,className:(0,l.cn)(wt({theme:x}),e?.title)}),D&&(0,i.jsx)(d.Text,{html:D,as:"div",className:(0,l.cn)(bt({theme:x}),e?.subtitle)}),xt(M)&&(0,i.jsx)(d.Text,{html:M,as:"div",size:4,className:(0,l.cn)("title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]",e?.content)}),(0,i.jsx)($,{data:t,className:(0,l.cn)({"laptop:hidden":m==="left"},e?.button),onClick:h}),U&&o&&Z&&(0,i.jsx)(d.Countdown,{endDate:K,endDate_tz:Q,timeLabels:X,showDays:o?.showDays,showHours:o?.showHours,showMinutes:o?.showMinutes,showSeconds:o?.showSeconds,theme:x,onExpire:J,hideWhenExpired:!0,align:m==="center"?"center":"left",className:(0,l.cn)("mt-4",e?.countdown)})]}),(0,i.jsx)($,{data:t,className:(0,l.cn)("hidden",{"laptop:flex":m==="left"},e?.button),onClick:h})]})});_.displayName="Title";var vt=(0,B.withLayout)(_);
1
+ "use strict";"use client";var dt=Object.create;var w=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var mt=Object.getPrototypeOf,pt=Object.prototype.hasOwnProperty;var ft=(t,n)=>{for(var e in n)w(t,e,{get:n[e],enumerable:!0})},N=(t,n,e,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of ut(n))!pt.call(t,r)&&r!==e&&w(t,r,{get:()=>n[r],enumerable:!(s=ct(n,r))||s.enumerable});return t};var ht=(t,n,e)=>(e=t!=null?dt(mt(t)):{},N(n||!t||!t.__esModule?w(e,"default",{value:t,enumerable:!0}):e,t)),gt=t=>N(w({},"__esModule",{value:!0}),t);var yt={};ft(yt,{default:()=>vt});module.exports=gt(yt);var i=require("react/jsx-runtime"),a=ht(require("react")),b=require("gsap"),F=require("gsap/dist/SplitText"),H=require("gsap/dist/ScrollTrigger"),l=require("../../helpers/utils.js"),L=require("class-variance-authority"),d=require("../../components/index.js"),B=require("../../shared/Styles.js"),I=require("../../shared/trackUrlRef.js"),j=require("react-intersection-observer");const P="link",S="title";function xt(t){if(!t)return!1;if(typeof t=="string")return t.trim().length>0;const n=t?.root?.children;return!Array.isArray(n)||n.length===0?!1:n.some(e=>{const s=e?.children;return!Array.isArray(s)||s.length===0?!1:s.some(r=>typeof r?.text=="string"&&r.text.length>0)})}const wt=(0,L.cva)("",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),bt=(0,L.cva)("desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),$=({data:t,onClick:n,className:e})=>{const{theme:s="light",extensions:r,title:h,caption:v,align:g}=t;if(!r?.textLink)return null;const u=r?.link?(0,I.trackUrlRef)(r.link,`${P}_${S}`):void 0;return(0,i.jsxs)("a",{className:(0,l.cn)({"aiui-dark":s==="dark"},"hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]",{"text-[#080A0F]":s==="light"},{"text-[#F5F6F7]":s==="dark"},{"justify-center mt-4":g==="center"},{"mt-1 laptop:mt-0":g==="left"},e),...u?{href:u}:{},"data-headless-type-name":`${P}#${S}`,"data-headless-title-desc-button":`${h}#${v}`,...n?{onClick:n}:{},children:[(0,i.jsx)("div",{className:"truncate whitespace-nowrap",children:r?.textLink}),(0,i.jsx)("div",{className:"lg-desktop:size-5 size-4",children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",children:(0,i.jsx)("path",{d:"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z",fill:s==="dark"?"#F5F6F7":"#080A0F",className:"transition-all duration-[0.4s]"})})})]})},_=a.default.forwardRef(({data:t,className:n,classNames:e,as:s="h2",weight:r="bold",onButtonClick:h,...v},g)=>{const{title:u,titleSize:O=4,caption:C,subtitle:D,content:M,countdown:o,showCountdown:U=!1,theme:x="light",extensions:W,align:m="left"}=t,E=(0,a.useRef)(null),p=(0,a.useRef)(null),c=(0,a.useRef)(null),f=(0,a.useRef)(null),[Z,q]=(0,a.useState)(!0),{ref:G,inView:z}=(0,j.useInView)();(0,a.useImperativeHandle)(g,()=>E.current);const J=()=>{q(!1)},K=o?.targetDateTime||o?.targetDate||"",Q=o?.targetDateTime_tz,X=o?.labels?{day:o.labels.days||"Day",hour:o.labels.hours||"Hours",minute:o.labels.minutes||"Mins",second:o.labels.seconds||"Secs"}:void 0;return(0,a.useEffect)(()=>{b.gsap.registerPlugin(F.SplitText,H.ScrollTrigger);function Y(){if(!p.current)return;const tt=p.current?.clientHeight||80;c.current&&c.current.revert(),f.current&&f.current.kill(),c.current=new F.SplitText(p.current,{type:"words",wordsClass:"word"});const y=c.current.words;b.gsap.set(y,{opacity:0}),f.current=H.ScrollTrigger.create({trigger:p.current,start:"bottom bottom-=4%",end:`bottom+=${tt*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:et=>{const nt=et.progress,R=y.length||1,rt=.5,k=1/R,V=k*(1-rt),A=(R-1)*V+k,it=Math.min(1,A>0?nt/A:0);y.forEach((st,ot)=>{const at=ot*V,lt=k;let T=(it-at)/lt;T=Math.max(0,Math.min(1,T)),b.gsap.set(st,{opacity:T})})}})}return z&&Y(),()=>{c.current&&c.current.revert(),f.current&&f.current.kill()}},[z]),(0,i.jsxs)("div",{id:W?.id,className:(0,l.cn)("titleBottom title-box flex items-end justify-between gap-2 pb-6",n,e?.wrapper),...v,ref:E,children:[(0,i.jsxs)("div",{ref:G,className:(0,l.cn)("flex-1",e?.container,{"aiui-dark":x==="dark","text-center":m==="center","text-left":m==="left"}),children:[(C||u)&&(0,i.jsx)(d.Heading,{ref:p,as:s,size:O,html:C||u,weight:r,className:(0,l.cn)(wt({theme:x}),e?.title)}),D&&(0,i.jsx)(d.Text,{html:D,as:"div",className:(0,l.cn)(bt({theme:x}),e?.subtitle)}),xt(M)&&(0,i.jsx)(d.Text,{html:M,as:"div",size:4,className:(0,l.cn)("title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]",e?.content)}),(0,i.jsx)($,{data:t,className:(0,l.cn)({"laptop:hidden":m==="left"},e?.button),onClick:h}),U&&o&&Z&&(0,i.jsx)(d.Countdown,{endDate:K,endDate_tz:Q,timeLabels:X,showDays:o?.showDays,showHours:o?.showHours,showMinutes:o?.showMinutes,showSeconds:o?.showSeconds,theme:x,onExpire:J,hideWhenExpired:!0,align:m==="center"?"center":"left",className:(0,l.cn)("mt-4",e?.countdown)})]}),(0,i.jsx)($,{data:t,className:(0,l.cn)("hidden",{"laptop:flex":m==="left"},e?.button),onClick:h})]})});_.displayName="Title";var vt=(0,B.withLayout)(_);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Title/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { cva } from 'class-variance-authority'\nimport { Heading, Text, Countdown, type HeadingProps } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitlePropsBase } from './types.js'\n\nexport interface TitleProps extends TitlePropsBase, Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'title'> {}\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\n/**\n * \u5224\u65AD content \u5B57\u6BB5\u662F\u5426\u6709\u5B9E\u9645\u53EF\u89C1\u5185\u5BB9\u3002\n * - string\uFF1A\u53BB\u6389\u7A7A\u767D\u540E\u975E\u7A7A\u5373\u6709\u5185\u5BB9\n * - SerializedEditorState\uFF1A\u68C0\u67E5 root.children \u5185\u662F\u5426\u5B58\u5728\u975E\u7A7A\u6587\u672C\u8282\u70B9\uFF0C\n * \u907F\u514D convertLexicalToHTML \u628A\u7A7A\u6587\u6863\u8F93\u51FA\u4E3A &lt;div class=\"payload-richtext\"&gt;&lt;/div&gt;\n */\nfunction hasVisibleContent(content: string | { root?: { children?: unknown[] } } | null | undefined): boolean {\n if (!content) return false\n if (typeof content === 'string') return content.trim().length > 0\n const children = content?.root?.children\n if (!Array.isArray(children) || children.length === 0) return false\n return children.some((node: any) => {\n const nodeChildren = node?.children\n if (!Array.isArray(nodeChildren) || nodeChildren.length === 0) return false\n return nodeChildren.some((child: any) => typeof child?.text === 'string' && child.text.length > 0)\n })\n}\n\n/**\n * \u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst titleHeadingVariants = cva('', {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u526F\u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst subtitleVariants = cva(\n 'desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]',\n {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n }\n)\n\nconst TitleButton = ({\n data,\n onClick,\n className,\n}: {\n data: TitleProps['data']\n onClick?: () => void\n className?: string\n}) => {\n const { theme = 'light', extensions, title, caption, align } = data\n if (!extensions?.textLink) return null\n\n const href = extensions?.link ? trackUrlRef(extensions.link, `${componentType}_${componentName}`) : undefined\n\n return (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]',\n { 'text-[#080A0F]': theme === 'light' },\n { 'text-[#F5F6F7]': theme === 'dark' },\n { 'justify-center mt-4': align === 'center' },\n { 'mt-1 laptop:mt-0': align === 'left' },\n className\n )}\n {...(href ? { href } : {})}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n {...(onClick ? { onClick } : {})}\n >\n <div className=\"truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"lg-desktop:size-5 size-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z\"\n fill={theme === 'dark' ? '#F5F6F7' : '#080A0F'}\n className=\"transition-all duration-[0.4s]\"\n />\n </svg>\n </div>\n </a>\n )\n}\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(\n ({ data, className, classNames, as = 'h2', weight = 'bold', onButtonClick, ...rest }, ref) => {\n const {\n title,\n titleSize = 4,\n caption,\n subtitle,\n content,\n countdown,\n showCountdown = false,\n theme = 'light',\n extensions,\n align = 'left',\n } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n // \u63A7\u5236\u5012\u8BA1\u65F6\u663E\u793A\u72B6\u6001\n const [isCountdownVisible, setIsCountdownVisible] = useState(true)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n // \u5012\u8BA1\u65F6\u7ED3\u675F\u56DE\u8C03\n const handleCountdownEnd = () => {\n setIsCountdownVisible(false)\n }\n\n // CMS field mapping: new targetDateTime > legacy targetDate\n const countdownEndDate = countdown?.targetDateTime || countdown?.targetDate || ''\n const countdownTz = countdown?.targetDateTime_tz\n // Label mapping: plural keys (Title CMS format) \u2192 atomic Countdown format\n const countdownLabels = countdown?.labels\n ? {\n day: countdown.labels.days || 'Day',\n hour: countdown.labels.hours || 'Hours',\n minute: countdown.labels.minutes || 'Mins',\n second: countdown.labels.seconds || 'Secs',\n }\n : undefined\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div\n {...rest}\n id={extensions?.id}\n className={cn(\n 'titleBottom title-box flex items-end justify-between gap-2 pb-6',\n className,\n classNames?.wrapper\n )}\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('flex-1', classNames?.container, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-left': align === 'left',\n })}\n >\n {(caption || title) && (\n <Heading\n ref={titleRef}\n as={as}\n size={titleSize as HeadingProps['size']}\n html={caption || title}\n weight={weight}\n className={cn(titleHeadingVariants({ theme }), classNames?.title)}\n />\n )}\n {subtitle && (\n <Text html={subtitle} as=\"div\" className={cn(subtitleVariants({ theme }), classNames?.subtitle)} />\n )}\n {hasVisibleContent(content) && (\n <Text\n html={content}\n as=\"div\"\n size={4}\n className={cn(\n 'title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]',\n classNames?.content\n )}\n />\n )}\n <TitleButton\n data={data}\n className={cn({ 'laptop:hidden': align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n {showCountdown && countdown && isCountdownVisible && (\n <Countdown\n endDate={countdownEndDate}\n endDate_tz={countdownTz}\n timeLabels={countdownLabels}\n showDays={countdown?.showDays}\n showHours={countdown?.showHours}\n showMinutes={countdown?.showMinutes}\n showSeconds={countdown?.showSeconds}\n theme={theme}\n onExpire={handleCountdownEnd}\n hideWhenExpired={true}\n align={align === 'center' ? 'center' : 'left'}\n className={cn('mt-4', classNames?.countdown)}\n />\n )}\n </div>\n <TitleButton\n data={data}\n className={cn('hidden', { ['laptop:flex']: align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n </div>\n )\n }\n)\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
- "mappings": "olBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAoFI,IAAAI,EAAA,6BAnFJC,EAAwE,qBACxEC,EAAqB,gBACrBC,EAA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MAAG,SAAU,CAAG,cAAgBO,IAAU,MAAO,EAAGI,GAAY,MAAM,EACjF,QAASG,EACX,GACF,CAEJ,CACF,EAEAL,EAAM,YAAc,QAEpB,IAAOjC,MAAQ,cAAWiC,CAAK",
4
+ "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { cva } from 'class-variance-authority'\nimport { Heading, Text, Countdown, type HeadingProps } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitlePropsBase } from './types.js'\n\nexport interface TitleProps extends TitlePropsBase, Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'title'> {}\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\n/**\n * \u5224\u65AD content \u5B57\u6BB5\u662F\u5426\u6709\u5B9E\u9645\u53EF\u89C1\u5185\u5BB9\u3002\n * - string\uFF1A\u53BB\u6389\u7A7A\u767D\u540E\u975E\u7A7A\u5373\u6709\u5185\u5BB9\n * - SerializedEditorState\uFF1A\u68C0\u67E5 root.children \u5185\u662F\u5426\u5B58\u5728\u975E\u7A7A\u6587\u672C\u8282\u70B9\uFF0C\n * \u907F\u514D convertLexicalToHTML \u628A\u7A7A\u6587\u6863\u8F93\u51FA\u4E3A &lt;div class=\"payload-richtext\"&gt;&lt;/div&gt;\n */\nfunction hasVisibleContent(content: string | { root?: { children?: unknown[] } } | null | undefined): boolean {\n if (!content) return false\n if (typeof content === 'string') return content.trim().length > 0\n const children = content?.root?.children\n if (!Array.isArray(children) || children.length === 0) return false\n return children.some((node: any) => {\n const nodeChildren = node?.children\n if (!Array.isArray(nodeChildren) || nodeChildren.length === 0) return false\n return nodeChildren.some((child: any) => typeof child?.text === 'string' && child.text.length > 0)\n })\n}\n\n/**\n * \u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst titleHeadingVariants = cva('', {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u526F\u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst subtitleVariants = cva(\n 'desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]',\n {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n }\n)\n\nconst TitleButton = ({\n data,\n onClick,\n className,\n}: {\n data: TitleProps['data']\n onClick?: () => void\n className?: string\n}) => {\n const { theme = 'light', extensions, title, caption, align } = data\n if (!extensions?.textLink) return null\n\n const href = extensions?.link ? trackUrlRef(extensions.link, `${componentType}_${componentName}`) : undefined\n\n return (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]',\n { 'text-[#080A0F]': theme === 'light' },\n { 'text-[#F5F6F7]': theme === 'dark' },\n { 'justify-center mt-4': align === 'center' },\n { 'mt-1 laptop:mt-0': align === 'left' },\n className\n )}\n {...(href ? { href } : {})}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n {...(onClick ? { onClick } : {})}\n >\n <div className=\"truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"lg-desktop:size-5 size-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z\"\n fill={theme === 'dark' ? '#F5F6F7' : '#080A0F'}\n className=\"transition-all duration-[0.4s]\"\n />\n </svg>\n </div>\n </a>\n )\n}\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(\n ({ data, className, classNames, as = 'h2', weight = 'bold', onButtonClick, ...rest }, ref) => {\n const {\n title,\n titleSize = 4,\n caption,\n subtitle,\n content,\n countdown,\n showCountdown = false,\n theme = 'light',\n extensions,\n align = 'left',\n } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n // \u63A7\u5236\u5012\u8BA1\u65F6\u663E\u793A\u72B6\u6001\n const [isCountdownVisible, setIsCountdownVisible] = useState(true)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n // \u5012\u8BA1\u65F6\u7ED3\u675F\u56DE\u8C03\n const handleCountdownEnd = () => {\n setIsCountdownVisible(false)\n }\n\n // CMS field mapping: new targetDateTime > legacy targetDate\n const countdownEndDate = countdown?.targetDateTime || countdown?.targetDate || ''\n const countdownTz = countdown?.targetDateTime_tz\n // Label mapping: plural keys (Title CMS format) \u2192 atomic Countdown format\n const countdownLabels = countdown?.labels\n ? {\n day: countdown.labels.days || 'Day',\n hour: countdown.labels.hours || 'Hours',\n minute: countdown.labels.minutes || 'Mins',\n second: countdown.labels.seconds || 'Secs',\n }\n : undefined\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div\n id={extensions?.id}\n className={cn(\n 'titleBottom title-box flex items-end justify-between gap-2 pb-6',\n className,\n classNames?.wrapper\n )}\n {...rest}\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('flex-1', classNames?.container, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-left': align === 'left',\n })}\n >\n {(caption || title) && (\n <Heading\n ref={titleRef}\n as={as}\n size={titleSize as HeadingProps['size']}\n html={caption || title}\n weight={weight}\n className={cn(titleHeadingVariants({ theme }), classNames?.title)}\n />\n )}\n {subtitle && (\n <Text html={subtitle} as=\"div\" className={cn(subtitleVariants({ theme }), classNames?.subtitle)} />\n )}\n {hasVisibleContent(content) && (\n <Text\n html={content}\n as=\"div\"\n size={4}\n className={cn(\n 'title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]',\n classNames?.content\n )}\n />\n )}\n <TitleButton\n data={data}\n className={cn({ 'laptop:hidden': align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n {showCountdown && countdown && isCountdownVisible && (\n <Countdown\n endDate={countdownEndDate}\n endDate_tz={countdownTz}\n timeLabels={countdownLabels}\n showDays={countdown?.showDays}\n showHours={countdown?.showHours}\n showMinutes={countdown?.showMinutes}\n showSeconds={countdown?.showSeconds}\n theme={theme}\n onExpire={handleCountdownEnd}\n hideWhenExpired={true}\n align={align === 'center' ? 'center' : 'left'}\n className={cn('mt-4', classNames?.countdown)}\n />\n )}\n </div>\n <TitleButton\n data={data}\n className={cn('hidden', { ['laptop:flex']: align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n </div>\n )\n }\n)\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
+ "mappings": "olBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAoFI,IAAAI,EAAA,6BAnFJC,EAAwE,qBACxEC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAmB,kCACnBC,EAAoB,oCACpBC,EAA4D,qCAC5DC,EAA2B,kCAI3BC,EAA4B,uCAC5BC,EAA0B,uCAE1B,MAAMC,EAAgB,OAChBC,EAAgB,QAQtB,SAASC,GAAkBC,EAAmF,CAC5G,GAAI,CAACA,EAAS,MAAO,GACrB,GAAI,OAAOA,GAAY,SAAU,OAAOA,EAAQ,KAAK,EAAE,OAAS,EAChE,MAAMC,EAAWD,GAAS,MAAM,SAChC,MAAI,CAAC,MAAM,QAAQC,CAAQ,GAAKA,EAAS,SAAW,EAAU,GACvDA,EAAS,KAAMC,GAAc,CAClC,MAAMC,EAAeD,GAAM,SAC3B,MAAI,CAAC,MAAM,QAAQC,CAAY,GAAKA,EAA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WD,EACjB,OAAQQ,EACR,aAAW,MAAGhB,GAAqB,CAAE,MAAAM,CAAM,CAAC,EAAGQ,GAAY,KAAK,EAClE,EAEDO,MACC,OAAC,QAAK,KAAMA,EAAU,GAAG,MAAM,aAAW,MAAGpB,GAAiB,CAAE,MAAAK,CAAM,CAAC,EAAGQ,GAAY,QAAQ,EAAG,EAElGpB,GAAkBC,CAAO,MACxB,OAAC,QACC,KAAMA,EACN,GAAG,MACH,KAAM,EACN,aAAW,MACT,uHACAmB,GAAY,OACd,EACF,KAEF,OAACZ,EAAA,CACC,KAAMC,EACN,aAAW,MAAG,CAAE,gBAAiBO,IAAU,MAAO,EAAGI,GAAY,MAAM,EACvE,QAASG,EACX,EACCM,GAAiBD,GAAaM,MAC7B,OAAC,aACC,QAASK,EACT,WAAYC,EACZ,WAAYC,EACZ,SAAUb,GAAW,SACrB,UAAWA,GAAW,UACtB,YAAaA,GAAW,YACxB,YAAaA,GAAW,YACxB,MAAOhB,EACP,SAAU0B,EACV,gBAAiB,GACjB,MAAOtB,IAAU,SAAW,SAAW,OACvC,aAAW,MAAG,OAAQI,GAAY,SAAS,EAC7C,GAEJ,KACA,OAACZ,EAAA,CACC,KAAMC,EACN,aAAW,MAAG,SAAU,CAAG,cAAgBO,IAAU,MAAO,EAAGI,GAAY,MAAM,EACjF,QAASG,EACX,GACF,CAEJ,CACF,EAEAL,EAAM,YAAc,QAEpB,IAAOjC,MAAQ,cAAWiC,CAAK",
6
6
  "names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_class_variance_authority", "import_components", "import_Styles", "import_trackUrlRef", "import_react_intersection_observer", "componentType", "componentName", "hasVisibleContent", "content", "children", "node", "nodeChildren", "child", "titleHeadingVariants", "subtitleVariants", "TitleButton", "data", "onClick", "className", "theme", "extensions", "title", "caption", "align", "href", "Title", "React", "classNames", "as", "weight", "onButtonClick", "rest", "ref", "titleSize", "subtitle", "countdown", "showCountdown", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "isCountdownVisible", "setIsCountdownVisible", "inViewRef", "inView", "handleCountdownEnd", "countdownEndDate", "countdownTz", "countdownLabels", "gsapResize", "height", "words", "self", "progress", "total", "overlap", "interval", "step", "lastEnd", "normalizedProgress", "word", "i", "start", "width", "opacity"]
7
7
  }
@@ -3,9 +3,19 @@
3
3
  *
4
4
  * @description Anker Innovations品牌标识栏组件,用于显示公司Logo和品牌信息
5
5
  */
6
- declare const Board: ({ href, data, sizeClass }: {
7
- href?: string;
8
- data?: any;
6
+ interface BoardIconItem {
7
+ link?: string;
8
+ label?: string;
9
+ title?: string;
10
+ logo?: string;
11
+ }
12
+ interface BoardData {
13
+ leftIcon?: BoardIconItem[];
14
+ rightIcon?: BoardIconItem[];
15
+ }
16
+ export interface BoardProps {
17
+ data?: BoardData;
9
18
  sizeClass?: string;
10
- }) => import("react/jsx-runtime").JSX.Element;
19
+ }
20
+ declare const Board: ({ data, sizeClass }: BoardProps) => import("react/jsx-runtime").JSX.Element;
11
21
  export default Board;
@@ -1,2 +1,2 @@
1
- "use strict";var f=Object.create;var r=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var m=(l,e)=>{for(var i in e)r(l,i,{get:e[i],enumerable:!0})},d=(l,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of c(e))!p.call(l,s)&&s!==i&&r(l,s,{get:()=>e[s],enumerable:!(a=u(e,s))||a.enumerable});return l};var v=(l,e,i)=>(i=l!=null?f(g(l)):{},d(e||!l||!l.__esModule?r(i,"default",{value:l,enumerable:!0}):i,l)),_=l=>d(r({},"__esModule",{value:!0}),l);var y={};m(y,{default:()=>b});module.exports=_(y);var n=require("react/jsx-runtime"),o=require("../helpers/utils.js"),h=require("./container.js"),t=v(require("./link.js"));const k=({href:l,data:e,sizeClass:i})=>(0,n.jsx)(t.default,{href:l,asChild:!l,children:(0,n.jsx)("div",{className:"relative z-[46] box-border h-[30px]",children:(0,n.jsxs)(h.Container,{childClassName:"flex !bg-[#080A0F] items-center justify-between",className:"h-full",children:[(0,n.jsx)("div",{className:"flex h-full items-center gap-2 py-[5px]",children:e?.leftIcon?.map?.((a,s)=>(0,n.jsx)(t.default,{href:a?.link,asChild:!a?.link,"aria-label":a?.label,className:(0,o.cn)("hidden h-full",`${i||"desktop:block"}`),children:(0,n.jsx)("div",{className:(0,o.cn)(`${i||"desktop:block"}`,"hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]"),style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:a?.logo||""}})},s))}),(0,n.jsx)("div",{className:"flex h-full items-center justify-end gap-2 py-[5px]",children:e?.rightIcon?.map?.((a,s)=>(0,n.jsx)(t.default,{href:a?.link,asChild:!a?.link,"aria-label":a?.label,className:"flex h-full items-center",children:(0,n.jsx)("div",{className:"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto",style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:a?.logo||""}})},s))})]})})});var b=k;
1
+ "use strict";var h=Object.create;var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var m=(l,a)=>{for(var e in a)i(l,e,{get:a[e],enumerable:!0})},d=(l,a,e,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of g(a))!u.call(l,r)&&r!==e&&i(l,r,{get:()=>a[r],enumerable:!(n=c(a,r))||n.enumerable});return l};var v=(l,a,e)=>(e=l!=null?h(p(l)):{},d(a||!l||!l.__esModule?i(e,"default",{value:l,enumerable:!0}):e,l)),_=l=>d(i({},"__esModule",{value:!0}),l);var y={};m(y,{default:()=>k});module.exports=_(y);var t=require("react/jsx-runtime"),o=require("../helpers/utils.js"),f=require("./container.js"),s=v(require("./link.js"));const b=({data:l,sizeClass:a})=>(0,t.jsx)("div",{className:"relative z-[46] box-border h-[30px]",children:(0,t.jsxs)(f.Container,{childClassName:"flex !bg-[#080A0F] items-center justify-between",className:"h-full",children:[(0,t.jsx)("div",{className:"flex h-full items-center gap-2 py-[5px]",children:l?.leftIcon?.map?.((e,n)=>(0,t.jsx)(s.default,{href:e?.link,asChild:!e?.link,"aria-label":e?.label||e?.title,className:(0,o.cn)("hidden h-full",`${a||"desktop:block"}`),children:(0,t.jsx)("div",{className:(0,o.cn)(`${a||"desktop:block"}`,"hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]"),style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:e?.logo||""}})},n))}),(0,t.jsx)("div",{className:"flex h-full items-center justify-end gap-2 py-[5px]",children:l?.rightIcon?.map?.((e,n)=>(0,t.jsx)(s.default,{href:e?.link,asChild:!e?.link,"aria-label":e?.label||e?.title,className:"flex h-full items-center",children:(0,t.jsx)("div",{className:"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto",style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:e?.logo||""}})},n))})]})});var k=b;
2
2
  //# sourceMappingURL=board.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/board.tsx"],
4
- "sourcesContent": ["import { cn } from '../helpers/utils.js'\nimport { Container } from './container.js'\nimport Link from './link.js'\n\n/**\n * Board - \u54C1\u724C\u6807\u8BC6\u680F\n *\n * @description Anker Innovations\u54C1\u724C\u6807\u8BC6\u680F\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u663E\u793A\u516C\u53F8Logo\u548C\u54C1\u724C\u4FE1\u606F\n */\n\nconst Board = ({ href, data, sizeClass }: { href?: string; data?: any; sizeClass?: string }) => {\n return (\n <Link href={href} asChild={!href}>\n <div className=\"relative z-[46] box-border h-[30px]\">\n <Container childClassName=\"flex !bg-[#080A0F] items-center justify-between\" className=\"h-full\">\n <div className=\"flex h-full items-center gap-2 py-[5px]\">\n {data?.leftIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label}\n className={cn('hidden h-full', `${sizeClass || 'desktop:block'}`)}\n >\n <div\n className={cn(\n `${sizeClass || 'desktop:block'}`,\n 'hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]'\n )}\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n <div className=\"flex h-full items-center justify-end gap-2 py-[5px]\">\n {data?.rightIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label}\n className=\"flex h-full items-center\"\n >\n <div\n className=\"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto\"\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n </Container>\n </div>\n </Link>\n )\n}\n\n// const AnkerInnovations = (props: React.SVGProps<SVGSVGElement>) => {\n// return (\n// <svg width=\"148\" height=\"10\" viewBox=\"0 0 148 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n// <path\n// d=\"M88.5391 1.66872C90.8392 1.6688 92.7041 3.53461 92.7041 5.83474C92.7039 8.13468 90.839 9.9997 88.5391 9.99977C86.239 9.99977 84.3733 8.13473 84.373 5.83474C84.373 3.53456 86.2389 1.66872 88.5391 1.66872ZM106.479 1.66872C107.484 1.66872 108.407 2.02531 109.127 2.61892L109.477 1.86208H110.645V9.79958H109.477L109.13 9.0486C108.409 9.64225 107.486 9.99977 106.479 9.99977C104.179 9.99954 102.314 8.13458 102.313 5.83474C102.313 3.53471 104.179 1.66896 106.479 1.66872ZM126.684 1.66872C128.984 1.66872 130.849 3.53456 130.849 5.83474C130.848 8.13473 128.984 9.99977 126.684 9.99977C124.384 9.99972 122.519 8.13469 122.519 5.83474C122.519 3.5346 124.383 1.66878 126.684 1.66872ZM144.748 1.66188C146.602 1.66198 147.794 2.66292 147.823 4.20778H146.278C146.249 3.44345 145.631 3.04577 144.719 3.04567C143.806 3.04567 143.247 3.429 143.247 4.0027C143.247 4.7082 144.07 4.85598 145.026 5.0027L145.025 5.00173C146.365 5.23788 147.998 5.48784 147.998 7.44509C147.998 8.98988 146.716 9.99001 144.775 9.99001C142.834 9.98986 141.568 8.93061 141.524 7.28298H143.128C143.172 8.12086 143.878 8.54763 144.835 8.54763C145.703 8.5475 146.38 8.17982 146.38 7.51833C146.38 6.76851 145.527 6.5909 144.556 6.42946C143.232 6.20932 141.673 5.90104 141.673 4.0613C141.673 2.6337 142.893 1.66188 144.748 1.66188ZM115.1 1.85427H117.434V3.24685H115.102V6.85524C115.102 7.79295 115.614 8.32097 116.582 8.32106H117.478V9.80251L116.275 9.8406C114.545 9.84058 113.474 8.76932 113.474 7.02419V3.24685H112.285V2.93532L114.577 0.000751495H115.1V1.85427ZM63.7627 9.79958H62.1367V-0.000225067H63.7627V9.79958ZM97.5566 7.32302L100.108 1.85427H101.884L98.1787 9.79958H96.9355L93.2305 1.85427H95.0059L97.5566 7.32302ZM120.852 9.79958H119.226V3.24587H120.852V9.79958ZM67.8779 2.61892C68.6117 2.02787 69.5403 1.67165 70.5557 1.67165H70.5566C72.1803 1.67165 73.498 2.98838 73.498 4.61208V9.7986H71.8711V4.96462C71.8711 4.00413 71.0923 3.22462 70.1318 3.22438C68.9018 3.22438 67.9045 4.221 67.9043 5.45095V9.7986H66.2725V1.67165H67.4404L67.8779 2.61892ZM77.3252 2.61892C78.059 2.02789 78.9876 1.67165 80.0029 1.67165H80.0039C81.6276 1.67165 82.9443 2.98838 82.9443 4.61208V9.7986H81.3184V4.96462C81.3184 4.00399 80.5388 3.22438 79.5781 3.22438C78.3483 3.2246 77.3518 4.22113 77.3516 5.45095V9.7986H75.7197V1.67165H76.8877L77.3252 2.61892ZM133.85 1.67165L134.287 2.61892C135.021 2.02792 135.95 1.67173 136.965 1.67165H136.967C138.59 1.67181 139.907 2.98848 139.907 4.61208V9.7986H138.28V4.96462C138.28 4.00403 137.502 3.22446 136.541 3.22438C135.311 3.22438 134.315 4.221 134.314 5.45095V9.7986H132.683V1.67165H133.85ZM88.5391 3.29567C87.1368 3.29567 86 4.43248 86 5.83474C86.0002 7.23681 87.1369 8.3738 88.5391 8.3738C89.9411 8.37372 91.0779 7.23676 91.0781 5.83474C91.0781 4.43253 89.9412 3.29575 88.5391 3.29567ZM106.479 3.29567C105.076 3.29591 103.94 4.43263 103.94 5.83474C103.941 7.23666 105.077 8.37356 106.479 8.3738C107.881 8.3738 109.017 7.23681 109.018 5.83474C109.018 4.43248 107.881 3.29567 106.479 3.29567ZM126.684 3.29567C125.281 3.29573 124.145 4.43252 124.145 5.83474C124.145 7.23677 125.282 8.37374 126.684 8.3738C128.086 8.3738 129.222 7.23681 129.223 5.83474C129.223 4.43248 128.086 3.29567 126.684 3.29567ZM120.852 1.84938H119.226V-0.000225067H120.852V1.84938Z\"\n// fill=\"white\"\n// />\n// <path\n// d=\"M11.124 10.0002H8.73438L5.63672 3.35569L2.53809 10.0002H0.148438L4.81152 0.000221252H6.46191L11.124 10.0002ZM20.3516 6.48264V0.000221252H22.5371V9.99924H20.3516L15.2871 3.51682V9.99924H13.1016V0.000221252H15.2871L20.3516 6.48264ZM27.209 9.99924H25.0234V0.000221252H27.209V9.99924ZM30.3037 4.99924L34.21 9.99924H31.4619L27.5586 4.99632L31.4619 0.000221252H34.21L30.3037 4.99924ZM44.6006 2.00413H38.1348V3.99827H43.2354V6.0012H38.1348V7.99534H44.6006V9.99924H35.9492V0.000221252H44.6006V2.00413ZM52.3105 0.000221252C54.2297 0.000274701 55.7852 1.55571 55.7852 3.47483C55.7851 5.0072 54.7924 6.30365 53.416 6.76585L55.9414 9.99729H53.1934L49.29 4.99534H52.2998C53.1392 4.99513 53.8203 4.31423 53.8203 3.47483C53.8203 2.63538 53.1392 1.95453 52.2998 1.95432H48.7715V9.99924H46.5859V0.000221252H52.3105Z\"\n// fill=\"white\"\n// />\n// </svg>\n// )\n// }\n\nexport default Board\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAcQ,IAAAI,EAAA,6BAdRC,EAAmB,+BACnBC,EAA0B,0BAC1BC,EAAiB,wBAQjB,MAAMC,EAAQ,CAAC,CAAE,KAAAC,EAAM,KAAAC,EAAM,UAAAC,CAAU,OAEnC,OAAC,EAAAC,QAAA,CAAK,KAAMH,EAAM,QAAS,CAACA,EAC1B,mBAAC,OAAI,UAAU,sCACb,oBAAC,aAAU,eAAe,kDAAkD,UAAU,SACpF,oBAAC,OAAI,UAAU,0CACZ,SAAAC,GAAM,UAAU,MAAM,CAACG,EAAWC,OACjC,OAAC,EAAAF,QAAA,CAEC,KAAMC,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,MAClB,aAAW,MAAG,gBAAiB,GAAGF,GAAa,eAAe,EAAE,EAEhE,mBAAC,OACC,aAAW,MACT,GAAGA,GAAa,eAAe,GAC/B,4LACF,EACA,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQE,GAAM,MAAQ,EAAG,EACtD,GAdKC,CAeP,CACD,EACH,KACA,OAAC,OAAI,UAAU,sDACZ,SAAAJ,GAAM,WAAW,MAAM,CAACG,EAAWC,OAClC,OAAC,EAAAF,QAAA,CAEC,KAAMC,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,MAClB,UAAU,2BAEV,mBAAC,OACC,UAAU,uDACV,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQA,GAAM,MAAQ,EAAG,EACtD,GAXKC,CAYP,CACD,EACH,GACF,EACF,EACF,EAmBJ,IAAOZ,EAAQM",
6
- "names": ["board_exports", "__export", "board_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_container", "import_link", "Board", "href", "data", "sizeClass", "Link", "item", "index"]
4
+ "sourcesContent": ["import { cn } from '../helpers/utils.js'\nimport { Container } from './container.js'\nimport Link from './link.js'\n\n/**\n * Board - \u54C1\u724C\u6807\u8BC6\u680F\n *\n * @description Anker Innovations\u54C1\u724C\u6807\u8BC6\u680F\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u663E\u793A\u516C\u53F8Logo\u548C\u54C1\u724C\u4FE1\u606F\n */\n\ninterface BoardIconItem {\n link?: string\n label?: string\n title?: string\n logo?: string\n}\n\ninterface BoardData {\n leftIcon?: BoardIconItem[]\n rightIcon?: BoardIconItem[]\n}\n\nexport interface BoardProps {\n data?: BoardData\n sizeClass?: string\n}\n\nconst Board = ({ data, sizeClass }: BoardProps) => {\n return (\n <div className=\"relative z-[46] box-border h-[30px]\">\n <Container childClassName=\"flex !bg-[#080A0F] items-center justify-between\" className=\"h-full\">\n <div className=\"flex h-full items-center gap-2 py-[5px]\">\n {data?.leftIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label || item?.title}\n className={cn('hidden h-full', `${sizeClass || 'desktop:block'}`)}\n >\n <div\n className={cn(\n `${sizeClass || 'desktop:block'}`,\n 'hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]'\n )}\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n <div className=\"flex h-full items-center justify-end gap-2 py-[5px]\">\n {data?.rightIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label || item?.title}\n className=\"flex h-full items-center\"\n >\n <div\n className=\"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto\"\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n </Container>\n </div>\n )\n}\n\nexport default Board\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8BM,IAAAI,EAAA,6BA9BNC,EAAmB,+BACnBC,EAA0B,0BAC1BC,EAAiB,wBAyBjB,MAAMC,EAAQ,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,OAE7B,OAAC,OAAI,UAAU,sCACb,oBAAC,aAAU,eAAe,kDAAkD,UAAU,SACpF,oBAAC,OAAI,UAAU,0CACZ,SAAAD,GAAM,UAAU,MAAM,CAACE,EAAWC,OACjC,OAAC,EAAAC,QAAA,CAEC,KAAMF,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,OAASA,GAAM,MACjC,aAAW,MAAG,gBAAiB,GAAGD,GAAa,eAAe,EAAE,EAEhE,mBAAC,OACC,aAAW,MACT,GAAGA,GAAa,eAAe,GAC/B,4LACF,EACA,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQC,GAAM,MAAQ,EAAG,EACtD,GAdKC,CAeP,CACD,EACH,KACA,OAAC,OAAI,UAAU,sDACZ,SAAAH,GAAM,WAAW,MAAM,CAACE,EAAWC,OAClC,OAAC,EAAAC,QAAA,CAEC,KAAMF,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,OAASA,GAAM,MACjC,UAAU,2BAEV,mBAAC,OACC,UAAU,uDACV,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQA,GAAM,MAAQ,EAAG,EACtD,GAXKC,CAYP,CACD,EACH,GACF,EACF,EAIJ,IAAOV,EAAQM",
6
+ "names": ["board_exports", "__export", "board_default", "__toCommonJS", "import_jsx_runtime", "import_utils", "import_container", "import_link", "Board", "data", "sizeClass", "item", "index", "Link"]
7
7
  }
@@ -23,7 +23,7 @@ export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js';
23
23
  export { Alert, AlertTitle, AlertDescription } from './alert.js';
24
24
  export { default as Picture } from './picture.js';
25
25
  export { default as Theme } from './theme.js';
26
- export { default as Board } from './board.js';
26
+ export { default as Board, type BoardProps } from './board.js';
27
27
  export { default as LoadingDots } from './loadingDots.js';
28
28
  export { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js';
29
29
  export { default as BrandStrip } from './brand-strip.js';
@@ -1,2 +1,2 @@
1
- "use strict";var j=Object.create;var D=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var J=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var Q=(t,n)=>{for(var s in n)D(t,s,{get:n[s],enumerable:!0})},P=(t,n,s,w)=>{if(n&&typeof n=="object"||typeof n=="function")for(let m of q(n))!K.call(t,m)&&m!==s&&D(t,m,{get:()=>n[m],enumerable:!(w=z(n,m))||w.enumerable});return t};var p=(t,n,s)=>(s=t!=null?j(J(t)):{},P(n||!t||!t.__esModule?D(s,"default",{value:t,enumerable:!0}):s,t)),U=t=>P(D({},"__esModule",{value:!0}),t);var V={};Q(V,{Alert:()=>f.Alert,AlertDescription:()=>f.AlertDescription,AlertTitle:()=>f.AlertTitle,Avatar:()=>i.Avatar,AvatarFallback:()=>i.AvatarFallback,AvatarImage:()=>i.AvatarImage,Badge:()=>T.default,Board:()=>H.default,BrandStrip:()=>F.default,Button:()=>y.default,Card:()=>a.Card,CardContent:()=>a.CardContent,CardDescription:()=>a.CardDescription,CardFooter:()=>a.CardFooter,CardHeader:()=>a.CardHeader,CardTitle:()=>a.CardTitle,Carousel:()=>u.Carousel,CarouselContent:()=>u.CarouselContent,CarouselItem:()=>u.CarouselItem,CarouselNext:()=>u.CarouselNext,CarouselPrevious:()=>u.CarouselPrevious,Checkbox:()=>M.default,Color:()=>v.Color,Container:()=>G.Container,Countdown:()=>k.default,Dialog:()=>r.Dialog,DialogClose:()=>r.DialogClose,DialogContent:()=>r.DialogContent,DialogDescription:()=>r.DialogDescription,DialogFooter:()=>r.DialogFooter,DialogHeader:()=>r.DialogHeader,DialogOverlay:()=>r.DialogOverlay,DialogPortal:()=>r.DialogPortal,DialogTitle:()=>r.DialogTitle,DialogTrigger:()=>r.DialogTrigger,Drawer:()=>e.Drawer,DrawerClose:()=>e.DrawerClose,DrawerContent:()=>e.DrawerContent,DrawerDescription:()=>e.DrawerDescription,DrawerFooter:()=>e.DrawerFooter,DrawerHeader:()=>e.DrawerHeader,DrawerOverlay:()=>e.DrawerOverlay,DrawerPortal:()=>e.DrawerPortal,DrawerTitle:()=>e.DrawerTitle,DrawerTrigger:()=>e.DrawerTrigger,DropdownMenu:()=>o.DropdownMenu,DropdownMenuCheckboxItem:()=>o.DropdownMenuCheckboxItem,DropdownMenuContent:()=>o.DropdownMenuContent,DropdownMenuGroup:()=>o.DropdownMenuGroup,DropdownMenuItem:()=>o.DropdownMenuItem,DropdownMenuLabel:()=>o.DropdownMenuLabel,DropdownMenuPortal:()=>o.DropdownMenuPortal,DropdownMenuRadioGroup:()=>o.DropdownMenuRadioGroup,DropdownMenuRadioItem:()=>o.DropdownMenuRadioItem,DropdownMenuSeparator:()=>o.DropdownMenuSeparator,DropdownMenuShortcut:()=>o.DropdownMenuShortcut,DropdownMenuSub:()=>o.DropdownMenuSub,DropdownMenuSubContent:()=>o.DropdownMenuSubContent,DropdownMenuSubTrigger:()=>o.DropdownMenuSubTrigger,DropdownMenuTrigger:()=>o.DropdownMenuTrigger,ExposureDetector:()=>h.ExposureDetector,Grid:()=>g.Grid,GridItem:()=>g.GridItem,Heading:()=>c.Heading,Input:()=>x.Input,InputNumber:()=>A.default,InputSlot:()=>x.InputSlot,Link:()=>S.default,LoadingDots:()=>L.default,OtpInput:()=>O.default,Picture:()=>R.default,Popover:()=>l.Popover,PopoverContent:()=>l.PopoverContent,PopoverTrigger:()=>l.PopoverTrigger,Progress:()=>N.default,RadioGroup:()=>C.RadioGroup,RadioGroupItem:()=>C.RadioGroupItem,Skeleton:()=>I.default,Tabs:()=>d.Tabs,TabsContent:()=>d.TabsContent,TabsList:()=>d.TabsList,TabsTrigger:()=>d.TabsTrigger,Text:()=>b.Text,Theme:()=>B.default,sizeMap:()=>E.sizeMap});module.exports=U(V);var y=p(require("./button.js")),T=p(require("./badge.js")),x=require("./input.js"),M=p(require("./checkbox.js")),I=p(require("./skeleton.js")),r=require("./dialog.js"),l=require("./popover.js"),C=require("./radio.js"),b=require("./text.js"),g=require("./grid.js"),c=require("./heading.js"),G=require("./container.js"),v=require("./color.js"),e=require("./drawer.js"),S=p(require("./link.js")),i=require("./avatar.js"),A=p(require("./input-number.js")),o=require("./drop-down.js"),a=require("./card.js"),k=p(require("./Countdown.js")),u=require("./carousel.js"),d=require("./tabs.js"),f=require("./alert.js"),R=p(require("./picture.js")),B=p(require("./theme.js")),H=p(require("./board.js")),L=p(require("./loadingDots.js")),h=require("./ExposureDetector.js"),F=p(require("./brand-strip.js")),N=p(require("./progress.js")),O=p(require("./otp-input.js")),E=require("./button.js");
1
+ "use strict";var j=Object.create;var D=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var J=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var Q=(t,n)=>{for(var u in n)D(t,u,{get:n[u],enumerable:!0})},P=(t,n,u,w)=>{if(n&&typeof n=="object"||typeof n=="function")for(let m of q(n))!K.call(t,m)&&m!==u&&D(t,m,{get:()=>n[m],enumerable:!(w=z(n,m))||w.enumerable});return t};var p=(t,n,u)=>(u=t!=null?j(J(t)):{},P(n||!t||!t.__esModule?D(u,"default",{value:t,enumerable:!0}):u,t)),U=t=>P(D({},"__esModule",{value:!0}),t);var V={};Q(V,{Alert:()=>f.Alert,AlertDescription:()=>f.AlertDescription,AlertTitle:()=>f.AlertTitle,Avatar:()=>i.Avatar,AvatarFallback:()=>i.AvatarFallback,AvatarImage:()=>i.AvatarImage,Badge:()=>T.default,Board:()=>H.default,BrandStrip:()=>F.default,Button:()=>y.default,Card:()=>a.Card,CardContent:()=>a.CardContent,CardDescription:()=>a.CardDescription,CardFooter:()=>a.CardFooter,CardHeader:()=>a.CardHeader,CardTitle:()=>a.CardTitle,Carousel:()=>s.Carousel,CarouselContent:()=>s.CarouselContent,CarouselItem:()=>s.CarouselItem,CarouselNext:()=>s.CarouselNext,CarouselPrevious:()=>s.CarouselPrevious,Checkbox:()=>M.default,Color:()=>v.Color,Container:()=>G.Container,Countdown:()=>k.default,Dialog:()=>r.Dialog,DialogClose:()=>r.DialogClose,DialogContent:()=>r.DialogContent,DialogDescription:()=>r.DialogDescription,DialogFooter:()=>r.DialogFooter,DialogHeader:()=>r.DialogHeader,DialogOverlay:()=>r.DialogOverlay,DialogPortal:()=>r.DialogPortal,DialogTitle:()=>r.DialogTitle,DialogTrigger:()=>r.DialogTrigger,Drawer:()=>e.Drawer,DrawerClose:()=>e.DrawerClose,DrawerContent:()=>e.DrawerContent,DrawerDescription:()=>e.DrawerDescription,DrawerFooter:()=>e.DrawerFooter,DrawerHeader:()=>e.DrawerHeader,DrawerOverlay:()=>e.DrawerOverlay,DrawerPortal:()=>e.DrawerPortal,DrawerTitle:()=>e.DrawerTitle,DrawerTrigger:()=>e.DrawerTrigger,DropdownMenu:()=>o.DropdownMenu,DropdownMenuCheckboxItem:()=>o.DropdownMenuCheckboxItem,DropdownMenuContent:()=>o.DropdownMenuContent,DropdownMenuGroup:()=>o.DropdownMenuGroup,DropdownMenuItem:()=>o.DropdownMenuItem,DropdownMenuLabel:()=>o.DropdownMenuLabel,DropdownMenuPortal:()=>o.DropdownMenuPortal,DropdownMenuRadioGroup:()=>o.DropdownMenuRadioGroup,DropdownMenuRadioItem:()=>o.DropdownMenuRadioItem,DropdownMenuSeparator:()=>o.DropdownMenuSeparator,DropdownMenuShortcut:()=>o.DropdownMenuShortcut,DropdownMenuSub:()=>o.DropdownMenuSub,DropdownMenuSubContent:()=>o.DropdownMenuSubContent,DropdownMenuSubTrigger:()=>o.DropdownMenuSubTrigger,DropdownMenuTrigger:()=>o.DropdownMenuTrigger,ExposureDetector:()=>h.ExposureDetector,Grid:()=>g.Grid,GridItem:()=>g.GridItem,Heading:()=>c.Heading,Input:()=>x.Input,InputNumber:()=>A.default,InputSlot:()=>x.InputSlot,Link:()=>S.default,LoadingDots:()=>L.default,OtpInput:()=>O.default,Picture:()=>B.default,Popover:()=>l.Popover,PopoverContent:()=>l.PopoverContent,PopoverTrigger:()=>l.PopoverTrigger,Progress:()=>N.default,RadioGroup:()=>C.RadioGroup,RadioGroupItem:()=>C.RadioGroupItem,Skeleton:()=>I.default,Tabs:()=>d.Tabs,TabsContent:()=>d.TabsContent,TabsList:()=>d.TabsList,TabsTrigger:()=>d.TabsTrigger,Text:()=>b.Text,Theme:()=>R.default,sizeMap:()=>E.sizeMap});module.exports=U(V);var y=p(require("./button.js")),T=p(require("./badge.js")),x=require("./input.js"),M=p(require("./checkbox.js")),I=p(require("./skeleton.js")),r=require("./dialog.js"),l=require("./popover.js"),C=require("./radio.js"),b=require("./text.js"),g=require("./grid.js"),c=require("./heading.js"),G=require("./container.js"),v=require("./color.js"),e=require("./drawer.js"),S=p(require("./link.js")),i=require("./avatar.js"),A=p(require("./input-number.js")),o=require("./drop-down.js"),a=require("./card.js"),k=p(require("./Countdown.js")),s=require("./carousel.js"),d=require("./tabs.js"),f=require("./alert.js"),B=p(require("./picture.js")),R=p(require("./theme.js")),H=p(require("./board.js")),L=p(require("./loadingDots.js")),h=require("./ExposureDetector.js"),F=p(require("./brand-strip.js")),N=p(require("./progress.js")),O=p(require("./otp-input.js")),E=require("./button.js");
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/index.ts"],
4
- "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './grid.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport { default as Countdown, type CountdownProps } from './Countdown.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\nexport { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js'\nexport { default as BrandStrip } from './brand-strip.js'\nexport { default as Progress, type ProgressProps, type ProgressClassNames } from './progress.js'\nexport { default as OtpInput, type OtpInputProps } from './otp-input.js'\n\n// \u516C\uAC1C\u5BFC\u51FA button \u5185\u90E8\u5DE5\u5177\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u4F7F\u7528\uFF09\nexport { sizeMap } from './button.js'\nexport type { ButtonProps } from './button.js'\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6lFAAAE,EAAAF,GAAA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAiC,sBAEjCC,EAAoC,4BAEpCC,EAAoC,4BACpCC,EAWO,uBACPC,EAAwD,wBACxDC,EAA2F,sBAC3FC,EAAqC,qBACrCC,EAAmE,qBACnEC,EAA2C,wBAC3CC,EAA+C,0BAC/CC,EAAuC,sBACvCC,EAWO,uBACPC,EAAgD,wBAChDC,EAAoD,uBACpDC,EAA8D,gCAC9DC,EAgBO,0BACPC,EAAsF,qBACtFC,EAA0D,6BAC1DC,EAOO,yBACPC,EAAyD,qBACzDC,EAAoD,sBACpDC,EAAmC,2BACnCC,EAAiC,yBACjCC,EAAiC,yBACjCC,EAAuC,+BACvCC,EAA6D,iCAC7DC,EAAsC,+BACtCC,EAAiF,4BACjFC,EAAwD,6BAGxD9B,EAAwB",
4
+ "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './grid.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport { default as Countdown, type CountdownProps } from './Countdown.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board, type BoardProps } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\nexport { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js'\nexport { default as BrandStrip } from './brand-strip.js'\nexport { default as Progress, type ProgressProps, type ProgressClassNames } from './progress.js'\nexport { default as OtpInput, type OtpInputProps } from './otp-input.js'\n\n// \u516C\uAC1C\u5BFC\u51FA button \u5185\u90E8\u5DE5\u5177\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u4F7F\u7528\uFF09\nexport { sizeMap } from './button.js'\nexport type { ButtonProps } from './button.js'\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6lFAAAE,EAAAF,GAAA,IAAAG,EAAkC,0BAClCC,EAAiC,yBACjCC,EAAiC,sBAEjCC,EAAoC,4BAEpCC,EAAoC,4BACpCC,EAWO,uBACPC,EAAwD,wBACxDC,EAA2F,sBAC3FC,EAAqC,qBACrCC,EAAmE,qBACnEC,EAA2C,wBAC3CC,EAA+C,0BAC/CC,EAAuC,sBACvCC,EAWO,uBACPC,EAAgD,wBAChDC,EAAoD,uBACpDC,EAA8D,gCAC9DC,EAgBO,0BACPC,EAAsF,qBACtFC,EAA0D,6BAC1DC,EAOO,yBACPC,EAAyD,qBACzDC,EAAoD,sBACpDC,EAAmC,2BACnCC,EAAiC,yBACjCC,EAAkD,yBAClDC,EAAuC,+BACvCC,EAA6D,iCAC7DC,EAAsC,+BACtCC,EAAiF,4BACjFC,EAAwD,6BAGxD9B,EAAwB",
6
6
  "names": ["components_exports", "__export", "__toCommonJS", "import_button", "import_badge", "import_input", "import_checkbox", "import_skeleton", "import_dialog", "import_popover", "import_radio", "import_text", "import_grid", "import_heading", "import_container", "import_color", "import_drawer", "import_link", "import_avatar", "import_input_number", "import_drop_down", "import_card", "import_Countdown", "import_carousel", "import_tabs", "import_alert", "import_picture", "import_theme", "import_board", "import_loadingDots", "import_ExposureDetector", "import_brand_strip", "import_progress", "import_otp_input"]
7
7
  }
@@ -10,7 +10,6 @@ export interface StylesProps {
10
10
  uid?: string;
11
11
  disabled?: boolean;
12
12
  containerClassName?: string;
13
- idx?: string;
14
13
  }
15
14
  type LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps;
16
15
  type StaticComponentProperties<T> = Omit<T, keyof React.ComponentType<any> | 'displayName' | 'prototype'>;
@@ -1,2 +1,2 @@
1
- "use strict";var h=Object.create;var m=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})},C=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of $(e))!L.call(t,o)&&o!==n&&m(t,o,{get:()=>e[o],enumerable:!(r=x(e,o))||r.enumerable});return t};var d=(t,e,n)=>(n=t!=null?h(j(t)):{},C(e||!t||!t.__esModule?m(n,"default",{value:t,enumerable:!0}):n,t)),_=t=>C(m({},"__esModule",{value:!0}),t);var U={};E(U,{getStylesProps:()=>T,useStyles:()=>N,withLayout:()=>D});module.exports=_(U);var s=require("react/jsx-runtime"),i=d(require("react")),S=require("./simpleHash.js"),g=d(require("./getKeyPropsString.js")),y=require("../components/grid.js"),b=require("../components/container.js"),w=d(require("./ErrorBoundary.js"));const B={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},O={12:"tablet:col-start-1 tablet:col-end-13",10:"tablet:col-start-2 tablet:col-end-12",8:"tablet:col-start-3 tablet:col-end-11",6:"tablet:col-start-4 tablet:col-end-10",4:"tablet:col-start-5 tablet:col-end-9"},R=t=>{const e=(0,g.default)(t);return`style_${(0,S.simpleHash)(e)}`},T=t=>{const{style:e,uid:n,disabled:r,containerClassName:o,idx:a}=t;return{style:e,uid:n,disabled:r,containerClassName:o,idx:a}},G=({style:t,uid:e=R({}),disabled:n=!1})=>!t||n?null:(0,s.jsx)("style",{suppressHydrationWarning:!0,"data-style-id":e,dangerouslySetInnerHTML:{__html:`.block-${e} { ${t} }`}}),N=(t,e)=>{const n=(0,i.useMemo)(()=>t?.uid||R({...t,...e??{}}),[e,t]),r=(0,i.useMemo)(()=>(0,s.jsx)(G,{...t,uid:n}),[t,n]);return{className:`block-${n} `,StyleComponent:r,uid:n,idx:t?.idx}},A=t=>{const{desktopSpan:e,mobileSpan:n}=t||{},r=n?B[n]:"",o=e?O[e]:"";return`${r} ${o}`.trim()},F=t=>t?typeof t=="string"?t:typeof t=="object"&&Object.entries(t).length<=0?"":Object.entries(t).map(([e,n])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n}`).join("; ")+";":"",K=(t,e)=>[t,e].map(F).filter(n=>!!n).map(n=>n.trim().endsWith(";")?n:`${n};`).join(" ");function v(t,e){const n=i.default.forwardRef((r,o)=>{const{container:a,containerClassName:c,className:l,...p}=r;if(!a||Reflect.ownKeys(a).length===0)return(0,s.jsx)(t,{...p,className:l,ref:o});const u=[e,c,l].filter(Boolean).join(" ").trim();return(0,s.jsx)(b.Container,{className:u,children:(0,s.jsx)(y.Grid,{className:"container_grid",children:(0,s.jsx)(y.GridItem,{className:A(a),children:(0,s.jsx)(t,{...p,ref:o})})})})});return n.displayName=`WithContainerLayout(${t.displayName||t.name||"Component"})`,n}function H(t,e){const n=i.default.forwardRef((r,o)=>{const a=T(r),c=K(e?.style,a.style),l={...e,...a,...c&&{style:c}},{className:p,StyleComponent:u,idx:P}=N(l,r.data),{style:Z,uid:q,disabled:z,idx:J,className:I,...k}=r;return(0,s.jsxs)(s.Fragment,{children:[u,(0,s.jsx)(t,{...k,...P?{id:P}:{},className:[p,I].filter(Boolean).join(" ").trim(),ref:o})]})});return n.displayName=`WithStyleInjection(${t.displayName||t.name||"Component"})`,n}function M(t){const e=i.default.forwardRef((n,r)=>(0,s.jsx)(w.default,{children:(0,s.jsx)(t,{...n,ref:r})}));return e.displayName=`WithErrorBoundary(${t.displayName||t.name||"Component"})`,e}const f=new WeakMap;function D(t,e){if(f.has(t))return t;const n=M(H(v(t,e?.containerClassName),e));n.displayName=`WithLayout(${t.displayName||t.name||"Component"})`,f.set(t,!0);const r=n;return Object.getOwnPropertyNames(t).forEach(o=>{!(o in r)&&o!=="arguments"&&o!=="caller"&&o!=="length"&&o!=="name"&&(r[o]=t[o])}),r}
1
+ "use strict";var h=Object.create;var m=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})},C=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of x(e))!L.call(t,o)&&o!==n&&m(t,o,{get:()=>e[o],enumerable:!(r=$(e,o))||r.enumerable});return t};var d=(t,e,n)=>(n=t!=null?h(j(t)):{},C(e||!t||!t.__esModule?m(n,"default",{value:t,enumerable:!0}):n,t)),B=t=>C(m({},"__esModule",{value:!0}),t);var U={};E(U,{getStylesProps:()=>T,useStyles:()=>N,withLayout:()=>D});module.exports=B(U);var s=require("react/jsx-runtime"),a=d(require("react")),S=require("./simpleHash.js"),g=d(require("./getKeyPropsString.js")),u=require("../components/grid.js"),b=require("../components/container.js"),w=d(require("./ErrorBoundary.js"));const _={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},O={12:"tablet:col-start-1 tablet:col-end-13",10:"tablet:col-start-2 tablet:col-end-12",8:"tablet:col-start-3 tablet:col-end-11",6:"tablet:col-start-4 tablet:col-end-10",4:"tablet:col-start-5 tablet:col-end-9"},f=t=>{const e=(0,g.default)(t);return`style_${(0,S.simpleHash)(e)}`},T=t=>{const{style:e,uid:n,disabled:r,containerClassName:o}=t;return{style:e,uid:n,disabled:r,containerClassName:o}},G=({style:t,uid:e=f({}),disabled:n=!1})=>!t||n?null:(0,s.jsx)("style",{suppressHydrationWarning:!0,"data-style-id":e,dangerouslySetInnerHTML:{__html:`.block-${e} { ${t} }`}}),N=(t,e)=>{const n=(0,a.useMemo)(()=>t?.uid||f({...t,...e??{}}),[e,t]),r=(0,a.useMemo)(()=>(0,s.jsx)(G,{...t,uid:n}),[t,n]);return{className:`block-${n} `,StyleComponent:r,uid:n,idx:e?.idx!=null?String(e.idx):void 0}},A=t=>{const{desktopSpan:e,mobileSpan:n}=t||{},r=n?_[n]:"",o=e?O[e]:"";return`${r} ${o}`.trim()},F=t=>t?typeof t=="string"?t:typeof t=="object"&&Object.entries(t).length<=0?"":Object.entries(t).map(([e,n])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n}`).join("; ")+";":"",K=(t,e)=>[t,e].map(F).filter(n=>!!n).map(n=>n.trim().endsWith(";")?n:`${n};`).join(" ");function v(t,e){const n=a.default.forwardRef((r,o)=>{const{container:i,containerClassName:c,className:l,...p}=r;if(!i||Reflect.ownKeys(i).length===0)return(0,s.jsx)(t,{...p,className:l,ref:o});const y=[e,c,l].filter(Boolean).join(" ").trim();return(0,s.jsx)(b.Container,{className:y,children:(0,s.jsx)(u.Grid,{className:"container_grid",children:(0,s.jsx)(u.GridItem,{className:A(i),children:(0,s.jsx)(t,{...p,ref:o})})})})});return n.displayName=`WithContainerLayout(${t.displayName||t.name||"Component"})`,n}function H(t,e){const n=a.default.forwardRef((r,o)=>{const i=T(r),c=K(e?.style,i.style),l={...e,...i,...c&&{style:c}},{className:p,StyleComponent:y,idx:P}=N(l,r.data),{style:Z,uid:q,disabled:z,className:I,...k}=r;return(0,s.jsxs)(s.Fragment,{children:[y,(0,s.jsx)(t,{...P?{id:P}:{},...k,className:[p,I].filter(Boolean).join(" ").trim(),ref:o})]})});return n.displayName=`WithStyleInjection(${t.displayName||t.name||"Component"})`,n}function M(t){const e=a.default.forwardRef((n,r)=>(0,s.jsx)(w.default,{children:(0,s.jsx)(t,{...n,ref:r})}));return e.displayName=`WithErrorBoundary(${t.displayName||t.name||"Component"})`,e}const R=new WeakMap;function D(t,e){if(R.has(t))return t;const n=M(H(v(t,e?.containerClassName),e));n.displayName=`WithLayout(${t.displayName||t.name||"Component"})`,R.set(t,!0);const r=n;return Object.getOwnPropertyNames(t).forEach(o=>{!(o in r)&&o!=="arguments"&&o!=="caller"&&o!=="length"&&o!=="name"&&(r[o]=t[o])}),r}
2
2
  //# sourceMappingURL=Styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/shared/Styles.tsx"],
4
- "sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/grid.js'\nimport { Container } from '../components/container.js'\nimport ErrorBoundary from './ErrorBoundary.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\n// \u9884\u5B9A\u4E49\u5E26 tablet \u524D\u7F00\u7684\u7C7B\u540D\uFF0C\u786E\u4FDD Tailwind \u53EF\u4EE5\u8BC6\u522B\nconst colContentClassesTablet: Record<number, string> = {\n 12: 'tablet:col-start-1 tablet:col-end-13',\n 10: 'tablet:col-start-2 tablet:col-end-12',\n 8: 'tablet:col-start-3 tablet:col-end-11',\n 6: 'tablet:col-start-4 tablet:col-end-10',\n 4: 'tablet:col-start-5 tablet:col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n desktopSpan: number\n mobileSpan: number\n }\n}\n\nexport interface StylesProps {\n style?: string | React.CSSProperties\n uid?: string\n disabled?: boolean\n containerClassName?: string\n idx?: string\n}\n\ntype LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps\n\ntype StaticComponentProperties<T> = Omit<T, keyof React.ComponentType<any> | 'displayName' | 'prototype'>\n\nconst generateUID = (props: Record<string, unknown>) => {\n const keyString = getKeyPropsString(props)\n return `style_${simpleHash(keyString)}`\n}\n\nexport const getStylesProps = <T extends StylesProps>(props: T): StylesProps => {\n const { style, uid, disabled, containerClassName, idx } = props\n return { style, uid, disabled, containerClassName, idx }\n}\n\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID({}), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return (\n <style\n suppressHydrationWarning\n data-style-id={uid}\n dangerouslySetInnerHTML={{ __html: `.block-${uid} { ${style} }` }}\n />\n )\n}\n\nexport const useStyles = (styleProps: Partial<StylesProps>, data?: Record<string, unknown>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID({ ...styleProps, ...(data ?? {}) }), [data, styleProps])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n idx: styleProps?.idx,\n } as const\n}\n\nconst getGridItemClassName = (container?: ContainerProps['container']) => {\n const { desktopSpan, mobileSpan } = container || {}\n const mobileClasses = mobileSpan ? colContentClasses[mobileSpan] : ''\n const desktopClasses = desktopSpan ? colContentClassesTablet[desktopSpan] : ''\n return `${mobileClasses} ${desktopClasses}`.trim()\n}\n\nconst styleToString = (style?: string | React.CSSProperties): string => {\n if (!style) return ''\n if (typeof style === 'string') return style\n if (typeof style === 'object' && Object.entries(style).length <= 0) return ''\n return (\n Object.entries(style)\n .map(([key, value]) => {\n const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase()\n return `${cssKey}: ${value}`\n })\n .join('; ') + ';'\n )\n}\n\nconst mergeStyles = (a?: string | React.CSSProperties, b?: string | React.CSSProperties): string =>\n [a, b]\n .map(styleToString)\n .filter((s): s is string => Boolean(s))\n .map(s => (s.trim().endsWith(';') ? s : `${s};`))\n .join(' ')\n\ntype InternalProps = StylesProps &\n ContainerProps & { className?: string; data?: Record<string, unknown> } & Record<string, unknown>\n\nfunction withContainerLayout(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultContainerClassName?: string\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n // eslint-disable-next-line no-unused-vars\n const { container, containerClassName, className, ...componentProps } = props\n\n if (!container || Reflect.ownKeys(container).length === 0) {\n return <WrappedComponent {...componentProps} className={className as string | undefined} ref={ref} />\n }\n\n const mergedContainerClassName = [defaultContainerClassName, containerClassName, className]\n .filter(Boolean)\n .join(' ')\n .trim()\n\n return (\n <Container className={mergedContainerClassName}>\n <Grid className=\"container_grid\">\n <GridItem className={getGridItemClassName(container as ContainerProps['container'])}>\n <WrappedComponent {...componentProps} ref={ref} />\n </GridItem>\n </Grid>\n </Container>\n )\n })\n\n Wrapped.displayName = `WithContainerLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withStyleInjection(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultStyleProps?: Partial<StylesProps>\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n const propsStyleProps = getStylesProps(props)\n const mergedStyle = mergeStyles(defaultStyleProps?.style, propsStyleProps.style)\n\n const finalStyleProps: StylesProps = {\n ...defaultStyleProps,\n ...propsStyleProps,\n ...(mergedStyle && { style: mergedStyle }),\n }\n\n const { className, StyleComponent, idx } = useStyles(\n finalStyleProps,\n props.data as Record<string, unknown> | undefined\n )\n\n // eslint-disable-next-line no-unused-vars\n const { style: _s, uid: _u, disabled: _d, idx: _idx, className: ownClassName, ...rest } = props\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent\n {...rest}\n {...(idx ? { id: idx } : {})}\n className={[className, ownClassName].filter(Boolean).join(' ').trim()}\n ref={ref}\n />\n </>\n )\n })\n\n Wrapped.displayName = `WithStyleInjection(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withErrorBoundary(WrappedComponent: React.ComponentType<InternalProps>): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => (\n <ErrorBoundary>\n <WrappedComponent {...props} ref={ref} />\n </ErrorBoundary>\n ))\n\n Wrapped.displayName = `WithErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nconst wrappedComponents = new WeakMap<React.ComponentType<never>, true>()\n\nexport function withLayout<T extends React.ComponentType<any>>(\n WrappedComponent: T,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n): React.ForwardRefExoticComponent<LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>> &\n StaticComponentProperties<T> {\n if (wrappedComponents.has(WrappedComponent as React.ComponentType<never>)) {\n return WrappedComponent as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n }\n\n const composed = withErrorBoundary(\n withStyleInjection(\n withContainerLayout(\n WrappedComponent as unknown as React.ComponentType<InternalProps>,\n defaultLayoutProps?.containerClassName\n ),\n defaultLayoutProps\n )\n )\n\n composed.displayName = `WithLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n\n wrappedComponents.set(WrappedComponent as React.ComponentType<never>, true)\n\n const result = composed as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n\n Object.getOwnPropertyNames(WrappedComponent).forEach(key => {\n if (!(key in result) && key !== 'arguments' && key !== 'caller' && key !== 'length' && key !== 'name') {\n ;(result as any)[key] = (WrappedComponent as any)[key]\n }\n })\n\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EAAiB,aAAeA,EAAiB,MAAQ,WAAW,IACxGE,CACT,CAEA,MAAMmB,EAAoB,IAAI,QAEvB,SAAS3D,EACdsC,EACAsB,EAE6B,CAC7B,GAAID,EAAkB,IAAIrB,CAA8C,EACtE,OAAOA,EAMT,MAAMuB,EAAWJ,EACfX,EACET,EACEC,EACAsB,GAAoB,kBACtB,EACAA,CACF,CACF,EAEAC,EAAS,YAAc,cAAcvB,EAAiB,aAAeA,EAAiB,MAAQ,WAAW,IAEzGqB,EAAkB,IAAIrB,EAAgD,EAAI,EAE1E,MAAMwB,EAASD,EAKf,cAAO,oBAAoBvB,CAAgB,EAAE,QAAQP,GAAO,CACtD,EAAEA,KAAO+B,IAAW/B,IAAQ,aAAeA,IAAQ,UAAYA,IAAQ,UAAYA,IAAQ,SAC3F+B,EAAe/B,CAAG,EAAKO,EAAyBP,CAAG,EAEzD,CAAC,EAEM+B,CACT",
6
- "names": ["Styles_exports", "__export", "getStylesProps", "useStyles", "withLayout", "__toCommonJS", "import_jsx_runtime", "import_react", "import_simpleHash", "import_getKeyPropsString", "import_grid", "import_container", "import_ErrorBoundary", "colContentClasses", "colContentClassesTablet", "generateUID", "props", "keyString", "getKeyPropsString", "style", "uid", "disabled", "containerClassName", "idx", "Styles", "styleProps", "data", "StyleComponent", "getGridItemClassName", "container", "desktopSpan", "mobileSpan", "mobileClasses", "desktopClasses", "styleToString", "key", "value", "mergeStyles", "a", "b", "s", "withContainerLayout", "WrappedComponent", "defaultContainerClassName", "Wrapped", "React", "ref", "className", "componentProps", "mergedContainerClassName", "withStyleInjection", "defaultStyleProps", "propsStyleProps", "mergedStyle", "finalStyleProps", "_s", "_u", "_d", "_idx", "ownClassName", "rest", "withErrorBoundary", "ErrorBoundary", "wrappedComponents", "defaultLayoutProps", "composed", "result"]
4
+ "sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/grid.js'\nimport { Container } from '../components/container.js'\nimport ErrorBoundary from './ErrorBoundary.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\n// \u9884\u5B9A\u4E49\u5E26 tablet \u524D\u7F00\u7684\u7C7B\u540D\uFF0C\u786E\u4FDD Tailwind \u53EF\u4EE5\u8BC6\u522B\nconst colContentClassesTablet: Record<number, string> = {\n 12: 'tablet:col-start-1 tablet:col-end-13',\n 10: 'tablet:col-start-2 tablet:col-end-12',\n 8: 'tablet:col-start-3 tablet:col-end-11',\n 6: 'tablet:col-start-4 tablet:col-end-10',\n 4: 'tablet:col-start-5 tablet:col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n desktopSpan: number\n mobileSpan: number\n }\n}\n\nexport interface StylesProps {\n style?: string | React.CSSProperties\n uid?: string\n disabled?: boolean\n containerClassName?: string\n}\n\ntype LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps\n\ntype StaticComponentProperties<T> = Omit<T, keyof React.ComponentType<any> | 'displayName' | 'prototype'>\n\nconst generateUID = (props: Record<string, unknown>) => {\n const keyString = getKeyPropsString(props)\n return `style_${simpleHash(keyString)}`\n}\n\nexport const getStylesProps = <T extends StylesProps>(props: T): StylesProps => {\n const { style, uid, disabled, containerClassName } = props\n return { style, uid, disabled, containerClassName }\n}\n\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID({}), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return (\n <style\n suppressHydrationWarning\n data-style-id={uid}\n dangerouslySetInnerHTML={{ __html: `.block-${uid} { ${style} }` }}\n />\n )\n}\n\nexport const useStyles = (styleProps: Partial<StylesProps>, data?: Record<string, unknown>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID({ ...styleProps, ...(data ?? {}) }), [data, styleProps])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n idx: data?.idx != null ? String(data.idx) : undefined,\n } as const\n}\n\nconst getGridItemClassName = (container?: ContainerProps['container']) => {\n const { desktopSpan, mobileSpan } = container || {}\n const mobileClasses = mobileSpan ? colContentClasses[mobileSpan] : ''\n const desktopClasses = desktopSpan ? colContentClassesTablet[desktopSpan] : ''\n return `${mobileClasses} ${desktopClasses}`.trim()\n}\n\nconst styleToString = (style?: string | React.CSSProperties): string => {\n if (!style) return ''\n if (typeof style === 'string') return style\n if (typeof style === 'object' && Object.entries(style).length <= 0) return ''\n return (\n Object.entries(style)\n .map(([key, value]) => {\n const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase()\n return `${cssKey}: ${value}`\n })\n .join('; ') + ';'\n )\n}\n\nconst mergeStyles = (a?: string | React.CSSProperties, b?: string | React.CSSProperties): string =>\n [a, b]\n .map(styleToString)\n .filter((s): s is string => Boolean(s))\n .map(s => (s.trim().endsWith(';') ? s : `${s};`))\n .join(' ')\n\ntype InternalProps = StylesProps &\n ContainerProps & { className?: string; data?: Record<string, unknown> } & Record<string, unknown>\n\nfunction withContainerLayout(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultContainerClassName?: string\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n // eslint-disable-next-line no-unused-vars\n const { container, containerClassName, className, ...componentProps } = props\n\n if (!container || Reflect.ownKeys(container).length === 0) {\n return <WrappedComponent {...componentProps} className={className as string | undefined} ref={ref} />\n }\n\n const mergedContainerClassName = [defaultContainerClassName, containerClassName, className]\n .filter(Boolean)\n .join(' ')\n .trim()\n\n return (\n <Container className={mergedContainerClassName}>\n <Grid className=\"container_grid\">\n <GridItem className={getGridItemClassName(container as ContainerProps['container'])}>\n <WrappedComponent {...componentProps} ref={ref} />\n </GridItem>\n </Grid>\n </Container>\n )\n })\n\n Wrapped.displayName = `WithContainerLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withStyleInjection(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultStyleProps?: Partial<StylesProps>\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n const propsStyleProps = getStylesProps(props)\n const mergedStyle = mergeStyles(defaultStyleProps?.style, propsStyleProps.style)\n\n const finalStyleProps: StylesProps = {\n ...defaultStyleProps,\n ...propsStyleProps,\n ...(mergedStyle && { style: mergedStyle }),\n }\n\n const { className, StyleComponent, idx } = useStyles(\n finalStyleProps,\n props.data as Record<string, unknown> | undefined\n )\n\n // eslint-disable-next-line no-unused-vars\n const { style: _s, uid: _u, disabled: _d, className: ownClassName, ...rest } = props\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent\n {...(idx ? { id: idx } : {})}\n {...rest}\n className={[className, ownClassName].filter(Boolean).join(' ').trim()}\n ref={ref}\n />\n </>\n )\n })\n\n Wrapped.displayName = `WithStyleInjection(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withErrorBoundary(WrappedComponent: React.ComponentType<InternalProps>): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => (\n <ErrorBoundary>\n <WrappedComponent {...props} ref={ref} />\n </ErrorBoundary>\n ))\n\n Wrapped.displayName = `WithErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nconst wrappedComponents = new WeakMap<React.ComponentType<never>, true>()\n\nexport function withLayout<T extends React.ComponentType<any>>(\n WrappedComponent: T,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n): React.ForwardRefExoticComponent<LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>> &\n StaticComponentProperties<T> {\n if (wrappedComponents.has(WrappedComponent as React.ComponentType<never>)) {\n return WrappedComponent as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n }\n\n const composed = withErrorBoundary(\n withStyleInjection(\n withContainerLayout(\n WrappedComponent as unknown as React.ComponentType<InternalProps>,\n defaultLayoutProps?.containerClassName\n ),\n defaultLayoutProps\n )\n )\n\n composed.displayName = `WithLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n\n wrappedComponents.set(WrappedComponent as React.ComponentType<never>, true)\n\n const result = composed as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n\n Object.getOwnPropertyNames(WrappedComponent).forEach(key => {\n if (!(key in result) && key !== 'arguments' && key !== 'caller' && key !== 'length' && key !== 'name') {\n ;(result as any)[key] = (WrappedComponent as any)[key]\n }\n })\n\n return result\n}\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,cAAAC,EAAA,eAAAC,IAAA,eAAAC,EAAAL,GA0DI,IAAAM,EAAA,6BA1DJC,EAA+B,oBAC/BC,EAA2B,2BAC3BC,EAA8B,qCAC9BC,EAA+B,iCAC/BC,EAA0B,sCAC1BC,EAA0B,iCAE1B,MAAMC,EAA4C,CAChD,GAAI,yBACJ,GAAI,yBACJ,EAAG,yBACH,EAAG,yBACH,EAAG,uBACL,EAGMC,EAAkD,CACtD,GAAI,uCACJ,GAAI,uCACJ,EAAG,uCACH,EAAG,uCACH,EAAG,qCACL,EAoBMC,EAAeC,GAAmC,CACtD,MAAMC,KAAY,EAAAC,SAAkBF,CAAK,EACzC,MAAO,YAAS,cAAWC,CAAS,CAAC,EACvC,EAEaf,EAAyCc,GAA0B,CAC9E,KAAM,CAAE,MAAAG,EAAO,IAAAC,EAAK,SAAAC,EAAU,mBAAAC,CAAmB,EAAIN,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import_react", "import_simpleHash", "import_getKeyPropsString", "import_grid", "import_container", "import_ErrorBoundary", "colContentClasses", "colContentClassesTablet", "generateUID", "props", "keyString", "getKeyPropsString", "style", "uid", "disabled", "containerClassName", "Styles", "styleProps", "data", "StyleComponent", "getGridItemClassName", "container", "desktopSpan", "mobileSpan", "mobileClasses", "desktopClasses", "styleToString", "key", "value", "mergeStyles", "a", "b", "s", "withContainerLayout", "WrappedComponent", "defaultContainerClassName", "Wrapped", "React", "ref", "className", "componentProps", "mergedContainerClassName", "withStyleInjection", "defaultStyleProps", "propsStyleProps", "mergedStyle", "finalStyleProps", "idx", "_s", "_u", "_d", "ownClassName", "rest", "withErrorBoundary", "ErrorBoundary", "wrappedComponents", "defaultLayoutProps", "composed", "result"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as i,jsxs as k}from"react/jsx-runtime";import st,{useEffect as ot,useRef as g,useImperativeHandle as at,useState as lt}from"react";import{gsap as y}from"gsap";import{SplitText as z}from"gsap/dist/SplitText";import{ScrollTrigger as R}from"gsap/dist/ScrollTrigger";import{cn as o}from"../../helpers/utils.js";import{cva as V}from"class-variance-authority";import{Heading as dt,Text as A,Countdown as ct}from"../../components/index.js";import{withLayout as ut}from"../../shared/Styles.js";import{trackUrlRef as mt}from"../../shared/trackUrlRef.js";import{useInView as pt}from"react-intersection-observer";const N="link",P="title";function ft(n){if(!n)return!1;if(typeof n=="string")return n.trim().length>0;const a=n?.root?.children;return!Array.isArray(a)||a.length===0?!1:a.some(e=>{const r=e?.children;return!Array.isArray(r)||r.length===0?!1:r.some(s=>typeof s?.text=="string"&&s.text.length>0)})}const ht=V("",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),gt=V("desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),S=({data:n,onClick:a,className:e})=>{const{theme:r="light",extensions:s,title:p,caption:x,align:f}=n;if(!s?.textLink)return null;const d=s?.link?mt(s.link,`${N}_${P}`):void 0;return k("a",{className:o({"aiui-dark":r==="dark"},"hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]",{"text-[#080A0F]":r==="light"},{"text-[#F5F6F7]":r==="dark"},{"justify-center mt-4":f==="center"},{"mt-1 laptop:mt-0":f==="left"},e),...d?{href:d}:{},"data-headless-type-name":`${N}#${P}`,"data-headless-title-desc-button":`${p}#${x}`,...a?{onClick:a}:{},children:[i("div",{className:"truncate whitespace-nowrap",children:s?.textLink}),i("div",{className:"lg-desktop:size-5 size-4",children:i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",children:i("path",{d:"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z",fill:r==="dark"?"#F5F6F7":"#080A0F",className:"transition-all duration-[0.4s]"})})})]})},$=st.forwardRef(({data:n,className:a,classNames:e,as:r="h2",weight:s="bold",onButtonClick:p,...x},f)=>{const{title:d,titleSize:_=4,caption:T,subtitle:F,content:H,countdown:t,showCountdown:B=!1,theme:h="light",extensions:I,align:c="left"}=n,L=g(null),u=g(null),l=g(null),m=g(null),[j,O]=lt(!0),{ref:U,inView:C}=pt();at(f,()=>L.current);const W=()=>{O(!1)},Z=t?.targetDateTime||t?.targetDate||"",q=t?.targetDateTime_tz,G=t?.labels?{day:t.labels.days||"Day",hour:t.labels.hours||"Hours",minute:t.labels.minutes||"Mins",second:t.labels.seconds||"Secs"}:void 0;return ot(()=>{y.registerPlugin(z,R);function J(){if(!u.current)return;const K=u.current?.clientHeight||80;l.current&&l.current.revert(),m.current&&m.current.kill(),l.current=new z(u.current,{type:"words",wordsClass:"word"});const w=l.current.words;y.set(w,{opacity:0}),m.current=R.create({trigger:u.current,start:"bottom bottom-=4%",end:`bottom+=${K*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:Q=>{const X=Q.progress,D=w.length||1,Y=.5,b=1/D,M=b*(1-Y),E=(D-1)*M+b,tt=Math.min(1,E>0?X/E:0);w.forEach((et,nt)=>{const rt=nt*M,it=b;let v=(tt-rt)/it;v=Math.max(0,Math.min(1,v)),y.set(et,{opacity:v})})}})}return C&&J(),()=>{l.current&&l.current.revert(),m.current&&m.current.kill()}},[C]),k("div",{...x,id:I?.id,className:o("titleBottom title-box flex items-end justify-between gap-2 pb-6",a,e?.wrapper),ref:L,children:[k("div",{ref:U,className:o("flex-1",e?.container,{"aiui-dark":h==="dark","text-center":c==="center","text-left":c==="left"}),children:[(T||d)&&i(dt,{ref:u,as:r,size:_,html:T||d,weight:s,className:o(ht({theme:h}),e?.title)}),F&&i(A,{html:F,as:"div",className:o(gt({theme:h}),e?.subtitle)}),ft(H)&&i(A,{html:H,as:"div",size:4,className:o("title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]",e?.content)}),i(S,{data:n,className:o({"laptop:hidden":c==="left"},e?.button),onClick:p}),B&&t&&j&&i(ct,{endDate:Z,endDate_tz:q,timeLabels:G,showDays:t?.showDays,showHours:t?.showHours,showMinutes:t?.showMinutes,showSeconds:t?.showSeconds,theme:h,onExpire:W,hideWhenExpired:!0,align:c==="center"?"center":"left",className:o("mt-4",e?.countdown)})]}),i(S,{data:n,className:o("hidden",{"laptop:flex":c==="left"},e?.button),onClick:p})]})});$.displayName="Title";var Ct=ut($);export{Ct as default};
1
+ "use client";import{jsx as i,jsxs as k}from"react/jsx-runtime";import st,{useEffect as ot,useRef as g,useImperativeHandle as at,useState as lt}from"react";import{gsap as y}from"gsap";import{SplitText as z}from"gsap/dist/SplitText";import{ScrollTrigger as R}from"gsap/dist/ScrollTrigger";import{cn as o}from"../../helpers/utils.js";import{cva as V}from"class-variance-authority";import{Heading as dt,Text as A,Countdown as ct}from"../../components/index.js";import{withLayout as ut}from"../../shared/Styles.js";import{trackUrlRef as mt}from"../../shared/trackUrlRef.js";import{useInView as pt}from"react-intersection-observer";const N="link",P="title";function ft(n){if(!n)return!1;if(typeof n=="string")return n.trim().length>0;const a=n?.root?.children;return!Array.isArray(a)||a.length===0?!1:a.some(e=>{const r=e?.children;return!Array.isArray(r)||r.length===0?!1:r.some(s=>typeof s?.text=="string"&&s.text.length>0)})}const ht=V("",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),gt=V("desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]",{variants:{theme:{light:"text-[#080A0F]",dark:"text-[#F5F6F7]"}},defaultVariants:{theme:"light"}}),S=({data:n,onClick:a,className:e})=>{const{theme:r="light",extensions:s,title:p,caption:x,align:f}=n;if(!s?.textLink)return null;const d=s?.link?mt(s.link,`${N}_${P}`):void 0;return k("a",{className:o({"aiui-dark":r==="dark"},"hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]",{"text-[#080A0F]":r==="light"},{"text-[#F5F6F7]":r==="dark"},{"justify-center mt-4":f==="center"},{"mt-1 laptop:mt-0":f==="left"},e),...d?{href:d}:{},"data-headless-type-name":`${N}#${P}`,"data-headless-title-desc-button":`${p}#${x}`,...a?{onClick:a}:{},children:[i("div",{className:"truncate whitespace-nowrap",children:s?.textLink}),i("div",{className:"lg-desktop:size-5 size-4",children:i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 16 16",fill:"none",children:i("path",{d:"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z",fill:r==="dark"?"#F5F6F7":"#080A0F",className:"transition-all duration-[0.4s]"})})})]})},$=st.forwardRef(({data:n,className:a,classNames:e,as:r="h2",weight:s="bold",onButtonClick:p,...x},f)=>{const{title:d,titleSize:_=4,caption:T,subtitle:F,content:H,countdown:t,showCountdown:B=!1,theme:h="light",extensions:I,align:c="left"}=n,L=g(null),u=g(null),l=g(null),m=g(null),[j,O]=lt(!0),{ref:U,inView:C}=pt();at(f,()=>L.current);const W=()=>{O(!1)},Z=t?.targetDateTime||t?.targetDate||"",q=t?.targetDateTime_tz,G=t?.labels?{day:t.labels.days||"Day",hour:t.labels.hours||"Hours",minute:t.labels.minutes||"Mins",second:t.labels.seconds||"Secs"}:void 0;return ot(()=>{y.registerPlugin(z,R);function J(){if(!u.current)return;const K=u.current?.clientHeight||80;l.current&&l.current.revert(),m.current&&m.current.kill(),l.current=new z(u.current,{type:"words",wordsClass:"word"});const w=l.current.words;y.set(w,{opacity:0}),m.current=R.create({trigger:u.current,start:"bottom bottom-=4%",end:`bottom+=${K*1.5+60}px bottom-=4%`,scrub:!0,invalidateOnRefresh:!0,onUpdate:Q=>{const X=Q.progress,D=w.length||1,Y=.5,b=1/D,M=b*(1-Y),E=(D-1)*M+b,tt=Math.min(1,E>0?X/E:0);w.forEach((et,nt)=>{const rt=nt*M,it=b;let v=(tt-rt)/it;v=Math.max(0,Math.min(1,v)),y.set(et,{opacity:v})})}})}return C&&J(),()=>{l.current&&l.current.revert(),m.current&&m.current.kill()}},[C]),k("div",{id:I?.id,className:o("titleBottom title-box flex items-end justify-between gap-2 pb-6",a,e?.wrapper),...x,ref:L,children:[k("div",{ref:U,className:o("flex-1",e?.container,{"aiui-dark":h==="dark","text-center":c==="center","text-left":c==="left"}),children:[(T||d)&&i(dt,{ref:u,as:r,size:_,html:T||d,weight:s,className:o(ht({theme:h}),e?.title)}),F&&i(A,{html:F,as:"div",className:o(gt({theme:h}),e?.subtitle)}),ft(H)&&i(A,{html:H,as:"div",size:4,className:o("title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]",e?.content)}),i(S,{data:n,className:o({"laptop:hidden":c==="left"},e?.button),onClick:p}),B&&t&&j&&i(ct,{endDate:Z,endDate_tz:q,timeLabels:G,showDays:t?.showDays,showHours:t?.showHours,showMinutes:t?.showMinutes,showSeconds:t?.showSeconds,theme:h,onExpire:W,hideWhenExpired:!0,align:c==="center"?"center":"left",className:o("mt-4",e?.countdown)})]}),i(S,{data:n,className:o("hidden",{"laptop:flex":c==="left"},e?.button),onClick:p})]})});$.displayName="Title";var Ct=ut($);export{Ct as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Title/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { cva } from 'class-variance-authority'\nimport { Heading, Text, Countdown, type HeadingProps } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitlePropsBase } from './types.js'\n\nexport interface TitleProps extends TitlePropsBase, Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'title'> {}\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\n/**\n * \u5224\u65AD content \u5B57\u6BB5\u662F\u5426\u6709\u5B9E\u9645\u53EF\u89C1\u5185\u5BB9\u3002\n * - string\uFF1A\u53BB\u6389\u7A7A\u767D\u540E\u975E\u7A7A\u5373\u6709\u5185\u5BB9\n * - SerializedEditorState\uFF1A\u68C0\u67E5 root.children \u5185\u662F\u5426\u5B58\u5728\u975E\u7A7A\u6587\u672C\u8282\u70B9\uFF0C\n * \u907F\u514D convertLexicalToHTML \u628A\u7A7A\u6587\u6863\u8F93\u51FA\u4E3A &lt;div class=\"payload-richtext\"&gt;&lt;/div&gt;\n */\nfunction hasVisibleContent(content: string | { root?: { children?: unknown[] } } | null | undefined): boolean {\n if (!content) return false\n if (typeof content === 'string') return content.trim().length > 0\n const children = content?.root?.children\n if (!Array.isArray(children) || children.length === 0) return false\n return children.some((node: any) => {\n const nodeChildren = node?.children\n if (!Array.isArray(nodeChildren) || nodeChildren.length === 0) return false\n return nodeChildren.some((child: any) => typeof child?.text === 'string' && child.text.length > 0)\n })\n}\n\n/**\n * \u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst titleHeadingVariants = cva('', {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u526F\u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst subtitleVariants = cva(\n 'desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]',\n {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n }\n)\n\nconst TitleButton = ({\n data,\n onClick,\n className,\n}: {\n data: TitleProps['data']\n onClick?: () => void\n className?: string\n}) => {\n const { theme = 'light', extensions, title, caption, align } = data\n if (!extensions?.textLink) return null\n\n const href = extensions?.link ? trackUrlRef(extensions.link, `${componentType}_${componentName}`) : undefined\n\n return (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]',\n { 'text-[#080A0F]': theme === 'light' },\n { 'text-[#F5F6F7]': theme === 'dark' },\n { 'justify-center mt-4': align === 'center' },\n { 'mt-1 laptop:mt-0': align === 'left' },\n className\n )}\n {...(href ? { href } : {})}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n {...(onClick ? { onClick } : {})}\n >\n <div className=\"truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"lg-desktop:size-5 size-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z\"\n fill={theme === 'dark' ? '#F5F6F7' : '#080A0F'}\n className=\"transition-all duration-[0.4s]\"\n />\n </svg>\n </div>\n </a>\n )\n}\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(\n ({ data, className, classNames, as = 'h2', weight = 'bold', onButtonClick, ...rest }, ref) => {\n const {\n title,\n titleSize = 4,\n caption,\n subtitle,\n content,\n countdown,\n showCountdown = false,\n theme = 'light',\n extensions,\n align = 'left',\n } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n // \u63A7\u5236\u5012\u8BA1\u65F6\u663E\u793A\u72B6\u6001\n const [isCountdownVisible, setIsCountdownVisible] = useState(true)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n // \u5012\u8BA1\u65F6\u7ED3\u675F\u56DE\u8C03\n const handleCountdownEnd = () => {\n setIsCountdownVisible(false)\n }\n\n // CMS field mapping: new targetDateTime > legacy targetDate\n const countdownEndDate = countdown?.targetDateTime || countdown?.targetDate || ''\n const countdownTz = countdown?.targetDateTime_tz\n // Label mapping: plural keys (Title CMS format) \u2192 atomic Countdown format\n const countdownLabels = countdown?.labels\n ? {\n day: countdown.labels.days || 'Day',\n hour: countdown.labels.hours || 'Hours',\n minute: countdown.labels.minutes || 'Mins',\n second: countdown.labels.seconds || 'Secs',\n }\n : undefined\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div\n {...rest}\n id={extensions?.id}\n className={cn(\n 'titleBottom title-box flex items-end justify-between gap-2 pb-6',\n className,\n classNames?.wrapper\n )}\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('flex-1', classNames?.container, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-left': align === 'left',\n })}\n >\n {(caption || title) && (\n <Heading\n ref={titleRef}\n as={as}\n size={titleSize as HeadingProps['size']}\n html={caption || title}\n weight={weight}\n className={cn(titleHeadingVariants({ theme }), classNames?.title)}\n />\n )}\n {subtitle && (\n <Text html={subtitle} as=\"div\" className={cn(subtitleVariants({ theme }), classNames?.subtitle)} />\n )}\n {hasVisibleContent(content) && (\n <Text\n html={content}\n as=\"div\"\n size={4}\n className={cn(\n 'title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]',\n classNames?.content\n )}\n />\n )}\n <TitleButton\n data={data}\n className={cn({ 'laptop:hidden': align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n {showCountdown && countdown && isCountdownVisible && (\n <Countdown\n endDate={countdownEndDate}\n endDate_tz={countdownTz}\n timeLabels={countdownLabels}\n showDays={countdown?.showDays}\n showHours={countdown?.showHours}\n showMinutes={countdown?.showMinutes}\n showSeconds={countdown?.showSeconds}\n theme={theme}\n onExpire={handleCountdownEnd}\n hideWhenExpired={true}\n align={align === 'center' ? 'center' : 'left'}\n className={cn('mt-4', classNames?.countdown)}\n />\n )}\n </div>\n <TitleButton\n data={data}\n className={cn('hidden', { ['laptop:flex']: align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n </div>\n )\n }\n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UAAWX,EACT,uHACA6B,GAAY,OACd,EACF,EAEFvC,EAAC4B,EAAA,CACC,KAAMC,EACN,UAAWnB,EAAG,CAAE,gBAAiB0B,IAAU,MAAO,EAAGG,GAAY,MAAM,EACvE,QAASG,EACX,EACCM,GAAiBD,GAAaM,GAC7BrD,EAACc,GAAA,CACC,QAAS4C,EACT,WAAYC,EACZ,WAAYC,EACZ,SAAUb,GAAW,SACrB,UAAWA,GAAW,UACtB,YAAaA,GAAW,YACxB,YAAaA,GAAW,YACxB,MAAOf,EACP,SAAUyB,EACV,gBAAiB,GACjB,MAAOrB,IAAU,SAAW,SAAW,OACvC,UAAW1B,EAAG,OAAQ6B,GAAY,SAAS,EAC7C,GAEJ,EACAvC,EAAC4B,EAAA,CACC,KAAMC,EACN,UAAWnB,EAAG,SAAU,CAAG,cAAgB0B,IAAU,MAAO,EAAGG,GAAY,MAAM,EACjF,QAASG,EACX,GACF,CAEJ,CACF,EAEAJ,EAAM,YAAc,QAEpB,IAAOuC,GAAQ9D,GAAWuB,CAAK",
4
+ "sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { cva } from 'class-variance-authority'\nimport { Heading, Text, Countdown, type HeadingProps } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitlePropsBase } from './types.js'\n\nexport interface TitleProps extends TitlePropsBase, Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'title'> {}\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\n/**\n * \u5224\u65AD content \u5B57\u6BB5\u662F\u5426\u6709\u5B9E\u9645\u53EF\u89C1\u5185\u5BB9\u3002\n * - string\uFF1A\u53BB\u6389\u7A7A\u767D\u540E\u975E\u7A7A\u5373\u6709\u5185\u5BB9\n * - SerializedEditorState\uFF1A\u68C0\u67E5 root.children \u5185\u662F\u5426\u5B58\u5728\u975E\u7A7A\u6587\u672C\u8282\u70B9\uFF0C\n * \u907F\u514D convertLexicalToHTML \u628A\u7A7A\u6587\u6863\u8F93\u51FA\u4E3A &lt;div class=\"payload-richtext\"&gt;&lt;/div&gt;\n */\nfunction hasVisibleContent(content: string | { root?: { children?: unknown[] } } | null | undefined): boolean {\n if (!content) return false\n if (typeof content === 'string') return content.trim().length > 0\n const children = content?.root?.children\n if (!Array.isArray(children) || children.length === 0) return false\n return children.some((node: any) => {\n const nodeChildren = node?.children\n if (!Array.isArray(nodeChildren) || nodeChildren.length === 0) return false\n return nodeChildren.some((child: any) => typeof child?.text === 'string' && child.text.length > 0)\n })\n}\n\n/**\n * \u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst titleHeadingVariants = cva('', {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n})\n\n/**\n * \u526F\u6807\u9898\u6837\u5F0F\u53D8\u4F53\n */\nconst subtitleVariants = cva(\n 'desktop:text-base desktop:mt-2 lg-desktop:text-[18px] mt-1 text-[14px] font-bold leading-[1.4] tracking-[-0.36px]',\n {\n variants: {\n theme: {\n light: 'text-[#080A0F]',\n dark: 'text-[#F5F6F7]',\n },\n },\n defaultVariants: {\n theme: 'light',\n },\n }\n)\n\nconst TitleButton = ({\n data,\n onClick,\n className,\n}: {\n data: TitleProps['data']\n onClick?: () => void\n className?: string\n}) => {\n const { theme = 'light', extensions, title, caption, align } = data\n if (!extensions?.textLink) return null\n\n const href = extensions?.link ? trackUrlRef(extensions.link, `${componentType}_${componentName}`) : undefined\n\n return (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'hover:text-brand-0 [&_svg_path]:hover:fill-brand-0 lg-desktop:text-base flex cursor-pointer items-center overflow-hidden text-sm font-[700] leading-[1.4] transition-all duration-[0.4s]',\n { 'text-[#080A0F]': theme === 'light' },\n { 'text-[#F5F6F7]': theme === 'dark' },\n { 'justify-center mt-4': align === 'center' },\n { 'mt-1 laptop:mt-0': align === 'left' },\n className\n )}\n {...(href ? { href } : {})}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${caption}`}\n {...(onClick ? { onClick } : {})}\n >\n <div className=\"truncate whitespace-nowrap\">{extensions?.textLink}</div>\n <div className=\"lg-desktop:size-5 size-4\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M5.52827 3.52864C5.78862 3.26829 6.21063 3.26829 6.47098 3.52864L10.471 7.52864C10.7313 7.78899 10.7313 8.21099 10.471 8.47134L6.47098 12.4713C6.21063 12.7317 5.78862 12.7317 5.52827 12.4713C5.26792 12.211 5.26792 11.789 5.52827 11.5286L9.05692 7.99999L5.52827 4.47134C5.26792 4.21099 5.26792 3.78899 5.52827 3.52864Z\"\n fill={theme === 'dark' ? '#F5F6F7' : '#080A0F'}\n className=\"transition-all duration-[0.4s]\"\n />\n </svg>\n </div>\n </a>\n )\n}\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(\n ({ data, className, classNames, as = 'h2', weight = 'bold', onButtonClick, ...rest }, ref) => {\n const {\n title,\n titleSize = 4,\n caption,\n subtitle,\n content,\n countdown,\n showCountdown = false,\n theme = 'light',\n extensions,\n align = 'left',\n } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n // \u63A7\u5236\u5012\u8BA1\u65F6\u663E\u793A\u72B6\u6001\n const [isCountdownVisible, setIsCountdownVisible] = useState(true)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n // \u5012\u8BA1\u65F6\u7ED3\u675F\u56DE\u8C03\n const handleCountdownEnd = () => {\n setIsCountdownVisible(false)\n }\n\n // CMS field mapping: new targetDateTime > legacy targetDate\n const countdownEndDate = countdown?.targetDateTime || countdown?.targetDate || ''\n const countdownTz = countdown?.targetDateTime_tz\n // Label mapping: plural keys (Title CMS format) \u2192 atomic Countdown format\n const countdownLabels = countdown?.labels\n ? {\n day: countdown.labels.days || 'Day',\n hour: countdown.labels.hours || 'Hours',\n minute: countdown.labels.minutes || 'Mins',\n second: countdown.labels.seconds || 'Secs',\n }\n : undefined\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n if (splitTextInstance.current) {\n splitTextInstance.current.revert()\n }\n if (scrollTriggerRef.current) {\n scrollTriggerRef.current.kill()\n }\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n invalidateOnRefresh: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length || 1\n const overlap = 0.5\n const interval = 1 / total\n const step = interval * (1 - overlap)\n const lastEnd = (total - 1) * step + interval\n const normalizedProgress = Math.min(1, lastEnd > 0 ? progress / lastEnd : 0)\n words.forEach((word: any, i: number) => {\n const start = i * step\n const width = interval\n let opacity = (normalizedProgress - start) / width\n opacity = Math.max(0, Math.min(1, opacity))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div\n id={extensions?.id}\n className={cn(\n 'titleBottom title-box flex items-end justify-between gap-2 pb-6',\n className,\n classNames?.wrapper\n )}\n {...rest}\n ref={innerRef}\n >\n <div\n ref={inViewRef}\n className={cn('flex-1', classNames?.container, {\n 'aiui-dark': theme === 'dark',\n 'text-center': align === 'center',\n 'text-left': align === 'left',\n })}\n >\n {(caption || title) && (\n <Heading\n ref={titleRef}\n as={as}\n size={titleSize as HeadingProps['size']}\n html={caption || title}\n weight={weight}\n className={cn(titleHeadingVariants({ theme }), classNames?.title)}\n />\n )}\n {subtitle && (\n <Text html={subtitle} as=\"div\" className={cn(subtitleVariants({ theme }), classNames?.subtitle)} />\n )}\n {hasVisibleContent(content) && (\n <Text\n html={content}\n as=\"div\"\n size={4}\n className={cn(\n 'title-content text-info-primary desktop:text-base desktop:mt-4 lg-desktop:text-[18px] mt-2 text-[14px] leading-[1.6]',\n classNames?.content\n )}\n />\n )}\n <TitleButton\n data={data}\n className={cn({ 'laptop:hidden': align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n {showCountdown && countdown && isCountdownVisible && (\n <Countdown\n endDate={countdownEndDate}\n endDate_tz={countdownTz}\n timeLabels={countdownLabels}\n showDays={countdown?.showDays}\n showHours={countdown?.showHours}\n showMinutes={countdown?.showMinutes}\n showSeconds={countdown?.showSeconds}\n theme={theme}\n onExpire={handleCountdownEnd}\n hideWhenExpired={true}\n align={align === 'center' ? 'center' : 'left'}\n className={cn('mt-4', classNames?.countdown)}\n />\n )}\n </div>\n <TitleButton\n data={data}\n className={cn('hidden', { ['laptop:flex']: align === 'left' }, classNames?.button)}\n onClick={onButtonClick}\n />\n </div>\n )\n }\n)\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
5
+ "mappings": "aAoFI,OAeE,OAAAA,EAfF,QAAAC,MAAA,oBAnFJ,OAAOC,IAAS,aAAAC,GAAW,UAAAC,EAAQ,uBAAAC,GAAqB,YAAAC,OAAg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M,GAC7BrD,EAACc,GAAA,CACC,QAAS4C,EACT,WAAYC,EACZ,WAAYC,EACZ,SAAUb,GAAW,SACrB,UAAWA,GAAW,UACtB,YAAaA,GAAW,YACxB,YAAaA,GAAW,YACxB,MAAOf,EACP,SAAUyB,EACV,gBAAiB,GACjB,MAAOrB,IAAU,SAAW,SAAW,OACvC,UAAW1B,EAAG,OAAQ6B,GAAY,SAAS,EAC7C,GAEJ,EACAvC,EAAC4B,EAAA,CACC,KAAMC,EACN,UAAWnB,EAAG,SAAU,CAAG,cAAgB0B,IAAU,MAAO,EAAGG,GAAY,MAAM,EACjF,QAASG,EACX,GACF,CAEJ,CACF,EAEAJ,EAAM,YAAc,QAEpB,IAAOuC,GAAQ9D,GAAWuB,CAAK",
6
6
  "names": ["jsx", "jsxs", "React", "useEffect", "useRef", "useImperativeHandle", "useState", "gsap", "SplitText", "ScrollTrigger", "cn", "cva", "Heading", "Text", "Countdown", "withLayout", "trackUrlRef", "useInView", "componentType", "componentName", "hasVisibleContent", "content", "children", "node", "nodeChildren", "child", "titleHeadingVariants", "subtitleVariants", "TitleButton", "data", "onClick", "className", "theme", "extensions", "title", "caption", "align", "href", "Title", "classNames", "as", "weight", "onButtonClick", "rest", "ref", "titleSize", "subtitle", "countdown", "showCountdown", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "isCountdownVisible", "setIsCountdownVisible", "inViewRef", "inView", "handleCountdownEnd", "countdownEndDate", "countdownTz", "countdownLabels", "gsapResize", "height", "words", "self", "progress", "total", "overlap", "interval", "step", "lastEnd", "normalizedProgress", "word", "i", "start", "width", "opacity", "Title_default"]
7
7
  }
@@ -3,9 +3,19 @@
3
3
  *
4
4
  * @description Anker Innovations品牌标识栏组件,用于显示公司Logo和品牌信息
5
5
  */
6
- declare const Board: ({ href, data, sizeClass }: {
7
- href?: string;
8
- data?: any;
6
+ interface BoardIconItem {
7
+ link?: string;
8
+ label?: string;
9
+ title?: string;
10
+ logo?: string;
11
+ }
12
+ interface BoardData {
13
+ leftIcon?: BoardIconItem[];
14
+ rightIcon?: BoardIconItem[];
15
+ }
16
+ export interface BoardProps {
17
+ data?: BoardData;
9
18
  sizeClass?: string;
10
- }) => import("react/jsx-runtime").JSX.Element;
19
+ }
20
+ declare const Board: ({ data, sizeClass }: BoardProps) => import("react/jsx-runtime").JSX.Element;
11
21
  export default Board;
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as h}from"react/jsx-runtime";import{cn as t}from"../helpers/utils.js";import{Container as o}from"./container.js";import i from"./link.js";const d=({href:n,data:s,sizeClass:r})=>e(i,{href:n,asChild:!n,children:e("div",{className:"relative z-[46] box-border h-[30px]",children:h(o,{childClassName:"flex !bg-[#080A0F] items-center justify-between",className:"h-full",children:[e("div",{className:"flex h-full items-center gap-2 py-[5px]",children:s?.leftIcon?.map?.((l,a)=>e(i,{href:l?.link,asChild:!l?.link,"aria-label":l?.label,className:t("hidden h-full",`${r||"desktop:block"}`),children:e("div",{className:t(`${r||"desktop:block"}`,"hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]"),style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:l?.logo||""}})},a))}),e("div",{className:"flex h-full items-center justify-end gap-2 py-[5px]",children:s?.rightIcon?.map?.((l,a)=>e(i,{href:l?.link,asChild:!l?.link,"aria-label":l?.label,className:"flex h-full items-center",children:e("div",{className:"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto",style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:l?.logo||""}})},a))})]})})});var g=d;export{g as default};
1
+ import{jsx as l,jsxs as d}from"react/jsx-runtime";import{cn as r}from"../helpers/utils.js";import{Container as o}from"./container.js";import i from"./link.js";const s=({data:t,sizeClass:n})=>l("div",{className:"relative z-[46] box-border h-[30px]",children:d(o,{childClassName:"flex !bg-[#080A0F] items-center justify-between",className:"h-full",children:[l("div",{className:"flex h-full items-center gap-2 py-[5px]",children:t?.leftIcon?.map?.((e,a)=>l(i,{href:e?.link,asChild:!e?.link,"aria-label":e?.label||e?.title,className:r("hidden h-full",`${n||"desktop:block"}`),children:l("div",{className:r(`${n||"desktop:block"}`,"hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]"),style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:e?.logo||""}})},a))}),l("div",{className:"flex h-full items-center justify-end gap-2 py-[5px]",children:t?.rightIcon?.map?.((e,a)=>l(i,{href:e?.link,asChild:!e?.link,"aria-label":e?.label||e?.title,className:"flex h-full items-center",children:l("div",{className:"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto",style:{filter:"none"},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:e?.logo||""}})},a))})]})});var g=s;export{g as default};
2
2
  //# sourceMappingURL=board.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/board.tsx"],
4
- "sourcesContent": ["import { cn } from '../helpers/utils.js'\nimport { Container } from './container.js'\nimport Link from './link.js'\n\n/**\n * Board - \u54C1\u724C\u6807\u8BC6\u680F\n *\n * @description Anker Innovations\u54C1\u724C\u6807\u8BC6\u680F\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u663E\u793A\u516C\u53F8Logo\u548C\u54C1\u724C\u4FE1\u606F\n */\n\nconst Board = ({ href, data, sizeClass }: { href?: string; data?: any; sizeClass?: string }) => {\n return (\n <Link href={href} asChild={!href}>\n <div className=\"relative z-[46] box-border h-[30px]\">\n <Container childClassName=\"flex !bg-[#080A0F] items-center justify-between\" className=\"h-full\">\n <div className=\"flex h-full items-center gap-2 py-[5px]\">\n {data?.leftIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label}\n className={cn('hidden h-full', `${sizeClass || 'desktop:block'}`)}\n >\n <div\n className={cn(\n `${sizeClass || 'desktop:block'}`,\n 'hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]'\n )}\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n <div className=\"flex h-full items-center justify-end gap-2 py-[5px]\">\n {data?.rightIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label}\n className=\"flex h-full items-center\"\n >\n <div\n className=\"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto\"\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n </Container>\n </div>\n </Link>\n )\n}\n\n// const AnkerInnovations = (props: React.SVGProps<SVGSVGElement>) => {\n// return (\n// <svg width=\"148\" height=\"10\" viewBox=\"0 0 148 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n// <path\n// d=\"M88.5391 1.66872C90.8392 1.6688 92.7041 3.53461 92.7041 5.83474C92.7039 8.13468 90.839 9.9997 88.5391 9.99977C86.239 9.99977 84.3733 8.13473 84.373 5.83474C84.373 3.53456 86.2389 1.66872 88.5391 1.66872ZM106.479 1.66872C107.484 1.66872 108.407 2.02531 109.127 2.61892L109.477 1.86208H110.645V9.79958H109.477L109.13 9.0486C108.409 9.64225 107.486 9.99977 106.479 9.99977C104.179 9.99954 102.314 8.13458 102.313 5.83474C102.313 3.53471 104.179 1.66896 106.479 1.66872ZM126.684 1.66872C128.984 1.66872 130.849 3.53456 130.849 5.83474C130.848 8.13473 128.984 9.99977 126.684 9.99977C124.384 9.99972 122.519 8.13469 122.519 5.83474C122.519 3.5346 124.383 1.66878 126.684 1.66872ZM144.748 1.66188C146.602 1.66198 147.794 2.66292 147.823 4.20778H146.278C146.249 3.44345 145.631 3.04577 144.719 3.04567C143.806 3.04567 143.247 3.429 143.247 4.0027C143.247 4.7082 144.07 4.85598 145.026 5.0027L145.025 5.00173C146.365 5.23788 147.998 5.48784 147.998 7.44509C147.998 8.98988 146.716 9.99001 144.775 9.99001C142.834 9.98986 141.568 8.93061 141.524 7.28298H143.128C143.172 8.12086 143.878 8.54763 144.835 8.54763C145.703 8.5475 146.38 8.17982 146.38 7.51833C146.38 6.76851 145.527 6.5909 144.556 6.42946C143.232 6.20932 141.673 5.90104 141.673 4.0613C141.673 2.6337 142.893 1.66188 144.748 1.66188ZM115.1 1.85427H117.434V3.24685H115.102V6.85524C115.102 7.79295 115.614 8.32097 116.582 8.32106H117.478V9.80251L116.275 9.8406C114.545 9.84058 113.474 8.76932 113.474 7.02419V3.24685H112.285V2.93532L114.577 0.000751495H115.1V1.85427ZM63.7627 9.79958H62.1367V-0.000225067H63.7627V9.79958ZM97.5566 7.32302L100.108 1.85427H101.884L98.1787 9.79958H96.9355L93.2305 1.85427H95.0059L97.5566 7.32302ZM120.852 9.79958H119.226V3.24587H120.852V9.79958ZM67.8779 2.61892C68.6117 2.02787 69.5403 1.67165 70.5557 1.67165H70.5566C72.1803 1.67165 73.498 2.98838 73.498 4.61208V9.7986H71.8711V4.96462C71.8711 4.00413 71.0923 3.22462 70.1318 3.22438C68.9018 3.22438 67.9045 4.221 67.9043 5.45095V9.7986H66.2725V1.67165H67.4404L67.8779 2.61892ZM77.3252 2.61892C78.059 2.02789 78.9876 1.67165 80.0029 1.67165H80.0039C81.6276 1.67165 82.9443 2.98838 82.9443 4.61208V9.7986H81.3184V4.96462C81.3184 4.00399 80.5388 3.22438 79.5781 3.22438C78.3483 3.2246 77.3518 4.22113 77.3516 5.45095V9.7986H75.7197V1.67165H76.8877L77.3252 2.61892ZM133.85 1.67165L134.287 2.61892C135.021 2.02792 135.95 1.67173 136.965 1.67165H136.967C138.59 1.67181 139.907 2.98848 139.907 4.61208V9.7986H138.28V4.96462C138.28 4.00403 137.502 3.22446 136.541 3.22438C135.311 3.22438 134.315 4.221 134.314 5.45095V9.7986H132.683V1.67165H133.85ZM88.5391 3.29567C87.1368 3.29567 86 4.43248 86 5.83474C86.0002 7.23681 87.1369 8.3738 88.5391 8.3738C89.9411 8.37372 91.0779 7.23676 91.0781 5.83474C91.0781 4.43253 89.9412 3.29575 88.5391 3.29567ZM106.479 3.29567C105.076 3.29591 103.94 4.43263 103.94 5.83474C103.941 7.23666 105.077 8.37356 106.479 8.3738C107.881 8.3738 109.017 7.23681 109.018 5.83474C109.018 4.43248 107.881 3.29567 106.479 3.29567ZM126.684 3.29567C125.281 3.29573 124.145 4.43252 124.145 5.83474C124.145 7.23677 125.282 8.37374 126.684 8.3738C128.086 8.3738 129.222 7.23681 129.223 5.83474C129.223 4.43248 128.086 3.29567 126.684 3.29567ZM120.852 1.84938H119.226V-0.000225067H120.852V1.84938Z\"\n// fill=\"white\"\n// />\n// <path\n// d=\"M11.124 10.0002H8.73438L5.63672 3.35569L2.53809 10.0002H0.148438L4.81152 0.000221252H6.46191L11.124 10.0002ZM20.3516 6.48264V0.000221252H22.5371V9.99924H20.3516L15.2871 3.51682V9.99924H13.1016V0.000221252H15.2871L20.3516 6.48264ZM27.209 9.99924H25.0234V0.000221252H27.209V9.99924ZM30.3037 4.99924L34.21 9.99924H31.4619L27.5586 4.99632L31.4619 0.000221252H34.21L30.3037 4.99924ZM44.6006 2.00413H38.1348V3.99827H43.2354V6.0012H38.1348V7.99534H44.6006V9.99924H35.9492V0.000221252H44.6006V2.00413ZM52.3105 0.000221252C54.2297 0.000274701 55.7852 1.55571 55.7852 3.47483C55.7851 5.0072 54.7924 6.30365 53.416 6.76585L55.9414 9.99729H53.1934L49.29 4.99534H52.2998C53.1392 4.99513 53.8203 4.31423 53.8203 3.47483C53.8203 2.63538 53.1392 1.95453 52.2998 1.95432H48.7715V9.99924H46.5859V0.000221252H52.3105Z\"\n// fill=\"white\"\n// />\n// </svg>\n// )\n// }\n\nexport default Board\n"],
5
- "mappings": "AAcQ,OAUQ,OAAAA,EAVR,QAAAC,MAAA,oBAdR,OAAS,MAAAC,MAAU,sBACnB,OAAS,aAAAC,MAAiB,iBAC1B,OAAOC,MAAU,YAQjB,MAAMC,EAAQ,CAAC,CAAE,KAAAC,EAAM,KAAAC,EAAM,UAAAC,CAAU,IAEnCR,EAACI,EAAA,CAAK,KAAME,EAAM,QAAS,CAACA,EAC1B,SAAAN,EAAC,OAAI,UAAU,sCACb,SAAAC,EAACE,EAAA,CAAU,eAAe,kDAAkD,UAAU,SACpF,UAAAH,EAAC,OAAI,UAAU,0CACZ,SAAAO,GAAM,UAAU,MAAM,CAACE,EAAWC,IACjCV,EAACI,EAAA,CAEC,KAAMK,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,MAClB,UAAWP,EAAG,gBAAiB,GAAGM,GAAa,eAAe,EAAE,EAEhE,SAAAR,EAAC,OACC,UAAWE,EACT,GAAGM,GAAa,eAAe,GAC/B,4LACF,EACA,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQC,GAAM,MAAQ,EAAG,EACtD,GAdKC,CAeP,CACD,EACH,EACAV,EAAC,OAAI,UAAU,sDACZ,SAAAO,GAAM,WAAW,MAAM,CAACE,EAAWC,IAClCV,EAACI,EAAA,CAEC,KAAMK,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,MAClB,UAAU,2BAEV,SAAAT,EAAC,OACC,UAAU,uDACV,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQS,GAAM,MAAQ,EAAG,EACtD,GAXKC,CAYP,CACD,EACH,GACF,EACF,EACF,EAmBJ,IAAOC,EAAQN",
6
- "names": ["jsx", "jsxs", "cn", "Container", "Link", "Board", "href", "data", "sizeClass", "item", "index", "board_default"]
4
+ "sourcesContent": ["import { cn } from '../helpers/utils.js'\nimport { Container } from './container.js'\nimport Link from './link.js'\n\n/**\n * Board - \u54C1\u724C\u6807\u8BC6\u680F\n *\n * @description Anker Innovations\u54C1\u724C\u6807\u8BC6\u680F\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u663E\u793A\u516C\u53F8Logo\u548C\u54C1\u724C\u4FE1\u606F\n */\n\ninterface BoardIconItem {\n link?: string\n label?: string\n title?: string\n logo?: string\n}\n\ninterface BoardData {\n leftIcon?: BoardIconItem[]\n rightIcon?: BoardIconItem[]\n}\n\nexport interface BoardProps {\n data?: BoardData\n sizeClass?: string\n}\n\nconst Board = ({ data, sizeClass }: BoardProps) => {\n return (\n <div className=\"relative z-[46] box-border h-[30px]\">\n <Container childClassName=\"flex !bg-[#080A0F] items-center justify-between\" className=\"h-full\">\n <div className=\"flex h-full items-center gap-2 py-[5px]\">\n {data?.leftIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label || item?.title}\n className={cn('hidden h-full', `${sizeClass || 'desktop:block'}`)}\n >\n <div\n className={cn(\n `${sizeClass || 'desktop:block'}`,\n 'hidden h-fit transition-all duration-200 [&_svg]:h-full [&_svg]:w-auto [&_svg_path]:transition-all [&_svg_path]:duration-200 [&_svg_path]:[fill:#75787F] [&_svg_path]:hover:[fill:#FFFFFF]'\n )}\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n <div className=\"flex h-full items-center justify-end gap-2 py-[5px]\">\n {data?.rightIcon?.map?.((item: any, index: number) => (\n <Link\n key={index}\n href={item?.link}\n asChild={!item?.link}\n aria-label={item?.label || item?.title}\n className=\"flex h-full items-center\"\n >\n <div\n className=\"board-right-icon h-fit [&_svg]:h-full [&_svg]:w-auto\"\n style={{ filter: 'none' }}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: item?.logo || '' }}\n />\n </Link>\n ))}\n </div>\n </Container>\n </div>\n )\n}\n\nexport default Board\n"],
5
+ "mappings": "AA8BM,OAUQ,OAAAA,EAVR,QAAAC,MAAA,oBA9BN,OAAS,MAAAC,MAAU,sBACnB,OAAS,aAAAC,MAAiB,iBAC1B,OAAOC,MAAU,YAyBjB,MAAMC,EAAQ,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,IAE7BP,EAAC,OAAI,UAAU,sCACb,SAAAC,EAACE,EAAA,CAAU,eAAe,kDAAkD,UAAU,SACpF,UAAAH,EAAC,OAAI,UAAU,0CACZ,SAAAM,GAAM,UAAU,MAAM,CAACE,EAAWC,IACjCT,EAACI,EAAA,CAEC,KAAMI,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,OAASA,GAAM,MACjC,UAAWN,EAAG,gBAAiB,GAAGK,GAAa,eAAe,EAAE,EAEhE,SAAAP,EAAC,OACC,UAAWE,EACT,GAAGK,GAAa,eAAe,GAC/B,4LACF,EACA,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQC,GAAM,MAAQ,EAAG,EACtD,GAdKC,CAeP,CACD,EACH,EACAT,EAAC,OAAI,UAAU,sDACZ,SAAAM,GAAM,WAAW,MAAM,CAACE,EAAWC,IAClCT,EAACI,EAAA,CAEC,KAAMI,GAAM,KACZ,QAAS,CAACA,GAAM,KAChB,aAAYA,GAAM,OAASA,GAAM,MACjC,UAAU,2BAEV,SAAAR,EAAC,OACC,UAAU,uDACV,MAAO,CAAE,OAAQ,MAAO,EACxB,cAAY,OACZ,wBAAyB,CAAE,OAAQQ,GAAM,MAAQ,EAAG,EACtD,GAXKC,CAYP,CACD,EACH,GACF,EACF,EAIJ,IAAOC,EAAQL",
6
+ "names": ["jsx", "jsxs", "cn", "Container", "Link", "Board", "data", "sizeClass", "item", "index", "board_default"]
7
7
  }
@@ -23,7 +23,7 @@ export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js';
23
23
  export { Alert, AlertTitle, AlertDescription } from './alert.js';
24
24
  export { default as Picture } from './picture.js';
25
25
  export { default as Theme } from './theme.js';
26
- export { default as Board } from './board.js';
26
+ export { default as Board, type BoardProps } from './board.js';
27
27
  export { default as LoadingDots } from './loadingDots.js';
28
28
  export { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js';
29
29
  export { default as BrandStrip } from './brand-strip.js';
@@ -1,2 +1,2 @@
1
- import{default as e}from"./button.js";import{default as p}from"./badge.js";import{Input as n,InputSlot as u}from"./input.js";import{default as d}from"./checkbox.js";import{default as i}from"./skeleton.js";import{Dialog as m,DialogPortal as D,DialogOverlay as x,DialogClose as C,DialogTrigger as g,DialogContent as w,DialogHeader as P,DialogFooter as y,DialogTitle as T,DialogDescription as M}from"./dialog.js";import{Popover as b,PopoverTrigger as c,PopoverContent as G}from"./popover.js";import{RadioGroup as S,RadioGroupItem as A}from"./radio.js";import{Text as R}from"./text.js";import{Grid as H,GridItem as L}from"./grid.js";import{Heading as F}from"./heading.js";import{Container as O}from"./container.js";import{Color as j}from"./color.js";import{Drawer as q,DrawerPortal as J,DrawerOverlay as K,DrawerTrigger as Q,DrawerClose as U,DrawerContent as V,DrawerHeader as W,DrawerFooter as X,DrawerTitle as Y,DrawerDescription as Z}from"./drawer.js";import{default as $}from"./link.js";import{Avatar as ro,AvatarImage as eo,AvatarFallback as to}from"./avatar.js";import{default as ao}from"./input-number.js";import{DropdownMenu as uo,DropdownMenuTrigger as so,DropdownMenuContent as lo,DropdownMenuItem as io,DropdownMenuCheckboxItem as fo,DropdownMenuRadioItem as mo,DropdownMenuLabel as Do,DropdownMenuSeparator as xo,DropdownMenuShortcut as Co,DropdownMenuGroup as go,DropdownMenuPortal as wo,DropdownMenuSub as Po,DropdownMenuSubContent as yo,DropdownMenuSubTrigger as To,DropdownMenuRadioGroup as Mo}from"./drop-down.js";import{Card as bo,CardHeader as co,CardFooter as Go,CardTitle as vo,CardDescription as So,CardContent as Ao}from"./card.js";import{default as Ro}from"./Countdown.js";import{Carousel as Ho,CarouselContent as Lo,CarouselItem as ho,CarouselPrevious as Fo,CarouselNext as No}from"./carousel.js";import{Tabs as Eo,TabsList as jo,TabsTrigger as zo,TabsContent as qo}from"./tabs.js";import{Alert as Ko,AlertTitle as Qo,AlertDescription as Uo}from"./alert.js";import{default as Wo}from"./picture.js";import{default as Yo}from"./theme.js";import{default as _o}from"./board.js";import{default as or}from"./loadingDots.js";import{ExposureDetector as er}from"./ExposureDetector.js";import{default as pr}from"./brand-strip.js";import{default as nr}from"./progress.js";import{default as sr}from"./otp-input.js";import{sizeMap as lr}from"./button.js";export{Ko as Alert,Uo as AlertDescription,Qo as AlertTitle,ro as Avatar,to as AvatarFallback,eo as AvatarImage,p as Badge,_o as Board,pr as BrandStrip,e as Button,bo as Card,Ao as CardContent,So as CardDescription,Go as CardFooter,co as CardHeader,vo as CardTitle,Ho as Carousel,Lo as CarouselContent,ho as CarouselItem,No as CarouselNext,Fo as CarouselPrevious,d as Checkbox,j as Color,O as Container,Ro as Countdown,m as Dialog,C as DialogClose,w as DialogContent,M as DialogDescription,y as DialogFooter,P as DialogHeader,x as DialogOverlay,D as DialogPortal,T as DialogTitle,g as DialogTrigger,q as Drawer,U as DrawerClose,V as DrawerContent,Z as DrawerDescription,X as DrawerFooter,W as DrawerHeader,K as DrawerOverlay,J as DrawerPortal,Y as DrawerTitle,Q as DrawerTrigger,uo as DropdownMenu,fo as DropdownMenuCheckboxItem,lo as DropdownMenuContent,go as DropdownMenuGroup,io as DropdownMenuItem,Do as DropdownMenuLabel,wo as DropdownMenuPortal,Mo as DropdownMenuRadioGroup,mo as DropdownMenuRadioItem,xo as DropdownMenuSeparator,Co as DropdownMenuShortcut,Po as DropdownMenuSub,yo as DropdownMenuSubContent,To as DropdownMenuSubTrigger,so as DropdownMenuTrigger,er as ExposureDetector,H as Grid,L as GridItem,F as Heading,n as Input,ao as InputNumber,u as InputSlot,$ as Link,or as LoadingDots,sr as OtpInput,Wo as Picture,b as Popover,G as PopoverContent,c as PopoverTrigger,nr as Progress,S as RadioGroup,A as RadioGroupItem,i as Skeleton,Eo as Tabs,qo as TabsContent,jo as TabsList,zo as TabsTrigger,R as Text,Yo as Theme,lr as sizeMap};
1
+ import{default as e}from"./button.js";import{default as p}from"./badge.js";import{Input as n,InputSlot as s}from"./input.js";import{default as d}from"./checkbox.js";import{default as i}from"./skeleton.js";import{Dialog as m,DialogPortal as D,DialogOverlay as x,DialogClose as C,DialogTrigger as g,DialogContent as w,DialogHeader as P,DialogFooter as y,DialogTitle as T,DialogDescription as M}from"./dialog.js";import{Popover as b,PopoverTrigger as c,PopoverContent as G}from"./popover.js";import{RadioGroup as S,RadioGroupItem as A}from"./radio.js";import{Text as B}from"./text.js";import{Grid as H,GridItem as L}from"./grid.js";import{Heading as F}from"./heading.js";import{Container as O}from"./container.js";import{Color as j}from"./color.js";import{Drawer as q,DrawerPortal as J,DrawerOverlay as K,DrawerTrigger as Q,DrawerClose as U,DrawerContent as V,DrawerHeader as W,DrawerFooter as X,DrawerTitle as Y,DrawerDescription as Z}from"./drawer.js";import{default as $}from"./link.js";import{Avatar as ro,AvatarImage as eo,AvatarFallback as to}from"./avatar.js";import{default as ao}from"./input-number.js";import{DropdownMenu as so,DropdownMenuTrigger as uo,DropdownMenuContent as lo,DropdownMenuItem as io,DropdownMenuCheckboxItem as fo,DropdownMenuRadioItem as mo,DropdownMenuLabel as Do,DropdownMenuSeparator as xo,DropdownMenuShortcut as Co,DropdownMenuGroup as go,DropdownMenuPortal as wo,DropdownMenuSub as Po,DropdownMenuSubContent as yo,DropdownMenuSubTrigger as To,DropdownMenuRadioGroup as Mo}from"./drop-down.js";import{Card as bo,CardHeader as co,CardFooter as Go,CardTitle as vo,CardDescription as So,CardContent as Ao}from"./card.js";import{default as Bo}from"./Countdown.js";import{Carousel as Ho,CarouselContent as Lo,CarouselItem as ho,CarouselPrevious as Fo,CarouselNext as No}from"./carousel.js";import{Tabs as Eo,TabsList as jo,TabsTrigger as zo,TabsContent as qo}from"./tabs.js";import{Alert as Ko,AlertTitle as Qo,AlertDescription as Uo}from"./alert.js";import{default as Wo}from"./picture.js";import{default as Yo}from"./theme.js";import{default as _o}from"./board.js";import{default as or}from"./loadingDots.js";import{ExposureDetector as er}from"./ExposureDetector.js";import{default as pr}from"./brand-strip.js";import{default as nr}from"./progress.js";import{default as ur}from"./otp-input.js";import{sizeMap as lr}from"./button.js";export{Ko as Alert,Uo as AlertDescription,Qo as AlertTitle,ro as Avatar,to as AvatarFallback,eo as AvatarImage,p as Badge,_o as Board,pr as BrandStrip,e as Button,bo as Card,Ao as CardContent,So as CardDescription,Go as CardFooter,co as CardHeader,vo as CardTitle,Ho as Carousel,Lo as CarouselContent,ho as CarouselItem,No as CarouselNext,Fo as CarouselPrevious,d as Checkbox,j as Color,O as Container,Bo as Countdown,m as Dialog,C as DialogClose,w as DialogContent,M as DialogDescription,y as DialogFooter,P as DialogHeader,x as DialogOverlay,D as DialogPortal,T as DialogTitle,g as DialogTrigger,q as Drawer,U as DrawerClose,V as DrawerContent,Z as DrawerDescription,X as DrawerFooter,W as DrawerHeader,K as DrawerOverlay,J as DrawerPortal,Y as DrawerTitle,Q as DrawerTrigger,so as DropdownMenu,fo as DropdownMenuCheckboxItem,lo as DropdownMenuContent,go as DropdownMenuGroup,io as DropdownMenuItem,Do as DropdownMenuLabel,wo as DropdownMenuPortal,Mo as DropdownMenuRadioGroup,mo as DropdownMenuRadioItem,xo as DropdownMenuSeparator,Co as DropdownMenuShortcut,Po as DropdownMenuSub,yo as DropdownMenuSubContent,To as DropdownMenuSubTrigger,uo as DropdownMenuTrigger,er as ExposureDetector,H as Grid,L as GridItem,F as Heading,n as Input,ao as InputNumber,s as InputSlot,$ as Link,or as LoadingDots,ur as OtpInput,Wo as Picture,b as Popover,G as PopoverContent,c as PopoverTrigger,nr as Progress,S as RadioGroup,A as RadioGroupItem,i as Skeleton,Eo as Tabs,qo as TabsContent,jo as TabsList,zo as TabsTrigger,B as Text,Yo as Theme,lr as sizeMap};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/index.ts"],
4
- "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './grid.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport { default as Countdown, type CountdownProps } from './Countdown.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\nexport { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js'\nexport { default as BrandStrip } from './brand-strip.js'\nexport { default as Progress, type ProgressProps, type ProgressClassNames } from './progress.js'\nexport { default as OtpInput, type OtpInputProps } from './otp-input.js'\n\n// \u516C\uAC1C\u5BFC\u51FA button \u5185\u90E8\u5DE5\u5177\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u4F7F\u7528\uFF09\nexport { sizeMap } from './button.js'\nexport type { ButtonProps } from './button.js'\n"],
5
- "mappings": "AAAA,OAAoB,WAAXA,MAAyB,cAClC,OAAoB,WAAXA,MAAwB,aACjC,OAAS,SAAAC,EAAO,aAAAC,MAAiB,aAEjC,OAAoB,WAAXF,MAA2B,gBAEpC,OAAoB,WAAXA,MAA2B,gBACpC,OACE,UAAAG,EACA,gBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAS,WAAAC,EAAS,kBAAAC,EAAgB,kBAAAC,MAAsB,eACxD,OAAS,cAAAC,EAAY,kBAAAC,MAAsE,aAC3F,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,EAAM,YAAAC,MAAoD,YACnE,OAAS,WAAAC,MAAkC,eAC3C,OAAS,aAAAC,MAAsC,iBAC/C,OAAS,SAAAC,MAA8B,aACvC,OACE,UAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAoB,WAAXjC,MAAuC,YAChD,OAAS,UAAAkC,GAAQ,eAAAC,GAAa,kBAAAC,OAAsB,cACpD,OAAoB,WAAXpC,OAAqD,oBAC9D,OACE,gBAAAqC,GACA,uBAAAC,GACA,uBAAAC,GACA,oBAAAC,GACA,4BAAAC,GACA,yBAAAC,GACA,qBAAAC,GACA,yBAAAC,GACA,wBAAAC,GACA,qBAAAC,GACA,sBAAAC,GACA,mBAAAC,GACA,0BAAAC,GACA,0BAAAC,GACA,0BAAAC,OACK,iBACP,OAAS,QAAAC,GAAM,cAAAC,GAAY,cAAAC,GAAY,aAAAC,GAAW,mBAAAC,GAAiB,eAAAC,OAAmB,YACtF,OAAoB,WAAXzD,OAAiD,iBAC1D,OAEE,YAAA0D,GACA,mBAAAC,GACA,gBAAAC,GACA,oBAAAC,GACA,gBAAAC,OACK,gBACP,OAAS,QAAAC,GAAM,YAAAC,GAAU,eAAAC,GAAa,eAAAC,OAAmB,YACzD,OAAS,SAAAC,GAAO,cAAAC,GAAY,oBAAAC,OAAwB,aACpD,OAAoB,WAAXrE,OAA0B,eACnC,OAAoB,WAAXA,OAAwB,aACjC,OAAoB,WAAXA,OAAwB,aACjC,OAAoB,WAAXA,OAA8B,mBACvC,OAAS,oBAAAsE,OAAoD,wBAC7D,OAAoB,WAAXtE,OAA6B,mBACtC,OAAoB,WAAXA,OAAwE,gBACjF,OAAoB,WAAXA,OAA+C,iBAGxD,OAAS,WAAAuE,OAAe",
4
+ "sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './grid.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport { default as Countdown, type CountdownProps } from './Countdown.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board, type BoardProps } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\nexport { ExposureDetector, type ExposureDetectorProps } from './ExposureDetector.js'\nexport { default as BrandStrip } from './brand-strip.js'\nexport { default as Progress, type ProgressProps, type ProgressClassNames } from './progress.js'\nexport { default as OtpInput, type OtpInputProps } from './otp-input.js'\n\n// \u516C\uAC1C\u5BFC\u51FA button \u5185\u90E8\u5DE5\u5177\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u4F7F\u7528\uFF09\nexport { sizeMap } from './button.js'\nexport type { ButtonProps } from './button.js'\n"],
5
+ "mappings": "AAAA,OAAoB,WAAXA,MAAyB,cAClC,OAAoB,WAAXA,MAAwB,aACjC,OAAS,SAAAC,EAAO,aAAAC,MAAiB,aAEjC,OAAoB,WAAXF,MAA2B,gBAEpC,OAAoB,WAAXA,MAA2B,gBACpC,OACE,UAAAG,EACA,gBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAS,WAAAC,EAAS,kBAAAC,EAAgB,kBAAAC,MAAsB,eACxD,OAAS,cAAAC,EAAY,kBAAAC,MAAsE,aAC3F,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,EAAM,YAAAC,MAAoD,YACnE,OAAS,WAAAC,MAAkC,eAC3C,OAAS,aAAAC,MAAsC,iBAC/C,OAAS,SAAAC,MAA8B,aACvC,OACE,UAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAoB,WAAXjC,MAAuC,YAChD,OAAS,UAAAkC,GAAQ,eAAAC,GAAa,kBAAAC,OAAsB,cACpD,OAAoB,WAAXpC,OAAqD,oBAC9D,OACE,gBAAAqC,GACA,uBAAAC,GACA,uBAAAC,GACA,oBAAAC,GACA,4BAAAC,GACA,yBAAAC,GACA,qBAAAC,GACA,yBAAAC,GACA,wBAAAC,GACA,qBAAAC,GACA,sBAAAC,GACA,mBAAAC,GACA,0BAAAC,GACA,0BAAAC,GACA,0BAAAC,OACK,iBACP,OAAS,QAAAC,GAAM,cAAAC,GAAY,cAAAC,GAAY,aAAAC,GAAW,mBAAAC,GAAiB,eAAAC,OAAmB,YACtF,OAAoB,WAAXzD,OAAiD,iBAC1D,OAEE,YAAA0D,GACA,mBAAAC,GACA,gBAAAC,GACA,oBAAAC,GACA,gBAAAC,OACK,gBACP,OAAS,QAAAC,GAAM,YAAAC,GAAU,eAAAC,GAAa,eAAAC,OAAmB,YACzD,OAAS,SAAAC,GAAO,cAAAC,GAAY,oBAAAC,OAAwB,aACpD,OAAoB,WAAXrE,OAA0B,eACnC,OAAoB,WAAXA,OAAwB,aACjC,OAAoB,WAAXA,OAAyC,aAClD,OAAoB,WAAXA,OAA8B,mBACvC,OAAS,oBAAAsE,OAAoD,wBAC7D,OAAoB,WAAXtE,OAA6B,mBACtC,OAAoB,WAAXA,OAAwE,gBACjF,OAAoB,WAAXA,OAA+C,iBAGxD,OAAS,WAAAuE,OAAe",
6
6
  "names": ["default", "Input", "InputSlot", "Dialog", "DialogPortal", "DialogOverlay", "DialogClose", "DialogTrigger", "DialogContent", "DialogHeader", "DialogFooter", "DialogTitle", "DialogDescription", "Popover", "PopoverTrigger", "PopoverContent", "RadioGroup", "RadioGroupItem", "Text", "Grid", "GridItem", "Heading", "Container", "Color", "Drawer", "DrawerPortal", "DrawerOverlay", "DrawerTrigger", "DrawerClose", "DrawerContent", "DrawerHeader", "DrawerFooter", "DrawerTitle", "DrawerDescription", "Avatar", "AvatarImage", "AvatarFallback", "DropdownMenu", "DropdownMenuTrigger", "DropdownMenuContent", "DropdownMenuItem", "DropdownMenuCheckboxItem", "DropdownMenuRadioItem", "DropdownMenuLabel", "DropdownMenuSeparator", "DropdownMenuShortcut", "DropdownMenuGroup", "DropdownMenuPortal", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuRadioGroup", "Card", "CardHeader", "CardFooter", "CardTitle", "CardDescription", "CardContent", "Carousel", "CarouselContent", "CarouselItem", "CarouselPrevious", "CarouselNext", "Tabs", "TabsList", "TabsTrigger", "TabsContent", "Alert", "AlertTitle", "AlertDescription", "ExposureDetector", "sizeMap"]
7
7
  }
@@ -10,7 +10,6 @@ export interface StylesProps {
10
10
  uid?: string;
11
11
  disabled?: boolean;
12
12
  containerClassName?: string;
13
- idx?: string;
14
13
  }
15
14
  type LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps;
16
15
  type StaticComponentProperties<T> = Omit<T, keyof React.ComponentType<any> | 'displayName' | 'prototype'>;
@@ -1,2 +1,2 @@
1
- import{Fragment as O,jsx as s,jsxs as G}from"react/jsx-runtime";import m,{useMemo as u}from"react";import{simpleHash as f}from"./simpleHash.js";import S from"./getKeyPropsString.js";import{Grid as g,GridItem as b}from"../components/grid.js";import{Container as w}from"../components/container.js";import T from"./ErrorBoundary.js";const N={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},I={12:"tablet:col-start-1 tablet:col-end-13",10:"tablet:col-start-2 tablet:col-end-12",8:"tablet:col-start-3 tablet:col-end-11",6:"tablet:col-start-4 tablet:col-end-10",4:"tablet:col-start-5 tablet:col-end-9"},d=t=>{const n=S(t);return`style_${f(n)}`},k=t=>{const{style:n,uid:e,disabled:o,containerClassName:r,idx:a}=t;return{style:n,uid:e,disabled:o,containerClassName:r,idx:a}},h=({style:t,uid:n=d({}),disabled:e=!1})=>!t||e?null:s("style",{suppressHydrationWarning:!0,"data-style-id":n,dangerouslySetInnerHTML:{__html:`.block-${n} { ${t} }`}}),x=(t,n)=>{const e=u(()=>t?.uid||d({...t,...n??{}}),[n,t]),o=u(()=>s(h,{...t,uid:e}),[t,e]);return{className:`block-${e} `,StyleComponent:o,uid:e,idx:t?.idx}},$=t=>{const{desktopSpan:n,mobileSpan:e}=t||{},o=e?N[e]:"",r=n?I[n]:"";return`${o} ${r}`.trim()},j=t=>t?typeof t=="string"?t:typeof t=="object"&&Object.entries(t).length<=0?"":Object.entries(t).map(([n,e])=>`${n.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${e}`).join("; ")+";":"",L=(t,n)=>[t,n].map(j).filter(e=>!!e).map(e=>e.trim().endsWith(";")?e:`${e};`).join(" ");function E(t,n){const e=m.forwardRef((o,r)=>{const{container:a,containerClassName:i,className:c,...l}=o;if(!a||Reflect.ownKeys(a).length===0)return s(t,{...l,className:c,ref:r});const p=[n,i,c].filter(Boolean).join(" ").trim();return s(w,{className:p,children:s(g,{className:"container_grid",children:s(b,{className:$(a),children:s(t,{...l,ref:r})})})})});return e.displayName=`WithContainerLayout(${t.displayName||t.name||"Component"})`,e}function _(t,n){const e=m.forwardRef((o,r)=>{const a=k(o),i=L(n?.style,a.style),c={...n,...a,...i&&{style:i}},{className:l,StyleComponent:p,idx:y}=x(c,o.data),{style:A,uid:F,disabled:K,idx:v,className:C,...R}=o;return G(O,{children:[p,s(t,{...R,...y?{id:y}:{},className:[l,C].filter(Boolean).join(" ").trim(),ref:r})]})});return e.displayName=`WithStyleInjection(${t.displayName||t.name||"Component"})`,e}function B(t){const n=m.forwardRef((e,o)=>s(T,{children:s(t,{...e,ref:o})}));return n.displayName=`WithErrorBoundary(${t.displayName||t.name||"Component"})`,n}const P=new WeakMap;function z(t,n){if(P.has(t))return t;const e=B(_(E(t,n?.containerClassName),n));e.displayName=`WithLayout(${t.displayName||t.name||"Component"})`,P.set(t,!0);const o=e;return Object.getOwnPropertyNames(t).forEach(r=>{!(r in o)&&r!=="arguments"&&r!=="caller"&&r!=="length"&&r!=="name"&&(o[r]=t[r])}),o}export{k as getStylesProps,x as useStyles,z as withLayout};
1
+ import{Fragment as O,jsx as s,jsxs as G}from"react/jsx-runtime";import m,{useMemo as y}from"react";import{simpleHash as R}from"./simpleHash.js";import S from"./getKeyPropsString.js";import{Grid as g,GridItem as b}from"../components/grid.js";import{Container as w}from"../components/container.js";import T from"./ErrorBoundary.js";const N={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},I={12:"tablet:col-start-1 tablet:col-end-13",10:"tablet:col-start-2 tablet:col-end-12",8:"tablet:col-start-3 tablet:col-end-11",6:"tablet:col-start-4 tablet:col-end-10",4:"tablet:col-start-5 tablet:col-end-9"},d=t=>{const n=S(t);return`style_${R(n)}`},k=t=>{const{style:n,uid:e,disabled:o,containerClassName:r}=t;return{style:n,uid:e,disabled:o,containerClassName:r}},h=({style:t,uid:n=d({}),disabled:e=!1})=>!t||e?null:s("style",{suppressHydrationWarning:!0,"data-style-id":n,dangerouslySetInnerHTML:{__html:`.block-${n} { ${t} }`}}),$=(t,n)=>{const e=y(()=>t?.uid||d({...t,...n??{}}),[n,t]),o=y(()=>s(h,{...t,uid:e}),[t,e]);return{className:`block-${e} `,StyleComponent:o,uid:e,idx:n?.idx!=null?String(n.idx):void 0}},x=t=>{const{desktopSpan:n,mobileSpan:e}=t||{},o=e?N[e]:"",r=n?I[n]:"";return`${o} ${r}`.trim()},j=t=>t?typeof t=="string"?t:typeof t=="object"&&Object.entries(t).length<=0?"":Object.entries(t).map(([n,e])=>`${n.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${e}`).join("; ")+";":"",L=(t,n)=>[t,n].map(j).filter(e=>!!e).map(e=>e.trim().endsWith(";")?e:`${e};`).join(" ");function E(t,n){const e=m.forwardRef((o,r)=>{const{container:a,containerClassName:i,className:c,...l}=o;if(!a||Reflect.ownKeys(a).length===0)return s(t,{...l,className:c,ref:r});const p=[n,i,c].filter(Boolean).join(" ").trim();return s(w,{className:p,children:s(g,{className:"container_grid",children:s(b,{className:x(a),children:s(t,{...l,ref:r})})})})});return e.displayName=`WithContainerLayout(${t.displayName||t.name||"Component"})`,e}function B(t,n){const e=m.forwardRef((o,r)=>{const a=k(o),i=L(n?.style,a.style),c={...n,...a,...i&&{style:i}},{className:l,StyleComponent:p,idx:u}=$(c,o.data),{style:A,uid:F,disabled:K,className:C,...f}=o;return G(O,{children:[p,s(t,{...u?{id:u}:{},...f,className:[l,C].filter(Boolean).join(" ").trim(),ref:r})]})});return e.displayName=`WithStyleInjection(${t.displayName||t.name||"Component"})`,e}function _(t){const n=m.forwardRef((e,o)=>s(T,{children:s(t,{...e,ref:o})}));return n.displayName=`WithErrorBoundary(${t.displayName||t.name||"Component"})`,n}const P=new WeakMap;function q(t,n){if(P.has(t))return t;const e=_(B(E(t,n?.containerClassName),n));e.displayName=`WithLayout(${t.displayName||t.name||"Component"})`,P.set(t,!0);const o=e;return Object.getOwnPropertyNames(t).forEach(r=>{!(r in o)&&r!=="arguments"&&r!=="caller"&&r!=="length"&&r!=="name"&&(o[r]=t[r])}),o}export{k as getStylesProps,$ as useStyles,q as withLayout};
2
2
  //# sourceMappingURL=Styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/shared/Styles.tsx"],
4
- "sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/grid.js'\nimport { Container } from '../components/container.js'\nimport ErrorBoundary from './ErrorBoundary.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\n// \u9884\u5B9A\u4E49\u5E26 tablet \u524D\u7F00\u7684\u7C7B\u540D\uFF0C\u786E\u4FDD Tailwind \u53EF\u4EE5\u8BC6\u522B\nconst colContentClassesTablet: Record<number, string> = {\n 12: 'tablet:col-start-1 tablet:col-end-13',\n 10: 'tablet:col-start-2 tablet:col-end-12',\n 8: 'tablet:col-start-3 tablet:col-end-11',\n 6: 'tablet:col-start-4 tablet:col-end-10',\n 4: 'tablet:col-start-5 tablet:col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n desktopSpan: number\n mobileSpan: number\n }\n}\n\nexport interface StylesProps {\n style?: string | React.CSSProperties\n uid?: string\n disabled?: boolean\n containerClassName?: string\n idx?: string\n}\n\ntype LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps\n\ntype StaticComponentProperties<T> = Omit<T, keyof React.ComponentType<any> | 'displayName' | 'prototype'>\n\nconst generateUID = (props: Record<string, unknown>) => {\n const keyString = getKeyPropsString(props)\n return `style_${simpleHash(keyString)}`\n}\n\nexport const getStylesProps = <T extends StylesProps>(props: T): StylesProps => {\n const { style, uid, disabled, containerClassName, idx } = props\n return { style, uid, disabled, containerClassName, idx }\n}\n\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID({}), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return (\n <style\n suppressHydrationWarning\n data-style-id={uid}\n dangerouslySetInnerHTML={{ __html: `.block-${uid} { ${style} }` }}\n />\n )\n}\n\nexport const useStyles = (styleProps: Partial<StylesProps>, data?: Record<string, unknown>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID({ ...styleProps, ...(data ?? {}) }), [data, styleProps])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n idx: styleProps?.idx,\n } as const\n}\n\nconst getGridItemClassName = (container?: ContainerProps['container']) => {\n const { desktopSpan, mobileSpan } = container || {}\n const mobileClasses = mobileSpan ? colContentClasses[mobileSpan] : ''\n const desktopClasses = desktopSpan ? colContentClassesTablet[desktopSpan] : ''\n return `${mobileClasses} ${desktopClasses}`.trim()\n}\n\nconst styleToString = (style?: string | React.CSSProperties): string => {\n if (!style) return ''\n if (typeof style === 'string') return style\n if (typeof style === 'object' && Object.entries(style).length <= 0) return ''\n return (\n Object.entries(style)\n .map(([key, value]) => {\n const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase()\n return `${cssKey}: ${value}`\n })\n .join('; ') + ';'\n )\n}\n\nconst mergeStyles = (a?: string | React.CSSProperties, b?: string | React.CSSProperties): string =>\n [a, b]\n .map(styleToString)\n .filter((s): s is string => Boolean(s))\n .map(s => (s.trim().endsWith(';') ? s : `${s};`))\n .join(' ')\n\ntype InternalProps = StylesProps &\n ContainerProps & { className?: string; data?: Record<string, unknown> } & Record<string, unknown>\n\nfunction withContainerLayout(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultContainerClassName?: string\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n // eslint-disable-next-line no-unused-vars\n const { container, containerClassName, className, ...componentProps } = props\n\n if (!container || Reflect.ownKeys(container).length === 0) {\n return <WrappedComponent {...componentProps} className={className as string | undefined} ref={ref} />\n }\n\n const mergedContainerClassName = [defaultContainerClassName, containerClassName, className]\n .filter(Boolean)\n .join(' ')\n .trim()\n\n return (\n <Container className={mergedContainerClassName}>\n <Grid className=\"container_grid\">\n <GridItem className={getGridItemClassName(container as ContainerProps['container'])}>\n <WrappedComponent {...componentProps} ref={ref} />\n </GridItem>\n </Grid>\n </Container>\n )\n })\n\n Wrapped.displayName = `WithContainerLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withStyleInjection(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultStyleProps?: Partial<StylesProps>\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n const propsStyleProps = getStylesProps(props)\n const mergedStyle = mergeStyles(defaultStyleProps?.style, propsStyleProps.style)\n\n const finalStyleProps: StylesProps = {\n ...defaultStyleProps,\n ...propsStyleProps,\n ...(mergedStyle && { style: mergedStyle }),\n }\n\n const { className, StyleComponent, idx } = useStyles(\n finalStyleProps,\n props.data as Record<string, unknown> | undefined\n )\n\n // eslint-disable-next-line no-unused-vars\n const { style: _s, uid: _u, disabled: _d, idx: _idx, className: ownClassName, ...rest } = props\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent\n {...rest}\n {...(idx ? { id: idx } : {})}\n className={[className, ownClassName].filter(Boolean).join(' ').trim()}\n ref={ref}\n />\n </>\n )\n })\n\n Wrapped.displayName = `WithStyleInjection(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withErrorBoundary(WrappedComponent: React.ComponentType<InternalProps>): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => (\n <ErrorBoundary>\n <WrappedComponent {...props} ref={ref} />\n </ErrorBoundary>\n ))\n\n Wrapped.displayName = `WithErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nconst wrappedComponents = new WeakMap<React.ComponentType<never>, true>()\n\nexport function withLayout<T extends React.ComponentType<any>>(\n WrappedComponent: T,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n): React.ForwardRefExoticComponent<LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>> &\n StaticComponentProperties<T> {\n if (wrappedComponents.has(WrappedComponent as React.ComponentType<never>)) {\n return WrappedComponent as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n }\n\n const composed = withErrorBoundary(\n withStyleInjection(\n withContainerLayout(\n WrappedComponent as unknown as React.ComponentType<InternalProps>,\n defaultLayoutProps?.containerClassName\n ),\n defaultLayoutProps\n )\n )\n\n composed.displayName = `WithLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n\n wrappedComponents.set(WrappedComponent as React.ComponentType<never>, true)\n\n const result = composed as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n\n Object.getOwnPropertyNames(WrappedComponent).forEach(key => {\n if (!(key in result) && key !== 'arguments' && key !== 'caller' && key !== 'length' && key !== 'name') {\n ;(result as any)[key] = (WrappedComponent as any)[key]\n }\n })\n\n return result\n}\n"],
5
- "mappings": "AA2DI,OA2GE,YAAAA,EA3GF,OAAAC,EA2GE,QAAAC,MA3GF,oBA3DJ,OAAOC,GAAS,WAAAC,MAAe,QAC/B,OAAS,cAAAC,MAAkB,kBAC3B,OAAOC,MAAuB,yBAC9B,OAAS,QAAAC,EAAM,YAAAC,MAAgB,wBAC/B,OAAS,aAAAC,MAAiB,6BAC1B,OAAOC,MAAmB,qBAE1B,MAAMC,EAA4C,CAChD,GAAI,yBACJ,GAAI,yBACJ,EAAG,yBACH,EAAG,yBACH,EAAG,uBACL,EAGMC,EAAkD,CACtD,GAAI,uCACJ,GAAI,uCACJ,EAAG,uCACH,EAAG,uCACH,EAAG,qCACL,EAqBMC,EAAeC,GAAmC,CACtD,MAAMC,EAAYT,EAAkBQ,CAAK,EACzC,MAAO,SAAST,EAAWU,CAAS,CAAC,EACvC,EAEaC,EAAyCF,GAA0B,CAC9E,KAAM,CAAE,MAAAG,EAAO,IAAAC,EAAK,SAAAC,EAAU,mBAAAC,EAAoB,IAAAC,CAAI,EAAIP,EAC1D,MAAO,CAAE,MAAAG,EAAO,IAAAC,EAAK,SAAAC,EAAU,mBAAAC,EAAoB,IAAAC,CAAI,CACzD,EAEMC,EAAgC,CAAC,CAAE,MAAAL,EAAO,IAAAC,EAAML,EAAY,CAAC,CAAC,EAAG,SAAAM,EAAW,EAAM,IAClF,CAACF,GAASE,EACL,KAIPlB,EAAC,SACC,yBAAwB,GACxB,gBAAeiB,EACf,wBAAyB,CAAE,OAAQ,UAAUA,CAAG,MAAMD,CAAK,IAAK,EAClE,EAISM,EAAY,CAACC,EAAkCC,IAAmC,CAC7F,MAAMP,EAAMd,EAAQ,IAAMoB,GAAY,KAAOX,EAAY,CAAE,GAAGW,EAAY,GAAIC,GAAQ,CAAC,CAA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EAAkBlB,EAA0F,CACnH,MAAME,EAAUxC,EAAM,WAAmC,CAACW,EAAO8B,IAC/D3C,EAACS,EAAA,CACC,SAAAT,EAACwC,EAAA,CAAkB,GAAG3B,EAAO,IAAK8B,EAAK,EACzC,CACD,EAED,OAAAD,EAAQ,YAAc,qBAAqBF,EAAiB,aAAeA,EAAiB,MAAQ,WAAW,IACxGE,CACT,CAEA,MAAMiB,EAAoB,IAAI,QAEvB,SAASC,EACdpB,EACAqB,EAE6B,CAC7B,GAAIF,EAAkB,IAAInB,CAA8C,EACtE,OAAOA,EAMT,MAAMsB,EAAWJ,EACfX,EACER,EACEC,EACAqB,GAAoB,kBACtB,EACAA,CACF,CACF,EAEAC,EAAS,YAAc,cAActB,EAAiB,aAAeA,EAAiB,MAAQ,WAAW,IAEzGmB,EAAkB,IAAInB,EAAgD,EAAI,EAE1E,MAAMuB,EAASD,EAKf,cAAO,oBAAoBtB,CAAgB,EAAE,QAAQP,GAAO,CACtD,EAAEA,KAAO8B,IAAW9B,IAAQ,aAAeA,IAAQ,UAAYA,IAAQ,UAAYA,IAAQ,SAC3F8B,EAAe9B,CAAG,EAAKO,EAAyBP,CAAG,EAEzD,CAAC,EAEM8B,CACT",
6
- "names": ["Fragment", "jsx", "jsxs", "React", "useMemo", "simpleHash", "getKeyPropsString", "Grid", "GridItem", "Container", "ErrorBoundary", "colContentClasses", "colContentClassesTablet", "generateUID", "props", "keyString", "getStylesProps", "style", "uid", "disabled", "containerClassName", "idx", "Styles", "useStyles", "styleProps", "data", "StyleComponent", "getGridItemClassName", "container", "desktopSpan", "mobileSpan", "mobileClasses", "desktopClasses", "styleToString", "key", "value", "mergeStyles", "a", "b", "s", "withContainerLayout", "WrappedComponent", "defaultContainerClassName", "Wrapped", "ref", "className", "componentProps", "mergedContainerClassName", "withStyleInjection", "defaultStyleProps", "propsStyleProps", "mergedStyle", "finalStyleProps", "_s", "_u", "_d", "_idx", "ownClassName", "rest", "withErrorBoundary", "wrappedComponents", "withLayout", "defaultLayoutProps", "composed", "result"]
4
+ "sourcesContent": ["import React, { useMemo } from 'react'\nimport { simpleHash } from './simpleHash.js'\nimport getKeyPropsString from './getKeyPropsString.js'\nimport { Grid, GridItem } from '../components/grid.js'\nimport { Container } from '../components/container.js'\nimport ErrorBoundary from './ErrorBoundary.js'\n\nconst colContentClasses: Record<number, string> = {\n 12: 'col-start-1 col-end-13',\n 10: 'col-start-2 col-end-12',\n 8: 'col-start-3 col-end-11',\n 6: 'col-start-4 col-end-10',\n 4: 'col-start-5 col-end-9',\n} as const\n\n// \u9884\u5B9A\u4E49\u5E26 tablet \u524D\u7F00\u7684\u7C7B\u540D\uFF0C\u786E\u4FDD Tailwind \u53EF\u4EE5\u8BC6\u522B\nconst colContentClassesTablet: Record<number, string> = {\n 12: 'tablet:col-start-1 tablet:col-end-13',\n 10: 'tablet:col-start-2 tablet:col-end-12',\n 8: 'tablet:col-start-3 tablet:col-end-11',\n 6: 'tablet:col-start-4 tablet:col-end-10',\n 4: 'tablet:col-start-5 tablet:col-end-9',\n} as const\n\nexport interface ContainerProps {\n container?: {\n desktopSpan: number\n mobileSpan: number\n }\n}\n\nexport interface StylesProps {\n style?: string | React.CSSProperties\n uid?: string\n disabled?: boolean\n containerClassName?: string\n}\n\ntype LayoutProps<P> = Omit<P, keyof StylesProps | keyof ContainerProps> & StylesProps & ContainerProps\n\ntype StaticComponentProperties<T> = Omit<T, keyof React.ComponentType<any> | 'displayName' | 'prototype'>\n\nconst generateUID = (props: Record<string, unknown>) => {\n const keyString = getKeyPropsString(props)\n return `style_${simpleHash(keyString)}`\n}\n\nexport const getStylesProps = <T extends StylesProps>(props: T): StylesProps => {\n const { style, uid, disabled, containerClassName } = props\n return { style, uid, disabled, containerClassName }\n}\n\nconst Styles: React.FC<StylesProps> = ({ style, uid = generateUID({}), disabled = false }) => {\n if (!style || disabled) {\n return null\n }\n\n return (\n <style\n suppressHydrationWarning\n data-style-id={uid}\n dangerouslySetInnerHTML={{ __html: `.block-${uid} { ${style} }` }}\n />\n )\n}\n\nexport const useStyles = (styleProps: Partial<StylesProps>, data?: Record<string, unknown>) => {\n const uid = useMemo(() => styleProps?.uid || generateUID({ ...styleProps, ...(data ?? {}) }), [data, styleProps])\n\n const StyleComponent = useMemo(() => <Styles {...styleProps} uid={uid} />, [styleProps, uid])\n\n return {\n className: `block-${uid} `,\n StyleComponent,\n uid,\n idx: data?.idx != null ? String(data.idx) : undefined,\n } as const\n}\n\nconst getGridItemClassName = (container?: ContainerProps['container']) => {\n const { desktopSpan, mobileSpan } = container || {}\n const mobileClasses = mobileSpan ? colContentClasses[mobileSpan] : ''\n const desktopClasses = desktopSpan ? colContentClassesTablet[desktopSpan] : ''\n return `${mobileClasses} ${desktopClasses}`.trim()\n}\n\nconst styleToString = (style?: string | React.CSSProperties): string => {\n if (!style) return ''\n if (typeof style === 'string') return style\n if (typeof style === 'object' && Object.entries(style).length <= 0) return ''\n return (\n Object.entries(style)\n .map(([key, value]) => {\n const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase()\n return `${cssKey}: ${value}`\n })\n .join('; ') + ';'\n )\n}\n\nconst mergeStyles = (a?: string | React.CSSProperties, b?: string | React.CSSProperties): string =>\n [a, b]\n .map(styleToString)\n .filter((s): s is string => Boolean(s))\n .map(s => (s.trim().endsWith(';') ? s : `${s};`))\n .join(' ')\n\ntype InternalProps = StylesProps &\n ContainerProps & { className?: string; data?: Record<string, unknown> } & Record<string, unknown>\n\nfunction withContainerLayout(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultContainerClassName?: string\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n // eslint-disable-next-line no-unused-vars\n const { container, containerClassName, className, ...componentProps } = props\n\n if (!container || Reflect.ownKeys(container).length === 0) {\n return <WrappedComponent {...componentProps} className={className as string | undefined} ref={ref} />\n }\n\n const mergedContainerClassName = [defaultContainerClassName, containerClassName, className]\n .filter(Boolean)\n .join(' ')\n .trim()\n\n return (\n <Container className={mergedContainerClassName}>\n <Grid className=\"container_grid\">\n <GridItem className={getGridItemClassName(container as ContainerProps['container'])}>\n <WrappedComponent {...componentProps} ref={ref} />\n </GridItem>\n </Grid>\n </Container>\n )\n })\n\n Wrapped.displayName = `WithContainerLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withStyleInjection(\n WrappedComponent: React.ComponentType<InternalProps>,\n defaultStyleProps?: Partial<StylesProps>\n): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => {\n const propsStyleProps = getStylesProps(props)\n const mergedStyle = mergeStyles(defaultStyleProps?.style, propsStyleProps.style)\n\n const finalStyleProps: StylesProps = {\n ...defaultStyleProps,\n ...propsStyleProps,\n ...(mergedStyle && { style: mergedStyle }),\n }\n\n const { className, StyleComponent, idx } = useStyles(\n finalStyleProps,\n props.data as Record<string, unknown> | undefined\n )\n\n // eslint-disable-next-line no-unused-vars\n const { style: _s, uid: _u, disabled: _d, className: ownClassName, ...rest } = props\n\n return (\n <>\n {StyleComponent}\n <WrappedComponent\n {...(idx ? { id: idx } : {})}\n {...rest}\n className={[className, ownClassName].filter(Boolean).join(' ').trim()}\n ref={ref}\n />\n </>\n )\n })\n\n Wrapped.displayName = `WithStyleInjection(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nfunction withErrorBoundary(WrappedComponent: React.ComponentType<InternalProps>): React.ComponentType<InternalProps> {\n const Wrapped = React.forwardRef<unknown, InternalProps>((props, ref) => (\n <ErrorBoundary>\n <WrappedComponent {...props} ref={ref} />\n </ErrorBoundary>\n ))\n\n Wrapped.displayName = `WithErrorBoundary(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n return Wrapped as React.ComponentType<InternalProps>\n}\n\nconst wrappedComponents = new WeakMap<React.ComponentType<never>, true>()\n\nexport function withLayout<T extends React.ComponentType<any>>(\n WrappedComponent: T,\n defaultLayoutProps?: Partial<StylesProps & ContainerProps>\n): React.ForwardRefExoticComponent<LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>> &\n StaticComponentProperties<T> {\n if (wrappedComponents.has(WrappedComponent as React.ComponentType<never>)) {\n return WrappedComponent as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n }\n\n const composed = withErrorBoundary(\n withStyleInjection(\n withContainerLayout(\n WrappedComponent as unknown as React.ComponentType<InternalProps>,\n defaultLayoutProps?.containerClassName\n ),\n defaultLayoutProps\n )\n )\n\n composed.displayName = `WithLayout(${WrappedComponent.displayName || WrappedComponent.name || 'Component'})`\n\n wrappedComponents.set(WrappedComponent as React.ComponentType<never>, true)\n\n const result = composed as unknown as React.ForwardRefExoticComponent<\n LayoutProps<React.ComponentProps<T>> & React.RefAttributes<unknown>\n > &\n StaticComponentProperties<T>\n\n Object.getOwnPropertyNames(WrappedComponent).forEach(key => {\n if (!(key in result) && key !== 'arguments' && key !== 'caller' && key !== 'length' && key !== 'name') {\n ;(result as any)[key] = (WrappedComponent as any)[key]\n }\n })\n\n return result\n}\n"],
5
+ "mappings": "AA0DI,OA2GE,YAAAA,EA3GF,OAAAC,EA2GE,QAAAC,MA3GF,oBA1DJ,OAAOC,GAAS,WAAAC,MAAe,QAC/B,OAAS,cAAAC,MAAkB,kBAC3B,OAAOC,MAAuB,yBAC9B,OAAS,QAAAC,EAAM,YAAAC,MAAgB,wBAC/B,OAAS,aAAAC,MAAiB,6BAC1B,OAAOC,MAAmB,qBAE1B,MAAMC,EAA4C,CAChD,GAAI,yBACJ,GAAI,yBACJ,EAAG,yBACH,EAAG,yBACH,EAAG,uBACL,EAGMC,EAAkD,CACtD,GAAI,uCACJ,GAAI,uCACJ,EAAG,uCACH,EAAG,uCACH,EAAG,qCACL,EAoBMC,EAAeC,GAAmC,CACtD,MAAMC,EAAYT,EAAk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AAO8B,IAAW9B,IAAQ,aAAeA,IAAQ,UAAYA,IAAQ,UAAYA,IAAQ,SAC3F8B,EAAe9B,CAAG,EAAKO,EAAyBP,CAAG,EAEzD,CAAC,EAEM8B,CACT",
6
+ "names": ["Fragment", "jsx", "jsxs", "React", "useMemo", "simpleHash", "getKeyPropsString", "Grid", "GridItem", "Container", "ErrorBoundary", "colContentClasses", "colContentClassesTablet", "generateUID", "props", "keyString", "getStylesProps", "style", "uid", "disabled", "containerClassName", "Styles", "useStyles", "styleProps", "data", "StyleComponent", "getGridItemClassName", "container", "desktopSpan", "mobileSpan", "mobileClasses", "desktopClasses", "styleToString", "key", "value", "mergeStyles", "a", "b", "s", "withContainerLayout", "WrappedComponent", "defaultContainerClassName", "Wrapped", "ref", "className", "componentProps", "mergedContainerClassName", "withStyleInjection", "defaultStyleProps", "propsStyleProps", "mergedStyle", "finalStyleProps", "idx", "_s", "_u", "_d", "ownClassName", "rest", "withErrorBoundary", "wrappedComponents", "withLayout", "defaultLayoutProps", "composed", "result"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "1.3.45",
3
+ "version": "1.3.47",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",