@anker-in/headless-ui 0.0.27-alpha.98 → 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 (53) 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/stories/MemberEquity.stories.js +2 -2
  18. package/dist/cjs/stories/MemberEquity.stories.js.map +1 -1
  19. package/dist/cjs/stories/button.stories.d.ts +0 -1
  20. package/dist/cjs/stories/button.stories.js +1 -1
  21. package/dist/cjs/stories/button.stories.js.map +2 -2
  22. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  23. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  24. package/dist/esm/biz-components/HeroBanner/types.d.ts +2 -0
  25. package/dist/esm/biz-components/MemberEquity/index.js +4 -4
  26. package/dist/esm/biz-components/MemberEquity/index.js.map +2 -2
  27. package/dist/esm/biz-components/MemberEquity/types.d.ts +2 -2
  28. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  29. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  30. package/dist/esm/biz-components/Slogan/index.js +1 -1
  31. package/dist/esm/biz-components/Slogan/index.js.map +2 -2
  32. package/dist/esm/components/button.d.ts +1 -1
  33. package/dist/esm/components/button.js.map +1 -1
  34. package/dist/esm/stories/MemberEquity.stories.js +1 -1
  35. package/dist/esm/stories/MemberEquity.stories.js.map +1 -1
  36. package/dist/esm/stories/button.stories.d.ts +0 -1
  37. package/dist/esm/stories/button.stories.js +1 -1
  38. package/dist/esm/stories/button.stories.js.map +2 -2
  39. package/package.json +1 -1
  40. package/dist/cjs/helpers/GloablContext.d.ts +0 -10
  41. package/dist/cjs/helpers/GloablContext.js +0 -2
  42. package/dist/cjs/helpers/GloablContext.js.map +0 -7
  43. package/dist/cjs/hooks/useMergeRefs.d.ts +0 -4
  44. package/dist/cjs/tsconfig.tsbuildinfo +0 -1
  45. package/dist/cjs/types/libs.d.js +0 -2
  46. package/dist/cjs/types/libs.d.js.map +0 -7
  47. package/dist/esm/helpers/GloablContext.d.ts +0 -10
  48. package/dist/esm/helpers/GloablContext.js +0 -2
  49. package/dist/esm/helpers/GloablContext.js.map +0 -7
  50. package/dist/esm/hooks/useMergeRefs.d.ts +0 -4
  51. package/dist/esm/tsconfig.tsbuildinfo +0 -1
  52. package/dist/esm/types/libs.d.js +0 -2
  53. package/dist/esm/types/libs.d.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/stories/button.stories.tsx"],
4
- "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport { SearchIcon } from '@storybook/icons'\n\nimport { Button } from '../components/index.js'\nimport React from 'react'\n\n// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export\nconst meta = {\n // \u540C\u65F6\u5B9A\u4E49\u4E86\u9875\u9762\u5DE6\u4FA7\u83DC\u5355\n title: 'Components/Button',\n component: Button,\n parameters: {\n // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout\n layout: 'centered',\n docs: {\n description: {\n component: `\u6309\u94AE\u7EC4\u4EF6, \u5206\u4E3A\u591A\u79CD\u53D8\u4F53\u548C\u5927\u5C0F, \u652F\u6301 loading \u72B6\u6001\u548C\u56FE\u6807`,\n },\n },\n },\n // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs\n tags: ['autodocs'],\n // More on argTypes: https://storybook.js.org/docs/api/argtypes\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['primary', 'secondary', 'link', 'ghost'],\n description: '\u6309\u94AE\u7C7B\u578B, \u63A8\u8350\u4F7F\u7528 primary \u548C secondary\uFF0C link ; ghost \u5C06\u4F1A\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 secondary\uFF0C \u4EE3\u66FF',\n },\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg', 'icon'],\n description: '\u6309\u94AE\u5927\u5C0F \u9ED8\u8BA4\u662F base, \u53EF\u9009\u503C: sm, base, lg, icon',\n },\n hoverEffect: {\n description: 'hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548',\n control: {\n type: 'select',\n },\n options: ['none', 'slide'],\n },\n },\n args: {\n variant: 'primary',\n size: 'base',\n children: 'Button',\n asChild: false,\n disabled: false,\n loading: false,\n hoverEffect: 'none',\n },\n} satisfies Meta<typeof Button>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\n// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args\n// args \u4F1A\u4F5C\u4E3A props \u4F20\u9012\u7ED9\u7EC4\u4EF6\n// Story\u7684\u540D\u4F1A\u4F5C\u4E3A\u83DC\u5355\u7684\u540D\u79F0 \u81EA\u52A8\u9996\u5B57\u6BCD\u5927\u5199\u5E76\u6309\u7167\u5927\u5199\u5B57\u6BCD\u62C6\u5206 UseAsButton => Use As Button\n\nexport const Primary: Story = {\n args: {\n size: 'lg',\n children: 'Primary',\n },\n}\n\nexport const Secondary: Story = {\n args: {\n size: 'lg',\n variant: 'secondary',\n children: 'Secondary',\n },\n}\n\nexport const Link: Story = {\n args: {\n size: 'lg',\n variant: 'link',\n children: 'Link',\n },\n}\n\nexport const WithIcon: Story = {\n args: {\n size: 'lg',\n children: (\n <>\n WithIcon <SearchIcon className=\"ml-2\" />\n </>\n ),\n },\n}\n\nexport const Loading: Story = {\n args: {\n size: 'lg',\n loading: true,\n },\n}\n\nexport const Aschild: Story = {\n args: {\n size: 'lg',\n asChild: true,\n children: <a href=\"http://example.com\">as a a tag</a>,\n },\n}\n\nexport const Spinner: Story = {\n args: {\n size: 'lg',\n loading: true,\n spinner: (\n <div className=\"flex animate-pulse flex-row font-bold text-neutral-900\">\n <svg\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n p-id=\"2625\"\n width=\"1rem\"\n className=\"align-middle\"\n >\n <path\n d=\"M511.882596 287.998081h-0.361244a31.998984 31.998984 0 0 1-31.659415-31.977309v-0.361244c0-0.104761 0.115598-11.722364 0.115598-63.658399V96.000564a31.998984 31.998984 0 1 1 64.001581 0V192.001129c0 52.586273-0.111986 63.88237-0.119211 64.337537a32.002596 32.002596 0 0 1-31.977309 31.659415zM511.998194 959.99842a31.998984 31.998984 0 0 1-31.998984-31.998984v-96.379871c0-51.610915-0.111986-63.174332-0.115598-63.286318s0-0.242033 0-0.361243a31.998984 31.998984 0 0 1 63.997968-0.314283c0 0.455167 0.11921 11.711527 0.11921 64.034093v96.307622a31.998984 31.998984 0 0 1-32.002596 31.998984zM330.899406 363.021212a31.897836 31.897836 0 0 1-22.866739-9.612699c-0.075861-0.075861-8.207461-8.370021-44.931515-45.094076L195.198137 240.429485a31.998984 31.998984 0 0 1 45.256635-45.253022L308.336112 263.057803c37.182834 37.182834 45.090463 45.253022 45.41197 45.578141A31.998984 31.998984 0 0 1 330.899406 363.021212zM806.137421 838.11473a31.901448 31.901448 0 0 1-22.628318-9.374279L715.624151 760.859111c-36.724054-36.724054-45.018214-44.859267-45.097687-44.93874a31.998984 31.998984 0 0 1 44.77618-45.729864c0.32512 0.317895 8.395308 8.229136 45.578142 45.411969l67.88134 67.88134a31.998984 31.998984 0 0 1-22.624705 54.630914zM224.000113 838.11473a31.901448 31.901448 0 0 0 22.628317-9.374279l67.88134-67.88134c36.724054-36.724054 45.021826-44.859267 45.097688-44.93874a31.998984 31.998984 0 0 0-44.776181-45.729864c-0.32512 0.317895-8.395308 8.229136-45.578142 45.411969l-67.88134 67.884953a31.998984 31.998984 0 0 0 22.628318 54.627301zM255.948523 544.058589h-0.361244c-0.104761 0-11.722364-0.115598-63.658399-0.115598H95.942765a31.998984 31.998984 0 1 1 0-64.00158h95.996952c52.586273 0 63.88237 0.111986 64.337538 0.11921a31.998984 31.998984 0 0 1 31.659414 31.97731v0.361244a32.002596 32.002596 0 0 1-31.988146 31.659414zM767.939492 544.058589a32.002596 32.002596 0 0 1-31.995372-31.666639v-0.361244a31.998984 31.998984 0 0 1 31.659415-31.970085c0.455167 0 11.754876-0.11921 64.34115-0.11921h96.000564a31.998984 31.998984 0 0 1 0 64.00158H831.944685c-51.936034 0-63.553638 0.111986-63.665624 0.115598h-0.335957zM692.999446 363.0176a31.998984 31.998984 0 0 1-22.863126-54.381656c0.317895-0.32512 8.229136-8.395308 45.41197-45.578141l67.88134-67.884953A31.998984 31.998984 0 1 1 828.693489 240.429485l-67.892177 67.88134c-31.020013 31.023625-41.644196 41.759794-44.241539 44.393262l-0.697201 0.722488a31.908673 31.908673 0 0 1-22.863126 9.591025z\"\n fill=\"\"\n p-id=\"2626\"\n ></path>\n </svg>\n &nbsp;loading...\n </div>\n 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KACN,QAAS,GACT,YAAU,OAAC,KAAE,KAAK,qBAAqB,sBAAU,CACnD,CACF,EAEaK,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,WACE,QAAC,OAAI,UAAU,yDACb,oBAAC,OACC,QAAQ,gBACR,QAAQ,MACR,MAAM,6BACN,OAAK,OACL,MAAM,OACN,UAAU,eAEV,mBAAC,QACC,EAAE,o5EACF,KAAK,GACL,OAAK,OACN,EACH,EAAM,kBAER,CAEJ,CACF",
4
+ "sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport { SearchIcon } from '@storybook/icons'\n\nimport { Button } from '../components/index.js'\nimport React from 'react'\n\n// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export\nconst meta = {\n // \u540C\u65F6\u5B9A\u4E49\u4E86\u9875\u9762\u5DE6\u4FA7\u83DC\u5355\n title: 'Components/Button',\n component: Button,\n parameters: {\n // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout\n layout: 'centered',\n docs: {\n description: {\n component: `\u6309\u94AE\u7EC4\u4EF6, \u5206\u4E3A\u591A\u79CD\u53D8\u4F53\u548C\u5927\u5C0F, \u652F\u6301 loading \u72B6\u6001\u548C\u56FE\u6807`,\n },\n },\n },\n // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs\n tags: ['autodocs'],\n // More on argTypes: https://storybook.js.org/docs/api/argtypes\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['primary', 'secondary', 'link', 'ghost'],\n description: '\u6309\u94AE\u7C7B\u578B, \u63A8\u8350\u4F7F\u7528 primary \u548C secondary\uFF0C link ; ghost \u5C06\u4F1A\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 secondary\uFF0C \u4EE3\u66FF',\n },\n size: {\n control: {\n type: 'select',\n },\n options: ['sm', 'base', 'lg', 'icon'],\n description: '\u6309\u94AE\u5927\u5C0F \u9ED8\u8BA4\u662F base, \u53EF\u9009\u503C: sm, base, lg, icon',\n },\n hoverEffect: {\n description: 'hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548',\n control: {\n type: 'select',\n },\n options: ['none', 'slide'],\n },\n },\n args: {\n variant: 'primary',\n size: 'base',\n children: 'Button',\n disabled: false,\n loading: false,\n hoverEffect: 'none',\n },\n} satisfies Meta<typeof Button>\n\nexport default meta\ntype Story = StoryObj<typeof meta>\n\n// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args\n// args \u4F1A\u4F5C\u4E3A props \u4F20\u9012\u7ED9\u7EC4\u4EF6\n// Story\u7684\u540D\u4F1A\u4F5C\u4E3A\u83DC\u5355\u7684\u540D\u79F0 \u81EA\u52A8\u9996\u5B57\u6BCD\u5927\u5199\u5E76\u6309\u7167\u5927\u5199\u5B57\u6BCD\u62C6\u5206 UseAsButton => Use As Button\n\nexport const Primary: Story = {\n args: {\n size: 'lg',\n children: 'Primary',\n },\n}\n\nexport const Secondary: Story = {\n args: {\n size: 'lg',\n variant: 'secondary',\n children: 'Secondary',\n },\n}\n\nexport const Link: Story = {\n args: {\n size: 'lg',\n variant: 'link',\n children: 'Link',\n },\n}\n\nexport const WithIcon: Story = {\n args: {\n size: 'lg',\n children: (\n <>\n WithIcon <SearchIcon className=\"ml-2\" />\n </>\n ),\n },\n}\n\nexport const Loading: Story = {\n args: {\n size: 'lg',\n loading: true,\n },\n}\n\nexport const Aschild: Story = {\n args: {\n size: 'lg',\n asChild: true,\n children: <a href=\"http://example.com\">as a a tag</a>,\n },\n}\n\nexport const Spinner: Story = {\n args: {\n size: 'lg',\n loading: true,\n spinner: (\n <div className=\"flex animate-pulse flex-row font-bold text-neutral-900\">\n <svg\n viewBox=\"0 0 1024 1024\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n p-id=\"2625\"\n width=\"1rem\"\n className=\"align-middle\"\n >\n <path\n d=\"M511.882596 287.998081h-0.361244a31.998984 31.998984 0 0 1-31.659415-31.977309v-0.361244c0-0.104761 0.115598-11.722364 0.115598-63.658399V96.000564a31.998984 31.998984 0 1 1 64.001581 0V192.001129c0 52.586273-0.111986 63.88237-0.119211 64.337537a32.002596 32.002596 0 0 1-31.977309 31.659415zM511.998194 959.99842a31.998984 31.998984 0 0 1-31.998984-31.998984v-96.379871c0-51.610915-0.111986-63.174332-0.115598-63.286318s0-0.242033 0-0.361243a31.998984 31.998984 0 0 1 63.997968-0.314283c0 0.455167 0.11921 11.711527 0.11921 64.034093v96.307622a31.998984 31.998984 0 0 1-32.002596 31.998984zM330.899406 363.021212a31.897836 31.897836 0 0 1-22.866739-9.612699c-0.075861-0.075861-8.207461-8.370021-44.931515-45.094076L195.198137 240.429485a31.998984 31.998984 0 0 1 45.256635-45.253022L308.336112 263.057803c37.182834 37.182834 45.090463 45.253022 45.41197 45.578141A31.998984 31.998984 0 0 1 330.899406 363.021212zM806.137421 838.11473a31.901448 31.901448 0 0 1-22.628318-9.374279L715.624151 760.859111c-36.724054-36.724054-45.018214-44.859267-45.097687-44.93874a31.998984 31.998984 0 0 1 44.77618-45.729864c0.32512 0.317895 8.395308 8.229136 45.578142 45.411969l67.88134 67.88134a31.998984 31.998984 0 0 1-22.624705 54.630914zM224.000113 838.11473a31.901448 31.901448 0 0 0 22.628317-9.374279l67.88134-67.88134c36.724054-36.724054 45.021826-44.859267 45.097688-44.93874a31.998984 31.998984 0 0 0-44.776181-45.729864c-0.32512 0.317895-8.395308 8.229136-45.578142 45.411969l-67.88134 67.884953a31.998984 31.998984 0 0 0 22.628318 54.627301zM255.948523 544.058589h-0.361244c-0.104761 0-11.722364-0.115598-63.658399-0.115598H95.942765a31.998984 31.998984 0 1 1 0-64.00158h95.996952c52.586273 0 63.88237 0.111986 64.337538 0.11921a31.998984 31.998984 0 0 1 31.659414 31.97731v0.361244a32.002596 32.002596 0 0 1-31.988146 31.659414zM767.939492 544.058589a32.002596 32.002596 0 0 1-31.995372-31.666639v-0.361244a31.998984 31.998984 0 0 1 31.659415-31.970085c0.455167 0 11.754876-0.11921 64.34115-0.11921h96.000564a31.998984 31.998984 0 0 1 0 64.00158H831.944685c-51.936034 0-63.553638 0.111986-63.665624 0.115598h-0.335957zM692.999446 363.0176a31.998984 31.998984 0 0 1-22.863126-54.381656c0.317895-0.32512 8.229136-8.395308 45.41197-45.578141l67.88134-67.884953A31.998984 31.998984 0 1 1 828.693489 240.429485l-67.892177 67.88134c-31.020013 31.023625-41.644196 41.759794-44.241539 44.393262l-0.697201 0.722488a31.908673 31.908673 0 0 1-22.863126 9.591025z\"\n fill=\"\"\n p-id=\"2626\"\n ></path>\n </svg>\n &nbsp;loading...\n </div>\n ),\n },\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,YAAAC,EAAA,YAAAC,EAAA,cAAAC,EAAA,YAAAC,EAAA,aAAAC,EAAA,YAAAC,IAAA,eAAAC,EAAAV,GA0FM,IAAAW,EAAA,6BAzFNC,EAA2B,4BAE3BC,EAAuB,kCACvBC,EAAkB,iBAGlB,MAAMC,EAAO,CAEX,MAAO,oBACP,UAAW,SACX,WAAY,CAEV,OAAQ,WACR,KAAM,CACJ,YAAa,CACX,UAAW,uIACb,CACF,CACF,EAEA,KAAM,CAAC,UAAU,EAEjB,SAAU,CACR,QAAS,CACP,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,UAAW,YAAa,OAAQ,OAAO,EACjD,YAAa,8KACf,EACA,KAAM,CACJ,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,KAAM,OAAQ,KAAM,MAAM,EACpC,YAAa,0FACf,EACA,YAAa,CACX,YAAa,mIACb,QAAS,CACP,KAAM,QACR,EACA,QAAS,CAAC,OAAQ,OAAO,CAC3B,CACF,EACA,KAAM,CACJ,QAAS,UACT,KAAM,OACN,SAAU,SACV,SAAU,GACV,QAAS,GACT,YAAa,MACf,CACF,EAEA,IAAON,EAAQM,EAOR,MAAMV,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,SAAU,SACZ,CACF,EAEaC,EAAmB,CAC9B,KAAM,CACJ,KAAM,KACN,QAAS,YACT,SAAU,WACZ,CACF,EAEaH,EAAc,CACzB,KAAM,CACJ,KAAM,KACN,QAAS,OACT,SAAU,MACZ,CACF,EAEaK,EAAkB,CAC7B,KAAM,CACJ,KAAM,KACN,YACE,oBAAE,yBACS,OAAC,cAAW,UAAU,OAAO,GACxC,CAEJ,CACF,EAEaJ,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,EACX,CACF,EAEaF,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,YAAU,OAAC,KAAE,KAAK,qBAAqB,sBAAU,CACnD,CACF,EAEaK,EAAiB,CAC5B,KAAM,CACJ,KAAM,KACN,QAAS,GACT,WACE,QAAC,OAAI,UAAU,yDACb,oBAAC,OACC,QAAQ,gBACR,QAAQ,MACR,MAAM,6BACN,OAAK,OACL,MAAM,OACN,UAAU,eAEV,mBAAC,QACC,EAAE,o5EACF,KAAK,GACL,OAAK,OACN,EACH,EAAM,kBAER,CAEJ,CACF",
6
6
  "names": ["button_stories_exports", "__export", "Aschild", "Link", "Loading", "Primary", "Secondary", "Spinner", "WithIcon", "button_stories_default", "__toCommonJS", "import_jsx_runtime", "import_icons", "import_components", "import_react", "meta"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as t,jsxs as s}from"react/jsx-runtime";import b,{useRef as f}from"react";import{useGSAP as z}from"@gsap/react";import g from"gsap";import{ScrollTrigger as l}from"gsap/dist/ScrollTrigger";import{Button as h,Heading as R,Picture as T,Text as v}from"../../components/index.js";import{cn as a}from"../../helpers/index.js";import{withStyles as E}from"../../shared/Styles.js";const y=b.forwardRef(({data:k,className:N},I)=>{const{title:u,subtitle:H,pcImage:w,mobileImage:B,primaryButton:n,secondaryButton:i,theme:P="light",caption:c=[]}=k,r=f(null),o=f(null);return z(()=>{if(!r.current)return;const m=o.current?.clientHeight||100;return window.innerHeight<=m?l.create({trigger:o.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:e=>{const p=e.progress*40-20;g.set(r.current,{yPercent:p})}}):(l.create({trigger:o.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:e=>{const p=e.progress*20-20;g.set(r.current,{yPercent:p})}}),l.create({trigger:o.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:e=>{const p=e.progress*20;g.set(r.current,{yPercent:p})}})),()=>{l.getAll().forEach(e=>e.kill())}},[]),s("div",{ref:o,"data-ui-component-id":"HeroBanner",className:a(P==="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",N),children:[t("div",{ref:r,className:a("absolute left-0 top-0 size-full"),children:t(T,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",source:`${w.url||""} , ${B.url||""} 767`})}),s("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:[u&&s("div",{className:"laptop:text-left max-w-[686px]",children:[t(R,{as:"h1",size:5,className:a("hero-banner-title"),html:u}),t(v,{as:"p",className:a("hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]"),html:H})]}),s("div",{className:"laptop:justify-start laptop:gap-4 flex items-center gap-3",children:[i&&i.text&&t(h,{size:"lg",variant:"secondary",className:"hero-banner-secondary-button",children:i.text}),n&&n.text&&t(h,{size:"lg",variant:"primary",className:"hero-banner-primary-button",children:n.text})]})]}),c.length>0&&t("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:c.map((m,x)=>s(b.Fragment,{children:[t(v,{className:a("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:m.title}),x<c.length-1&&t("div",{className:a("bg-info-primary w-px")})]},x))})]})});y.displayName="HeroBanner";var F=E(y);export{F as default};
1
+ "use client";import{jsx as t,jsxs as s}from"react/jsx-runtime";import b,{useRef as f}from"react";import{useGSAP as P}from"@gsap/react";import g from"gsap";import{ScrollTrigger as i}from"gsap/dist/ScrollTrigger";import{Button as h,Heading as R,Picture as T,Text as v}from"../../components/index.js";import{cn as a}from"../../helpers/index.js";import{withStyles as E}from"../../shared/Styles.js";const y=b.forwardRef(({data:k,className:N},I)=>{const{title:u,subtitle:H,pcImage:w,mobileImage:B,primaryButton:l,secondaryButton:n,theme:z="light",caption:c=[]}=k,r=f(null),o=f(null);return P(()=>{if(!r.current)return;const m=o.current?.clientHeight||100;return window.innerHeight<=m?i.create({trigger:o.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:e=>{const p=e.progress*40-20;g.set(r.current,{yPercent:p})}}):(i.create({trigger:o.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:e=>{const p=e.progress*20-20;g.set(r.current,{yPercent:p})}}),i.create({trigger:o.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:e=>{const p=e.progress*20;g.set(r.current,{yPercent:p})}})),()=>{i.getAll().forEach(e=>e.kill())}},[]),s("div",{ref:o,"data-ui-component-id":"HeroBanner",className:a(z==="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",N),children:[t("div",{ref:r,className:a("absolute left-0 top-0 size-full"),children:t(T,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",source:`${w.url||""} , ${B.url||""} 767`})}),s("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:[u&&s("div",{className:"laptop:text-left max-w-[686px]",children:[t(R,{as:"h1",size:5,className:a("hero-banner-title"),html:u}),t(v,{as:"p",size:3,className:a("hero-banner-subtitle font-heading lg-desktop:text-[18px] laptop:mt-[8px] lg-desktop:mt-[16px] mt-[4px] text-[14px]"),html:H})]}),s("div",{className:"laptop:justify-start laptop:gap-4 flex items-center gap-3",children:[n&&n.text&&t("a",{href:n.link,children:t(h,{size:"lg",variant:"secondary",className:"hero-banner-secondary-button",children:n.text})}),l&&l.text&&t("a",{href:l.link,children:t(h,{size:"lg",variant:"primary",className:"hero-banner-primary-button",children:l.text})})]})]}),c.length>0&&t("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:c.map((m,x)=>s(b.Fragment,{children:[t(v,{size:3,className:a("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:m.title}),x<c.length-1&&t("div",{className:a("bg-info-primary w-px")})]},x))})]})});y.displayName="HeroBanner";var F=E(y);export{F as default};
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(HeroBanner)\n"],
5
- "mappings": "aA0EQ,cAAAA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CACD,EACH,GAEJ,CAEJ,CAAC,EAEDnB,EAAW,YAAc,aAEzB,IAAOoB,EAAQrB,EAAWC,CAAU",
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 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": "aA0EQ,cAAAA,EAUE,QAAAC,MAVF,oBAzER,OAAOC,GAAS,UAAAC,MAAc,QAC9B,OAAS,WAAAC,MAAe,cACxB,OAAOC,MAAU,OACjB,OAAS,iBAAAC,MAAqB,0BAE9B,OAAS,UAAAC,EAAQ,WAAAC,EAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC/C,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAG3B,MAAMC,EAAaX,EAAM,WAA4C,CAAC,CAAE,KAAAY,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,EAAQtB,EAAyB,IAAI,EACrCuB,EAASvB,EAAuB,IAAI,EAE1C,OAAAC,EAAQ,IAAM,CACZ,GAAI,CAACqB,EAAM,QAAS,OACpB,MAAME,EAAeD,EAAO,SAAS,cAAgB,IAGrD,OAFqB,OAAO,aAERC,EAClBrB,EAAc,OAAO,CACnB,QAASoB,EAAO,QAChB,MAAO,aACP,IAAK,aACL,MAAO,GACP,SAAWE,GAAc,CAEvB,MAAMC,EAAQD,EAAK,SAAW,GAAO,GACrCvB,EAAK,IAAIoB,EAAM,QAAS,CAAE,SAAUI,CAAM,CAAC,CAC7C,CACF,CAAC,GAEDvB,EAAc,OAAO,CACnB,QAASoB,EAAO,QAChB,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AAE,KAAMqB,EAAc,KACrB,SAAArB,EAACO,EAAA,CAAO,KAAK,KAAK,QAAQ,UAAU,UAAU,6BAC3C,SAAAc,EAAc,KACjB,EACF,GAEJ,GACF,EAGCG,EAAQ,OAAS,GAChBxB,EAAC,OAAI,UAAU,uKACZ,SAAAwB,EAAQ,IAAI,CAACO,EAAGC,IACf/B,EAACC,EAAM,SAAN,CACC,UAAAF,EAACU,EAAA,CACC,KAAM,EACN,UAAWC,EACT,8KACF,EACA,KAAMoB,EAAE,MACV,EACCC,EAAQR,EAAQ,OAAS,GAAKxB,EAAC,OAAI,UAAWW,EAAG,sBAAsB,EAAG,IARxDqB,CASrB,CACD,EACH,GAEJ,CAEJ,CAAC,EAEDnB,EAAW,YAAc,aAEzB,IAAOoB,EAAQrB,EAAWC,CAAU",
6
6
  "names": ["jsx", "jsxs", "React", "useRef", "useGSAP", "gsap", "ScrollTrigger", "Button", "Heading", "Picture", "Text", "cn", "withStyles", "HeroBanner", "data", "className", "ref", "title", "subtitle", "pcImage", "mobileImage", "primaryButton", "secondaryButton", "theme", "caption", "bgRef", "boxRef", "clientHeight", "self", "value", "t", "c", "index", "HeroBanner_default"]
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,10 +1,10 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";import{Button as o,Heading as g,Text as v}from"../../components/index.js";import{withStyles as x}from"../../shared/Styles.js";import{cn as a}from"../../helpers/utils.js";const f=({data:l,className:p=""})=>{const{title:i,description:s,backgroundImage:r,mobileBackgroundImage:d,primaryButton:m,secondaryButton:n,theme:c,shape:u}=l,b=()=>{},y=()=>{};return t("section",{"data-ui-component-id":"MemberEquity",className:a(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
- aspect-[390/480] overflow-hidden`,p,{"aiui-dark":c==="dark","rounded-box":u==="rounded"}),children:[e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:e("source",{src:r?.url,type:"video/mp4"})}),e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:e("source",{src:d?.url,type:"video/mp4"})}),e("div",{className:`
1
+ "use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import"react";import{Button as i,Heading as g,Text as x}from"../../components/index.js";import{withStyles as f}from"../../shared/Styles.js";import{cn as l}from"../../helpers/utils.js";const v=({data:p,className:s=""})=>{const{title:r,description:n,backgroundImage:d,mobileBackgroundImage:m,primaryButton:t,secondaryButton:a,theme:c,shape:u}=p,b=()=>{},y=()=>{};return o("section",{"data-ui-component-id":"MemberEquity",className:l(`tablet:aspect-[740/480] laptop:aspect-[1664/485] text-info-primary relative
2
+ aspect-[390/480] overflow-hidden`,s,{"aiui-dark":c==="dark","rounded-box":u==="rounded"}),children:[e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block absolute inset-0 hidden size-full object-cover",children:e("source",{src:d?.url,type:"video/mp4"})}),e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden absolute inset-0 size-full object-cover",children:e("source",{src:m?.url,type:"video/mp4"})}),e("div",{className:`
3
3
  laptop:items-center
4
4
  absolute
5
5
  inset-0 flex w-full items-end
6
- `,children:t("div",{className:`
6
+ `,children:o("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:[t("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[e(g,{as:"h2",size:3,className:"member-equity-title ",html:i}),e(v,{size:2,className:"member-equity-description",html:s})]}),t("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[e(o,{variant:"secondary",onClick:y,className:a("member-equity-button-secondary"),children:n.text}),e(o,{variant:"primary",onClick:b,className:a("member-equity-button-primary"),children:m.text})]})]})})]})};var C=x(f);export{C as default};
9
+ `,children:[o("div",{className:"tablet:gap-2 laptop:gap-3 desktop:gap-3 lg-desktop:gap-4 flex flex-col gap-2",children:[e(g,{as:"h2",size:3,className:"member-equity-title ",html:r}),e(x,{size:2,className:"member-equity-description",html:n})]}),o("div",{className:"tablet:gap-3 laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex items-center gap-3",children:[a&&a.text&&e("a",{href:a.link,children:e(i,{variant:"secondary",onClick:y,className:l("member-equity-button-secondary"),children:a.text})}),t&&t.text&&e("a",{href:t.link,children:e(i,{variant:"primary",onClick:b,className:l("member-equity-button-primary"),children:t.text})})]})]})})]})};var C=f(v);export{C as default};
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": "aAgCQ,cAAAA,EAkBE,QAAAC,MAlBF,oBA/BR,MAAkB,QAClB,OAAS,UAAAC,EAAQ,WAAAC,EAAS,QAAAC,MAAY,4BACtC,OAAS,cAAAC,MAAkB,yB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F,CAEJ,EAEA,IAAOM,EAAQf,EAAWE,CAAY",
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 {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": "aAgCQ,cAAAA,EAkBE,QAAAC,MAlBF,oBA/BR,MAAkB,QAClB,OAAS,UAAAC,EAAQ,WAAAC,EAAS,QAAAC,MAAY,4BACtC,OAAS,cAAAC,MAAkB,yBAE3B,OAAS,MAAAC,MAAU,yBAEnB,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,OACElB,EAAC,WACC,uBAAqB,eACrB,UAAWK,EACT;AAAA,0CAEAG,EACA,CACE,YAAaO,IAAU,OACvB,cAAeC,IAAU,SAC3B,CACF,EAEA,UAAAjB,EAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,8DAC/C,SAAAA,EAAC,UAAO,IAAKY,GAAiB,IAAK,KAAK,YAAY,EACtD,EACAZ,EAAC,SAAM,SAAQ,GAAC,MAAK,GAAC,YAAW,GAAC,KAAI,GAAC,UAAU,wDAC/C,SAAAA,EAAC,UAAO,IAAKa,GAAuB,IAAK,KAAK,YAAY,EAC5D,EACAb,EAAC,OACC,UAAW;AAAA;AAAA;AAAA;AAAA,QAMX,SAAAC,EAAC,OACC,UAAW;AAAA;AAAA;AAAA,UAKX,UAAAA,EAAC,OAAI,UAAU,+EACb,UAAAD,EAACG,EAAA,CAAQ,GAAG,KAAK,KAAM,EAAG,UAAW,uBAAwB,KAAMO,EAAO,EAC1EV,EAACI,EAAA,CAAK,KAAM,EAAG,UAAW,4BAA6B,KAAMO,EAAa,GAC5E,EAEAV,EAAC,OAAI,UAAU,mFACZ,UAAAc,GAAmBA,EAAgB,MAClCf,EAAC,KAAE,KAAMe,EAAgB,KACvB,SAAAf,EAACE,EAAA,CACC,QAAQ,YACR,QAASiB,EACT,UAAWb,EAAG,gCAAgC,EAE7C,SAAAS,EAAgB,KACnB,EACF,EAEDD,GAAiBA,EAAc,MAC9Bd,EAAC,KAAE,KAAMc,EAAc,KACrB,SAAAd,EAACE,EAAA,CACC,QAAQ,UACR,QAASgB,EACT,UAAWZ,EAAG,8BAA8B,EAE3C,SAAAQ,EAAc,KACjB,EACF,GAEJ,GACF,EACF,GACF,CAEJ,EAEA,IAAOM,EAAQf,EAAWE,CAAY",
6
6
  "names": ["jsx", "jsxs", "Button", "Heading", "Text", "withStyles", "cn", "MemberEquity", "data", "className", "title", "description", "backgroundImage", "mobileBackgroundImage", "primaryButton", "secondaryButton", "theme", "shape", "handleButtonPrimaryClick", "handleButtonSecondaryClick", "MemberEquity_default"]
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
- import{Fragment as v,jsx as t,jsxs as o}from"react/jsx-runtime";import T from"react";import{useMediaQuery as w}from"react-responsive";import{withStyles as B}from"../../shared/Styles.js";import I from"../../components/picture.js";import g from"../../components/button.js";import{Heading as G}from"../../components/heading.js";import{Text as $}from"../../components/text.js";import{Carousel as k,CarouselContent as y,CarouselItem as N}from"../../components/carousel.js";import{Grid as C,GridItem as h}from"../../components/gird.js";import M from"../Title/index.js";import{cn as L}from"../../helpers/utils.js";import{Tabs as S,TabsList as P,TabsTrigger as R,TabsContent as q}from"../../components/tabs.js";const d=({item:b,shape:x="square",isTab:s=!1})=>{const u=w({query:"(max-width: 1024px)"}),{theme:m="light",title:n,description:i,imageUrl:p,primaryButton:r,secondaryButton:c}=b,e="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return o("div",{className:L("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":x==="rounded","aiui-dark":m==="dark","h-[480px]":u&&!s,"h-[400px]":u&&s},"text-info-primary"),children:[t(I,{source:p?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${p?.width}/${p?.height}`}}),o("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[o("div",{children:[t(G,{size:3,className:"item-title",html:n}),t($,{className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3",html:i})]}),o("div",{className:"flex gap-[16px]",children:[c&&t(g,{className:e,variant:"secondary",asChild:!0,children:t("a",{href:c.link,children:c.text})}),r&&t(g,{className:e,variant:"primary",asChild:!0,children:t("a",{href:r.link,children:r.text})})]})]})]})},z=T.forwardRef((b,x)=>{const{shape:s,sectionTitle:u,groupByTab:m=!1,items:n=[],carousel:i}=b.data,p=e=>{switch(e){case"full":return 12;case"half":return 6;case"one-third":return 4}},r=n.map(e=>e.tabName).filter(Boolean).filter((e,a,l)=>l.indexOf(e)===a),c=r.map(e=>({tabName:e,items:n.filter(a=>a.tabName===e)})).reduce((e,a)=>(e[a.tabName]=a.items,e),{});return o("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:x,className:"text-info-primary",children:[u&&t(M,{data:{title:u},className:"section-title"}),m?o(S,{shape:s,align:"left",defaultValue:r[0],children:[t(P,{children:r.map((e,a)=>t(R,{value:e,children:e},a))}),r.map((e,a)=>t(q,{value:e,className:"desktop:mt-[36px] mt-[24px] w-full",children:o(v,{children:[o(C,{className:"w-full",children:[c[e].map((l,f)=>t(h,{span:p(l.width??"full"),className:"laptop:block hidden",children:t(d,{item:l,shape:s,isTab:m})},`${l?.title||""}${f}`)),t(h,{className:"laptop:hidden block",span:12,children:t(k,{className:"",children:t(y,{className:"flex",children:c[e].map((l,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(d,{item:l,shape:s,isTab:m})},`${l?.title||""}${f}`))})})})]}),i&&i?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:i.items.map((l,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(d,{item:l,shape:s,isTab:m})},f))})}):null]})},a))]}):o(v,{children:[o(C,{className:"w-full",children:[n.map((e,a)=>t(h,{span:p(e.width??"full"),className:"laptop:block hidden",children:t(d,{item:e,shape:s})},`${e?.title||""}${a}`)),n.map((e,a)=>t(h,{span:p("full"),className:"laptop:hidden block",children:t(d,{item:e,shape:s})},`${e?.title||""}${a}`))]}),i&&i?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:i.items.map((e,a)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(d,{item:e,shape:s})},`${e?.title||""}${a}`))})}):null]})]})});var W=B(z);export{W as default};
1
+ import{Fragment as v,jsx as t,jsxs as o}from"react/jsx-runtime";import T from"react";import{useMediaQuery as w}from"react-responsive";import{withStyles as B}from"../../shared/Styles.js";import I from"../../components/picture.js";import g from"../../components/button.js";import{Heading as G}from"../../components/heading.js";import{Text as $}from"../../components/text.js";import{Carousel as k,CarouselContent as y,CarouselItem as N}from"../../components/carousel.js";import{Grid as C,GridItem as h}from"../../components/gird.js";import M from"../Title/index.js";import{cn as L}from"../../helpers/utils.js";import{Tabs as S,TabsList as P,TabsTrigger as R,TabsContent as z}from"../../components/tabs.js";const u=({item:x,shape:b="square",isTab:s=!1})=>{const d=w({query:"(max-width: 1024px)"}),{theme:n="light",title:c,description:r,imageUrl:p,primaryButton:i,secondaryButton:m}=x,e="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return o("div",{className:L("item-wrapper group relative box-border w-full overflow-hidden",{"rounded-2xl":b==="rounded","aiui-dark":n==="dark","h-[480px]":d&&!s,"h-[400px]":d&&s},"text-info-primary"),children:[t(I,{source:p?.url,className:"inset-0 h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${p?.width}/${p?.height}`}}),o("div",{className:"laptop:p-6 desktop:p-[32px] absolute inset-x-0 bottom-0 flex flex-col gap-6 p-3",children:[o("div",{children:[t(G,{size:3,className:"item-title",html:c}),t($,{size:3,className:"item-description desktop:mt-1 text-text-2 lg-desktop:text-text-3",html:r})]}),o("div",{className:"flex gap-[16px]",children:[m&&m.text&&t("a",{href:m.link,children:t(g,{className:e,variant:"secondary",children:m.text})}),i&&i.text&&t("a",{href:i.link,children:t(g,{className:e,variant:"primary",children:i.text})})]})]})]})},q=T.forwardRef((x,b)=>{const{shape:s,sectionTitle:d,groupByTab:n=!1,items:c=[],carousel:r}=x.data,p=e=>{switch(e){case"full":return 12;case"half":return 6;case"one-third":return 4}},i=c.map(e=>e.tabName).filter(Boolean).filter((e,a,l)=>l.indexOf(e)===a),m=i.map(e=>({tabName:e,items:c.filter(a=>a.tabName===e)})).reduce((e,a)=>(e[a.tabName]=a.items,e),{});return o("section",{"data-ui-component-id":"MultiLayoutGraphicBlock",ref:b,className:"text-info-primary",children:[d&&t(M,{data:{title:d},className:"section-title"}),n?o(S,{shape:s,align:"left",defaultValue:i[0],children:[t(P,{children:i.map((e,a)=>t(R,{value:e,children:e},a))}),i.map((e,a)=>t(z,{value:e,className:"desktop:mt-[36px] mt-[24px] w-full",children:o(v,{children:[o(C,{className:"w-full",children:[m[e].map((l,f)=>t(h,{span:p(l.width??"full"),className:"laptop:block hidden",children:t(u,{item:l,shape:s,isTab:n})},`${l?.title||""}${f}`)),t(h,{className:"laptop:hidden block",span:12,children:t(k,{className:"",children:t(y,{className:"flex",children:m[e].map((l,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(u,{item:l,shape:s,isTab:n})},`${l?.title||""}${f}`))})})})]}),r&&r?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:r.items.map((l,f)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(u,{item:l,shape:s,isTab:n})},f))})}):null]})},a))]}):o(v,{children:[o(C,{className:"w-full",children:[c.map((e,a)=>t(h,{span:p(e.width??"full"),className:"laptop:block hidden",children:t(u,{item:e,shape:s})},`${e?.title||""}${a}`)),c.map((e,a)=>t(h,{span:p("full"),className:"laptop:hidden block",children:t(u,{item:e,shape:s})},`${e?.title||""}${a}`))]}),r&&r?.items.length>0?t(k,{className:"laptop:mt-4 mt-3",children:t(y,{className:"flex",children:r.items.map((e,a)=>t(N,{className:"tablet:basis-2/5 laptop:basis-[32%] flex basis-4/5",children:t(u,{item:e,shape:s})},`${e?.title||""}${a}`))})}):null]})]})});var W=B(q);export{W as default};
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": "AAqCM,OA0EQ,YAAAA,EA1ER,OAAAC,EAOE,QAAAC,MAPF,oBArCN,OAAOC,MAAW,QAClB,OAAS,iBAAAC,MAAqB,mBAE9B,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,QAAAC,MAAY,2BACrB,O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ChB1C,EAACa,EAAA,CAA8C,KAAM0B,EAAQ,MAAM,EAAG,UAAU,sBAC9E,SAAAvC,EAACoB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GADxB,GAAGD,GAAM,OAAS,EAAE,GAAGqB,CAAK,EAE3C,CACD,GACH,EACCJ,GAAYA,GAAU,MAAM,OAAS,EACpCtC,EAACS,EAAA,CAAS,UAAU,mBAClB,SAAAT,EAACU,EAAA,CAAgB,UAAU,OACxB,SAAA4B,EAAS,MAAM,IAAI,CAACjB,EAAMqB,IACzB1C,EAACW,EAAA,CAEC,UAAU,qDAEV,SAAAX,EAACoB,EAAA,CAAU,KAAMC,EAAM,MAAOC,EAAO,GAHhC,GAAGD,GAAM,OAAS,EAAE,GAAGqB,CAAK,EAInC,CACD,EACH,EACF,EACE,MACN,GAEJ,CAEJ,CAAC,EAED,IAAOM,EAAQ5C,EAAW4B,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": "AAqCM,OAkFQ,YAAAA,EAlFR,OAAAC,EAOE,QAAAC,MAPF,oBArCN,OAAOC,MAAW,QAClB,OAAS,iBAAAC,MAAqB,mBAE9B,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,QAAAC,MAAY,2BACrB,OAAS,YAAAC,EAAU,mBAAAC,EAAiB,gBAAAC,MAAoB,+BACxD,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAOC,MAAW,oBAElB,OAAS,MAAAC,MAAU,yBACnB,OAAS,QAAAC,EAAM,YAAAC,EAAU,eAAAC,EAAa,eAAAC,MAAmB,2BACzD,MAAMC,EAAY,CAAC,CACjB,KAAAC,EACA,MAAAC,EAAQ,SACR,MAAAC,EAAQ,EACV,IAAgE,CAC9D,MAAMC,EAAWrB,EAAc,CAAE,MAAO,qBAAsB,CAAC,EAEzD,CAAE,MAAAsB,EAAQ,QAAS,MAAAC,EAAO,YAAAC,EAAa,SAAAC,EAAU,cAAAC,EAAe,gBAAAC,CAAgB,EAAIT,EACpFU,EAAe,mFAErB,OACE9B,EAAC,OACC,UAAWc,EACT,gEACA,CACE,cAAeO,IAAU,UACzB,YAA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OM,EAAQ5C,EAAW4B,CAAuB",
6
6
  "names": ["Fragment", "jsx", "jsxs", "React", "useMediaQuery", "withStyles", "Picture", "Button", "Heading", "Text", "Carousel", "CarouselContent", "CarouselItem", "Grid", "GridItem", "Title", "cn", "Tabs", "TabsList", "TabsTrigger", "TabsContent", "ItemBlock", "item", "shape", "isTab", "isMobile", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "lgButtonSize", "MultiLayoutGraphicBlock", "props", "ref", "sectionTitle", "groupByTab", "items", "carousel", "getSpan", "width", "tabNames", "index", "arr", "tabItemsMaps", "tabName", "acc", "cur", "MultiLayoutGraphicBlock_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as l,jsxs as $}from"react/jsx-runtime";import s,{useRef as y}from"react";import{useGSAP as j}from"@gsap/react";import{gsap as S}from"gsap";import{SplitText as z}from"gsap/dist/SplitText";import{ScrollTrigger as T}from"gsap/dist/ScrollTrigger";import{cn as p}from"../../helpers/utils.js";import{Heading as U,Text as Y}from"../../components/index.js";import{withStyles as q}from"../../shared/Styles.js";function B(c=[],u=3){const f=[];for(let o=0;o<c.length;o+=u)f.push(c.slice(o,o+u));return f}const R=s.forwardRef(({data:c,className:u=""},f)=>{const{title:o,features:n=[],featureChunkSize:k=3,theme:D}=c,[x,H]=s.useState(0),[G,h]=s.useState(!0),m=B(n,k),v=m.length,a=n.length>k,M=a?[...m,m[0]]:m,w=40;s.useEffect(()=>{if(!a)return;const t=setInterval(()=>{H(e=>e+1),h(!0)},3e3);return()=>clearInterval(t)},[v,a]),s.useEffect(()=>{if(a)if(x===v){const t=setTimeout(()=>{h(!1),H(0)},500);return()=>clearTimeout(t)}else h(!0)},[x,v,a]);const i=y(null),N=y(null),g=y(null);return j(()=>{if(!i.current)return;g.current=new z(i.current,{type:"words",wordsClass:"word"});const t=i.current?.clientHeight||100,e=g.current.words;return S.set(e,{opacity:0}),T.create({trigger:i.current,start:"bottom bottom-=6%",end:`bottom+=${t*2+80}px bottom-=6%`,scrub:!0,onUpdate:r=>{const d=r.progress,E=e.length,F=1/E,I=.5;e.forEach((A,C)=>{const L=C/E*(1-I),P=F*(1+I);let b=(d-L)/P;b=Math.max(0,Math.min(b,1)),S.set(A,{opacity:b})})}}),n&&n.length>0&&T.create({trigger:N.current,start:`bottom+=${t*2}px bottom-=6%`,end:`bottom+=${t*2+100}px bottom-=6%`,onUpdate:r=>{S.set(N.current,{opacity:r.progress})}}),()=>{g.current&&g.current.revert(),T.getAll().forEach(r=>r.kill())}},[]),$("div",{ref:f,className:p("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",u),children:[l(U,{ref:i,as:"h2",size:2,weight:"bold",align:"left",className:p("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none",{"text-[#1D1D1F]":D!=="dark","text-[#fff]":D==="dark"}),children:o}),n&&n.length>0&&l("div",{className:p("relative h-12 w-full max-w-[500px] overflow-hidden",`tablet:h-[${w}px]`),children:l("div",{className:p(["flex flex-col",G?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${x*w}px)`},children:M.map((t,e)=>l("div",{className:p("flex h-12 w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${w}px]`),children:t.map((r,d)=>$(s.Fragment,{children:[d>0&&l("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),l(Y,{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:r.title})]},d))},e))})})]})});R.displayName="Slogan";var _=q(R);export{_ as default};
1
+ "use client";import{jsx as l,jsxs as $}from"react/jsx-runtime";import s,{useRef as y}from"react";import{useGSAP as P}from"@gsap/react";import{gsap as S}from"gsap";import{SplitText as j}from"gsap/dist/SplitText";import{ScrollTrigger as T}from"gsap/dist/ScrollTrigger";import{cn as p}from"../../helpers/utils.js";import{Heading as U,Text as Y}from"../../components/index.js";import{withStyles as q}from"../../shared/Styles.js";function B(c=[],u=3){const f=[];for(let o=0;o<c.length;o+=u)f.push(c.slice(o,o+u));return f}const R=s.forwardRef(({data:c,className:u=""},f)=>{const{title:o,features:n=[],featureChunkSize:k=3,theme:D}=c,[x,H]=s.useState(0),[G,h]=s.useState(!0),m=B(n,k),v=m.length,a=n.length>k,M=a?[...m,m[0]]:m,w=40;s.useEffect(()=>{if(!a)return;const t=setInterval(()=>{H(e=>e+1),h(!0)},3e3);return()=>clearInterval(t)},[v,a]),s.useEffect(()=>{if(a)if(x===v){const t=setTimeout(()=>{h(!1),H(0)},500);return()=>clearTimeout(t)}else h(!0)},[x,v,a]);const i=y(null),N=y(null),g=y(null);return P(()=>{if(!i.current)return;g.current=new j(i.current,{type:"words",wordsClass:"word"});const t=i.current?.clientHeight||100,e=g.current.words;return S.set(e,{opacity:0}),T.create({trigger:i.current,start:"bottom bottom-=6%",end:`bottom+=${t*2+80}px bottom-=6%`,scrub:!0,onUpdate:r=>{const d=r.progress,E=e.length,F=1/E,I=.5;e.forEach((z,A)=>{const C=A/E*(1-I),L=F*(1+I);let b=(d-C)/L;b=Math.max(0,Math.min(b,1)),S.set(z,{opacity:b})})}}),n&&n.length>0&&T.create({trigger:N.current,start:`bottom+=${t*2}px bottom-=6%`,end:`bottom+=${t*2+100}px bottom-=6%`,onUpdate:r=>{S.set(N.current,{opacity:r.progress})}}),()=>{g.current&&g.current.revert(),T.getAll().forEach(r=>r.kill())}},[]),$("div",{ref:f,className:p("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",u),children:[l(U,{ref:i,as:"h2",size:2,weight:"bold",align:"left",className:p("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none",{"text-[#1D1D1F]":D!=="dark","text-[#fff]":D==="dark"}),children:o}),n&&n.length>0&&l("div",{className:p("relative h-12 w-full max-w-[500px] overflow-hidden",`tablet:h-[${w}px]`),children:l("div",{className:p(["flex flex-col",G?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${x*w}px)`},children:M.map((t,e)=>l("div",{className:p("flex h-12 w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${w}px]`),children:t.map((r,d)=>$(s.Fragment,{children:[d>0&&l("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),l(Y,{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:r.title})]},d))},e))})})]})});R.displayName="Slogan";var _=q(R);export{_ as default};
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.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B,IAAK,WAAWA,EAAS,EAAI,GAAG,gBAChC,SAAWE,GAAc,CACvBpC,EAAK,IAAIgC,EAAY,QAAS,CAAE,QAASI,EAAK,QAAS,CAAC,CAC1D,CACF,CAAC,EAGI,IAAM,CACXH,EAAkB,SAAWA,EAAkB,QAAQ,OAAO,EAC9D/B,EAAc,OAAO,EAAE,QAAS2C,GAAWA,EAAE,KAAK,CAAC,CACrD,CACF,EAAG,CAAC,CAAC,EAGHjD,EAAC,OACC,IAAKmB,EACL,UAAWZ,EACT,uMACAW,CACF,EAEA,UAAAnB,EAACS,EAAA,CACC,IAAK2B,EACL,GAAG,KACH,KAAM,EACN,OAAQ,OACR,MAAO,OACP,UAAW5B,EACT,uGACA,CACE,iBAAkBgB,IAAU,OAC5B,cAAeA,IAAU,MAC3B,CACF,EAEC,SAAAH,EACH,EACCC,GAAYA,EAAS,OAAS,GAC7BtB,EAAC,OAAI,UAAWQ,EAAG,qDAAsD,aAAayB,CAAW,KAAK,EACpG,SAAAjC,EAAC,OACC,UAAWQ,EAAG,CACZ,gBACAmB,EAAkB,mEAAqE,kBACzF,CAAC,EACD,MAAO,CACL,UAAW,eAAeF,EAAaQ,CAAW,KACpD,EAEC,SAAAD,EAAc,IAAI,CAACmB,EAAOC,IACzBpD,EAAC,OACC,UAAWQ,EACT,gEACA,aAAayB,CAAW,KAC1B,EAGC,SAAAkB,EAAM,IAAI,CAACE,EAASC,IACnBrD,EAACC,EAAM,SAAN,CACE,UAAAoD,EAAQ,GAAKtD,EAAC,OAAI,UAAU,wDAAwD,EACrFA,EAACU,EAAA,CACC,MAAM,OACN,GAAG,IACH,UAAU,kHACV,KAAM2C,EAAQ,MAChB,IAPmBC,CAQrB,CACD,GAZIF,CAaP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDnC,EAAO,YAAc,SAErB,IAAOsC,EAAQ5C,EAAWM,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": "aAgHM,cAAAA,EAoCY,QAAAC,MApCZ,oBA/GN,OAAOC,GAAS,UAAAC,MAAc,QAC9B,OAAS,WAAAC,MAAe,cACxB,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,sBAC1B,OAAS,iBAAAC,MAAqB,0BAC9B,OAAS,MAAAC,MAAU,yBACnB,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAS,cAAAC,MAAkB,yBAG3B,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,EAASf,EAAM,WAAwC,CAAC,CAAE,KAAAgB,EAAM,UAAAC,EAAY,EAAG,EAAGC,IAAQ,CAC9F,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAW,CAAC,EAAG,iBAAAC,EAAmB,EAAG,MA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,eAAeF,EAAaQ,CAAW,KACpD,EAEC,SAAAD,EAAc,IAAI,CAACmB,EAAOC,IACzBpD,EAAC,OACC,UAAWQ,EACT,gEACA,aAAayB,CAAW,KAC1B,EAGC,SAAAkB,EAAM,IAAI,CAACE,EAASC,IACnBrD,EAACC,EAAM,SAAN,CACE,UAAAoD,EAAQ,GAAKtD,EAAC,OAAI,UAAU,wDAAwD,EACrFA,EAACU,EAAA,CACC,KAAM,EACN,MAAM,OACN,GAAG,IACH,UAAU,kHACV,KAAM2C,EAAQ,MAChB,IARmBC,CASrB,CACD,GAbIF,CAcP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDnC,EAAO,YAAc,SAErB,IAAOsC,EAAQ5C,EAAWM,CAAM",
6
6
  "names": ["jsx", "jsxs", "React", "useRef", "useGSAP", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "Text", "withStyles", "chunkArray", "array", "size", "result", "i", "Slogan", "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", "Slogan_default"]
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": "aA2BM,OAsJI,YAAAA,EAtJJ,OAAAC,EAsJI,QAAAC,MAtJJ,oBAzBN,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,kBAAAC,MAAsB,kCAC/B,OAA4B,OAAAC,MAA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,MAAO,gBACT,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CAAC,EAeKU,EAASb,EAAM,WACnB,CACE,CACE,QAAAc,EAAU,GACV,KAAAN,EAAO,OACP,SAAAO,EACA,QAAAC,EACA,YAAAC,EAAc,OACd,UAAAC,EACA,SAAAC,EAAW,GACX,QAAAC,EAAU,GACV,QAAAC,EACA,GAAGC,CACL,EACAC,IAOEzB,EALWgB,EAAUb,EAAO,SAK3B,CACC,SALekB,GAAYC,EAM3B,UAAWf,EAAGM,EAAe,CAAE,QAAAK,EAAS,KAAAR,EAAM,YAAAS,EAAa,MALjDG,EAAU,UAAYD,EAAW,WAAa,SAKS,CAAC,EAAGD,CAAS,EAC9E,IAAKK,EACJ,GAAGD,EAEH,SAAAF,EACCrB,EAAAF,EAAA,CACE,UAAAC,EAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAiB,EACH,EACAjB,EAAC,QAAK,UAAU,WACb,SAAAuB,GAGCvB,EAACM,EAAA,CACC,UAAWQ,EAAmB,CAC5B,QAAAI,CACF,CAAC,EACH,EAEJ,EACAlB,EAACI,EAAA,CAAgB,SAAAa,EAAS,GAC5B,EAEAhB,EAAAF,EAAA,CACG,UAAAkB,EACAC,IAAY,QAAUR,GAAQA,IAAS,QAAUV,EAACS,EAAA,CAAqB,KAAMC,EAAM,GACtF,EAEJ,CAGN,EAEAK,EAAO,YAAc,SACrB,IAAOW,EAAQX",
6
6
  "names": ["Fragment", "jsx", "jsxs", "React", "Slot", "VisuallyHidden", "cva", "Spinner", "cn", "sizeMap", "LinkButtonAppendIcon", "size", "width", "height", "buttonVariants", "loadingSvgVariants", "Button", "asChild", "children", "variant", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "button_default"]
7
7
  }
@@ -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 r=t;const o={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"}}},s={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"}}},m={args:{data:{...o.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"}}}},i={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 r=t;const o={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"}}},s={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"}}},m={args:{data:{...o.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"}}}},i={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": "AACA,OAAOA,MAAkB,0CAEzB,MAAMC,EAAkC,CACtC,MAAO,8BACP,UAAWD,EACX,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,IAAOE,EAAQD,EAIR,MAAME,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,EAGaC,EAAuB,CAClC,KAAM,CACJ,KAAM,CACJ,GAAGF,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,EAGaG,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", "meta", "MemberEquity_stories_default", "Default", "Round", "CustomButtons", "CustomStyles"]
7
7
  }
@@ -39,7 +39,6 @@ declare const meta: {
39
39
  variant: "primary";
40
40
  size: "base";
41
41
  children: string;
42
- asChild: false;
43
42
  disabled: false;
44
43
  loading: false;
45
44
  hoverEffect: "none";
@@ -1,2 +1,2 @@
1
- import{Fragment as s,jsx as a,jsxs as t}from"react/jsx-runtime";import{SearchIcon as e}from"@storybook/icons";import{Button as o}from"../components/index.js";import"react";const r={title:"Components/Button",component:o,parameters:{layout:"centered",docs:{description:{component:"\u6309\u94AE\u7EC4\u4EF6, \u5206\u4E3A\u591A\u79CD\u53D8\u4F53\u548C\u5927\u5C0F, \u652F\u6301 loading \u72B6\u6001\u548C\u56FE\u6807"}}},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["primary","secondary","link","ghost"],description:"\u6309\u94AE\u7C7B\u578B, \u63A8\u8350\u4F7F\u7528 primary \u548C secondary\uFF0C link ; ghost \u5C06\u4F1A\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 secondary\uFF0C \u4EE3\u66FF"},size:{control:{type:"select"},options:["sm","base","lg","icon"],description:"\u6309\u94AE\u5927\u5C0F \u9ED8\u8BA4\u662F base, \u53EF\u9009\u503C: sm, base, lg, icon"},hoverEffect:{description:"hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548",control:{type:"select"},options:["none","slide"]}},args:{variant:"primary",size:"base",children:"Button",asChild:!1,disabled:!1,loading:!1,hoverEffect:"none"}};var p=r;const d={args:{size:"lg",children:"Primary"}},g={args:{size:"lg",variant:"secondary",children:"Secondary"}},y={args:{size:"lg",variant:"link",children:"Link"}},m={args:{size:"lg",children:t(s,{children:["WithIcon ",a(e,{className:"ml-2"})]})}},h={args:{size:"lg",loading:!0}},f={args:{size:"lg",asChild:!0,children:a("a",{href:"http://example.com",children:"as a a tag"})}},v={args:{size:"lg",loading:!0,spinner:t("div",{className:"flex animate-pulse flex-row font-bold text-neutral-900",children:[a("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2625",width:"1rem",className:"align-middle",children:a("path",{d:"M511.882596 287.998081h-0.361244a31.998984 31.998984 0 0 1-31.659415-31.977309v-0.361244c0-0.104761 0.115598-11.722364 0.115598-63.658399V96.000564a31.998984 31.998984 0 1 1 64.001581 0V192.001129c0 52.586273-0.111986 63.88237-0.119211 64.337537a32.002596 32.002596 0 0 1-31.977309 31.659415zM511.998194 959.99842a31.998984 31.998984 0 0 1-31.998984-31.998984v-96.379871c0-51.610915-0.111986-63.174332-0.115598-63.286318s0-0.242033 0-0.361243a31.998984 31.998984 0 0 1 63.997968-0.314283c0 0.455167 0.11921 11.711527 0.11921 64.034093v96.307622a31.998984 31.998984 0 0 1-32.002596 31.998984zM330.899406 363.021212a31.897836 31.897836 0 0 1-22.866739-9.612699c-0.075861-0.075861-8.207461-8.370021-44.931515-45.094076L195.198137 240.429485a31.998984 31.998984 0 0 1 45.256635-45.253022L308.336112 263.057803c37.182834 37.182834 45.090463 45.253022 45.41197 45.578141A31.998984 31.998984 0 0 1 330.899406 363.021212zM806.137421 838.11473a31.901448 31.901448 0 0 1-22.628318-9.374279L715.624151 760.859111c-36.724054-36.724054-45.018214-44.859267-45.097687-44.93874a31.998984 31.998984 0 0 1 44.77618-45.729864c0.32512 0.317895 8.395308 8.229136 45.578142 45.411969l67.88134 67.88134a31.998984 31.998984 0 0 1-22.624705 54.630914zM224.000113 838.11473a31.901448 31.901448 0 0 0 22.628317-9.374279l67.88134-67.88134c36.724054-36.724054 45.021826-44.859267 45.097688-44.93874a31.998984 31.998984 0 0 0-44.776181-45.729864c-0.32512 0.317895-8.395308 8.229136-45.578142 45.411969l-67.88134 67.884953a31.998984 31.998984 0 0 0 22.628318 54.627301zM255.948523 544.058589h-0.361244c-0.104761 0-11.722364-0.115598-63.658399-0.115598H95.942765a31.998984 31.998984 0 1 1 0-64.00158h95.996952c52.586273 0 63.88237 0.111986 64.337538 0.11921a31.998984 31.998984 0 0 1 31.659414 31.97731v0.361244a32.002596 32.002596 0 0 1-31.988146 31.659414zM767.939492 544.058589a32.002596 32.002596 0 0 1-31.995372-31.666639v-0.361244a31.998984 31.998984 0 0 1 31.659415-31.970085c0.455167 0 11.754876-0.11921 64.34115-0.11921h96.000564a31.998984 31.998984 0 0 1 0 64.00158H831.944685c-51.936034 0-63.553638 0.111986-63.665624 0.115598h-0.335957zM692.999446 363.0176a31.998984 31.998984 0 0 1-22.863126-54.381656c0.317895-0.32512 8.229136-8.395308 45.41197-45.578141l67.88134-67.884953A31.998984 31.998984 0 1 1 828.693489 240.429485l-67.892177 67.88134c-31.020013 31.023625-41.644196 41.759794-44.241539 44.393262l-0.697201 0.722488a31.908673 31.908673 0 0 1-22.863126 9.591025z",fill:"","p-id":"2626"})}),"\xA0loading..."]})}};export{f as Aschild,y as Link,h as Loading,d as Primary,g as Secondary,v as Spinner,m as WithIcon,p as default};
1
+ import{Fragment as s,jsx as t,jsxs as o}from"react/jsx-runtime";import{SearchIcon as a}from"@storybook/icons";import{Button as e}from"../components/index.js";import"react";const r={title:"Components/Button",component:e,parameters:{layout:"centered",docs:{description:{component:"\u6309\u94AE\u7EC4\u4EF6, \u5206\u4E3A\u591A\u79CD\u53D8\u4F53\u548C\u5927\u5C0F, \u652F\u6301 loading \u72B6\u6001\u548C\u56FE\u6807"}}},tags:["autodocs"],argTypes:{variant:{control:{type:"select"},options:["primary","secondary","link","ghost"],description:"\u6309\u94AE\u7C7B\u578B, \u63A8\u8350\u4F7F\u7528 primary \u548C secondary\uFF0C link ; ghost \u5C06\u4F1A\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 secondary\uFF0C \u4EE3\u66FF"},size:{control:{type:"select"},options:["sm","base","lg","icon"],description:"\u6309\u94AE\u5927\u5C0F \u9ED8\u8BA4\u662F base, \u53EF\u9009\u503C: sm, base, lg, icon"},hoverEffect:{description:"hover \u72B6\u6001\u4E0B\u7684\u52A8\u753B\u6548\u679C\uFF0C\u4EC5\u5728variant\u662Fprimary \u548C secondary \u65F6\u751F\u6548",control:{type:"select"},options:["none","slide"]}},args:{variant:"primary",size:"base",children:"Button",disabled:!1,loading:!1,hoverEffect:"none"}};var p=r;const d={args:{size:"lg",children:"Primary"}},g={args:{size:"lg",variant:"secondary",children:"Secondary"}},y={args:{size:"lg",variant:"link",children:"Link"}},m={args:{size:"lg",children:o(s,{children:["WithIcon ",t(a,{className:"ml-2"})]})}},h={args:{size:"lg",loading:!0}},v={args:{size:"lg",asChild:!0,children:t("a",{href:"http://example.com",children:"as a a tag"})}},f={args:{size:"lg",loading:!0,spinner:o("div",{className:"flex animate-pulse flex-row font-bold text-neutral-900",children:[t("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2625",width:"1rem",className:"align-middle",children:t("path",{d:"M511.882596 287.998081h-0.361244a31.998984 31.998984 0 0 1-31.659415-31.977309v-0.361244c0-0.104761 0.115598-11.722364 0.115598-63.658399V96.000564a31.998984 31.998984 0 1 1 64.001581 0V192.001129c0 52.586273-0.111986 63.88237-0.119211 64.337537a32.002596 32.002596 0 0 1-31.977309 31.659415zM511.998194 959.99842a31.998984 31.998984 0 0 1-31.998984-31.998984v-96.379871c0-51.610915-0.111986-63.174332-0.115598-63.286318s0-0.242033 0-0.361243a31.998984 31.998984 0 0 1 63.997968-0.314283c0 0.455167 0.11921 11.711527 0.11921 64.034093v96.307622a31.998984 31.998984 0 0 1-32.002596 31.998984zM330.899406 363.021212a31.897836 31.897836 0 0 1-22.866739-9.612699c-0.075861-0.075861-8.207461-8.370021-44.931515-45.094076L195.198137 240.429485a31.998984 31.998984 0 0 1 45.256635-45.253022L308.336112 263.057803c37.182834 37.182834 45.090463 45.253022 45.41197 45.578141A31.998984 31.998984 0 0 1 330.899406 363.021212zM806.137421 838.11473a31.901448 31.901448 0 0 1-22.628318-9.374279L715.624151 760.859111c-36.724054-36.724054-45.018214-44.859267-45.097687-44.93874a31.998984 31.998984 0 0 1 44.77618-45.729864c0.32512 0.317895 8.395308 8.229136 45.578142 45.411969l67.88134 67.88134a31.998984 31.998984 0 0 1-22.624705 54.630914zM224.000113 838.11473a31.901448 31.901448 0 0 0 22.628317-9.374279l67.88134-67.88134c36.724054-36.724054 45.021826-44.859267 45.097688-44.93874a31.998984 31.998984 0 0 0-44.776181-45.729864c-0.32512 0.317895-8.395308 8.229136-45.578142 45.411969l-67.88134 67.884953a31.998984 31.998984 0 0 0 22.628318 54.627301zM255.948523 544.058589h-0.361244c-0.104761 0-11.722364-0.115598-63.658399-0.115598H95.942765a31.998984 31.998984 0 1 1 0-64.00158h95.996952c52.586273 0 63.88237 0.111986 64.337538 0.11921a31.998984 31.998984 0 0 1 31.659414 31.97731v0.361244a32.002596 32.002596 0 0 1-31.988146 31.659414zM767.939492 544.058589a32.002596 32.002596 0 0 1-31.995372-31.666639v-0.361244a31.998984 31.998984 0 0 1 31.659415-31.970085c0.455167 0 11.754876-0.11921 64.34115-0.11921h96.000564a31.998984 31.998984 0 0 1 0 64.00158H831.944685c-51.936034 0-63.553638 0.111986-63.665624 0.115598h-0.335957zM692.999446 363.0176a31.998984 31.998984 0 0 1-22.863126-54.381656c0.317895-0.32512 8.229136-8.395308 45.41197-45.578141l67.88134-67.884953A31.998984 31.998984 0 1 1 828.693489 240.429485l-67.892177 67.88134c-31.020013 31.023625-41.644196 41.759794-44.241539 44.393262l-0.697201 0.722488a31.908673 31.908673 0 0 1-22.863126 9.591025z",fill:"","p-id":"2626"})}),"\xA0loading..."]})}};export{v as Aschild,y as Link,h as Loading,d as Primary,g as Secondary,f as Spinner,m as WithIcon,p as default};
2
2
  //# sourceMappingURL=button.stories.js.map