@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
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/CreativeModule/index.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport type { Img } from '../../types/props.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Grid, GridItem } from '../../components/gird.js'\nimport { Picture, Text } from '../../components/index.js'\n\nexport type CreativeModuleDataType = {\n img: Img\n mobileImg: Img\n title: string\n description: string\n theme: 'light' | 'dark'\n span: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12\n}\n\ntype CreativeModuleType = {\n data: {\n shape?: 'rounded' | 'square'\n productsTab: CreativeModuleDataType[]\n }\n className?: string\n}\n\nconst Item = ({ data, configuration }: { data: CreativeModuleDataType; configuration?: any }) => {\n return (\n <div\n className={cn(\n 'text-info-primary aspect-h-[360] aspect-w-[296] relative flex-1 shrink-0 overflow-hidden md:basis-[296px]',\n configuration?.shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n <div className=\"absolute inset-0\">\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover\"\n source={data?.mobileImg?.url || data?.img?.url}\n alt={data?.mobileImg?.alt || data?.img?.alt || ''}\n />\n <div className=\"z-1 absolute bottom-4 left-4 box-border flex w-full flex-col\">\n <Text html={data?.title} className=\"graphic-title truncate text-xl font-bold leading-[1.2]\" />\n {data?.description && (\n <Text html={data?.description} className=\"graphic-title line-clamp-2 text-sm font-bold leading-[1.2]\" />\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst CreativeModule = (props: CreativeModuleType) => {\n const { data, className } = props\n const { productsTab, shape } = data\n\n return (\n <>\n <div className=\"laptop:block box-border hidden w-full overflow-hidden\">\n <Grid className={cn('tablet:gap-4 grid grid-cols-12 gap-3 ', className)}>\n {productsTab?.map((item, index) => {\n return (\n <GridItem\n key={index}\n span={item.span}\n className={cn(\n 'text-info-primary relative w-full cursor-pointer overflow-hidden',\n shape === 'rounded' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:max-h-[480px] desktop:max-h-[384px] laptop:max-h-[288px]',\n {\n 'aiui-dark': item.theme === 'dark',\n }\n )}\n >\n <Picture\n source={item.img.url}\n className=\"size-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n />\n <div className=\"lg-desktop:bottom-8 lg-desktop:left-8 desktop:bottom-6 desktop:left-6 absolute bottom-4 left-4\">\n {item.title && (\n <Text html={item.title} as=\"p\" className=\"desktop:text-[32px] laptop:text-2xl text-xl font-bold\" />\n )}\n {item.description && <Text html={item.description} className=\"desktop:text-lg text-sm font-bold\" />}\n </div>\n </GridItem>\n )\n })}\n </Grid>\n </div>\n <div className=\"laptop:hidden block w-full\">\n <SwiperBox\n id=\"CreativeModule\"\n className={cn('!overflow-visible', className)}\n data={{\n list: productsTab || [],\n configuration: {\n shape,\n },\n }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n }}\n />\n </div>\n </>\n )\n}\n\nexport default withLayout(CreativeModule)\n"],
|
|
5
|
+
"mappings": "aAqCQ,OAsBJ,YAAAA,EAtBI,OAAAC,EAMA,QAAAC,MANA,oBApCR,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAe,wBAEtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,QAAAC,EAAM,YAAAC,MAAgB,2BAC/B,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAmB9B,MAAMC,EAAO,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAEhCX,EAAC,OACC,UAAWE,EACT,4GACAS,GAAe,QAAU,UAAY,cAAgB,eACrD,CACE,YAAaD,EAAK,QAAU,MAC9B,CACF,EAEA,SAAAT,EAAC,OAAI,UAAU,mBACb,UAAAD,EAACO,EAAA,CACC,UAAU,SACV,aAAa,sBACb,OAAQG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CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,EACF,GACF,CAEJ,EAEA,IAAOU,EAAQf,EAAWQ,CAAc",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "cn", "SwiperBox", "withLayout", "Grid", "GridItem", "Picture", "Text", "Item", "data", "configuration", "CreativeModule", "props", "className", "productsTab", "shape", "item", "index", "CreativeModule_default"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as s}from"react/jsx-runtime";import u,{useImperativeHandle as x,useRef as w}from"react";import g from"../Title/index.js";import{cn as a}from"../../helpers/utils.js";import h from"../../components/picture.js";import b from"../SwiperBox/index.js";import{withLayout as k}from"../../shared/Styles.js";import{Avatar as N,AvatarImage as y,AvatarFallback as C}from"../../components/avatar.js";import{Container as L}from"../../components/container.js";import{Text as E}from"../../components/text.js";import{useExposure as P}from"../../hooks/useExposure.js";import{trackUrlRef as T}from"../../shared/trackUrlRef.js";const m="copy",d="product_review",B=({data:t,configuration:r})=>{const l=i=>i?Array.from(new Array(Number(i)))||[]:[];return e("div",{className:a("bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300",r?.shape==="round"?"rounded-2xl":"rounded-none","lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]","laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative","md-tablet:h-[360px]"),children:s("div",{className:"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4",children:[s("div",{className:a("lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between"),children:[s("div",{className:"flex-1",children:[t?.title?e("h4",{className:"laptop:text-lg text-sm font-bold",children:t?.title}):null,e("div",{className:"mt-1 flex items-center",children:l(t?.rating)?.map?.((i,o)=>e("div",{className:"mr-1",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})})},o))})]}),e("div",{className:"desktop:size-12 size-10 overflow-hidden",children:t?.avatar?.url?s(N,{className:"size-full",isAdaptation:!t?.avatar?.url,children:[e(y,{src:t?.avatar?.url}),e(C,{children:t?.title})]}):null})]}),e("div",{className:"flex-1",children:e(E,{className:a("desktop:max-h-[151px] tablet:max-h-[140px]","lg-desktop:text-2xl text-info-primary line-clamp-5 break-words text-xl font-bold leading-[1.2]"),children:t?.description||""})}),e("a",{href:T(t?.link,`${m}_${d}`),onClick:()=>{r?.event?.primaryButton(t,r?.index)},children:s("div",{className:a("mt-3 flex items-center cursor-pointer overflow-hidden bg-[#F7F8F9] p-3",r?.shape==="round"?"rounded-lg":"rounded-none"),children:[e("div",{className:"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center",children:e(h,{className:"w-full object-cover",source:t?.img?.url,alt:t?.img?.alt||""})}),e("p",{className:"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]",children:t?.subTitle||""})]})})]})})},M=u.forwardRef(({className:t="",data:r,key:l,...i},o)=>{const{products:c,title:n,theme:v,...f}=r,p=w(null);return x(o,()=>p.current),P(p,{componentType:m,componentName:d,componentTitle:n}),e("div",{className:t,ref:p,children:e("div",{className:"evaluate-box",children:e(L,{...r?.containerProps||{},className:"overflow-hidden",children:s("div",{ref:o,className:a("w-full",t,{"aiui-dark":v==="dark"}),children:[n&&e(g,{data:{title:n}}),e(b,{className:"!overflow-visible",id:"Evaluate"+l,data:{list:c,configuration:{...f}},Slide:B,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:3},1440:{spaceBetween:16,freeMode:!1,slidesPerView:4}}})]})})})})});var $=k(M);export{$ as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Evaluate/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "Title", "cn", "Picture", "SwiperBox", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef } from 'react'\nimport Title from '../Title/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport Picture from '../../components/picture.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Avatar, AvatarImage, AvatarFallback } from '../../components/avatar.js'\nimport { Container } from '../../components/container.js'\nimport { Text } from '../../components/text.js'\nimport type { ContainerProps, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Img } from '../../types/props.js'\n\nconst componentType = 'copy'\nconst componentName = 'product_review'\n\nexport interface EvaluateItem {\n /** \u4EA7\u54C1\u56FE\u7247*/\n img: Img\n title: string\n subTitle: string\n description: string\n avatar?: {\n url: string\n }\n rating: number\n link?: string\n}\n\nexport interface EvaluateProps {\n className?: string\n data: {\n title?: string\n products: EvaluateItem[]\n /** \u5F62\u72B6 */\n shape?: 'round' | 'square'\n /** \u4E3B\u9898\u8272*/\n theme?: Theme\n containerProps?: ContainerProps\n }\n /** \u6309\u94AE\u4E8B\u4EF6*/\n event?: {\n primaryButton?: (v: any, index: number) => void\n }\n key?: string\n}\n\nconst EvaluateItem = ({ data, configuration }: { data: EvaluateItem; configuration?: any }) => {\n const handleRating = (num: number) => {\n if (num) {\n return Array.from(new Array(Number(num))) || []\n }\n return []\n }\n\n return (\n <div\n className={cn(\n 'bg-container-secondary-1 tablet:hover:bg-info-white box-border w-full overflow-hidden duration-300',\n configuration?.shape === 'round' ? 'rounded-2xl' : 'rounded-none',\n 'lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480] desktop:aspect-w-[316] desktop:aspect-h-[384]',\n 'laptop:aspect-w-[288] laptop:aspect-h-[360] aspect-w-[296] aspect-h-[360] relative',\n 'md-tablet:h-[360px]'\n )}\n >\n <div className=\"desktop:p-6 absolute inset-0 box-border flex flex-col overflow-hidden p-4\">\n <div className={cn('lg-desktop:mb-16 desktop:mb-10 mb-8 flex w-full justify-between')}>\n <div className=\"flex-1\">\n {data?.title ? <h4 className=\"laptop:text-lg text-sm font-bold\">{data?.title}</h4> : null}\n <div className=\"mt-1 flex items-center\">\n {handleRating(data?.rating)?.map?.((_, index) => {\n return (\n <div key={index} className=\"mr-1\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n </div>\n )\n })}\n </div>\n </div>\n <div className=\"desktop:size-12 size-10 overflow-hidden\">\n {data?.avatar?.url ? (\n <Avatar className=\"size-full\" isAdaptation={!data?.avatar?.url}>\n <AvatarImage src={data?.avatar?.url} />\n <AvatarFallback>{data?.title}</AvatarFallback>\n </Avatar>\n ) : null}\n </div>\n </div>\n <div className=\"flex-1\">\n <Text\n className={cn(\n 'desktop:max-h-[151px] tablet:max-h-[140px]',\n 'lg-desktop:text-2xl text-info-primary line-clamp-5 break-words text-xl font-bold leading-[1.2]'\n )}\n >\n {data?.description || ''}\n </Text>\n </div>\n <a\n href={trackUrlRef(data?.link, `${componentType}_${componentName}`)}\n onClick={() => {\n configuration?.event?.primaryButton(data, configuration?.index)\n }}\n >\n <div\n className={cn(\n 'mt-3 flex items-center cursor-pointer overflow-hidden bg-[#F7F8F9] p-3',\n configuration?.shape === 'round' ? 'rounded-lg' : 'rounded-none'\n )}\n >\n <div className=\"laptop:size-16 desktop:size-20 mr-3 flex size-12 items-center\">\n <Picture className=\"w-full object-cover\" source={data?.img?.url} alt={data?.img?.alt || ''} />\n </div>\n <p className=\"lg-desktop:text-[18px] desktop-[16px] line-clamp-2 flex-1 text-[14px] font-bold tracking-[-0.04em]\">\n {data?.subTitle || ''}\n </p>\n </div>\n </a>\n </div>\n </div>\n )\n}\n\nconst Evaluate = React.forwardRef<HTMLDivElement, EvaluateProps>(({ className = '', data, key, ...rest }, ref) => {\n const { products, title, theme, ...ohter } = data\n const innerRef = useRef<HTMLDivElement>(null)\n useImperativeHandle(ref, () => innerRef.current as HTMLDivElement)\n\n useExposure(innerRef, {\n componentType,\n componentName,\n componentTitle: title,\n })\n\n return (\n <div className={className} ref={innerRef}>\n <div className=\"evaluate-box\">\n <Container {...(data?.containerProps || {})} className=\"overflow-hidden\">\n <div ref={ref} className={cn('w-full', className, { 'aiui-dark': theme === 'dark' })}>\n {title && <Title data={{ title: title }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'Evaluate' + key}\n data={{ list: products, configuration: { ...ohter } }}\n Slide={EvaluateItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 3,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 4,\n },\n }}\n />\n </div>\n </Container>\n </div>\n </div>\n )\n})\n\nexport default withLayout(Evaluate)\n"],
|
|
5
|
+
"mappings": "aAqEU,OACiB,OAAAA,EADjB,QAAAC,MAAA,oBApEV,OAAOC,GAAS,uBAAAC,EAAqB,UAAAC,MAAc,QACnD,OAAOC,MAAW,oBAClB,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAa,8BACpB,OAAOC,MAAe,wBACtB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,UAAAC,EAAQ,eAAA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Ae,CAAE,GAAGG,CAAM,CAAE,EACpD,MAAOf,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EACF,EACF,EACF,CAEJ,CAAC,EAED,IAAOiB,EAAQ3B,EAAWiB,CAAQ",
|
|
6
|
+
"names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "Title", "cn", "Picture", "SwiperBox", "withLayout", "Avatar", "AvatarImage", "AvatarFallback", "Container", "Text", "useExposure", "trackUrlRef", "componentType", "componentName", "EvaluateItem", "data", "configuration", "handleRating", "num", "_", "index", "Evaluate", "className", "key", "rest", "ref", "products", "title", "theme", "ohter", "innerRef", "Evaluate_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import"react";const e=o=>t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:t("path",{d:"M16.6663 9.51148C17.1265 9.51145 17.4998 9.88472 17.4998 10.345C17.4996 10.805 17.1269 11.1774 16.667 11.1777L10.832 11.1777V17.0114C10.8318 17.4714 10.4592 17.8453 9.99917 17.8455C9.53898 17.8456 9.16642 17.4716 9.16639 17.0114V11.1777L3.33345 11.1784C2.87322 11.1785 2.49925 10.8059 2.49928 10.3456C2.49942 9.88554 2.87334 9.51296 3.33345 9.51286L9.16708 9.51148V3.67785C9.16732 3.21781 9.53978 2.84513 9.99986 2.84507C10.46 2.84503 10.8325 3.21774 10.8326 3.67785L10.8326 9.51148L16.6663 9.51148Z",fill:"#B6B6BA"})});var n=e;export{n as default};
|
|
2
|
+
//# sourceMappingURL=Add.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/FooterNavigation/icons/Add.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\nconst AddIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M16.6663 9.51148C17.1265 9.51145 17.4998 9.88472 17.4998 10.345C17.4996 10.805 17.1269 11.1774 16.667 11.1777L10.832 11.1777V17.0114C10.8318 17.4714 10.4592 17.8453 9.99917 17.8455C9.53898 17.8456 9.16642 17.4716 9.16639 17.0114V11.1777L3.33345 11.1784C2.87322 11.1785 2.49925 10.8059 2.49928 10.3456C2.49942 9.88554 2.87334 9.51296 3.33345 9.51286L9.16708 9.51148V3.67785C9.16732 3.21781 9.53978 2.84513 9.99986 2.84507C10.46 2.84503 10.8325 3.21774 10.8326 3.67785L10.8326 9.51148L16.6663 9.51148Z\"\n fill=\"#B6B6BA\"\n />\n </svg>\n )\n}\n\nexport default AddIcon\n"],
|
|
5
|
+
"mappings": "AAIM,cAAAA,MAAA,oBAJN,MAAkB,QAClB,MAAMC,EAAWC,GAEbF,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGE,EACjG,SAAAF,EAAC,QACC,EAAE,sfACF,KAAK,UACP,EACF,EAIJ,IAAOG,EAAQF",
|
|
6
|
+
"names": ["jsx", "AddIcon", "props", "Add_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import"react";const e=t=>o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:o("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:"#B6B6BA",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})});var i=e;export{i as default};
|
|
2
|
+
//# sourceMappingURL=ArrowRight.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/FooterNavigation/icons/ArrowRight.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nconst ArrowRightIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M7.5 5L12.5 10L7.5 15\"\n stroke=\"#B6B6BA\"\n strokeWidth=\"1.66667\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n )\n}\n\nexport default ArrowRightIcon\n"],
|
|
5
|
+
"mappings": "AAKM,cAAAA,MAAA,oBALN,MAAkB,QAElB,MAAMC,EAAkBC,GAEpBF,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGE,EACjG,SAAAF,EAAC,QACC,EAAE,wBACF,OAAO,UACP,YAAY,UACZ,cAAc,QACd,eAAe,QACjB,EACF,EAIJ,IAAOG,EAAQF",
|
|
6
|
+
"names": ["jsx", "ArrowRightIcon", "props", "ArrowRight_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as C}from"react/jsx-runtime";import"react";const H=t=>C("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:C("path",{d:"M10.3691 1.61133C15.2087 1.61139 19.1328 5.52436 19.1328 10.3525C19.1325 15.1805 15.2086 19.0937 10.3691 19.0938C5.52968 19.0938 1.60577 15.1805 1.60547 10.3525C1.60547 5.52433 5.5295 1.61133 10.3691 1.61133ZM4.27832 14.2461C5.25149 15.7567 6.77265 16.882 8.56348 17.3408C7.91452 16.387 7.42382 15.3391 7.08301 14.2461H4.27832ZM13.6885 14.2461C13.3534 15.3541 12.8696 16.3995 12.2354 17.3242C13.9998 16.8557 15.4978 15.7396 16.46 14.2461H13.6885ZM8.69336 14.2461C9.0848 15.3302 9.64719 16.3424 10.3838 17.2197C11.1161 16.3875 11.6885 15.3711 12.083 14.2461H8.69336ZM3.49219 8.10645C3.26011 8.81356 3.13281 9.56816 3.13281 10.3525C3.13287 11.1819 3.2749 11.978 3.5332 12.7197H6.71094C6.55323 11.8561 6.47814 10.9802 6.48926 10.1133L6.50977 9.52246C6.53652 9.04712 6.5915 8.57419 6.66797 8.10645H3.49219ZM14.0479 8.10645C14.1905 8.93075 14.2577 9.7654 14.2471 10.5918L14.2266 11.1826C14.1975 11.699 14.1365 12.2127 14.0488 12.7197H17.2051C17.4634 11.978 17.6054 11.1819 17.6055 10.3525C17.6055 9.56816 17.4782 8.81356 17.2461 8.10645H14.0479ZM8.21484 8.10645C8.12425 8.59538 8.06379 9.09578 8.03516 9.60254L8.0166 10.1328C8.00546 11.0014 8.08784 11.8724 8.26367 12.7197H12.4961C12.5997 12.1923 12.6702 11.6514 12.7012 11.1025L12.7197 10.5723C12.7303 9.74485 12.6541 8.91569 12.4951 8.10645H8.21484ZM8.50098 3.37988C6.68939 3.86143 5.15799 5.02564 4.2002 6.58008H7.01172C7.34767 5.4268 7.84345 4.33836 8.50098 3.37988ZM12.1709 3.36133C12.8447 4.3509 13.3462 5.4425 13.6885 6.58008H16.5381C15.5686 5.00662 14.0116 3.83179 12.1709 3.36133ZM10.3516 3.48438C9.59305 4.34644 9.0068 5.40696 8.61133 6.58008H12.083C11.69 5.45022 11.1158 4.39433 10.3516 3.48438Z",fill:"#B6B6BA"})});var o=H;export{o as default};
|
|
2
|
+
//# sourceMappingURL=Country.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/FooterNavigation/icons/Country.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nconst Country = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path\n d=\"M10.3691 1.61133C15.2087 1.61139 19.1328 5.52436 19.1328 10.3525C19.1325 15.1805 15.2086 19.0937 10.3691 19.0938C5.52968 19.0938 1.60577 15.1805 1.60547 10.3525C1.60547 5.52433 5.5295 1.61133 10.3691 1.61133ZM4.27832 14.2461C5.25149 15.7567 6.77265 16.882 8.56348 17.3408C7.91452 16.387 7.42382 15.3391 7.08301 14.2461H4.27832ZM13.6885 14.2461C13.3534 15.3541 12.8696 16.3995 12.2354 17.3242C13.9998 16.8557 15.4978 15.7396 16.46 14.2461H13.6885ZM8.69336 14.2461C9.0848 15.3302 9.64719 16.3424 10.3838 17.2197C11.1161 16.3875 11.6885 15.3711 12.083 14.2461H8.69336ZM3.49219 8.10645C3.26011 8.81356 3.13281 9.56816 3.13281 10.3525C3.13287 11.1819 3.2749 11.978 3.5332 12.7197H6.71094C6.55323 11.8561 6.47814 10.9802 6.48926 10.1133L6.50977 9.52246C6.53652 9.04712 6.5915 8.57419 6.66797 8.10645H3.49219ZM14.0479 8.10645C14.1905 8.93075 14.2577 9.7654 14.2471 10.5918L14.2266 11.1826C14.1975 11.699 14.1365 12.2127 14.0488 12.7197H17.2051C17.4634 11.978 17.6054 11.1819 17.6055 10.3525C17.6055 9.56816 17.4782 8.81356 17.2461 8.10645H14.0479ZM8.21484 8.10645C8.12425 8.59538 8.06379 9.09578 8.03516 9.60254L8.0166 10.1328C8.00546 11.0014 8.08784 11.8724 8.26367 12.7197H12.4961C12.5997 12.1923 12.6702 11.6514 12.7012 11.1025L12.7197 10.5723C12.7303 9.74485 12.6541 8.91569 12.4951 8.10645H8.21484ZM8.50098 3.37988C6.68939 3.86143 5.15799 5.02564 4.2002 6.58008H7.01172C7.34767 5.4268 7.84345 4.33836 8.50098 3.37988ZM12.1709 3.36133C12.8447 4.3509 13.3462 5.4425 13.6885 6.58008H16.5381C15.5686 5.00662 14.0116 3.83179 12.1709 3.36133ZM10.3516 3.48438C9.59305 4.34644 9.0068 5.40696 8.61133 6.58008H12.083C11.69 5.45022 11.1158 4.39433 10.3516 3.48438Z\"\n fill=\"#B6B6BA\"\n />\n </svg>\n )\n}\n\nexport default Country\n"],
|
|
5
|
+
"mappings": "AAKM,cAAAA,MAAA,oBALN,MAAkB,QAElB,MAAMC,EAAWC,GAEbF,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGE,EACjG,SAAAF,EAAC,QACC,EAAE,snDACF,KAAK,UACP,EACF,EAIJ,IAAOG,EAAQF",
|
|
6
|
+
"names": ["jsx", "Country", "props", "Country_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import"react";const e=o=>t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:t("path",{d:"M20 11.9998L4 12.0009",stroke:"#B6B6BA","stroke-width":"2","stroke-linecap":"round"})});var s=e;export{s as default};
|
|
2
|
+
//# sourceMappingURL=Subtract.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/FooterNavigation/icons/Subtract.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from 'react'\n\nconst SubtractIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <path d=\"M20 11.9998L4 12.0009\" stroke=\"#B6B6BA\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n )\n}\n\nexport default SubtractIcon\n"],
|
|
5
|
+
"mappings": "AAKM,cAAAA,MAAA,oBALN,MAAkB,QAElB,MAAMC,EAAgBC,GAElBF,EAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGE,EACjG,SAAAF,EAAC,QAAK,EAAE,wBAAwB,OAAO,UAAU,eAAa,IAAI,iBAAe,QAAQ,EAC3F,EAIJ,IAAOG,EAAQF",
|
|
6
|
+
"names": ["jsx", "SubtractIcon", "props", "Subtract_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/biz-components/FooterNavigation/icons/index.ts"],
|
|
4
|
+
"sourcesContent": ["import AddIcon from './Add.js'\nimport SubtractIcon from './Subtract.js'\nimport ArrowRightIcon from './ArrowRight.js'\nimport CountryIcon from './Country.js'\n\nexport { AddIcon, SubtractIcon, ArrowRightIcon, CountryIcon }\n"],
|
|
5
|
+
"mappings": "AAAA,OAAOA,MAAa,WACpB,OAAOC,MAAkB,gBACzB,OAAOC,MAAoB,kBAC3B,OAAOC,MAAiB",
|
|
6
|
+
"names": ["AddIcon", "SubtractIcon", "ArrowRightIcon", "CountryIcon"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FooterNavigationProps } from './types.js';
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<Omit<FooterNavigationProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
data?: Record<string, any>;
|
|
5
|
+
} & import("react").RefAttributes<any>>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useEffect as u,useMemo as B,useState as k}from"react";import{Picture as x,Text as r,Container as M,Link as p}from"../../components/index.js";import C from"../Subscribe/index.js";import{FooterNavigationBlockType as b}from"./types.js";import{AddIcon as N,SubtractIcon as h,ArrowRightIcon as F,CountryIcon as D}from"./icons/index.js";import{useMediaQuery as g}from"react-responsive";import{cn as m}from"../../helpers/utils.js";import{withLayout as A}from"../../shared/Styles.js";const L=({data:{footerNavigation:s}={},event:d})=>{const[o,t]=k(!1);console.log("footerNavigation",s);const c=g({query:"(max-width: 1440px)"});u(()=>{t(c)},[c]);const n=B(()=>s?.footerBlocks?.find(i=>i?.blockType===b.Brand)?.country||{},[s]);return a(M,{childClassName:"bg-black py-16 flex flex-col desktop:gap-16 gap-8",children:[e(r,{html:s?.story,className:"desktop:text-sm text-xs font-bold text-[#6D6D6F]"}),s?.footerBlocks?.map(i=>{if(i?.blockType===b.Signup)return e(E,{data:i,onSubmit:d?.signup});if(i?.blockType===b.Brand)return e(T,{data:i,isMobile:o,event:d});if(i?.blockType===b.Main)return e(S,{data:{...i,country:n},event:d,isMobile:o})})]})},E=({data:s,onSubmit:d})=>a("div",{className:"desktop:py-16 desktop:gap-16 laptop:rounded-2xl laptop:px-8 desktop:flex-row flex flex-col gap-8 rounded-xl bg-[#1D1D1F] px-4 py-8",children:[e(C,{subscribeMetadata:s?.signup,className:"desktop:flex-[744]",onSubmit:d}),e("div",{className:"desktop:hidden h-px w-full bg-[#3D3E3F]"}),a("div",{className:"desktop:gap-6 desktop:flex-row desktop:flex-[792] flex flex-col gap-4",children:[a("div",{className:"flex-1",children:[e(r,{html:s?.enjoy?.title,className:"desktop:text-2xl text-xl font-bold leading-[1.2] text-white"}),e("div",{className:"mt-4 flex flex-col gap-2",children:s?.enjoy?.enjoys?.map(o=>a("div",{className:"flex-start flex gap-2",children:[e(x,{source:o?.icon?.url,alt:o?.icon?.alt,className:"size-5 shrink-0"}),e(r,{html:o?.label,className:"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA]"})]},o?.id))})]}),e("div",{className:"w-px bg-[#3D3E3F]"}),a("div",{className:"flex-1",children:[e(r,{html:s?.benefit?.title,className:"desktop:text-2xl text-xl font-bold leading-[1.2] text-white"}),e("div",{className:"mt-4 flex flex-col gap-2",children:s?.benefit?.benefits?.map(o=>e(r,{html:o?.label,className:"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA]"},o?.id))})]})]})]}),S=({data:s,event:d,isMobile:o})=>{const[t,c]=k(!1),{services:n,mainNav:i,country:f}=s;return a("div",{className:"flex flex-col gap-8",children:[a("div",{className:m({"desktop:gap-16 flex":n?.download?.title}),children:[a("div",{className:m({"desktop:flex-[1260]":n?.download?.title}),children:[e(r,{html:n?.storeBenefits?.title,className:"desktop:text-2xl text-xl font-bold leading-[1.2] text-white"}),e("div",{className:m("desktop:flex-row desktop:gap-4 desktop:flex-wrap mt-4 flex flex-col gap-2",{"desktop:max-w-[648px]":n?.download?.title}),children:n?.storeBenefits?.reasons?.map(l=>a("div",{className:"desktop:min-w-[288px] flex flex-1 shrink-0 items-center gap-2",children:[e(x,{source:l?.icon?.url,alt:l?.icon?.alt,className:"size-5 shrink-0"}),e(r,{html:l?.label,className:"text-base font-bold leading-[1.2] text-[#B6B6BA]"})]},l?.id))})]}),e(y,{className:m({"desktop:flex-[404] hidden desktop:block":n?.download?.title}),title:n?.download?.title,apps:n?.download?.apps})]}),e("div",{className:"desktop:block hidden h-px bg-[#3D3E3F]"}),a("div",{className:"desktop:grid grid-cols-4 gap-4",children:[e(v,{title:i?.products?.title,lists:i?.products?.products}),e(v,{title:i?.explore?.title,lists:i?.explore?.explores}),e(v,{title:i?.support?.title,lists:i?.support?.supports}),a("div",{className:"desktop:py-0 desktop:border-none border-t border-[#3D3E3F] pt-4",children:[a("div",{className:"desktop:pb-0 flex items-center justify-between pb-4",children:[e(r,{as:"p",html:i?.contact?.title,className:"desktop:text-2xl text-xl font-bold leading-[1.2] text-white"}),o&&e("button",{onClick:()=>c(!t),children:t?e(h,{width:16,height:16}):e(N,{width:16,height:16})})]}),(t&&o||!o)&&e("div",{className:"desktop:mt-4 desktop:mb-0 mb-4 flex flex-col gap-2",children:i?.contact?.contacts?.map(l=>a("div",{className:"flex items-start gap-2",children:[e(x,{source:l?.icon?.url,alt:l?.icon?.alt,className:"size-5 shrink-0"}),e(p,{href:l?.link,className:"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA] no-underline",children:l?.label})]},l?.id))}),e(w,{country:f,className:"desktop:hidden",isMobile:o,onChangeCountry:d?.country}),e("div",{className:"desktop:hidden mt-8",children:e(y,{title:n?.download?.title,apps:n?.download?.apps})}),e("div",{className:"mt-8 flex items-center gap-2",children:i?.socials?.map(l=>e(p,{href:l?.link,children:e(x,{source:l?.icon?.url,alt:l?.icon?.alt,className:"size-8 shrink-0"})},l?.id))}),e("div",{className:"mt-4 flex flex-wrap gap-2",children:i?.payment?.map(l=>e(p,{href:l?.link,children:e(x,{source:l?.icon?.url,alt:l?.icon?.alt,className:"h-[28px] w-[44px] shrink-0"})},l?.id))})]})]})]})},T=({data:s,isMobile:d,event:o})=>a("div",{className:"flex flex-col gap-4",children:[a("div",{className:"desktop:flex-row desktop:flex desktop:gap-4",children:[a("div",{className:"laptop:flex-row laptop:items-center desktop:flex-[980] flex flex-col items-start gap-4",children:[e(r,{html:s?.brand?.currentBrand,className:"text-[#B6B6BA]"}),e("div",{className:"laptop:block hidden h-[20px] w-px bg-[#B6B6BA] "}),e("div",{className:"desktop:gap-6 flex flex-wrap items-center gap-4",children:s?.brand?.brands?.map(t=>e(p,{href:t?.link,children:e(r,{html:t?.icon,className:"text-[#B6B6BA] hover:text-[#ddd]"})},t?.id))})]}),e(w,{country:s?.country,className:"desktop:flex-[316] desktop:block hidden",isMobile:d,onChangeCountry:o?.country})]}),e("div",{className:"h-px bg-[#3D3E3F]"}),a("div",{className:"laptop:flex-row desktop:gap-4 desktop:items-center flex flex-col items-start gap-1",children:[e(r,{html:s?.copyright?.label,className:"desktop:text-base text-xs font-bold leading-[1.4] text-[#6D6D6F]"}),e("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:s?.policy?.policies?.map(t=>e(p,{href:t?.link,className:"desktop:text-base text-xs font-bold leading-[1.4] text-[#B6B6BA] no-underline",children:t?.label},t?.id))})]})]}),v=({title:s,lists:d,className:o})=>{const[t,c]=k(!1),[n,i]=k(!1),f=g({query:"(max-width: 1440px)"});return u(()=>{i(f)},[f]),a("div",{className:m("desktop:py-0 desktop:border-none border-t border-[#3D3E3F] py-4",o),children:[a("div",{className:"flex items-center justify-between",children:[e(r,{as:"p",html:s,className:"desktop:text-2xl text-xl font-bold leading-[1.2] text-white"}),n&&e("button",{onClick:()=>c(!t),children:t?e(h,{width:16,height:16}):e(N,{width:16,height:16})})]}),(t&&n||!n)&&e("div",{className:"mt-4 flex flex-col gap-2",children:d?.map(l=>e(p,{href:l?.url,className:"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA] no-underline",children:l?.label},l?.id))})]})},y=({title:s,apps:d,className:o})=>a("div",{className:o,children:[e(r,{html:s,className:"desktop:text-2xl text-xl font-bold leading-[1.2] text-white"}),e("div",{className:"mt-4 flex items-center gap-4",children:d?.map(t=>a("div",{className:"flex flex-col items-center gap-[6px]",children:[e(p,{href:t?.link,children:e(x,{source:t?.icon?.url,alt:t?.icon?.alt,className:"size-10 shrink-0"})}),t?.label&&e(r,{html:t?.label,className:"text-xs font-bold text-[#999999]"})]},t?.id))})]}),w=({country:s,isMobile:d,className:o,onChangeCountry:t})=>e("div",{className:m("desktop:py-0 desktop:border-none border-t border-[#3D3E3F] py-4",o),children:a("div",{className:"flex items-center justify-between",children:[a("button",{className:"flex cursor-pointer items-center gap-2",onClick:()=>t?.(),children:[e(D,{width:20,height:20,className:"shrink-0"}),e(r,{as:"p",html:s?.country,className:"desktop:text-[#B6B6BA] text-base font-bold leading-[1.4] text-white hover:text-[#ddd]"})]}),d&&e("button",{children:e(F,{width:16,height:16})})]})});var H=A(L);export{H as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/FooterNavigation/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useMemo, useState } from 'react'\nimport { Picture, Text, Container, Link } from '../../components/index.js'\nimport Subscribe from '../Subscribe/index.js'\nimport type { FooterNavigationProps } from './types.js'\nimport { FooterNavigationBlockType } from './types.js'\nimport { AddIcon, SubtractIcon, ArrowRightIcon, CountryIcon } from './icons/index.js'\nimport { useMediaQuery } from 'react-responsive'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nconst FooterNavigation = ({ data: { footerNavigation } = {}, event }: FooterNavigationProps) => {\n const [isMobile, setIsMobile] = useState(false)\n console.log('footerNavigation', footerNavigation)\n\n const mediaQuery = useMediaQuery({ query: '(max-width: 1440px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const country = useMemo(() => {\n return (\n footerNavigation?.footerBlocks?.find((block: any) => block?.blockType === FooterNavigationBlockType.Brand)\n ?.country || {}\n )\n }, [footerNavigation])\n\n // useEffect(() => {\n // const {\n // mainNav: { products, explore, support, contact },\n // } = footerNavigation\n // const mainNavMenu = [products, explore, support, contact]\n // if (mainNavMenu?.length) {\n // setExpandedMainNavMenu(mainNavMenu?.map((_: any, index: number) => ({ index, open: false })))\n // }\n // }, [footerNavigation])\n\n return (\n <Container childClassName=\"bg-black py-16 flex flex-col desktop:gap-16 gap-8\">\n <Text html={footerNavigation?.story} className=\"desktop:text-sm text-xs font-bold text-[#6D6D6F]\" />\n {footerNavigation?.footerBlocks?.map((block: any) => {\n if (block?.blockType === FooterNavigationBlockType.Signup) {\n return <MarketingConversion data={block} onSubmit={event?.signup} />\n }\n if (block?.blockType === FooterNavigationBlockType.Brand) {\n return <FooterBrand data={block} isMobile={isMobile} event={event} />\n }\n if (block?.blockType === FooterNavigationBlockType.Main) {\n return <MainServices data={{ ...block, country }} event={event} isMobile={isMobile} />\n }\n })}\n </Container>\n )\n}\n\n/**\n * MarketingConversion \u8425\u9500\u8F6C\u5316\u6A21\u5757\n * @param data\n * @param onSubmit signup\u63D0\u4EA4\u4E8B\u4EF6\n * @returns\n */\nconst MarketingConversion = ({ data, onSubmit }: { data: any; onSubmit?: () => void }) => {\n return (\n <div className=\"desktop:py-16 desktop:gap-16 laptop:rounded-2xl laptop:px-8 desktop:flex-row flex flex-col gap-8 rounded-xl bg-[#1D1D1F] px-4 py-8\">\n <Subscribe subscribeMetadata={data?.signup} className=\"desktop:flex-[744]\" onSubmit={onSubmit} />\n <div className=\"desktop:hidden h-px w-full bg-[#3D3E3F]\" />\n <div className=\"desktop:gap-6 desktop:flex-row desktop:flex-[792] flex flex-col gap-4\">\n <div className=\"flex-1\">\n <Text html={data?.enjoy?.title} className=\"desktop:text-2xl text-xl font-bold leading-[1.2] text-white\" />\n <div className=\"mt-4 flex flex-col gap-2\">\n {data?.enjoy?.enjoys?.map((enjoyItem: any) => (\n <div key={enjoyItem?.id} className=\"flex-start flex gap-2\">\n <Picture source={enjoyItem?.icon?.url} alt={enjoyItem?.icon?.alt} className=\"size-5 shrink-0\" />\n <Text\n html={enjoyItem?.label}\n className=\"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA]\"\n />\n </div>\n ))}\n </div>\n </div>\n <div className=\"w-px bg-[#3D3E3F]\" />\n <div className=\"flex-1\">\n <Text html={data?.benefit?.title} className=\"desktop:text-2xl text-xl font-bold leading-[1.2] text-white\" />\n <div className=\"mt-4 flex flex-col gap-2\">\n {data?.benefit?.benefits?.map((benefitItem: any) => (\n <Text\n key={benefitItem?.id}\n html={benefitItem?.label}\n className=\"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA]\"\n />\n ))}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * MainServices \u4E3B\u5BFC\u822A\u4E0E\u670D\u52A1\u6A21\u5757\n * @param services \u670D\u52A1\n * @param mainNav \u4E3B\u5BFC\u822A\n * @param event \u4E8B\u4EF6\n * @param isMobile \u662F\u5426\u662F\u79FB\u52A8\u7AEF\n * @returns\n */\nconst MainServices = ({ data, event, isMobile }: { data: any; event: any; isMobile: boolean }) => {\n const [mainNavMenuOpen, setMainNavMenuOpen] = useState<boolean>(false)\n const { services, mainNav, country } = data\n return (\n <div className=\"flex flex-col gap-8\">\n <div\n className={cn({\n 'desktop:gap-16 flex': services?.download?.title,\n })}\n >\n <div\n className={cn({\n 'desktop:flex-[1260]': services?.download?.title,\n })}\n >\n <Text\n html={services?.storeBenefits?.title}\n className=\"desktop:text-2xl text-xl font-bold leading-[1.2] text-white\"\n />\n <div\n className={cn('desktop:flex-row desktop:gap-4 desktop:flex-wrap mt-4 flex flex-col gap-2', {\n 'desktop:max-w-[648px]': services?.download?.title,\n })}\n >\n {services?.storeBenefits?.reasons?.map((reasonItem: any) => (\n <div key={reasonItem?.id} className=\"desktop:min-w-[288px] flex flex-1 shrink-0 items-center gap-2\">\n <Picture source={reasonItem?.icon?.url} alt={reasonItem?.icon?.alt} className=\"size-5 shrink-0\" />\n <Text html={reasonItem?.label} className=\"text-base font-bold leading-[1.2] text-[#B6B6BA]\" />\n </div>\n ))}\n </div>\n </div>\n <DownloadApp\n className={cn({\n 'desktop:flex-[404] hidden desktop:block': services?.download?.title,\n })}\n title={services?.download?.title}\n apps={services?.download?.apps}\n />\n </div>\n <div className=\"desktop:block hidden h-px bg-[#3D3E3F]\" />\n <div className=\"desktop:grid grid-cols-4 gap-4\">\n <MainNavMenu title={mainNav?.products?.title} lists={mainNav?.products?.products} />\n <MainNavMenu title={mainNav?.explore?.title} lists={mainNav?.explore?.explores} />\n <MainNavMenu title={mainNav?.support?.title} lists={mainNav?.support?.supports} />\n <div className=\"desktop:py-0 desktop:border-none border-t border-[#3D3E3F] pt-4\">\n <div className=\"desktop:pb-0 flex items-center justify-between pb-4\">\n <Text\n as=\"p\"\n html={mainNav?.contact?.title}\n className=\"desktop:text-2xl text-xl font-bold leading-[1.2] text-white\"\n />\n {isMobile && (\n <button onClick={() => setMainNavMenuOpen(!mainNavMenuOpen)}>\n {mainNavMenuOpen ? <SubtractIcon width={16} height={16} /> : <AddIcon width={16} height={16} />}\n </button>\n )}\n </div>\n {((mainNavMenuOpen && isMobile) || !isMobile) && (\n <div className=\"desktop:mt-4 desktop:mb-0 mb-4 flex flex-col gap-2\">\n {mainNav?.contact?.contacts?.map((contactItem: any) => (\n <div key={contactItem?.id} className=\"flex items-start gap-2\">\n <Picture source={contactItem?.icon?.url} alt={contactItem?.icon?.alt} className=\"size-5 shrink-0\" />\n <Link\n href={contactItem?.link}\n className=\"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA] no-underline\"\n >\n {contactItem?.label}\n </Link>\n </div>\n ))}\n </div>\n )}\n <ChangeCountry\n country={country}\n className=\"desktop:hidden\"\n isMobile={isMobile}\n onChangeCountry={event?.country}\n />\n <div className=\"desktop:hidden mt-8\">\n <DownloadApp title={services?.download?.title} apps={services?.download?.apps} />\n </div>\n <div className=\"mt-8 flex items-center gap-2\">\n {mainNav?.socials?.map((socialItem: any) => (\n <Link href={socialItem?.link} key={socialItem?.id}>\n <Picture source={socialItem?.icon?.url} alt={socialItem?.icon?.alt} className=\"size-8 shrink-0\" />\n </Link>\n ))}\n </div>\n <div className=\"mt-4 flex flex-wrap gap-2\">\n {mainNav?.payment?.map((paymentItem: any) => (\n <Link href={paymentItem?.link} key={paymentItem?.id}>\n <Picture\n source={paymentItem?.icon?.url}\n alt={paymentItem?.icon?.alt}\n className=\"h-[28px] w-[44px] shrink-0\"\n />\n </Link>\n ))}\n </div>\n </div>\n </div>\n </div>\n )\n}\n\nconst FooterBrand = ({ data, isMobile, event }: { data: any; isMobile: boolean; event: any }) => {\n return (\n <div className=\"flex flex-col gap-4\">\n <div className=\"desktop:flex-row desktop:flex desktop:gap-4\">\n <div className=\"laptop:flex-row laptop:items-center desktop:flex-[980] flex flex-col items-start gap-4\">\n <Text html={data?.brand?.currentBrand} className=\"text-[#B6B6BA]\" />\n <div className=\"laptop:block hidden h-[20px] w-px bg-[#B6B6BA] \" />\n <div className=\"desktop:gap-6 flex flex-wrap items-center gap-4\">\n {data?.brand?.brands?.map((brandItem: any) => (\n <Link href={brandItem?.link} key={brandItem?.id}>\n <Text html={brandItem?.icon} className=\"text-[#B6B6BA] hover:text-[#ddd]\" />\n </Link>\n ))}\n </div>\n </div>\n <ChangeCountry\n country={data?.country}\n className=\"desktop:flex-[316] desktop:block hidden\"\n isMobile={isMobile}\n onChangeCountry={event?.country}\n />\n </div>\n <div className=\"h-px bg-[#3D3E3F]\" />\n <div className=\"laptop:flex-row desktop:gap-4 desktop:items-center flex flex-col items-start gap-1\">\n <Text\n html={data?.copyright?.label}\n className=\"desktop:text-base text-xs font-bold leading-[1.4] text-[#6D6D6F]\"\n />\n <div className=\"flex flex-wrap items-center gap-x-2 gap-y-1\">\n {data?.policy?.policies?.map((policyItem: any) => (\n <Link\n href={policyItem?.link}\n key={policyItem?.id}\n className=\"desktop:text-base text-xs font-bold leading-[1.4] text-[#B6B6BA] no-underline\"\n >\n {policyItem?.label}\n </Link>\n ))}\n </div>\n </div>\n </div>\n )\n}\n\nconst MainNavMenu = ({ title, lists, className }: { title: string; lists: any[]; className?: string }) => {\n const [mainNavMenuOpen, setMainNavMenuOpen] = useState<boolean>(false)\n const [isMobile, setIsMobile] = useState(false)\n\n const mediaQuery = useMediaQuery({ query: '(max-width: 1440px)' })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n return (\n <div className={cn('desktop:py-0 desktop:border-none border-t border-[#3D3E3F] py-4', className)}>\n <div className=\"flex items-center justify-between\">\n <Text as=\"p\" html={title} className=\"desktop:text-2xl text-xl font-bold leading-[1.2] text-white\" />\n {isMobile && (\n <button onClick={() => setMainNavMenuOpen(!mainNavMenuOpen)}>\n {mainNavMenuOpen ? <SubtractIcon width={16} height={16} /> : <AddIcon width={16} height={16} />}\n </button>\n )}\n </div>\n {((mainNavMenuOpen && isMobile) || !isMobile) && (\n <div className=\"mt-4 flex flex-col gap-2\">\n {lists?.map((productItem: any) => (\n <Link\n href={productItem?.url}\n key={productItem?.id}\n className=\"desktop:text-base text-sm font-bold leading-[1.2] text-[#B6B6BA] no-underline\"\n >\n {productItem?.label}\n </Link>\n ))}\n </div>\n )}\n </div>\n )\n}\n\n/**\n * DownloadApp \u4E0B\u8F7D\u5E94\u7528\u6A21\u5757\n * @param title\n * @param apps\n * @param className\n * @returns\n */\nconst DownloadApp = ({ title, apps, className }: { title: string; apps: any[]; className?: string }) => {\n return (\n <div className={className}>\n <Text html={title} className=\"desktop:text-2xl text-xl font-bold leading-[1.2] text-white\" />\n <div className=\"mt-4 flex items-center gap-4\">\n {apps?.map((appItem: any) => (\n <div key={appItem?.id} className=\"flex flex-col items-center gap-[6px]\">\n <Link href={appItem?.link}>\n <Picture source={appItem?.icon?.url} alt={appItem?.icon?.alt} className=\"size-10 shrink-0\" />\n </Link>\n {appItem?.label && <Text html={appItem?.label} className=\"text-xs font-bold text-[#999999]\" />}\n </div>\n ))}\n </div>\n </div>\n )\n}\n\n/**\n * ChangeCountry \u5207\u6362\u56FD\u5BB6\u6A21\u5757\n * @param data \u6570\u636E\n * @param isMobile \u662F\u5426\u662F\u79FB\u52A8\u7AEF\n * @returns\n */\nconst ChangeCountry = ({\n country,\n isMobile,\n className,\n onChangeCountry,\n}: {\n country: any\n isMobile: boolean\n className?: string\n onChangeCountry?: () => void\n}) => {\n return (\n <div className={cn('desktop:py-0 desktop:border-none border-t border-[#3D3E3F] py-4', className)}>\n <div className=\"flex items-center justify-between\">\n <button className=\"flex cursor-pointer items-center gap-2\" onClick={() => onChangeCountry?.()}>\n <CountryIcon width={20} height={20} className=\"shrink-0\" />\n <Text\n as=\"p\"\n html={country?.country}\n className=\"desktop:text-[#B6B6BA] text-base font-bold leading-[1.4] text-white hover:text-[#ddd]\"\n />\n </button>\n {isMobile && (\n <button>\n <ArrowRightIcon width={16} height={16} />\n </button>\n )}\n </div>\n </div>\n )\n}\n\nexport default withLayout(FooterNavigation)\n"],
|
|
5
|
+
"mappings": "AAsCI,OACE,OAAAA,EADF,QAAAC,MAAA,oBAtCJ,OAAS,aAAAC,EAAW,WAAAC,EAAS,YAAAC,MAAgB,QAC7C,OAAS,WAAAC,EAAS,QAAAC,EAAM,aAAAC,EAAW,QAAAC,MAAY,4BAC/C,OAAOC,MAAe,wBAEtB,OAAS,6BAAAC,MAAiC,aAC1C,OAAS,WAAAC,EAAS,gBAAAC,EAAc,kBAAAC,EAAgB,eAAAC,MAAmB,mBACnE,OAAS,iBAAAC,MAAqB,mBAC9B,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAE3B,MAAMC,EAAmB,CAAC,CAAE,KAAM,CAAE,iBAAAC,CAAiB,EAAI,CAAC,EAAG,MAAAC,CAAM,IAA6B,CAC9F,KAAM,CAACC,EAAUC,CAAW,EAAIlB,EAAS,EAAK,EAC9C,QAAQ,IAAI,mBAAoBe,CAAgB,EAEhD,MAAMI,EAAaR,EAAc,CAAE,MAAO,qBAAsB,CAAC,EAEjEb,EAAU,IAAM,CACdoB,EAAYC,CAAU,CACxB,EAAG,CAACA,CAAU,CAAC,EAEf,MAAMC,EAAUrB,EAAQ,IAEpBgB,GAAkB,cAAc,KAAMM,GAAeA,GAAO,YAAcf,EAA0B,KAAK,GACrG,SAAW,CAAC,EAEjB,CAACS,CAAgB,CAAC,EAYrB,OACElB,EAACM,EAAA,CAAU,eAAe,oDACxB,UAAAP,EAACM,EAAA,CAAK,KAAMa,GAAkB,MAAO,UAAU,mDAAmD,EACjGA,GAAkB,cAAc,IAAKM,GAAe,CACnD,GAAIA,GAAO,YAAcf,EAA0B,OACjD,OAAOV,EAAC0B,EAAA,CAAoB,KAAMD,EAAO,SAAUL,GAAO,OAAQ,EAEpE,GAAIK,GAAO,YAAcf,EAA0B,MAC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UAAO,UAAU,yCAAyC,QAAS,IAAMmD,IAAkB,EAC1F,UAAApD,EAACc,EAAA,CAAY,MAAO,GAAI,OAAQ,GAAI,UAAU,WAAW,EACzDd,EAACM,EAAA,CACC,GAAG,IACH,KAAMkB,GAAS,QACf,UAAU,wFACZ,GACF,EACCH,GACCrB,EAAC,UACC,SAAAA,EAACa,EAAA,CAAe,MAAO,GAAI,OAAQ,GAAI,EACzC,GAEJ,EACF,EAIJ,IAAOwC,EAAQpC,EAAWC,CAAgB",
|
|
6
|
+
"names": ["jsx", "jsxs", "useEffect", "useMemo", "useState", "Picture", "Text", "Container", "Link", "Subscribe", "FooterNavigationBlockType", "AddIcon", "SubtractIcon", "ArrowRightIcon", "CountryIcon", "useMediaQuery", "cn", "withLayout", "FooterNavigation", "footerNavigation", "event", "isMobile", "setIsMobile", "mediaQuery", "country", "block", "MarketingConversion", "FooterBrand", "MainServices", "data", "onSubmit", "enjoyItem", "benefitItem", "mainNavMenuOpen", "setMainNavMenuOpen", "services", "mainNav", "reasonItem", "DownloadApp", "MainNavMenu", "contactItem", "ChangeCountry", "socialItem", "paymentItem", "brandItem", "policyItem", "title", "lists", "className", "productItem", "apps", "appItem", "onChangeCountry", "FooterNavigation_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FooterNavigationProps {
|
|
2
|
+
data: any;
|
|
3
|
+
event?: {
|
|
4
|
+
signup?: () => void;
|
|
5
|
+
download?: () => void;
|
|
6
|
+
country?: () => void;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare enum FooterNavigationBlockType {
|
|
10
|
+
Signup = "ipc-footer-signup",
|
|
11
|
+
Main = "ipc-footer-main",
|
|
12
|
+
Brand = "ipc-footer-brand"
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/FooterNavigation/types.ts"],
|
|
4
|
+
"sourcesContent": ["export interface FooterNavigationProps {\n data: any\n event?: {\n signup?: () => void\n download?: () => void\n country?: () => void\n }\n}\n\nexport enum FooterNavigationBlockType {\n Signup = 'ipc-footer-signup',\n Main = 'ipc-footer-main',\n Brand = 'ipc-footer-brand',\n}\n"],
|
|
5
|
+
"mappings": "AASO,IAAKA,OACVA,EAAA,OAAS,oBACTA,EAAA,KAAO,kBACPA,EAAA,MAAQ,mBAHEA,OAAA",
|
|
6
|
+
"names": ["FooterNavigationBlockType"]
|
|
7
|
+
}
|
|
@@ -7,10 +7,20 @@ type GraphicType = {
|
|
|
7
7
|
textColor?: string;
|
|
8
8
|
href?: string;
|
|
9
9
|
video?: Video;
|
|
10
|
+
mobileVideo?: Video;
|
|
10
11
|
youtubeId?: string;
|
|
11
12
|
isYouTube?: boolean;
|
|
13
|
+
isShowIcon?: boolean;
|
|
12
14
|
buttonText?: string;
|
|
15
|
+
icon?: Img;
|
|
13
16
|
theme?: Theme;
|
|
17
|
+
extension?: {
|
|
18
|
+
text: string;
|
|
19
|
+
textDesc: string;
|
|
20
|
+
textTitle: string;
|
|
21
|
+
textPcImg: Img;
|
|
22
|
+
textMobileImg: Img;
|
|
23
|
+
};
|
|
14
24
|
};
|
|
15
25
|
export interface GraphicProps extends ComponentCommonProps {
|
|
16
26
|
className?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useMediaQuery as G}from"react-responsive";import S,{useEffect as E,useImperativeHandle as B,useRef as H,useState as r}from"react";import{cn as m}from"../../helpers/utils.js";import{withLayout as L}from"../../shared/Styles.js";import D from"../SwiperBox/index.js";import{Button as U,Heading as z}from"../../components/index.js";import{Picture as v,Text as j}from"../../components/index.js";import R from"../Title/index.js";import{VideoModal as $}from"../VideoModal/index.js";import{TextModal as q}from"../TextModal/index.js";import{useExposure as F}from"../../hooks/useExposure.js";import{trackUrlRef as y}from"../../shared/trackUrlRef.js";const h="image",u="graphic",Y=({data:e,configuration:l})=>{const d=()=>{switch(l.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[346] tablet:aspect-h-[360] laptop:aspect-w-[440] laptop:aspect-h-[360] desktop:aspect-w-[648] desktop:aspect-h-[384] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[427] desktop:aspect-h-[384] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[480]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[316] desktop:aspect-h-[384] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480]"}};function f(s){throw new Error("Function not implemented.")}function p(s){throw new Error("Function not implemented.")}function b(s){throw new Error("Function not implemented.")}return t("div",{className:m(d(),"laptop:h-auto text-info-primary md-tablet:h-[360px] flex-1 shrink-0 md:basis-[296px]",{"aiui-dark":e.theme==="dark"}),children:t("div",{className:m("absolute inset-0",{"rounded-xl overflow-hidden laptop:rounded-2xl":l?.itemShape==="round"}),children:n("a",{"aria-label":e?.title??e?.description,href:y(e?.href,`${h}_${u}`),className:"relative block size-full cursor-pointer overflow-hidden",children:[t(v,{className:"h-full",imgClassName:"h-full object-cover tablet:hover:scale-110 transition-all duration-300",source:e?.imgUrl?.url,alt:e?.imgUrl?.alt||""}),n("div",{className:"laptop:p-6 absolute bottom-0 z-[1] box-border flex w-full flex-col p-4",children:[n("div",{className:m("flex items-end overflow-hidden","graphic-bottom"),children:[n("div",{className:"flex-1 overflow-hidden",children:[t(j,{html:e?.title,style:{color:e?.textColor},className:"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base text-sm font-bold leading-[1.2]"}),e?.description&&t(z,{html:e?.description,style:{color:e?.textColor},as:"h3",className:"graphic-description lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 line-clamp-3 flex-1 text-[24px] font-bold leading-[1.2]"})]}),!e?.isShowIcon&&(e?.video?.url||e?.youtubeId)&&t("button",{"aria-label":"Play Video",onClick:s=>{s.preventDefault(),s.stopPropagation(),l?.onVideoPlayBtnClick?.(l?.index||0,e)},className:"laptop:size-12 flex size-10 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:t("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})}),e?.isShowIcon&&e?.icon?.url&&t("button",{onClick:s=>{s.preventDefault(),s.stopPropagation(),l?.onIconClick?.(e,l)},className:" laptop:size-9 flex size-6 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:t(v,{className:"h-full",imgClassName:"h-full object-cover",source:e?.icon?.url,alt:e?.icon?.alt||""})})]}),e.buttonText&&t(U,{as:"a","aria-label":e?.title??e?.description,variant:"secondary",className:"desktop:mt-[24px] mt-[12px] self-start",href:y(e?.href,`${h}_${u}`),children:e.buttonText})]})]})})})},k=S.forwardRef(({data:e,className:l},d)=>{const f=G({query:"(max-width: 768px)"}),p=H(null),[b,s]=r(!1),[g,T]=r(""),[I,M]=r(""),[V,N]=r(""),[C,w]=r(null),[P,x]=r(!1),c=i=>{const o=e?.items?.length>3,a=e?.items?.length>2;switch(i){case 1440:return o?4:e?.items?.length;case 1024:return o?3:e?.items?.length;case 768:return o||a?2.3:2;default:return 1.2}};return B(d,()=>p.current),F(p,{componentType:h,componentName:u,componentTitle:e?.title}),E(()=>{const i=p.current?.querySelectorAll(".graphic-description");if(i&&i.length>0){let o=0;i.forEach(a=>{o=Math.max(o,a.offsetHeight)}),i.forEach(a=>{a.style.height=`${o}px`})}},[]),n("div",{className:l,ref:p,children:[n("div",{className:"graphic-box",children:[e?.title&&t(R,{data:{title:e?.title}}),t(D,{id:"Graphic",className:m("!overflow-visible"),data:{list:e?.items||[],configuration:{itemShape:e.itemShape,num:e?.items?.length||0,onVideoPlayBtnClick:(i,o)=>{s(!0),o?.isYouTube?M?.(o?.youtubeId||""):(T?.(o?.video?.url||""),N?.(o?.mobileVideo?.url||""))},onIconClick:i=>{x(!0),w(i)}}},Slide:Y,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:c()},768:{spaceBetween:16,freeMode:!1,slidesPerView:c(768)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:c(1024)},1440:{spaceBetween:16,freeMode:!1,slidesPerView:c(1440)}}})]}),t($,{visible:b,youTubeId:I,onCloseModal:()=>s(!1),videoUrl:f&&V||g}),t(q,{textVisible:P,extension:C?.extension,onCloseModal:()=>{x(!1),w(null)}})]})});k.displayName="Graphic";var se=L(k);export{se as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/biz-components/Graphic/index.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Button, Heading } from '../../components/index.js'\nimport { Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport type { ComponentCommonProps, Video, Img, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\n\nconst componentType = 'image'\nconst componentName = 'graphic'\n\ntype GraphicType = {\n imgUrl: Img\n title: string\n description?: string\n textColor?: string\n href?: string\n video?: Video\n youtubeId?: string\n isYouTube?: boolean\n buttonText?: string\n theme?: Theme\n}\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: GraphicType[]\n itemShape?: 'round' | 'square'\n itemTheme?: Theme\n }\n}\n\nconst Item = ({ data, configuration }: { data: GraphicType; configuration?: any }) => {\n const handleAspect = () => {\n switch (configuration.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[346] tablet:aspect-h-[360] laptop:aspect-w-[440] laptop:aspect-h-[360] desktop:aspect-w-[648] desktop:aspect-h-[384] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[427] desktop:aspect-h-[384] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[480]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[316] desktop:aspect-h-[384] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480]'\n }\n }\n\n return (\n <div\n className={cn(\n handleAspect(),\n 'laptop:h-auto text-info-primary md-tablet:h-[360px] flex-1 shrink-0 md:basis-[296px]',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n <div\n className={cn('absolute inset-0', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: configuration?.itemShape === 'round',\n })}\n >\n <a\n aria-label={data?.title ?? data?.description}\n href={trackUrlRef(data?.href, `${componentType}_${componentName}`)}\n className=\"relative block size-full cursor-pointer overflow-hidden\"\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n source={data?.imgUrl?.url}\n alt={data?.imgUrl?.alt || ''}\n />\n <div className=\"laptop:p-6 absolute bottom-0 z-[1] box-border flex w-full flex-col p-4\">\n <div className={cn('flex items-end overflow-hidden', 'graphic-bottom')}>\n <div className=\"flex-1 overflow-hidden\">\n <Text\n html={data?.title}\n style={{ color: data?.textColor }}\n // eslint-disable-next-line tailwindcss/classnames-order\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base text-sm font-bold leading-[1.2]\"\n />\n {data?.description && (\n <Heading\n html={data?.description}\n style={{\n color: data?.textColor,\n }}\n as=\"h3\"\n className=\"graphic-description lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 line-clamp-3 flex-1 text-[24px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n {(data?.video?.url || data?.youtubeId) && (\n <button\n aria-label=\"Play Video\"\n onClick={(e: any) => {\n e.preventDefault()\n e.stopPropagation()\n configuration?.onVideoPlayBtnClick?.(configuration?.index || 0, data)\n }}\n className=\"laptop:size-12 flex size-10 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n {data.buttonText && (\n <Button\n as=\"a\"\n aria-label={data?.title ?? data?.description}\n variant=\"secondary\"\n className=\"desktop:mt-[24px] mt-[12px] self-start\"\n href={trackUrlRef(data?.href, `${componentType}_${componentName}`)}\n >\n {data.buttonText}\n </Button>\n )}\n </div>\n </a>\n </div>\n </div>\n )\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, className, ...props }, ref) => {\n const innerRef = useRef<HTMLDivElement>(null)\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n\n const handleSwiperShow = (width?: number) => {\n const isShow = (data?.items as GraphicType[])?.length > 3\n const isMobile = (data?.items as GraphicType[])?.length > 2\n switch (width) {\n case 1440:\n return isShow ? 4 : data?.items?.length\n case 1024:\n return isShow ? 3 : data?.items?.length\n case 768:\n return isShow ? 2.3 : isMobile ? 2.3 : 2\n default:\n return 1.2\n }\n }\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 const descriptions = innerRef.current?.querySelectorAll<HTMLDivElement>('.graphic-description')\n if (descriptions && descriptions.length > 0) {\n let maxHeight = 0\n descriptions.forEach((el: HTMLDivElement) => {\n maxHeight = Math.max(maxHeight, el.offsetHeight)\n })\n descriptions.forEach((el: HTMLDivElement) => {\n el.style.height = `${maxHeight}px`\n })\n }\n }, [])\n\n return (\n <div className={className} ref={innerRef}>\n <div className=\"graphic-box\">\n {data?.title && <Title data={{ title: data?.title }} />}\n <SwiperBox\n id=\"Graphic\"\n className={cn('!overflow-visible')}\n data={{\n list: data?.items || [],\n configuration: {\n itemShape: data.itemShape,\n num: data?.items?.length || 0,\n onVideoPlayBtnClick: (_: number, data: GraphicType) => {\n setVisible(true)\n if (data?.isYouTube) {\n setYouTubeId?.(data?.youtubeId || '')\n } else {\n setVideoUrl?.(data?.video?.url || '')\n }\n },\n },\n }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: handleSwiperShow(),\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(768),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1024),\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1440),\n },\n }}\n />\n </div>\n <VideoModal visible={visible} youTubeId={youTubeId} videoUrl={videoUrl} onCloseModal={() => setVisible(false)} />\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withLayout(Graphic)\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "useEffect", "useImperativeHandle", "useRef", "useState", "cn", "withLayout", "SwiperBox", "Button", "Heading", "Picture", "Text", "Title", "VideoModal", "useExposure", "trackUrlRef", "componentType", "componentName", "Item", "data", "configuration", "e", "Graphic", "className", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport { useMediaQuery } from 'react-responsive'\nimport React, { useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Button, Heading } from '../../components/index.js'\nimport { Picture, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { TextModal } from '../TextModal/index.js'\nimport type { ComponentCommonProps, Video, Img, Theme } from '../../types/props.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport type { Media } from '../../types/props.js'\n\nconst componentType = 'image'\nconst componentName = 'graphic'\n\ntype GraphicType = {\n imgUrl: Img\n title: string\n description?: string\n textColor?: string\n href?: string\n video?: Video\n mobileVideo?: Video\n youtubeId?: string\n isYouTube?: boolean\n isShowIcon?: boolean\n buttonText?: string\n icon?: Img\n theme?: Theme\n extension?: {\n text: string\n textDesc: string\n textTitle: string\n textPcImg: Img\n textMobileImg: Img\n }\n // textPcImg?: Img\n // textMobileImg?: Img\n // text?: string\n // textDesc?: string\n // textTitle?: string\n}\nexport interface GraphicProps extends ComponentCommonProps {\n className?: string\n data: {\n title?: string\n items?: GraphicType[]\n itemShape?: 'round' | 'square'\n itemTheme?: Theme\n }\n}\n\nconst Item = ({ data, configuration }: { data: GraphicType; configuration?: any }) => {\n const handleAspect = () => {\n switch (configuration.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[346] tablet:aspect-h-[360] laptop:aspect-w-[440] laptop:aspect-h-[360] desktop:aspect-w-[648] desktop:aspect-h-[384] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[480]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[427] desktop:aspect-h-[384] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[480]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[360] laptop:aspect-w-[288] laptop:aspect-h-[360] desktop:aspect-w-[316] desktop:aspect-h-[384] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[480]'\n }\n }\n\n function setVisible(arg0: boolean) {\n throw new Error('Function not implemented.')\n }\n\n function setTextVisible(arg0: boolean) {\n throw new Error('Function not implemented.')\n }\n\n function setCurrentItem(data: GraphicType) {\n throw new Error('Function not implemented.')\n }\n\n return (\n <div\n className={cn(\n handleAspect(),\n 'laptop:h-auto text-info-primary md-tablet:h-[360px] flex-1 shrink-0 md:basis-[296px]',\n {\n 'aiui-dark': data.theme === 'dark',\n }\n )}\n >\n <div\n className={cn('absolute inset-0', {\n ['rounded-xl overflow-hidden laptop:rounded-2xl']: configuration?.itemShape === 'round',\n })}\n >\n <a\n aria-label={data?.title ?? data?.description}\n href={trackUrlRef(data?.href, `${componentType}_${componentName}`)}\n className=\"relative block size-full cursor-pointer overflow-hidden\"\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n source={data?.imgUrl?.url}\n alt={data?.imgUrl?.alt || ''}\n />\n <div className=\"laptop:p-6 absolute bottom-0 z-[1] box-border flex w-full flex-col p-4\">\n <div className={cn('flex items-end overflow-hidden', 'graphic-bottom')}>\n <div className=\"flex-1 overflow-hidden\">\n <Text\n html={data?.title}\n style={{ color: data?.textColor }}\n // eslint-disable-next-line tailwindcss/classnames-order\n className=\"graphic-title line-clamp-3 lg-desktop:text-lg desktop:text-base text-sm font-bold leading-[1.2]\"\n />\n {data?.description && (\n <Heading\n html={data?.description}\n style={{\n color: data?.textColor,\n }}\n as=\"h3\"\n className=\"graphic-description lg-desktop:text-[32px] desktop:mt-2 desktop:text-[24px] text-lines-2 mt-1 line-clamp-3 flex-1 text-[24px] font-bold leading-[1.2]\"\n />\n )}\n </div>\n {!data?.isShowIcon && (data?.video?.url || data?.youtubeId) && (\n <button\n aria-label=\"Play Video\"\n onClick={(e: any) => {\n e.preventDefault()\n e.stopPropagation()\n configuration?.onVideoPlayBtnClick?.(configuration?.index || 0, data)\n }}\n className=\"laptop:size-12 flex size-10 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n {data?.isShowIcon && data?.icon?.url && (\n <button\n onClick={(e: any) => {\n e.preventDefault()\n e.stopPropagation()\n configuration?.onIconClick?.(data, configuration)\n }}\n className=\" laptop:size-9 flex size-6 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <Picture\n className=\"h-full\"\n imgClassName=\"h-full object-cover\"\n source={data?.icon?.url}\n alt={data?.icon?.alt || ''}\n />\n </button>\n )}\n </div>\n {data.buttonText && (\n <Button\n as=\"a\"\n aria-label={data?.title ?? data?.description}\n variant=\"secondary\"\n className=\"desktop:mt-[24px] mt-[12px] self-start\"\n href={trackUrlRef(data?.href, `${componentType}_${componentName}`)}\n >\n {data.buttonText}\n </Button>\n )}\n </div>\n </a>\n </div>\n </div>\n )\n}\n\nconst Graphic = React.forwardRef<HTMLDivElement, GraphicProps>(({ data, className }, ref) => {\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const innerRef = useRef<HTMLDivElement>(null)\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const [mobileVideoUrl, setMobileVideoUrl] = useState<string>('')\n const [currentItem, setCurrentItem] = useState<GraphicType | null>(null)\n const [textVisible, setTextVisible] = useState<boolean>(false)\n\n const handleSwiperShow = (width?: number) => {\n const isShow = (data?.items as GraphicType[])?.length > 3\n const isMobile = (data?.items as GraphicType[])?.length > 2\n switch (width) {\n case 1440:\n return isShow ? 4 : data?.items?.length\n case 1024:\n return isShow ? 3 : data?.items?.length\n case 768:\n return isShow ? 2.3 : isMobile ? 2.3 : 2\n default:\n return 1.2\n }\n }\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 const descriptions = innerRef.current?.querySelectorAll<HTMLDivElement>('.graphic-description')\n if (descriptions && descriptions.length > 0) {\n let maxHeight = 0\n descriptions.forEach((el: HTMLDivElement) => {\n maxHeight = Math.max(maxHeight, el.offsetHeight)\n })\n descriptions.forEach((el: HTMLDivElement) => {\n el.style.height = `${maxHeight}px`\n })\n }\n }, [])\n\n return (\n <div className={className} ref={innerRef}>\n <div className=\"graphic-box\">\n {data?.title && <Title data={{ title: data?.title }} />}\n <SwiperBox\n id=\"Graphic\"\n className={cn('!overflow-visible')}\n data={{\n list: data?.items || [],\n configuration: {\n itemShape: data.itemShape,\n num: data?.items?.length || 0,\n onVideoPlayBtnClick: (_: number, data: GraphicType) => {\n setVisible(true)\n if (data?.isYouTube) {\n setYouTubeId?.(data?.youtubeId || '')\n } else {\n setVideoUrl?.(data?.video?.url || '')\n setMobileVideoUrl?.(data?.mobileVideo?.url || '')\n }\n },\n onIconClick: (data: GraphicType) => {\n setTextVisible(true)\n setCurrentItem(data)\n },\n },\n }}\n Slide={Item}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: handleSwiperShow(),\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(768),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1024),\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1440),\n },\n }}\n />\n </div>\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n onCloseModal={() => setVisible(false)}\n videoUrl={isMobile ? mobileVideoUrl || videoUrl : videoUrl}\n />\n <TextModal\n textVisible={textVisible}\n extension={currentItem?.extension}\n onCloseModal={() => {\n setTextVisible(false)\n setCurrentItem(null)\n }}\n />\n </div>\n )\n})\n\nGraphic.displayName = 'Graphic'\n\nexport default withLayout(Graphic)\n"],
|
|
5
|
+
"mappings": "aAsGU,cAAAA,EAQI,QAAAC,MARJ,oBArGV,OAAS,iBAAAC,MAAqB,mBAC9B,OAAOC,GAAS,aAAAC,EAAW,uBAAAC,EAAqB,UAAAC,EAAQ,YAAAC,MAAgB,QACxE,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAe,wBACtB,OAAS,UAAAC,EAAQ,WAAAC,MAAe,4BAChC,OAAS,WAAAC,EAAS,QAAAC,MAAY,4BAC9B,OAAOC,MAAW,oBAClB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,aAAAC,MAAiB,wBAE1B,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,eAAAC,MAAmB,8BAG5B,MAAMC,EAAgB,QAChBC,EAAgB,UAuChBC,EAAO,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAAkD,CACpF,MAAMC,EAAe,IAAM,C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EAAeN,CAAI,CACrB,CACF,CACF,EACA,MAAOD,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeuB,EAAiB,CAClC,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,GAAG,CACrC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,CACF,EACF,GACF,EACA7C,EAACgB,EAAA,CACC,QAASoB,EACT,UAAWG,EACX,aAAc,IAAMb,EAAW,EAAK,EACpC,SAAUQ,GAAWO,GAAkBJ,EACzC,EACArC,EAACiB,EAAA,CACC,YAAa2B,EACb,UAAWD,GAAa,UACxB,aAAc,IAAM,CAClBf,EAAe,EAAK,EACpBC,EAAe,IAAI,CACrB,EACF,GACF,CAEJ,CAAC,EAEDE,EAAQ,YAAc,UAEtB,IAAOqB,GAAQ3C,EAAWsB,CAAO",
|
|
6
|
+
"names": ["jsx", "jsxs", "useMediaQuery", "React", "useEffect", "useImperativeHandle", "useRef", "useState", "cn", "withLayout", "SwiperBox", "Button", "Heading", "Picture", "Text", "Title", "VideoModal", "TextModal", "useExposure", "trackUrlRef", "componentType", "componentName", "Item", "data", "configuration", "handleAspect", "setVisible", "arg0", "setTextVisible", "setCurrentItem", "e", "Graphic", "className", "ref", "isMobile", "innerRef", "visible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "mobileVideoUrl", "setMobileVideoUrl", "currentItem", "textVisible", "handleSwiperShow", "width", "isShow", "descriptions", "maxHeight", "el", "_", "Graphic_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GraphicOverlayProps } from './types';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<GraphicOverlayProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
data?: Record<string, any>;
|
|
6
|
+
}, "ref"> & React.RefAttributes<any>>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export type { GraphicOverlayProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as p}from"react/jsx-runtime";import G,{useState as b,useEffect as S,useRef as z}from"react";import{useMediaQuery as O}from"react-responsive";import{withLayout as U}from"../../shared/Styles.js";import T from"../../components/picture.js";import I from"../../components/button.js";import{Heading as V}from"../../components/heading.js";import{VideoModal as R}from"../VideoModal/index.js";import{cn as x}from"../../helpers/utils.js";import E from"../SwiperBox/index.js";import{isVideo as L}from"../../shared/mimeType.js";import{useExposure as _}from"../../hooks/useExposure.js";import{trackUrlRef as N}from"../../shared/trackUrlRef.js";const v="image",w="p1_banner",j=({data:s,configuration:i,jIndex:g,spanType:r})=>{const[m,u]=b(!1),h=O({query:"(max-width: 768px)"}),f=z(null),y=()=>{switch(i?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[346] tablet:aspect-h-[400] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};_(f,{componentType:v,componentName:w,position:g,componentTitle:s.title,componentDescription:s.description,navigation:i?.activeTab}),S(()=>{u(h)},[h]);const{theme:k="light",title:n,description:o,imageUrl:t,primaryButton:a,secondaryButton:l,imageMobileUrl:c,blockLink:d,video:B,youtubeId:M,isYouTube:C}=s,P="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return p("div",{className:x("item-wrapper text-info-primary group relative box-border w-full overflow-hidden",y(),{"rounded-2xl":i?.shape==="rounded","aiui-dark":k==="dark","h-[400px]":m},"text-info-primary"),ref:f,children:[d&&e("a",{className:"absolute inset-0 z-10",href:N(d,`${v}_${w}`),"aria-hidden":"true",tabIndex:-1}),p("div",{className:"absolute inset-0",children:[L(t?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden h-full overflow-hidden",children:e("source",{src:t?.url,type:"video/mp4"})}):e(T,{source:t?.url,alt:t?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${t?.width}/${t?.height}`}}),L(c?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block h-full overflow-hidden",children:e("source",{src:c?.url,type:"video/mp4"})}):e(T,{source:c?.url||t?.url,alt:c?.alt||t?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),p("div",{className:x("laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":s?.width==="full"}),children:[p("div",{children:[e(V,{size:3,as:"h3",className:"item-title",html:n}),e(V,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:o})]}),p("div",{className:"lg-desktop:gap-3 flex gap-2",children:[l&&l.text&&p(I,{"aria-label":n??o,className:P,variant:"secondary",as:"a",href:N(l.link,`${v}_${w}`),children:[l.text,e("span",{className:"sr-only",children:n??o})]}),a&&a.text&&e(I,{"aria-label":n??o,className:P,variant:"primary",as:"a",href:N(a.link,`${v}_${w}`),children:a.text})]})]})]}),e("div",{children:e("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4",children:(B?.url||M)&&e("button",{onClick:()=>{i?.onVideoPlayBtnClick?.(B?.url||M,C)},className:"laptop:size-12 flex size-10 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:e("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})})]})},$=G.forwardRef((s,i)=>{const{shape:g,items:r=[]}=s.data,[m,u]=b(!1),[h,f]=b(""),[y,k]=b(""),n=(t,a)=>{u(!0),a?k?.(t||""):f?.(t||"")},o=t=>{const a=r?.length,l=a>3,c=a>2,d=a>1;switch(!0){case t>=1440:case t>=1024:return l?3:a;case t>=768:return l||c?2.3:d?2:1;default:return d?1.2:1}};return p("section",{"data-ui-component-id":"GraphicOverlay",ref:i,className:x("text-info-primary",s.className),children:[r&&r.length>0?e(E,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:r||[],configuration:{shape:g,num:r.length,onVideoPlayBtnClick:n}},Slide:j,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:o(374)},768:{spaceBetween:16,freeMode:!1,slidesPerView:o(768)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:o(1024)},1440:{spaceBetween:16,freeMode:!1,slidesPerView:o(1440)}}}):null,m&&e(R,{visible:m,youTubeId:y,videoUrl:h,onCloseModal:()=>u(!1)})]})});$.displayName="GraphicOverlayBlock";var ee=U($);export{ee as default};
|
|
2
|
+
//# sourceMappingURL=GraphicOverlay.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/biz-components/GraphicOverlay/GraphicOverlay.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { GraphicOverlayProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n spanType,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[346] tablet:aspect-h-[400] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-2xl': configuration?.shape === 'rounded',\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(blockLink, `${componentType}_${componentName}`)}\n aria-hidden=\"true\"\n tabIndex={-1}\n ></a>\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden h-full overflow-hidden\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block h-full overflow-hidden\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div>\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={lgButtonSize}\n variant=\"secondary\"\n as=\"a\"\n href={trackUrlRef(secondaryButton.link, `${componentType}_${componentName}`)}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={lgButtonSize}\n variant=\"primary\"\n as=\"a\"\n href={trackUrlRef(primaryButton.link, `${componentType}_${componentName}`)}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 flex size-10 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst GraphicOverlay = React.forwardRef<HTMLDivElement, GraphicOverlayProps>((props, ref) => {\n const { shape, items = [] } = props.data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n\n const handleSwiperShow = (width: number) => {\n const len = items?.length\n const isShow = len > 3\n const isMiddle = len > 2\n const isMobile = len > 1\n\n switch (true) {\n case width >= 1440:\n case width >= 1024:\n return isShow ? 3 : len\n case width >= 768:\n if (isShow || isMiddle) {\n return 2.3\n }\n return isMobile ? 2 : 1\n default:\n return isMobile ? 1.2 : 1\n }\n }\n\n return (\n <section data-ui-component-id=\"GraphicOverlay\" ref={ref} className={cn('text-info-primary', props.className)}>\n {items && items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: items || [],\n configuration: { shape: shape, num: items.length, onVideoPlayBtnClick: handleVideoPlayBtnClick },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: handleSwiperShow(374),\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(768),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1024),\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1440),\n },\n }}\n />\n ) : null}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nGraphicOverlay.displayName = 'GraphicOverlayBlock'\n\nexport default withLayout(GraphicOverlay)\nexport type { GraphicOverlayProps }\n"],
|
|
5
|
+
"mappings": "AAyFQ,cAAAA,EAyCE,QAAAC,MAzCF,oBAzFR,OAAOC,GAAS,YAAAC,EAAU,aAAAC,EAAW,UAAAC,MAAc,QACnD,OAAS,iBAAAC,MAAqB,mBAE9B,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,MAAAC,MAAU,yBACnB,OAAOC,MAAe,wBACtB,OAAS,WAAAC,MAAe,2BACxB,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,eAAAC,MAAmB,8BAE5B,MAAMC,EAAgB,QAChBC,EAAgB,YAEhBC,EAAY,CAAC,CACjB,KAAMC,EACN,cAAAC,EACA,OAAAC,EACA,SAAAC,CACF,IAKM,CACJ,KAAM,CAACC,EAAUC,CAAW,EAAItB,EAAkB,EAAK,EACjDuB,EAAapB,EAAc,CAAE,MAAO,oBAAqB,CAAC,EAE1DqB,EAAMtB,EAAuB,IAAI,EAEjCuB,EAAe,IAAM,CACzB,OAAQP,GAAe,IAAK,CAC1B,IAAK,GACH,MAAO,8LACT,IAAK,GACH,MAAO,4LACT,IAAK,GACH,MAAO,4LACT,QACE,MAAO,2LACX,CACF,EAEAN,EAAYY,EAAK,CACf,cAAeV,EACf,cAAeC,EACf,SAAUI,EACV,eAAgBF,EAAK,MACrB,qBAAsBA,EAAK,YAC3B,WAAYC,GAAe,SAC7B,CAAC,EAEDjB,EAAU,IAAM,CACdqB,EAAYC,CAAU,CACxB,EAAG,CAACA,CAAU,CAAC,EAEf,KAAM,CACJ,MAAAG,EAAQ,QACR,MAAAC,EACA,YAAAC,EACA,SAAAC,EACA,cAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,UAAAC,EACA,MAAAC,EACA,UAAAC,EACA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AAoBC,GAAkB,CAC1C,MAAMC,EAAMX,GAAO,OACbY,EAASD,EAAM,EACfE,EAAWF,EAAM,EACjB/B,EAAW+B,EAAM,EAEvB,OAAQ,GAAM,CACZ,KAAKD,GAAS,KACd,KAAKA,GAAS,KACZ,OAAOE,EAAS,EAAID,EACtB,KAAKD,GAAS,IACZ,OAAIE,GAAUC,EACL,IAEFjC,EAAW,EAAI,EACxB,QACE,OAAOA,EAAW,IAAM,CAC5B,CACF,EAEA,OACEvB,EAAC,WAAQ,uBAAqB,iBAAiB,IAAK0B,EAAK,UAAWf,EAAG,oBAAqB8B,EAAM,SAAS,EACxG,UAAAE,GAASA,EAAM,OAAS,EACvB5C,EAACa,EAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CACJ,KAAM+B,GAAS,CAAC,EAChB,cAAe,CAAE,MAAOD,EAAO,IAAKC,EAAM,OAAQ,oBAAqBO,CAAwB,CACjG,EACA,MAAOhC,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAekC,EAAiB,GAAG,CACrC,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,GAAG,CACrC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,CACF,EACF,EACE,KACHR,GACC7C,EAACW,EAAA,CACC,QAASkC,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CAAC,EAEDL,EAAe,YAAc,sBAE7B,IAAOiB,GAAQnD,EAAWkC,CAAc",
|
|
6
|
+
"names": ["jsx", "jsxs", "React", "useState", "useEffect", "useRef", "useMediaQuery", "withLayout", "Picture", "Button", "Heading", "VideoModal", "cn", "SwiperBox", "isVideo", "useExposure", "trackUrlRef", "componentType", "componentName", "ItemBlock", "item", "configuration", "jIndex", "spanType", "isMobile", "setIsMobile", "mediaQuery", "ref", "handleAspect", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "imageMobileUrl", "blockLink", "video", "youtubeId", "isYouTube", "lgButtonSize", "GraphicOverlay", "props", "shape", "items", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "handleVideoPlayBtnClick", "url", "handleSwiperShow", "width", "len", "isShow", "isMiddle", "GraphicOverlay_default"]
|
|
7
|
+
}
|