@anker-in/headless-ui 1.0.10 → 1.0.11
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.
- package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
- package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/cjs/biz-components/CreativeModule/index.d.ts +21 -0
- package/dist/cjs/biz-components/CreativeModule/index.js +2 -0
- package/dist/cjs/biz-components/CreativeModule/index.js.map +7 -0
- package/dist/cjs/biz-components/Evaluate/index.js +1 -1
- package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
- package/dist/cjs/biz-components/FooterNavigation/icons/Add.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Add.js +2 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Add.js.map +7 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/ArrowRight.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/ArrowRight.js +2 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/ArrowRight.js.map +7 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Country.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Country.js +2 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Country.js.map +7 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Subtract.d.ts +3 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Subtract.js +2 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/Subtract.js.map +7 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/index.d.ts +5 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/index.js +2 -0
- package/dist/cjs/biz-components/FooterNavigation/icons/index.js.map +7 -0
- package/dist/cjs/biz-components/FooterNavigation/index.d.ts +6 -0
- package/dist/cjs/biz-components/FooterNavigation/index.js +2 -0
- package/dist/cjs/biz-components/FooterNavigation/index.js.map +7 -0
- package/dist/cjs/biz-components/FooterNavigation/types.d.ts +13 -0
- package/dist/cjs/biz-components/FooterNavigation/types.js +2 -0
- package/dist/cjs/biz-components/FooterNavigation/types.js.map +7 -0
- package/dist/cjs/biz-components/Graphic/index.d.ts +10 -0
- package/dist/cjs/biz-components/Graphic/index.js +1 -1
- package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +8 -0
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +2 -0
- package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +7 -0
- package/dist/cjs/biz-components/GraphicOverlay/index.d.ts +2 -0
- package/dist/cjs/biz-components/GraphicOverlay/index.js +2 -0
- package/dist/cjs/biz-components/GraphicOverlay/index.js.map +7 -0
- package/dist/cjs/biz-components/GraphicOverlay/types.d.ts +33 -0
- package/dist/cjs/biz-components/GraphicOverlay/types.js +2 -0
- package/dist/cjs/biz-components/GraphicOverlay/types.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.d.ts +32 -0
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/AnkerLogo.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/AnkerLogo.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/AnkerLogo.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Cart.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Cart.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Cart.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Close.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Close.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Close.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/DownArrow.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/DownArrow.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/DownArrow.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LeftArrow.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LeftArrow.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LeftArrow.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LogoLine.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LogoLine.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/LogoLine.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Menu.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Menu.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Menu.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/RightArrow.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/RightArrow.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/RightArrow.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Search.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Search.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Search.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/User.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/User.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/User.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.d.ts +11 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/index.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +77 -0
- package/dist/cjs/biz-components/HeaderNavigation/types.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/types.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +9 -0
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +7 -0
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js +2 -2
- package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
- package/dist/cjs/biz-components/Slogan/index.js +1 -1
- package/dist/cjs/biz-components/Slogan/index.js.map +2 -2
- package/dist/cjs/biz-components/Subscribe/index.d.ts +13 -0
- package/dist/cjs/biz-components/Subscribe/index.js +2 -0
- package/dist/cjs/biz-components/Subscribe/index.js.map +7 -0
- package/dist/cjs/biz-components/TextModal/index.d.ts +14 -0
- package/dist/cjs/biz-components/TextModal/index.js +2 -0
- package/dist/cjs/biz-components/TextModal/index.js.map +7 -0
- package/dist/cjs/biz-components/Title/index.js +1 -1
- package/dist/cjs/biz-components/Title/index.js.map +3 -3
- package/dist/cjs/biz-components/Title/types.d.ts +3 -2
- package/dist/cjs/biz-components/Title/types.js +1 -1
- package/dist/cjs/biz-components/Title/types.js.map +1 -1
- package/dist/cjs/biz-components/index.d.ts +4 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/board.d.ts +2 -0
- package/dist/cjs/components/board.js +2 -0
- package/dist/cjs/components/board.js.map +7 -0
- package/dist/cjs/components/container.d.ts +2 -0
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/link.js.map +2 -2
- package/dist/cjs/helpers/utils.d.ts +1 -0
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/stories/board.stories.d.ts +6 -0
- package/dist/cjs/stories/board.stories.js +2 -0
- package/dist/cjs/stories/board.stories.js.map +7 -0
- package/dist/cjs/stories/container.stories.d.ts +1 -0
- package/dist/cjs/stories/creativeModule.stories.d.ts +19 -0
- package/dist/cjs/stories/creativeModule.stories.js +2 -0
- package/dist/cjs/stories/creativeModule.stories.js.map +7 -0
- package/dist/cjs/stories/graphic.stories.d.ts +10 -0
- package/dist/cjs/stories/graphic.stories.js +1 -1
- package/dist/cjs/stories/graphic.stories.js.map +2 -2
- package/dist/cjs/stories/whychoose.stories.js +1 -1
- package/dist/cjs/stories/whychoose.stories.js.map +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js +1 -1
- package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
- package/dist/esm/biz-components/CreativeModule/index.d.ts +21 -0
- package/dist/esm/biz-components/CreativeModule/index.js +2 -0
- package/dist/esm/biz-components/CreativeModule/index.js.map +7 -0
- package/dist/esm/biz-components/Evaluate/index.js +1 -1
- package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
- package/dist/esm/biz-components/FooterNavigation/icons/Add.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Add.js +2 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Add.js.map +7 -0
- package/dist/esm/biz-components/FooterNavigation/icons/ArrowRight.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/ArrowRight.js +2 -0
- package/dist/esm/biz-components/FooterNavigation/icons/ArrowRight.js.map +7 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Country.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Country.js +2 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Country.js.map +7 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Subtract.d.ts +3 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Subtract.js +2 -0
- package/dist/esm/biz-components/FooterNavigation/icons/Subtract.js.map +7 -0
- package/dist/esm/biz-components/FooterNavigation/icons/index.d.ts +5 -0
- package/dist/esm/biz-components/FooterNavigation/icons/index.js +2 -0
- package/dist/esm/biz-components/FooterNavigation/icons/index.js.map +7 -0
- package/dist/esm/biz-components/FooterNavigation/index.d.ts +6 -0
- package/dist/esm/biz-components/FooterNavigation/index.js +2 -0
- package/dist/esm/biz-components/FooterNavigation/index.js.map +7 -0
- package/dist/esm/biz-components/FooterNavigation/types.d.ts +13 -0
- package/dist/esm/biz-components/FooterNavigation/types.js +2 -0
- package/dist/esm/biz-components/FooterNavigation/types.js.map +7 -0
- package/dist/esm/biz-components/Graphic/index.d.ts +10 -0
- package/dist/esm/biz-components/Graphic/index.js +1 -1
- package/dist/esm/biz-components/Graphic/index.js.map +3 -3
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +8 -0
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +2 -0
- package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +7 -0
- package/dist/esm/biz-components/GraphicOverlay/index.d.ts +2 -0
- package/dist/esm/biz-components/GraphicOverlay/index.js +2 -0
- package/dist/esm/biz-components/GraphicOverlay/index.js.map +7 -0
- package/dist/esm/biz-components/GraphicOverlay/types.d.ts +33 -0
- package/dist/esm/biz-components/GraphicOverlay/types.js +1 -0
- package/dist/esm/biz-components/GraphicOverlay/types.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.d.ts +32 -0
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/AnkerLogo.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/AnkerLogo.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/AnkerLogo.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Cart.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Cart.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Cart.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Close.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Close.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Close.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/DownArrow.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/DownArrow.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/DownArrow.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LeftArrow.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LeftArrow.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LeftArrow.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LogoLine.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LogoLine.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/LogoLine.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Menu.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Menu.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Menu.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/RightArrow.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/RightArrow.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/RightArrow.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Search.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Search.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Search.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/User.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/User.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/User.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/index.d.ts +11 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/index.d.ts +7 -0
- package/dist/esm/biz-components/HeaderNavigation/index.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/types.d.ts +77 -0
- package/dist/esm/biz-components/HeaderNavigation/types.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/types.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +9 -0
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +7 -0
- package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +2 -2
- package/dist/esm/biz-components/ShelfDisplay/index.js +3 -3
- package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
- package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +2 -2
- package/dist/esm/biz-components/Slogan/index.js +1 -1
- package/dist/esm/biz-components/Slogan/index.js.map +2 -2
- package/dist/esm/biz-components/Subscribe/index.d.ts +13 -0
- package/dist/esm/biz-components/Subscribe/index.js +2 -0
- package/dist/esm/biz-components/Subscribe/index.js.map +7 -0
- package/dist/esm/biz-components/TextModal/index.d.ts +14 -0
- package/dist/esm/biz-components/TextModal/index.js +2 -0
- package/dist/esm/biz-components/TextModal/index.js.map +7 -0
- package/dist/esm/biz-components/Title/index.js +1 -1
- package/dist/esm/biz-components/Title/index.js.map +3 -3
- package/dist/esm/biz-components/Title/types.d.ts +3 -2
- package/dist/esm/biz-components/index.d.ts +4 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +2 -2
- package/dist/esm/components/board.d.ts +2 -0
- package/dist/esm/components/board.js +2 -0
- package/dist/esm/components/board.js.map +7 -0
- package/dist/esm/components/container.d.ts +2 -0
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.js.map +2 -2
- package/dist/esm/helpers/utils.d.ts +1 -0
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/stories/board.stories.d.ts +6 -0
- package/dist/esm/stories/board.stories.js +2 -0
- package/dist/esm/stories/board.stories.js.map +7 -0
- package/dist/esm/stories/container.stories.d.ts +1 -0
- package/dist/esm/stories/creativeModule.stories.d.ts +19 -0
- package/dist/esm/stories/creativeModule.stories.js +2 -0
- package/dist/esm/stories/creativeModule.stories.js.map +7 -0
- package/dist/esm/stories/graphic.stories.d.ts +10 -0
- package/dist/esm/stories/graphic.stories.js +1 -1
- package/dist/esm/stories/graphic.stories.js.map +2 -2
- package/dist/esm/stories/whychoose.stories.js +1 -1
- package/dist/esm/stories/whychoose.stories.js.map +1 -1
- package/package.json +1 -1
- package/style.css +6 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const a={us:"$",uk:"\xA3",ca:"$",eu:"\u20AC",fr:"\u20AC",de:"\u20AC",vn:"\u20AB",cl:"$",sg:"$",ae:"AED"},o=e=>({us:"en-us",uk:"en-gb",ca:"en-ca",au:"en-au",eu:"en",fr:"
|
|
1
|
+
const a={us:"$",uk:"\xA3",ca:"$",eu:"\u20AC",fr:"\u20AC",de:"\u20AC",vn:"\u20AB",cl:"$",sg:"$",ae:"AED"},o=e=>({us:"en-us",uk:"en-gb",ca:"en-ca",au:"en-au",eu:"en",fr:"de-DE","eu-fr":"de-DE",de:"de-de",vn:"vi-vn",sg:"en-sg","ae-en":"ae-en",plus:"en-us",cl:"es-cl","eu-de":"de-de"})[e]||"";function m({amount:e,currencyCode:n,locale:i,maximumFractionDigits:r,minimumFractionDigits:u,removeTrailingZeros:c=!1}){let t=new Intl.NumberFormat(o(i),{style:"currency",currency:n||"USD",minimumFractionDigits:r===0?0:u,maximumFractionDigits:r}).format(e);return["eu-de","eu-en","de","eu"].includes(i)&&(t=t?.toString()?.replace(/[\s]/g,"")),c&&(t=t.replace(/(\.\d*?[1-9])0+\b/,"$1").replace(/\.0+\b/,"").replace(/(\,\d*?[1-9])0+\b/,"$1").replace(/\,0+\b/,"")),t}function b({amount:e,baseAmount:n,currencyCode:i,locale:r,maximumFractionDigits:u,minimumFractionDigits:c,removeTrailingZeros:s}){if(typeof Intl>"u")return{price:`${a[r]}${e}`,basePrice:`${a[r]}${n}`,discount:`${a[r]}${n-e||0}`};const t=n>e,d=new Intl.NumberFormat(o(r),{style:"percent"}),f=t?d.format((n-e)/n):null,g=m({amount:e,currencyCode:i,locale:r,removeTrailingZeros:s}),l=t?m({amount:n,currencyCode:i,locale:r,maximumFractionDigits:u,minimumFractionDigits:c,removeTrailingZeros:s}):void 0;return{price:g,basePrice:l,discount:f}}export{a as PRICE_SYMBOL,m as formatPrice,b as formatVariantPrice,o as languageTerritory};
|
|
2
2
|
//# sourceMappingURL=shelfDisplay.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/ShelfDisplay/shelfDisplay.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-useless-escape */\nexport const PRICE_SYMBOL = {\n us: '$',\n uk: '\u00A3',\n ca: '$',\n eu: '\u20AC',\n fr: '\u20AC',\n de: '\u20AC',\n vn: '\u20AB',\n cl: '$',\n sg: '$',\n ae: 'AED',\n} as any\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-us',\n uk: 'en-gb',\n ca: 'en-ca',\n au: 'en-au',\n eu: 'en',\n fr: '
|
|
5
|
-
"mappings": "AACO,MAAMA,EAAe,CAC1B,GAAI,IACJ,GAAI,OACJ,GAAI,IACJ,GAAI,SACJ,GAAI,SACJ,GAAI,SACJ,GAAI,SACJ,GAAI,IACJ,GAAI,IACJ,GAAI,KACN,EAEaC,EAAqBC,IAE/B,CACC,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,KACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,QAAS,QACT,KAAM,QACN,GAAI,QACJ,QAAS,OACX,GAAGA,CAAM,GAAK,GAET,SAASC,EAAY,CAC1B,OAAAC,EACA,aAAAC,EACA,OAAAH,EACA,sBAAAI,EACA,sBAAAC,EACA,oBAAAC,EAAsB,EACxB,EAOG,CAQD,IAAIC,EAPmB,IAAI,KAAK,aAAaR,EAAkBC,CAAM,EAAG,CACtE,MAAO,WACP,SAAUG,GAAgB,MAC1B,sBAAuBC,IAA0B,EAAI,EAAIC,EACzD,sBAAAD,CACF,CAAC,EAEmC,OAAOF,CAAM,EAEjD,MAAI,CAAC,QAAS,QAAS,KAAM,IAAI,EAAE,SAASF,CAAM,IAChDO,EAAiBA,GAAgB,SAAS,GAAG,QAAQ,QAAS,EAAE,GAG9DD,IAEFC,EAAiBA,EACd,QAAQ,oBAAqB,IAAI,EACjC,QAAQ,SAAU,EAAE,EACpB,QAAQ,oBAAqB,IAAI,EACjC,QAAQ,SAAU,EAAE,GAGlBA,CACT,CAEO,SAASC,EAAmB,CACjC,OAAAN,EACA,WAAAO,EACA,aAAAN,EACA,OAAAH,EACA,sBAAAI,EACA,sBAAAC,EACA,oBAAAC,CACF,EAQG,CACD,GAAI,OAAO,KAAS,IAClB,MAAO,CACL,MAAO,GAAGR,EAAaE,CAAM,CAAC,GAAGE,CAAM,GACvC,UAAW,GAAGJ,EAAaE,CAAM,CAAC,GAAGS,CAAU,GAC/C,SAAU,GAAGX,EAAaE,CAAM,CAAC,GAAGS,EAAaP,GAAU,CAAC,EAC9D,EAGF,MAAMQ,EAAcD,EAAaP,EAC3BS,EAAiB,IAAI,KAAK,aAAaZ,EAAkBC,CAAM,EAAG,CACtE,MAAO,SACT,CAAC,EACKY,EAAWF,EAAcC,EAAe,QAAQF,EAAaP,GAAUO,CAAU,EAAI,KAErFI,EAAQZ,EAAY,CAAE,OAAAC,EAAQ,aAAAC,EAAc,OAAAH,EAAQ,oBAAAM,CAAoB,CAAC,EACzEQ,EAAYJ,EACdT,EAAY,CACV,OAAQQ,EACR,aAAAN,EACA,OAAAH,EACA,sBAAAI,EACA,sBAAAC,EACA,oBAAAC,CACF,CAAC,EACD,OAEJ,MAAO,CAAE,MAAAO,EAAO,UAAAC,EAAW,SAAAF,CAAS,CACtC",
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-useless-escape */\nexport const PRICE_SYMBOL = {\n us: '$',\n uk: '\u00A3',\n ca: '$',\n eu: '\u20AC',\n fr: '\u20AC',\n de: '\u20AC',\n vn: '\u20AB',\n cl: '$',\n sg: '$',\n ae: 'AED',\n} as any\n\nexport const languageTerritory = (locale: string) =>\n // https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_territory_information.html\n ({\n us: 'en-us',\n uk: 'en-gb',\n ca: 'en-ca',\n au: 'en-au',\n eu: 'en',\n fr: 'de-DE',\n 'eu-fr': 'de-DE',\n de: 'de-de',\n vn: 'vi-vn',\n sg: 'en-sg',\n 'ae-en': 'ae-en',\n plus: 'en-us',\n cl: 'es-cl',\n 'eu-de': 'de-de',\n })[locale] || ''\n\nexport function formatPrice({\n amount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros = false,\n}: {\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n const formatCurrency = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'currency',\n currency: currencyCode || 'USD',\n minimumFractionDigits: maximumFractionDigits === 0 ? 0 : minimumFractionDigits,\n maximumFractionDigits,\n })\n\n let formattedValue = formatCurrency.format(amount)\n\n if (['eu-de', 'eu-en', 'de', 'eu'].includes(locale)) {\n formattedValue = formattedValue?.toString()?.replace(/[\\s]/g, '')\n }\n\n if (removeTrailingZeros) {\n // Adjust the regex to match comma as decimal separator\n formattedValue = formattedValue\n .replace(/(\\.\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\.0+\\b/, '')\n .replace(/(\\,\\d*?[1-9])0+\\b/, '$1')\n .replace(/\\,0+\\b/, '')\n }\n\n return formattedValue\n}\n\nexport function formatVariantPrice({\n amount,\n baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n}: {\n baseAmount: number\n amount: number\n currencyCode: string\n locale: string\n maximumFractionDigits?: number\n minimumFractionDigits?: number\n removeTrailingZeros?: boolean\n}) {\n if (typeof Intl === 'undefined') {\n return {\n price: `${PRICE_SYMBOL[locale]}${amount}`,\n basePrice: `${PRICE_SYMBOL[locale]}${baseAmount}`,\n discount: `${PRICE_SYMBOL[locale]}${baseAmount - amount || 0}`,\n }\n }\n\n const hasDiscount = baseAmount > amount\n const formatDiscount = new Intl.NumberFormat(languageTerritory(locale), {\n style: 'percent',\n })\n const discount = hasDiscount ? formatDiscount.format((baseAmount - amount) / baseAmount) : null\n\n const price = formatPrice({ amount, currencyCode, locale, removeTrailingZeros })\n const basePrice = hasDiscount\n ? formatPrice({\n amount: baseAmount,\n currencyCode,\n locale,\n maximumFractionDigits,\n minimumFractionDigits,\n removeTrailingZeros,\n })\n : undefined\n\n return { price, basePrice, discount }\n}\n"],
|
|
5
|
+
"mappings": "AACO,MAAMA,EAAe,CAC1B,GAAI,IACJ,GAAI,OACJ,GAAI,IACJ,GAAI,SACJ,GAAI,SACJ,GAAI,SACJ,GAAI,SACJ,GAAI,IACJ,GAAI,IACJ,GAAI,KACN,EAEaC,EAAqBC,IAE/B,CACC,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,KACJ,GAAI,QACJ,QAAS,QACT,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,QAAS,QACT,KAAM,QACN,GAAI,QACJ,QAAS,OACX,GAAGA,CAAM,GAAK,GAET,SAASC,EAAY,CAC1B,OAAAC,EACA,aAAAC,EACA,OAAAH,EACA,sBAAAI,EACA,sBAAAC,EACA,oBAAAC,EAAsB,EACxB,EAOG,CAQD,IAAIC,EAPmB,IAAI,KAAK,aAAaR,EAAkBC,CAAM,EAAG,CACtE,MAAO,WACP,SAAUG,GAAgB,MAC1B,sBAAuBC,IAA0B,EAAI,EAAIC,EACzD,sBAAAD,CACF,CAAC,EAEmC,OAAOF,CAAM,EAEjD,MAAI,CAAC,QAAS,QAAS,KAAM,IAAI,EAAE,SAASF,CAAM,IAChDO,EAAiBA,GAAgB,SAAS,GAAG,QAAQ,QAAS,EAAE,GAG9DD,IAEFC,EAAiBA,EACd,QAAQ,oBAAqB,IAAI,EACjC,QAAQ,SAAU,EAAE,EACpB,QAAQ,oBAAqB,IAAI,EACjC,QAAQ,SAAU,EAAE,GAGlBA,CACT,CAEO,SAASC,EAAmB,CACjC,OAAAN,EACA,WAAAO,EACA,aAAAN,EACA,OAAAH,EACA,sBAAAI,EACA,sBAAAC,EACA,oBAAAC,CACF,EAQG,CACD,GAAI,OAAO,KAAS,IAClB,MAAO,CACL,MAAO,GAAGR,EAAaE,CAAM,CAAC,GAAGE,CAAM,GACvC,UAAW,GAAGJ,EAAaE,CAAM,CAAC,GAAGS,CAAU,GAC/C,SAAU,GAAGX,EAAaE,CAAM,CAAC,GAAGS,EAAaP,GAAU,CAAC,EAC9D,EAGF,MAAMQ,EAAcD,EAAaP,EAC3BS,EAAiB,IAAI,KAAK,aAAaZ,EAAkBC,CAAM,EAAG,CACtE,MAAO,SACT,CAAC,EACKY,EAAWF,EAAcC,EAAe,QAAQF,EAAaP,GAAUO,CAAU,EAAI,KAErFI,EAAQZ,EAAY,CAAE,OAAAC,EAAQ,aAAAC,EAAc,OAAAH,EAAQ,oBAAAM,CAAoB,CAAC,EACzEQ,EAAYJ,EACdT,EAAY,CACV,OAAQQ,EACR,aAAAN,EACA,OAAAH,EACA,sBAAAI,EACA,sBAAAC,EACA,oBAAAC,CACF,CAAC,EACD,OAEJ,MAAO,CAAE,MAAAO,EAAO,UAAAC,EAAW,SAAAF,CAAS,CACtC",
|
|
6
6
|
"names": ["PRICE_SYMBOL", "languageTerritory", "locale", "formatPrice", "amount", "currencyCode", "maximumFractionDigits", "minimumFractionDigits", "removeTrailingZeros", "formattedValue", "formatVariantPrice", "baseAmount", "hasDiscount", "formatDiscount", "discount", "price", "basePrice"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as D}from"react/jsx-runtime";import l,{useImperativeHandle as q,useRef as i,useEffect as B}from"react";import"@gsap/react";import{gsap as h}from"gsap";import{SplitText as G}from"gsap/dist/SplitText";import{ScrollTrigger as H}from"gsap/dist/ScrollTrigger";import{cn as p}from"../../helpers/utils.js";import{Heading as J,Text as K}from"../../components/index.js";import{withLayout as O}from"../../shared/Styles.js";import{useInView as Q}from"react-intersection-observer";import{useExposure as W}from"../../hooks/useExposure.js";const X="copy",Z="brand_slogan";function tt(f=[],m=3){const g=[];for(let
|
|
1
|
+
"use client";import{jsx as n,jsxs as D}from"react/jsx-runtime";import l,{useImperativeHandle as q,useRef as i,useEffect as B}from"react";import"@gsap/react";import{gsap as h}from"gsap";import{SplitText as G}from"gsap/dist/SplitText";import{ScrollTrigger as H}from"gsap/dist/ScrollTrigger";import{cn as p}from"../../helpers/utils.js";import{Heading as J,Text as K}from"../../components/index.js";import{withLayout as O}from"../../shared/Styles.js";import{useInView as Q}from"react-intersection-observer";import{useExposure as W}from"../../hooks/useExposure.js";const X="copy",Z="brand_slogan";function tt(f=[],m=3){const g=[];for(let e=0;e<f.length;e+=m)g.push(f.slice(e,e+m));return g}const z=l.forwardRef(({data:f,className:m=""},g)=>{const{title:e,features:o=[],featureChunkSize:N=3}=f,[v,k]=l.useState(0),[P,w]=l.useState(!0),y=i(null),T=i(null),b=i(null),d=tt(o,N),E=d.length,a=o.length>N,j=a?[...d,d[0]]:d,S=40;q(g,()=>y.current);const{ref:C,inView:I}=Q();W(y,{componentType:X,componentName:Z,componentTitle:e}),l.useEffect(()=>{if(!a)return;const t=setInterval(()=>{k(r=>r+1),w(!0)},3e3);return()=>clearInterval(t)},[E,a]),l.useEffect(()=>{if(a)if(v===E){const t=setTimeout(()=>{w(!1),k(0)},500);return()=>clearTimeout(t)}else w(!0)},[v,E,a]);const c=i(null),M=i(null),x=i(null);return B(()=>{h.registerPlugin(H,G);function t(){if(!c.current)return;x.current=new G(c.current,{type:"words",wordsClass:"word"});const r=c.current?.clientHeight||100,u=x.current.words;h.set(u,{opacity:0}),T.current=H.create({trigger:c.current,start:"bottom bottom-=4%",end:`bottom+=${r*1.5}px bottom-=4%`,scrub:!0,onUpdate:s=>{const V=s.progress,L=u.length,A=1/L,$=.5;u.forEach((F,U)=>{const Y=U/L*(1-$),_=A*(1+$);let R=(V-Y)/_;R=Math.max(0,Math.min(R,1)),h.set(F,{opacity:R})})}}),o&&o.length>0&&(b.current=H.create({trigger:M.current,start:`bottom+=${r*2}px bottom-=6%`,end:`bottom+=${r*2+100}px bottom-=6%`,onUpdate:s=>{h.set(M.current,{opacity:s.progress})}}))}return I&&t(),setTimeout(()=>{t()},1e3),()=>{x.current&&x.current.revert(),T.current&&T.current.kill(),b.current&&b.current.kill()}},[I]),n("div",{ref:C,children:D("div",{ref:y,className:p("slogan-container 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",m),children:[n(J,{ref:c,as:"h2",size:2,weight:"bold",align:"left",className:p("slogan-title laptop:text-[40px] desktop:text-[48px] lg-desktop:text-[64px] text-[40px] !leading-none"),html:e}),o&&o.length>0&&n("div",{className:p("relative w-full max-w-[500px] overflow-hidden",`tablet:h-[${S}px]`),children:n("div",{className:p(["flex flex-col",P?"transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]":"!transition-none"]),style:{transform:`translateY(-${v*S}px)`},children:j.map((t,r)=>n("div",{className:p("laptop:justify-end flex w-full flex-row items-stretch gap-3 overflow-hidden",`tablet:h-[${S}px]`),children:t.map((u,s)=>D(l.Fragment,{children:[s>0&&n("div",{className:"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]"}),n(K,{size:3,align:"left",as:"p",className:"slogan-feature-text laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]",html:u.title})]},s))},r))})})]})})});z.displayName="Slogan";var ft=O(z);export{Z as componentName,X as componentType,ft as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Slogan/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useEffect } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\nimport { useInView } from 'react-intersection-observer'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nexport const componentType = 'copy'\nexport const componentName = 'brand_slogan'\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 } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const innerRef = useRef<HTMLDivElement>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const featuresTriggerRef = useRef<ScrollTrigger | null>(null)\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 useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n const { ref: inViewRef, inView } = useInView()\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef<HTMLHeadingElement>(null)\n const featuresRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n\n useEffect(() => {\n gsap.registerPlugin(ScrollTrigger, SplitText)\n\n function gsapResize() {\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 scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n\n if (features && features.length > 0) {\n featuresTriggerRef.current = ScrollTrigger.create({\n trigger: featuresRef.current,\n start: `bottom+=${height * 2}px bottom-=6%`,\n end: `bottom+=${height * 2 + 100}px bottom-=6%`,\n onUpdate: (self: any) => {\n gsap.set(featuresRef.current, { opacity: self.progress })\n },\n })\n }\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n featuresTriggerRef.current && featuresTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div ref={inViewRef}>\n <div\n ref={innerRef}\n className={cn(\n 'slogan-container 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 html={title}\n />\n {features && features.length > 0 && (\n <div className={cn('relative w-full max-w-[500px] overflow-hidden', `tablet:h-[${groupHeight}px]`)}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning\n ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]'\n : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className={cn(\n 'laptop:justify-end flex w-full flex-row items-stretch gap-3 overflow-hidden',\n `tablet:h-[${groupHeight}px]`\n )}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]\" />}\n <Text\n size={3}\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withLayout(Slogan)\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useEffect } from 'react'\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { SloganProps } from './types.js'\nimport { useInView } from 'react-intersection-observer'\nimport { useExposure } from '../../hooks/useExposure.js'\n\nexport const componentType = 'copy'\nexport const componentName = 'brand_slogan'\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 } = data\n const [groupIndex, setGroupIndex] = React.useState(0)\n const [isTransitioning, setIsTransitioning] = React.useState(true)\n const innerRef = useRef<HTMLDivElement>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const featuresTriggerRef = useRef<ScrollTrigger | null>(null)\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 useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n const { ref: inViewRef, inView } = useInView()\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u542F\u7528\u5B9A\u65F6\u5668\n React.useEffect(() => {\n if (!needCarousel) return\n const timer = setInterval(() => {\n setGroupIndex(i => i + 1)\n setIsTransitioning(true)\n }, 3000)\n return () => clearInterval(timer)\n }, [totalGroups, needCarousel])\n\n // \u53EA\u5728\u9700\u8981\u8F6E\u64AD\u65F6\u5904\u7406\u65E0\u7F1D\u8DF3\u8F6C\n React.useEffect(() => {\n if (!needCarousel) return\n if (groupIndex === totalGroups) {\n const handle = setTimeout(() => {\n setIsTransitioning(false)\n setGroupIndex(0)\n }, 500) // 500ms\u7B49\u4E8E\u52A8\u753B\u65F6\u957F\n return () => clearTimeout(handle)\n } else {\n setIsTransitioning(true)\n }\n }, [groupIndex, totalGroups, needCarousel])\n\n // \u6807\u9898\u52A8\u753B\u903B\u8F91\u4FDD\u6301\u4E0D\u53D8\n const titleRef = useRef<HTMLHeadingElement>(null)\n const featuresRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n\n useEffect(() => {\n gsap.registerPlugin(ScrollTrigger, SplitText)\n\n function gsapResize() {\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 scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n\n if (features && features.length > 0) {\n featuresTriggerRef.current = ScrollTrigger.create({\n trigger: featuresRef.current,\n start: `bottom+=${height * 2}px bottom-=6%`,\n end: `bottom+=${height * 2 + 100}px bottom-=6%`,\n onUpdate: (self: any) => {\n gsap.set(featuresRef.current, { opacity: self.progress })\n },\n })\n }\n }\n\n if (inView) {\n gsapResize()\n }\n\n setTimeout(() => {\n gsapResize()\n }, 1000)\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: any) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n featuresTriggerRef.current && featuresTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n <div ref={inViewRef}>\n <div\n ref={innerRef}\n className={cn(\n 'slogan-container 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 html={title}\n />\n {features && features.length > 0 && (\n <div className={cn('relative w-full max-w-[500px] overflow-hidden', `tablet:h-[${groupHeight}px]`)}>\n <div\n className={cn([\n 'flex flex-col',\n isTransitioning\n ? 'transition-transform duration-500 ease-[cubic-bezier(.4,0,.2,1)]'\n : '!transition-none',\n ])}\n style={{\n transform: `translateY(-${groupIndex * groupHeight}px)`,\n }}\n >\n {displayGroups.map((group, idx) => (\n <div\n className={cn(\n 'laptop:justify-end flex w-full flex-row items-stretch gap-3 overflow-hidden',\n `tablet:h-[${groupHeight}px]`\n )}\n key={idx}\n >\n {group.map((feature, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"slogan-feature-divider w-px self-stretch bg-[#E4E5E6]\" />}\n <Text\n size={3}\n align=\"left\"\n as=\"p\"\n className=\"slogan-feature-text laptop:text-[14px] line-clamp-3 text-[12px] leading-[1.4]\"\n html={feature.title}\n />\n </React.Fragment>\n ))}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n </div>\n )\n})\n\nSlogan.displayName = 'Slogan'\n\nexport default withLayout(Slogan)\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useEffect", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "Text", "withLayout", "useInView", "useExposure", "componentType", "componentName", "chunkArray", "array", "size", "result", "i", "Slogan", "data", "className", "ref", "title", "features", "featureChunkSize", "groupIndex", "setGroupIndex", "isTransitioning", "setIsTransitioning", "innerRef", "scrollTriggerRef", "featuresTriggerRef", "featuresGroups", "totalGroups", "needCarousel", "displayGroups", "groupHeight", "inViewRef", "inView", "timer", "handle", "titleRef", "featuresRef", "splitTextInstance", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "start", "width", "opacity", "group", "idx", "feature", "index", "Slogan_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscribe 订阅模块
|
|
3
|
+
* @param subscribeMetadata 订阅模块数据
|
|
4
|
+
* @param onSubmit 提交事件
|
|
5
|
+
* @param className 类名
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
declare const Subscribe: ({ subscribeMetadata, onSubmit, className, }: {
|
|
9
|
+
subscribeMetadata: any;
|
|
10
|
+
onSubmit?: (formData: FormData) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default Subscribe;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as t,jsxs as l}from"react/jsx-runtime";import{useState as p}from"react";import{Text as a,Checkbox as x}from"../../components/index.js";import{cn as g}from"../../helpers/utils.js";const u=({subscribeMetadata:e,onSubmit:c,className:f})=>{const[r,o]=p(null),[n,d]=p(null),b=s=>{s.preventDefault();const m=new FormData(s.target),i=m.get("email"),h=m.get("terms");if(!i){o(e?.emptyError);return}if(!/^[a-zA-Z0-9.,%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(i)){o(e?.formatError);return}if(!h){d(e?.termsError);return}c?.(m)};return l("div",{className:g("laptop:flex-row laptop:gap-4 desktop:flex-col desktop:gap-8 flex flex-col gap-4",f),children:[l("div",{children:[t(a,{as:"p",html:e?.title,className:"desktop:text-base text-sm font-bold leading-[1.4] text-white"}),t(a,{as:"p",html:e?.subtitle,className:"desktop:mt-2 desktop:text-[32px] mt-1 text-2xl font-bold leading-[1.2] text-white"})]}),l("form",{onSubmit:b,children:[l("div",{className:"desktop:h-[48px] flex h-[38px] items-center",children:[t("input",{name:"email",onFocus:()=>o(null),placeholder:e?.placeholder,className:"desktop:text-base tablet:max-w-[320px] laptop:max-w-none h-full flex-1 border border-[#B6B6BA] bg-transparent px-4 text-sm font-bold leading-[1.2] text-white"}),t("button",{type:"submit",className:"desktop:px-7 desktop:text-base h-full rounded-none bg-white px-5 text-sm font-bold leading-[1.2] text-black",children:t(a,{html:e?.button,className:"text-base font-bold leading-[1.2]"})})]}),r&&t(a,{as:"p",html:r,className:"mt-2 text-base font-bold leading-[1.2] text-red-500"}),l("div",{className:"mt-4 flex flex-col gap-2",children:[l("div",{className:"flex items-start gap-2",children:[t(x,{name:"terms",id:"terms",size:"base",onCheckedChange:s=>s&&d(null),className:"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]"}),t("label",{htmlFor:"terms",children:t(a,{as:"p",html:e?.terms,className:"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]"})})]}),n&&t(a,{as:"p",html:n,className:"text-base font-bold leading-[1.2] text-red-500"}),l("div",{className:"flex items-start gap-2",children:[t(x,{name:"news",id:"news",size:"base",className:"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]"}),t("label",{htmlFor:"news",children:t(a,{as:"p",html:e?.news,className:"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]"})})]})]})]})]})};var w=u;export{w as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/Subscribe/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { useState } from 'react'\nimport { Text, Checkbox } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\n\n/**\n * Subscribe \u8BA2\u9605\u6A21\u5757\n * @param subscribeMetadata \u8BA2\u9605\u6A21\u5757\u6570\u636E\n * @param onSubmit \u63D0\u4EA4\u4E8B\u4EF6\n * @param className \u7C7B\u540D\n * @returns\n */\nconst Subscribe = ({\n subscribeMetadata,\n onSubmit,\n className,\n}: {\n subscribeMetadata: any\n onSubmit?: (formData: FormData) => void\n className?: string\n}) => {\n const [error, setError] = useState<string | null>(null)\n const [termsError, setTermsError] = useState<string | null>(null)\n\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const formData = new FormData(e.target as HTMLFormElement)\n const email = formData.get('email')\n const terms = formData.get('terms')\n if (!email) {\n setError(subscribeMetadata?.emptyError)\n return\n }\n if (!/^[a-zA-Z0-9.,%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/.test(email as string)) {\n setError(subscribeMetadata?.formatError)\n return\n }\n if (!terms) {\n setTermsError(subscribeMetadata?.termsError)\n return\n }\n onSubmit?.(formData)\n }\n\n return (\n <div className={cn('laptop:flex-row laptop:gap-4 desktop:flex-col desktop:gap-8 flex flex-col gap-4', className)}>\n <div>\n <Text\n as=\"p\"\n html={subscribeMetadata?.title}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-white\"\n />\n <Text\n as=\"p\"\n html={subscribeMetadata?.subtitle}\n className=\"desktop:mt-2 desktop:text-[32px] mt-1 text-2xl font-bold leading-[1.2] text-white\"\n />\n </div>\n <form onSubmit={handleSubmit}>\n <div className=\"desktop:h-[48px] flex h-[38px] items-center\">\n <input\n name=\"email\"\n onFocus={() => setError(null)}\n placeholder={subscribeMetadata?.placeholder}\n className=\"desktop:text-base tablet:max-w-[320px] laptop:max-w-none h-full flex-1 border border-[#B6B6BA] bg-transparent px-4 text-sm font-bold leading-[1.2] text-white\"\n />\n <button\n type=\"submit\"\n className=\"desktop:px-7 desktop:text-base h-full rounded-none bg-white px-5 text-sm font-bold leading-[1.2] text-black\"\n >\n <Text html={subscribeMetadata?.button} className=\"text-base font-bold leading-[1.2]\" />\n </button>\n </div>\n {error && <Text as=\"p\" html={error} className=\"mt-2 text-base font-bold leading-[1.2] text-red-500\" />}\n <div className=\"mt-4 flex flex-col gap-2\">\n <div className=\"flex items-start gap-2\">\n <Checkbox\n name=\"terms\"\n id=\"terms\"\n size=\"base\"\n onCheckedChange={(checked: boolean) => checked && setTermsError(null)}\n className=\"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]\"\n />\n <label htmlFor=\"terms\">\n <Text\n as=\"p\"\n html={subscribeMetadata?.terms}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]\"\n />\n </label>\n </div>\n {termsError && <Text as=\"p\" html={termsError} className=\"text-base font-bold leading-[1.2] text-red-500\" />}\n <div className=\"flex items-start gap-2\">\n <Checkbox\n name=\"news\"\n id=\"news\"\n size=\"base\"\n className=\"border-[#B6B6BA] data-[state=checked]:bg-white data-[state=checked]:text-[#1D1D1F]\"\n />\n <label htmlFor=\"news\">\n <Text\n as=\"p\"\n html={subscribeMetadata?.news}\n className=\"desktop:text-base text-sm font-bold leading-[1.4] text-[#B6B6BA]\"\n />\n </label>\n </div>\n </div>\n </form>\n </div>\n )\n}\n\nexport default Subscribe\n"],
|
|
5
|
+
"mappings": "AA6CM,OACE,OAAAA,EADF,QAAAC,MAAA,oBA7CN,OAAgB,YAAAC,MAAgB,QAChC,OAAS,QAAAC,EAAM,YAAAC,MAAgB,4BAC/B,OAAS,MAAAC,MAAU,yBASnB,MAAMC,EAAY,CAAC,CACjB,kBAAAC,EACA,SAAAC,EACA,UAAAC,CACF,IAIM,CACJ,KAAM,CAACC,EAAOC,CAAQ,EAAIT,EAAwB,IAAI,EAChD,CAACU,EAAYC,CAAa,EAAIX,EAAwB,IAAI,EAE1DY,EAAgBC,GAAwC,CAC5DA,EAAE,eAAe,EACjB,MAAMC,EAAW,IAAI,SAASD,EAAE,MAAyB,EACnDE,EAAQD,EAAS,IAAI,OAAO,EAC5BE,EAAQF,EAAS,IAAI,OAAO,EAClC,GAAI,CAACC,EAAO,CACVN,EAASJ,GAAmB,UAAU,EACtC,MACF,CACA,GAAI,CAAC,mDAAmD,KAAKU,CAAe,EAAG,CAC7EN,EAASJ,GAAmB,WAAW,EACvC,MACF,CACA,GAAI,CAACW,EAAO,CACVL,EAAcN,GAAmB,UAAU,EAC3C,MACF,CACAC,IAAWQ,CAAQ,CACrB,EAEA,OACEf,EAAC,OAAI,UAAWI,EAAG,kFAAmFI,CAAS,EAC7G,UAAAR,EAAC,OACC,UAAAD,EAACG,EAAA,CACC,GAAG,IACH,KAAMI,GAAmB,MACzB,UAAU,+DACZ,EACAP,EAACG,EAAA,CACC,GAAG,IACH,KAAMI,GAAmB,SACzB,UAAU,oFACZ,GACF,EACAN,EAAC,QAAK,SAAUa,EACd,UAAAb,EAAC,OAAI,UAAU,8CACb,UAAAD,EAAC,SACC,KAAK,QACL,QAAS,IAAMW,EAAS,IAAI,EAC5B,YAAaJ,GAAmB,YAChC,UAAU,gKACZ,EACAP,EAAC,UACC,KAAK,SACL,UAAU,8GAEV,SAAAA,EAACG,EAAA,CAAK,KAAMI,GAAmB,OAAQ,UAAU,oCAAoC,EACvF,GACF,EACCG,GAASV,EAACG,EAAA,CAAK,GAAG,IAAI,KAAMO,EAAO,UAAU,sDAAsD,EACpGT,EAAC,OAAI,UAAU,2BACb,UAAAA,EAAC,OAAI,UAAU,yBACb,UAAAD,EAACI,EAAA,CACC,KAAK,QACL,GAAG,QACH,KAAK,OACL,gBAAkBe,GAAqBA,GAAWN,EAAc,IAAI,EACpE,UAAU,qFACZ,EACAb,EAAC,SAAM,QAAQ,QACb,SAAAA,EAACG,EAAA,CACC,GAAG,IACH,KAAMI,GAAmB,MACzB,UAAU,mEACZ,EACF,GACF,EACCK,GAAcZ,EAACG,EAAA,CAAK,GAAG,IAAI,KAAMS,EAAY,UAAU,iDAAiD,EACzGX,EAAC,OAAI,UAAU,yBACb,UAAAD,EAACI,EAAA,CACC,KAAK,OACL,GAAG,OACH,KAAK,OACL,UAAU,qFACZ,EACAJ,EAAC,SAAM,QAAQ,OACb,SAAAA,EAACG,EAAA,CACC,GAAG,IACH,KAAMI,GAAmB,KACzB,UAAU,mEACZ,EACF,GACF,GACF,GACF,GACF,CAEJ,EAEA,IAAOa,EAAQd",
|
|
6
|
+
"names": ["jsx", "jsxs", "useState", "Text", "Checkbox", "cn", "Subscribe", "subscribeMetadata", "onSubmit", "className", "error", "setError", "termsError", "setTermsError", "handleSubmit", "e", "formData", "email", "terms", "checked", "Subscribe_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Img } from '../../types/props.js';
|
|
2
|
+
export type TextModalType = {
|
|
3
|
+
textVisible: boolean;
|
|
4
|
+
extension?: {
|
|
5
|
+
textPcImg: Img;
|
|
6
|
+
textMobileImg: Img;
|
|
7
|
+
textTitle: string;
|
|
8
|
+
text: string;
|
|
9
|
+
textDesc: string;
|
|
10
|
+
};
|
|
11
|
+
onCloseModal: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const TextModal: (props: TextModalType) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { TextModal };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Dialog as x,DialogContent as p}from"../../components/dialog.js";import{Picture as n,Text as l}from"../../components/index.js";import"../../helpers/index.js";const m=a=>{const{textVisible:s,extension:e,onCloseModal:i}=a;return t(x,{open:s,onOpenChange:()=>i(),children:t(p,{className:" tablet:max-h-[535px] tablet:max-w-[896px] md-tablet:h-[490px] md-tablet:w-[358px] tablet:rounded-2xl mx-auto rounded-lg border-none bg-white p-0 [&_button]:hidden",children:o("div",{className:" relative",children:[t(n,{source:`${e?.textPcImg?.url||""} , ${e?.textMobileImg?.url||""} 767`,className:" w-full",imgClassName:" object-cover"}),t("div",{className:" tablet:inset-x-[32px] tablet:top-[32px] absolute inset-x-[16px] top-[16px]",children:o("div",{className:"flex items-center justify-between text-white",children:[t(l,{html:e?.textTitle,className:"tablet:text-[24px] text-[20px] font-bold leading-[1.2]"}),t("div",{onClick:()=>i(),className:" cursor-pointer",children:t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:t("g",{"clip-path":"url(#clip0_2548_10038)",children:t("path",{d:"M5.63545 6.13604C6.02592 5.74546 6.65913 5.74551 7.04966 6.13604L11.9994 11.0858L16.9492 6.13604C17.3397 5.74552 17.9729 5.74546 18.3634 6.13604C18.7538 6.52659 18.7538 7.15972 18.3634 7.55025L13.4136 12.5L18.3634 17.4497C18.7538 17.8403 18.7538 18.4734 18.3634 18.864C17.9729 19.2545 17.3397 19.2545 16.9492 18.864L11.9994 13.9142L7.04966 18.864C6.65913 19.2545 6.02592 19.2545 5.63545 18.864C5.24501 18.4734 5.24502 17.8403 5.63545 17.4497L10.5852 12.5L5.63545 7.55025C5.24502 7.15972 5.24501 6.52658 5.63545 6.13604Z",fill:"white"})})})})]})}),o("div",{className:"tablet:p-[32px] p-[16px] text-[#1D1D1F]",children:[t(l,{html:e?.text,className:" tablet:text-[24px] text-[20px] font-bold leading-[1.2]"}),t("br",{}),t(l,{html:e?.textDesc,className:"tablet:leading-[1.2] pt-1 text-[16px] font-bold leading-[1.4]"})]})]})})})};export{m as TextModal};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/TextModal/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { Media } from '../../types/props.js'\nimport { Dialog, DialogContent } from '../../components/dialog.js'\nimport { Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/index.js'\nimport type { Img } from '../../types/props.js'\n\nexport type TextModalType = {\n textVisible: boolean\n extension?: {\n textPcImg: Img\n textMobileImg: Img\n textTitle: string\n text: string\n textDesc: string\n }\n onCloseModal: () => void\n}\n\nconst TextModal = (props: TextModalType) => {\n const { textVisible, extension, onCloseModal } = props\n\n return (\n <Dialog open={textVisible} onOpenChange={() => onCloseModal()}>\n <DialogContent className=\" tablet:max-h-[535px] tablet:max-w-[896px] md-tablet:h-[490px] md-tablet:w-[358px] tablet:rounded-2xl mx-auto rounded-lg border-none bg-white p-0 [&_button]:hidden\">\n <div className=\" relative\">\n <Picture\n source={`${extension?.textPcImg?.url || ''} , ${extension?.textMobileImg?.url || ''} 767`}\n className=\" w-full\"\n imgClassName=\" object-cover\"\n />\n <div className=\" tablet:inset-x-[32px] tablet:top-[32px] absolute inset-x-[16px] top-[16px]\">\n <div className=\"flex items-center justify-between text-white\">\n <Text html={extension?.textTitle} className=\"tablet:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <div onClick={() => onCloseModal()} className=\" cursor-pointer\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"25\" viewBox=\"0 0 24 25\" fill=\"none\">\n <g clip-path=\"url(#clip0_2548_10038)\">\n <path\n d=\"M5.63545 6.13604C6.02592 5.74546 6.65913 5.74551 7.04966 6.13604L11.9994 11.0858L16.9492 6.13604C17.3397 5.74552 17.9729 5.74546 18.3634 6.13604C18.7538 6.52659 18.7538 7.15972 18.3634 7.55025L13.4136 12.5L18.3634 17.4497C18.7538 17.8403 18.7538 18.4734 18.3634 18.864C17.9729 19.2545 17.3397 19.2545 16.9492 18.864L11.9994 13.9142L7.04966 18.864C6.65913 19.2545 6.02592 19.2545 5.63545 18.864C5.24501 18.4734 5.24502 17.8403 5.63545 17.4497L10.5852 12.5L5.63545 7.55025C5.24502 7.15972 5.24501 6.52658 5.63545 6.13604Z\"\n fill=\"white\"\n />\n </g>\n </svg>\n </div>\n </div>\n </div>\n <div className=\"tablet:p-[32px] p-[16px] text-[#1D1D1F]\">\n <Text html={extension?.text} className=\" tablet:text-[24px] text-[20px] font-bold leading-[1.2]\" />\n <br />\n <Text\n html={extension?.textDesc}\n className=\"tablet:leading-[1.2] pt-1 text-[16px] font-bold leading-[1.4]\"\n />\n </div>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n\nexport { TextModal }\n"],
|
|
5
|
+
"mappings": "AAyBU,cAAAA,EAME,QAAAC,MANF,oBAxBV,OAAS,UAAAC,EAAQ,iBAAAC,MAAqB,6BACtC,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,MAAmB,yBAenB,MAAMC,EAAaC,GAAyB,CAC1C,KAAM,CAAE,YAAAC,EAAa,UAAAC,EAAW,aAAAC,CAAa,EAAIH,EAEjD,OACEP,EAACE,EAAA,CAAO,KAAMM,EAAa,aAAc,IAAME,EAAa,EAC1D,SAAAV,EAACG,EAAA,CAAc,UAAU,sKACvB,SAAAF,EAAC,OAAI,UAAU,YACb,UAAAD,EAACI,EAAA,CACC,OAAQ,GAAGK,GAAW,WAAW,KAAO,EAAE,MAAMA,GAAW,eAAe,KAAO,EAAE,OACnF,UAAU,UACV,aAAa,gBACf,EACAT,EAAC,OAAI,UAAU,8EACb,SAAAC,EAAC,OAAI,UAAU,+CACb,UAAAD,EAACK,EAAA,CAAK,KAAMI,GAAW,UAAW,UAAU,yDAAyD,EACrGT,EAAC,OAAI,QAAS,IAAMU,EAAa,EAAG,UAAU,kBAC5C,SAAAV,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,SAAAA,EAAC,KAAE,YAAU,yBACX,SAAAA,EAAC,QACC,EAAE,0gBACF,KAAK,QACP,EACF,EACF,EACF,GACF,EACF,EACAC,EAAC,OAAI,UAAU,0CACb,UAAAD,EAACK,EAAA,CAAK,KAAMI,GAAW,KAAM,UAAU,0DAA0D,EACjGT,EAAC,OAAG,EACJA,EAACK,EAAA,CACC,KAAMI,GAAW,SACjB,UAAU,gEACZ,GACF,GACF,EACF,EACF,CAEJ",
|
|
6
|
+
"names": ["jsx", "jsxs", "Dialog", "DialogContent", "Picture", "Text", "TextModal", "props", "textVisible", "extension", "onCloseModal"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as n,jsxs as b}from"react/jsx-runtime";import z,{useEffect as U,useRef as r,useImperativeHandle as j}from"react";import{gsap as c}from"gsap";import{SplitText as w}from"gsap/dist/SplitText";import{ScrollTrigger as x}from"gsap/dist/ScrollTrigger";import{cn as v}from"../../helpers/utils.js";import{Heading as B}from"../../components/index.js";import{withLayout as C}from"../../shared/Styles.js";import{useExposure as F}from"../../hooks/useExposure.js";import{trackUrlRef as _}from"../../shared/trackUrlRef.js";import{useInView as q}from"react-intersection-observer";const T="link",k="title",y=z.forwardRef(({data:m,className:L},R)=>{const{title:p,caption:u,theme:f,extensions:o}=m,i=r(null),t=r(null),e=r(null),s=r(null),{ref:H,inView:d}=q();return j(R,()=>i.current),F(i,{componentType:T,componentName:k,componentTitle:m?.title}),U(()=>{c.registerPlugin(w,x);function E(){if(!t.current)return;const M=t.current?.clientHeight||80;e.current=new w(t.current,{type:"words",wordsClass:"word"});const l=e.current.words;c.set(l,{opacity:0}),s.current=x.create({trigger:t.current,start:"bottom bottom-=4%",end:`bottom+=${M*1.5+60}px bottom-=4%`,scrub:!0,onUpdate:N=>{const D=N.progress,g=l.length,S=1/g,h=.5;l.forEach((I,P)=>{const V=P/g*(1-h),$=S*(1+h);let a=(D-V)/$;a=Math.max(0,Math.min(a,1)),c.set(I,{opacity:a})})}})}return d&&E(),()=>{e.current&&e.current.revert(),s.current&&s.current.kill()}},[d]),(p||u)&&b("div",{className:"mb-6 flex items-end justify-between overflow-hidden",ref:i,children:[n("div",{ref:H,className:v("space-y-4 flex-1",L,{"aiui-dark":f==="dark"}),children:n(B,{ref:t,as:"h2",size:4,html:u||p})}),o?.textLink&&b("a",{className:v({"aiui-dark":f==="dark"},"flex items-center text-base font-[700] leading-[1.4] text-[#777] transition-all duration-[0.4s] hover:text-[#1D1D1F]"),href:_(o?.link,`${T}_${k}`),children:[o?.textLink,n("svg",{width:"24",height:"24",className:"mb-[3px]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:n("path",{className:"transition-all duration-[0.4s]",d:"M10.5 8L14.5 12L10.5 16",stroke:"#777","stroke-width":"1.5","stroke-linecap":"round"})})]})]})});y.displayName="Title";var tt=C(y);export{tt as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Title/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className }, ref) => {\n const { title, theme,
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "useEffect", "useRef", "useImperativeHandle", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "withLayout", "useExposure", "trackUrlRef", "useInView", "componentType", "componentName", "Title", "data", "className", "ref", "title", "theme", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useEffect, useRef, useImperativeHandle } from 'react'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\nimport { cn } from '../../helpers/utils.js'\nimport { Heading } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { TitleProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useInView } from 'react-intersection-observer'\n\nconst componentType = 'link'\nconst componentName = 'title'\n\nconst Title = React.forwardRef<HTMLDivElement, TitleProps>(({ data, className }, ref) => {\n const { title, caption, theme, extensions } = data\n const innerRef = useRef<HTMLDivElement>(null)\n const titleRef = useRef<HTMLHeadingElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: data?.title,\n })\n\n useEffect(() => {\n gsap.registerPlugin(SplitText, ScrollTrigger)\n function gsapResize() {\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 scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom-=4%',\n end: `bottom+=${height * 1.5 + 60}px bottom-=4%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n },\n })\n }\n\n if (inView) {\n gsapResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n }\n }, [inView])\n\n return (\n (title || caption) && (\n <div className=\"mb-6 flex items-end justify-between overflow-hidden\" ref={innerRef}>\n <div ref={inViewRef} className={cn('space-y-4 flex-1', className, { 'aiui-dark': theme === 'dark' })}>\n <Heading ref={titleRef} as=\"h2\" size={4} html={caption || title} />\n </div>\n {extensions?.textLink && (\n <a\n className={cn(\n { 'aiui-dark': theme === 'dark' },\n 'flex items-center text-base font-[700] leading-[1.4] text-[#777] transition-all duration-[0.4s] hover:text-[#1D1D1F]'\n )}\n href={trackUrlRef(extensions?.link, `${componentType}_${componentName}`)}\n >\n {extensions?.textLink}\n <svg\n width=\"24\"\n height=\"24\"\n className=\"mb-[3px]\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n className=\"transition-all duration-[0.4s]\"\n d=\"M10.5 8L14.5 12L10.5 16\"\n stroke=\"#777\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n ></path>\n </svg>\n </a>\n )}\n </div>\n )\n )\n})\n\nTitle.displayName = 'Title'\n\nexport default withLayout(Title)\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["jsx", "jsxs", "React", "useEffect", "useRef", "useImperativeHandle", "gsap", "SplitText", "ScrollTrigger", "cn", "Heading", "withLayout", "useExposure", "trackUrlRef", "useInView", "componentType", "componentName", "Title", "data", "className", "ref", "title", "caption", "theme", "extensions", "innerRef", "titleRef", "splitTextInstance", "scrollTriggerRef", "inViewRef", "inView", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "Title_default"]
|
|
7
7
|
}
|
|
@@ -10,7 +10,8 @@ export interface TitleProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* 主标题
|
|
12
12
|
*/
|
|
13
|
-
title
|
|
13
|
+
title?: string;
|
|
14
|
+
caption?: string;
|
|
14
15
|
/**
|
|
15
16
|
* 特性列表,最多支持3个
|
|
16
17
|
*/
|
|
@@ -22,7 +23,7 @@ export interface TitleProps {
|
|
|
22
23
|
/**
|
|
23
24
|
* 扩展数据
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
+
extensions?: any;
|
|
26
27
|
};
|
|
27
28
|
/**
|
|
28
29
|
* 自定义类名
|
|
@@ -20,6 +20,10 @@ export { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/in
|
|
|
20
20
|
export type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js';
|
|
21
21
|
export { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js';
|
|
22
22
|
export type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js';
|
|
23
|
+
export { default as HeaderNavigation } from './HeaderNavigation/index.js';
|
|
24
|
+
export { default as FooterNavigation } from './FooterNavigation/index.js';
|
|
23
25
|
export { withLayout } from '../shared/Styles.js';
|
|
24
26
|
export { default as AiuiProvider } from './AiuiProvider/index.js';
|
|
25
27
|
export { default as Tabs } from './Tabs/index.js';
|
|
28
|
+
export { default as CreativeModule } from './CreativeModule/index.js';
|
|
29
|
+
export { default as GraphicOverlay } from './GraphicOverlay/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as r}from"./BrandEquity/index.js";import{default as o}from"./MemberEquity/index.js";import{default as l}from"./Slogan/index.js";import{default as u}from"./Title/index.js";import{default as
|
|
1
|
+
import{default as r}from"./BrandEquity/index.js";import{default as o}from"./MemberEquity/index.js";import{default as l}from"./Slogan/index.js";import{default as u}from"./Title/index.js";import{default as i}from"./Spacer/index.js";import{default as m}from"./ShelfDisplay/index.js";import{default as c}from"./Evaluate/index.js";import{default as y}from"./Category/index.js";import{default as h}from"./HeroBanner/index.js";import{default as G}from"./AccordionCards/index.js";import{default as q}from"./Graphic/index.js";import{default as C}from"./MediaPlayerBase/index.js";import{default as g}from"./MediaPlayerSticky/index.js";import{default as L}from"./MediaPlayerMulti/index.js";import{default as E}from"./Marquee/index.js";import{default as b}from"./WhyChoose/index.js";import{default as F}from"./Faq/index.js";import{MarqueeItem as I,MarqueeImageContent as N,MarqueeTextContent as w}from"./Marquee/index.js";import{default as O}from"./MultiLayoutGraphicBlock/index.js";import{default as z}from"./GraphicAttractionBlock/index.js";import{default as K}from"./HeaderNavigation/index.js";import{default as R}from"./FooterNavigation/index.js";import{withLayout as V}from"../shared/Styles.js";import{default as Y}from"./AiuiProvider/index.js";import{default as _}from"./Tabs/index.js";import{default as ee}from"./CreativeModule/index.js";import{default as re}from"./GraphicOverlay/index.js";export{G as AccordionCards,Y as AiuiProvider,r as BrandEquity,y as Category,ee as CreativeModule,c as Evaluate,F as Faq,R as FooterNavigation,q as Graphic,z as GraphicAttractionBlock,re as GraphicOverlay,K as HeaderNavigation,h as HeroBanner,E as Marquee,N as MarqueeImageContent,I as MarqueeItem,w as MarqueeTextContent,C as MediaPlayerBase,L as MediaPlayerMulti,g as MediaPlayerSticky,o as MemberEquity,O as MultiLayoutGraphicBlock,m as ShelfDisplay,l as Slogan,i as Spacer,_ as Tabs,u as Title,b as WhyChoose,V as withLayout};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/biz-components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\n"],
|
|
5
|
-
"mappings": "AAAA,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAAwB,mBACjC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA6B,wBACtC,OAAoB,WAAXA,MAAiC,4BAC1C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAAkC,6BAC3C,OAAoB,WAAXA,MAAoC,+BAC7C,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAA4B,uBACrC,OAAoB,WAAXA,MAAsB,iBAC/B,OAAS,eAAAC,EAAa,uBAAAC,EAAqB,sBAAAC,MAA0B,qBACrE,OAAoB,WAAXH,MAA0C,qCAEnD,OAAoB,WAAXA,MAAyC,oCAElD,OAAS,cAAAI,MAAkB,sBAC3B,OAAoB,WAAXJ,MAA+B,0BACxC,OAAoB,WAAXA,MAAuB",
|
|
4
|
+
"sourcesContent": ["export { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\n"],
|
|
5
|
+
"mappings": "AAAA,OAAoB,WAAXA,MAA8B,yBACvC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAAwB,mBACjC,OAAoB,WAAXA,MAAyB,oBAClC,OAAoB,WAAXA,MAA+B,0BACxC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA2B,sBACpC,OAAoB,WAAXA,MAA6B,wBACtC,OAAoB,WAAXA,MAAiC,4BAC1C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAAkC,6BAC3C,OAAoB,WAAXA,MAAoC,+BAC7C,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAA0B,qBACnC,OAAoB,WAAXA,MAA4B,uBACrC,OAAoB,WAAXA,MAAsB,iBAC/B,OAAS,eAAAC,EAAa,uBAAAC,EAAqB,sBAAAC,MAA0B,qBACrE,OAAoB,WAAXH,MAA0C,qCAEnD,OAAoB,WAAXA,MAAyC,oCAElD,OAAoB,WAAXA,MAAmC,8BAC5C,OAAoB,WAAXA,MAAmC,8BAE5C,OAAS,cAAAI,MAAkB,sBAC3B,OAAoB,WAAXJ,MAA+B,0BACxC,OAAoB,WAAXA,MAAuB,kBAChC,OAAoB,WAAXA,OAAiC,4BAC1C,OAAoB,WAAXA,OAAiC",
|
|
6
6
|
"names": ["default", "MarqueeItem", "MarqueeImageContent", "MarqueeTextContent", "withLayout"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as C,jsxs as t}from"react/jsx-runtime";import{Container as V}from"./container";const L=()=>C("div",{className:"relative z-[46] bg-[#1D1D1F] h-[30px]",children:C(V,{childClassName:"flex items-center justify-end",className:"h-full",children:C(e,{})})}),e=H=>t("svg",{width:"148",height:"10",viewBox:"0 0 148 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...H,children:[C("path",{d:"M88.5391 1.66872C90.8392 1.6688 92.7041 3.53461 92.7041 5.83474C92.7039 8.13468 90.839 9.9997 88.5391 9.99977C86.239 9.99977 84.3733 8.13473 84.373 5.83474C84.373 3.53456 86.2389 1.66872 88.5391 1.66872ZM106.479 1.66872C107.484 1.66872 108.407 2.02531 109.127 2.61892L109.477 1.86208H110.645V9.79958H109.477L109.13 9.0486C108.409 9.64225 107.486 9.99977 106.479 9.99977C104.179 9.99954 102.314 8.13458 102.313 5.83474C102.313 3.53471 104.179 1.66896 106.479 1.66872ZM126.684 1.66872C128.984 1.66872 130.849 3.53456 130.849 5.83474C130.848 8.13473 128.984 9.99977 126.684 9.99977C124.384 9.99972 122.519 8.13469 122.519 5.83474C122.519 3.5346 124.383 1.66878 126.684 1.66872ZM144.748 1.66188C146.602 1.66198 147.794 2.66292 147.823 4.20778H146.278C146.249 3.44345 145.631 3.04577 144.719 3.04567C143.806 3.04567 143.247 3.429 143.247 4.0027C143.247 4.7082 144.07 4.85598 145.026 5.0027L145.025 5.00173C146.365 5.23788 147.998 5.48784 147.998 7.44509C147.998 8.98988 146.716 9.99001 144.775 9.99001C142.834 9.98986 141.568 8.93061 141.524 7.28298H143.128C143.172 8.12086 143.878 8.54763 144.835 8.54763C145.703 8.5475 146.38 8.17982 146.38 7.51833C146.38 6.76851 145.527 6.5909 144.556 6.42946C143.232 6.20932 141.673 5.90104 141.673 4.0613C141.673 2.6337 142.893 1.66188 144.748 1.66188ZM115.1 1.85427H117.434V3.24685H115.102V6.85524C115.102 7.79295 115.614 8.32097 116.582 8.32106H117.478V9.80251L116.275 9.8406C114.545 9.84058 113.474 8.76932 113.474 7.02419V3.24685H112.285V2.93532L114.577 0.000751495H115.1V1.85427ZM63.7627 9.79958H62.1367V-0.000225067H63.7627V9.79958ZM97.5566 7.32302L100.108 1.85427H101.884L98.1787 9.79958H96.9355L93.2305 1.85427H95.0059L97.5566 7.32302ZM120.852 9.79958H119.226V3.24587H120.852V9.79958ZM67.8779 2.61892C68.6117 2.02787 69.5403 1.67165 70.5557 1.67165H70.5566C72.1803 1.67165 73.498 2.98838 73.498 4.61208V9.7986H71.8711V4.96462C71.8711 4.00413 71.0923 3.22462 70.1318 3.22438C68.9018 3.22438 67.9045 4.221 67.9043 5.45095V9.7986H66.2725V1.67165H67.4404L67.8779 2.61892ZM77.3252 2.61892C78.059 2.02789 78.9876 1.67165 80.0029 1.67165H80.0039C81.6276 1.67165 82.9443 2.98838 82.9443 4.61208V9.7986H81.3184V4.96462C81.3184 4.00399 80.5388 3.22438 79.5781 3.22438C78.3483 3.2246 77.3518 4.22113 77.3516 5.45095V9.7986H75.7197V1.67165H76.8877L77.3252 2.61892ZM133.85 1.67165L134.287 2.61892C135.021 2.02792 135.95 1.67173 136.965 1.67165H136.967C138.59 1.67181 139.907 2.98848 139.907 4.61208V9.7986H138.28V4.96462C138.28 4.00403 137.502 3.22446 136.541 3.22438C135.311 3.22438 134.315 4.221 134.314 5.45095V9.7986H132.683V1.67165H133.85ZM88.5391 3.29567C87.1368 3.29567 86 4.43248 86 5.83474C86.0002 7.23681 87.1369 8.3738 88.5391 8.3738C89.9411 8.37372 91.0779 7.23676 91.0781 5.83474C91.0781 4.43253 89.9412 3.29575 88.5391 3.29567ZM106.479 3.29567C105.076 3.29591 103.94 4.43263 103.94 5.83474C103.941 7.23666 105.077 8.37356 106.479 8.3738C107.881 8.3738 109.017 7.23681 109.018 5.83474C109.018 4.43248 107.881 3.29567 106.479 3.29567ZM126.684 3.29567C125.281 3.29573 124.145 4.43252 124.145 5.83474C124.145 7.23677 125.282 8.37374 126.684 8.3738C128.086 8.3738 129.222 7.23681 129.223 5.83474C129.223 4.43248 128.086 3.29567 126.684 3.29567ZM120.852 1.84938H119.226V-0.000225067H120.852V1.84938Z",fill:"white"}),C("path",{d:"M11.124 10.0002H8.73438L5.63672 3.35569L2.53809 10.0002H0.148438L4.81152 0.000221252H6.46191L11.124 10.0002ZM20.3516 6.48264V0.000221252H22.5371V9.99924H20.3516L15.2871 3.51682V9.99924H13.1016V0.000221252H15.2871L20.3516 6.48264ZM27.209 9.99924H25.0234V0.000221252H27.209V9.99924ZM30.3037 4.99924L34.21 9.99924H31.4619L27.5586 4.99632L31.4619 0.000221252H34.21L30.3037 4.99924ZM44.6006 2.00413H38.1348V3.99827H43.2354V6.0012H38.1348V7.99534H44.6006V9.99924H35.9492V0.000221252H44.6006V2.00413ZM52.3105 0.000221252C54.2297 0.000274701 55.7852 1.55571 55.7852 3.47483C55.7851 5.0072 54.7924 6.30365 53.416 6.76585L55.9414 9.99729H53.1934L49.29 4.99534H52.2998C53.1392 4.99513 53.8203 4.31423 53.8203 3.47483C53.8203 2.63538 53.1392 1.95453 52.2998 1.95432H48.7715V9.99924H46.5859V0.000221252H52.3105Z",fill:"white"})]});var Z=L;export{Z as default};
|
|
2
|
+
//# sourceMappingURL=board.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/board.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Container } from './container'\n\nconst Board = () => {\n return (\n <div className=\"relative z-[46] bg-[#1D1D1F] h-[30px]\">\n <Container childClassName=\"flex items-center justify-end\" className=\"h-full\">\n <AnkerInnovations />\n </Container>\n </div>\n )\n}\n\nconst AnkerInnovations = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"148\" height=\"10\" viewBox=\"0 0 148 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M88.5391 1.66872C90.8392 1.6688 92.7041 3.53461 92.7041 5.83474C92.7039 8.13468 90.839 9.9997 88.5391 9.99977C86.239 9.99977 84.3733 8.13473 84.373 5.83474C84.373 3.53456 86.2389 1.66872 88.5391 1.66872ZM106.479 1.66872C107.484 1.66872 108.407 2.02531 109.127 2.61892L109.477 1.86208H110.645V9.79958H109.477L109.13 9.0486C108.409 9.64225 107.486 9.99977 106.479 9.99977C104.179 9.99954 102.314 8.13458 102.313 5.83474C102.313 3.53471 104.179 1.66896 106.479 1.66872ZM126.684 1.66872C128.984 1.66872 130.849 3.53456 130.849 5.83474C130.848 8.13473 128.984 9.99977 126.684 9.99977C124.384 9.99972 122.519 8.13469 122.519 5.83474C122.519 3.5346 124.383 1.66878 126.684 1.66872ZM144.748 1.66188C146.602 1.66198 147.794 2.66292 147.823 4.20778H146.278C146.249 3.44345 145.631 3.04577 144.719 3.04567C143.806 3.04567 143.247 3.429 143.247 4.0027C143.247 4.7082 144.07 4.85598 145.026 5.0027L145.025 5.00173C146.365 5.23788 147.998 5.48784 147.998 7.44509C147.998 8.98988 146.716 9.99001 144.775 9.99001C142.834 9.98986 141.568 8.93061 141.524 7.28298H143.128C143.172 8.12086 143.878 8.54763 144.835 8.54763C145.703 8.5475 146.38 8.17982 146.38 7.51833C146.38 6.76851 145.527 6.5909 144.556 6.42946C143.232 6.20932 141.673 5.90104 141.673 4.0613C141.673 2.6337 142.893 1.66188 144.748 1.66188ZM115.1 1.85427H117.434V3.24685H115.102V6.85524C115.102 7.79295 115.614 8.32097 116.582 8.32106H117.478V9.80251L116.275 9.8406C114.545 9.84058 113.474 8.76932 113.474 7.02419V3.24685H112.285V2.93532L114.577 0.000751495H115.1V1.85427ZM63.7627 9.79958H62.1367V-0.000225067H63.7627V9.79958ZM97.5566 7.32302L100.108 1.85427H101.884L98.1787 9.79958H96.9355L93.2305 1.85427H95.0059L97.5566 7.32302ZM120.852 9.79958H119.226V3.24587H120.852V9.79958ZM67.8779 2.61892C68.6117 2.02787 69.5403 1.67165 70.5557 1.67165H70.5566C72.1803 1.67165 73.498 2.98838 73.498 4.61208V9.7986H71.8711V4.96462C71.8711 4.00413 71.0923 3.22462 70.1318 3.22438C68.9018 3.22438 67.9045 4.221 67.9043 5.45095V9.7986H66.2725V1.67165H67.4404L67.8779 2.61892ZM77.3252 2.61892C78.059 2.02789 78.9876 1.67165 80.0029 1.67165H80.0039C81.6276 1.67165 82.9443 2.98838 82.9443 4.61208V9.7986H81.3184V4.96462C81.3184 4.00399 80.5388 3.22438 79.5781 3.22438C78.3483 3.2246 77.3518 4.22113 77.3516 5.45095V9.7986H75.7197V1.67165H76.8877L77.3252 2.61892ZM133.85 1.67165L134.287 2.61892C135.021 2.02792 135.95 1.67173 136.965 1.67165H136.967C138.59 1.67181 139.907 2.98848 139.907 4.61208V9.7986H138.28V4.96462C138.28 4.00403 137.502 3.22446 136.541 3.22438C135.311 3.22438 134.315 4.221 134.314 5.45095V9.7986H132.683V1.67165H133.85ZM88.5391 3.29567C87.1368 3.29567 86 4.43248 86 5.83474C86.0002 7.23681 87.1369 8.3738 88.5391 8.3738C89.9411 8.37372 91.0779 7.23676 91.0781 5.83474C91.0781 4.43253 89.9412 3.29575 88.5391 3.29567ZM106.479 3.29567C105.076 3.29591 103.94 4.43263 103.94 5.83474C103.941 7.23666 105.077 8.37356 106.479 8.3738C107.881 8.3738 109.017 7.23681 109.018 5.83474C109.018 4.43248 107.881 3.29567 106.479 3.29567ZM126.684 3.29567C125.281 3.29573 124.145 4.43252 124.145 5.83474C124.145 7.23677 125.282 8.37374 126.684 8.3738C128.086 8.3738 129.222 7.23681 129.223 5.83474C129.223 4.43248 128.086 3.29567 126.684 3.29567ZM120.852 1.84938H119.226V-0.000225067H120.852V1.84938Z\"\n fill=\"white\"\n />\n <path\n d=\"M11.124 10.0002H8.73438L5.63672 3.35569L2.53809 10.0002H0.148438L4.81152 0.000221252H6.46191L11.124 10.0002ZM20.3516 6.48264V0.000221252H22.5371V9.99924H20.3516L15.2871 3.51682V9.99924H13.1016V0.000221252H15.2871L20.3516 6.48264ZM27.209 9.99924H25.0234V0.000221252H27.209V9.99924ZM30.3037 4.99924L34.21 9.99924H31.4619L27.5586 4.99632L31.4619 0.000221252H34.21L30.3037 4.99924ZM44.6006 2.00413H38.1348V3.99827H43.2354V6.0012H38.1348V7.99534H44.6006V9.99924H35.9492V0.000221252H44.6006V2.00413ZM52.3105 0.000221252C54.2297 0.000274701 55.7852 1.55571 55.7852 3.47483C55.7851 5.0072 54.7924 6.30365 53.416 6.76585L55.9414 9.99729H53.1934L49.29 4.99534H52.2998C53.1392 4.99513 53.8203 4.31423 53.8203 3.47483C53.8203 2.63538 53.1392 1.95453 52.2998 1.95432H48.7715V9.99924H46.5859V0.000221252H52.3105Z\"\n fill=\"white\"\n />\n </svg>\n )\n}\n\nexport default Board\n"],
|
|
5
|
+
"mappings": "AAMQ,cAAAA,EAQJ,QAAAC,MARI,oBANR,OAAS,aAAAC,MAAiB,cAE1B,MAAMC,EAAQ,IAEVH,EAAC,OAAI,UAAU,wCACb,SAAAA,EAACE,EAAA,CAAU,eAAe,gCAAgC,UAAU,SAClE,SAAAF,EAACI,EAAA,EAAiB,EACpB,EACF,EAIEA,EAAoBC,GAEtBJ,EAAC,OAAI,MAAM,MAAM,OAAO,KAAK,QAAQ,aAAa,KAAK,OAAO,MAAM,6BAA8B,GAAGI,EACnG,UAAAL,EAAC,QACC,EAAE,uqGACF,KAAK,QACP,EACAA,EAAC,QACC,EAAE,iyBACF,KAAK,QACP,GACF,EAIJ,IAAOM,EAAQH",
|
|
6
|
+
"names": ["jsx", "jsxs", "Container", "Board", "AnkerInnovations", "props", "board_default"]
|
|
7
|
+
}
|
|
@@ -4,6 +4,7 @@ type ContainerProps = {
|
|
|
4
4
|
asChild?: boolean;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
className?: string;
|
|
7
|
+
childClassName?: string;
|
|
7
8
|
spaceY?: SpaceY;
|
|
8
9
|
spaceTop?: SpaceTop;
|
|
9
10
|
spaceBottom?: SpaceBottom;
|
|
@@ -13,6 +14,7 @@ declare const Container: React.ForwardRefExoticComponent<{
|
|
|
13
14
|
asChild?: boolean;
|
|
14
15
|
children?: React.ReactNode;
|
|
15
16
|
className?: string;
|
|
17
|
+
childClassName?: string;
|
|
16
18
|
spaceY?: SpaceY;
|
|
17
19
|
spaceTop?: SpaceTop;
|
|
18
20
|
spaceBottom?: SpaceBottom;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as h,jsx as t}from"react/jsx-runtime";import m from"react";import{cn as i}from"../helpers/utils.js";import{Slot as b}from"@radix-ui/react-slot";const g=({children:e})=>t(h,{children:e}),u=m.forwardRef(({...e},o)=>{const{asChild:p,children:n,className:s,childClassName:a,spaceY:c="none",spaceTop:r="none",spaceBottom:l="none",...x}=e,f=p?b:"div",C={default:"tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]",none:""},y={default:"tablet:pt-[80px] laptop:pt-[96px] desktop:pt-[112px] lg-desktop:pt-[128px] pt-[64px]",none:""},R={default:"tablet:pb-[80px] laptop:pb-[96px] desktop:pb-[112px] lg-desktop:pb-[128px] pb-[64px]",none:""};return t(f,{...x,ref:o,className:i(s,"ipc_container","relative z-10 w-full"),children:t("div",{className:i(a,"lg-desktop:max-w-full mx-auto size-full","tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4",C?.[c]||c,y?.[r]||r,R?.[l]||l),children:n})})}),d=m.forwardRef(({...e},o)=>{const{children:p,mode:n="section"}=e,a={section:u,fragment:g}[n];return t(a,{...e,ref:o,children:p})});d.displayName="Container";export{d as 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'\nimport type { Mode, SpaceY, SpaceTop, SpaceBottom } from '../types/props.js'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n spaceY?: SpaceY\n spaceTop?: SpaceTop\n spaceBottom?: SpaceBottom\n mode?: Mode\n} & React.ComponentPropsWithoutRef<'div'>\n\nconst Fragment = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\nconst Section = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const {\n asChild,\n children,\n className,\n spaceY = 'none',\n spaceTop = 'none',\n spaceBottom = 'none',\n ...containerProps\n } = props\n\n const Comp = asChild ? Slot : 'div'\n\n const spaceY_map: any = {\n default: 'tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]',\n none: '',\n }\n\n const spaceTop_map: any = {\n default: 'tablet:pt-[80px] laptop:pt-[96px] desktop:pt-[112px] lg-desktop:pt-[128px] pt-[64px]',\n none: '',\n }\n\n const spaceBottom_map: any = {\n default: 'tablet:pb-[80px] laptop:pb-[96px] desktop:pb-[112px] lg-desktop:pb-[128px] pb-[64px]',\n none: '',\n }\n\n return (\n <Comp {...containerProps} ref={forwardedRef} className={cn(className, 'ipc_container', 'relative z-10 w-full')}>\n <div\n className={cn(\n 'lg-desktop:max-w-full mx-auto
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["Fragment", "jsx", "React", "cn", "Slot", "children", "Section", "props", "forwardedRef", "asChild", "className", "spaceY", "spaceTop", "spaceBottom", "containerProps", "Comp", "spaceY_map", "spaceTop_map", "spaceBottom_map", "Container", "mode", "Component"]
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport { cn } from '../helpers/utils.js'\nimport { Slot } from '@radix-ui/react-slot'\nimport type { Mode, SpaceY, SpaceTop, SpaceBottom } from '../types/props.js'\n\ntype ContainerElement = React.ElementRef<'div'>\ntype ContainerProps = {\n asChild?: boolean\n children?: React.ReactNode\n className?: string\n childClassName?: string\n spaceY?: SpaceY\n spaceTop?: SpaceTop\n spaceBottom?: SpaceBottom\n mode?: Mode\n} & React.ComponentPropsWithoutRef<'div'>\n\nconst Fragment = ({ children }: { children: React.ReactNode }) => {\n return <>{children}</>\n}\n\nconst Section = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const {\n asChild,\n children,\n className,\n childClassName,\n spaceY = 'none',\n spaceTop = 'none',\n spaceBottom = 'none',\n ...containerProps\n } = props\n\n const Comp = asChild ? Slot : 'div'\n\n const spaceY_map: any = {\n default: 'tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]',\n none: '',\n }\n\n const spaceTop_map: any = {\n default: 'tablet:pt-[80px] laptop:pt-[96px] desktop:pt-[112px] lg-desktop:pt-[128px] pt-[64px]',\n none: '',\n }\n\n const spaceBottom_map: any = {\n default: 'tablet:pb-[80px] laptop:pb-[96px] desktop:pb-[112px] lg-desktop:pb-[128px] pb-[64px]',\n none: '',\n }\n\n return (\n <Comp {...containerProps} ref={forwardedRef} className={cn(className, 'ipc_container', 'relative z-10 w-full')}>\n <div\n className={cn(\n childClassName,\n 'lg-desktop:max-w-full mx-auto size-full',\n 'tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4',\n spaceY_map?.[spaceY] || spaceY,\n spaceTop_map?.[spaceTop] || spaceTop,\n spaceBottom_map?.[spaceBottom] || spaceBottom\n )}\n >\n {children}\n </div>\n </Comp>\n )\n})\n\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ ...props }, forwardedRef) => {\n const { children, mode = 'section' } = props\n\n const componentsMap: {\n [P in Mode]: React.ComponentType<any> | string\n } = {\n section: Section,\n fragment: Fragment,\n }\n\n const Component = componentsMap![mode!]\n\n return (\n <Component {...props} ref={forwardedRef}>\n {children}\n </Component>\n )\n})\n\nContainer.displayName = 'Container'\n\nexport { Container }\nexport type { ContainerProps }\n"],
|
|
5
|
+
"mappings": "AAkBS,mBAAAA,EAAA,OAAAC,MAAA,oBAlBT,OAAOC,MAAW,QAClB,OAAS,MAAAC,MAAU,sBACnB,OAAS,QAAAC,MAAY,uBAerB,MAAMJ,EAAW,CAAC,CAAE,SAAAK,CAAS,IACpBJ,EAAAD,EAAA,CAAG,SAAAK,EAAS,EAGfC,EAAUJ,EAAM,WAA6C,CAAC,CAAE,GAAGK,CAAM,EAAGC,IAAiB,CACjG,KAAM,CACJ,QAAAC,EACA,SAAAJ,EACA,UAAAK,EACA,eAAAC,EACA,OAAAC,EAAS,OACT,SAAAC,EAAW,OACX,YAAAC,EAAc,OACd,GAAGC,CACL,EAAIR,EAEES,EAAOP,EAAUL,EAAO,MAExBa,EAAkB,CACtB,QAAS,uFACT,KAAM,EACR,EAEMC,EAAoB,CACxB,QAAS,uFACT,KAAM,EACR,EAEMC,EAAuB,CAC3B,QAAS,uFACT,KAAM,EACR,EAEA,OACElB,EAACe,EAAA,CAAM,GAAGD,EAAgB,IAAKP,EAAc,UAAWL,EAAGO,EAAW,gBAAiB,sBAAsB,EAC3G,SAAAT,EAAC,OACC,UAAWE,EACTQ,EACA,0CACA,8EACAM,IAAaL,CAAM,GAAKA,EACxBM,IAAeL,CAAQ,GAAKA,EAC5BM,IAAkBL,CAAW,GAAKA,CACpC,EAEC,SAAAT,EACH,EACF,CAEJ,CAAC,EAEKe,EAAYlB,EAAM,WAA6C,CAAC,CAAE,GAAGK,CAAM,EAAGC,IAAiB,CACnG,KAAM,CAAE,SAAAH,EAAU,KAAAgB,EAAO,SAAU,EAAId,EASjCe,EALF,CACF,QAAShB,EACT,SAAUN,CACZ,EAEiCqB,CAAK,EAEtC,OACEpB,EAACqB,EAAA,CAAW,GAAGf,EAAO,IAAKC,EACxB,SAAAH,EACH,CAEJ,CAAC,EAEDe,EAAU,YAAc",
|
|
6
|
+
"names": ["Fragment", "jsx", "React", "cn", "Slot", "children", "Section", "props", "forwardedRef", "asChild", "className", "childClassName", "spaceY", "spaceTop", "spaceBottom", "containerProps", "Comp", "spaceY_map", "spaceTop_map", "spaceBottom_map", "Container", "mode", "Component"]
|
|
7
7
|
}
|
|
@@ -22,3 +22,4 @@ export { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js';
|
|
|
22
22
|
export { Alert, AlertTitle, AlertDescription } from './alert.js';
|
|
23
23
|
export { default as Picture } from './picture.js';
|
|
24
24
|
export { default as Theme } from './theme.js';
|
|
25
|
+
export { default as Board } from './board.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as e}from"./button.js";import{default as a}from"./badge.js";import{Input as n,InputSlot as
|
|
1
|
+
import{default as e}from"./button.js";import{default as a}from"./badge.js";import{Input as n,InputSlot as u}from"./input.js";import{default as d}from"./checkbox.js";import{default as D}from"./skeleton.js";import{Dialog as s,DialogPortal as f,DialogOverlay as x,DialogClose as C,DialogTrigger as g,DialogContent as w,DialogHeader as P,DialogFooter as T,DialogTitle as M,DialogDescription as b}from"./dialog.js";import{Popover as I,PopoverTrigger as G,PopoverContent as c}from"./popover.js";import{RadioGroup as A,RadioGroupItem as S}from"./radio.js";import{Text as R}from"./text.js";import{Grid as h,GridItem as F}from"./gird.js";import{Heading as B}from"./heading.js";import{Container as O}from"./container.js";import{Color as q}from"./color.js";import{Drawer as E,DrawerPortal as J,DrawerOverlay as K,DrawerTrigger as Q,DrawerClose as U,DrawerContent as V,DrawerHeader as W,DrawerFooter as X,DrawerTitle as Y,DrawerDescription as Z}from"./drawer.js";import{default as $}from"./link.js";import{Avatar as or,AvatarImage as er,AvatarFallback as tr}from"./avatar.js";import{default as pr}from"./input-number.js";import{DropdownMenu as ur,DropdownMenuTrigger as ir,DropdownMenuContent as dr,DropdownMenuItem as lr,DropdownMenuCheckboxItem as Dr,DropdownMenuRadioItem as mr,DropdownMenuLabel as sr,DropdownMenuSeparator as fr,DropdownMenuShortcut as xr,DropdownMenuGroup as Cr,DropdownMenuPortal as gr,DropdownMenuSub as wr,DropdownMenuSubContent as Pr,DropdownMenuSubTrigger as Tr,DropdownMenuRadioGroup as Mr}from"./drop-down.js";import{Card as yr,CardHeader as Ir,CardFooter as Gr,CardTitle as cr,CardDescription as vr,CardContent as Ar}from"./card.js";import{Carousel as kr,CarouselContent as Rr,CarouselItem as Hr,CarouselPrevious as hr,CarouselNext as Fr}from"./carousel.js";import{Tabs as Br,TabsList as Nr,TabsTrigger as Or,TabsContent as jr}from"./tabs.js";import{Alert as zr,AlertTitle as Er,AlertDescription as Jr}from"./alert.js";import{default as Qr}from"./picture.js";import{default as Vr}from"./theme.js";import{default as Xr}from"./board.js";export{zr as Alert,Jr as AlertDescription,Er as AlertTitle,or as Avatar,tr as AvatarFallback,er as AvatarImage,a as Badge,Xr as Board,e as Button,yr as Card,Ar as CardContent,vr as CardDescription,Gr as CardFooter,Ir as CardHeader,cr as CardTitle,kr as Carousel,Rr as CarouselContent,Hr as CarouselItem,Fr as CarouselNext,hr as CarouselPrevious,d as Checkbox,q as Color,O as Container,s as Dialog,C as DialogClose,w as DialogContent,b as DialogDescription,T as DialogFooter,P as DialogHeader,x as DialogOverlay,f as DialogPortal,M as DialogTitle,g as DialogTrigger,E as Drawer,U as DrawerClose,V as DrawerContent,Z as DrawerDescription,X as DrawerFooter,W as DrawerHeader,K as DrawerOverlay,J as DrawerPortal,Y as DrawerTitle,Q as DrawerTrigger,ur as DropdownMenu,Dr as DropdownMenuCheckboxItem,dr as DropdownMenuContent,Cr as DropdownMenuGroup,lr as DropdownMenuItem,sr as DropdownMenuLabel,gr as DropdownMenuPortal,Mr as DropdownMenuRadioGroup,mr as DropdownMenuRadioItem,fr as DropdownMenuSeparator,xr as DropdownMenuShortcut,wr as DropdownMenuSub,Pr as DropdownMenuSubContent,Tr as DropdownMenuSubTrigger,ir as DropdownMenuTrigger,h as Grid,F as GridItem,B as Heading,n as Input,pr as InputNumber,u as InputSlot,$ as Link,Qr as Picture,I as Popover,c as PopoverContent,G as PopoverTrigger,A as RadioGroup,S as RadioGroupItem,D as Skeleton,Br as Tabs,jr as TabsContent,Nr as TabsList,Or as TabsTrigger,R as Text,Vr as Theme};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\n"],
|
|
5
|
-
"mappings": "AAAA,OAAoB,WAAXA,MAAyB,cAClC,OAAoB,WAAXA,MAAwB,aACjC,OAAS,SAAAC,EAAO,aAAAC,MAAiB,aAEjC,OAAoB,WAAXF,MAA2B,gBAEpC,OAAoB,WAAXA,MAA2B,gBACpC,OACE,UAAAG,EACA,gBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAS,WAAAC,EAAS,kBAAAC,EAAgB,kBAAAC,MAAsB,eACxD,OAAS,cAAAC,EAAY,kBAAAC,MAAsE,aAC3F,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,EAAM,YAAAC,MAAoD,YACnE,OAAS,WAAAC,MAAkC,eAC3C,OAAS,aAAAC,MAAsC,iBAC/C,OAAS,SAAAC,MAA8B,aACvC,OACE,UAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAoB,WAAXjC,MAAuC,YAChD,OAAS,UAAAkC,GAAQ,eAAAC,GAAa,kBAAAC,OAAsB,cACpD,OAAoB,WAAXpC,OAAqD,oBAC9D,OACE,gBAAAqC,GACA,uBAAAC,GACA,uBAAAC,GACA,oBAAAC,GACA,4BAAAC,GACA,yBAAAC,GACA,qBAAAC,GACA,yBAAAC,GACA,wBAAAC,GACA,qBAAAC,GACA,sBAAAC,GACA,mBAAAC,GACA,0BAAAC,GACA,0BAAAC,GACA,0BAAAC,OACK,iBACP,OAAS,QAAAC,GAAM,cAAAC,GAAY,cAAAC,GAAY,aAAAC,GAAW,mBAAAC,GAAiB,eAAAC,OAAmB,YACtF,OAEE,YAAAC,GACA,mBAAAC,GACA,gBAAAC,GACA,oBAAAC,GACA,gBAAAC,OACK,gBACP,OAAS,QAAAC,GAAM,YAAAC,GAAU,eAAAC,GAAa,eAAAC,OAAmB,YACzD,OAAS,SAAAC,GAAO,cAAAC,GAAY,oBAAAC,OAAwB,aACpD,OAAoB,WAAXrE,OAA0B,eACnC,OAAoB,WAAXA,OAAwB",
|
|
4
|
+
"sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\n"],
|
|
5
|
+
"mappings": "AAAA,OAAoB,WAAXA,MAAyB,cAClC,OAAoB,WAAXA,MAAwB,aACjC,OAAS,SAAAC,EAAO,aAAAC,MAAiB,aAEjC,OAAoB,WAAXF,MAA2B,gBAEpC,OAAoB,WAAXA,MAA2B,gBACpC,OACE,UAAAG,EACA,gBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAS,WAAAC,EAAS,kBAAAC,EAAgB,kBAAAC,MAAsB,eACxD,OAAS,cAAAC,EAAY,kBAAAC,MAAsE,aAC3F,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,EAAM,YAAAC,MAAoD,YACnE,OAAS,WAAAC,MAAkC,eAC3C,OAAS,aAAAC,MAAsC,iBAC/C,OAAS,SAAAC,MAA8B,aACvC,OACE,UAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAoB,WAAXjC,MAAuC,YAChD,OAAS,UAAAkC,GAAQ,eAAAC,GAAa,kBAAAC,OAAsB,cACpD,OAAoB,WAAXpC,OAAqD,oBAC9D,OACE,gBAAAqC,GACA,uBAAAC,GACA,uBAAAC,GACA,oBAAAC,GACA,4BAAAC,GACA,yBAAAC,GACA,qBAAAC,GACA,yBAAAC,GACA,wBAAAC,GACA,qBAAAC,GACA,sBAAAC,GACA,mBAAAC,GACA,0BAAAC,GACA,0BAAAC,GACA,0BAAAC,OACK,iBACP,OAAS,QAAAC,GAAM,cAAAC,GAAY,cAAAC,GAAY,aAAAC,GAAW,mBAAAC,GAAiB,eAAAC,OAAmB,YACtF,OAEE,YAAAC,GACA,mBAAAC,GACA,gBAAAC,GACA,oBAAAC,GACA,gBAAAC,OACK,gBACP,OAAS,QAAAC,GAAM,YAAAC,GAAU,eAAAC,GAAa,eAAAC,OAAmB,YACzD,OAAS,SAAAC,GAAO,cAAAC,GAAY,oBAAAC,OAAwB,aACpD,OAAoB,WAAXrE,OAA0B,eACnC,OAAoB,WAAXA,OAAwB,aACjC,OAAoB,WAAXA,OAAwB",
|
|
6
6
|
"names": ["default", "Input", "InputSlot", "Dialog", "DialogPortal", "DialogOverlay", "DialogClose", "DialogTrigger", "DialogContent", "DialogHeader", "DialogFooter", "DialogTitle", "DialogDescription", "Popover", "PopoverTrigger", "PopoverContent", "RadioGroup", "RadioGroupItem", "Text", "Grid", "GridItem", "Heading", "Container", "Color", "Drawer", "DrawerPortal", "DrawerOverlay", "DrawerTrigger", "DrawerClose", "DrawerContent", "DrawerHeader", "DrawerFooter", "DrawerTitle", "DrawerDescription", "Avatar", "AvatarImage", "AvatarFallback", "DropdownMenu", "DropdownMenuTrigger", "DropdownMenuContent", "DropdownMenuItem", "DropdownMenuCheckboxItem", "DropdownMenuRadioItem", "DropdownMenuLabel", "DropdownMenuSeparator", "DropdownMenuShortcut", "DropdownMenuGroup", "DropdownMenuPortal", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuRadioGroup", "Card", "CardHeader", "CardFooter", "CardTitle", "CardDescription", "CardContent", "Carousel", "CarouselContent", "CarouselItem", "CarouselPrevious", "CarouselNext", "Tabs", "TabsList", "TabsTrigger", "TabsContent", "Alert", "AlertTitle", "AlertDescription"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fragment as C,jsx as i,jsxs as P}from"react/jsx-runtime";import u from"react";import{Slot as d}from"@radix-ui/react-slot";import{cn as
|
|
1
|
+
import{Fragment as C,jsx as i,jsxs as P}from"react/jsx-runtime";import u from"react";import{Slot as d}from"@radix-ui/react-slot";import{cn as h}from"../helpers/index.js";import{cva as x}from"class-variance-authority";const v=x("tracking hover:text-brand-0 font-bold underline transition-colors",{variants:{size:{base:"text-text-2",lg:"text-text-3"},variant:{secoundry:"text-info-secondary hover:text-info-primary",primary:"text-info-primary hover:text-brand-0"}}}),a=u.forwardRef(({children:p,size:s="base",variant:l="primary",className:m,asChild:c=!1,href:o,style:r,disabled:e=!1,suffixIcon:t,onClick:f,...y},k)=>i(c?d:"a",{ref:k,onClick:n=>{if(!e&&f?.(n),e||!o){n.preventDefault();return}},href:e?void 0:o,className:h(v({size:s,variant:l}),m,{"flex items-center":t,"cursor-pointer":!e,"text-info-quaternary cursor-not-allowed hover:text-info-quaternary":e}),...r?{style:r}:null,...y,children:P(C,{children:[p,t&&i("span",{className:"svg",children:t})]})}));a.displayName="Link";var V=a;export{V as default};
|
|
2
2
|
//# sourceMappingURL=link.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/link.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react'\nimport type { ReactNode } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\n// \u5B9A\u4E49 link \u7684\u6837\u5F0F\u53D8\u4F53\nconst linkVariants = cva('tracking hover:text-brand-0 font-bold underline transition-colors', {\n variants: {\n size: {\n base: 'text-text-2', // \u4E2D\n lg: 'text-text-3', // \u5927\n },\n variant: {\n secoundry: 'text-info-secondary hover:text-info-primary',\n primary: 'text-info-primary hover:text-brand-0',\n },\n },\n})\n// \u5B9A\u4E49\u7EC4\u4EF6\u7C7B\u578B\uFF0C\u7EE7\u627F a \u6807\u7B7E\u6807\u51C6\u5C5E\u6027\ntype LinkElement = React.ElementRef<'a'>\ntype LinkProps = {\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 /** \u7981\u7528\u94FE\u63A5 */\n disabled?: boolean\n /** \u540E\u7F6E\u56FE\u6807*/\n suffixIcon?: ReactNode\n /** \u8DF3\u8F6C\u94FE\u63A5*/\n href?: string\n /** \u6837\u5F0F*/\n style?: React.CSSProperties\n /** \u70B9\u51FB\u4E8B\u4EF6\uFF0C\u7981\u7528\u72B6\u6001\u65E0\u6CD5\u89E6\u53D1*/\n onClick?: Function\n} & VariantProps<typeof linkVariants> &\n ComponentPropsWithout<'a', RemovedProps>\n\nconst Link = React.forwardRef<LinkElement, LinkProps>(\n (\n {\n children,\n size = 'base',\n variant = 'primary',\n className,\n asChild = false,\n href,\n style,\n disabled = false,\n suffixIcon,\n onClick,\n ...props // \u8FD9\u91CC\u4F1A\u5305\u542B href\u3001target\u3001rel \u7B49\u6807\u51C6 anchor \u5C5E\u6027\n }: LinkProps,\n forwardedRef\n ) => {\n const Comp = asChild ? Slot : 'a'\n\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n !disabled && onClick?.(event)\n if (disabled || !href) {\n event.preventDefault()\n return\n }\n }\n\n return (\n <Comp\n ref={forwardedRef}\n onClick={handleClick}\n href={disabled ? undefined : href}\n className={cn(linkVariants({ size, variant }), className, {\n 'flex items-center': suffixIcon,\n 'cursor-pointer': !disabled,\n 'text-info-quaternary cursor-not-allowed hover:text-info-quaternary': disabled,\n })}\n {...(style ? { style: style } : null)}\n {...props}\n >\n <>\n {children}\n <span className=\"svg\">{suffixIcon}</span
|
|
5
|
-
"mappings": "AAgFQ,mBAAAA,
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nimport type { ReactNode } from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '../helpers/index.js'\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js'\n\n// \u5B9A\u4E49 link \u7684\u6837\u5F0F\u53D8\u4F53\nconst linkVariants = cva('tracking hover:text-brand-0 font-bold underline transition-colors', {\n variants: {\n size: {\n base: 'text-text-2', // \u4E2D\n lg: 'text-text-3', // \u5927\n },\n variant: {\n secoundry: 'text-info-secondary hover:text-info-primary',\n primary: 'text-info-primary hover:text-brand-0',\n },\n },\n})\n// \u5B9A\u4E49\u7EC4\u4EF6\u7C7B\u578B\uFF0C\u7EE7\u627F a \u6807\u7B7E\u6807\u51C6\u5C5E\u6027\ntype LinkElement = React.ElementRef<'a'>\ntype LinkProps = {\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 /** \u7981\u7528\u94FE\u63A5 */\n disabled?: boolean\n /** \u540E\u7F6E\u56FE\u6807*/\n suffixIcon?: ReactNode\n /** \u8DF3\u8F6C\u94FE\u63A5*/\n href?: string\n /** \u6837\u5F0F*/\n style?: React.CSSProperties\n /** \u70B9\u51FB\u4E8B\u4EF6\uFF0C\u7981\u7528\u72B6\u6001\u65E0\u6CD5\u89E6\u53D1*/\n onClick?: Function\n} & VariantProps<typeof linkVariants> &\n ComponentPropsWithout<'a', RemovedProps>\n\nconst Link = React.forwardRef<LinkElement, LinkProps>(\n (\n {\n children,\n size = 'base',\n variant = 'primary',\n className,\n asChild = false,\n href,\n style,\n disabled = false,\n suffixIcon,\n onClick,\n ...props // \u8FD9\u91CC\u4F1A\u5305\u542B href\u3001target\u3001rel \u7B49\u6807\u51C6 anchor \u5C5E\u6027\n }: LinkProps,\n forwardedRef\n ) => {\n const Comp = asChild ? Slot : 'a'\n\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n !disabled && onClick?.(event)\n if (disabled || !href) {\n event.preventDefault()\n return\n }\n }\n\n return (\n <Comp\n ref={forwardedRef}\n onClick={handleClick}\n href={disabled ? undefined : href}\n className={cn(linkVariants({ size, variant }), className, {\n 'flex items-center': suffixIcon,\n 'cursor-pointer': !disabled,\n 'text-info-quaternary cursor-not-allowed hover:text-info-quaternary': disabled,\n })}\n {...(style ? { style: style } : null)}\n {...props}\n >\n <>\n {children}\n {suffixIcon && <span className=\"svg\">{suffixIcon}</span>}\n </>\n </Comp>\n )\n }\n)\nLink.displayName = 'Link'\n\nexport default Link\nexport type { LinkProps }\n"],
|
|
5
|
+
"mappings": "AAgFQ,mBAAAA,EAEiB,OAAAC,EAFjB,QAAAC,MAAA,oBAhFR,OAAOC,MAAW,QAElB,OAAS,QAAAC,MAAY,uBACrB,OAAS,MAAAC,MAAU,sBACnB,OAA4B,OAAAC,MAAW,2BAIvC,MAAMC,EAAeD,EAAI,qEAAsE,CAC7F,SAAU,CACR,KAAM,CACJ,KAAM,cACN,GAAI,aACN,EACA,QAAS,CACP,UAAW,8CACX,QAAS,sCACX,CACF,CACF,CAAC,EAqBKE,EAAOL,EAAM,WACjB,CACE,CACE,SAAAM,EACA,KAAAC,EAAO,OACP,QAAAC,EAAU,UACV,UAAAC,EACA,QAAAC,EAAU,GACV,KAAAC,EACA,MAAAC,EACA,SAAAC,EAAW,GACX,WAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EACAC,IAaEnB,EAXWY,EAAUT,EAAO,IAW3B,CACC,IAAKgB,EACL,QAXiBC,GAA+C,CAElE,GADA,CAACL,GAAYE,IAAUG,CAAK,EACxBL,GAAY,CAACF,EAAM,CACrBO,EAAM,eAAe,EACrB,MACF,CACF,EAMI,KAAML,EAAW,OAAYF,EAC7B,UAAWT,EAAGE,EAAa,CAAE,KAAAG,EAAM,QAAAC,CAAQ,CAAC,EAAGC,EAAW,CACxD,oBAAqBK,EACrB,iBAAkB,CAACD,EACnB,qEAAsEA,CACxE,CAAC,EACA,GAAID,EAAQ,CAAE,MAAOA,CAAM,EAAI,KAC/B,GAAGI,EAEJ,SAAAjB,EAAAF,EAAA,CACG,UAAAS,EACAQ,GAAchB,EAAC,QAAK,UAAU,MAAO,SAAAgB,EAAW,GACnD,EACF,CAGN,EACAT,EAAK,YAAc,OAEnB,IAAOc,EAAQd",
|
|
6
6
|
"names": ["Fragment", "jsx", "jsxs", "React", "Slot", "cn", "cva", "linkVariants", "Link", "children", "size", "variant", "className", "asChild", "href", "style", "disabled", "suffixIcon", "onClick", "props", "forwardedRef", "event", "link_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{clsx as e}from"clsx";import{extendTailwindMerge as n}from"tailwind-merge";const o=n({extend:{theme:{borderRadius:["btn"]},classGroups:{"font-size":["text-heading-1","text-heading-2","text-heading-3","text-heading-4","text-heading-5","text-text-3","text-text-2","text-text-1"],"text-color":["text-info-primary","text-info-secondary","text-info-tertiary","text-info-quaternary","text-info-white"],leading:["leading-tight","leading-normal","leading-loose"]}}});function
|
|
1
|
+
import{clsx as e}from"clsx";import{extendTailwindMerge as n}from"tailwind-merge";const o=n({extend:{theme:{borderRadius:["btn"]},classGroups:{"font-size":["text-heading-1","text-heading-2","text-heading-3","text-heading-4","text-heading-5","text-text-3","text-text-2","text-text-1"],"text-color":["text-info-primary","text-info-secondary","text-info-tertiary","text-info-quaternary","text-info-white"],leading:["leading-tight","leading-normal","leading-loose"]}}});function a(...t){return o(e(t))}function s(){}function x(t){return t&&typeof t=="string"&&t.includes("/")?t.split("/").pop()?.split("?")?.shift():t}const l=t=>t?.replace(/\s+/g,"-");export{x as atobID,a as cn,s as noop,l as spaceToHyphen};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|