{"name":"@rc-component/motion","version":"1.1.4","keywords":["react","react-component","react-motion","motion","antd","ant-design"],"license":"MIT","_id":"@rc-component/motion@1.1.4","maintainers":[{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"},{"name":"peachscript","email":"scdzwyxst@gmail.com"}],"homepage":"https://react-component.github.io/motion","bugs":{"url":"http://github.com/react-component/motion/issues"},"cnpm":{"mode":"npm"},"dist":{"shasum":"32f82a161697f819bb4f47c2da2923d7c6d21383","tarball":"http://registry-npm.ywwl.com/@rc-component/motion/download/@rc-component/motion-1.1.4.tgz","fileCount":51,"integrity":"sha512-rz3+kqQ05xEgIAB9/UKQZKCg5CO/ivGNU78QWYKVfptmbjJKynZO4KXJ7pJD3oMxE9aW94LD/N3eppXWeysTjw==","signatures":[{"sig":"MEUCIEHRLMzgmkxwJsTW6gsvqiQu60GptFnbgHJWlNigssD1AiEA7k5s1duQqwwm7pDbRYAWV8f0Ct1EicZpBtqmYIGsGrk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":88832,"size":15394,"noattachment":false,"key":"/@rc-component/motion/-/@rc-component/motion-1.1.4.tgz"},"main":"./lib/index","tnpm":{"mode":"npm"},"module":"./es/index","gitHead":"e9cb0993a7b0b3b660289daa66062067ba240cd2","scripts":{"lint":"eslint src/ --ext .tsx,.ts","test":"rc-test","start":"dumi dev","compile":"father build","prepare":"husky install","lint:tsc":"tsc --noEmit","prettier":"prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"","now-build":"npm run docs:build","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","postpublish":"npm run docs:build && npm run docs:deploy","prepublishOnly":"npm run compile && rc-np"},"typings":"es/index.d.ts","_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/motion.git","type":"git"},"_npmVersion":"10.8.2","description":"React lifecycle controlled motion library","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write","git add"]},"_nodeVersion":"22.5.1","dependencies":{"classnames":"^2.2.1","@rc-component/util":"^1.2.0"},"_hasShrinkwrap":false,"devDependencies":{"dumi":"^2.0.18","husky":"^8.0.3","react":"^18.3.0","eslint":"^7.0.0","father":"^4.1.2","rc-test":"^7.0.14","gh-pages":"^6.0.0","prettier":"^2.1.1","cross-env":"^7.0.2","react-dom":"^18.3.0","typescript":"^4.0.3","@types/jest":"^26.0.8","lint-staged":"^14.0.1","@types/react":"^18.0.0","@umijs/fabric":"^2.0.8","@rc-component/np":"^1.0.3","@types/react-dom":"^18.0.0","@types/classnames":"^2.2.9","@testing-library/react":"^15.0.7","@testing-library/jest-dom":"^5.16.4","@rc-component/father-plugin":"^2.0.1"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_npmOperationalInternal":{"tmp":"tmp/motion_1.1.4_1739847547342_0.643627890038982","host":"s3://npm-registry-packages-npm-production"},"readme":"# @rc-component/motion\n\n<!-- prettier-ignore -->\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/@rc-component/motion.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/@rc-component/motion\n[travis-image]: https://img.shields.io/travis/react-component/motion/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/motion\n[github-actions-image]: https://github.com/react-component/motion/actions/workflows/main.yml/badge.svg\n[github-actions-url]: https://github.com/react-component/motion/actions/workflows/main.yml\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/motion/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/motion\n[david-url]: https://david-dm.org/react-component/motion\n[david-image]: https://david-dm.org/react-component/motion/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/motion?type=dev\n[david-dev-image]: https://david-dm.org/react-component/motion/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/@rc-component/motion.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@rc-component/motion\n[bundlephobia-url]: https://bundlephobia.com/package/@rc-component/motion\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@rc-component/motion\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\nReact lifecycle controlled motion library.\n\n## Live Demo\n\nhttps://react-component.github.io/motion/\n\n## Install\n\n[![@rc-component/motion](https://nodei.co/npm/@rc-component/motion.png)](https://npmjs.org/package/@rc-component/motion)\n\n## Example\n\n```js\nimport CSSMotion from '@rc-component/motion';\n\nexport default ({ visible }) => (\n  <CSSMotion visible={visible} motionName=\"my-motion\">\n    {({ className, style }) => <div className={className} style={style} />}\n  </CSSMotion>\n);\n```\n\n## API\n\n### CSSMotion\n\n| Property | Type | Default | Description |\n| --- | --- | --- | --- |\n| motionName | string | - | Config motion name, will dynamic update when status changed |\n| visible | boolean | true | Trigger motion events |\n| motionAppear | boolean | true | Use motion when appear |\n| motionEnter | boolean | true | Use motion when enter |\n| motionLeave | boolean | true | Use motion when leave |\n| motionLeaveImmediately | boolean | - | Will trigger leave even on mount |\n| motionDeadline | number | - | Trigger motion status change even when motion event not fire |\n| removeOnLeave | boolean | true | Remove element when motion leave end |\n| leavedClassName | string | - | Set leaved element className |\n| onAppearStart | (HTMLElement, Event) => CSSProperties \\| void; | - | Trigger when appear start, return style will patch to element |\n| onEnterStart | (HTMLElement, Event) => CSSProperties \\| void; | - | Trigger when enter start, return style will patch to element |\n| onLeaveStart | (HTMLElement, Event) => CSSProperties \\| void; | - | Trigger when leave start, return style will patch to element |\n| onAppearActive | (HTMLElement, Event) => CSSProperties \\| void; | - | Trigger when appear active, return style will patch to element |\n| onEnterActive | (HTMLElement, Event) => CSSProperties \\| void; | - | Trigger when enter active, return style will patch to element |\n| onLeaveActive | (HTMLElement, Event) => CSSProperties \\| void; | - | Trigger when leave active, return style will patch to element |\n| onAppearEnd | (HTMLElement, Event) => boolean \\| void; | - | Trigger when appear end, will not finish when return false |\n| onEnterEnd | (HTMLElement, Event) => boolean \\| void; | - | Trigger when enter end, will not finish when return false |\n| onLeaveEnd | (HTMLElement, Event) => boolean \\| void; | - | Trigger when leave end, will not finish when return false |\n\n### CSSMotionList\n\nextends all the props from [CSSMotion](#CSSMotion)\n\n| Property  | Type                          | Default | Description       |\n| --------- | ----------------------------- | ------- | ----------------- |\n| keys      | React.Key[]                   | -       | Motion list keys  |\n| component | string \\| React.ComponentType | div     | wrapper component |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## License\n\n@rc-component/motion is released under the MIT license.\n","publish_time":1739847547550,"_cnpm_publish_time":1739847547550,"dist-tags":{"latest":"1.3.3"}}