Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-motion

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-motion - npm Package Compare versions

Comparing version 2.3.4 to 2.4.0

1

es/CSSMotion.d.ts

@@ -52,2 +52,3 @@ import * as React from 'react';

children?: (props: {
visible: boolean;
className?: string;

@@ -54,0 +55,0 @@ style?: React.CSSProperties;

16

es/CSSMotion.js

@@ -33,3 +33,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

var CSSMotion = React.forwardRef(function (props, ref) {
var CSSMotion = /*#__PURE__*/React.forwardRef(function (props, ref) {
var _props$visible = props.visible,

@@ -76,2 +76,6 @@ visible = _props$visible === void 0 ? true : _props$visible,

var mergedProps = _objectSpread(_objectSpread({}, eventProps), {}, {
visible: visible
});
if (!children) {

@@ -83,9 +87,9 @@ // No children

if (mergedVisible) {
motionChildren = children(_objectSpread({}, eventProps), setNodeRef);
motionChildren = children(_objectSpread({}, mergedProps), setNodeRef);
} else if (!removeOnLeave) {
motionChildren = children(_objectSpread(_objectSpread({}, eventProps), {}, {
motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {
className: leavedClassName
}), setNodeRef);
} else if (forceRender) {
motionChildren = children(_objectSpread(_objectSpread({}, eventProps), {}, {
motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {
style: {

@@ -112,3 +116,3 @@ display: 'none'

motionChildren = children(_objectSpread(_objectSpread({}, eventProps), {}, {
motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {
className: classNames(getTransitionName(motionName, status), (_classNames = {}, _defineProperty(_classNames, getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix)), statusSuffix), _defineProperty(_classNames, motionName, typeof motionName === 'string'), _classNames)),

@@ -119,3 +123,3 @@ style: statusStyle

return React.createElement(DomWrapper, {
return /*#__PURE__*/React.createElement(DomWrapper, {
ref: wrapperNodeRef

@@ -122,0 +126,0 @@ }, motionChildren);

@@ -75,3 +75,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";

delete restProps.keys;
return React.createElement(Component, Object.assign({}, restProps), keyEntities.map(function (_ref2) {
return /*#__PURE__*/React.createElement(Component, Object.assign({}, restProps), keyEntities.map(function (_ref2) {
var status = _ref2.status,

@@ -81,3 +81,3 @@ eventProps = _objectWithoutProperties(_ref2, ["status"]);

var visible = status === STATUS_ADD || status === STATUS_KEEP;
return React.createElement(CSSMotion, Object.assign({}, motionProps, {
return /*#__PURE__*/React.createElement(CSSMotion, Object.assign({}, motionProps, {
key: eventProps.key,

@@ -84,0 +84,0 @@ visible: visible,

@@ -52,2 +52,3 @@ import * as React from 'react';

children?: (props: {
visible: boolean;
className?: string;

@@ -54,0 +55,0 @@ style?: React.CSSProperties;

@@ -56,3 +56,3 @@ "use strict";

var CSSMotion = React.forwardRef(function (props, ref) {
var CSSMotion = /*#__PURE__*/React.forwardRef(function (props, ref) {
var _props$visible = props.visible,

@@ -98,2 +98,5 @@ visible = _props$visible === void 0 ? true : _props$visible,

var motionChildren;
var mergedProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, eventProps), {}, {
visible: visible
});

@@ -106,9 +109,9 @@ if (!children) {

if (mergedVisible) {
motionChildren = children((0, _objectSpread2.default)({}, eventProps), setNodeRef);
motionChildren = children((0, _objectSpread2.default)({}, mergedProps), setNodeRef);
} else if (!removeOnLeave) {
motionChildren = children((0, _objectSpread2.default)((0, _objectSpread2.default)({}, eventProps), {}, {
motionChildren = children((0, _objectSpread2.default)((0, _objectSpread2.default)({}, mergedProps), {}, {
className: leavedClassName
}), setNodeRef);
} else if (forceRender) {
motionChildren = children((0, _objectSpread2.default)((0, _objectSpread2.default)({}, eventProps), {}, {
motionChildren = children((0, _objectSpread2.default)((0, _objectSpread2.default)({}, mergedProps), {}, {
style: {

@@ -135,3 +138,3 @@ display: 'none'

motionChildren = children((0, _objectSpread2.default)((0, _objectSpread2.default)({}, eventProps), {}, {
motionChildren = children((0, _objectSpread2.default)((0, _objectSpread2.default)({}, mergedProps), {}, {
className: (0, _classnames.default)((0, _motion.getTransitionName)(motionName, status), (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _motion.getTransitionName)(motionName, "".concat(status, "-").concat(statusSuffix)), statusSuffix), (0, _defineProperty2.default)(_classNames, motionName, typeof motionName === 'string'), _classNames)),

@@ -142,3 +145,3 @@ style: statusStyle

return React.createElement(_DomWrapper.default, {
return /*#__PURE__*/React.createElement(_DomWrapper.default, {
ref: wrapperNodeRef

@@ -145,0 +148,0 @@ }, motionChildren);

@@ -93,7 +93,7 @@ "use strict";

delete restProps.keys;
return React.createElement(Component, Object.assign({}, restProps), keyEntities.map(function (_ref2) {
return /*#__PURE__*/React.createElement(Component, Object.assign({}, restProps), keyEntities.map(function (_ref2) {
var status = _ref2.status,
eventProps = (0, _objectWithoutProperties2.default)(_ref2, ["status"]);
var visible = status === _diff.STATUS_ADD || status === _diff.STATUS_KEEP;
return React.createElement(CSSMotion, Object.assign({}, motionProps, {
return /*#__PURE__*/React.createElement(CSSMotion, Object.assign({}, motionProps, {
key: eventProps.key,

@@ -100,0 +100,0 @@ visible: visible,

{
"name": "rc-motion",
"version": "2.3.4",
"version": "2.4.0",
"description": "React lifecycle controlled motion library",

@@ -5,0 +5,0 @@ "keywords": [

# rc-motion
[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url] [![build status][travis-image]][travis-url] [![Codecov][codecov-image]][codecov-url] [![Dependencies][david-image]](david-url) [![DevDependencies][david-dev-image]][david-dev-url] [![bundle size][bundlephobia-image]][bundlephobia-url]
[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[![build status][github-actions-image]][github-actions-url]
[![Codecov][codecov-image]][codecov-url]
[![Dependencies][david-image]](david-url)
[![DevDependencies][david-dev-image]][david-dev-url]
[![bundle size][bundlephobia-image]][bundlephobia-url]
[npm-image]: http://img.shields.io/npm/v/rc-motion.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-motion
[travis-image]: https://img.shields.io/travis/com/react-component/motion.svg?style=flat-square
[travis-url]: https://travis-ci.com/react-component/motion
[github-actions-image]: https://github.com/react-component/motion/workflows/CI/badge.svg
[github-actions-url]: https://github.com/react-component/motion/actions
[codecov-image]: https://img.shields.io/codecov/c/github/react-component/motion/master.svg?style=flat-square

@@ -10,0 +16,0 @@ [codecov-url]: https://codecov.io/gh/react-component/motion/branch/master

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