Socket
Socket
Sign inDemoInstall

react-responsive-carousel

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-responsive-carousel - npm Package Compare versions

Comparing version 3.2.20 to 3.2.21

10

CHANGELOG.md

@@ -10,2 +10,12 @@ # Changelog

## [v3.2.20](https://github.com/leandrowd/react-responsive-carousel/compare/v3.2.19...v3.2.20) - 2021-07-19
### Merged
- export Carousel Props [`#623`](https://github.com/leandrowd/react-responsive-carousel/pull/623)
### Commits
- Update issue templates [`b0d1eae`](https://github.com/leandrowd/react-responsive-carousel/commit/b0d1eae01c2e06af80781be419562a6562e0c056)
## [v3.2.19](https://github.com/leandrowd/react-responsive-carousel/compare/v3.2.18...v3.2.19) - 2021-07-02

@@ -12,0 +22,0 @@

6

lib/js/components/Carousel/index.js

@@ -251,4 +251,2 @@ "use strict";

_this.props.onSwipeStart(event);
_this.clearAutoPlay();
});

@@ -265,2 +263,4 @@

_this.clearAutoPlay();
if (_this.state.autoPlay) {

@@ -701,2 +701,3 @@ _this.autoPlay();

return /*#__PURE__*/_react.default.createElement("div", {
"aria-label": this.props.ariaLabel,
className: _cssClasses.default.ROOT(this.props.className),

@@ -736,2 +737,3 @@ ref: this.setCarouselWrapperRef,

_defineProperty(Carousel, "defaultProps", {
ariaLabel: undefined,
axis: 'horizontal',

@@ -738,0 +740,0 @@ centerSlidePercentage: 80,

@@ -100,4 +100,4 @@ "use strict";

var visibleItems = Math.floor(wrapperSize / itemSize);
var lastPosition = total - visibleItems;
var showArrows = visibleItems < total;
var lastPosition = showArrows ? total - visibleItems : 0;

@@ -140,3 +140,3 @@ _this.setState(function (_state, props) {

if (!_this.state.itemSize || !_this.itemsWrapperRef) {
if (!_this.state.itemSize || !_this.itemsWrapperRef || !_this.state.visibleItems) {
return false;

@@ -146,5 +146,9 @@ }

var leftBoundary = 0;
var currentPosition = -_this.state.firstItem * _this.state.itemSize;
var lastLeftBoundary = -_this.state.visibleItems * _this.state.itemSize; // prevent user from swiping left out of boundaries
var childrenLength = _react.Children.count(_this.props.children);
var currentPosition = -(_this.state.firstItem * 100) / _this.state.visibleItems;
var lastLeftItem = Math.max(childrenLength - _this.state.visibleItems, 0);
var lastLeftBoundary = -lastLeftItem * 100 / _this.state.visibleItems; // prevent user from swiping left out of boundaries
if (currentPosition === leftBoundary && deltaX > 0) {

@@ -151,0 +155,0 @@ deltaX = 0;

@@ -15,2 +15,3 @@ /// <reference types="react" />

export interface CarouselProps {
ariaLabel?: string | undefined;
axis: 'horizontal' | 'vertical';

@@ -17,0 +18,0 @@ autoFocus?: boolean;

{
"name": "react-responsive-carousel",
"version": "3.2.20",
"version": "3.2.21",
"description": "React Responsive Carousel",

@@ -5,0 +5,0 @@ "author": {

@@ -11,3 +11,3 @@ # React Responsive Carousel

I don't have any time available to keep maintaining this package. If you have any request, try to sort it within the comuninity. I'm able to merge pull requests that look safe from time to time but no commitment on timelines here. Feel free to fork it and publish under other name if you are in a hurry or to use another component.
I don't have any time available to keep maintaining this package. If you have any request, try to sort it within the community. I'm able to merge pull requests that look safe from time to time but no commitment on timelines here. Feel free to fork it and publish under other name if you are in a hurry or to use another component.

@@ -101,2 +101,3 @@ ### Features

| ---------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ariaLabel | `string` | Define the `aria-label` attribute for the root carousel element. The default is `undefined`, skipping the attribute from markup. |
| axis | `'horizontal'`, `'vertical'` | Define the direction of the slider, defaults to `'horizontal'`. |

@@ -103,0 +104,0 @@ | autoFocus | `boolean` | Force focus on the carousel when it renders. |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc