rc-motion
Advanced tools
Comparing version 2.8.0 to 2.9.0
import * as React from 'react'; | ||
import type { CSSMotionProps } from './CSSMotion'; | ||
import type { KeyObject } from './util/diff'; | ||
export interface CSSMotionListProps extends Omit<CSSMotionProps, 'onVisibleChanged'>, Omit<React.HTMLAttributes<any>, 'children'> { | ||
export interface CSSMotionListProps extends Omit<CSSMotionProps, 'onVisibleChanged' | 'children'>, Omit<React.HTMLAttributes<any>, 'children'> { | ||
keys: (React.Key | { | ||
@@ -16,2 +16,9 @@ key: React.Key; | ||
onAllRemoved?: () => void; | ||
children?: (props: { | ||
visible?: boolean; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
index?: number; | ||
[key: string]: any; | ||
}, ref: (node: any) => void) => React.ReactElement; | ||
} | ||
@@ -18,0 +25,0 @@ export interface CSSMotionListState { |
@@ -75,3 +75,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
delete restProps.keys; | ||
return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2) { | ||
return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2, index) { | ||
var status = _ref2.status, | ||
@@ -95,3 +95,7 @@ eventProps = _objectWithoutProperties(_ref2, _excluded2); | ||
} | ||
}), children); | ||
}), function (props, ref) { | ||
return children(_objectSpread(_objectSpread({}, props), {}, { | ||
index: index | ||
}), ref); | ||
}); | ||
})); | ||
@@ -98,0 +102,0 @@ } |
import * as React from 'react'; | ||
import type { CSSMotionProps } from './CSSMotion'; | ||
import type { KeyObject } from './util/diff'; | ||
export interface CSSMotionListProps extends Omit<CSSMotionProps, 'onVisibleChanged'>, Omit<React.HTMLAttributes<any>, 'children'> { | ||
export interface CSSMotionListProps extends Omit<CSSMotionProps, 'onVisibleChanged' | 'children'>, Omit<React.HTMLAttributes<any>, 'children'> { | ||
keys: (React.Key | { | ||
@@ -16,2 +16,9 @@ key: React.Key; | ||
onAllRemoved?: () => void; | ||
children?: (props: { | ||
visible?: boolean; | ||
className?: string; | ||
style?: React.CSSProperties; | ||
index?: number; | ||
[key: string]: any; | ||
}, ref: (node: any) => void) => React.ReactElement; | ||
} | ||
@@ -18,0 +25,0 @@ export interface CSSMotionListState { |
@@ -86,3 +86,3 @@ "use strict"; | ||
delete restProps.keys; | ||
return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2) { | ||
return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2, index) { | ||
var status = _ref2.status, | ||
@@ -106,3 +106,7 @@ eventProps = (0, _objectWithoutProperties2.default)(_ref2, _excluded2); | ||
} | ||
}), children); | ||
}), function (props, ref) { | ||
return children((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, { | ||
index: index | ||
}), ref); | ||
}); | ||
})); | ||
@@ -109,0 +113,0 @@ } |
{ | ||
"name": "rc-motion", | ||
"version": "2.8.0", | ||
"version": "2.9.0", | ||
"description": "React lifecycle controlled motion library", | ||
@@ -66,2 +66,3 @@ "keywords": [ | ||
"father": "^4.1.2", | ||
"gh-pages": "^6.0.0", | ||
"husky": "^8.0.3", | ||
@@ -68,0 +69,0 @@ "lint-staged": "^14.0.1", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
108328
2236
0
21