@via-profit/ui-kit 0.2.2 → 0.2.4

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/Swiper/Swiper.js CHANGED
@@ -48,7 +48,7 @@ const SwiperTrack_1 = __importDefault(require("./SwiperTrack"));
48
48
  const SwiperSlidesRenderer_1 = __importDefault(require("./SwiperSlidesRenderer"));
49
49
  __exportStar(require("./SwiperSlide"), exports);
50
50
  exports.Swiper = React.forwardRef((props, ref) => {
51
- const { children, dragThreshold = 240, snap = true, draggable = true, overrides, initialIndex = 0, infinite = false, onSlideChange, autoplay = false, autoplayInterval = 3000, pauseOnHover = true, keyboardControl = true, threshold = 20, resistance = true, slidesPerView = 1 } = props, restProps = __rest(props, ["children", "dragThreshold", "snap", "draggable", "overrides", "initialIndex", "infinite", "onSlideChange", "autoplay", "autoplayInterval", "pauseOnHover", "keyboardControl", "threshold", "resistance", "slidesPerView"]);
51
+ const { children, dragThreshold = 240, snap = true, draggable = true, overrides, initialIndex = 0, infinite = false, onSlideChange, autoplay = false, autoplayInterval = 3000, pauseOnHover = true, threshold = 20, resistance = true, slidesPerView = 1 } = props, restProps = __rest(props, ["children", "dragThreshold", "snap", "draggable", "overrides", "initialIndex", "infinite", "onSlideChange", "autoplay", "autoplayInterval", "pauseOnHover", "threshold", "resistance", "slidesPerView"]);
52
52
  // #region Slides
53
53
  const slides = React.useMemo(() => {
54
54
  const childrenSlides = Array.isArray(children)
@@ -308,23 +308,6 @@ exports.Swiper = React.forwardRef((props, ref) => {
308
308
  const resume = React.useCallback(() => {
309
309
  setIsPaused(false);
310
310
  }, []);
311
- // #region Keyboard
312
- React.useEffect(() => {
313
- if (!keyboardControl)
314
- return;
315
- const handleKeyDown = (e) => {
316
- if (e.key === 'ArrowLeft') {
317
- e.preventDefault();
318
- prev();
319
- }
320
- else if (e.key === 'ArrowRight') {
321
- e.preventDefault();
322
- next();
323
- }
324
- };
325
- window.addEventListener('keydown', handleKeyDown);
326
- return () => window.removeEventListener('keydown', handleKeyDown);
327
- }, [keyboardControl, prev, next]);
328
311
  // #region Hover
329
312
  React.useEffect(() => {
330
313
  if (!autoplay || !pauseOnHover)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@via-profit/ui-kit",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "UI Kit",
5
5
  "repository": {
6
6
  "type": "git",