@anker-in/headless-ui 0.0.27-alpha.97 → 0.0.27-alpha.99

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.
Files changed (49) hide show
  1. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  2. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  3. package/dist/cjs/biz-components/HeroBanner/types.d.ts +2 -0
  4. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  5. package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
  6. package/dist/cjs/biz-components/MemberEquity/index.js +3 -3
  7. package/dist/cjs/biz-components/MemberEquity/index.js.map +2 -2
  8. package/dist/cjs/biz-components/MemberEquity/types.d.ts +2 -2
  9. package/dist/cjs/biz-components/MemberEquity/types.js +1 -1
  10. package/dist/cjs/biz-components/MemberEquity/types.js.map +1 -1
  11. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  12. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  13. package/dist/cjs/biz-components/Slogan/index.js +1 -1
  14. package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
  15. package/dist/cjs/components/button.d.ts +1 -1
  16. package/dist/cjs/components/button.js.map +1 -1
  17. package/dist/cjs/components/text.js +1 -1
  18. package/dist/cjs/components/text.js.map +2 -2
  19. package/dist/cjs/stories/MemberEquity.stories.js +2 -2
  20. package/dist/cjs/stories/MemberEquity.stories.js.map +1 -1
  21. package/dist/cjs/stories/button.stories.d.ts +0 -1
  22. package/dist/cjs/stories/button.stories.js +1 -1
  23. package/dist/cjs/stories/button.stories.js.map +2 -2
  24. package/dist/cjs/stories/text.stories.d.ts +1 -0
  25. package/dist/cjs/stories/text.stories.js +2 -2
  26. package/dist/cjs/stories/text.stories.js.map +2 -2
  27. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  28. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  29. package/dist/esm/biz-components/HeroBanner/types.d.ts +2 -0
  30. package/dist/esm/biz-components/MemberEquity/index.js +4 -4
  31. package/dist/esm/biz-components/MemberEquity/index.js.map +2 -2
  32. package/dist/esm/biz-components/MemberEquity/types.d.ts +2 -2
  33. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  34. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  35. package/dist/esm/biz-components/Slogan/index.js +1 -1
  36. package/dist/esm/biz-components/Slogan/index.js.map +2 -2
  37. package/dist/esm/components/button.d.ts +1 -1
  38. package/dist/esm/components/button.js.map +1 -1
  39. package/dist/esm/components/text.js +1 -1
  40. package/dist/esm/components/text.js.map +2 -2
  41. package/dist/esm/stories/MemberEquity.stories.js +1 -1
  42. package/dist/esm/stories/MemberEquity.stories.js.map +1 -1
  43. package/dist/esm/stories/button.stories.d.ts +0 -1
  44. package/dist/esm/stories/button.stories.js +1 -1
  45. package/dist/esm/stories/button.stories.js.map +2 -2
  46. package/dist/esm/stories/text.stories.d.ts +1 -0
  47. package/dist/esm/stories/text.stories.js +2 -2
  48. package/dist/esm/stories/text.stories.js.map +2 -2
  49. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var E=Object.create;var u=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var U=(t,a)=>{for(var o in a)u(t,o,{get:a[o],enumerable:!0})},N=(t,a,o,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of L(a))!S.call(t,p)&&p!==o&&u(t,p,{get:()=>a[p],enumerable:!(i=I(a,p))||i.enumerable});return t};var H=(t,a,o)=>(o=t!=null?E(M(t)):{},N(a||!t||!t.__esModule?u(o,"default",{value:t,enumerable:!0}):o,t)),j=t=>N(u({},"__esModule",{value:!0}),t);var D={};U(D,{default:()=>A});module.exports=j(D);var e=require("react/jsx-runtime"),n=H(require("react")),B=require("@gsap/react"),d=H(require("gsap")),g=require("gsap/dist/ScrollTrigger"),r=require("../../components/index.js"),l=require("../../helpers/index.js"),P=require("../../shared/Styles.js");const w=n.default.forwardRef(({data:t,className:a},o)=>{const{title:i,subtitle:p,pcImage:z,mobileImage:R,primaryButton:b,secondaryButton:f,theme:T="light",caption:h=[]}=t,c=(0,n.useRef)(null),m=(0,n.useRef)(null);return(0,B.useGSAP)(()=>{if(!c.current)return;const v=m.current?.clientHeight||100;return window.innerHeight<=v?g.ScrollTrigger.create({trigger:m.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:s=>{const x=s.progress*40-20;d.default.set(c.current,{yPercent:x})}}):(g.ScrollTrigger.create({trigger:m.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:s=>{const x=s.progress*20-20;d.default.set(c.current,{yPercent:x})}}),g.ScrollTrigger.create({trigger:m.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:s=>{const x=s.progress*20;d.default.set(c.current,{yPercent:x})}})),()=>{g.ScrollTrigger.getAll().forEach(s=>s.kill())}},[]),(0,e.jsxs)("div",{ref:m,"data-ui-component-id":"HeroBanner",className:(0,l.cn)(T==="dark"?"aiui-dark":"","lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden",a),children:[(0,e.jsx)("div",{ref:c,className:(0,l.cn)("absolute left-0 top-0 size-full"),children:(0,e.jsx)(r.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",source:`${z.url||""} , ${R.url||""} 767`})}),(0,e.jsxs)("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] relative top-[48px] z-10 flex flex-col gap-[24px] px-[16px]",children:[i&&(0,e.jsxs)("div",{className:"laptop:text-left max-w-[686px]",children:[(0,e.jsx)(r.Heading,{as:"h1",size:5,className:(0,l.cn)("hero-banner-title"),html:i}),(0,e.jsx)(r.Text,{as:"p",className:(0,l.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]"),html:p})]}),(0,e.jsxs)("div",{className:"laptop:justify-start laptop:gap-4 flex items-center gap-3",children:[f&&f.text&&(0,e.jsx)(r.Button,{size:"lg",variant:"secondary",className:"hero-banner-secondary-button",children:f.text}),b&&b.text&&(0,e.jsx)(r.Button,{size:"lg",variant:"primary",className:"hero-banner-primary-button",children:b.text})]})]}),h.length>0&&(0,e.jsx)("div",{className:"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",children:h.map((v,y)=>(0,e.jsxs)(n.default.Fragment,{children:[(0,e.jsx)(r.Text,{className:(0,l.cn)("hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]"),html:v.title}),y<h.length-1&&(0,e.jsx)("div",{className:(0,l.cn)("bg-info-primary w-px")})]},y))})]})});w.displayName="HeroBanner";var A=(0,P.withStyles)(w);
1
+ "use strict";"use client";var E=Object.create;var b=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var U=(e,a)=>{for(var o in a)b(e,o,{get:a[o],enumerable:!0})},N=(e,a,o,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of L(a))!S.call(e,p)&&p!==o&&b(e,p,{get:()=>a[p],enumerable:!(i=I(a,p))||i.enumerable});return e};var H=(e,a,o)=>(o=e!=null?E(M(e)):{},N(a||!e||!e.__esModule?b(o,"default",{value:e,enumerable:!0}):o,e)),j=e=>N(b({},"__esModule",{value:!0}),e);var D={};U(D,{default:()=>A});module.exports=j(D);var t=require("react/jsx-runtime"),n=H(require("react")),B=require("@gsap/react"),f=H(require("gsap")),g=require("gsap/dist/ScrollTrigger"),r=require("../../components/index.js"),l=require("../../helpers/index.js"),z=require("../../shared/Styles.js");const w=n.default.forwardRef(({data:e,className:a},o)=>{const{title:i,subtitle:p,pcImage:P,mobileImage:R,primaryButton:u,secondaryButton:d,theme:T="light",caption:h=[]}=e,c=(0,n.useRef)(null),m=(0,n.useRef)(null);return(0,B.useGSAP)(()=>{if(!c.current)return;const v=m.current?.clientHeight||100;return window.innerHeight<=v?g.ScrollTrigger.create({trigger:m.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:s=>{const x=s.progress*40-20;f.default.set(c.current,{yPercent:x})}}):(g.ScrollTrigger.create({trigger:m.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:s=>{const x=s.progress*20-20;f.default.set(c.current,{yPercent:x})}}),g.ScrollTrigger.create({trigger:m.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:s=>{const x=s.progress*20;f.default.set(c.current,{yPercent:x})}})),()=>{g.ScrollTrigger.getAll().forEach(s=>s.kill())}},[]),(0,t.jsxs)("div",{ref:m,"data-ui-component-id":"HeroBanner",className:(0,l.cn)(T==="dark"?"aiui-dark":"","lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden",a),children:[(0,t.jsx)("div",{ref:c,className:(0,l.cn)("absolute left-0 top-0 size-full"),children:(0,t.jsx)(r.Picture,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",source:`${P.url||""} , ${R.url||""} 767`})}),(0,t.jsxs)("div",{className:"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] relative top-[48px] z-10 flex flex-col gap-[24px] px-[16px]",children:[i&&(0,t.jsxs)("div",{className:"laptop:text-left max-w-[686px]",children:[(0,t.jsx)(r.Heading,{as:"h1",size:5,className:(0,l.cn)("hero-banner-title"),html:i}),(0,t.jsx)(r.Text,{as:"p",size:3,className:(0,l.cn)("hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]"),html:p})]}),(0,t.jsxs)("div",{className:"laptop:justify-start laptop:gap-4 flex items-center gap-3",children:[d&&d.text&&(0,t.jsx)("a",{href:d.link,children:(0,t.jsx)(r.Button,{size:"lg",variant:"secondary",className:"hero-banner-secondary-button",children:d.text})}),u&&u.text&&(0,t.jsx)("a",{href:u.link,children:(0,t.jsx)(r.Button,{size:"lg",variant:"primary",className:"hero-banner-primary-button",children:u.text})})]})]}),h.length>0&&(0,t.jsx)("div",{className:"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",children:h.map((v,y)=>(0,t.jsxs)(n.default.Fragment,{children:[(0,t.jsx)(r.Text,{size:3,className:(0,l.cn)("hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]"),html:v.title}),y<h.length-1&&(0,t.jsx)("div",{className:(0,l.cn)("bg-info-primary w-px")})]},y))})]})});w.displayName="HeroBanner";var A=(0,z.withStyles)(w);
2
2
  //# sourceMappingURL=HeroBanner.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/HeroBanner.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\n// eslint-disable-next-line no-unused-vars\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, pcImage, mobileImage, primaryButton, secondaryButton, theme = 'light', caption = [] } = data\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n useGSAP(() => {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n return () => {\n ScrollTrigger.getAll().forEach((t: any) => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={boxRef}\n data-ui-component-id=\"HeroBanner\"\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n source={`${pcImage.url || ''} , ${mobileImage.url || ''} 767`}\n />\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] relative top-[48px] z-10 flex flex-col gap-[24px] px-[16px]\">\n {title && (\n <div className=\"laptop:text-left max-w-[686px]\">\n <Heading as=\"h1\" size={5} className={cn('hero-banner-title')} html={title} />\n <Text\n as=\"p\"\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]'\n )}\n html={subtitle}\n />\n </div>\n )}\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"laptop:justify-start laptop:gap-4 flex items-center gap-3\">\n {secondaryButton && secondaryButton.text && (\n <Button size=\"lg\" variant=\"secondary\" className=\"hero-banner-secondary-button\">\n {secondaryButton.text}\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button size=\"lg\" variant=\"primary\" className=\"hero-banner-primary-button\">\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {caption.length > 0 && (\n <div className=\"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c, index) => (\n <React.Fragment key={index}>\n <Text\n className={cn(\n 'hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]'\n )}\n html={c.title}\n />\n {index < caption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withStyles(Hero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} from 'react'\nimport { useGSAP } from '@gsap/react'\nimport gsap from 'gsap'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport type { HeroBannerProps } from './types.js'\nimport { Button, Heading, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport { withStyles } from '../../shared/Styles.js'\n\n// eslint-disable-next-line no-unused-vars\nconst HeroBanner = React.forwardRef<HTMLDivElement, HeroBannerProps>(({ data, className }, ref) => {\n const { title, subtitle, pcImage, mobileImage, primaryButton, secondaryButton, theme = 'light', caption = [] } = data\n\n const bgRef = useRef<HTMLImageElement>(null)\n const boxRef = useRef<HTMLDivElement>(null)\n\n useGSAP(() => {\n if (!bgRef.current) return\n const clientHeight = boxRef.current?.clientHeight || 100\n const screenHeight = window.innerHeight\n\n if (screenHeight <= clientHeight) {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 40\n const value = self.progress * base - base / 2\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n } else {\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top bottom',\n end: 'bottom bottom',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base - base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n ScrollTrigger.create({\n trigger: boxRef.current,\n start: 'top top',\n end: 'bottom top',\n scrub: true,\n onUpdate: (self: any) => {\n const base = 20\n const value = self.progress * base\n gsap.set(bgRef.current, { yPercent: value })\n },\n })\n }\n return () => {\n ScrollTrigger.getAll().forEach((t: any) => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={boxRef}\n data-ui-component-id=\"HeroBanner\"\n className={cn(\n theme === 'dark' ? 'aiui-dark' : '',\n 'lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] text-info-primary relative aspect-[390/660] w-full overflow-hidden',\n className\n )}\n >\n <div ref={bgRef} className={cn('absolute left-0 top-0 size-full')}>\n <Picture\n className=\"laptop:w-full h-full\"\n imgClassName=\"h-full object-cover\"\n source={`${pcImage.url || ''} , ${mobileImage.url || ''} 767`}\n />\n </div>\n\n {/* \u5185\u5BB9\u533A\u57DF */}\n <div className=\"laptop:top-1/2 laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] lg-desktop:gap-[32px] relative top-[48px] z-10 flex flex-col gap-[24px] px-[16px]\">\n {title && (\n <div className=\"laptop:text-left max-w-[686px]\">\n <Heading as=\"h1\" size={5} className={cn('hero-banner-title')} html={title} />\n <Text\n as=\"p\"\n size={3}\n className={cn(\n 'hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]'\n )}\n html={subtitle}\n />\n </div>\n )}\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"laptop:justify-start laptop:gap-4 flex items-center gap-3\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button size=\"lg\" variant=\"secondary\" className=\"hero-banner-secondary-button\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button size=\"lg\" variant=\"primary\" className=\"hero-banner-primary-button\">\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n\n {/* \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */}\n {caption.length > 0 && (\n <div className=\"laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]\">\n {caption.map((c, index) => (\n <React.Fragment key={index}>\n <Text\n size={3}\n className={cn(\n 'hero-banner-product-text lg-desktop:text-[14px] tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] flex-1 text-[12px] leading-[1.2] tracking-[-0.02em]'\n )}\n html={c.title}\n />\n {index < caption.length - 1 && <div className={cn('bg-info-primary w-px')} />}\n </React.Fragment>\n ))}\n </div>\n )}\n </div>\n )\n})\n\nHeroBanner.displayName = 'HeroBanner'\n\nexport default withStyles(HeroBanner)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA0EQ,IAAAI,EAAA,6BAzERC,EAA8B,oBAC9BA,EAAwB,uBACxBC,EAAiB,mBACjBC,EAA8B,mCAE9BC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAG3B,MAAMC,EAAa,EAAAC,QAAM,WAA4C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACjG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,YAAAC,EAAa,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAQ,QAAS,QAAAC,EAAU,CAAC,CAAE,EAAIV,EAE3GW,KAAQ,UAAyB,IAAI,EACrCC,KAAS,UAAuB,IAAI,EAE1C,oBAAQ,IAAM,CACZ,GAAI,CAACD,EAAM,QAAS,OACpB,MAAME,EAAeD,EAAO,SAAS,cAAgB,IAGrD,OAFqB,OAAO,aAERC,EAClB,gBAAc,OAAO,CACnB,QAASD,EAAO,QAChB,MAAO,aACP,IAAK,aACL,MAAO,GACP,SAAWE,GAAc,CAEvB,MAAMC,EAAQD,EAAK,SAAW,GAAO,GACrC,EAAAE,QAAK,IAAIL,EAAM,QAAS,CAAE,SAAUI,CAAM,CAAC,CAC7C,CACF,CAAC,GAED,gBAAc,OAAO,CACnB,QAASH,EAAO,QAChB,MAAO,aACP,IAAK,gBACL,MAAO,GACP,SAAWE,GAAc,CAEvB,MAAMC,EAAQD,EAAK,SAAW,GAAO,GACrC,EAAAE,QAAK,IAAIL,EAAM,QAAS,CAAE,SAAUI,CAAM,CAAC,CAC7C,CACF,CAAC,EACD,gBAAc,OAAO,CACnB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T,8KACF,EACA,KAAMmB,EAAE,MACV,EACCC,EAAQT,EAAQ,OAAS,MAAK,OAAC,OAAI,aAAW,MAAG,sBAAsB,EAAG,IARxDS,CASrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDrB,EAAW,YAAc,aAEzB,IAAOT,KAAQ,cAAWS,CAAU",
6
6
  "names": ["HeroBanner_exports", "__export", "HeroBanner_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_ScrollTrigger", "import_components", "import_helpers", "import_Styles", "HeroBanner", "React", "data", "className", "ref", "title", "subtitle", "pcImage", "mobileImage", "primaryButton", "secondaryButton", "theme", "caption", "bgRef", "boxRef", "clientHeight", "self", "value", "gsap", "t", "c", "index"]
7
7
  }
@@ -11,10 +11,12 @@ export interface HeroBannerProps {
11
11
  /** 主按钮文本和配置 */
12
12
  primaryButton?: {
13
13
  text: string;
14
+ link?: string;
14
15
  } & Omit<ButtonProps, 'children'>;
15
16
  /** 次要按钮文本和配置 */
16
17
  secondaryButton?: {
17
18
  text: string;
19
+ link?: string;
18
20
  } & Omit<ButtonProps, 'children'>;
19
21
  /** 主题 */
20
22
  theme?: Theme;
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var m=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!a.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(i=s(t,r))||i.enumerable});return e};var c=e=>m(o({},"__esModule",{value:!0}),e);var g={};module.exports=c(g);
1
+ "use strict";var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var m=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!a.call(e,r)&&r!==o&&n(e,r,{get:()=>t[r],enumerable:!(i=s(t,r))||i.enumerable});return e};var g=e=>m(n({},"__esModule",{value:!0}),e);var l={};module.exports=g(l);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeroBanner/types.ts"],
4
- "sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Media, Theme } from '../../types/props.js'\n\nexport interface HeroBannerProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0\u6587\u672C */\n subtitle: string\n pcImage: Media\n mobileImage: Media\n /** \u4E3B\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n primaryButton?: {\n text: string\n } & Omit<ButtonProps, 'children'>\n /** \u6B21\u8981\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n secondaryButton?: {\n text: string\n } & Omit<ButtonProps, 'children'>\n\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */\n caption?: Array<{\n title: string\n }>\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { ButtonProps } from '../../components/button.js'\nimport type { Media, Theme } from '../../types/props.js'\n\nexport interface HeroBannerProps {\n data: {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898/\u63CF\u8FF0\u6587\u672C */\n subtitle: string\n pcImage: Media\n mobileImage: Media\n /** \u4E3B\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n primaryButton?: {\n text: string\n link?: string\n } & Omit<ButtonProps, 'children'>\n /** \u6B21\u8981\u6309\u94AE\u6587\u672C\u548C\u914D\u7F6E */\n secondaryButton?: {\n text: string\n link?: string\n } & Omit<ButtonProps, 'children'>\n\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u5E95\u90E8\u4EA7\u54C1\u5217\u8868 */\n caption?: Array<{\n title: string\n }>\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,10 +1,10 @@
1
- "use strict";"use client";var r=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var k=(a,t)=>{for(var p in t)r(a,p,{get:t[p],enumerable:!0})},h=(a,t,p,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of x(t))!f.call(a,o)&&o!==p&&r(a,o,{get:()=>t[o],enumerable:!(i=v(t,o))||i.enumerable});return a};var N=a=>h(r({},"__esModule",{value:!0}),a);var C={};k(C,{default:()=>B});module.exports=N(C);var e=require("react/jsx-runtime"),w=require("react"),l=require("../../components/index.js"),d=require("../../shared/Styles.js"),s=require("../../helpers/utils.js");const q=({data:a,className:t=""})=>{const{title:p,description:i,backgroundImage:o,mobileBackgroundImage:m,primaryButton:n,secondaryButton:c,theme:u,shape:b}=a,y=()=>{},g=()=>{};return(0,e.jsxs)("section",{"data-ui-component-id":"MemberEquity",className:(0,s.cn)(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
- aspect-[390/480] overflow-hidden`,t,{"aiui-dark":u==="dark","rounded-box":b==="rounded"}),children:[(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:(0,e.jsx)("source",{src:o?.url,type:"video/mp4"})}),(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:(0,e.jsx)("source",{src:m?.url,type:"video/mp4"})}),(0,e.jsx)("div",{className:`
1
+ "use strict";"use client";var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var k=(a,t)=>{for(var i in t)d(a,i,{get:t[i],enumerable:!0})},h=(a,t,i,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f(t))!v.call(a,o)&&o!==i&&d(a,o,{get:()=>t[o],enumerable:!(p=x(t,o))||p.enumerable});return a};var N=a=>h(d({},"__esModule",{value:!0}),a);var C={};k(C,{default:()=>B});module.exports=N(C);var e=require("react/jsx-runtime"),w=require("react"),l=require("../../components/index.js"),m=require("../../shared/Styles.js"),n=require("../../helpers/utils.js");const q=({data:a,className:t=""})=>{const{title:i,description:p,backgroundImage:o,mobileBackgroundImage:c,primaryButton:s,secondaryButton:r,theme:u,shape:b}=a,y=()=>{},g=()=>{};return(0,e.jsxs)("section",{"data-ui-component-id":"MemberEquity",className:(0,n.cn)(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
+ aspect-[390/480] overflow-hidden`,t,{"aiui-dark":u==="dark","rounded-box":b==="rounded"}),children:[(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:(0,e.jsx)("source",{src:o?.url,type:"video/mp4"})}),(0,e.jsx)("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:(0,e.jsx)("source",{src:c?.url,type:"video/mp4"})}),(0,e.jsx)("div",{className:`
3
3
  laptop:items-center
4
4
  absolute
5
5
  inset-0 flex w-full items-end
6
6
  `,children:(0,e.jsxs)("div",{className:`
7
7
  tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6
8
8
  desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-4 px-4
9
- `,children:[(0,e.jsxs)("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[(0,e.jsx)(l.Heading,{as:"h2",size:3,className:"member-equity-title ",html:p}),(0,e.jsx)(l.Text,{size:2,className:"member-equity-description",html:i})]}),(0,e.jsxs)("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[(0,e.jsx)(l.Button,{variant:"secondary",onClick:g,className:(0,s.cn)("member-equity-button-secondary"),children:c.text}),(0,e.jsx)(l.Button,{variant:"primary",onClick:y,className:(0,s.cn)("member-equity-button-primary"),children:n.text})]})]})})]})};var B=(0,d.withStyles)(q);
9
+ `,children:[(0,e.jsxs)("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[(0,e.jsx)(l.Heading,{as:"h2",size:3,className:"member-equity-title ",html:i}),(0,e.jsx)(l.Text,{size:2,className:"member-equity-description",html:p})]}),(0,e.jsxs)("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[r&&r.text&&(0,e.jsx)("a",{href:r.link,children:(0,e.jsx)(l.Button,{variant:"secondary",onClick:g,className:(0,n.cn)("member-equity-button-secondary"),children:r.text})}),s&&s.text&&(0,e.jsx)("a",{href:s.link,children:(0,e.jsx)(l.Button,{variant:"primary",onClick:y,className:(0,n.cn)("member-equity-button-primary"),children:s.text})})]})]})})]})};var B=(0,m.withStyles)(q);
10
10
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MemberEquity/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\nimport { Button, Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { MemberEquityProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\n\nconst MemberEquity: React.FC<MemberEquityProps> = ({ data, className = '' }) => {\n const { title, description, backgroundImage, mobileBackgroundImage, primaryButton, secondaryButton, theme, shape } =\n data\n const handleButtonPrimaryClick = () => {\n // \u6267\u884C\u4E3B\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n const handleButtonSecondaryClick = () => {\n // \u6267\u884C\u526F\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n return (\n <section\n data-ui-component-id=\"MemberEquity\"\n className={cn(\n `tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative\n aspect-[390/480] overflow-hidden`,\n className,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n }\n )}\n >\n <video autoPlay muted playsInline loop className=\"tablet:block absolute inset-0 hidden size-full object-cover\">\n <source src={backgroundImage?.url} type=\"video/mp4\" />\n </video>\n <video autoPlay muted playsInline loop className=\"tablet:hidden absolute inset-0 size-full object-cover\">\n <source src={mobileBackgroundImage?.url} type=\"video/mp4\" />\n </video>\n <div\n className={`\n laptop:items-center \n absolute\n inset-0 flex w-full items-end\n `}\n >\n <div\n className={`\n tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6\n desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-4 px-4\n `}\n >\n <div className=\"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2\">\n <Heading as=\"h2\" size={3} className={`member-equity-title `} html={title} />\n <Text size={2} className={`member-equity-description`} html={description} />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3\">\n <Button\n variant=\"secondary\"\n onClick={handleButtonSecondaryClick}\n className={cn('member-equity-button-secondary')}\n >\n {secondaryButton.text}\n </Button>\n <Button variant=\"primary\" onClick={handleButtonPrimaryClick} className={cn('member-equity-button-primary')}>\n {primaryButton.text}\n </Button>\n </div>\n </div>\n </div>\n </section>\n )\n}\n\nexport default withStyles(MemberEquity)\n"],
5
- "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgCQ,IAAAI,EAAA,6BA/BRC,EAAkB,iBACl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use client'\nimport React from 'react'\nimport { Button, Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { MemberEquityProps } from './types.js'\nimport { cn } from '../../helpers/utils.js'\n\nconst MemberEquity: React.FC<MemberEquityProps> = ({ data, className = '' }) => {\n const { title, description, backgroundImage, mobileBackgroundImage, primaryButton, secondaryButton, theme, shape } =\n data\n const handleButtonPrimaryClick = () => {\n // \u6267\u884C\u4E3B\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n const handleButtonSecondaryClick = () => {\n // \u6267\u884C\u526F\u6309\u94AE\u7684\u70B9\u51FB\u4E8B\u4EF6\n }\n\n return (\n <section\n data-ui-component-id=\"MemberEquity\"\n className={cn(\n `tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative\n aspect-[390/480] overflow-hidden`,\n className,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n }\n )}\n >\n <video autoPlay muted playsInline loop className=\"tablet:block absolute inset-0 hidden size-full object-cover\">\n <source src={backgroundImage?.url} type=\"video/mp4\" />\n </video>\n <video autoPlay muted playsInline loop className=\"tablet:hidden absolute inset-0 size-full object-cover\">\n <source src={mobileBackgroundImage?.url} type=\"video/mp4\" />\n </video>\n <div\n className={`\n laptop:items-center \n absolute\n inset-0 flex w-full items-end\n `}\n >\n <div\n className={`\n tablet:px-6 laptop:px-[76px] desktop:px-[111px] lg-desktop:px-[139px] tablet:gap-5 laptop:gap-6\n desktop:gap-7 lg-desktop:gap-8 flex w-full flex-col gap-4 px-4\n `}\n >\n <div className=\"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2\">\n <Heading as=\"h2\" size={3} className={`member-equity-title `} html={title} />\n <Text size={2} className={`member-equity-description`} html={description} />\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button\n variant=\"secondary\"\n onClick={handleButtonSecondaryClick}\n className={cn('member-equity-button-secondary')}\n >\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button\n variant=\"primary\"\n onClick={handleButtonPrimaryClick}\n className={cn('member-equity-button-primary')}\n >\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n </section>\n )\n}\n\nexport default withStyles(MemberEquity)\n"],
5
+ "mappings": "sbAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgCQ,IAAAI,EAAA,6BA/BRC,EAAkB,iBAClBC,EAAsC,qCACtCC,EAA2B,kCAE3BC,EAAmB,kCAEnB,MAAMC,EAA4C,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAY,EAAG,IAAM,CAC9E,KAAM,CAAE,MAAAC,EAAO,YAAAC,EAAa,gBAAAC,EAAiB,sBAAAC,EAAuB,cAAAC,EAAe,gBAAAC,EAAiB,MAAAC,EAAO,MAAAC,CAAM,EAC/GT,EACIU,EAA2B,IAAM,CAEvC,EAEMC,EAA6B,IAAM,CAEzC,EAEA,SACE,QAAC,WACC,uBAAqB,eACrB,aAAW,MACT;AAAA,0CAEAV,EACA,CACE,YAAaO,IAAU,OACvB,cAAeC,IAAU,SAC3B,CACF,EAEA,oBAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,8DAC/C,mBAAC,UAAO,IAAKL,GAAiB,IAAK,KAAK,YAAY,EACtD,KACA,OAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,wDAC/C,mBAAC,UAAO,IAAKC,GAAuB,IAAK,KAAK,YAAY,EAC5D,KACA,OAAC,OACC,UAAW;AAAA;AAAA;AAAA;AAAA,QAMX,oBAAC,OACC,UAAW;AAAA;AAAA;AAAA,UAKX,qBAAC,OAAI,UAAU,+EACb,oBAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,UAAW,uBAAwB,KAAMH,EAAO,KAC1E,OAAC,QAAK,KAAM,EAAG,UAAW,4BAA6B,KAAMC,EAAa,GAC5E,KAEA,QAAC,OAAI,UAAU,mFACZ,UAAAI,GAAmBA,EAAgB,SAClC,OAAC,KAAE,KAAMA,EAAgB,KACvB,mBAAC,UACC,QAAQ,YACR,QAASI,EACT,aAAW,MAAG,gCAAgC,EAE7C,SAAAJ,EAAgB,KACnB,EACF,EAEDD,GAAiBA,EAAc,SAC9B,OAAC,KAAE,KAAMA,EAAc,KACrB,mBAAC,UACC,QAAQ,UACR,QAASI,EACT,aAAW,MAAG,8BAA8B,EAE3C,SAAAJ,EAAc,KACjB,EACF,GAEJ,GACF,EACF,GACF,CAEJ,EAEA,IAAOd,KAAQ,cAAWO,CAAY",
6
6
  "names": ["MemberEquity_exports", "__export", "MemberEquity_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_Styles", "import_utils", "MemberEquity", "data", "className", "title", "description", "backgroundImage", "mobileBackgroundImage", "primaryButton", "secondaryButton", "theme", "shape", "handleButtonPrimaryClick", "handleButtonSecondaryClick"]
7
7
  }
@@ -11,12 +11,12 @@ export interface MemberEquityProps extends ComponentCommonProps {
11
11
  /** 主按钮配置 */
12
12
  primaryButton: {
13
13
  text: string;
14
- href: string;
14
+ link?: string;
15
15
  };
16
16
  /** 副按钮配置 */
17
17
  secondaryButton: {
18
18
  text: string;
19
- href: string;
19
+ link?: string;
20
20
  };
21
21
  /** 形状 */
22
22
  shape?: Shape;
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of a(e))!m.call(t,r)&&r!==s&&n(t,r,{get:()=>e[r],enumerable:!(o=i(e,r))||o.enumerable});return t};var g=t=>p(n({},"__esModule",{value:!0}),t);var d={};module.exports=g(d);
1
+ "use strict";var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!m.call(t,n)&&n!==i&&r(t,n,{get:()=>e[n],enumerable:!(o=s(e,n))||o.enumerable});return t};var g=t=>p(r({},"__esModule",{value:!0}),t);var d={};module.exports=g(d);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MemberEquity/types.ts"],
4
- "sourcesContent": ["import type { ComponentCommonProps, Media, Shape, Theme } from '../../types/props.js'\n\nexport interface MemberEquityProps extends ComponentCommonProps {\n data: {\n /** \u6807\u9898 */\n title: string\n /** \u63CF\u8FF0\u6587\u672C */\n description: string\n /** \u80CC\u666F\u56FE\u7247/\u89C6\u9891 URL */\n backgroundImage?: Media\n mobileBackgroundImage?: Media\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton: {\n text: string\n href: string\n }\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton: {\n text: string\n href: string\n }\n /** \u5F62\u72B6 */\n shape?: Shape\n /** \u4E3B\u9898 */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { ComponentCommonProps, Media, Shape, Theme } from '../../types/props.js'\n\nexport interface MemberEquityProps extends ComponentCommonProps {\n data: {\n /** \u6807\u9898 */\n title: string\n /** \u63CF\u8FF0\u6587\u672C */\n description: string\n /** \u80CC\u666F\u56FE\u7247/\u89C6\u9891 URL */\n backgroundImage?: Media\n mobileBackgroundImage?: Media\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton: {\n text: string\n link?: string\n }\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton: {\n text: string\n link?: string\n }\n /** \u5F62\u72B6 */\n shape?: Shape\n /** \u4E3B\u9898 */\n theme?: Theme\n }\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var L=Object.create;var y=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var z=(s,o)=>{for(var a in o)y(s,a,{get:o[a],enumerable:!0})},C=(s,o,a,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of P(o))!q.call(s,i)&&i!==a&&y(s,i,{get:()=>o[i],enumerable:!(m=S(o,i))||m.enumerable});return s};var N=(s,o,a)=>(a=s!=null?L(R(s)):{},C(o||!s||!s.__esModule?y(a,"default",{value:s,enumerable:!0}):a,s)),H=s=>C(y({},"__esModule",{value:!0}),s);var O={};z(O,{default:()=>E});module.exports=H(O);var e=require("react/jsx-runtime"),v=N(require("react")),T=require("react-responsive"),w=require("../../shared/Styles.js"),B=N(require("../../components/picture.js")),g=N(require("../../components/button.js")),I=require("../../components/heading.js"),G=require("../../components/text.js"),r=require("../../components/carousel.js"),d=require("../../components/gird.js"),$=N(require("../Title/index.js")),M=require("../../helpers/utils.js"),u=require("../../components/tabs.js");const x=({item:s,shape:o="square",isTab:a=!1})=>{const m=(0,T.useMediaQuery)({query:"(max-width: 1024px)"}),{theme:i="light",title:h,description:n,imageUrl:f,primaryButton:c,secondaryButton:b}=s,t="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,M.cn)("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":o==="rounded","aiui-dark":i==="dark","h-[480px]":m&&!a,"h-[400px]":m&&a},"text-info-primary"),children:[(0,e.jsx)(B.default,{source:f?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${f?.width}/${f?.height}`}}),(0,e.jsxs)("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)(I.Heading,{size:3,className:"item-title",html:h}),(0,e.jsx)(G.Text,{className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3",html:n})]}),(0,e.jsxs)("div",{className:"flex gap-[16px]",children:[b&&(0,e.jsx)(g.default,{className:t,variant:"secondary",asChild:!0,children:(0,e.jsx)("a",{href:b.link,children:b.text})}),c&&(0,e.jsx)(g.default,{className:t,variant:"primary",asChild:!0,children:(0,e.jsx)("a",{href:c.link,children:c.text})})]})]})]})},D=v.default.forwardRef((s,o)=>{const{shape:a,sectionTitle:m,groupByTab:i=!1,items:h=[],carousel:n}=s.data,f=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},c=h.map(t=>t.tabName).filter(Boolean).filter((t,l,p)=>p.indexOf(t)===l),b=c.map(t=>({tabName:t,items:h.filter(l=>l.tabName===t)})).reduce((t,l)=>(t[l.tabName]=l.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:o,className:"text-info-primary",children:[m&&(0,e.jsx)($.default,{data:{title:m},className:"section-title"}),i?(0,e.jsxs)(u.Tabs,{shape:a,align:"left",defaultValue:c[0],children:[(0,e.jsx)(u.TabsList,{children:c.map((t,l)=>(0,e.jsx)(u.TabsTrigger,{value:t,children:t},l))}),c.map((t,l)=>(0,e.jsx)(u.TabsContent,{value:t,className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(d.Grid,{className:"w-full",children:[b[t].map((p,k)=>(0,e.jsx)(d.GridItem,{span:f(p.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(x,{item:p,shape:a,isTab:i})},`${p?.title||""}${k}`)),(0,e.jsx)(d.GridItem,{className:"laptop:hidden block",span:12,children:(0,e.jsx)(r.Carousel,{className:"",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:b[t].map((p,k)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(x,{item:p,shape:a,isTab:i})},`${p?.title||""}${k}`))})})})]}),n&&n?.items.length>0?(0,e.jsx)(r.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:n.items.map((p,k)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(x,{item:p,shape:a,isTab:i})},k))})}):null]})},l))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(d.Grid,{className:"w-full",children:[h.map((t,l)=>(0,e.jsx)(d.GridItem,{span:f(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(x,{item:t,shape:a})},`${t?.title||""}${l}`)),h.map((t,l)=>(0,e.jsx)(d.GridItem,{span:f("full"),className:"laptop:hidden block",children:(0,e.jsx)(x,{item:t,shape:a})},`${t?.title||""}${l}`))]}),n&&n?.items.length>0?(0,e.jsx)(r.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:n.items.map((t,l)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(x,{item:t,shape:a})},`${t?.title||""}${l}`))})}):null]})]})});var E=(0,w.withStyles)(D);
1
+ "use strict";var L=Object.create;var y=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var q=(s,o)=>{for(var a in o)y(s,a,{get:o[a],enumerable:!0})},C=(s,o,a,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of P(o))!z.call(s,i)&&i!==a&&y(s,i,{get:()=>o[i],enumerable:!(n=S(o,i))||n.enumerable});return s};var N=(s,o,a)=>(a=s!=null?L(R(s)):{},C(o||!s||!s.__esModule?y(a,"default",{value:s,enumerable:!0}):a,s)),H=s=>C(y({},"__esModule",{value:!0}),s);var O={};q(O,{default:()=>E});module.exports=H(O);var e=require("react/jsx-runtime"),v=N(require("react")),T=require("react-responsive"),w=require("../../shared/Styles.js"),B=N(require("../../components/picture.js")),g=N(require("../../components/button.js")),I=require("../../components/heading.js"),G=require("../../components/text.js"),r=require("../../components/carousel.js"),u=require("../../components/gird.js"),$=N(require("../Title/index.js")),M=require("../../helpers/utils.js"),d=require("../../components/tabs.js");const b=({item:s,shape:o="square",isTab:a=!1})=>{const n=(0,T.useMediaQuery)({query:"(max-width: 1024px)"}),{theme:i="light",title:x,description:c,imageUrl:f,primaryButton:m,secondaryButton:h}=s,t="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return(0,e.jsxs)("div",{className:(0,M.cn)("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":o==="rounded","aiui-dark":i==="dark","h-[480px]":n&&!a,"h-[400px]":n&&a},"text-info-primary"),children:[(0,e.jsx)(B.default,{source:f?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${f?.width}/${f?.height}`}}),(0,e.jsxs)("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)(I.Heading,{size:3,className:"item-title",html:x}),(0,e.jsx)(G.Text,{size:3,className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3",html:c})]}),(0,e.jsxs)("div",{className:"flex gap-[16px]",children:[h&&h.text&&(0,e.jsx)("a",{href:h.link,children:(0,e.jsx)(g.default,{className:t,variant:"secondary",children:h.text})}),m&&m.text&&(0,e.jsx)("a",{href:m.link,children:(0,e.jsx)(g.default,{className:t,variant:"primary",children:m.text})})]})]})]})},D=v.default.forwardRef((s,o)=>{const{shape:a,sectionTitle:n,groupByTab:i=!1,items:x=[],carousel:c}=s.data,f=t=>{switch(t){case"full":return 12;case"half":return 6;case"one-third":return 4}},m=x.map(t=>t.tabName).filter(Boolean).filter((t,l,p)=>p.indexOf(t)===l),h=m.map(t=>({tabName:t,items:x.filter(l=>l.tabName===t)})).reduce((t,l)=>(t[l.tabName]=l.items,t),{});return(0,e.jsxs)("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:o,className:"text-info-primary",children:[n&&(0,e.jsx)($.default,{data:{title:n},className:"section-title"}),i?(0,e.jsxs)(d.Tabs,{shape:a,align:"left",defaultValue:m[0],children:[(0,e.jsx)(d.TabsList,{children:m.map((t,l)=>(0,e.jsx)(d.TabsTrigger,{value:t,children:t},l))}),m.map((t,l)=>(0,e.jsx)(d.TabsContent,{value:t,className:"desktop:mt-[36px] mt-[24px] w-full",children:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(u.Grid,{className:"w-full",children:[h[t].map((p,k)=>(0,e.jsx)(u.GridItem,{span:f(p.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(b,{item:p,shape:a,isTab:i})},`${p?.title||""}${k}`)),(0,e.jsx)(u.GridItem,{className:"laptop:hidden block",span:12,children:(0,e.jsx)(r.Carousel,{className:"",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:h[t].map((p,k)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:p,shape:a,isTab:i})},`${p?.title||""}${k}`))})})})]}),c&&c?.items.length>0?(0,e.jsx)(r.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:c.items.map((p,k)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:p,shape:a,isTab:i})},k))})}):null]})},l))]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(u.Grid,{className:"w-full",children:[x.map((t,l)=>(0,e.jsx)(u.GridItem,{span:f(t.width??"full"),className:"laptop:block hidden",children:(0,e.jsx)(b,{item:t,shape:a})},`${t?.title||""}${l}`)),x.map((t,l)=>(0,e.jsx)(u.GridItem,{span:f("full"),className:"laptop:hidden block",children:(0,e.jsx)(b,{item:t,shape:a})},`${t?.title||""}${l}`))]}),c&&c?.items.length>0?(0,e.jsx)(r.Carousel,{className:"laptop:mt-4 mt-3",children:(0,e.jsx)(r.CarouselContent,{className:"flex",children:c.items.map((t,l)=>(0,e.jsx)(r.CarouselItem,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:(0,e.jsx)(b,{item:t,shape:a})},`${t?.title||""}${l}`))})}):null]})]})});var E=(0,w.withStyles)(D);
2
2
  //# sourceMappingURL=MultiLayoutGraphicBlock.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.tsx"],
4
- "sourcesContent": ["import React from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport type { Shape } from '../../types/props'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nconst ItemBlock = ({\n item,\n shape = 'square',\n isTab = false,\n}: { item: Item } & { shape?: Shape } & { isTab?: boolean }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper group relative box-border w-full overflow-hidden',\n {\n 'rounded-2xl': shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !isTab,\n 'h-[400px]': isMobile && isTab,\n },\n `text-info-primary`\n )}\n >\n <Picture\n source={imageUrl?.url}\n className=\"inset-0 h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n <div className=\"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3\">\n <div>\n <Heading size={3} className=\"item-title\" html={title} />\n <Text className=\"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3\" html={description} />\n </div>\n <div className=\"flex gap-[16px]\">\n {secondaryButton && (\n <Button className={lgButtonSize} variant=\"secondary\" asChild>\n <a href={secondaryButton.link}>{secondaryButton.text}</a>\n </Button>\n )}\n {primaryButton && (\n <Button className={lgButtonSize} variant=\"primary\" asChild>\n <a href={primaryButton.link}>{primaryButton.text}</a>\n </Button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref} className=\"text-info-primary\">\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={tabNames[0]!}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger key={index} value={tabName!}>\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={tabName!} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <Grid className=\"w-full\">\n {tabItemsMaps[tabName].map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </GridItem>\n ))}\n {\n <GridItem className=\"laptop:hidden block\" span={12}>\n <Carousel className=\"\">\n <CarouselContent className=\"flex\">\n {tabItemsMaps[tabName].map((item, index) => (\n <CarouselItem\n key={`${item?.title || ''}${index}`}\n className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n </GridItem>\n }\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <Carousel className=\"laptop:mt-4 mt-3\">\n <CarouselContent className=\"flex\">\n {carousel.items.map((item, index) => (\n <CarouselItem key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <Carousel className=\"laptop:mt-4 mt-3\">\n <CarouselContent className=\"flex\">\n {carousel.items.map((item, index) => (\n <CarouselItem\n key={`${item?.title || ''}${index}`}\n className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\"\n >\n <ItemBlock item={item} shape={shape} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n )}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqCM,IAAAI,EAAA,6BArCNC,EAAkB,oBAClBC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAAqB,oCACrBC,EAAwD,wCACxDC,EAA+B,oCAC/BC,EAAkB,gCAElBC,EAAmB,kCACnBC,EAAyD,oCACzD,MAAMC,EAAY,CAAC,CACjB,KAAAC,EACA,MAAAC,EAAQ,SACR,MAAAC,EAAQ,EACV,IAAgE,CAC9D,MAAMC,KAAW,iBAAc,CAAE,MAAO,qBAAsB,CAAC,EAEzD,CAAE,MAAAC,EAAQ,QAAS,MAAAC,EAAO,YAAAC,EAAa,SAAAC,EAAU,cAAAC,EAAe,gBAAAC,CAAgB,EAAIT,EACpFU,EAAe,mFAErB,SACE,QAAC,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AAA,EAAS,MAAM,IAAI,CAACpB,EAAMwB,OACzB,OAAC,gBAAyB,UAAU,qDAClC,mBAACzB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,MAAOiB,EAAY,GADvCM,CAEnB,CACD,EACH,EACF,EACE,MACN,GAxCgBA,CAyClB,CACD,GACH,KAEA,oBACE,qBAAC,QAAK,UAAU,SACb,UAAAL,EAAM,IAAI,CAACnB,EAAMwB,OAChB,OAAC,YAEC,KAAMH,EAAQrB,EAAK,OAAS,MAAM,EAClC,UAAU,sBAEV,mBAACD,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GAJhC,GAAGD,GAAM,OAAS,EAAE,GAAGwB,CAAK,EAKnC,CACD,EACAL,EAAM,IAAI,CAACnB,EAAMwB,OAChB,OAAC,YAA8C,KAAMH,EAAQ,MAAM,EAAG,UAAU,sBAC9E,mBAACtB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GADxB,GAAGD,GAAM,OAAS,EAAE,GAAGwB,CAAK,EAE3C,CACD,GACH,EACCJ,GAAYA,GAAU,MAAM,OAAS,KACpC,OAAC,YAAS,UAAU,mBAClB,mBAAC,mBAAgB,UAAU,OACxB,SAAAA,EAAS,MAAM,IAAI,CAACpB,EAAMwB,OACzB,OAAC,gBAEC,UAAU,qDAEV,mBAACzB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GAHhC,GAAGD,GAAM,OAAS,EAAE,GAAGwB,CAAK,EAInC,CACD,EACH,EACF,EACE,MACN,GAEJ,CAEJ,CAAC,EAED,IAAOxC,KAAQ,cAAW6B,CAAuB",
4
+ "sourcesContent": ["import React from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { MultiLayoutGraphicBlockProps, Item } from './types'\nimport { withStyles } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { Text } from '../../components/text.js'\nimport { Carousel, CarouselContent, CarouselItem } from '../../components/carousel.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport Title from '../Title/index.js'\nimport type { Shape } from '../../types/props'\nimport { cn } from '../../helpers/utils.js'\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '../../components/tabs.js'\nconst ItemBlock = ({\n item,\n shape = 'square',\n isTab = false,\n}: { item: Item } & { shape?: Shape } & { isTab?: boolean }) => {\n const isMobile = useMediaQuery({ query: '(max-width: 1024px)' })\n\n const { theme = 'light', title, description, imageUrl, primaryButton, secondaryButton } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper group relative box-border w-full overflow-hidden',\n {\n 'rounded-2xl': shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[480px]': isMobile && !isTab,\n 'h-[400px]': isMobile && isTab,\n },\n `text-info-primary`\n )}\n >\n <Picture\n source={imageUrl?.url}\n className=\"inset-0 h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n <div className=\"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3\">\n <div>\n <Heading size={3} className=\"item-title\" html={title} />\n <Text\n size={3}\n className=\"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3\"\n html={description}\n />\n </div>\n <div className=\"flex gap-[16px]\">\n {secondaryButton && secondaryButton.text && (\n <a href={secondaryButton.link}>\n <Button className={lgButtonSize} variant=\"secondary\">\n {secondaryButton.text}\n </Button>\n </a>\n )}\n {primaryButton && primaryButton.text && (\n <a href={primaryButton.link}>\n <Button className={lgButtonSize} variant=\"primary\">\n {primaryButton.text}\n </Button>\n </a>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst MultiLayoutGraphicBlock = React.forwardRef<HTMLDivElement, MultiLayoutGraphicBlockProps>((props, ref) => {\n const { shape, sectionTitle, groupByTab = false, items = [], carousel } = props.data\n const getSpan = (width: 'full' | 'half' | 'one-third') => {\n switch (width) {\n case 'full':\n return 12\n case 'half':\n return 6\n case 'one-third':\n return 4\n }\n }\n\n const tabNames = items\n .map(item => item.tabName)\n .filter(Boolean)\n .filter((item, index, arr) => arr.indexOf(item) === index) as string[]\n\n const tabItemsMaps = tabNames\n .map(tabName => ({\n tabName,\n items: items.filter(item => item.tabName === tabName),\n }))\n .reduce(\n (acc, cur) => {\n acc[cur.tabName] = cur.items\n return acc\n },\n {} as Record<string, (Item & { width?: 'full' | 'half' | 'one-third' })[]>\n )\n\n return (\n <section data-ui-component-id=\"MultiLayoutGraphicBlock\" ref={ref} className=\"text-info-primary\">\n {sectionTitle && <Title data={{ title: sectionTitle }} className=\"section-title\" />}\n\n {groupByTab ? (\n <Tabs shape={shape} align=\"left\" defaultValue={tabNames[0]!}>\n <TabsList>\n {tabNames.map((tabName, index) => (\n <TabsTrigger key={index} value={tabName!}>\n {tabName}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabNames.map((tabName, index) => (\n <TabsContent key={index} value={tabName!} className=\"desktop:mt-[36px] mt-[24px] w-full\">\n <>\n <Grid className=\"w-full\">\n {tabItemsMaps[tabName].map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </GridItem>\n ))}\n {\n <GridItem className=\"laptop:hidden block\" span={12}>\n <Carousel className=\"\">\n <CarouselContent className=\"flex\">\n {tabItemsMaps[tabName].map((item, index) => (\n <CarouselItem\n key={`${item?.title || ''}${index}`}\n className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\"\n >\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n </GridItem>\n }\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <Carousel className=\"laptop:mt-4 mt-3\">\n <CarouselContent className=\"flex\">\n {carousel.items.map((item, index) => (\n <CarouselItem key={index} className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\">\n <ItemBlock item={item} shape={shape} isTab={groupByTab} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n </TabsContent>\n ))}\n </Tabs>\n ) : (\n <>\n <Grid className=\"w-full\">\n {items.map((item, index) => (\n <GridItem\n key={`${item?.title || ''}${index}`}\n span={getSpan(item.width ?? 'full')}\n className=\"laptop:block hidden\"\n >\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n {items.map((item, index) => (\n <GridItem key={`${item?.title || ''}${index}`} span={getSpan('full')} className=\"laptop:hidden block\">\n <ItemBlock item={item} shape={shape} />\n </GridItem>\n ))}\n </Grid>\n {carousel && carousel?.items.length > 0 ? (\n <Carousel className=\"laptop:mt-4 mt-3\">\n <CarouselContent className=\"flex\">\n {carousel.items.map((item, index) => (\n <CarouselItem\n key={`${item?.title || ''}${index}`}\n className=\"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5\"\n >\n <ItemBlock item={item} shape={shape} />\n </CarouselItem>\n ))}\n </CarouselContent>\n </Carousel>\n ) : null}\n </>\n )}\n </section>\n )\n})\n\nexport default withStyles(MultiLayoutGraphicBlock)\nexport type { MultiLayoutGraphicBlockProps }\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqCM,IAAAI,EAAA,6BArCNC,EAAkB,oBAClBC,EAA8B,4BAE9BC,EAA2B,kCAC3BC,EAAoB,0CACpBC,EAAmB,yCACnBC,EAAwB,uCACxBC,EAAqB,oCACrBC,EAAwD,wCACxDC,EAA+B,oCAC/BC,EAAkB,gCAElBC,EAAmB,kCACnBC,EAAyD,oCACzD,MAAMC,EAAY,CAAC,CACjB,KAAAC,EACA,MAAAC,EAAQ,SACR,MAAAC,E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ultiLayoutGraphicBlock_exports", "__export", "MultiLayoutGraphicBlock_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_react_responsive", "import_Styles", "import_picture", "import_button", "import_heading", "import_text", "import_carousel", "import_gird", "import_Title", "import_utils", "import_tabs", "ItemBlock", "item", "shape", "isTab", "isMobile", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "lgButtonSize", "Picture", "Button", "MultiLayoutGraphicBlock", "React", "props", "ref", "sectionTitle", "groupByTab", "items", "carousel", "getSpan", "width", "tabNames", "index", "arr", "tabItemsMaps", "tabName", "acc", "cur", "Title"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var q=Object.create;var x=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var Q=(t,e)=>{for(var r in e)x(t,r,{get:e[r],enumerable:!0})},$=(t,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of J(e))!O.call(t,o)&&o!==r&&x(t,o,{get:()=>e[o],enumerable:!(l=B(e,o))||l.enumerable});return t};var V=(t,e,r)=>(r=t!=null?q(K(t)):{},$(e||!t||!t.__esModule?x(r,"default",{value:t,enumerable:!0}):r,t)),W=t=>$(x({},"__esModule",{value:!0}),t);var _={};Q(_,{default:()=>Z});module.exports=W(_);var s=require("react/jsx-runtime"),n=V(require("react")),M=require("@gsap/react"),h=require("gsap"),F=require("gsap/dist/SplitText"),v=require("gsap/dist/ScrollTrigger"),c=require("../../helpers/utils.js"),w=require("../../components/index.js"),A=require("../../shared/Styles.js");function X(t=[],e=3){const r=[];for(let l=0;l<t.length;l+=e)r.push(t.slice(l,l+e));return r}const G=n.default.forwardRef(({data:t,className:e=""},r)=>{const{title:l,features:o=[],featureChunkSize:D=3,theme:H}=t,[b,N]=n.default.useState(0),[C,y]=n.default.useState(!0),m=X(o,D),S=m.length,u=o.length>D,L=u?[...m,m[0]]:m,T=40;n.default.useEffect(()=>{if(!u)return;const a=setInterval(()=>{N(i=>i+1),y(!0)},3e3);return()=>clearInterval(a)},[S,u]),n.default.useEffect(()=>{if(u)if(b===S){const a=setTimeout(()=>{y(!1),N(0)},500);return()=>clearTimeout(a)}else y(!0)},[b,S,u]);const f=(0,n.useRef)(null),E=(0,n.useRef)(null),g=(0,n.useRef)(null);return(0,M.useGSAP)(()=>{if(!f.current)return;g.current=new F.SplitText(f.current,{type:"words",wordsClass:"word"});const a=f.current?.clientHeight||100,i=g.current.words;return h.gsap.set(i,{opacity:0}),v.ScrollTrigger.create({trigger:f.current,start:"bottom bottom-=6%",end:`bottom+=${a*2+80}px bottom-=6%`,scrub:!0,onUpdate:p=>{const d=p.progress,I=i.length,P=1/I,R=.5;i.forEach((j,z)=>{const U=z/I*(1-R),Y=P*(1+R);let k=(d-U)/Y;k=Math.max(0,Math.min(k,1)),h.gsap.set(j,{opacity:k})})}}),o&&o.length>0&&v.ScrollTrigger.create({trigger:E.current,start:`bottom+=${a*2}px bottom-=6%`,end:`bottom+=${a*2+100}px bottom-=6%`,onUpdate:p=>{h.gsap.set(E.current,{opacity:p.progress})}}),()=>{g.current&&g.current.revert(),v.ScrollTrigger.getAll().forEach(p=>p.kill())}},[]),(0,s.jsxs)("div",{ref:r,className:(0,c.cn)("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary laptop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",e),children:[(0,s.jsx)(w.Heading,{ref:f,as:"h2",size:2,weight:"bold",align:"left",className:(0,c.cn)("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none",{"text-[#1D1D1F]":H!=="dark","text-[#fff]":H==="dark"}),children:l}),o&&o.length>0&&(0,s.jsx)("div",{className:(0,c.cn)("relative h-12 w-full max-w-[500px] overflow-hidden",`tablet:h-[${T}px]`),children:(0,s.jsx)("div",{className:(0,c.cn)(["flex flex-col",C?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${b*T}px)`},children:L.map((a,i)=>(0,s.jsx)("div",{className:(0,c.cn)("flex h-12 w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${T}px]`),children:a.map((p,d)=>(0,s.jsxs)(n.default.Fragment,{children:[d>0&&(0,s.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),(0,s.jsx)(w.Text,{align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] leading-[1.4] text-[#1D1D1F]",html:p.title})]},d))},i))})})]})});G.displayName="Slogan";var Z=(0,A.withStyles)(G);
1
+ "use strict";"use client";var q=Object.create;var x=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var Q=(t,e)=>{for(var r in e)x(t,r,{get:e[r],enumerable:!0})},$=(t,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of J(e))!O.call(t,o)&&o!==r&&x(t,o,{get:()=>e[o],enumerable:!(l=B(e,o))||l.enumerable});return t};var V=(t,e,r)=>(r=t!=null?q(K(t)):{},$(e||!t||!t.__esModule?x(r,"default",{value:t,enumerable:!0}):r,t)),W=t=>$(x({},"__esModule",{value:!0}),t);var _={};Q(_,{default:()=>Z});module.exports=W(_);var s=require("react/jsx-runtime"),n=V(require("react")),M=require("@gsap/react"),h=require("gsap"),F=require("gsap/dist/SplitText"),v=require("gsap/dist/ScrollTrigger"),c=require("../../helpers/utils.js"),w=require("../../components/index.js"),z=require("../../shared/Styles.js");function X(t=[],e=3){const r=[];for(let l=0;l<t.length;l+=e)r.push(t.slice(l,l+e));return r}const G=n.default.forwardRef(({data:t,className:e=""},r)=>{const{title:l,features:o=[],featureChunkSize:D=3,theme:H}=t,[b,N]=n.default.useState(0),[A,y]=n.default.useState(!0),m=X(o,D),S=m.length,u=o.length>D,C=u?[...m,m[0]]:m,T=40;n.default.useEffect(()=>{if(!u)return;const a=setInterval(()=>{N(i=>i+1),y(!0)},3e3);return()=>clearInterval(a)},[S,u]),n.default.useEffect(()=>{if(u)if(b===S){const a=setTimeout(()=>{y(!1),N(0)},500);return()=>clearTimeout(a)}else y(!0)},[b,S,u]);const f=(0,n.useRef)(null),E=(0,n.useRef)(null),g=(0,n.useRef)(null);return(0,M.useGSAP)(()=>{if(!f.current)return;g.current=new F.SplitText(f.current,{type:"words",wordsClass:"word"});const a=f.current?.clientHeight||100,i=g.current.words;return h.gsap.set(i,{opacity:0}),v.ScrollTrigger.create({trigger:f.current,start:"bottom bottom-=6%",end:`bottom+=${a*2+80}px bottom-=6%`,scrub:!0,onUpdate:p=>{const d=p.progress,I=i.length,L=1/I,R=.5;i.forEach((P,j)=>{const U=j/I*(1-R),Y=L*(1+R);let k=(d-U)/Y;k=Math.max(0,Math.min(k,1)),h.gsap.set(P,{opacity:k})})}}),o&&o.length>0&&v.ScrollTrigger.create({trigger:E.current,start:`bottom+=${a*2}px bottom-=6%`,end:`bottom+=${a*2+100}px bottom-=6%`,onUpdate:p=>{h.gsap.set(E.current,{opacity:p.progress})}}),()=>{g.current&&g.current.revert(),v.ScrollTrigger.getAll().forEach(p=>p.kill())}},[]),(0,s.jsxs)("div",{ref:r,className:(0,c.cn)("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary laptop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",e),children:[(0,s.jsx)(w.Heading,{ref:f,as:"h2",size:2,weight:"bold",align:"left",className:(0,c.cn)("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none",{"text-[#1D1D1F]":H!=="dark","text-[#fff]":H==="dark"}),children:l}),o&&o.length>0&&(0,s.jsx)("div",{className:(0,c.cn)("relative h-12 w-full max-w-[500px] overflow-hidden",`tablet:h-[${T}px]`),children:(0,s.jsx)("div",{className:(0,c.cn)(["flex flex-col",A?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${b*T}px)`},children:C.map((a,i)=>(0,s.jsx)("div",{className:(0,c.cn)("flex h-12 w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${T}px]`),children:a.map((p,d)=>(0,s.jsxs)(n.default.Fragment,{children:[d>0&&(0,s.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),(0,s.jsx)(w.Text,{size:3,align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] leading-[1.4] text-[#1D1D1F]",html:p.title})]},d))},i))})})]})});G.displayName="Slogan";var Z=(0,z.withStyles)(G);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Slogan/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className = '' }, ref) => {\n const { title, features = [], featureChunkSize = 3, theme } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const featuresGroups = chunkArray(features, featureChunkSize)\n const totalGroups = featuresGroups.length\n const needCarousel = features.length > featureChunkSize\n const displayGroups = needCarousel ? [...featuresGroups, featuresGroups[0]] : featuresGroups\n const groupHeight = 40\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef<HTMLHeadingElement>(null)\n const featuresRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n useGSAP(() => {\n if (!titleRef.current) return\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const height = titleRef.current?.clientHeight || 100\n\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=6%',\n end: `bottom+=${height * 2 + 80}px bottom-=6%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n\n if (features && features.length > 0) {\n ScrollTrigger.create({\n trigger: featuresRef.current,\n start: `bottom+=${height * 2}px bottom-=6%`,\n end: `bottom+=${height * 2 + 100}px bottom-=6%`,\n onUpdate: (self: any) => {\n gsap.set(featuresRef.current, { opacity: self.progress })\n },\n })\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n ScrollTrigger.getAll().forEach((t: any) => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between text-info-primary laptop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n ref={titleRef}\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className={cn(\n 'slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none',\n {\n 'text-[#1D1D1F]': theme !== 'dark',\n 'text-[#fff]': theme === 'dark',\n }\n )}\n >\n {title}\n </Heading>\n {features && features.length > 0 && (\n <div className={cn('relative h-12 w-full max-w-[500px] overflow-hidden', `tablet:h-[${groupHeight}px]`)}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]' : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className={cn(\n 'flex h-12 w-full flex-row items-stretch gap-3 overflow-hidden',\n `tablet:h-[${groupHeight}px]`\n )}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]\" />}\n <Text\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
5
- "mappings": "ukBAAA,IAA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AGI,IAAM,CACXH,EAAkB,SAAWA,EAAkB,QAAQ,OAAO,EAC9D,gBAAc,OAAO,EAAE,QAASY,GAAWA,EAAE,KAAK,CAAC,CACrD,CACF,EAAG,CAAC,CAAC,KAGH,QAAC,OACC,IAAK9B,EACL,aAAW,MACT,uMACAD,CACF,EAEA,oBAAC,WACC,IAAKiB,EACL,GAAG,KACH,KAAM,EACN,OAAQ,OACR,MAAO,OACP,aAAW,MACT,uGACA,CACE,iBAAkBZ,IAAU,OAC5B,cAAeA,IAAU,MAC3B,CACF,EAEC,SAAAH,EACH,EACCC,GAAYA,EAAS,OAAS,MAC7B,OAAC,OAAI,aAAW,MAAG,qDAAsD,aAAaW,CAAW,KAAK,EACpG,mBAAC,OACC,aAAW,MAAG,CACZ,gBACAN,EAAkB,mEAAqE,kBACzF,CAAC,EACD,MAAO,CACL,UAAW,eAAeF,EAAaQ,CAAW,KACpD,EAEC,SAAAD,EAAc,IAAI,CAACmB,EAAOC,OACzB,OAAC,OACC,aAAW,MACT,gEACA,aAAanB,CAAW,KAC1B,EAGC,SAAAkB,EAAM,IAAI,CAACE,EAASC,OACnB,QAAC,EAAArC,QAAM,SAAN,CACE,UAAAqC,EAAQ,MAAK,OAAC,OAAI,UAAU,wDAAwD,KACrF,OAAC,QACC,MAAM,OACN,GAAG,IACH,UAAU,kHACV,KAAMD,EAAQ,MAChB,IAPmBC,CAQrB,CACD,GAZIF,CAaP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDpC,EAAO,YAAc,SAErB,IAAOf,KAAQ,cAAWe,CAAM",
4
+ "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\n\nfunction chunkArray(array: { title: string }[] = [], size: number = 3) {\n const result = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\nconst Slogan = React.forwardRef<HTMLDivElement, SloganProps>(({ data, className = '' }, ref) => {\n const { title, features = [], featureChunkSize = 3, theme } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const featuresGroups = chunkArray(features, featureChunkSize)\n const totalGroups = featuresGroups.length\n const needCarousel = features.length > featureChunkSize\n const displayGroups = needCarousel ? [...featuresGroups, featuresGroups[0]] : featuresGroups\n const groupHeight = 40\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef<HTMLHeadingElement>(null)\n const featuresRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n useGSAP(() => {\n if (!titleRef.current) return\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const height = titleRef.current?.clientHeight || 100\n\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=6%',\n end: `bottom+=${height * 2 + 80}px bottom-=6%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n\n if (features && features.length > 0) {\n ScrollTrigger.create({\n trigger: featuresRef.current,\n start: `bottom+=${height * 2}px bottom-=6%`,\n end: `bottom+=${height * 2 + 100}px bottom-=6%`,\n onUpdate: (self: any) => {\n gsap.set(featuresRef.current, { opacity: self.progress })\n },\n })\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n ScrollTrigger.getAll().forEach((t: any) => t.kill())\n }\n }, [])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:flex-row laptop:items-end laptop:justify-between text-info-primary laptop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center',\n className\n )}\n >\n <Heading\n ref={titleRef}\n as=\"h2\"\n size={2}\n weight={'bold'}\n align={'left'}\n className={cn(\n 'slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none',\n {\n 'text-[#1D1D1F]': theme !== 'dark',\n 'text-[#fff]': theme === 'dark',\n }\n )}\n >\n {title}\n </Heading>\n {features && features.length > 0 && (\n <div className={cn('relative h-12 w-full max-w-[500px] overflow-hidden', `tablet:h-[${groupHeight}px]`)}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]' : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className={cn(\n 'flex h-12 w-full flex-row items-stretch gap-3 overflow-hidden',\n `tablet:h-[${groupHeight}px]`\n )}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]\" />}\n <Text\n size={3}\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAgHM,IAAAI,EAAA,6BA/GNC,EAA8B,oBAC9BA,EAAwB,uBACxBC,EAAqB,gBACrBC,EAA0B,+BAC1BC,EAA8B,mCAC9BC,EAAmB,kCACnBC,EAA8B,qCAC9BC,EAA2B,kCAG3B,SAASC,EAAWC,EAA6B,CAAC,EAAGC,EAAe,EAAG,CACrE,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,GAAKF,EACrCC,EAAO,KAAKF,EAAM,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEtC,OAAOC,CACT,CAEA,MAAME,EAAS,EAAAC,QAAM,WAAwC,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAY,EAAG,EAAGC,IAAQ,CAC9F,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAW,CAAC,EAAG,iBAAAC,EAAmB,EAAG,MAAAC,CAAM,EAAIN,EACxD,CAACO,EAAYC,CAAa,EAAI,EAAAT,QAAM,SAAS,CAAC,EAC9C,CAACU,EAAiBC,CAAkB,EAAI,EAAAX,QAAM,SAAS,EAAI,EAC3DY,EAAiBlB,EAAWW,EAAUC,CAAgB,EACtDO,EAAcD,EAAe,OAC7BE,EAAeT,EAAS,OAASC,EACjCS,EAAgBD,EA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AAMD,EAAQ,MAChB,IARmBC,CASrB,CACD,GAbIF,CAcP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDpC,EAAO,YAAc,SAErB,IAAOf,KAAQ,cAAWe,CAAM",
6
6
  "names": ["Slogan_exports", "__export", "Slogan_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_gsap", "import_SplitText", "import_ScrollTrigger", "import_utils", "import_components", "import_Styles", "chunkArray", "array", "size", "result", "i", "Slogan", "React", "data", "className", "ref", "title", "features", "featureChunkSize", "theme", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "timer", "handle", "titleRef", "featuresRef", "splitTextInstance", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "start", "width", "opacity", "t", "group", "idx", "feature", "index"]
7
7
  }
@@ -14,7 +14,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
14
14
  loading?: boolean;
15
15
  /** 设置按钮失效状态 */
16
16
  disabled?: boolean;
17
- /** 定义自组件作为父组件的类型, 详细使用方式请参考radix-ui */
17
+ /** 定义自组件作为父组件的类型, 详细使用方式请参考radix-ui (已作废请勿使用) */
18
18
  asChild?: boolean;
19
19
  /** 自定义loading */
20
20
  spinner?: React.ReactNode;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/button.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\nconst sizeMap = {\n sm: {\n width: '16',\n height: '16',\n },\n base: {\n width: '18',\n height: '18',\n },\n lg: {\n width: '20',\n height: '20',\n },\n}\nconst LinkButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"currentColor\"\n strokeWidth=\"1.66667\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n\n/**\n * Button Variants\n */\n// eslint-disable-next-line tailwindcss/enforces-negative-arbitrary-values\nconst buttonVariants = cva(\n 'ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center border-[1.6px] border-solid text-sm font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none',\n {\n variants: {\n variant: {\n primary:\n 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active border-info-primary hover:border-btn-primary-active hover:text-btn-primary-active-foreground hover:bg-gradient-brand border-none',\n secondary:\n 'bg-btn-secondary border-info-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary-active-foreground border-solid',\n link: 'text-info-primary hover:text-btn-primary-active border-none underline-offset-4 hover:underline',\n ghost: 'text-info-primary hover:bg-btn-primary hover:text-btn-primary-foreground',\n },\n size: {\n sm: 'px-3 py-2 text-[12px] leading-tight',\n base: 'px-5 pb-[10px] pt-[11px] text-[14px] leading-tight',\n lg: 'px-7 pb-[14px] pt-[15px] text-[16px] leading-tight',\n icon: 'size-10 rounded-full leading-tight',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n state: {\n default: '',\n disabled: '',\n loading: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'primary',\n state: 'loading',\n class: 'bg-btn-primary-active disabled:border-btn-primary-disabled-border',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class:\n 'bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border',\n },\n {\n variant: 'link',\n state: 'disabled',\n class: 'disabled:text-info-quaternary',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n state: 'default',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\n primary: 'stroke-btn-primary-foreground',\n secondary: 'stroke-btn-secondary-foreground',\n link: 'stroke-primary',\n ghost: 'stroke-primary',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n})\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n /** \u81EA\u5B9A\u4E49loading */\n spinner?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n spinner,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n const state = loading ? 'loading' : disabled ? 'disabled' : 'default'\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(buttonVariants({ variant, size, hoverEffect, state }), className)}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"absolute\">\n {spinner ? (\n spinner\n ) : (\n <Spinner\n className={loadingSvgVariants({\n variant,\n })}\n />\n )}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n </>\n ) : (\n <>\n {children}\n {variant === 'link' && size && size !== 'icon' && <LinkButtonAppendIcon size={size} />}\n </>\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport Spinner from '../icons/spinner.js'\nimport { cn } from '../helpers/index.js'\n\nconst sizeMap = {\n sm: {\n width: '16',\n height: '16',\n },\n base: {\n width: '18',\n height: '18',\n },\n lg: {\n width: '20',\n height: '20',\n },\n}\nconst LinkButtonAppendIcon = ({ size = 'base' }: { size: 'base' | 'lg' | 'sm' }) => {\n const { width, height } = sizeMap[size]\n return (\n <svg width={width} height={height} viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"currentColor\"\n strokeWidth=\"1.66667\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n\n/**\n * Button Variants\n */\n// eslint-disable-next-line tailwindcss/enforces-negative-arbitrary-values\nconst buttonVariants = cva(\n 'ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center border-[1.6px] border-solid text-sm font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none',\n {\n variants: {\n variant: {\n primary:\n 'bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active border-info-primary hover:border-btn-primary-active hover:text-btn-primary-active-foreground hover:bg-gradient-brand border-none',\n secondary:\n 'bg-btn-secondary border-info-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary-active-foreground border-solid',\n link: 'text-info-primary hover:text-btn-primary-active border-none underline-offset-4 hover:underline',\n ghost: 'text-info-primary hover:bg-btn-primary hover:text-btn-primary-foreground',\n },\n size: {\n sm: 'px-3 py-2 text-[12px] leading-tight',\n base: 'px-5 pb-[10px] pt-[11px] text-[14px] leading-tight',\n lg: 'px-7 pb-[14px] pt-[15px] text-[16px] leading-tight',\n icon: 'size-10 rounded-full leading-tight',\n },\n /** hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C,\u9700\u8981\u6CE8\u610F\u4E0D\u540Cvariant \u4E0B\u7684\u6548\u679C */\n hoverEffect: {\n none: '',\n slide: '',\n },\n state: {\n default: '',\n disabled: '',\n loading: '',\n },\n },\n compoundVariants: [\n {\n variant: 'primary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'secondary',\n hoverEffect: 'slide',\n class:\n 'before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[\"\"] hover:before:translate-x-0',\n },\n {\n variant: 'primary',\n state: 'loading',\n class: 'bg-btn-primary-active disabled:border-btn-primary-disabled-border',\n },\n {\n variant: 'secondary',\n state: 'loading',\n class:\n 'bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'primary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled',\n },\n {\n variant: 'secondary',\n state: 'disabled',\n class:\n 'disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border',\n },\n {\n variant: 'link',\n state: 'disabled',\n class: 'disabled:text-info-quaternary',\n },\n ],\n defaultVariants: {\n variant: 'primary',\n size: 'base',\n hoverEffect: 'none',\n state: 'default',\n },\n }\n)\n\nconst loadingSvgVariants = cva('', {\n variants: {\n variant: {\n primary: 'stroke-btn-primary-foreground',\n secondary: 'stroke-btn-secondary-foreground',\n link: 'stroke-primary',\n ghost: 'stroke-primary',\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n})\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /** \u8BBE\u7F6E\u6309\u94AE\u8F7D\u5165\u72B6\u6001 */\n loading?: boolean\n /** \u8BBE\u7F6E\u6309\u94AE\u5931\u6548\u72B6\u6001 */\n disabled?: boolean\n /** \u5B9A\u4E49\u81EA\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B\uFF0C \u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui (\u5DF2\u4F5C\u5E9F\u8BF7\u52FF\u4F7F\u7528) */\n asChild?: boolean\n /** \u81EA\u5B9A\u4E49loading */\n spinner?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n asChild = false,\n size = 'base',\n children,\n variant,\n hoverEffect = 'none',\n className,\n disabled = false,\n loading = false,\n spinner,\n ...props\n }: ButtonProps,\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const isInactive = disabled || loading\n const state = loading ? 'loading' : disabled ? 'disabled' : 'default'\n\n return (\n <Comp\n disabled={isInactive}\n className={cn(buttonVariants({ variant, size, hoverEffect, state }), className)}\n ref={ref}\n {...props}\n >\n {loading ? (\n <>\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n <span className=\"absolute\">\n {spinner ? (\n spinner\n ) : (\n <Spinner\n className={loadingSvgVariants({\n variant,\n })}\n />\n )}\n </span>\n <VisuallyHidden>{children}</VisuallyHidden>\n </>\n ) : (\n <>\n {children}\n {variant === 'link' && size && size !== 'icon' && <LinkButtonAppendIcon size={size} />}\n </>\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
5
5
  "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2BM,IAAAI,EAAA,6BAzBNC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAEnB,MAAMC,EAAU,CACd,GAAI,CACF,MAAO,KACP,OAAQ,IACV,EACA,KAAM,CACJ,MAAO,KACP,OAAQ,IACV,EACA,GAAI,CACF,MAAO,KACP,OAAQ,IACV,CACF,EACMC,EAAuB,CAAC,CAAE,KAAAC,EAAO,MAAO,IAAsC,CAClF,KAAM,CAAE,MAAAC,EAAO,OAAAC,CAAO,EAAIJ,EAAQE,CAAI,EACtC,SACE,OA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AK,EAAS,KAAAR,EAAM,YAAAS,EAAa,MALjDG,EAAU,UAAYD,EAAW,WAAa,SAKS,CAAC,EAAGD,CAAS,EAC9E,IAAKK,EACJ,GAAGD,EAEH,SAAAF,KACC,oBACE,oBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,WACb,SAAAM,MAGC,OAAC,EAAAG,QAAA,CACC,UAAWZ,EAAmB,CAC5B,QAAAI,CACF,CAAC,EACH,EAEJ,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,KAEA,oBACG,UAAAA,EACAC,IAAY,QAAUR,GAAQA,IAAS,WAAU,OAACD,EAAA,CAAqB,KAAMC,EAAM,GACtF,EAEJ,CAGN,EAEAK,EAAO,YAAc,SACrB,IAAOhB,EAAQgB",
6
6
  "names": ["button_exports", "__export", "button_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_react_visually_hidden", "import_class_variance_authority", "import_spinner", "import_helpers", "sizeMap", "LinkButtonAppendIcon", "size", "width", "height", "buttonVariants", "loadingSvgVariants", "Button", "asChild", "children", "variant", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "Spinner"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var b=Object.create;var p=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var L=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of C(e))!z.call(t,r)&&r!==o&&p(t,r,{get:()=>e[r],enumerable:!(n=S(e,r))||n.enumerable});return t};var E=(t,e,o)=>(o=t!=null?b(R(t)):{},x(e||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),N=t=>x(p({},"__esModule",{value:!0}),t);var w={};L(w,{Text:()=>a});module.exports=N(w);var i=require("react/jsx-runtime"),V=E(require("react")),d=require("@radix-ui/react-slot"),P=require("class-variance-authority"),c=require("@payloadcms/richtext-lexical/html"),f=require("../helpers/index.js");const W=(0,P.cva)("font-heading",{variants:{size:{none:"tracking",1:"text-text-1",2:"text-text-2",3:"text-text-3",4:"text-text-4"},weight:{light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"none",weight:"bold"}}),a=V.forwardRef((t,e)=>{const{children:o,size:n="none",weight:r,align:T,className:h,asChild:g,as:y="span",color:l,html:s,...v}=t,m=s?{dangerouslySetInnerHTML:{__html:typeof s=="string"?s:(0,c.convertLexicalToHTML)({data:s})}}:null,u=l?{style:{color:l}}:null;return(0,i.jsx)(d.Slot,{...v,ref:e,className:(0,f.cn)(W({size:n,weight:r,align:T}),h),...m,...u,children:g?o:(0,i.jsx)(y,{children:m?null:o})})});a.displayName="Text";
1
+ "use strict";var b=Object.create;var p=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var L=(t,e)=>{for(var o in e)p(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of C(e))!z.call(t,r)&&r!==o&&p(t,r,{get:()=>e[r],enumerable:!(n=S(e,r))||n.enumerable});return t};var w=(t,e,o)=>(o=t!=null?b(R(t)):{},x(e||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),E=t=>x(p({},"__esModule",{value:!0}),t);var W={};L(W,{Text:()=>a});module.exports=E(W);var i=require("react/jsx-runtime"),N=w(require("react")),d=require("@radix-ui/react-slot"),P=require("class-variance-authority"),c=require("@payloadcms/richtext-lexical/html"),f=require("../helpers/index.js");const V=(0,P.cva)("font-heading",{variants:{size:{none:"tracking",1:"text-text-1",2:"text-text-2",3:"text-text-3",4:"text-text-4"},weight:{light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"none",weight:"bold"}}),a=N.forwardRef((t,e)=>{const{children:o,size:n="none",weight:r,align:h,className:T,asChild:g,as:y="span",color:l,html:s,...u}=t,m=s?{dangerouslySetInnerHTML:{__html:typeof s=="string"?s:(0,c.convertLexicalToHTML)({data:s})}}:null,v=l?{style:{color:l}}:null;return(0,i.jsx)(d.Slot,{...u,ref:e,className:(0,f.cn)(V({size:n,weight:n==="none"?"medium":r,align:h}),T),...m,...v,children:g?o:(0,i.jsx)(y,{children:m?null:o})})});a.displayName="Text";
2
2
  //# sourceMappingURL=text.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/text.tsx"],
4
- "sourcesContent": ["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\nconst textVariants = cva('font-heading', {\n variants: {\n size: {\n none: 'tracking',\n 1: 'text-text-1',\n 2: 'text-text-2',\n 3: 'text-text-3',\n 4: 'text-text-4',\n },\n weight: {\n light: 'font-light',\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 'none',\n weight: 'bold',\n },\n})\n\ntype TextElement = React.ElementRef<'span'>\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>\n\ninterface CommonTextProps extends VariantProps<typeof textVariants> {\n as?: 'div' | 'label' | 'p' | 'span'\n asChild?: boolean\n color?: string\n /** \u76F8\u5F53\u4E8E dangerouslySetInnerHTML */\n html?: string | SerializedEditorState<SerializedLexicalNode>\n}\n\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps)\n\nconst Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n size = 'none', // \u4E3A\u4E86\u517C\u5BB9\u65E7\u7248\u672C\u6837\u5F0F\uFF0C\u9ED8\u8BA4\u503C\u4E3A none\uFF0C\u6CA1\u6709\u9ED8\u8BA4\u7684\u5B57\u4F53\u5927\u5C0F\n weight,\n align,\n className,\n asChild,\n as: Tag = 'span',\n color,\n html,\n ...textProps\n } = props\n\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: typeof html === 'string' ? html : convertLexicalToHTML({ data: html }) },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n\n return (\n <Slot\n {...textProps}\n ref={forwardedRef}\n className={cn(\n textVariants({\n size,\n weight,\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\nText.displayName = 'Text'\n\nexport { Text }\nexport type { TextProps }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,IAAA,eAAAC,EAAAH,GA+F4B,IAAAI,EAAA,6BA/F5BC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAqC,6CAErCC,EAAmB,+BAGnB,MAAMC,KAAe,OAAI,eAAgB,CACvC,SAAU,CACR,KAAM,CACJ,KAAM,WACN,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,aACL,EACA,OAAQ,CACN,MAAO,aACP,OAAQ,cACR,OAAQ,cACR,SAAU,gBACV,KAAM,WACR,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,OACN,OAAQ,MACV,CACF,CAAC,EAkBKR,EAAOG,EAAM,WAAmC,CAACM,EAAOC,IAAiB,CAC7E,KAAM,CACJ,SAAAC,EACA,KAAAC,EAAO,OACP,OAAAC,EACA,MAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,OACV,MAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQ,OAAOA,GAAS,SAAWA,KAAO,wBAAqB,CAAE,KAAMA,CAAK,CAAC,CAAE,CAC5G,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KAEJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKV,EACL,aAAW,MACTF,EAAa,CACX,KAAAI,EACA,OAAAC,EACA,MAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EACDX,EAAK,YAAc",
4
+ "sourcesContent": ["import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\nimport { cn } from '../helpers/index.js'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\nconst textVariants = cva('font-heading', {\n variants: {\n size: {\n none: 'tracking',\n 1: 'text-text-1',\n 2: 'text-text-2',\n 3: 'text-text-3',\n 4: 'text-text-4',\n },\n weight: {\n light: 'font-light',\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 'none',\n weight: 'bold',\n },\n})\n\ntype TextElement = React.ElementRef<'span'>\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>\n\ninterface CommonTextProps extends VariantProps<typeof textVariants> {\n as?: 'div' | 'label' | 'p' | 'span'\n asChild?: boolean\n color?: string\n /** \u76F8\u5F53\u4E8E dangerouslySetInnerHTML */\n html?: string | SerializedEditorState<SerializedLexicalNode>\n}\n\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps)\n\nconst Text = React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n size = 'none', // \u4E3A\u4E86\u517C\u5BB9\u65E7\u7248\u672C\u6837\u5F0F\uFF0C\u9ED8\u8BA4\u503C\u4E3A none\uFF0C\u6CA1\u6709\u9ED8\u8BA4\u7684\u5B57\u4F53\u5927\u5C0F\n weight,\n align,\n className,\n asChild,\n as: Tag = 'span',\n color,\n html,\n ...textProps\n } = props\n\n const htmlContentProps = html\n ? {\n dangerouslySetInnerHTML: { __html: typeof html === 'string' ? html : convertLexicalToHTML({ data: html }) },\n }\n : null\n\n const styleProps = color\n ? {\n style: {\n color,\n },\n }\n : null\n\n return (\n <Slot\n {...textProps}\n ref={forwardedRef}\n className={cn(\n textVariants({\n size,\n weight: size === 'none' ? 'medium' : weight, // \u4E3A\u4E86\u517C\u5BB9\u65E7\u7248\u672C\u6837\u5F0F\uFF0C\u9ED8\u8BA4\u503C\u4E3A medium\n align,\n }),\n className\n )}\n {...htmlContentProps}\n {...styleProps}\n >\n {asChild ? children : <Tag>{htmlContentProps ? null : children}</Tag>}\n </Slot>\n )\n})\nText.displayName = 'Text'\n\nexport { Text }\nexport type { TextProps }\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,IAAA,eAAAC,EAAAH,GA+F4B,IAAAI,EAAA,6BA/F5BC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCACvCC,EAAqC,6CAErCC,EAAmB,+BAGnB,MAAMC,KAAe,OAAI,eAAgB,CACvC,SAAU,CACR,KAAM,CACJ,KAAM,WACN,EAAG,cACH,EAAG,cACH,EAAG,cACH,EAAG,aACL,EACA,OAAQ,CACN,MAAO,aACP,OAAQ,cACR,OAAQ,cACR,SAAU,gBACV,KAAM,WACR,EACA,MAAO,CACL,KAAM,YACN,OAAQ,cACR,MAAO,YACT,CACF,EACA,gBAAiB,CACf,KAAM,OACN,OAAQ,MACV,CACF,CAAC,EAkBKR,EAAOG,EAAM,WAAmC,CAACM,EAAOC,IAAiB,CAC7E,KAAM,CACJ,SAAAC,EACA,KAAAC,EAAO,OACP,OAAAC,EACA,MAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAM,OACV,MAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAmBF,EACrB,CACE,wBAAyB,CAAE,OAAQ,OAAOA,GAAS,SAAWA,KAAO,wBAAqB,CAAE,KAAMA,CAAK,CAAC,CAAE,CAC5G,EACA,KAEEG,EAAaJ,EACf,CACE,MAAO,CACL,MAAAA,CACF,CACF,EACA,KAEJ,SACE,OAAC,QACE,GAAGE,EACJ,IAAKV,EACL,aAAW,MACTF,EAAa,CACX,KAAAI,EACA,OAAQA,IAAS,OAAS,SAAWC,EACrC,MAAAC,CACF,CAAC,EACDC,CACF,EACC,GAAGM,EACH,GAAGC,EAEH,SAAAN,EAAUL,KAAW,OAACM,EAAA,CAAK,SAAAI,EAAmB,KAAOV,EAAS,EACjE,CAEJ,CAAC,EACDX,EAAK,YAAc",
6
6
  "names": ["text_exports", "__export", "Text", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_class_variance_authority", "import_html", "import_helpers", "textVariants", "props", "forwardedRef", "children", "size", "weight", "align", "className", "asChild", "Tag", "color", "html", "textProps", "htmlContentProps", "styleProps"]
7
7
  }
@@ -1,4 +1,4 @@
1
- "use strict";var p=Object.create;var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})},m=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!g.call(e,a)&&a!==o&&r(e,a,{get:()=>t[a],enumerable:!(s=c(t,a))||s.enumerable});return e};var h=(e,t,o)=>(o=e!=null?p(l(e)):{},m(t||!e||!e.__esModule?r(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>m(r({},"__esModule",{value:!0}),e);var q={};d(q,{CustomButtons:()=>B,CustomStyles:()=>k,Default:()=>n,Round:()=>x,default:()=>f});module.exports=y(q);var i=h(require("../biz-components/MemberEquity/index.js"));const b={title:"Biz-Components/MemberEquity",component:i.default,parameters:{layout:"fullscreen",docs:{description:{component:`
1
+ "use strict";var p=Object.create;var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var o in t)r(e,o,{get:t[o],enumerable:!0})},m=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of u(t))!g.call(e,a)&&a!==o&&r(e,a,{get:()=>t[a],enumerable:!(s=c(t,a))||s.enumerable});return e};var h=(e,t,o)=>(o=e!=null?p(l(e)):{},m(t||!e||!e.__esModule?r(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>m(r({},"__esModule",{value:!0}),e);var q={};d(q,{CustomButtons:()=>B,CustomStyles:()=>f,Default:()=>n,Round:()=>x,default:()=>k});module.exports=y(q);var i=h(require("../biz-components/MemberEquity/index.js"));const b={title:"Biz-Components/MemberEquity",component:i.default,parameters:{layout:"fullscreen",docs:{description:{component:`
2
2
  MemberEquity \u7EC4\u4EF6\u662F\u7528\u4E8E\u5C55\u793A\u4F1A\u5458\u6743\u76CA\u7684\u7EC4\u4EF6\u3002
3
3
 
4
4
 
@@ -7,7 +7,7 @@ MemberEquity \u7EC4\u4EF6\u662F\u7528\u4E8E\u5C55\u793A\u4F1A\u5458\u6743\u76CA\
7
7
  .member-equity-description
8
8
  .member-equity-button-primary
9
9
  .member-equity-button-secondary
10
- `}}},tags:["autodocs"]};var f=b;const n={args:{data:{title:"Become a Member Today",description:"Gain early access to new products, exclusive deals, and opportunities to try our products for free.",backgroundImage:{alt:"backgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},mobileBackgroundImage:{alt:"mobileBackgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},primaryButton:{text:"Shop Now",href:"/shop"},secondaryButton:{text:"Learn More",href:"/learn"},shape:"square"}}},x={args:{data:{title:"Become a Member Today",description:"Gain early access to new products, exclusive deals, and opportunities to try our products for free.",backgroundImage:{url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",alt:"backgroundImage",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},primaryButton:{text:"Shop Now",href:"/shop"},secondaryButton:{text:"Learn More",href:"/learn"},shape:"rounded"}}},B={args:{data:{...n.args?.data,title:"Premium Experience",description:"Join our community to get early access to new products and exclusive member benefits.",backgroundImage:{alt:"backgroundImage",url:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",thumbnailURL:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",mimeType:"image/jpeg"},mobileBackgroundImage:{alt:"mobileBackgroundImage",url:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",thumbnailURL:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",mimeType:"image/jpeg"},primaryButton:{text:"Join Now",href:"/join"},secondaryButton:{text:"Explore Benefits",href:"/benefits"}}}},k={args:{data:{title:"Become a Member Today and opportunities",description:"Gain early access to new products, exclusive deals, and opportunities to try our products for free.",backgroundImage:{alt:"backgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},mobileBackgroundImage:{alt:"mobileBackgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},primaryButton:{text:"Shop Now",href:"/shop"},secondaryButton:{text:"Learn More",href:"/learn"},shape:"square"},style:`
10
+ `}}},tags:["autodocs"]};var k=b;const n={args:{data:{title:"Become a Member Today",description:"Gain early access to new products, exclusive deals, and opportunities to try our products for free.",backgroundImage:{alt:"backgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},mobileBackgroundImage:{alt:"mobileBackgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},primaryButton:{text:"Shop Now",link:"/shop"},secondaryButton:{text:"Learn More",link:"/learn"},shape:"square"}}},x={args:{data:{title:"Become a Member Today",description:"Gain early access to new products, exclusive deals, and opportunities to try our products for free.",backgroundImage:{url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",alt:"backgroundImage",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},primaryButton:{text:"Shop Now",link:"/shop"},secondaryButton:{text:"Learn More",link:"/learn"},shape:"rounded"}}},B={args:{data:{...n.args?.data,title:"Premium Experience",description:"Join our community to get early access to new products and exclusive member benefits.",backgroundImage:{alt:"backgroundImage",url:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",thumbnailURL:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",mimeType:"image/jpeg"},mobileBackgroundImage:{alt:"mobileBackgroundImage",url:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",thumbnailURL:"https://images.unsplash.com/photo-1505740420928-5e560c06d30e",mimeType:"image/jpeg"},primaryButton:{text:"Join Now",link:"/join"},secondaryButton:{text:"Explore Benefits",link:"/benefits"}}}},f={args:{data:{title:"Become a Member Today and opportunities",description:"Gain early access to new products, exclusive deals, and opportunities to try our products for free.",backgroundImage:{alt:"backgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},mobileBackgroundImage:{alt:"mobileBackgroundImage",url:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",thumbnailURL:"https://images.unsplash.com/photo-1484807352052-23338990c6c6",mimeType:"image/jpeg"},primaryButton:{text:"Shop Now",link:"/shop"},secondaryButton:{text:"Learn More",link:"/learn"},shape:"square"},style:`
11
11
  .member-equity-title {
12
12
  background: linear-gradient(
13
13
  90deg,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/MemberEquity.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MemberEquity from '../biz-components/MemberEquity/index.js'\n\nconst meta: Meta<typeof MemberEquity> = {\n title: 'Biz-Components/MemberEquity',\n component: MemberEquity,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: ` \nMemberEquity \u7EC4\u4EF6\u662F\u7528\u4E8E\u5C55\u793A\u4F1A\u5458\u6743\u76CA\u7684\u7EC4\u4EF6\u3002 \n\n\n### \u81EA\u5B9A\u4E49style \u53EF\u7528class \n.member-equity-title \n.member-equity-description \n.member-equity-button-primary \n.member-equity-button-secondary \n `,\n },\n },\n },\n tags: ['autodocs'],\n}\n\nexport default meta\ntype Story = StoryObj<typeof MemberEquity>\n\n// \u9ED8\u8BA4\u6837\u5F0F - \u65B9\u5F62\nexport const Default: Story = {\n args: {\n data: {\n title: 'Become a Member Today',\n description:\n 'Gain early access to new products, exclusive deals, and opportunities to try our products for free.',\n backgroundImage: {\n alt: 'backgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n mobileBackgroundImage: {\n alt: 'mobileBackgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Shop Now',\n href: '/shop',\n },\n secondaryButton: {\n text: 'Learn More',\n href: '/learn',\n },\n shape: 'square',\n },\n },\n}\n\n// \u5706\u89D2\u98CE\u683C\nexport const Round: Story = {\n args: {\n data: {\n title: 'Become a Member Today',\n description:\n 'Gain early access to new products, exclusive deals, and opportunities to try our products for free.',\n backgroundImage: {\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n alt: 'backgroundImage',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Shop Now',\n href: '/shop',\n },\n secondaryButton: {\n text: 'Learn More',\n href: '/learn',\n },\n shape: 'rounded',\n },\n },\n}\n\n// \u81EA\u5B9A\u4E49\u6309\u94AE\nexport const CustomButtons: Story = {\n args: {\n data: {\n ...Default.args?.data,\n title: 'Premium Experience',\n description: 'Join our community to get early access to new products and exclusive member benefits.',\n backgroundImage: {\n alt: 'backgroundImage',\n url: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n thumbnailURL: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n mimeType: 'image/jpeg',\n },\n mobileBackgroundImage: {\n alt: 'mobileBackgroundImage',\n url: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n thumbnailURL: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Join Now',\n href: '/join',\n },\n secondaryButton: {\n text: 'Explore Benefits',\n href: '/benefits',\n },\n },\n },\n}\n\n// \u81EA\u5B9A\u4E49\u6837\u5F0F\nexport const CustomStyles: Story = {\n args: {\n data: {\n title: 'Become a Member Today and opportunities',\n description:\n 'Gain early access to new products, exclusive deals, and opportunities to try our products for free.',\n backgroundImage: {\n alt: 'backgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n mobileBackgroundImage: {\n alt: 'mobileBackgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Shop Now',\n href: '/shop',\n },\n secondaryButton: {\n text: 'Learn More',\n href: '/learn',\n },\n shape: 'square',\n },\n style: `\n .member-equity-title {\n background: linear-gradient(\n 90deg,\n #FFD700, /* \u91D1\u8272 (Gold) */\n #FFC000, /* \u4EAE\u91D1\u8272 (Light Gold) */\n #FFA500, /* \u6A59\u8272 (Orange) */\n #FF8C00, /* \u6DF1\u6A59\u8272 (Dark Orange) */\n #FF6B00 /* \u6A59\u7EA2\u8272 (Red-Orange) */\n );\n -webkit-background-clip: text; /* \u517C\u5BB9 WebKit \u6D4F\u89C8\u5668 */\n background-clip: text;\n color: transparent; /* \u9690\u85CF\u539F\u59CB\u6587\u5B57\u989C\u8272 */\n }\n .member-equity-description {\n color: blue;\n }\n .member-equity-button-primary {\n color: green;\n }\n `,\n },\n}\n"],
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport MemberEquity from '../biz-components/MemberEquity/index.js'\n\nconst meta: Meta<typeof MemberEquity> = {\n title: 'Biz-Components/MemberEquity',\n component: MemberEquity,\n parameters: {\n layout: 'fullscreen',\n docs: {\n description: {\n component: ` \nMemberEquity \u7EC4\u4EF6\u662F\u7528\u4E8E\u5C55\u793A\u4F1A\u5458\u6743\u76CA\u7684\u7EC4\u4EF6\u3002 \n\n\n### \u81EA\u5B9A\u4E49style \u53EF\u7528class \n.member-equity-title \n.member-equity-description \n.member-equity-button-primary \n.member-equity-button-secondary \n `,\n },\n },\n },\n tags: ['autodocs'],\n}\n\nexport default meta\ntype Story = StoryObj<typeof MemberEquity>\n\n// \u9ED8\u8BA4\u6837\u5F0F - \u65B9\u5F62\nexport const Default: Story = {\n args: {\n data: {\n title: 'Become a Member Today',\n description:\n 'Gain early access to new products, exclusive deals, and opportunities to try our products for free.',\n backgroundImage: {\n alt: 'backgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n mobileBackgroundImage: {\n alt: 'mobileBackgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Shop Now',\n link: '/shop',\n },\n secondaryButton: {\n text: 'Learn More',\n link: '/learn',\n },\n shape: 'square',\n },\n },\n}\n\n// \u5706\u89D2\u98CE\u683C\nexport const Round: Story = {\n args: {\n data: {\n title: 'Become a Member Today',\n description:\n 'Gain early access to new products, exclusive deals, and opportunities to try our products for free.',\n backgroundImage: {\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n alt: 'backgroundImage',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Shop Now',\n link: '/shop',\n },\n secondaryButton: {\n text: 'Learn More',\n link: '/learn',\n },\n shape: 'rounded',\n },\n },\n}\n\n// \u81EA\u5B9A\u4E49\u6309\u94AE\nexport const CustomButtons: Story = {\n args: {\n data: {\n ...Default.args?.data,\n title: 'Premium Experience',\n description: 'Join our community to get early access to new products and exclusive member benefits.',\n backgroundImage: {\n alt: 'backgroundImage',\n url: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n thumbnailURL: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n mimeType: 'image/jpeg',\n },\n mobileBackgroundImage: {\n alt: 'mobileBackgroundImage',\n url: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n thumbnailURL: 'https://images.unsplash.com/photo-1505740420928-5e560c06d30e',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Join Now',\n link: '/join',\n },\n secondaryButton: {\n text: 'Explore Benefits',\n link: '/benefits',\n },\n },\n },\n}\n\n// \u81EA\u5B9A\u4E49\u6837\u5F0F\nexport const CustomStyles: Story = {\n args: {\n data: {\n title: 'Become a Member Today and opportunities',\n description:\n 'Gain early access to new products, exclusive deals, and opportunities to try our products for free.',\n backgroundImage: {\n alt: 'backgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n mobileBackgroundImage: {\n alt: 'mobileBackgroundImage',\n url: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n thumbnailURL: 'https://images.unsplash.com/photo-1484807352052-23338990c6c6',\n mimeType: 'image/jpeg',\n },\n primaryButton: {\n text: 'Shop Now',\n link: '/shop',\n },\n secondaryButton: {\n text: 'Learn More',\n link: '/learn',\n },\n shape: 'square',\n },\n style: `\n .member-equity-title {\n background: linear-gradient(\n 90deg,\n #FFD700, /* \u91D1\u8272 (Gold) */\n #FFC000, /* \u4EAE\u91D1\u8272 (Light Gold) */\n #FFA500, /* \u6A59\u8272 (Orange) */\n #FF8C00, /* \u6DF1\u6A59\u8272 (Dark Orange) */\n #FF6B00 /* \u6A59\u7EA2\u8272 (Red-Orange) */\n );\n -webkit-background-clip: text; /* \u517C\u5BB9 WebKit \u6D4F\u89C8\u5668 */\n background-clip: text;\n color: transparent; /* \u9690\u85CF\u539F\u59CB\u6587\u5B57\u989C\u8272 */\n }\n .member-equity-description {\n color: blue;\n }\n .member-equity-button-primary {\n color: green;\n }\n `,\n },\n}\n"],
5
5
  "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,EAAA,iBAAAC,EAAA,YAAAC,EAAA,UAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAP,GACA,IAAAQ,EAAyB,sDAEzB,MAAMC,EAAkC,CACtC,MAAO,8BACP,UAAW,EAAAC,QACX,WAAY,CACV,OAAQ,aACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAUb,CACF,CACF,EACA,KAAM,CAAC,UAAU,CACnB,EAEA,IAAOJ,EAAQG,EAIR,MAAML,EAAiB,CAC5B,KAAM,CACJ,KAAM,CACJ,MAAO,wBACP,YACE,sGACF,gBAAiB,CACf,IAAK,kBACL,IAAK,+DACL,aAAc,+DACd,SAAU,YACZ,EACA,sBAAuB,CACrB,IAAK,wBACL,IAAK,+DACL,aAAc,+DACd,SAAU,YACZ,EACA,cAAe,CACb,KAAM,WACN,KAAM,OACR,EACA,gBAAiB,CACf,KAAM,aACN,KAAM,QACR,EACA,MAAO,QACT,CACF,CACF,EAGaC,EAAe,CAC1B,KAAM,CACJ,KAAM,CACJ,MAAO,wBACP,YACE,sGACF,gBAAiB,CACf,IAAK,+DACL,IAAK,kBACL,aAAc,+DACd,SAAU,YACZ,EACA,cAAe,CACb,KAAM,WACN,KAAM,OACR,EACA,gBAAiB,CACf,KAAM,aACN,KAAM,QACR,EACA,MAAO,SACT,CACF,CACF,EAGaH,EAAuB,CAClC,KAAM,CACJ,KAAM,CACJ,GAAGE,EAAQ,MAAM,KACjB,MAAO,qBACP,YAAa,wFACb,gBAAiB,CACf,IAAK,kBACL,IAAK,+DACL,aAAc,+DACd,SAAU,YACZ,EACA,sBAAuB,CACrB,IAAK,wBACL,IAAK,+DACL,aAAc,+DACd,SAAU,YACZ,EACA,cAAe,CACb,KAAM,WACN,KAAM,OACR,EACA,gBAAiB,CACf,KAAM,mBACN,KAAM,WACR,CACF,CACF,CACF,EAGaD,EAAsB,CACjC,KAAM,CACJ,KAAM,CACJ,MAAO,0CACP,YACE,sGACF,gBAAiB,CACf,IAAK,kBACL,IAAK,+DACL,aAAc,+DACd,SAAU,YACZ,EACA,sBAAuB,CACrB,IAAK,wBACL,IAAK,+DACL,aAAc,+DACd,SAAU,YACZ,EACA,cAAe,CACb,KAAM,WACN,KAAM,OACR,EACA,gBAAiB,CACf,KAAM,aACN,KAAM,QACR,EACA,MAAO,QACT,EACA,MAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAqBT,CACF",
6
6
  "names": ["MemberEquity_stories_exports", "__export", "CustomButtons", "CustomStyles", "Default", "Round", "MemberEquity_stories_default", "__toCommonJS", "import_MemberEquity", "meta", "MemberEquity"]
7
7
  }