@anker-in/headless-ui 0.0.27-alpha.68 → 0.0.27-alpha.72

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 (192) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.d.ts +2 -1
  2. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  3. package/dist/cjs/biz-components/AccordionCards/index.js.map +3 -3
  4. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  5. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +2 -2
  6. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  7. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +2 -2
  8. package/dist/cjs/biz-components/Category/index.d.ts +1 -0
  9. package/dist/cjs/biz-components/Category/index.js +1 -1
  10. package/dist/cjs/biz-components/Category/index.js.map +3 -3
  11. package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -0
  12. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  13. package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
  14. package/dist/cjs/biz-components/Graphic/index.d.ts +2 -0
  15. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  16. package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
  17. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +1 -0
  18. package/dist/cjs/biz-components/GraphicAttractionBlock/index.js +1 -1
  19. package/dist/cjs/biz-components/GraphicAttractionBlock/index.js.map +3 -3
  20. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  21. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  22. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +35 -0
  23. package/dist/cjs/biz-components/Marquee/Marquee.js +2 -0
  24. package/dist/cjs/biz-components/Marquee/Marquee.js.map +7 -0
  25. package/dist/cjs/biz-components/Marquee/index.d.ts +3 -35
  26. package/dist/cjs/biz-components/Marquee/index.js +1 -1
  27. package/dist/cjs/biz-components/Marquee/index.js.map +4 -4
  28. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  29. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  30. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  31. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
  32. package/dist/cjs/biz-components/MediaPlayerMulti/types.d.ts +1 -0
  33. package/dist/cjs/biz-components/MediaPlayerMulti/types.js +1 -1
  34. package/dist/cjs/biz-components/MediaPlayerMulti/types.js.map +1 -1
  35. package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
  36. package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
  37. package/dist/cjs/biz-components/MediaPlayerSticky/types.d.ts +1 -0
  38. package/dist/cjs/biz-components/MediaPlayerSticky/types.js.map +1 -1
  39. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  40. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  41. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +1 -0
  42. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +1 -1
  43. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +1 -1
  44. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +1 -0
  45. package/dist/cjs/biz-components/ShelfDisplay/index.js +3 -3
  46. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
  47. package/dist/cjs/biz-components/Slogan/index.js +1 -1
  48. package/dist/cjs/biz-components/Slogan/index.js.map +3 -3
  49. package/dist/cjs/biz-components/Slogan/types.d.ts +1 -0
  50. package/dist/cjs/biz-components/Slogan/types.js.map +1 -1
  51. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  52. package/dist/cjs/biz-components/SwiperBox/index.js.map +2 -2
  53. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  54. package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
  55. package/dist/cjs/biz-components/Tabs/types.d.ts +1 -0
  56. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  57. package/dist/cjs/biz-components/Title/index.js +1 -1
  58. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  59. package/dist/cjs/biz-components/Title/types.d.ts +1 -0
  60. package/dist/cjs/biz-components/Title/types.js +1 -1
  61. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  62. package/dist/cjs/components/avatar.js +1 -1
  63. package/dist/cjs/components/avatar.js.map +2 -2
  64. package/dist/cjs/components/button.js +1 -1
  65. package/dist/cjs/components/button.js.map +2 -2
  66. package/dist/cjs/components/container.js +1 -1
  67. package/dist/cjs/components/container.js.map +2 -2
  68. package/dist/cjs/components/heading.js +1 -1
  69. package/dist/cjs/components/heading.js.map +2 -2
  70. package/dist/cjs/components/text.js +1 -1
  71. package/dist/cjs/components/text.js.map +2 -2
  72. package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.js +1 -1
  73. package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.js.map +3 -3
  74. package/dist/cjs/stories/accordionCards.stories.d.ts +2 -1
  75. package/dist/cjs/stories/accordionCards.stories.js +1 -1
  76. package/dist/cjs/stories/accordionCards.stories.js.map +3 -3
  77. package/dist/cjs/stories/avatar.stories.js +1 -1
  78. package/dist/cjs/stories/avatar.stories.js.map +2 -2
  79. package/dist/cjs/stories/category.stories.js +1 -1
  80. package/dist/cjs/stories/category.stories.js.map +3 -3
  81. package/dist/cjs/stories/evaluate.stories.js +1 -1
  82. package/dist/cjs/stories/evaluate.stories.js.map +3 -3
  83. package/dist/cjs/stories/graphic.stories.d.ts +2 -0
  84. package/dist/cjs/stories/graphic.stories.js +1 -1
  85. package/dist/cjs/stories/graphic.stories.js.map +3 -3
  86. package/dist/cjs/stories/graphicAttractionBlock.stories.js +1 -1
  87. package/dist/cjs/stories/graphicAttractionBlock.stories.js.map +3 -3
  88. package/dist/cjs/stories/marquee.stories.d.ts +2 -2
  89. package/dist/cjs/stories/marquee.stories.js +1 -1
  90. package/dist/cjs/stories/marquee.stories.js.map +2 -2
  91. package/dist/cjs/stories/mediaplayerMulti.stories.js +1 -1
  92. package/dist/cjs/stories/mediaplayerMulti.stories.js.map +3 -3
  93. package/dist/cjs/stories/slogan.stories.js +1 -1
  94. package/dist/cjs/stories/slogan.stories.js.map +3 -3
  95. package/dist/cjs/types/props.d.ts +5 -0
  96. package/dist/cjs/types/props.js +1 -1
  97. package/dist/cjs/types/props.js.map +1 -1
  98. package/dist/esm/biz-components/AccordionCards/index.d.ts +2 -1
  99. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  100. package/dist/esm/biz-components/AccordionCards/index.js.map +3 -3
  101. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  102. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +2 -2
  103. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  104. package/dist/esm/biz-components/Category/SwiperCategory.js.map +2 -2
  105. package/dist/esm/biz-components/Category/index.d.ts +1 -0
  106. package/dist/esm/biz-components/Category/index.js +1 -1
  107. package/dist/esm/biz-components/Category/index.js.map +3 -3
  108. package/dist/esm/biz-components/Evaluate/index.d.ts +1 -0
  109. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  110. package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
  111. package/dist/esm/biz-components/Graphic/index.d.ts +2 -0
  112. package/dist/esm/biz-components/Graphic/index.js +1 -1
  113. package/dist/esm/biz-components/Graphic/index.js.map +3 -3
  114. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +1 -0
  115. package/dist/esm/biz-components/GraphicAttractionBlock/index.js +1 -1
  116. package/dist/esm/biz-components/GraphicAttractionBlock/index.js.map +3 -3
  117. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  118. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +2 -2
  119. package/dist/esm/biz-components/Marquee/Marquee.d.ts +35 -0
  120. package/dist/esm/biz-components/Marquee/Marquee.js +2 -0
  121. package/dist/esm/biz-components/Marquee/Marquee.js.map +7 -0
  122. package/dist/esm/biz-components/Marquee/index.d.ts +3 -35
  123. package/dist/esm/biz-components/Marquee/index.js +1 -1
  124. package/dist/esm/biz-components/Marquee/index.js.map +4 -4
  125. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  126. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  127. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  128. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
  129. package/dist/esm/biz-components/MediaPlayerMulti/types.d.ts +1 -0
  130. package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
  131. package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
  132. package/dist/esm/biz-components/MediaPlayerSticky/types.d.ts +1 -0
  133. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  134. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  135. package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +1 -0
  136. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +1 -0
  137. package/dist/esm/biz-components/ShelfDisplay/index.js +5 -5
  138. package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
  139. package/dist/esm/biz-components/Slogan/index.js +1 -1
  140. package/dist/esm/biz-components/Slogan/index.js.map +3 -3
  141. package/dist/esm/biz-components/Slogan/types.d.ts +1 -0
  142. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  143. package/dist/esm/biz-components/SwiperBox/index.js.map +2 -2
  144. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  145. package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
  146. package/dist/esm/biz-components/Tabs/types.d.ts +1 -0
  147. package/dist/esm/biz-components/Title/index.js +1 -1
  148. package/dist/esm/biz-components/Title/index.js.map +3 -3
  149. package/dist/esm/biz-components/Title/types.d.ts +1 -0
  150. package/dist/esm/components/avatar.js +1 -1
  151. package/dist/esm/components/avatar.js.map +2 -2
  152. package/dist/esm/components/button.js +1 -1
  153. package/dist/esm/components/button.js.map +2 -2
  154. package/dist/esm/components/container.js +1 -1
  155. package/dist/esm/components/container.js.map +2 -2
  156. package/dist/esm/components/heading.js +1 -1
  157. package/dist/esm/components/heading.js.map +2 -2
  158. package/dist/esm/components/text.js +1 -1
  159. package/dist/esm/components/text.js.map +2 -2
  160. package/dist/esm/stories/MultiLayoutGraphicBlock.stories.js +1 -1
  161. package/dist/esm/stories/MultiLayoutGraphicBlock.stories.js.map +3 -3
  162. package/dist/esm/stories/accordionCards.stories.d.ts +2 -1
  163. package/dist/esm/stories/accordionCards.stories.js +1 -1
  164. package/dist/esm/stories/accordionCards.stories.js.map +3 -3
  165. package/dist/esm/stories/avatar.stories.js +1 -1
  166. package/dist/esm/stories/avatar.stories.js.map +2 -2
  167. package/dist/esm/stories/category.stories.js +1 -1
  168. package/dist/esm/stories/category.stories.js.map +3 -3
  169. package/dist/esm/stories/evaluate.stories.js +1 -1
  170. package/dist/esm/stories/evaluate.stories.js.map +3 -3
  171. package/dist/esm/stories/graphic.stories.d.ts +2 -0
  172. package/dist/esm/stories/graphic.stories.js +1 -1
  173. package/dist/esm/stories/graphic.stories.js.map +3 -3
  174. package/dist/esm/stories/graphicAttractionBlock.stories.js +1 -1
  175. package/dist/esm/stories/graphicAttractionBlock.stories.js.map +3 -3
  176. package/dist/esm/stories/marquee.stories.d.ts +2 -2
  177. package/dist/esm/stories/marquee.stories.js +1 -1
  178. package/dist/esm/stories/marquee.stories.js.map +2 -2
  179. package/dist/esm/stories/mediaplayerMulti.stories.js +1 -1
  180. package/dist/esm/stories/mediaplayerMulti.stories.js.map +3 -3
  181. package/dist/esm/stories/slogan.stories.js +2 -2
  182. package/dist/esm/stories/slogan.stories.js.map +3 -3
  183. package/dist/esm/types/props.d.ts +5 -0
  184. package/dist/tokens/anker.css +1 -1
  185. package/dist/tokens/base.css +1 -1
  186. package/dist/tokens/eufy.css +3 -1
  187. package/dist/tokens/eufyMake.css +1 -1
  188. package/dist/tokens/solix.css +0 -1
  189. package/dist/tokens/soundcore.css +3 -1
  190. package/package.json +6 -4
  191. package/style.css +8 -29
  192. package/tailwind.config.js +5 -9
@@ -1,10 +1,10 @@
1
- "use strict";"use client";var q=Object.create;var x=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var $=(e,t)=>{for(var a in t)x(e,a,{get:t[a],enumerable:!0})},T=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of L(t))!U.call(e,s)&&s!==a&&x(e,s,{get:()=>t[s],enumerable:!(l=M(t,s))||l.enumerable});return e};var f=(e,t,a)=>(a=e!=null?q(R(e)):{},T(t||!e||!e.__esModule?x(a,"default",{value:e,enumerable:!0}):a,e)),j=e=>T(x({},"__esModule",{value:!0}),e);var H={};$(H,{default:()=>G});module.exports=j(H);var r=require("react/jsx-runtime"),u=require("react"),y=require("../../helpers/utils.js"),B=f(require("../../components/picture.js")),d=require("../../components/tabs.js"),k=f(require("../../components/button.js")),N=f(require("../Title/index.js")),F=f(require("../SwiperBox/index.js")),C=require("../../shared/Styles.js"),I=require("./shelfDisplay.js");const z=({data:e,configuration:t})=>{const a=o=>t?.event?.primaryButton?.(o),l=o=>t?.event?.secondaryButton?.(o),{price:s,basePrice:h}=(0,I.formatVariantPrice)({locale:"us",amount:e?.price.amount||0,baseAmount:e?.compareAtPrice?.amount||e?.price.amount||0,currencyCode:e?.price.currencyCode||"USD"}),b=()=>{const o=e?.sku,i=e?.variants;return i?.find(v=>v?.sku===o)?.image?.url||i?.[0]?.image?.url||""};return(0,r.jsxs)("div",{className:(0,y.cn)("laptop:pt-4 laptop:px-6 laptop:pb-6 flex size-full cursor-pointer flex-col overflow-hidden bg-[#EAEAEC] p-4 duration-300 hover:bg-[#FFFFFF]",t?.itemShape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("div",{className:(0,y.cn)("relative mb-2 inline-block h-[140px] overflow-hidden","lg-desktop:mb-3 lg-desktop:h-[196px]"),children:(0,r.jsx)(B.default,{source:b(),className:"flex h-full justify-center object-cover [&_img]:w-auto"})}),(0,r.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:e?.tags?.slice(0,1)?.map?.((o,i)=>(0,r.jsx)("div",{className:"tablet:text-base box-border h-full rounded-2xl border-2 border-[#86868C] px-2 pt-1 text-sm font-bold text-[#1D1D1F]",children:o},i))}),(0,r.jsx)("p",{title:e?.title||"",className:"desktop:text-2xl desktop:leading-7 line-clamp-2 max-h-[48px] flex-1 text-xl font-bold text-[#1D1D1F]",children:e?.title||""}),(0,r.jsx)("h3",{title:e?.description||"",className:"tablet:mt-2 tablet:mb-3 desktop:text-lg mb-2 mt-1 h-6 truncate text-sm font-semibold text-[#1D1D1F]",children:e?.description||""}),(0,r.jsxs)("div",{className:"mb-2 flex items-center",children:[(0,r.jsx)("div",{className:"tablet:text-2xl text-xl font-bold text-[#1D1D1F]",children:s||""}),(0,r.jsx)("div",{className:"tablet:text-2xl ml-1 text-xl font-bold text-[#86868C]",children:h||""})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(k.default,{variant:"primary",onClick:()=>a(e),className:`
1
+ "use strict";"use client";var M=Object.create;var b=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var $=(e,t)=>{for(var a in t)b(e,a,{get:t[a],enumerable:!0})},T=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of L(t))!U.call(e,o)&&o!==a&&b(e,o,{get:()=>t[o],enumerable:!(l=G(t,o))||l.enumerable});return e};var x=(e,t,a)=>(a=e!=null?M(R(e)):{},T(t||!e||!e.__esModule?b(a,"default",{value:e,enumerable:!0}):a,e)),j=e=>T(b({},"__esModule",{value:!0}),e);var J={};$(J,{default:()=>H});module.exports=j(J);var r=require("react/jsx-runtime"),u=require("react"),f=require("../../helpers/utils.js"),B=x(require("../../components/picture.js")),c=require("../../components/tabs.js"),g=x(require("../../components/button.js")),N=x(require("../Title/index.js")),F=x(require("../SwiperBox/index.js")),C=require("../../shared/Styles.js"),P=require("./shelfDisplay.js");const z=({data:e,configuration:t})=>{const a=s=>t?.event?.primaryButton?.(s),l=s=>t?.event?.secondaryButton?.(s),{price:o,basePrice:y}=(0,P.formatVariantPrice)({locale:"us",amount:e?.price.amount||0,baseAmount:e?.compareAtPrice?.amount||e?.price.amount||0,currencyCode:e?.price.currencyCode||"USD"}),h=()=>{const s=e?.sku,i=e?.variants;return i?.find(p=>p?.sku===s)?.image?.url||i?.[0]?.image?.url||""};return(0,r.jsxs)("div",{className:(0,f.cn)("laptop:pt-4 laptop:px-6 laptop:pb-6 flex size-full cursor-pointer flex-col overflow-hidden bg-[#EAEAEC] p-4 duration-300 hover:bg-[#FFFFFF]",t?.itemShape==="round"?"rounded-2xl":"rounded-none"),children:[(0,r.jsx)("div",{className:(0,f.cn)("lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden"),children:(0,r.jsx)(B.default,{source:h(),className:"flex h-full justify-center object-cover [&_img]:w-auto"})}),(0,r.jsx)("div",{className:"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden",children:e?.tags?.slice(0,1)?.map?.((s,i)=>(0,r.jsx)("div",{className:"tablet:text-base box-border h-full rounded-2xl border-2 border-[#86868C] px-2 pt-1 text-sm font-bold text-[#1D1D1F]",children:s},i))}),(0,r.jsx)("p",{title:e?.title||"",className:"desktop:text-2xl desktop:leading-7 line-clamp-2 max-h-[48px] flex-1 text-xl font-bold text-[#1D1D1F]",children:e?.title||""}),(0,r.jsx)("h3",{title:e?.description||"",className:"tablet:mt-2 tablet:mb-3 desktop:text-lg mb-2 mt-1 h-6 truncate text-sm font-semibold text-[#1D1D1F]",children:e?.description||""}),(0,r.jsxs)("div",{className:"mb-2 flex items-center",children:[(0,r.jsx)("div",{className:"tablet:text-2xl text-xl font-bold text-[#1D1D1F]",children:o||""}),(0,r.jsx)("div",{className:"tablet:text-2xl ml-1 text-xl font-bold text-[#86868C]",children:y||""})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(g.default,{variant:"primary",onClick:()=>a(e),className:`
2
2
  laptop:text-sm desktop:text-base laptop:px-6 desktop:px-7 laptop:py-2.5 desktop:py-3 box-border flex-1 border
3
3
  border-[#1D1D1F] bg-transparent px-4 py-2 text-xs text-[#1D1D1F] hover:bg-transparent hover:text-black
4
4
  ${t?.shape==="round"?"desktop:rounded-3xl rounded-[20px]":""}
5
- `,children:t?.primaryButton||""}),(0,r.jsx)(k.default,{variant:"secondary",onClick:()=>l(e),className:`
5
+ `,children:t?.primaryButton||""}),(0,r.jsx)(g.default,{variant:"secondary",onClick:()=>l(e),className:`
6
6
  laptop:text-sm desktop:text-base laptop:px-6 desktop:px-7 laptop:py-2.5 desktop:py-3 box-border flex-1 border
7
7
  border-[#1D1D1F] bg-[#1D1D1F] px-4 py-2 text-xs tracking-[-0.04em] text-white
8
8
  ${t?.shape==="round"?"desktop:rounded-3xl rounded-[20px]":""}
9
- `,children:t?.secondaryButton||""})]})]},e?.id||e?.handle)},_=({data:e,buildData:t,className:a="",key:l,event:s})=>{const[h,b]=(0,u.useState)(""),[o,i]=(0,u.useState)([]),{productsTab:c=[],productsCard:v=[],title:D,align:P="left",isShowTab:S=!0,tabShape:E="square",...A}=e,g=n=>{const m=n?.map(p=>{const w=t?.products?.find(V=>V?.handle===p?.handle);if(w)return{sku:p.sku,...w}})?.filter(p=>p);i(m)};return(0,u.useEffect)(()=>{if(S){b(c?.[0]?.tab||""),g(c?.[0]?.data||[]);return}g(v)},[]),(0,r.jsxs)("div",{className:(0,y.cn)("w-full",a),children:[D&&(0,r.jsx)(N.default,{data:{title:D}}),S&&(0,r.jsx)(d.Tabs,{shape:E,align:P,value:h,onValueChange:n=>{b(n);const m=c?.find(p=>p?.tab===n);g(m?.data||[])},className:"mb-8",children:(0,r.jsx)(d.TabsList,{children:c?.map((n,m)=>(0,r.jsx)(d.TabsTrigger,{value:n?.tab||"",children:n?.tab},m))})}),(0,r.jsx)(F.default,{className:"!overflow-visible",id:"ShelfDisplay"+l,data:{list:o,configuration:{...A,event:s}},Slide:z,breakpoints:{0:{spaceBetween:"12px",freeMode:!1,slidesPerView:1},374:{spaceBetween:"12px",freeMode:!1,slidesPerView:1.1},768:{spaceBetween:"16px",freeMode:!1,slidesPerView:4}}})]})};var G=(0,C.withStyles)(_);
9
+ `,children:t?.secondaryButton||""})]})]},e?.id||e?.handle)},_=({data:e,buildData:t,className:a="",key:l,event:o,GSAP:y})=>{const[h,s]=(0,u.useState)(""),[i,k]=(0,u.useState)([]),{productsTab:p=[],productsCard:I=[],title:D,align:A="left",isShowTab:S=!0,tabShape:E="square",...V}=e,v=n=>{const m=n?.map(d=>{const w=t?.products?.find(q=>q?.handle===d?.handle);if(w)return{sku:d.sku,...w}})?.filter(d=>d);k(m)};return(0,u.useEffect)(()=>{if(S){s(p?.[0]?.tab||""),v(p?.[0]?.data||[]);return}v(I)},[]),(0,r.jsxs)("div",{className:(0,f.cn)("w-full",a),children:[D&&(0,r.jsx)(N.default,{data:{title:D},GSAP:y}),S&&(0,r.jsx)(c.Tabs,{shape:E,align:A,value:h,onValueChange:n=>{s(n);const m=p?.find(d=>d?.tab===n);v(m?.data||[])},className:"mb-8",children:(0,r.jsx)(c.TabsList,{children:p?.map((n,m)=>(0,r.jsx)(c.TabsTrigger,{value:n?.tab||"",children:n?.tab},m))})}),(0,r.jsx)(F.default,{className:"!overflow-visible",id:"ShelfDisplay"+l,data:{list:i,configuration:{...V,event:o}},Slide:z,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.1},768:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})};var H=(0,C.withStyles)(_);
10
10
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ShelfDisplay/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState, useEffect } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { Tabs, TabsList, TabsTrigger } from '../../components/tabs.js'\nimport Button from '../../components/button.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nexport interface ShelfDisplayItem {\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n}\n\ntype EventType = {\n primaryButton?: (v: any) => void\n secondaryButton?: (v: any) => void\n}\n\nexport interface ShelfDisplayProps {\n data: {\n title?: string\n isShowTab?: boolean\n align?: 'left' | 'center' | 'right'\n productsTab?: any\n productsCard?: any\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: EventType\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n className?: string\n key?: string\n}\n\nconst ShelfDisplayItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const onPrimaryButton = (params: ShelfDisplayItem) => configuration?.event?.primaryButton?.(params)\n\n const onSecondaryButton = (params: ShelfDisplayItem) => configuration?.event?.secondaryButton?.(params)\n\n const { price, basePrice } = formatVariantPrice({\n locale: 'us',\n amount: data?.price.amount || 0,\n baseAmount: data?.compareAtPrice?.amount || data?.price.amount || 0,\n currencyCode: data?.price.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n 'laptop:pt-4 laptop:px-6 laptop:pb-6 flex size-full cursor-pointer flex-col overflow-hidden bg-[#EAEAEC] p-4 duration-300 hover:bg-[#FFFFFF]',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div\n className={cn('relative mb-2 inline-block h-[140px] overflow-hidden', 'lg-desktop:mb-3 lg-desktop:h-[196px]')}\n >\n <Picture source={handleUrl()} className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </div>\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {data?.tags?.slice(0, 1)?.map?.((item: any, index: number) => {\n return (\n <div\n key={index}\n className=\"tablet:text-base box-border h-full rounded-2xl border-2 border-[#86868C] px-2 pt-1 text-sm font-bold text-[#1D1D1F]\"\n >\n {item}\n </div>\n )\n })}\n </div>\n <p\n title={data?.title || ''}\n className=\"desktop:text-2xl desktop:leading-7 line-clamp-2 max-h-[48px] flex-1 text-xl font-bold text-[#1D1D1F]\"\n >\n {data?.title || ''}\n </p>\n <h3\n title={data?.description || ''}\n className=\"tablet:mt-2 tablet:mb-3 desktop:text-lg mb-2 mt-1 h-6 truncate text-sm font-semibold text-[#1D1D1F]\"\n >\n {data?.description || ''}\n </h3>\n <div className=\"mb-2 flex items-center\">\n <div className=\"tablet:text-2xl text-xl font-bold text-[#1D1D1F]\">{price || ''}</div>\n <div className=\"tablet:text-2xl ml-1 text-xl font-bold text-[#86868C]\">{basePrice || ''}</div>\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"flex items-center gap-3\">\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data)}\n className={`\n laptop:text-sm desktop:text-base laptop:px-6 desktop:px-7 laptop:py-2.5 desktop:py-3 box-border flex-1 border\n border-[#1D1D1F] bg-transparent px-4 py-2 text-xs text-[#1D1D1F] hover:bg-transparent hover:text-black\n ${configuration?.shape === 'round' ? 'desktop:rounded-3xl rounded-[20px]' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data)}\n className={`\n laptop:text-sm desktop:text-base laptop:px-6 desktop:px-7 laptop:py-2.5 desktop:py-3 box-border flex-1 border\n border-[#1D1D1F] bg-[#1D1D1F] px-4 py-2 text-xs tracking-[-0.04em] text-white\n ${configuration?.shape === 'round' ? 'desktop:rounded-3xl rounded-[20px]' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n </div>\n </div>\n )\n}\n\nconst ShelfDisplay: React.FC<ShelfDisplayProps> = ({ data, buildData, className = '', key, event }) => {\n const [tabId, setTabId] = useState<string>('')\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n const {\n productsTab = [],\n productsCard = [],\n title,\n align = 'left',\n isShowTab = true,\n tabShape = 'square',\n ...other\n } = data\n\n const handleCurrentTab = (currentData: ShelfDisplayItem[]) => {\n const newCurrentData = currentData\n ?.map(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData)\n }\n\n useEffect(() => {\n if (isShowTab) {\n setTabId(productsTab?.[0]?.tab || '')\n handleCurrentTab(productsTab?.[0]?.data || [])\n return\n }\n handleCurrentTab(productsCard)\n }, [])\n\n return (\n <div className={cn('w-full', className)}>\n {title && <Title data={{ title: title }} />}\n {isShowTab && (\n <Tabs\n shape={tabShape}\n align={align}\n value={tabId}\n onValueChange={v => {\n setTabId(v)\n const findData = productsTab?.find((item: any) => item?.tab === v)\n handleCurrentTab(findData?.data || [])\n }}\n className=\"mb-8\"\n >\n <TabsList>\n {productsTab?.map((item: any, index: number) => {\n return (\n <TabsTrigger key={index} value={item?.tab || ''}>\n {item?.tab}\n </TabsTrigger>\n )\n })}\n </TabsList>\n </Tabs>\n )}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'ShelfDisplay' + key}\n data={{ list: currentItems, configuration: { ...other, event: event } }}\n Slide={ShelfDisplayItem}\n breakpoints={{\n 0: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: '12px',\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: '16px',\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n )\n}\n\nexport default withStyles(ShelfDisplay)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA+FQ,IAAAI,EAAA,6BA9FRC,EAA2C,iBAC3CC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA4C,oCAC5CC,EAAmB,yCACnBC,EAAkB,gCAClBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAmC,6BAwDnC,MAAMC,EAAmB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAA0C,CACxF,MAAMC,EAAmBC,GAA6BF,GAAe,OAAO,gBAAgBE,CAAM,EAE5FC,EAAqBD,GAA6B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OF,EACP,MAAOP,EACP,cAAegB,GAAK,CAClBf,EAASe,CAAC,EACV,MAAMF,EAAWV,GAAa,KAAMb,GAAcA,GAAM,MAAQyB,CAAC,EACjEL,EAAiBG,GAAU,MAAQ,CAAC,CAAC,CACvC,EACA,UAAU,OAEV,mBAAC,YACE,SAAAV,GAAa,IAAI,CAACb,EAAWE,OAE1B,OAAC,eAAwB,MAAOF,GAAM,KAAO,GAC1C,SAAAA,GAAM,KADSE,CAElB,CAEH,EACH,EACF,KAEF,OAAC,EAAAwB,QAAA,CACC,UAAU,oBACV,GAAI,eAAiBnB,EACrB,KAAM,CAAE,KAAMI,EAAc,cAAe,CAAE,GAAGQ,EAAO,MAAOX,CAAM,CAAE,EACtE,MAAOnB,EACP,YAAa,CACX,EAAG,CACD,aAAc,OACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,OACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,OACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,CAEJ,EAEA,IAAOZ,KAAQ,cAAW2B,CAAY",
6
- "names": ["ShelfDisplay_exports", "__export", "ShelfDisplay_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_tabs", "import_button", "import_Title", "import_SwiperBox", "import_Styles", "import_shelfDisplay", "ShelfDisplayItem", "data", "configuration", "onPrimaryButton", "params", "onSecondaryButton", "price", "basePrice", "handleUrl", "sku", "skuArray", "item", "Picture", "index", "Button", "ShelfDisplay", "buildData", "className", "key", "event", "tabId", "setTabId", "currentItems", "setCurrentItems", "productsTab", "productsCard", "title", "align", "isShowTab", "tabShape", "other", "handleCurrentTab", "currentData", "newCurrentData", "findData", "Title", "v", "SwiperBox"]
4
+ "sourcesContent": ["'use client'\nimport React, { useState, useEffect } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport { Tabs, TabsList, TabsTrigger } from '../../components/tabs.js'\nimport Button from '../../components/button.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport { formatVariantPrice } from './shelfDisplay.js'\nexport interface ShelfDisplayItem {\n id?: string\n /** \u4EA7\u54C1\u56FE\u7247*/\n img?: {\n url: string\n }\n handle?: string\n sku?: string\n /** \u6298\u6263\u540E\u4EF7\u683C*/\n price?: string\n title?: string\n /** \u6298\u6263\u524D\u4EF7\u683C*/\n basePrice?: string\n subTitle?: string\n /** \u6807\u7B7E*/\n tagItems?: string[]\n tab?: string\n data?: ShelfDisplayItem[]\n}\n\ntype EventType = {\n primaryButton?: (v: any) => void\n secondaryButton?: (v: any) => void\n}\n\nexport interface ShelfDisplayProps {\n data: {\n title?: string\n isShowTab?: boolean\n align?: 'left' | 'center' | 'right'\n productsTab?: any\n productsCard?: any\n /** \u5361\u7247\u5F62\u72B6 */\n itemShape?: 'round' | 'square'\n /** \u6309\u94AE\u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u6807\u7B7E\u9875\u5F62\u72B6*/\n tabShape?: 'rounded' | 'square'\n /** \u4E3B\u6309\u94AE\u914D\u7F6E */\n primaryButton?: string\n /** \u526F\u6309\u94AE\u914D\u7F6E */\n secondaryButton?: string\n }\n buildData?: {\n categories: any[]\n products: any[]\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: EventType\n /** \u4E3B\u9898\u8272*/\n theme?: 'light' | 'dark'\n className?: string\n key?: string\n GSAP?: any\n}\n\nconst ShelfDisplayItem = ({ data, configuration }: { data: any; configuration?: any }) => {\n const onPrimaryButton = (params: ShelfDisplayItem) => configuration?.event?.primaryButton?.(params)\n\n const onSecondaryButton = (params: ShelfDisplayItem) => configuration?.event?.secondaryButton?.(params)\n\n const { price, basePrice } = formatVariantPrice({\n locale: 'us',\n amount: data?.price.amount || 0,\n baseAmount: data?.compareAtPrice?.amount || data?.price.amount || 0,\n currencyCode: data?.price.currencyCode || 'USD',\n })\n\n const handleUrl = () => {\n const sku = data?.sku\n const skuArray = data?.variants\n const findSku = skuArray?.find((item: any) => item?.sku === sku)\n return findSku?.image?.url || skuArray?.[0]?.image?.url || ''\n }\n\n return (\n <div\n key={data?.id || data?.handle}\n className={cn(\n 'laptop:pt-4 laptop:px-6 laptop:pb-6 flex size-full cursor-pointer flex-col overflow-hidden bg-[#EAEAEC] p-4 duration-300 hover:bg-[#FFFFFF]',\n configuration?.itemShape === 'round' ? 'rounded-2xl' : 'rounded-none'\n )}\n >\n <div className={cn('lg-desktop:mb-3 lg-desktop:h-[195px] relative mb-2 inline-block h-[140px] overflow-hidden')}>\n <Picture source={handleUrl()} className=\"flex h-full justify-center object-cover [&_img]:w-auto\" />\n </div>\n <div className=\"mb-1 box-border flex h-8 flex-wrap gap-1 overflow-hidden\">\n {data?.tags?.slice(0, 1)?.map?.((item: any, index: number) => {\n return (\n <div\n key={index}\n className=\"tablet:text-base box-border h-full rounded-2xl border-2 border-[#86868C] px-2 pt-1 text-sm font-bold text-[#1D1D1F]\"\n >\n {item}\n </div>\n )\n })}\n </div>\n <p\n title={data?.title || ''}\n className=\"desktop:text-2xl desktop:leading-7 line-clamp-2 max-h-[48px] flex-1 text-xl font-bold text-[#1D1D1F]\"\n >\n {data?.title || ''}\n </p>\n <h3\n title={data?.description || ''}\n className=\"tablet:mt-2 tablet:mb-3 desktop:text-lg mb-2 mt-1 h-6 truncate text-sm font-semibold text-[#1D1D1F]\"\n >\n {data?.description || ''}\n </h3>\n <div className=\"mb-2 flex items-center\">\n <div className=\"tablet:text-2xl text-xl font-bold text-[#1D1D1F]\">{price || ''}</div>\n <div className=\"tablet:text-2xl ml-1 text-xl font-bold text-[#86868C]\">{basePrice || ''}</div>\n </div>\n {/* \u6309\u94AE\u7EC4 */}\n <div className=\"flex items-center gap-3\">\n <Button\n variant=\"primary\"\n onClick={() => onPrimaryButton(data)}\n className={`\n laptop:text-sm desktop:text-base laptop:px-6 desktop:px-7 laptop:py-2.5 desktop:py-3 box-border flex-1 border\n border-[#1D1D1F] bg-transparent px-4 py-2 text-xs text-[#1D1D1F] hover:bg-transparent hover:text-black\n ${configuration?.shape === 'round' ? 'desktop:rounded-3xl rounded-[20px]' : ''}\n `}\n >\n {configuration?.primaryButton || ''}\n </Button>\n <Button\n variant=\"secondary\"\n onClick={() => onSecondaryButton(data)}\n className={`\n laptop:text-sm desktop:text-base laptop:px-6 desktop:px-7 laptop:py-2.5 desktop:py-3 box-border flex-1 border\n border-[#1D1D1F] bg-[#1D1D1F] px-4 py-2 text-xs tracking-[-0.04em] text-white\n ${configuration?.shape === 'round' ? 'desktop:rounded-3xl rounded-[20px]' : ''}\n `}\n >\n {configuration?.secondaryButton || ''}\n </Button>\n </div>\n </div>\n )\n}\n\nconst ShelfDisplay: React.FC<ShelfDisplayProps> = ({ data, buildData, className = '', key, event, GSAP }) => {\n const [tabId, setTabId] = useState<string>('')\n const [currentItems, setCurrentItems] = useState<ShelfDisplayItem[]>([])\n\n const {\n productsTab = [],\n productsCard = [],\n title,\n align = 'left',\n isShowTab = true,\n tabShape = 'square',\n ...other\n } = data\n\n const handleCurrentTab = (currentData: ShelfDisplayItem[]) => {\n const newCurrentData = currentData\n ?.map(item => {\n const findData = buildData?.products?.find(params => params?.handle === item?.handle)\n if (findData) {\n return {\n sku: item.sku,\n ...findData,\n }\n }\n })\n ?.filter(item => item)\n setCurrentItems(newCurrentData)\n }\n\n useEffect(() => {\n if (isShowTab) {\n setTabId(productsTab?.[0]?.tab || '')\n handleCurrentTab(productsTab?.[0]?.data || [])\n return\n }\n handleCurrentTab(productsCard)\n }, [])\n\n return (\n <div className={cn('w-full', className)}>\n {title && <Title data={{ title: title }} GSAP={GSAP} />}\n {isShowTab && (\n <Tabs\n shape={tabShape}\n align={align}\n value={tabId}\n onValueChange={v => {\n setTabId(v)\n const findData = productsTab?.find((item: any) => item?.tab === v)\n handleCurrentTab(findData?.data || [])\n }}\n className=\"mb-8\"\n >\n <TabsList>\n {productsTab?.map((item: any, index: number) => {\n return (\n <TabsTrigger key={index} value={item?.tab || ''}>\n {item?.tab}\n </TabsTrigger>\n )\n })}\n </TabsList>\n </Tabs>\n )}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'ShelfDisplay' + key}\n data={{ list: currentItems, configuration: { ...other, event: event } }}\n Slide={ShelfDisplayItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.1,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n )\n}\n\nexport default withStyles(ShelfDisplay)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8FQ,IAAAI,EAAA,6BA7FRC,EAA2C,iBAC3CC,EAAmB,kCACnBC,EAAoB,0CACpBC,EAA4C,oCAC5CC,EAAmB,yCACnBC,EAAkB,gCAClBC,EAAsB,oCACtBC,EAA2B,kCAC3BC,EAAmC,6BAyDnC,MAAMC,EAAmB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAA0C,CACxF,MAAMC,EAAmBC,GAA6BF,GAAe,OAAO,gBAAgBE,CAAM,EAE5FC,EAAqBD,GAA6BF,GAAe,OAAO,kBAAkBE,CAAM,EAEhG,CAAE,MAAAE,EAAO,UAAAC,CAAU,KAAI,sBAAmB,CAC9C,OAAQ,KACR,OAAQN,GAAM,MAAM,QAAU,EAC9B,WAAYA,GAAM,gBAAgB,QAAUA,GAAM,MAAM,QAAU,EAClE,aAAcA,GAAM,MAAM,cAAgB,KAC5C,CAAC,EAEKO,EAAY,IAAM,CACtB,MAAMC,EAAMR,GAAM,IACZS,EAAWT,GAAM,SAEvB,OADgBS,GAAU,KAAMC,GAAcA,GAAM,MAAQF,CAAG,GAC/C,OAAO,KAAOC,IAAW,CAAC,GAAG,OAAO,KAAO,EAC7D,EAEA,SACE,QAAC,OAEC,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AE,GAAGQ,EAAO,MAAOZ,CAAM,CAAE,EACtE,MAAOnB,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,CAEJ,EAEA,IAAOZ,KAAQ,cAAW2B,CAAY",
6
+ "names": ["ShelfDisplay_exports", "__export", "ShelfDisplay_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_picture", "import_tabs", "import_button", "import_Title", "import_SwiperBox", "import_Styles", "import_shelfDisplay", "ShelfDisplayItem", "data", "configuration", "onPrimaryButton", "params", "onSecondaryButton", "price", "basePrice", "handleUrl", "sku", "skuArray", "item", "Picture", "index", "Button", "ShelfDisplay", "buildData", "className", "key", "event", "GSAP", "tabId", "setTabId", "currentItems", "setCurrentItems", "productsTab", "productsCard", "title", "align", "isShowTab", "tabShape", "other", "handleCurrentTab", "currentData", "newCurrentData", "findData", "Title", "v", "SwiperBox"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var R=Object.create;var p=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var j=(e,t)=>{for(var l in t)p(e,l,{get:t[l],enumerable:!0})},D=(e,t,l,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of F(t))!$.call(e,s)&&s!==l&&p(e,s,{get:()=>t[s],enumerable:!(a=E(t,s))||a.enumerable});return e};var z=(e,t,l)=>(l=e!=null?R(G(e)):{},D(t||!e||!e.__esModule?p(l,"default",{value:e,enumerable:!0}):l,e)),C=e=>D(p({},"__esModule",{value:!0}),e);var P={};j(P,{default:()=>M});module.exports=C(P);var n=require("react/jsx-runtime"),r=z(require("react")),u=require("../../helpers/utils.js"),c=require("../../components/index.js"),S=require("../../shared/Styles.js");function L(e=[],t=3){const l=[];for(let a=0;a<e.length;a+=t)l.push(e.slice(a,a+t));return l}const N=r.default.forwardRef(({data:e,className:t=""},l)=>{const{title:a,features:s=[],featureChunkSize:v=3,theme:w}=e,[m,y]=r.default.useState(0),[b,x]=r.default.useState(!0),f=L(s,v),d=f.length,o=s.length>v,T=o?[...f,f[0]]:f,g=40;r.default.useEffect(()=>{if(!o)return;const i=setInterval(()=>{y(h=>h+1),x(!0)},3e3);return()=>clearInterval(i)},[d,o]),r.default.useEffect(()=>{if(o)if(m===d){const i=setTimeout(()=>{x(!1),y(0)},500);return()=>clearTimeout(i)}else x(!0)},[m,d,o]);const H=(0,r.useRef)(null);return(0,n.jsxs)("div",{ref:l,className:(0,u.cn)("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",t),children:[(0,n.jsx)(c.Heading,{ref:H,as:"h2",size:2,weight:"bold",align:"left",className:(0,u.cn)("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none",{"text-[#1D1D1F]":w!=="dark","text-[#fff]":w==="dark"}),children:a}),s&&s.length>0&&(0,n.jsx)("div",{className:"relative w-full max-w-[500px] overflow-hidden",style:{height:`${g}px`},children:(0,n.jsx)("div",{className:(0,u.cn)(["flex flex-col",b?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${m*g}px)`},children:T.map((i,h)=>(0,n.jsx)("div",{className:"flex w-full flex-row items-stretch gap-3 overflow-hidden",style:{height:`${g}px`},children:i.map((I,k)=>(0,n.jsxs)(r.default.Fragment,{children:[k>0&&(0,n.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),(0,n.jsx)(c.Text,{align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]",html:I.title})]},k))},h))})})]})});N.displayName="Slogan";var M=(0,S.withStyles)(N);
1
+ "use strict";"use client";var q=Object.create;var x=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var Q=(t,e)=>{for(var r in e)x(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of J(e))!O.call(t,l)&&l!==r&&x(t,l,{get:()=>e[l],enumerable:!(o=B(e,l))||o.enumerable});return t};var V=(t,e,r)=>(r=t!=null?q(K(t)):{},G(e||!t||!t.__esModule?x(r,"default",{value:t,enumerable:!0}):r,t)),W=t=>G(x({},"__esModule",{value:!0}),t);var _={};Q(_,{default:()=>Z});module.exports=W(_);var s=require("react/jsx-runtime"),n=V(require("react")),h=require("../../helpers/utils.js"),w=require("../../components/index.js"),F=require("../../shared/Styles.js");function X(t=[],e=3){const r=[];for(let o=0;o<t.length;o+=e)r.push(t.slice(o,o+e));return r}const R=n.default.forwardRef(({data:t,className:e="",GSAP:r},o)=>{const{gsap:l,ScrollTrigger:k,SplitText:M,useGSAP:$}=r,{title:A,features:f=[],featureChunkSize:D=3,theme:N}=t,[y,H]=n.default.useState(0),[C,v]=n.default.useState(!0),m=X(f,D),b=m.length,p=f.length>D,P=p?[...m,m[0]]:m,S=40;n.default.useEffect(()=>{if(!p)return;const a=setInterval(()=>{H(i=>i+1),v(!0)},3e3);return()=>clearInterval(a)},[b,p]),n.default.useEffect(()=>{if(p)if(y===b){const a=setTimeout(()=>{v(!1),H(0)},500);return()=>clearTimeout(a)}else v(!0)},[y,b,p]);const c=(0,n.useRef)(null),g=(0,n.useRef)(null);return $(()=>{if(!c.current)return;g.current=new M(c.current,{type:"words",wordsClass:"word"});const a=c.current?.clientHeight||100,i=g.current.words;return l.set(i,{opacity:0}),k.create({trigger:c.current,start:"bottom bottom",end:`bottom bottom-=${a+40}px`,scrub:!0,onUpdate:u=>{const d=u.progress,E=i.length,j=1/E,I=.5;i.forEach((z,L)=>{const U=L/E*(1-I),Y=j*(1+I);let T=(d-U)/Y;T=Math.max(0,Math.min(T,1)),l.set(z,{opacity:T})})}}),()=>{g.current&&g.current.revert(),k.getAll().forEach(u=>u.kill())}},[]),(0,s.jsxs)("div",{ref:o,className:(0,h.cn)("laptop:flex-row laptop:items-end laptop:justify-between text-info-primary laptop:min-h-[64px] lg-desktop:min-h-[128px] flex h-auto w-full flex-col items-start justify-center gap-[24px] text-center",e),children:[(0,s.jsx)(w.Heading,{ref:c,as:"h2",size:2,weight:"bold",align:"left",className:(0,h.cn)("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none",{"text-[#1D1D1F]":N!=="dark","text-[#fff]":N==="dark"}),children:A}),f&&f.length>0&&(0,s.jsx)("div",{className:"relative w-full max-w-[500px] overflow-hidden",style:{height:`${S}px`},children:(0,s.jsx)("div",{className:(0,h.cn)(["flex flex-col",C?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${y*S}px)`},children:P.map((a,i)=>(0,s.jsx)("div",{className:"flex w-full flex-row items-stretch gap-3 overflow-hidden",style:{height:`${S}px`},children:a.map((u,d)=>(0,s.jsxs)(n.default.Fragment,{children:[d>0&&(0,s.jsx)("div",{className:"slogan-feature-divider w-px self-stretch bg-[#D9D9D9]"}),(0,s.jsx)(w.Text,{align:"left",as:"p",className:"slogan-feature-text tablet:text-[13px] laptop:text-[14px] line-clamp-2 text-[12px] font-medium leading-[1.4] text-[#1D1D1F]",html:u.title})]},d))},i))})})]})});R.displayName="Slogan";var Z=(0,F.withStyles)(R);
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'\n// import { useGSAP } from '@gsap/react'\n// import { gsap } from 'gsap'\n// import { SplitText } from 'gsap/SplitText'\n// import { ScrollTrigger } from 'gsap/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\n// gsap.registerPlugin(SplitText, ScrollTrigger)\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 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',\n // end: `bottom bottom-=${height + 40}px`,\n // scrub: true,\n // onUpdate: self => {\n // const progress = self.progress\n // const total = words.length\n // const interval = 1 / total\n // const overlap = 0.5\n // words.forEach((word, i) => {\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 // return () => {\n // splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach(t => 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 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=\"relative w-full max-w-[500px] overflow-hidden\" style={{ height: `${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=\"flex w-full flex-row items-stretch gap-3 overflow-hidden\"\n style={{ height: `${groupHeight}px` }}\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] font-medium leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqGM,IAAAI,EAAA,6BApGNC,EAA8B,oBAK9BC,EAAmB,kCACnBC,EAA8B,qCAC9BC,EAA2B,kCAK3B,SAASC,EAAWC,EAA6B,CAAC,EAAGC,EAAe,EAAG,CACrE,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,GAAKF,EACrCC,EAAO,KAAKF,EAAM,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEtC,OAAOC,CACT,CAEA,MAAME,EAAS,EAAAC,QAAM,WAAwC,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAY,EAAG,EAAGC,IAAQ,CAC9F,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAW,CAAC,EAAG,iBAAAC,EAAmB,EAAG,MAAAC,CAAM,EAAIN,EACxD,CAACO,EAAYC,CAAa,EAAI,EAAAT,QAAM,SAAS,CAAC,EAC9C,CAACU,EAAiBC,CAAkB,EAAI,EAAAX,QAAM,SAAS,EAAI,EAC3DY,EAAiBlB,EAAWW,EAAUC,CAAgB,EACtDO,EAAcD,EAAe,OAC7BE,EAAeT,EAAS,OAASC,EACjCS,EAAgBD,EAAe,CAAC,GAAGF,EAAgBA,EAAe,CAAC,CAAC,EAAIA,EACxEI,EAAc,GAGpB,EAAAhB,QAAM,UAAU,IAAM,CACpB,GAAI,CAACc,EAAc,OACnB,M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IF,CAaP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDtB,EAAO,YAAc,SAErB,IAAOZ,KAAQ,cAAWY,CAAM",
6
- "names": ["Slogan_exports", "__export", "Slogan_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_components", "import_Styles", "chunkArray", "array", "size", "result", "i", "Slogan", "React", "data", "className", "ref", "title", "features", "featureChunkSize", "theme", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "timer", "handle", "titleRef", "group", "idx", "feature", "index"]
4
+ "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\n// import { useGSAP } from '@gsap/react'\n// import { gsap } from 'gsap'\n// import { SplitText } from 'gsap/dist/SplitText'\n// import { 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 = '', GSAP }, ref) => {\n const { gsap, ScrollTrigger, SplitText, useGSAP } = GSAP\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 splitTextInstance = useRef<typeof 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',\n end: `bottom bottom-=${height + 40}px`,\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 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=\"relative w-full max-w-[500px] overflow-hidden\" style={{ height: `${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=\"flex w-full flex-row items-stretch gap-3 overflow-hidden\"\n style={{ height: `${groupHeight}px` }}\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] font-medium leading-[1.4] text-[#1D1D1F]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withStyles(Slogan)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoGM,IAAAI,EAAA,6BAnGNC,EAA8B,oBAK9BC,EAAmB,kCACnBC,EAA8B,qCAC9BC,EAA2B,kCAG3B,SAASC,EAAWC,EAA6B,CAAC,EAAGC,EAAe,EAAG,CACrE,MAAMC,EAAS,CAAC,EAChB,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,GAAKF,EACrCC,EAAO,KAAKF,EAAM,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEtC,OAAOC,CACT,CAEA,MAAME,EAAS,EAAAC,QAAM,WAAwC,CAAC,CAAE,KA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AC,OACC,UAAU,2DACV,MAAO,CAAE,OAAQ,GAAGlB,CAAW,IAAK,EAGnC,SAAAiB,EAAM,IAAI,CAACE,EAASC,OACnB,QAAC,EAAAzC,QAAM,SAAN,CACE,UAAAyC,EAAQ,MAAK,OAAC,OAAI,UAAU,wDAAwD,KACrF,OAAC,QACC,MAAM,OACN,GAAG,IACH,UAAU,8HACV,KAAMD,EAAQ,MAChB,IAPmBC,CAQrB,CACD,GAZIF,CAaP,CACD,EACH,EACF,GAEJ,CAEJ,CAAC,EAEDxC,EAAO,YAAc,SAErB,IAAOZ,KAAQ,cAAWY,CAAM",
6
+ "names": ["Slogan_exports", "__export", "Slogan_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_components", "import_Styles", "chunkArray", "array", "size", "result", "i", "Slogan", "React", "data", "className", "GSAP", "ref", "gsap", "ScrollTrigger", "SplitText", "useGSAP", "title", "features", "featureChunkSize", "theme", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "timer", "handle", "titleRef", "splitTextInstance", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "start", "width", "opacity", "t", "group", "idx", "feature", "index"]
7
7
  }
@@ -6,6 +6,7 @@ export interface Feature {
6
6
  title: string;
7
7
  }
8
8
  export interface SloganProps {
9
+ GSAP: any;
9
10
  data: {
10
11
  /**
11
12
  * 主标题
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Slogan/types.ts"],
4
- "sourcesContent": ["import type { Theme } from '../../types/props.js'\nexport interface Feature {\n /**\n * \u7279\u6027\u6807\u9898\n */\n title: string\n}\n\nexport interface SloganProps {\n data: {\n /**\n * \u4E3B\u6807\u9898\n */\n title: string\n /**\n * \u7279\u6027\u5206\u7EC4\u5927\u5C0F \u9ED8\u8BA4\u4E3A3\n */\n featureChunkSize?: number\n /**\n * \u7279\u6027\u5217\u8868\n */\n features?: Feature[]\n /**\n * \u4E3B\u9898\n */\n theme?: Theme\n }\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { Theme } from '../../types/props.js'\nexport interface Feature {\n /**\n * \u7279\u6027\u6807\u9898\n */\n title: string\n}\n\nexport interface SloganProps {\n GSAP: any\n data: {\n /**\n * \u4E3B\u6807\u9898\n */\n title: string\n /**\n * \u7279\u6027\u5206\u7EC4\u5927\u5C0F \u9ED8\u8BA4\u4E3A3\n */\n featureChunkSize?: number\n /**\n * \u7279\u6027\u5217\u8868\n */\n features?: Feature[]\n /**\n * \u4E3B\u9898\n */\n theme?: Theme\n }\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var x=Object.create;var a=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var o in r)a(e,o,{get:r[o],enumerable:!0})},w=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of g(r))!E.call(e,s)&&s!==o&&a(e,s,{get:()=>r[s],enumerable:!(n=B(r,s))||n.enumerable});return e};var v=(e,r,o)=>(o=e!=null?x(M(e)):{},w(r||!e||!e.__esModule?a(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>w(a({},"__esModule",{value:!0}),e);var b={};P(b,{default:()=>N});module.exports=y(b);var l=require("react/jsx-runtime"),i=v(require("react")),d=require("../../helpers/utils.js"),f=require("swiper/react"),t=require("swiper/modules");const m=i.default.forwardRef(({data:e,breakpoints:r,Slide:o,className:n,id:s})=>{const[h,u]=(0,i.useState)(!0),[V,c]=(0,i.useState)(!1);return(0,l.jsx)(f.Swiper,{className:(0,d.cn)(n),navigation:{nextEl:`.${s}-custom-swiper-button-next`,prevEl:`.${s}-custom-swiper-button-prev`},onProgress:p=>{u(p.isBeginning),c(p.isEnd)},modules:[t.Navigation,t.FreeMode,t.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},breakpoints:r||{0:{spaceBetween:12,slidesPerView:1,freeMode:!1},374:{spaceBetween:12,freeMode:!1,slidesPerView:2.3},768:{spaceBetween:16,slidesPerView:2,freeMode:!1}},children:e?.list?.map((p,S)=>(0,l.jsx)(f.SwiperSlide,{className:"!flex !h-[unset]",children:(0,l.jsx)(o,{data:p,configuration:e?.configuration})},s+"SwiperSlide"+S))})});m.displayName="SwiperBox";var N=m;
1
+ "use strict";"use client";var x=Object.create;var a=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var P=(e,r)=>{for(var o in r)a(e,o,{get:r[o],enumerable:!0})},w=(e,r,o,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of g(r))!E.call(e,s)&&s!==o&&a(e,s,{get:()=>r[s],enumerable:!(n=B(r,s))||n.enumerable});return e};var v=(e,r,o)=>(o=e!=null?x(M(e)):{},w(r||!e||!e.__esModule?a(o,"default",{value:e,enumerable:!0}):o,e)),y=e=>w(a({},"__esModule",{value:!0}),e);var b={};P(b,{default:()=>N});module.exports=y(b);var l=require("react/jsx-runtime"),i=v(require("react")),d=require("../../helpers/utils.js"),f=require("swiper/react"),t=require("swiper/modules");const m=i.default.forwardRef(({data:e,breakpoints:r,Slide:o,className:n,id:s})=>{const[h,u]=(0,i.useState)(!0),[V,c]=(0,i.useState)(!1);return(0,l.jsx)(f.Swiper,{className:(0,d.cn)(n),navigation:{nextEl:`.${s}-custom-swiper-button-next`,prevEl:`.${s}-custom-swiper-button-prev`},onProgress:p=>{u(p.isBeginning),c(p.isEnd)},modules:[t.Navigation,t.FreeMode,t.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},breakpoints:r||{0:{spaceBetween:12,slidesPerView:1,freeMode:!1},374:{spaceBetween:12,slidesPerView:1.1,freeMode:!1},768:{spaceBetween:16,slidesPerView:2,freeMode:!1}},children:e?.list?.map((p,S)=>(0,l.jsx)(f.SwiperSlide,{className:"!flex !h-[unset]",children:(0,l.jsx)(o,{data:p,configuration:e?.configuration})},s+"SwiperSlide"+S))})});m.displayName="SwiperBox";var N=m;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/SwiperBox/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, breakpoints, Slide, className, id }) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!flex !h-[unset]\">\n <Slide data={item} configuration={data?.configuration} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmDU,IAAAI,EAAA,6BAlDVC,EAAgC,oBAChCC,EAAmB,kCAGnBD,EAAoC,wBACpCE,EAAiD,0BAGjD,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,CAAG,IAAM,CAClH,KAAM,CAACC,EAASC,CAAQ,KAAI,YAAS,EAAI,EACnC,CAACC,EAAOC,CAAM,KAAI,YAAS,EAAK,EAEtC,SACE,OAAC,UACC,aAAW,MAAGL,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYK,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAAC,aAAY,WAAU,YAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACER,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACU,EAAMC,OACtB,OAAC,eAA8C,UAAU,mBACvD,mBAACT,EAAA,CAAM,KAAMQ,EAAM,cAAeV,GAAM,cAAe,GADvCI,EAAK,cAAgBO,CAEvC,CACD,EACH,CAEJ,CAAC,EAEDb,EAAU,YAAc,YAExB,IAAON,EAAQM",
4
+ "sourcesContent": ["'use client'\nimport React, { useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\n// import 'swiper/css'\n// import 'swiper/css/free-mode'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { Navigation, FreeMode, Mousewheel } from 'swiper/modules'\nimport type { SwiperBoxProps } from './types.js'\n\nconst SwiperBox = React.forwardRef<HTMLDivElement, SwiperBoxProps>(({ data, breakpoints, Slide, className, id }) => {\n const [isStart, setStart] = useState(true)\n const [isEnd, setEnd] = useState(false)\n\n return (\n <Swiper\n className={cn(className)}\n navigation={{\n nextEl: `.${id}-custom-swiper-button-next`,\n prevEl: `.${id}-custom-swiper-button-prev`,\n }}\n onProgress={swiper => {\n setStart(swiper.isBeginning)\n setEnd(swiper.isEnd)\n }}\n modules={[Navigation, FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={\n breakpoints || {\n 0: {\n spaceBetween: 12,\n slidesPerView: 1,\n freeMode: false,\n },\n 374: {\n spaceBetween: 12,\n slidesPerView: 1.1,\n freeMode: false,\n },\n 768: {\n spaceBetween: 16,\n slidesPerView: 2,\n freeMode: false,\n },\n }\n }\n >\n {data?.list?.map((item, jIndex) => (\n <SwiperSlide key={id + 'SwiperSlide' + jIndex} className=\"!flex !h-[unset]\">\n <Slide data={item} configuration={data?.configuration} />\n </SwiperSlide>\n ))}\n </Swiper>\n )\n})\n\nSwiperBox.displayName = 'SwiperBox'\n\nexport default SwiperBox\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmDU,IAAAI,EAAA,6BAlDVC,EAAgC,oBAChCC,EAAmB,kCAGnBD,EAAoC,wBACpCE,EAAiD,0BAGjD,MAAMC,EAAY,EAAAC,QAAM,WAA2C,CAAC,CAAE,KAAAC,EAAM,YAAAC,EAAa,MAAAC,EAAO,UAAAC,EAAW,GAAAC,CAAG,IAAM,CAClH,KAAM,CAACC,EAASC,CAAQ,KAAI,YAAS,EAAI,EACnC,CAACC,EAAOC,CAAM,KAAI,YAAS,EAAK,EAEtC,SACE,OAAC,UACC,aAAW,MAAGL,CAAS,EACvB,WAAY,CACV,OAAQ,IAAIC,CAAE,6BACd,OAAQ,IAAIA,CAAE,4BAChB,EACA,WAAYK,GAAU,CACpBH,EAASG,EAAO,WAAW,EAC3BD,EAAOC,EAAO,KAAK,CACrB,EACA,QAAS,CAAC,aAAY,WAAU,YAAU,EAC1C,SAAU,GACV,WAAY,CACV,YAAa,EACf,EACA,YACER,GAAe,CACb,EAAG,CACD,aAAc,GACd,cAAe,EACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,IACf,SAAU,EACZ,EACA,IAAK,CACH,aAAc,GACd,cAAe,EACf,SAAU,EACZ,CACF,EAGD,SAAAD,GAAM,MAAM,IAAI,CAACU,EAAMC,OACtB,OAAC,eAA8C,UAAU,mBACvD,mBAACT,EAAA,CAAM,KAAMQ,EAAM,cAAeV,GAAM,cAAe,GADvCI,EAAK,cAAgBO,CAEvC,CACD,EACH,CAEJ,CAAC,EAEDb,EAAU,YAAc,YAExB,IAAON,EAAQM",
6
6
  "names": ["SwiperBox_exports", "__export", "SwiperBox_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_modules", "SwiperBox", "React", "data", "breakpoints", "Slide", "className", "id", "isStart", "setStart", "isEnd", "setEnd", "swiper", "item", "jIndex"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var k=Object.create;var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var B=(a,e)=>{for(var s in e)l(a,s,{get:e[s],enumerable:!0})},T=(a,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of P(e))!w.call(a,r)&&r!==s&&l(a,r,{get:()=>e[r],enumerable:!(o=v(e,r))||o.enumerable});return a};var m=(a,e,s)=>(s=a!=null?k(L(a)):{},T(e||!a||!a.__esModule?l(s,"default",{value:a,enumerable:!0}):s,a)),C=a=>T(l({},"__esModule",{value:!0}),a);var M={};B(M,{default:()=>G});module.exports=C(M);var i=require("react/jsx-runtime"),c=require("../../shared/Styles.js"),b=m(require("../../components/tabs.js")),f=require("../../helpers/index.js"),u=m(require("react")),d=m(require("../ShelfDisplay/index.js")),y=m(require("../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js")),N=m(require("../Title/index.js"));const D=u.default.forwardRef(({data:a,className:e},s)=>{const{theme:o,shape:r,align:g,tabs:p,sectionTitle:n}=a,h=t=>t.blockType==="ipc-shelfdisplay"?(0,i.jsx)(d.default,{data:t}):t.blockType==="ipc-multiLayoutGraphicBlock"?(0,i.jsx)(y.default,{data:t}):null;return(0,i.jsxs)("section",{ref:s,className:(0,f.cn)(o==="dark"?"aiui-dark":"",e),children:[n&&(0,i.jsx)(N.default,{className:"section-title",data:{title:n}}),(0,i.jsxs)(b.Tabs,{shape:r,align:g,defaultValue:p[0].tabName,children:[(0,i.jsx)(b.TabsList,{className:"tabs-list",children:p.map(t=>(0,i.jsx)(b.TabsTrigger,{value:t.tabName,className:"tabs-trigger",children:t.tabName},t.tabName))}),p.map(t=>(0,i.jsx)(b.TabsContent,{value:t.tabName,className:"tabs-content",children:h(t.tabContent?.[0])},t.tabName))]})]})});var G=(0,c.withStyles)(D);
1
+ "use strict";"use client";var k=Object.create;var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var w=(a,e)=>{for(var s in e)l(a,s,{get:e[s],enumerable:!0})},T=(a,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of L(e))!S.call(a,r)&&r!==s&&l(a,r,{get:()=>e[r],enumerable:!(o=v(e,r))||o.enumerable});return a};var m=(a,e,s)=>(s=a!=null?k(G(a)):{},T(e||!a||!a.__esModule?l(s,"default",{value:a,enumerable:!0}):s,a)),B=a=>T(l({},"__esModule",{value:!0}),a);var M={};w(M,{default:()=>D});module.exports=B(M);var i=require("react/jsx-runtime"),c=require("../../shared/Styles.js"),b=m(require("../../components/tabs.js")),f=require("../../helpers/index.js"),u=m(require("react")),d=m(require("../ShelfDisplay/index.js")),y=m(require("../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js")),N=m(require("../Title/index.js"));const C=u.default.forwardRef(({data:a,className:e,GSAP:s},o)=>{const{theme:r,shape:P,align:g,tabs:p,sectionTitle:n}=a,h=t=>t.blockType==="ipc-shelfdisplay"?(0,i.jsx)(d.default,{data:t}):t.blockType==="ipc-multiLayoutGraphicBlock"?(0,i.jsx)(y.default,{data:t,GSAP:s}):null;return(0,i.jsxs)("section",{ref:o,className:(0,f.cn)(r==="dark"?"aiui-dark":"",e),children:[n&&(0,i.jsx)(N.default,{className:"section-title",data:{title:n},GSAP:s}),(0,i.jsxs)(b.Tabs,{shape:P,align:g,defaultValue:p[0].tabName,children:[(0,i.jsx)(b.TabsList,{className:"tabs-list",children:p.map(t=>(0,i.jsx)(b.TabsTrigger,{value:t.tabName,className:"tabs-trigger",children:t.tabName},t.tabName))}),p.map(t=>(0,i.jsx)(b.TabsContent,{value:t.tabName,className:"tabs-content",children:h(t.tabContent?.[0])},t.tabName))]})]})});var D=(0,c.withStyles)(C);
2
2
  //# sourceMappingURL=Tabs.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Tabs/Tabs.tsx"],
4
- "sourcesContent": ["'use client'\nimport { withStyles } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className }, forwardedRef) => {\n const { theme, shape, align, tabs, sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs[0].tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {tabs.map(tab => (\n <TabsPrimitive.TabsTrigger key={tab.tabName} value={tab.tabName} className=\"tabs-trigger\">\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {tabs.map(tab => (\n <TabsPrimitive.TabsContent key={tab.tabName} value={tab.tabName} className=\"tabs-content\">\n {renderTabContent(tab.tabContent?.[0])}\n </TabsPrimitive.TabsContent>\n ))}\n </TabsPrimitive.Tabs>\n </section>\n )\n})\n\nexport default withStyles(Tabs)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAea,IAAAI,EAAA,6BAdbC,EAA2B,kCAC3BC,EAA+B,uCAC/BC,EAAmB,kCAEnBC,EAAkB,oBAClBC,EAAyB,uCACzBC,EAAoC,oEACpCC,EAAkB,gCAElB,MAAMC,EAAO,EAAAC,QAAM,WAAsC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAiB,CAC9F,KAAM,CAAE,MAAAC,EAAO,MAAAC,EAAO,MAAAC,EAAO,KAAAC,EAAM,aAAAC,CAAa,EAAIP,EAE9CQ,EAAoBC,GACpBA,EAAW,YAAc,sBACpB,OAAC,EAAAC,QAAA,CAAa,KAAMD,EAAY,EAC9BA,EAAW,YAAc,iCAC3B,OAAC,EAAAE,QAAA,CAAwB,KAAMF,EAAY,EAE3C,KAIX,SACE,QAAC,WAAQ,IAAKP,EAAc,aAAW,MAAGC,IAAU,OAAS,YAAc,GAAIF,CAAS,EACrF,UAAAM,MAAgB,OAAC,EAAAK,QAAA,CAAM,UAAU,gBAAgB,KAAM,CAAE,MAAOL,CAAa,EAAG,KACjF,QAACf,EAAc,KAAd,CAAmB,MAAOY,EAAO,MAAOC,EAAO,aAAcC,EAAK,CAAC,EAAE,QACpE,oBAACd,EAAc,SAAd,CAAuB,UAAU,YAC/B,SAAAc,EAAK,IAAIO,MACR,OAACrB,EAAc,YAAd,CAA4C,MAAOqB,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,SADyBA,EAAI,OAEpC,CACD,EACH,EACCP,EAAK,IAAIO,MACR,OAACrB,EAAc,YAAd,CAA4C,MAAOqB,EAAI,QAAS,UAAU,eACxE,SAAAL,EAAiBK,EAAI,aAAa,CAAC,CAAC,GADPA,EAAI,OAEpC,CACD,GACH,GACF,CAEJ,CAAC,EAED,IAAOzB,KAAQ,cAAWU,CAAI",
6
- "names": ["Tabs_exports", "__export", "Tabs_default", "__toCommonJS", "import_jsx_runtime", "import_Styles", "TabsPrimitive", "import_helpers", "import_react", "import_ShelfDisplay", "import_MultiLayoutGraphicBlock", "import_Title", "Tabs", "React", "data", "className", "forwardedRef", "theme", "shape", "align", "tabs", "sectionTitle", "renderTabContent", "tabContent", "ShelfDisplay", "MultiLayoutGraphicBlock", "Title", "tab"]
4
+ "sourcesContent": ["'use client'\nimport { withStyles } from '../../shared/Styles.js'\nimport * as TabsPrimitive from '../../components/tabs.js'\nimport { cn } from '../../helpers/index.js'\nimport type { TabsProps } from './types.js'\nimport React from 'react'\nimport ShelfDisplay from '../ShelfDisplay/index.js'\nimport MultiLayoutGraphicBlock from '../MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js'\nimport Title from '../Title/index.js'\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(({ data, className, GSAP }, forwardedRef) => {\n const { theme, shape, align, tabs, sectionTitle } = data\n\n const renderTabContent = (tabContent: TabsProps['data']['tabs'][number]['tabContent'][number]) => {\n if (tabContent.blockType === 'ipc-shelfdisplay') {\n return <ShelfDisplay data={tabContent} />\n } else if (tabContent.blockType === 'ipc-multiLayoutGraphicBlock') {\n return <MultiLayoutGraphicBlock data={tabContent} GSAP={GSAP} />\n } else {\n return null\n }\n }\n\n return (\n <section ref={forwardedRef} className={cn(theme === 'dark' ? 'aiui-dark' : '', className)}>\n {sectionTitle && <Title className=\"section-title\" data={{ title: sectionTitle }} GSAP={GSAP} />}\n <TabsPrimitive.Tabs shape={shape} align={align} defaultValue={tabs[0].tabName}>\n <TabsPrimitive.TabsList className=\"tabs-list\">\n {tabs.map(tab => (\n <TabsPrimitive.TabsTrigger key={tab.tabName} value={tab.tabName} className=\"tabs-trigger\">\n {tab.tabName}\n </TabsPrimitive.TabsTrigger>\n ))}\n </TabsPrimitive.TabsList>\n {tabs.map(tab => (\n <TabsPrimitive.TabsContent key={tab.tabName} value={tab.tabName} className=\"tabs-content\">\n {renderTabContent(tab.tabContent?.[0])}\n </TabsPrimitive.TabsContent>\n ))}\n </TabsPrimitive.Tabs>\n </section>\n )\n})\n\nexport default withStyles(Tabs)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAea,IAAAI,EAAA,6BAdbC,EAA2B,kCAC3BC,EAA+B,uCAC/BC,EAAmB,kCAEnBC,EAAkB,oBAClBC,EAAyB,uCACzBC,EAAoC,oEACpCC,EAAkB,gCAElB,MAAMC,EAAO,EAAAC,QAAM,WAAsC,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,KAAAC,CAAK,EAAGC,IAAiB,CACpG,KAAM,CAAE,MAAAC,EAAO,MAAAC,EAAO,MAAAC,EAAO,KAAAC,EAAM,aAAAC,CAAa,EAAIR,EAE9CS,EAAoBC,GACpBA,EAAW,YAAc,sBACpB,OAAC,EAAAC,QAAA,CAAa,KAAMD,EAAY,EAC9BA,EAAW,YAAc,iCAC3B,OAAC,EAAAE,QAAA,CAAwB,KAAMF,EAAY,KAAMR,EAAM,EAEvD,KAIX,SACE,QAAC,WAAQ,IAAKC,EAAc,aAAW,MAAGC,IAAU,OAAS,YAAc,GAAIH,CAAS,EACrF,UAAAO,MAAgB,OAAC,EAAAK,QAAA,CAAM,UAAU,gBAAgB,KAAM,CAAE,MAAOL,CAAa,EAAG,KAAMN,EAAM,KAC7F,QAACV,EAAc,KAAd,CAAmB,MAAOa,EAAO,MAAOC,EAAO,aAAcC,EAAK,CAAC,EAAE,QACpE,oBAACf,EAAc,SAAd,CAAuB,UAAU,YAC/B,SAAAe,EAAK,IAAIO,MACR,OAACtB,EAAc,YAAd,CAA4C,MAAOsB,EAAI,QAAS,UAAU,eACxE,SAAAA,EAAI,SADyBA,EAAI,OAEpC,CACD,EACH,EACCP,EAAK,IAAIO,MACR,OAACtB,EAAc,YAAd,CAA4C,MAAOsB,EAAI,QAAS,UAAU,eACxE,SAAAL,EAAiBK,EAAI,aAAa,CAAC,CAAC,GADPA,EAAI,OAEpC,CACD,GACH,GACF,CAEJ,CAAC,EAED,IAAO1B,KAAQ,cAAWU,CAAI",
6
+ "names": ["Tabs_exports", "__export", "Tabs_default", "__toCommonJS", "import_jsx_runtime", "import_Styles", "TabsPrimitive", "import_helpers", "import_react", "import_ShelfDisplay", "import_MultiLayoutGraphicBlock", "import_Title", "Tabs", "React", "data", "className", "GSAP", "forwardedRef", "theme", "shape", "align", "tabs", "sectionTitle", "renderTabContent", "tabContent", "ShelfDisplay", "MultiLayoutGraphicBlock", "Title", "tab"]
7
7
  }
@@ -2,6 +2,7 @@ import type { Align, Shape, Theme } from '../../types/props.js';
2
2
  import type { MultiLayoutGraphicBlockProps } from '../MultiLayoutGraphicBlock/types.js';
3
3
  import type { ShelfDisplayProps } from '../ShelfDisplay/index.js';
4
4
  export type TabsProps = {
5
+ GSAP: any;
5
6
  data: {
6
7
  sectionTitle?: string;
7
8
  theme: Theme;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Tabs/types.ts"],
4
- "sourcesContent": ["import type { Align, Shape, Theme } from '../../types/props.js'\nimport type { MultiLayoutGraphicBlockProps } from '../MultiLayoutGraphicBlock/types.js'\nimport type { ShelfDisplayProps } from '../ShelfDisplay/index.js'\n\nexport type TabsProps = {\n data: {\n sectionTitle?: string\n theme: Theme\n shape: Shape\n align: Align\n tabs: {\n tabName: string\n tabContent:\n | (ShelfDisplayProps['data'] & { blockType: 'ipc-shelfdisplay' })[]\n | (MultiLayoutGraphicBlockProps['data'] & { blockType: 'ipc-multiLayoutGraphicBlock' })[]\n }[]\n }\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { Align, Shape, Theme } from '../../types/props.js'\nimport type { MultiLayoutGraphicBlockProps } from '../MultiLayoutGraphicBlock/types.js'\nimport type { ShelfDisplayProps } from '../ShelfDisplay/index.js'\n\nexport type TabsProps = {\n GSAP: any\n data: {\n sectionTitle?: string\n theme: Theme\n shape: Shape\n align: Align\n tabs: {\n tabName: string\n tabContent:\n | (ShelfDisplayProps['data'] & { blockType: 'ipc-shelfdisplay' })[]\n | (MultiLayoutGraphicBlockProps['data'] & { blockType: 'ipc-multiLayoutGraphicBlock' })[]\n }[]\n }\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var c=Object.create;var m=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var i in t)m(e,i,{get:t[i],enumerable:!0})},a=(e,t,i,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of u(t))!h.call(e,r)&&r!==i&&m(e,r,{get:()=>t[r],enumerable:!(l=T(t,r))||l.enumerable});return e};var R=(e,t,i)=>(i=e!=null?c(y(e)):{},a(t||!e||!e.__esModule?m(i,"default",{value:e,enumerable:!0}):i,e)),b=e=>a(m({},"__esModule",{value:!0}),e);var g={};H(g,{default:()=>v});module.exports=b(g);var s=require("react/jsx-runtime"),o=R(require("react")),f=require("../../helpers/utils.js"),n=require("../../components/index.js"),d=require("../../shared/Styles.js");const p=o.default.forwardRef(({data:e,className:t})=>{const{title:i,theme:l}=e,r=(0,o.useRef)(null);return i&&(0,s.jsx)("div",{className:(0,f.cn)("tablet:mb-[32px] mb-[24px] space-y-4",t,{"aiui-dark":l==="dark"}),children:(0,s.jsx)(n.Heading,{ref:r,as:"h2",size:5,html:i})})});p.displayName="Title";var v=(0,d.withStyles)(p);
1
+ "use strict";"use client";var L=Object.create;var a=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var G=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},y=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of z(e))!D.call(t,o)&&o!==r&&a(t,o,{get:()=>e[o],enumerable:!(n=N(e,o))||n.enumerable});return t};var I=(t,e,r)=>(r=t!=null?L(C(t)):{},y(e||!t||!t.__esModule?a(r,"default",{value:t,enumerable:!0}):r,t)),U=t=>y(a({},"__esModule",{value:!0}),t);var j={};G(j,{default:()=>$});module.exports=U(j);var u=require("react/jsx-runtime"),l=I(require("react")),b=require("../../helpers/utils.js"),w=require("../../components/index.js"),x=require("../../shared/Styles.js");const T=l.default.forwardRef(({data:t,className:e,GSAP:r})=>{const{title:n,theme:o}=t,{gsap:d,ScrollTrigger:f,SplitText:v,useGSAP:H}=r,s=(0,l.useRef)(null),i=(0,l.useRef)(null);return H(()=>{if(!s.current)return;const S=s.current?.clientHeight||80;i.current=new v(s.current,{type:"words",wordsClass:"word"});const c=i.current.words;return d.set(c,{opacity:0}),f.create({trigger:s.current,start:"bottom bottom",end:`bottom bottom-=${S+20}px`,scrub:!0,onUpdate:p=>{const k=p.progress,g=c.length,E=1/g,h=.5;c.forEach((M,R)=>{const P=R/g*(1-h),A=E*(1+h);let m=(k-P)/A;m=Math.max(0,Math.min(m,1)),d.set(M,{opacity:m})})}}),()=>{i.current&&i.current.revert(),f.getAll().forEach(p=>p.kill())}},[]),n&&(0,u.jsx)("div",{className:(0,b.cn)("tablet:mb-[32px] mb-[24px] space-y-4",e,{"aiui-dark":o==="dark"}),children:(0,u.jsx)(w.Heading,{ref:s,as:"h2",size:4,html:n})})});T.displayName="Title";var $=(0,x.withStyles)(T);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Title/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\n// import { useGSAP } from '@gsap/react'\n// import gsap from 'gsap'\n// import { SplitText } from 'gsap/SplitText'\n// import { ScrollTrigger } from 'gsap/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\n\n// gsap.registerPlugin(SplitText, ScrollTrigger)\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className }) => {\n const { title, theme } = data\n const titleRef = useRef<HTMLHeadingElement>(null)\n // const splitTextInstance = useRef<SplitText | null>(null)\n // useGSAP(() => {\n // if (!titleRef.current) return\n // const height = titleRef.current?.clientHeight || 80\n // splitTextInstance.current = new SplitText(titleRef.current, {\n // type: 'words',\n // wordsClass: 'word',\n // })\n // const words = splitTextInstance.current.words\n // gsap.set(words, { opacity: 0 })\n // ScrollTrigger.create({\n // trigger: titleRef.current,\n // start: 'bottom bottom',\n // end: `bottom bottom+=${height + 20}px`,\n // scrub: true,\n // onUpdate: self => {\n // const progress = self.progress\n // const total = words.length\n // const interval = 1 / total\n // const overlap = 0.5\n // words.forEach((word, i) => {\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 // return () => {\n // splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach(t => t.kill())\n // }\n // }, [])\n\n return (\n title && (\n <div className={cn('tablet:mb-[32px] mb-[24px] space-y-4', className, { 'aiui-dark': theme === 'dark' })}>\n <Heading ref={titleRef} as=\"h2\" size={5} html={title} />\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withStyles(Title)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqDQ,IAAAI,EAAA,6BApDRC,EAA8B,oBAK9BC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAA2B,kCAI3B,MAAMC,EAAQ,EAAAC,QAAM,WAAuC,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,IAAM,CAClF,KAAM,CAAE,MAAAC,EAAO,MAAAC,CAAM,EAAIH,EACnBI,KAAW,UAA2B,IAAI,EAoChD,OACEF,MACE,OAAC,OAAI,aAAW,MAAG,uCAAwCD,EAAW,CAAE,YAAaE,IAAU,MAAO,CAAC,EACrG,mBAAC,WAAQ,IAAKC,EAAU,GAAG,KAAK,KAAM,EAAG,KAAMF,EAAO,EACxD,CAGN,CAAC,EAEDJ,EAAM,YAAc,QAEpB,IAAOP,KAAQ,cAAWO,CAAK",
6
- "names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_components", "import_Styles", "Title", "React", "data", "className", "title", "theme", "titleRef"]
4
+ "sourcesContent": ["'use client'\nimport React, { useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withStyles } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className, GSAP }) => {\n const { title, theme } = data\n const { gsap, ScrollTrigger, SplitText, useGSAP } = GSAP\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<typeof SplitText | null>(null)\n useGSAP(() => {\n if (!titleRef.current) return\n const height = titleRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom',\n end: `bottom bottom-=${height + 20}px`,\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 return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n }\n }, [])\n\n return (\n title && (\n <div className={cn('tablet:mb-[32px] mb-[24px] space-y-4', className, { 'aiui-dark': theme === 'dark' })}>\n <Heading ref={titleRef} as=\"h2\" size={4} html={title} />\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withStyles(Title)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAiDQ,IAAAI,EAAA,6BAhDRC,EAA8B,oBAC9BC,EAAmB,kCACnBC,EAAwB,qCACxBC,EAA2B,kCAG3B,MAAMC,EAAQ,EAAAC,QAAM,WAAuC,CAAC,CAAE,KAAAC,EAAM,UAAAC,EAAW,KAAAC,CAAK,IAAM,CACxF,KAAM,CAAE,MAAAC,EAAO,MAAAC,CAAM,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AAOP,KAAQ,cAAWO,CAAK",
6
+ "names": ["Title_exports", "__export", "Title_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_components", "import_Styles", "Title", "React", "data", "className", "GSAP", "title", "theme", "gsap", "ScrollTrigger", "SplitText", "useGSAP", "titleRef", "splitTextInstance", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "t"]
7
7
  }
@@ -6,6 +6,7 @@ export interface Feature {
6
6
  title: string;
7
7
  }
8
8
  export interface TitleProps {
9
+ GSAP: any;
9
10
  data: {
10
11
  /**
11
12
  * 主标题
@@ -1,2 +1,2 @@
1
- "use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var n=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of m(e))!o.call(t,r)&&r!==i&&a(t,r,{get:()=>e[r],enumerable:!(s=p(e,r))||s.enumerable});return t};var f=t=>n(a({},"__esModule",{value:!0}),t);var l={};module.exports=f(l);
1
+ "use strict";var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var o=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of m(e))!n.call(t,r)&&r!==i&&s(t,r,{get:()=>e[r],enumerable:!(a=p(e,r))||a.enumerable});return t};var f=t=>o(s({},"__esModule",{value:!0}),t);var l={};module.exports=f(l);
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Title/types.ts"],
4
- "sourcesContent": ["import type { Theme } from '../../types/props.js'\n\nexport interface Feature {\n /**\n * \u7279\u6027\u6807\u9898\n */\n title: string\n}\n\nexport interface TitleProps {\n data: {\n /**\n * \u4E3B\u6807\u9898\n */\n title: string\n /**\n * \u7279\u6027\u5217\u8868\uFF0C\u6700\u591A\u652F\u63013\u4E2A\n */\n features?: Feature[]\n /**\n * \u4E3B\u9898\u8272\n */\n theme?: Theme\n }\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n"],
4
+ "sourcesContent": ["import type { Theme } from '../../types/props.js'\n\nexport interface Feature {\n /**\n * \u7279\u6027\u6807\u9898\n */\n title: string\n}\n\nexport interface TitleProps {\n GSAP: any\n data: {\n /**\n * \u4E3B\u6807\u9898\n */\n title: string\n /**\n * \u7279\u6027\u5217\u8868\uFF0C\u6700\u591A\u652F\u63013\u4E2A\n */\n features?: Feature[]\n /**\n * \u4E3B\u9898\u8272\n */\n theme?: Theme\n }\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var x=Object.create;var f=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var a in t)f(e,a,{get:t[a],enumerable:!0})},d=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of F(t))!h.call(e,i)&&i!==a&&f(e,i,{get:()=>t[i],enumerable:!(l=E(t,i))||l.enumerable});return e};var P=(e,t,a)=>(a=e!=null?x(I(e)):{},d(t||!e||!e.__esModule?f(a,"default",{value:e,enumerable:!0}):a,e)),M=e=>d(f({},"__esModule",{value:!0}),e);var W={};S(W,{Avatar:()=>p,AvatarFallback:()=>v,AvatarImage:()=>u});module.exports=M(W);var s=require("react/jsx-runtime"),r=require("react"),b=P(require("fitty")),o=P(require("@radix-ui/react-avatar")),A=require("class-variance-authority"),n=require("../helpers/index.js");const V=(0,A.cva)("tracking transition-colors",{variants:{size:{small:"size-6",medium:"size-12",large:"size-[72px]"}}}),p=(0,r.forwardRef)(({className:e,textClassName:t,isAdaptation:a=!1,minSize:l=4,maxSize:i=16,children:y,style:R,size:g="small",onClick:N,...k},z)=>{const c=(0,r.useRef)(null),C=m=>{N?.(m)};return(0,r.useEffect)(()=>{let m;return a&&c.current&&(m=(0,b.default)?.(c.current,{minSize:l,maxSize:i})),()=>m?.unsubscribe?.()},[]),(0,s.jsx)(o.Root,{ref:z,onClick:C,className:(0,n.cn)(V({size:g}),"bg-bg-2 relative flex shrink-0 overflow-hidden rounded-full",e),...R?{style:R}:null,...k,children:a?(0,s.jsx)("span",{className:"bg-muted flex size-full items-center justify-center rounded-full",children:(0,s.jsx)("span",{ref:c,className:(0,n.cn)("px-2",t),children:y})}):y})});p.displayName="Avatar";const u=(0,r.forwardRef)(({className:e,...t},a)=>(0,s.jsx)(o.Image,{ref:a,className:(0,n.cn)("aspect-square size-full",e),...t}));u.displayName=o.Image.displayName;const v=(0,r.forwardRef)(({className:e,...t},a)=>(0,s.jsx)(o.Fallback,{ref:a,className:(0,n.cn)("bg-muted flex size-full items-center justify-center rounded-full",e),...t}));v.displayName=o.Fallback.displayName;
1
+ "use strict";"use client";var x=Object.create;var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var S=(e,t)=>{for(var a in t)c(e,a,{get:t[a],enumerable:!0})},d=(e,t,a,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of F(t))!h.call(e,i)&&i!==a&&c(e,i,{get:()=>t[i],enumerable:!(l=E(t,i))||l.enumerable});return e};var P=(e,t,a)=>(a=e!=null?x(I(e)):{},d(t||!e||!e.__esModule?c(a,"default",{value:e,enumerable:!0}):a,e)),M=e=>d(c({},"__esModule",{value:!0}),e);var W={};S(W,{Avatar:()=>p,AvatarFallback:()=>v,AvatarImage:()=>u});module.exports=M(W);var s=require("react/jsx-runtime"),r=require("react"),b=P(require("fitty")),n=P(require("@radix-ui/react-avatar")),A=require("class-variance-authority"),o=require("../helpers/index.js");const V=(0,A.cva)("tracking transition-colors",{variants:{size:{small:"size-8",medium:"size-10",large:"size-12"}}}),p=(0,r.forwardRef)(({className:e,textClassName:t,isAdaptation:a=!1,minSize:l=4,maxSize:i=16,children:y,style:R,size:g="small",onClick:N,...k},z)=>{const f=(0,r.useRef)(null),C=m=>{N?.(m)};return(0,r.useEffect)(()=>{let m;return a&&f.current&&(m=(0,b.default)?.(f.current,{minSize:l,maxSize:i})),()=>m?.unsubscribe?.()},[]),(0,s.jsx)(n.Root,{ref:z,onClick:C,className:(0,o.cn)(V({size:g}),"bg-container-secondary-0 text-info-primary relative flex shrink-0 items-center justify-center overflow-hidden rounded-full",e),...R?{style:R}:null,...k,children:a?(0,s.jsx)("span",{className:"bg-muted flex size-full items-center justify-center rounded-full",children:(0,s.jsx)("span",{ref:f,className:(0,o.cn)("px-2",t),children:y})}):y})});p.displayName="Avatar";const u=(0,r.forwardRef)(({className:e,...t},a)=>(0,s.jsx)(n.Image,{ref:a,className:(0,o.cn)("aspect-square size-full",e),...t}));u.displayName=n.Image.displayName;const v=(0,r.forwardRef)(({className:e,...t},a)=>(0,s.jsx)(n.Fallback,{ref:a,className:(0,o.cn)("bg-muted flex size-full items-center justify-center rounded-full",e),...t}));v.displayName=n.Fallback.displayName;
2
2
  //# sourceMappingURL=avatar.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/avatar.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport React, { useEffect, useRef, forwardRef } from 'react'\nimport fitty from 'fitty'\nimport type { FittyInstance } from 'fitty'\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\n// \u5B9A\u4E49 avatar \u7684\u6837\u5F0F\u53D8\u4F53\nconst avatarVariants = cva('tracking transition-colors', {\n variants: {\n size: {\n small: 'size-6', // \u5C0F\n medium: 'size-12', // \u4E2D\n large: 'size-[72px]', // \u5927\n },\n },\n})\n\ntype AvatarProps = {\n /** \u5B9A\u4E49\u5B50\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B,\u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n /** \u7C7B\u540D*/\n className?: string\n /** \u6837\u5F0F*/\n style?: React.CSSProperties\n /** \u70B9\u51FB\u4E8B\u4EF6*/\n onClick?: Function\n /** \u6587\u672C\u81EA\u9002\u5E94*/\n isAdaptation?: boolean\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5C0F\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n minSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5927\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n maxSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u7684\u7C7B, \u5F00\u542F\u65F6\u751F\u6548*/\n textClassName?: string\n} & VariantProps<typeof avatarVariants> &\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n\nconst Avatar = forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, AvatarProps>(\n (\n {\n className,\n textClassName,\n isAdaptation = false,\n minSize = 4,\n maxSize = 16,\n children,\n style,\n size = 'small',\n onClick,\n ...props\n },\n ref\n ) => {\n const textRef = useRef<HTMLDivElement>(null)\n // \u70B9\u51FB\u4E8B\u4EF6\n const handleClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {\n onClick?.(e)\n }\n\n useEffect(() => {\n let fittyInstance: FittyInstance\n if (isAdaptation && textRef.current) {\n fittyInstance = fitty?.(textRef.current, {\n minSize,\n maxSize,\n })\n }\n return () => fittyInstance?.unsubscribe?.()\n }, [])\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n onClick={handleClick}\n className={cn(\n avatarVariants({ size }),\n 'bg-bg-2 relative flex shrink-0 overflow-hidden rounded-full',\n className\n )}\n {...(style ? { style: style } : null)}\n {...props}\n >\n {isAdaptation ? (\n <span className=\"bg-muted flex size-full items-center justify-center rounded-full\">\n <span ref={textRef} className={cn('px-2', textClassName)}>\n {children}\n </span>\n </span>\n ) : (\n children\n )}\n </AvatarPrimitive.Root>\n )\n }\n)\n\nAvatar.displayName = 'Avatar'\n\nconst AvatarImage = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image ref={ref} className={cn('aspect-square size-full', className)} {...props} />\n))\n\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => {\n return (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}\n {...props}\n />\n )\n})\n\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAL,GAuFY,IAAAM,EAAA,6BArFZC,EAAqD,iBACrDC,EAAkB,oBAElBC,EAAiC,qCACjCC,EAAuC,oCACvCC,EAAmB,+BAGnB,MAAMC,KAAiB,OAAI,6BAA8B,CACvD,SAAU,CACR,KAAM,CACJ,MAAO,SACP,OAAQ,UACR,MAAO,aACT,CACF,CACF,CAAC,EAsBKV,KAAS,cACb,CACE,CACE,UAAAW,EACA,cAAAC,EACA,aAAAC,EAAe,GACf,QAAAC,EAAU,EACV,QAAAC,EAAU,GACV,SAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,QACP,QAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,KAAU,UAAuB,IAAI,EAErCC,EAAeC,GAAqD,CACxEL,IAAUK,CAAC,CACb,EAEA,sBAAU,IAAM,CACd,IAAIC,EACJ,OAAIZ,GAAgBS,EAAQ,UAC1BG,KAAgB,EAAAC,WAAQJ,EAAQ,QAAS,CACvC,QAAAR,EACA,QAAAC,CACF,CAAC,GAEI,IAAMU,GAAe,cAAc,CAC5C,EAAG,CAAC,CAAC,KAGH,OAAClB,EAAgB,KAAhB,CACC,IAAKc,EACL,QAASE,EACT,aAAW,MACTb,EAAe,CAAE,KAAAQ,CAAK,CAAC,EACvB,8DACAP,CACF,EACC,GAAIM,EAAQ,CAAE,MAAOA,CAAM,EAAI,KAC/B,GAAGG,EAEH,SAAAP,KACC,OAAC,QAAK,UAAU,mEACd,mBAAC,QAAK,IAAKS,EAAS,aAAW,MAAG,OAAQV,CAAa,EACpD,SAAAI,EACH,EACF,EAEAA,EAEJ,CAEJ,CACF,EAEAhB,EAAO,YAAc,SAErB,MAAME,KAAc,cAGlB,CAAC,CAAE,UAAAS,EAAW,GAAGS,CAAM,EAAGC,OAC1B,OAACd,EAAgB,MAAhB,CAAsB,IAAKc,EAAK,aAAW,MAAG,0BAA2BV,CAAS,EAAI,GAAGS,EAAO,CAClG,EAEDlB,EAAY,YAAcK,EAAgB,MAAM,YAEhD,MAAMN,KAAiB,cAGrB,CAAC,CAAE,UAAAU,EAAW,GAAGS,CAAM,EAAGC,OAExB,OAACd,EAAgB,SAAhB,CACC,IAAKc,EACL,aAAW,MAAG,mEAAoEV,CAAS,EAC1F,GAAGS,EACN,CAEH,EAEDnB,EAAe,YAAcM,EAAgB,SAAS",
4
+ "sourcesContent": ["'use client'\n\nimport React, { useEffect, useRef, forwardRef } from 'react'\nimport fitty from 'fitty'\nimport type { FittyInstance } from 'fitty'\nimport * as AvatarPrimitive from '@radix-ui/react-avatar'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport { cn } from '../helpers/index.js'\n\n// \u5B9A\u4E49 avatar \u7684\u6837\u5F0F\u53D8\u4F53\nconst avatarVariants = cva('tracking transition-colors', {\n variants: {\n size: {\n small: 'size-8', // \u5C0F\n medium: 'size-10', // \u4E2D\n large: 'size-12', // \u5927\n },\n },\n})\n\ntype AvatarProps = {\n /** \u5B9A\u4E49\u5B50\u7EC4\u4EF6\u4F5C\u4E3A\u7236\u7EC4\u4EF6\u7684\u7C7B\u578B,\u8BE6\u7EC6\u4F7F\u7528\u65B9\u5F0F\u8BF7\u53C2\u8003radix-ui */\n asChild?: boolean\n /** \u7C7B\u540D*/\n className?: string\n /** \u6837\u5F0F*/\n style?: React.CSSProperties\n /** \u70B9\u51FB\u4E8B\u4EF6*/\n onClick?: Function\n /** \u6587\u672C\u81EA\u9002\u5E94*/\n isAdaptation?: boolean\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5C0F\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n minSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u6700\u5927\u5B57\u4F53, \u5F00\u542F\u65F6\u751F\u6548*/\n maxSize?: number\n /** \u6587\u672C\u81EA\u9002\u5E94\u7684\u7C7B, \u5F00\u542F\u65F6\u751F\u6548*/\n textClassName?: string\n} & VariantProps<typeof avatarVariants> &\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n\nconst Avatar = forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, AvatarProps>(\n (\n {\n className,\n textClassName,\n isAdaptation = false,\n minSize = 4,\n maxSize = 16,\n children,\n style,\n size = 'small',\n onClick,\n ...props\n },\n ref\n ) => {\n const textRef = useRef<HTMLDivElement>(null)\n // \u70B9\u51FB\u4E8B\u4EF6\n const handleClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {\n onClick?.(e)\n }\n\n useEffect(() => {\n let fittyInstance: FittyInstance\n if (isAdaptation && textRef.current) {\n fittyInstance = fitty?.(textRef.current, {\n minSize,\n maxSize,\n })\n }\n return () => fittyInstance?.unsubscribe?.()\n }, [])\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n onClick={handleClick}\n className={cn(\n avatarVariants({ size }),\n 'bg-container-secondary-0 text-info-primary relative flex shrink-0 items-center justify-center overflow-hidden rounded-full',\n className\n )}\n {...(style ? { style: style } : null)}\n {...props}\n >\n {isAdaptation ? (\n <span className=\"bg-muted flex size-full items-center justify-center rounded-full\">\n <span ref={textRef} className={cn('px-2', textClassName)}>\n {children}\n </span>\n </span>\n ) : (\n children\n )}\n </AvatarPrimitive.Root>\n )\n }\n)\n\nAvatar.displayName = 'Avatar'\n\nconst AvatarImage = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image ref={ref} className={cn('aspect-square size-full', className)} {...props} />\n))\n\nAvatarImage.displayName = AvatarPrimitive.Image.displayName\n\nconst AvatarFallback = forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => {\n return (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn('bg-muted flex size-full items-center justify-center rounded-full', className)}\n {...props}\n />\n )\n})\n\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName\n\nexport { Avatar, AvatarImage, AvatarFallback }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAL,GAuFY,IAAAM,EAAA,6BArFZC,EAAqD,iBACrDC,EAAkB,oBAElBC,EAAiC,qCACjCC,EAAuC,oCACvCC,EAAmB,+BAGnB,MAAMC,KAAiB,OAAI,6BAA8B,CACvD,SAAU,CACR,KAAM,CACJ,MAAO,SACP,OAAQ,UACR,MAAO,SACT,CACF,CACF,CAAC,EAsBKV,KAAS,cACb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back", "AvatarImage", "__toCommonJS", "import_jsx_runtime", "import_react", "import_fitty", "AvatarPrimitive", "import_class_variance_authority", "import_helpers", "avatarVariants", "className", "textClassName", "isAdaptation", "minSize", "maxSize", "children", "style", "size", "onClick", "props", "ref", "textRef", "handleClick", "e", "fittyInstance", "fitty"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var V=Object.create;var i=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var w=(e,r)=>{for(var t in r)i(e,t,{get:r[t],enumerable:!0})},f=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of B(r))!E.call(e,o)&&o!==t&&i(e,o,{get:()=>r[o],enumerable:!(n=k(r,o))||n.enumerable});return e};var p=(e,r,t)=>(t=e!=null?V(z(e)):{},f(r||!e||!e.__esModule?i(t,"default",{value:e,enumerable:!0}):t,e)),H=e=>f(i({},"__esModule",{value:!0}),e);var L={};w(L,{default:()=>C});module.exports=H(L);var a=require("react/jsx-runtime"),N=p(require("react")),y=require("@radix-ui/react-slot"),u=require("@radix-ui/react-visually-hidden"),d=require("class-variance-authority"),m=p(require("../icons/spinner.js")),v=require("../helpers/index.js");const P=(0,d.cva)("ring-offset-background focus-visible:ring-ring rounded-btn inline-flex items-center justify-center border-[1.6px] border-solid text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none",{variants:{variant:{primary:"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",secondary:"bg-btn-secondary border-info-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary-active-foreground border border-solid",link:"text-info-primary hover:text-btn-primary-active border-none underline-offset-4 hover:underline",ghost:"text-info-primary hover:bg-btn-primary hover:text-btn-primary-foreground"},size:{sm:"px-3 py-2 text-[12px] leading-tight",base:"px-5 pb-[10px] pt-[11px] text-[14px] leading-tight",lg:"px-7 pb-[14px] pt-[15px] text-[16px] leading-tight",icon:"size-10 rounded-full leading-tight"},hoverEffect:{none:"",slide:""},state:{default:"",disabled:"",loading:""}},compoundVariants:[{variant:"primary",hoverEffect:"slide",class:'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'},{variant:"secondary",hoverEffect:"slide",class:'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'},{variant:"primary",state:"loading",class:"bg-btn-primary-active disabled:border-btn-primary-disabled-border"},{variant:"secondary",state:"loading",class:"bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"primary",state:"disabled",class:"disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"secondary",state:"disabled",class:"disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border"},{variant:"link",state:"disabled",class:"disabled:text-info-quaternary"}],defaultVariants:{variant:"primary",size:"base",hoverEffect:"none",state:"default"}}),R=(0,d.cva)("",{variants:{variant:{primary:"stroke-btn-primary-foreground",secondary:"stroke-btn-secondary-foreground",link:"stroke-primary",ghost:"stroke-primary"}},defaultVariants:{variant:"primary"}}),c=N.forwardRef(({asChild:e=!1,size:r="base",children:t,variant:n,hoverEffect:o="none",className:g,disabled:b=!1,loading:s=!1,spinner:l,...x},h)=>(0,a.jsx)(e?y.Slot:"button",{disabled:b||s,className:(0,v.cn)(P({variant:n,size:r,hoverEffect:o,state:s?"loading":b?"disabled":"default"}),g),ref:h,...x,children:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:t}),(0,a.jsx)("span",{className:"absolute",children:l||(0,a.jsx)(m.default,{className:R({variant:n})})}),(0,a.jsx)(u.VisuallyHidden,{children:t})]}):t}));c.displayName="Button";var C=c;
1
+ "use strict";"use client";var V=Object.create;var i=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var w=(e,r)=>{for(var t in r)i(e,t,{get:r[t],enumerable:!0})},f=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of B(r))!E.call(e,o)&&o!==t&&i(e,o,{get:()=>r[o],enumerable:!(n=k(r,o))||n.enumerable});return e};var p=(e,r,t)=>(t=e!=null?V(z(e)):{},f(r||!e||!e.__esModule?i(t,"default",{value:e,enumerable:!0}):t,e)),H=e=>f(i({},"__esModule",{value:!0}),e);var L={};w(L,{default:()=>C});module.exports=H(L);var a=require("react/jsx-runtime"),N=p(require("react")),y=require("@radix-ui/react-slot"),u=require("@radix-ui/react-visually-hidden"),d=require("class-variance-authority"),m=p(require("../icons/spinner.js")),v=require("../helpers/index.js");const P=(0,d.cva)("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",{variants:{variant:{primary:"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",secondary:"bg-btn-secondary border-info-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary-active-foreground border-solid",link:"text-info-primary hover:text-btn-primary-active border-none underline-offset-4 hover:underline",ghost:"text-info-primary hover:bg-btn-primary hover:text-btn-primary-foreground"},size:{sm:"px-3 py-2 text-[12px] leading-tight",base:"px-5 pb-[10px] pt-[11px] text-[14px] leading-tight",lg:"px-7 pb-[14px] pt-[15px] text-[16px] leading-tight",icon:"size-10 rounded-full leading-tight"},hoverEffect:{none:"",slide:""},state:{default:"",disabled:"",loading:""}},compoundVariants:[{variant:"primary",hoverEffect:"slide",class:'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'},{variant:"secondary",hoverEffect:"slide",class:'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'},{variant:"primary",state:"loading",class:"bg-btn-primary-active disabled:border-btn-primary-disabled-border"},{variant:"secondary",state:"loading",class:"bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"primary",state:"disabled",class:"disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"secondary",state:"disabled",class:"disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border"},{variant:"link",state:"disabled",class:"disabled:text-info-quaternary"}],defaultVariants:{variant:"primary",size:"base",hoverEffect:"none",state:"default"}}),R=(0,d.cva)("",{variants:{variant:{primary:"stroke-btn-primary-foreground",secondary:"stroke-btn-secondary-foreground",link:"stroke-primary",ghost:"stroke-primary"}},defaultVariants:{variant:"primary"}}),c=N.forwardRef(({asChild:e=!1,size:r="base",children:t,variant:n,hoverEffect:o="none",className:g,disabled:b=!1,loading:s=!1,spinner:l,...x},h)=>(0,a.jsx)(e?y.Slot:"button",{disabled:b||s,className:(0,v.cn)(P({variant:n,size:r,hoverEffect:o,state:s?"loading":b?"disabled":"default"}),g),ref:h,...x,children:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:t}),(0,a.jsx)("span",{className:"absolute",children:l||(0,a.jsx)(m.default,{className:R({variant:n})})}),(0,a.jsx)(u.VisuallyHidden,{children:t})]}):t}));c.displayName="Button";var C=c;
2
2
  //# sourceMappingURL=button.js.map
@@ -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\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-medium transition-colors 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',\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 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 children\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoJU,IAAAI,EAAA,6BAlJVC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAMn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AK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,WACb,SAAAM,MAGC,OAAC,EAAAG,QAAA,CACC,UAAWb,EAAmB,CAC5B,QAAAK,CACF,CAAC,EACH,EAEJ,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,EAEAA,EAEJ,CAGN,EAEAH,EAAO,YAAc,SACrB,IAAOX,EAAQW",
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\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',\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 children\n )}\n </Comp>\n )\n }\n)\n\nButton.displayName = 'Button'\nexport default Button\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAoJU,IAAAI,EAAA,6BAlJVC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAA+B,2CAC/BC,EAAuC,oCACvCC,EAAoB,kCACpBC,EAAmB,+BAMnB,MAAMC,KAAiB,OACrB,4PACA,CACE,SAAU,CACR,QAAS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W,GACpE,SAAAL,EACH,KACA,OAAC,QAAK,UAAU,WACb,SAAAM,MAGC,OAAC,EAAAG,QAAA,CACC,UAAWb,EAAmB,CAC5B,QAAAK,CACF,CAAC,EACH,EAEJ,KACA,OAAC,kBAAgB,SAAAD,EAAS,GAC5B,EAEAA,EAEJ,CAGN,EAEAH,EAAO,YAAc,SACrB,IAAOX,EAAQW",
6
6
  "names": ["button_exports", "__export", "button_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react_slot", "import_react_visually_hidden", "import_class_variance_authority", "import_spinner", "import_helpers", "buttonVariants", "loadingSvgVariants", "Button", "asChild", "size", "children", "variant", "hoverEffect", "className", "disabled", "loading", "spinner", "props", "ref", "Spinner"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var C=Object.create;var n=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var N=(e,p)=>{for(var o in p)n(e,o,{get:p[o],enumerable:!0})},d=(e,p,o,a)=>{if(p&&typeof p=="object"||typeof p=="function")for(let t of k(p))!b.call(e,t)&&t!==o&&n(e,t,{get:()=>p[t],enumerable:!(a=h(p,t))||a.enumerable});return e};var R=(e,p,o)=>(o=e!=null?C(v(e)):{},d(p||!e||!e.__esModule?n(o,"default",{value:e,enumerable:!0}):o,e)),g=e=>d(n({},"__esModule",{value:!0}),e);var u={};N(u,{Container:()=>m});module.exports=g(u);var s=require("react/jsx-runtime"),c=R(require("react")),r=require("../helpers/utils.js"),y=require("@radix-ui/react-slot");const m=c.default.forwardRef(({...e},p)=>{const{asChild:o,children:a,className:t,overflow:f,spaceY:l,...i}=e,x=o?y.Slot:"div";return f==="hidden"?(0,s.jsx)("div",{className:(0,r.cn)("overflow-hidden",l||"tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]",t),children:(0,s.jsx)(x,{className:(0,r.cn)("mx-auto box-border w-full max-w-[1772px]","tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-32 px-8"),...i,ref:p,children:a})}):(0,s.jsx)(x,{...i,ref:p,className:(0,r.cn)("mx-auto w-full","tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-8",l||"tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]",t),children:a})});m.displayName="Container";
1
+ "use strict";var C=Object.create;var n=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var N=(e,p)=>{for(var o in p)n(e,o,{get:p[o],enumerable:!0})},d=(e,p,o,a)=>{if(p&&typeof p=="object"||typeof p=="function")for(let t of k(p))!b.call(e,t)&&t!==o&&n(e,t,{get:()=>p[t],enumerable:!(a=h(p,t))||a.enumerable});return e};var R=(e,p,o)=>(o=e!=null?C(v(e)):{},d(p||!e||!e.__esModule?n(o,"default",{value:e,enumerable:!0}):o,e)),g=e=>d(n({},"__esModule",{value:!0}),e);var u={};N(u,{Container:()=>m});module.exports=g(u);var s=require("react/jsx-runtime"),c=R(require("react")),r=require("../helpers/utils.js"),y=require("@radix-ui/react-slot");const m=c.default.forwardRef(({...e},p)=>{const{asChild:o,children:a,className:t,overflow:f,spaceY:l,...i}=e,x=o?y.Slot:"div";return f==="hidden"?(0,s.jsx)("div",{className:(0,r.cn)("overflow-hidden",l||"tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]",t),children:(0,s.jsx)(x,{className:(0,r.cn)("mx-auto box-border w-full","tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4"),...i,ref:p,children:a})}):(0,s.jsx)(x,{...i,ref:p,className:(0,r.cn)("mx-auto w-full","tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4",l||"tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]",t),children:a})});m.displayName="Container";
2
2
  //# sourceMappingURL=container.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/container.tsx"],
4
- "sourcesContent": ["import React from 'react'\nimport { cn } from '../helpers/utils.js'\nimport { Slot } from '@radix-ui/react-slot'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n overflow?: 'hidden'\n spaceY?: string\n} & React.ComponentPropsWithoutRef<'div'>\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const { asChild, children, className, overflow, spaceY, ...containerProps } = props\n const Comp = asChild ? Slot : 'div'\n\n if (overflow === 'hidden') {\n return (\n <div\n className={cn(\n 'overflow-hidden',\n spaceY ? spaceY : 'tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]',\n className\n )}\n >\n <Comp\n className={cn(\n 'mx-auto box-border w-full max-w-[1772px]',\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-32 px-8'\n )}\n {...containerProps}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n </div>\n )\n }\n return (\n <Comp\n {...containerProps}\n ref={forwardedRef}\n className={cn(\n 'mx-auto w-full',\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-8',\n spaceY ? spaceY : 'tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]',\n className\n )}\n >\n {children}\n </Comp>\n )\n})\n\nContainer.displayName = 'Container'\n\nexport { Container }\nexport type { ContainerProps }\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAyBQ,IAAAI,EAAA,6BAzBRC,EAAkB,oBAClBC,EAAmB,+BACnBC,EAAqB,gCAUrB,MAAML,EAAY,EAAAM,QAAM,WAA6C,CAAC,CAAE,GAAGC,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,QAAAC,EAAS,SAAAC,EAAU,UAAAC,EAAW,SAAAC,EAAU,OAAAC,EAAQ,GAAGC,CAAe,EAAIP,EACxEQ,EAAON,EAAU,OAAO,MAE9B,OAAIG,IAAa,YAEb,OAAC,OACC,aAAW,MACT,kBACAC,GAAkB,uFAClBF,CACF,EAEA,mBAACI,EAAA,CACC,aAAW,MACT,2CACA,8DACF,EACC,GAAGD,EACJ,IAAKN,EAEJ,SAAAE,EACH,EACF,KAIF,OAACK,EAAA,CACE,GAAGD,EACJ,IAAKN,EACL,aAAW,MACT,iBACA,8EACAK,GAAkB,uFAClBF,CACF,EAEC,SAAAD,EACH,CAEJ,CAAC,EAEDV,EAAU,YAAc",
4
+ "sourcesContent": ["import React from 'react'\nimport { cn } from '../helpers/utils.js'\nimport { Slot } from '@radix-ui/react-slot'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n overflow?: 'hidden'\n spaceY?: string\n} & React.ComponentPropsWithoutRef<'div'>\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const { asChild, children, className, overflow, spaceY, ...containerProps } = props\n const Comp = asChild ? Slot : 'div'\n\n if (overflow === 'hidden') {\n return (\n <div\n className={cn(\n 'overflow-hidden',\n spaceY ? spaceY : 'tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]',\n className\n )}\n >\n <Comp\n className={cn(\n 'mx-auto box-border w-full',\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4'\n )}\n {...containerProps}\n ref={forwardedRef}\n >\n {children}\n </Comp>\n </div>\n )\n }\n return (\n <Comp\n {...containerProps}\n ref={forwardedRef}\n className={cn(\n 'mx-auto w-full',\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4',\n spaceY ? spaceY : 'tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]',\n className\n )}\n >\n {children}\n </Comp>\n )\n})\n\nContainer.displayName = 'Container'\n\nexport { Container }\nexport type { ContainerProps }\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAyBQ,IAAAI,EAAA,6BAzBRC,EAAkB,oBAClBC,EAAmB,+BACnBC,EAAqB,gCAUrB,MAAML,EAAY,EAAAM,QAAM,WAA6C,CAAC,CAAE,GAAGC,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,QAAAC,EAAS,SAAAC,EAAU,UAAAC,EAAW,SAAAC,EAAU,OAAAC,EAAQ,GAAGC,CAAe,EAAIP,EACxEQ,EAAON,EAAU,OAAO,MAE9B,OAAIG,IAAa,YAEb,OAAC,OACC,aAAW,MACT,kBACAC,GAAkB,uFAClBF,CACF,EAEA,mBAACI,EAAA,CACC,aAAW,MACT,4BACA,6EACF,EACC,GAAGD,EACJ,IAAKN,EAEJ,SAAAE,EACH,EACF,KAIF,OAACK,EAAA,CACE,GAAGD,EACJ,IAAKN,EACL,aAAW,MACT,iBACA,8EACAK,GAAkB,uFAClBF,CACF,EAEC,SAAAD,EACH,CAEJ,CAAC,EAEDV,EAAU,YAAc",
6
6
  "names": ["container_exports", "__export", "Container", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_react_slot", "React", "props", "forwardedRef", "asChild", "children", "className", "overflow", "spaceY", "containerProps", "Comp"]
7
7
  }