@fox-dls/carousels 0.0.1 → 1.0.3

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/lib/pills/styles/index.tsx","../src/lib/pills/index.tsx","../src/lib/styles/index.tsx","../src/lib/card/styles/index.tsx","../src/lib/card/index.tsx","../src/lib/free/styles/index.tsx","../src/lib/free/index.tsx","../src/lib/pagination/styles/index.tsx","../src/lib/pagination/index.tsx"],"sourcesContent":["import ButtonUnstyled from '@mui/core/ButtonUnstyled';\nimport styled from 'styled-components';\n// eslint-disable-next-line import/extensions\nimport { Swiper } from 'swiper/react';\n\nexport const CarouselContainer = styled.div``;\n\nexport const CarouselSwiper = styled(Swiper)`\n margin: 0px !important;\n .swiper-wrapper {\n .swiper-slide {\n scroll-snap-align: start !important;\n width: auto !important;\n }\n }\n`;\n\nexport const CarouselPillContainer = styled.div`\n display: inline-block !important;\n padding-right: 8px !important;\n padding-top: 4px !important;\n padding-bottom: 4px !important;\n`;\n\nexport const CarouselPill = styled(ButtonUnstyled)<any>`\n -webkit-box-pack: center !important;\n -webkit-box-align: center !important;\n appearance: none !important;\n display: inline-flex !important;\n border-radius: 50% !important;\n border: 1px solid rgb(221, 221, 221) !important;\n outline: none !important;\n margin: 0px !important;\n padding: 0px !important;\n color: rgb(34, 34, 34) !important;\n cursor: pointer !important;\n touch-action: manipulation !important;\n position: relative !important;\n background: transparent !important;\n transition: -ms-transform 0.25s ease 0s, -webkit-transform 0.25s ease 0s,\n transform 0.25s ease 0s !important;\n align-items: center !important;\n justify-content: center !important;\n width: 36px !important;\n height: 36px !important;\n ::before {\n content: '' !important;\n display: block !important;\n position: absolute !important;\n top: 50% !important;\n left: 50% !important;\n transform: translate(-50%, -50%) !important;\n width: 36px !important;\n height: 36px !important;\n border-radius: 50% !important;\n border: 1px solid rgb(221, 221, 221) !important;\n }\n`;\n","/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable unused-imports/no-unused-vars */\nimport React, { useRef, useState } from 'react';\n\nimport { css } from 'styled-components';\nimport SwiperCore, { Navigation } from 'swiper';\n// eslint-disable-next-line import/extensions\nimport { SwiperSlide } from 'swiper/react';\n\nimport { CarouselSwiper, CarouselPillContainer, CarouselPill } from './styles';\n\nSwiperCore.use([Navigation]);\n\nexport const PillsCarousel: React.FC<any> = ({\n children,\n navigation,\n title,\n controls,\n arrows,\n ...props\n}) => {\n const prevRef = useRef<any>(null);\n const nextRef = useRef<any>(null);\n const [swiperSlides, setSwiperSlides] = useState<any>({\n progress: 0,\n isBeginning: true,\n isEnd: false\n });\n const [swiper, setSwiper] = useState<any>(null);\n return (\n <div\n css={`\n display: flex !important;\n position: relative !important;\n min-width: 0px !important;\n `}\n >\n <div\n css={`\n position: absolute !important;\n left: 0px !important;\n z-index: 3 !important;\n width: 65px !important;\n background: linear-gradient(\n to right,\n rgb(255, 255, 255) 56.77%,\n rgba(255, 255, 255, 0) 94.47%\n ) !important;\n ${swiperSlides.isBeginning &&\n css`\n display: none !important;\n visibility: hidden !important;\n `}\n `}\n >\n {arrows && (\n <CarouselPillContainer>\n <CarouselPill\n left={+true}\n ref={prevRef}\n aria-label=\"Previous\"\n type=\"button\"\n onClick={() => swiper.slidePrev()}\n >\n <span\n css={`\n position: relative !important;\n `}\n >\n <svg\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n focusable=\"false\"\n css={`\n display: block;\n fill: none;\n height: 12px;\n width: 12px;\n stroke: currentcolor;\n stroke-width: 5.33333;\n overflow: visible;\n `}\n >\n <g fill=\"none\">\n <path d=\"m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932\" />\n </g>\n </svg>\n </span>\n </CarouselPill>\n </CarouselPillContainer>\n )}\n </div>\n\n <CarouselSwiper\n {...props}\n cssMode={false}\n slidesPerView=\"auto\"\n onInit={(swiper: any) => {\n setSwiper(swiper);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.prevEl = prevRef.current;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.nextEl = nextRef.current;\n swiper.navigation.init();\n swiper.navigation.update();\n setSwiperSlides({\n progress: swiper.progress,\n isBeginning: swiper.isBeginning,\n isEnd: swiper.isEnd\n });\n // console.log(\"Swiper\", swiper);\n }}\n onSlideChange={swiper => {\n // console.log(\"Swiper Change\", swiper);\n\n setSwiperSlides({\n progress: swiper.progress,\n isBeginning: swiper.isBeginning,\n isEnd: swiper.isEnd\n });\n }}\n >\n {React.Children.map(children, child => (\n <SwiperSlide>\n <div\n css={`\n display: inline-block !important;\n white-space: nowrap !important;\n padding-right: 8px !important;\n padding-top: 4px !important;\n padding-bottom: 4px !important;\n `}\n >\n {child}\n </div>\n </SwiperSlide>\n ))}\n </CarouselSwiper>\n\n <div\n css={`\n -webkit-box-pack: end !important;\n position: absolute !important;\n right: 0px !important;\n z-index: 3 !important;\n width: 75px !important;\n display: flex !important;\n justify-content: flex-end !important;\n background: linear-gradient(\n to left,\n rgb(255, 255, 255) 56.77%,\n rgba(255, 255, 255, 0) 94.47%\n ) !important;\n ${swiperSlides.isEnd &&\n css`\n display: none !important;\n visibility: hidden !important;\n `}\n `}\n >\n {arrows && (\n <CarouselPillContainer>\n <CarouselPill\n right={+true}\n aria-label=\"Next\"\n type=\"button\"\n ref={nextRef}\n onClick={() => swiper.slideNext()}\n >\n <span\n css={`\n position: relative !important;\n `}\n >\n <svg\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n focusable=\"false\"\n css={`\n display: block;\n fill: none;\n height: 12px;\n width: 12px;\n stroke: currentcolor;\n stroke-width: 5.33333;\n overflow: visible;\n `}\n >\n <g fill=\"none\">\n <path d=\"m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932\" />\n </g>\n </svg>\n </span>\n </CarouselPill>\n </CarouselPillContainer>\n )}\n </div>\n </div>\n );\n};\n","import ButtonUnstyled from '@mui/core/ButtonUnstyled';\nimport styled from 'styled-components';\n\nexport const CarouselContainer = styled.div`\n position: relative !important;\n z-index: 0 !important;\n`;\n\nexport const CarouselNavbar = styled.div`\n -webkit-box-pack: justify !important;\n -ms-flex-pack: justify !important;\n -webkit-box-align: center !important;\n -ms-flex-align: center !important;\n color: #222222 !important;\n display: -webkit-box !important;\n display: -moz-box !important;\n display: -ms-flexbox !important;\n display: -webkit-flex !important;\n display: flex !important;\n -webkit-align-items: center !important;\n align-items: center !important;\n -webkit-justify-content: space-between !important;\n justify-content: space-between !important;\n margin-bottom: 16px !important;\n`;\n\nexport const NavbarTitleContainer = styled.div`\n margin-right: 24px !important;\n width: auto !important;\n`;\n\nexport const NavbarTitle = styled.div`\n @media (min-width: 744px) {\n font-size: 32px !important;\n line-height: 36px !important;\n font-weight: 800 !important;\n text-align: left !important;\n color: #222222 !important;\n margin-bottom: 15px !important;\n }\n font-size: 22px !important;\n line-height: 26px !important;\n font-weight: 600 !important;\n margin-bottom: 10px !important;\n`;\n\nexport const NavbarControlsContainer = styled.div`\n display: flex !important;\n align-items: center !important;\n margin-left: auto !important;\n`;\n\nexport const NavbarControlsQuick = styled.a`\n @media (max-width: 744px) {\n display: none !important;\n }\n font-size: inherit !important;\n font-family: inherit !important;\n font-style: inherit !important;\n font-variant: inherit !important;\n line-height: inherit !important;\n color: #222222 !important;\n text-decoration: underline !important;\n border-radius: 4px !important;\n font-weight: 600 !important;\n outline: none !important;\n`;\n\nexport const NavbarControlsSpace = styled.span`\n display: inline-block !important;\n height: 32px !important;\n width: 1px !important;\n margin-right: 16px !important;\n padding: 0px !important;\n border: none !important;\n`;\n\nexport const ArrowsContainer = styled.div`\n -webkit-box-align: center !important;\n color: rgb(34, 34, 34) !important;\n display: flex !important;\n align-items: center !important;\n margin-left: auto !important;\n`;\n\nexport const ArrowsFlex = styled.div`\n display: -webkit-box !important;\n display: -moz-box !important;\n display: -ms-flexbox !important;\n display: -webkit-flex !important;\n display: flex !important;\n`;\n\nexport const ArrowsButton = styled(ButtonUnstyled)<any>`\n -webkit-box-pack: center !important;\n -webkit-box-align: center !important;\n appearance: none !important;\n display: inline-flex !important;\n border-radius: 50% !important;\n border: none !important;\n outline: none !important;\n margin: 0px !important;\n padding: 0px !important;\n color: rgb(34, 34, 34) !important;\n cursor: pointer !important;\n touch-action: manipulation !important;\n position: relative !important;\n background: transparent !important;\n transition: -ms-transform 0.25s ease 0s, -webkit-transform 0.25s ease 0s,\n transform 0.25s ease 0s !important;\n align-items: center !important;\n justify-content: center !important;\n width: 32px !important;\n height: 32px !important;\n :focus {\n box-shadow: none !important;\n }\n ::before {\n content: '' !important;\n display: block !important;\n position: absolute !important;\n top: 50% !important;\n left: 50% !important;\n transform: translate(-50%, -50%) !important;\n width: 32px !important;\n height: 32px !important;\n border-radius: 50% !important;\n background: rgb(255, 255, 255) !important;\n border: 1px solid rgb(221, 221, 221) !important;\n }\n :disabled {\n opacity: 0.5 !important;\n cursor: not-allowed !important;\n color: rgb(221, 221, 221) !important;\n transform: scale(1) !important;\n }\n :hover:not([disabled]) {\n color: rgb(0, 0, 0) !important;\n transform: scale(1.04) !important;\n }\n`;\n\nexport const ArrowsDivider = styled.span`\n margin-left: 8px !important;\n`;\n\nexport const ArrowsIconClip = styled.span`\n border: 0px !important;\n clip: rect(0 0 0 0) !important;\n -webkit-clip-path: inset(100%) !important;\n clip-path: inset(100%) !important;\n height: 1px !important;\n overflow: hidden !important;\n padding: 0px !important;\n position: absolute !important;\n white-space: nowrap !important;\n width: 1px !important;\n`;\n\nexport const ArrowsSvg = styled.svg`\n display: block;\n fill: none;\n height: 12px;\n width: 12px;\n stroke: currentcolor;\n stroke-width: 4;\n overflow: visible;\n`;\n","import styled from 'styled-components';\n// eslint-disable-next-line import/extensions\nimport { Swiper } from 'swiper/react';\n\nexport const CarouselSwiper = styled(Swiper)``;\n","import React, { useRef } from 'react';\n\nimport SwiperCore, { Navigation } from 'swiper';\n// eslint-disable-next-line import/extensions\nimport { SwiperSlide } from 'swiper/react';\n\nimport {\n CarouselContainer,\n CarouselNavbar,\n NavbarTitleContainer,\n NavbarControlsContainer,\n NavbarControlsQuick,\n NavbarControlsSpace,\n ArrowsContainer,\n ArrowsFlex,\n ArrowsDivider,\n ArrowsButton,\n ArrowsIconClip,\n ArrowsSvg\n} from '../styles';\nimport { CarouselSwiper } from './styles';\n\nSwiperCore.use([Navigation]);\n\nexport const CardCarousel: React.FC<any> = ({\n children,\n navigation,\n title,\n controls,\n onShowMore,\n ...props\n}) => {\n const prevRef = useRef<HTMLDivElement>(null);\n const nextRef = useRef<HTMLDivElement>(null);\n return (\n <CarouselContainer>\n {navigation && (\n <CarouselNavbar>\n {title && <NavbarTitleContainer>{title}</NavbarTitleContainer>}\n {controls && (\n <NavbarControlsContainer>\n {onShowMore && (\n <NavbarControlsQuick onClick={onShowMore}>\n Show More\n </NavbarControlsQuick>\n )}\n <NavbarControlsSpace />\n <ArrowsContainer aria-hidden=\"false\">\n <ArrowsFlex>\n <ArrowsButton\n ref={prevRef}\n aria-label=\"Previous\"\n type=\"button\"\n >\n <span\n css={`\n position: relative;\n `}\n >\n <ArrowsIconClip />\n <ArrowsSvg\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n focusable=\"false\"\n >\n <g fill=\"none\">\n <path d=\"m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932\" />\n </g>\n </ArrowsSvg>\n </span>\n </ArrowsButton>\n <ArrowsDivider />\n <ArrowsButton aria-label=\"Next\" type=\"button\" ref={nextRef}>\n <span\n css={`\n position: relative;\n `}\n >\n <ArrowsIconClip />\n <ArrowsSvg\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n focusable=\"false\"\n >\n <g fill=\"none\">\n <path d=\"m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932\" />\n </g>\n </ArrowsSvg>\n </span>\n </ArrowsButton>\n </ArrowsFlex>\n </ArrowsContainer>\n </NavbarControlsContainer>\n )}\n </CarouselNavbar>\n )}\n <CarouselSwiper\n {...props}\n onInit={swiper => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.prevEl = prevRef.current;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.nextEl = nextRef.current;\n swiper.navigation.init();\n swiper.navigation.update();\n // console.log(\"Swiper\", swiper);\n }}\n >\n {React.Children.map(children, child => (\n <SwiperSlide>{child}</SwiperSlide>\n ))}\n </CarouselSwiper>\n </CarouselContainer>\n );\n};\n","import styled from 'styled-components';\n// eslint-disable-next-line import/extensions\nimport { Swiper } from 'swiper/react';\n\nexport const CarouselSwiper = styled(Swiper)`\n .swiper-wrapper {\n box-sizing: inherit !important;\n @media (min-width: 744px) {\n scroll-padding: 40px !important;\n }\n @media (min-width: 1128px) {\n --scroll-padding: max(80px, calc((100vw - 1600px) / 2)) !important;\n scroll-padding: var(--scroll-padding) !important;\n }\n scroll-snap-type: x mandatory !important;\n overflow-x: auto !important;\n display: flex !important;\n scroll-padding: 24px !important;\n .swiper-slide {\n @media (min-width: 744px) {\n min-width: 476px !important;\n max-width: 588px !important;\n flex: 1 0 calc((100% - 80px) * 0.75) !important;\n }\n @media (min-width: 1128px) {\n flex: 1 0 calc(50% - 88px) !important;\n }\n margin-left: 16px !important;\n flex: 1 0 calc(100% - 84px) !important;\n scroll-snap-align: start !important;\n scroll-snap-stop: always !important;\n }\n .swiper-slide:first-of-type {\n @media (min-width: 744px) {\n padding-left: 40px !important;\n min-width: calc(516px) !important;\n max-width: calc(628px) !important;\n flex: 1 0 calc((100% - 80px) * 0.75 + 40px) !important;\n }\n @media (min-width: 1128px) {\n max-width: calc(588px + max(80px, (100vw - 1600px) / 2)) !important;\n flex: 1 0 calc(50% - 8px) !important;\n padding-left: max(80px, (100vw - 1600px) / 2) !important;\n }\n @media (min-width: 2080px) {\n max-width: calc(588px + max(80px, (100vw - 1930px) / 2)) !important;\n flex: 1 0 calc(50% - 8px) !important;\n padding-left: max(80px, (100vw - 1930px) / 2) !important;\n }\n flex: 1 0 calc(100% - 84px) !important;\n scroll-snap-align: start !important;\n scroll-snap-stop: always !important;\n margin-left: 0px !important;\n padding-left: 24px !important;\n }\n .swiper-slide:last-of-type {\n @media (min-width: 744px) {\n padding-right: 40px !important;\n min-width: calc(516px) !important;\n max-width: calc(628px) !important;\n flex: 1 0 calc((100% - 80px) * 0.75 + 40px) !important;\n }\n @media (min-width: 1128px) {\n max-width: calc(588px + max(80px, (100vw - 1600px) / 2)) !important;\n flex: 1 0 calc(50% - 8px) !important;\n padding-right: max(80px, (100vw - 1600px) / 2) !important;\n }\n @media (min-width: 2080px) {\n max-width: calc(588px + max(80px, (100vw - 1930px) / 2)) !important;\n flex: 1 0 calc(50% - 8px) !important;\n padding-right: max(80px, (100vw - 1930px) / 2) !important;\n }\n margin-left: 16px !important;\n flex: 1 0 calc(100% - 84px) !important;\n scroll-snap-align: start !important;\n scroll-snap-stop: always !important;\n padding-right: 24px !important;\n }\n }\n`;\n","/* eslint-disable unused-imports/no-unused-vars */\nimport React, { useRef } from 'react';\n\nimport { Container } from '@fox-dls/layout';\nimport SwiperCore, { Navigation } from 'swiper';\n// eslint-disable-next-line import/extensions\nimport { SwiperSlide } from 'swiper/react';\n\nimport {\n CarouselContainer,\n CarouselNavbar,\n NavbarTitleContainer,\n NavbarControlsContainer,\n NavbarControlsQuick,\n NavbarControlsSpace,\n ArrowsContainer,\n ArrowsFlex,\n ArrowsDivider,\n ArrowsButton,\n ArrowsIconClip,\n ArrowsSvg\n} from '../styles';\nimport { CarouselSwiper } from './styles';\n\nSwiperCore.use([Navigation]);\n\nexport const FreeCarousel: React.FC<any> = ({\n children,\n navigation,\n title,\n controls,\n quickLink,\n onShowMore,\n ...props\n}) => {\n const prevRef = useRef<HTMLDivElement>(null);\n const nextRef = useRef<HTMLDivElement>(null);\n return (\n <CarouselContainer>\n <div\n css={`\n @media (max-width: 744px) {\n display: none !important;\n }\n `}\n >\n <Container>\n {navigation && (\n <CarouselNavbar>\n {title && <NavbarTitleContainer>{title}</NavbarTitleContainer>}\n {controls && (\n <NavbarControlsContainer>\n {onShowMore && (\n <NavbarControlsQuick onClick={onShowMore}>\n Show More\n </NavbarControlsQuick>\n )}\n <NavbarControlsSpace />\n <ArrowsContainer aria-hidden=\"false\">\n <ArrowsFlex>\n <ArrowsButton\n ref={prevRef}\n aria-label=\"Previous\"\n type=\"button\"\n >\n <span\n css={`\n position: relative;\n `}\n >\n <ArrowsIconClip />\n <ArrowsSvg\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n focusable=\"false\"\n >\n <g fill=\"none\">\n <path d=\"m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932\" />\n </g>\n </ArrowsSvg>\n </span>\n </ArrowsButton>\n <ArrowsDivider />\n <ArrowsButton\n aria-label=\"Next\"\n type=\"button\"\n ref={nextRef}\n >\n <span\n css={`\n position: relative;\n `}\n >\n <ArrowsIconClip />\n <ArrowsSvg\n viewBox=\"0 0 32 32\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n focusable=\"false\"\n >\n <g fill=\"none\">\n <path d=\"m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932\" />\n </g>\n </ArrowsSvg>\n </span>\n </ArrowsButton>\n </ArrowsFlex>\n </ArrowsContainer>\n </NavbarControlsContainer>\n )}\n </CarouselNavbar>\n )}\n </Container>\n </div>\n <CarouselSwiper\n {...props}\n cssMode\n onInit={swiper => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.prevEl = prevRef.current;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.nextEl = nextRef.current;\n swiper.navigation.init();\n swiper.navigation.update();\n // console.log(\"Swiper\", swiper);\n }}\n >\n {React.Children.map(children, child => (\n <SwiperSlide>{child}</SwiperSlide>\n ))}\n </CarouselSwiper>\n </CarouselContainer>\n );\n};\n","import ButtonUnstyled from '@mui/core/ButtonUnstyled';\nimport styled from 'styled-components';\n// eslint-disable-next-line import/extensions\nimport { Swiper } from 'swiper/react';\n\nexport const CarouselContainer = styled.div``;\n\nexport const CarouselSwiper = styled(Swiper)`\n height: 100%;\n .swiper-pagination {\n .swiper-pagination-bullet-active {\n background-color: #fff;\n }\n .swiper-pagination-bullet-active-next {\n background-color: #ffffff;\n }\n .swiper-pagination-bullet {\n background-color: #ffffff;\n }\n }\n`;\n\nexport const CarouselPill = styled(ButtonUnstyled)`\n :hover {\n border-color: rgba(0, 0, 0, 0.08) !important;\n background-color: #ffffff !important;\n color: #000000 !important;\n box-shadow: 0px 0px 0px 1px transparent, 0px 0px 0px 4px transparent,\n 0px 6px 16px rgb(0 0 0 / 12%) !important;\n -webkit-transform: scale(1.04) !important;\n -ms-transform: scale(1.04) !important;\n transform: scale(1.04) !important;\n }\n\n -webkit-box-pack: center !important;\n -ms-flex-pack: center !important;\n -webkit-box-align: center !important;\n -ms-flex-align: center !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n appearance: none !important;\n display: -webkit-inline-box !important;\n display: -moz-inline-box !important;\n display: -ms-inline-flexbox !important;\n display: -webkit-inline-flex !important;\n display: inline-flex !important;\n border-radius: 50% !important;\n border: 0px !important;\n outline: none !important;\n margin: 0px !important;\n padding: 0px !important;\n color: #222222 !important;\n background-color: rgba(255, 255, 255, 0.9) !important;\n cursor: pointer !important;\n -ms-touch-action: manipulation !important;\n touch-action: manipulation !important;\n -webkit-align-items: center !important;\n align-items: center !important;\n -webkit-justify-content: center !important;\n justify-content: center !important;\n border-style: solid !important;\n border-width: 1px !important;\n background-clip: padding-box !important;\n border-color: rgba(0, 0, 0, 0.08) !important;\n box-shadow: 0px 0px 0px 1px transparent, 0px 0px 0px 4px transparent,\n 0px 2px 4px rgb(0 0 0 / 18%) !important;\n -webkit-transition: -webkit-transform 0.25s ease, transform 0.25s ease !important;\n -moz-transition: transform 0.25s ease !important;\n transition: -ms-transform 0.25s ease, -webkit-transform 0.25s ease,\n transform 0.25s ease !important;\n width: 32px !important;\n height: 32px !important;\n`;\n\nexport const CarouselPillSvg = styled.svg`\n height: 10px;\n width: 10px;\n display: block;\n fill: currentcolor;\n`;\n","/* eslint-disable unused-imports/no-unused-vars */\nimport React, { useRef } from 'react';\n\nimport SwiperCore, { Navigation, Pagination } from 'swiper';\n// eslint-disable-next-line import/extensions\nimport { SwiperSlide } from 'swiper/react';\n\nimport { CarouselSwiper, CarouselPillSvg, CarouselPill } from './styles';\n\nSwiperCore.use([Navigation, Pagination]);\n\nexport const PaginationCarousel: React.FC<any> = ({\n children,\n navigation,\n title,\n controls,\n ...props\n}) => {\n const prevRef = useRef<HTMLDivElement>(null);\n const nextRef = useRef<HTMLDivElement>(null);\n return (\n <>\n <div\n css={`\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n position: absolute !important;\n top: 50% !important;\n pointer-events: auto !important;\n transform: translateY(-50%) !important;\n left: 8px !important;\n animation-duration: 0.3s !important;\n animation-name: fadein !important;\n z-index: 180 !important;\n opacity: 0 !important;\n :hover {\n opacity: 1 !important;\n }\n `}\n >\n <CarouselPill ref={prevRef}>\n <span\n css={`\n position: relative !important;\n `}\n >\n <CarouselPillSvg\n viewBox=\"0 0 16 16\"\n role=\"presentation\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"m10.8 16c-.4 0-.7-.1-.9-.4l-6.8-6.7c-.5-.5-.5-1.3 0-1.8l6.8-6.7c.5-.5 1.2-.5 1.7 0s .5 1.2 0 1.7l-5.8 5.9 5.8 5.9c.5.5.5 1.2 0 1.7-.2.3-.5.4-.8.4\" />\n </CarouselPillSvg>\n </span>\n </CarouselPill>\n </div>\n <div\n css={`\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n position: absolute !important;\n top: 50% !important;\n pointer-events: auto !important;\n transform: translateY(-50%) !important;\n right: 8px !important;\n animation-duration: 0.3s !important;\n animation-name: fadein !important;\n z-index: 180 !important;\n opacity: 0 !important;\n :hover {\n opacity: 1 !important;\n }\n `}\n >\n <CarouselPill ref={nextRef}>\n <span\n css={`\n position: relative !important;\n `}\n >\n <CarouselPillSvg\n viewBox=\"0 0 16 16\"\n role=\"presentation\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <path d=\"m5.3 16c .3 0 .6-.1.8-.4l6.8-6.7c.5-.5.5-1.3 0-1.8l-6.8-6.7c-.5-.5-1.2-.5-1.7 0s-.5 1.2 0 1.7l5.8 5.9-5.8 5.9c-.5.5-.5 1.2 0 1.7.2.3.5.4.9.4\" />\n </CarouselPillSvg>\n </span>\n </CarouselPill>\n </div>\n <CarouselSwiper\n {...props}\n pagination={{\n dynamicBullets: true\n }}\n onInit={swiper => {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.prevEl = prevRef.current;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n swiper.params.navigation.nextEl = nextRef.current;\n swiper.navigation.init();\n swiper.navigation.update();\n // console.log(\"Swiper\", swiper);\n }}\n >\n {React.Children.map(children, child =>\n React.cloneElement(<SwiperSlide>{child}</SwiperSlide>, {\n ...props\n })\n )}\n </CarouselSwiper>\n </>\n );\n};\n"],"names":["CarouselSwiper","styled","Swiper","CarouselPillContainer","div","CarouselPill","ButtonUnstyled","SwiperCore","use","Navigation","PillsCarousel","children","arrows","props","prevRef","useRef","nextRef","useState","progress","isBeginning","isEnd","swiperSlides","setSwiperSlides","swiper","setSwiper","_jsxs","css","_jsx","left","ref","type","onClick","slidePrev","viewBox","xmlns","role","focusable","fill","d","cssMode","slidesPerView","onInit","params","navigation","prevEl","current","nextEl","init","update","onSlideChange","React","Children","map","child","SwiperSlide","right","slideNext","CarouselContainer","CarouselNavbar","NavbarTitleContainer","NavbarControlsContainer","NavbarControlsQuick","a","NavbarControlsSpace","span","ArrowsContainer","ArrowsFlex","ArrowsButton","ArrowsDivider","ArrowsIconClip","ArrowsSvg","svg","CardCarousel","title","controls","onShowMore","FreeCarousel","Container","CarouselPillSvg","Pagination","PaginationCarousel","pagination","dynamicBullets","cloneElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAMA,gBAAc,gBAAGC,MAAM,CAACC,MAAD,CAAT;AAAA;AAAA;AAAA,uHAApB;AAUA,IAAMC,qBAAqB,gBAAGF,MAAM,CAACG,GAAV;AAAA;AAAA;AAAA,8HAA3B;AAOA,IAAMC,cAAY,gBAAGJ,MAAM,CAACK,cAAD,CAAT;AAAA;AAAA;AAAA,06BAAlB;;;;;ACbPC,UAAU,CAACC,GAAX,CAAe,CAACC,UAAD,CAAf;IAEaC,aAAa,GAAkB,SAA/BA,aAA+B;MAC1CC,gBAAAA;MAIAC,cAAAA;MACGC;;AAEH,MAAMC,OAAO,GAAGC,MAAM,CAAM,IAAN,CAAtB;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;"}
File without changes
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const CarouselSwiper: import("styled-components").StyledComponent<import("react").FunctionComponent<import("swiper/react").SwiperProps>, any, {}, never>;
File without changes
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const CarouselSwiper: import("styled-components").StyledComponent<import("react").FunctionComponent<import("swiper/react").SwiperProps>, any, {}, never>;
File without changes
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const CarouselContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const CarouselSwiper: import("styled-components").StyledComponent<import("react").FunctionComponent<import("swiper/react").SwiperProps>, any, {}, never>;
4
+ export declare const CarouselPill: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("@mui/core/ButtonUnstyled").ButtonUnstyledOwnProps & Omit<any, keyof import("@mui/core/ButtonUnstyled").ButtonUnstyledOwnProps> & {
5
+ component?: import("react").ElementType<any>;
6
+ }, string | number | symbol> & import("react").RefAttributes<any>>, any, {}, never>;
7
+ export declare const CarouselPillSvg: import("styled-components").StyledComponent<"svg", any, {}, never>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PillsCarousel: React.FC<any>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const CarouselContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const CarouselSwiper: import("styled-components").StyledComponent<import("react").FunctionComponent<import("swiper/react").SwiperProps>, any, {}, never>;
4
+ export declare const CarouselPillContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const CarouselPill: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("@mui/core/ButtonUnstyled").ButtonUnstyledOwnProps & Omit<any, keyof import("@mui/core/ButtonUnstyled").ButtonUnstyledOwnProps> & {
6
+ component?: import("react").ElementType<any>;
7
+ }, string | number | symbol> & import("react").RefAttributes<any>>, any, any, never>;
@@ -9,7 +9,7 @@ export declare const NavbarControlsSpace: import("styled-components").StyledComp
9
9
  export declare const ArrowsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
10
10
  export declare const ArrowsFlex: import("styled-components").StyledComponent<"div", any, {}, never>;
11
11
  export declare const ArrowsButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("@mui/core/ButtonUnstyled").ButtonUnstyledOwnProps & Omit<any, keyof import("@mui/core/ButtonUnstyled").ButtonUnstyledOwnProps> & {
12
- component?: import("react").ElementType<any> | undefined;
12
+ component?: import("react").ElementType<any>;
13
13
  }, string | number | symbol> & import("react").RefAttributes<any>>, any, any, never>;
14
14
  export declare const ArrowsDivider: import("styled-components").StyledComponent<"span", any, {}, never>;
15
15
  export declare const ArrowsIconClip: import("styled-components").StyledComponent<"span", any, {}, never>;
package/package.json CHANGED
@@ -1,15 +1,118 @@
1
1
  {
2
2
  "name": "@fox-dls/carousels",
3
- "version": "0.0.1",
4
- "main": "./carousels.umd.js",
5
- "module": "./carousels.esm.js",
6
- "typings": "./index.d.ts",
7
- "dependencies": {},
8
- "peerDependencies": {
9
- "swiper": "^7.2.0",
3
+ "version": "1.0.3",
4
+ "license": "MIT",
5
+ "source": "src/index.ts",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.esm.js",
8
+ "types": "dist/index.d.ts",
9
+ "scripts": {
10
+ "build": "rimraf --no-glob ./dist && cross-env NODE_ENV=production microbundle --tsconfig ./tsconfig.build.json --jsx React.createElement --jsxFragment React.Fragment -f cjs,es --no-compress",
11
+ "build:react17jsx": "microbundle --tsconfig ./tsconfig.build.json --jsx jsx --jsxImportSource react --globals react/jsx-runtime=jsx --compress",
12
+ "dev": "microbundle watch",
13
+ "clean": "rimraf --no-glob ./dist ./coverage ./tsconfig.tsbuildinfo ./.eslintcache && jest --clear-cache",
14
+ "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
15
+ "typecheck": "tsc --project ./tsconfig.json --noEmit",
16
+ "test": "run-s 'test:*'",
17
+ "test:unit": "jest --config jest.config.js --maxWorkers=50% --color $@",
18
+ "ci-test:unit": "jest --config jest.config.js --runInBand --color $@",
19
+ "fix:staged-files": "lint-staged --allow-empty",
20
+ "fix:all-files": "eslint . --ext .ts,.tsx,.js,.jsx --fix"
21
+ },
22
+ "devDependencies": {
23
+ "@babel/core": "^7.16.0",
24
+ "@babel/preset-react": "^7.16.0",
25
+ "@changesets/changelog-github": "0.4.2",
26
+ "@changesets/cli": "2.18.1",
27
+ "@next/bundle-analyzer": "12.0.6",
28
+ "@size-limit/file": "7.0.3",
29
+ "@storybook/react": "^6.4.7",
30
+ "@svgr/webpack": "6.1.0",
31
+ "@testing-library/jest-dom": "5.16.0",
32
+ "@testing-library/react": "12.1.2",
33
+ "@testing-library/react-hooks": "7.0.2",
34
+ "@types/cors": "2.8.12",
35
+ "@types/eslint": "8.2.1",
36
+ "@types/jest": "27.0.3",
37
+ "@types/node": "16.11.11",
38
+ "@types/react": "17.0.37",
39
+ "@types/react-dom": "17.0.11",
40
+ "@types/react-is": "17.0.3",
41
+ "@types/react-redux": "^7.1.20",
42
+ "@types/shell-quote": "1.7.1",
43
+ "@types/styled-components": "^5.1.16",
44
+ "@types/swiper": "^5.4.3",
45
+ "@typescript-eslint/eslint-plugin": "5.5.0",
46
+ "@typescript-eslint/parser": "5.5.0",
47
+ "autoprefixer": "10.4.0",
48
+ "babel-jest": "27.4.2",
49
+ "babel-loader": "^8.2.3",
50
+ "babel-plugin-module-resolver": "^4.1.0",
51
+ "babel-plugin-styled-components": "^2.0.2",
52
+ "cross-env": "7.0.3",
53
+ "cypress": "^9.1.1",
54
+ "dotenv": "^10.0.0",
55
+ "dotenv-flow": "3.2.0",
56
+ "dotenv-flow-cli": "1.0.0",
57
+ "duplicate-package-checker-webpack-plugin": "^3.0.0",
58
+ "eslint": "8.4.0",
59
+ "eslint-config-airbnb": "^19.0.2",
60
+ "eslint-config-airbnb-base": "^15.0.0",
61
+ "eslint-config-airbnb-typescript": "^16.1.0",
62
+ "eslint-config-next": "12.0.6",
63
+ "eslint-config-prettier": "8.3.0",
64
+ "eslint-import-resolver-babel-module": "^5.3.1",
65
+ "eslint-import-resolver-typescript": "2.5.0",
66
+ "eslint-plugin-cypress": "^2.12.1",
67
+ "eslint-plugin-import": "2.25.3",
68
+ "eslint-plugin-jest": "25.3.0",
69
+ "eslint-plugin-jest-formatting": "3.1.0",
70
+ "eslint-plugin-jsx-a11y": "6.5.1",
71
+ "eslint-plugin-prettier": "4.0.0",
72
+ "eslint-plugin-react": "7.27.1",
73
+ "eslint-plugin-react-hooks": "4.3.0",
74
+ "eslint-plugin-regexp": "1.5.1",
75
+ "eslint-plugin-sonarjs": "0.11.0",
76
+ "eslint-plugin-testing-library": "5.0.1",
77
+ "eslint-plugin-unused-imports": "^2.0.0",
78
+ "husky": "^7.0.4",
79
+ "is-ci": "3.0.1",
80
+ "jest": "27.4.3",
81
+ "lint-staged": "^12.1.2",
82
+ "microbundle": "0.14.2",
83
+ "ngx-deploy-npm": "^3.0.6",
84
+ "nock": "^13.2.1",
85
+ "npm-run-all": "4.1.5",
86
+ "prettier": "2.5.1",
10
87
  "react": "^17.0.2",
88
+ "react-dom": "17.0.2",
89
+ "react-test-renderer": "17.0.2",
90
+ "rimraf": "3.0.2",
91
+ "sass": "1.44.0",
92
+ "shell-quote": "1.7.3",
93
+ "size-limit": "7.0.3",
11
94
  "styled-components": "^5.3.3",
12
- "@mui/core": "^5.0.0-alpha.53",
13
- "@fox-dls/layout": "0.0.1"
95
+ "symlink-dir": "5.0.1",
96
+ "sync-directory": "4.0.7",
97
+ "ts-jest": "27.0.7",
98
+ "ts-node": "10.4.0",
99
+ "typescript": "4.5.2",
100
+ "typescript-plugin-styled-components": "^2.0.0"
101
+ },
102
+ "dependencies": {
103
+ "@fox-dls/layout": "1.0.0",
104
+ "@material-ui/styled-engine": "npm:@material-ui/styled-engine-sc@next",
105
+ "@mui/core": "^5.0.0-alpha.54",
106
+ "@mui/lab": "^5.0.0-alpha.58",
107
+ "@mui/material": "^5.2.2",
108
+ "@types/uuid": "^8.3.3",
109
+ "swiper": "^7.3.1"
110
+ },
111
+ "resolutions": {
112
+ "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
113
+ },
114
+ "peerDependencies": {
115
+ "react": "^17.0.2",
116
+ "styled-components": "^5.3.3"
14
117
  }
15
118
  }
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ /* eslint-disable import/export */
2
+ import type {} from 'styled-components/cssprop';
3
+
4
+ export * from './lib/pills/index';
5
+ export * from './lib/card/index';
6
+ export * from './lib/free/index';
7
+ export * from './lib/pagination/index';
@@ -0,0 +1,123 @@
1
+ import React, { useRef } from 'react';
2
+
3
+ import SwiperCore, { Navigation } from 'swiper';
4
+ // eslint-disable-next-line import/extensions
5
+ import { SwiperSlide } from 'swiper/react';
6
+
7
+ import {
8
+ CarouselContainer,
9
+ CarouselNavbar,
10
+ NavbarTitleContainer,
11
+ NavbarControlsContainer,
12
+ NavbarControlsQuick,
13
+ NavbarControlsSpace,
14
+ ArrowsContainer,
15
+ ArrowsFlex,
16
+ ArrowsDivider,
17
+ ArrowsButton,
18
+ ArrowsIconClip,
19
+ ArrowsSvg
20
+ } from '../styles';
21
+ import { CarouselSwiper } from './styles';
22
+
23
+ SwiperCore.use([Navigation]);
24
+
25
+ export const CardCarousel: React.FC<any> = ({
26
+ children,
27
+ navigation,
28
+ title,
29
+ controls,
30
+ onShowMore,
31
+ ...props
32
+ }) => {
33
+ const prevRef = useRef<HTMLDivElement>(null);
34
+ const nextRef = useRef<HTMLDivElement>(null);
35
+ return (
36
+ <CarouselContainer>
37
+ {navigation && (
38
+ <CarouselNavbar>
39
+ {title && <NavbarTitleContainer>{title}</NavbarTitleContainer>}
40
+ {controls && (
41
+ <NavbarControlsContainer>
42
+ {onShowMore && (
43
+ <NavbarControlsQuick onClick={onShowMore}>
44
+ Show More
45
+ </NavbarControlsQuick>
46
+ )}
47
+ <NavbarControlsSpace />
48
+ <ArrowsContainer aria-hidden="false">
49
+ <ArrowsFlex>
50
+ <ArrowsButton
51
+ ref={prevRef}
52
+ aria-label="Previous"
53
+ type="button"
54
+ >
55
+ <span
56
+ css={`
57
+ position: relative;
58
+ `}
59
+ >
60
+ <ArrowsIconClip />
61
+ <ArrowsSvg
62
+ viewBox="0 0 32 32"
63
+ xmlns="http://www.w3.org/2000/svg"
64
+ aria-hidden="true"
65
+ role="presentation"
66
+ focusable="false"
67
+ >
68
+ <g fill="none">
69
+ <path d="m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932" />
70
+ </g>
71
+ </ArrowsSvg>
72
+ </span>
73
+ </ArrowsButton>
74
+ <ArrowsDivider />
75
+ <ArrowsButton aria-label="Next" type="button" ref={nextRef}>
76
+ <span
77
+ css={`
78
+ position: relative;
79
+ `}
80
+ >
81
+ <ArrowsIconClip />
82
+ <ArrowsSvg
83
+ viewBox="0 0 32 32"
84
+ xmlns="http://www.w3.org/2000/svg"
85
+ aria-hidden="true"
86
+ role="presentation"
87
+ focusable="false"
88
+ >
89
+ <g fill="none">
90
+ <path d="m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932" />
91
+ </g>
92
+ </ArrowsSvg>
93
+ </span>
94
+ </ArrowsButton>
95
+ </ArrowsFlex>
96
+ </ArrowsContainer>
97
+ </NavbarControlsContainer>
98
+ )}
99
+ </CarouselNavbar>
100
+ )}
101
+ <CarouselSwiper
102
+ {...props}
103
+ onInit={swiper => {
104
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
105
+ // @ts-ignore
106
+ // eslint-disable-next-line no-param-reassign
107
+ swiper.params.navigation.prevEl = prevRef.current;
108
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
109
+ // @ts-ignore
110
+ // eslint-disable-next-line no-param-reassign
111
+ swiper.params.navigation.nextEl = nextRef.current;
112
+ swiper.navigation.init();
113
+ swiper.navigation.update();
114
+ // console.log("Swiper", swiper);
115
+ }}
116
+ >
117
+ {React.Children.map(children, child => (
118
+ <SwiperSlide>{child}</SwiperSlide>
119
+ ))}
120
+ </CarouselSwiper>
121
+ </CarouselContainer>
122
+ );
123
+ };
@@ -0,0 +1,5 @@
1
+ import styled from 'styled-components';
2
+ // eslint-disable-next-line import/extensions
3
+ import { Swiper } from 'swiper/react';
4
+
5
+ export const CarouselSwiper = styled(Swiper)``;
@@ -0,0 +1,141 @@
1
+ /* eslint-disable unused-imports/no-unused-vars */
2
+ import React, { useRef } from 'react';
3
+
4
+ import { Container } from '@fox-dls/layout';
5
+ import SwiperCore, { Navigation } from 'swiper';
6
+ // eslint-disable-next-line import/extensions
7
+ import { SwiperSlide } from 'swiper/react';
8
+
9
+ import {
10
+ CarouselContainer,
11
+ CarouselNavbar,
12
+ NavbarTitleContainer,
13
+ NavbarControlsContainer,
14
+ NavbarControlsQuick,
15
+ NavbarControlsSpace,
16
+ ArrowsContainer,
17
+ ArrowsFlex,
18
+ ArrowsDivider,
19
+ ArrowsButton,
20
+ ArrowsIconClip,
21
+ ArrowsSvg
22
+ } from '../styles';
23
+ import { CarouselSwiper } from './styles';
24
+
25
+ SwiperCore.use([Navigation]);
26
+
27
+ export const FreeCarousel: React.FC<any> = ({
28
+ children,
29
+ navigation,
30
+ title,
31
+ controls,
32
+ quickLink,
33
+ onShowMore,
34
+ ...props
35
+ }) => {
36
+ const prevRef = useRef<HTMLDivElement>(null);
37
+ const nextRef = useRef<HTMLDivElement>(null);
38
+ return (
39
+ <CarouselContainer>
40
+ <div
41
+ css={`
42
+ @media (max-width: 744px) {
43
+ display: none !important;
44
+ }
45
+ `}
46
+ >
47
+ <Container>
48
+ {navigation && (
49
+ <CarouselNavbar>
50
+ {title && <NavbarTitleContainer>{title}</NavbarTitleContainer>}
51
+ {controls && (
52
+ <NavbarControlsContainer>
53
+ {onShowMore && (
54
+ <NavbarControlsQuick onClick={onShowMore}>
55
+ Show More
56
+ </NavbarControlsQuick>
57
+ )}
58
+ <NavbarControlsSpace />
59
+ <ArrowsContainer aria-hidden="false">
60
+ <ArrowsFlex>
61
+ <ArrowsButton
62
+ ref={prevRef}
63
+ aria-label="Previous"
64
+ type="button"
65
+ >
66
+ <span
67
+ css={`
68
+ position: relative;
69
+ `}
70
+ >
71
+ <ArrowsIconClip />
72
+ <ArrowsSvg
73
+ viewBox="0 0 32 32"
74
+ xmlns="http://www.w3.org/2000/svg"
75
+ aria-hidden="true"
76
+ role="presentation"
77
+ focusable="false"
78
+ >
79
+ <g fill="none">
80
+ <path d="m20 28-11.29289322-11.2928932c-.39052429-.3905243-.39052429-1.0236893 0-1.4142136l11.29289322-11.2928932" />
81
+ </g>
82
+ </ArrowsSvg>
83
+ </span>
84
+ </ArrowsButton>
85
+ <ArrowsDivider />
86
+ <ArrowsButton
87
+ aria-label="Next"
88
+ type="button"
89
+ ref={nextRef}
90
+ >
91
+ <span
92
+ css={`
93
+ position: relative;
94
+ `}
95
+ >
96
+ <ArrowsIconClip />
97
+ <ArrowsSvg
98
+ viewBox="0 0 32 32"
99
+ xmlns="http://www.w3.org/2000/svg"
100
+ aria-hidden="true"
101
+ role="presentation"
102
+ focusable="false"
103
+ >
104
+ <g fill="none">
105
+ <path d="m12 4 11.2928932 11.2928932c.3905243.3905243.3905243 1.0236893 0 1.4142136l-11.2928932 11.2928932" />
106
+ </g>
107
+ </ArrowsSvg>
108
+ </span>
109
+ </ArrowsButton>
110
+ </ArrowsFlex>
111
+ </ArrowsContainer>
112
+ </NavbarControlsContainer>
113
+ )}
114
+ </CarouselNavbar>
115
+ )}
116
+ </Container>
117
+ </div>
118
+ <CarouselSwiper
119
+ {...props}
120
+ cssMode
121
+ onInit={swiper => {
122
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
123
+ // @ts-ignore
124
+ // eslint-disable-next-line no-param-reassign
125
+ swiper.params.navigation.prevEl = prevRef.current;
126
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
127
+ // @ts-ignore
128
+ // eslint-disable-next-line no-param-reassign
129
+ swiper.params.navigation.nextEl = nextRef.current;
130
+ swiper.navigation.init();
131
+ swiper.navigation.update();
132
+ // console.log("Swiper", swiper);
133
+ }}
134
+ >
135
+ {React.Children.map(children, child => (
136
+ <SwiperSlide>{child}</SwiperSlide>
137
+ ))}
138
+ </CarouselSwiper>
139
+ </CarouselContainer>
140
+ );
141
+ };
@@ -0,0 +1,80 @@
1
+ import styled from 'styled-components';
2
+ // eslint-disable-next-line import/extensions
3
+ import { Swiper } from 'swiper/react';
4
+
5
+ export const CarouselSwiper = styled(Swiper)`
6
+ .swiper-wrapper {
7
+ box-sizing: inherit !important;
8
+ @media (min-width: 744px) {
9
+ scroll-padding: 40px !important;
10
+ }
11
+ @media (min-width: 1128px) {
12
+ --scroll-padding: max(80px, calc((100vw - 1600px) / 2)) !important;
13
+ scroll-padding: var(--scroll-padding) !important;
14
+ }
15
+ scroll-snap-type: x mandatory !important;
16
+ overflow-x: auto !important;
17
+ display: flex !important;
18
+ scroll-padding: 24px !important;
19
+ .swiper-slide {
20
+ @media (min-width: 744px) {
21
+ min-width: 476px !important;
22
+ max-width: 588px !important;
23
+ flex: 1 0 calc((100% - 80px) * 0.75) !important;
24
+ }
25
+ @media (min-width: 1128px) {
26
+ flex: 1 0 calc(50% - 88px) !important;
27
+ }
28
+ margin-left: 16px !important;
29
+ flex: 1 0 calc(100% - 84px) !important;
30
+ scroll-snap-align: start !important;
31
+ scroll-snap-stop: always !important;
32
+ }
33
+ .swiper-slide:first-of-type {
34
+ @media (min-width: 744px) {
35
+ padding-left: 40px !important;
36
+ min-width: calc(516px) !important;
37
+ max-width: calc(628px) !important;
38
+ flex: 1 0 calc((100% - 80px) * 0.75 + 40px) !important;
39
+ }
40
+ @media (min-width: 1128px) {
41
+ max-width: calc(588px + max(80px, (100vw - 1600px) / 2)) !important;
42
+ flex: 1 0 calc(50% - 8px) !important;
43
+ padding-left: max(80px, (100vw - 1600px) / 2) !important;
44
+ }
45
+ @media (min-width: 2080px) {
46
+ max-width: calc(588px + max(80px, (100vw - 1930px) / 2)) !important;
47
+ flex: 1 0 calc(50% - 8px) !important;
48
+ padding-left: max(80px, (100vw - 1930px) / 2) !important;
49
+ }
50
+ flex: 1 0 calc(100% - 84px) !important;
51
+ scroll-snap-align: start !important;
52
+ scroll-snap-stop: always !important;
53
+ margin-left: 0px !important;
54
+ padding-left: 24px !important;
55
+ }
56
+ .swiper-slide:last-of-type {
57
+ @media (min-width: 744px) {
58
+ padding-right: 40px !important;
59
+ min-width: calc(516px) !important;
60
+ max-width: calc(628px) !important;
61
+ flex: 1 0 calc((100% - 80px) * 0.75 + 40px) !important;
62
+ }
63
+ @media (min-width: 1128px) {
64
+ max-width: calc(588px + max(80px, (100vw - 1600px) / 2)) !important;
65
+ flex: 1 0 calc(50% - 8px) !important;
66
+ padding-right: max(80px, (100vw - 1600px) / 2) !important;
67
+ }
68
+ @media (min-width: 2080px) {
69
+ max-width: calc(588px + max(80px, (100vw - 1930px) / 2)) !important;
70
+ flex: 1 0 calc(50% - 8px) !important;
71
+ padding-right: max(80px, (100vw - 1930px) / 2) !important;
72
+ }
73
+ margin-left: 16px !important;
74
+ flex: 1 0 calc(100% - 84px) !important;
75
+ scroll-snap-align: start !important;
76
+ scroll-snap-stop: always !important;
77
+ padding-right: 24px !important;
78
+ }
79
+ }
80
+ `;