@titelmedia/bricks-gallery
Advanced tools
Comparing version 0.2.18 to 0.2.19
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.2.19](https://github.com/titel-media/bricks-lerna/compare/v0.2.18...v0.2.19) (2022-01-13) | ||
**Note:** Version bump only for package @titelmedia/bricks-gallery | ||
## [0.2.18](https://github.com/titel-media/bricks-lerna/compare/v0.2.17...v0.2.18) (2022-01-13) | ||
@@ -8,0 +16,0 @@ |
@@ -10,8 +10,4 @@ "use strict"; | ||
var _swiper = _interopRequireWildcard(require("swiper")); | ||
var _styles = require("./styles"); | ||
var _swiperReact = require("swiper/react/swiper-react.js"); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -21,4 +17,2 @@ | ||
_swiper.default.use([_swiper.A11y, _swiper.EffectCoverflow, _swiper.Mousewheel]); | ||
const GallerySwiper = ({ | ||
@@ -28,42 +22,3 @@ items | ||
const [activeIndex, setActiveIndex] = (0, _react.useState)(0); | ||
return _react.default.createElement(_styles.Container, null, _react.default.createElement(_swiperReact.Swiper, { | ||
effect: "coverflow", | ||
coverflowEffect: { | ||
rotate: 0, | ||
stretch: 0, | ||
depth: 800, | ||
modifier: 1, | ||
slideShadows: false | ||
}, | ||
breakpoints: { | ||
320: { | ||
slidesPerView: 1 | ||
}, | ||
640: { | ||
slidesPerView: 2 | ||
}, | ||
1048: { | ||
slidesPerView: 3 | ||
} | ||
}, | ||
centeredSlides: true, | ||
freeMode: true, | ||
freeModeSticky: true, | ||
freeModeMomentumRatio: 0.25, | ||
onActiveIndexChange: ({ | ||
activeIndex | ||
}) => setActiveIndex(activeIndex), | ||
spaceBetween: 20, | ||
pagination: { | ||
clickable: true | ||
} | ||
}, items.map((item, i) => _react.default.createElement(_swiperReact.SwiperSlide, { | ||
key: `image--${i}` | ||
}, _react.default.createElement(_styles.Image, { | ||
imageIndex: i, | ||
activeIndex: activeIndex, | ||
src: item.src, | ||
srcSet: item.srcSet, | ||
alt: "" | ||
}))))); | ||
return _react.default.createElement(_styles.Container, null, _react.default.createElement("h1", null, "temporarily disabled")); | ||
}; | ||
@@ -70,0 +25,0 @@ |
import React, { useState } from 'react'; | ||
import SwiperCore, { A11y, EffectCoverflow, Mousewheel } from 'swiper'; | ||
import { Container, Image } from './styles'; | ||
// Swiper use ESM and create-react-app doesn't | ||
import { Swiper, SwiperSlide } from 'swiper/react/swiper-react.js'; | ||
SwiperCore.use([A11y, EffectCoverflow, Mousewheel]); | ||
const GallerySwiper = ({ items }) => { | ||
@@ -14,42 +9,3 @@ const [activeIndex, setActiveIndex] = useState(0); | ||
<Container> | ||
<Swiper | ||
effect="coverflow" | ||
coverflowEffect={{ | ||
rotate: 0, | ||
stretch: 0, | ||
depth: 800, | ||
modifier: 1, | ||
slideShadows: false, | ||
}} | ||
breakpoints={{ | ||
320: { | ||
slidesPerView: 1, | ||
}, | ||
640: { | ||
slidesPerView: 2, | ||
}, | ||
1048: { | ||
slidesPerView: 3, | ||
}, | ||
}} | ||
centeredSlides | ||
freeMode | ||
freeModeSticky | ||
freeModeMomentumRatio={0.25} | ||
onActiveIndexChange={({ activeIndex }) => setActiveIndex(activeIndex)} | ||
spaceBetween={20} | ||
pagination={{ clickable: true }} | ||
> | ||
{items.map((item, i) => ( | ||
<SwiperSlide key={`image--${i}`}> | ||
<Image | ||
imageIndex={i} | ||
activeIndex={activeIndex} | ||
src={item.src} | ||
srcSet={item.srcSet} | ||
alt="" | ||
/> | ||
</SwiperSlide> | ||
))} | ||
</Swiper> | ||
<h1>temporarily disabled</h1> | ||
</Container> | ||
@@ -56,0 +12,0 @@ ); |
{ | ||
"name": "@titelmedia/bricks-gallery", | ||
"version": "0.2.18", | ||
"version": "0.2.19", | ||
"description": "> TODO: description", | ||
@@ -31,6 +31,5 @@ "author": "highsnob", | ||
"gsap": "^3.8.0", | ||
"lodash": "^4.17.21", | ||
"swiper": "6.8.4" | ||
"lodash": "^4.17.21" | ||
}, | ||
"gitHead": "9f887a42bd2a7b71d7523cfa0e48d78a95367a9c" | ||
"gitHead": "4210a0e54652fb13d81d6069b567ead8a2a54c6d" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7
45220
634
- Removedswiper@6.8.4
- Removeddom7@3.0.0(transitive)
- Removedssr-window@3.0.0(transitive)
- Removedswiper@6.8.4(transitive)