{"name":"@rc-component/portal","version":"1.0.1","description":"React Portal Component","keywords":["react","react-component","react-portal"],"homepage":"https://github.com/react-component/portal","bugs":{"url":"https://github.com/react-component/portal/issues"},"repository":{"type":"git","url":"git+https://github.com/react-component/portal.git"},"license":"MIT","author":{"name":"smith3816@gmail.com"},"main":"./lib/index","module":"./es/index","typings":"es/index.d.ts","scripts":{"compile":"father build","deploy":"npm run docs:build && npm run docs:deploy","docs:build":"dumi build","docs:deploy":"gh-pages -d docs-dist","lint":"eslint src/ --ext .tsx,.ts","lint:tsc":"tsc -p tsconfig.json --noEmit","now-build":"npm run docs:build","prepublishOnly":"npm run compile && np --no-cleanup --yolo --no-publish","prettier":"prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"","start":"dumi dev","test":"npm run test:client && npm run test:server","test:client":"umi-test --testPathIgnorePatterns=ssr.test.tsx --testPathIgnorePatterns=ssr.test.tsx","test:coverage":"npm run test:client --coverage","test:server":"umi-test --env=node -- tests/ssr.test.tsx","watch":"father dev"},"dependencies":{"@babel/runtime":"^7.18.0","classnames":"^2.3.2","rc-util":"^5.16.0"},"devDependencies":{"@rc-component/father-plugin":"^1.0.0","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.0.0","@types/jest":"^26.0.20","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@umijs/fabric":"^2.5.2","dumi":"^1.1.0","eslint":"^7.18.0","father":"^4.0.0-rc.8","gh-pages":"^3.1.0","np":"^5.0.3","prettier":"^2.1.2","react":"^18.0.0","react-dom":"^18.0.0","typescript":"^4.6.3","umi-test":"^1.9.7"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"engines":{"node":">=8.x"},"gitHead":"0ae6d7a4446df8e43fdd24ed997c81bb7b8bdc22","_id":"@rc-component/portal@1.0.1","_nodeVersion":"16.12.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-aIxMEupUXhVARDSeRgiAuYA8K9VR1a6emLt9a2RpujMX5aRrtMES3rdMQOjBcD9eb64fzdCYt4/NrjmKk5r5vQ==","shasum":"555ab099a826b02cd22124bad878433bcc24d118","tarball":"http://registry-npm.ywwl.com/@rc-component/portal/download/@rc-component/portal-1.0.1.tgz","fileCount":31,"unpackedSize":26594,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7bOlYye/uI3VP4/GhlLR9HUYBJ576d24DMXZ+UPbvcwIhALAo5bPN9S+gRmuGpDmA0SC3kR3TMgtbNEmqgEg35EX2"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYeVbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptNQ/+KXdyFEQjIHIIMhOTCOYV51xqL2Q4Lbd9ANm+xj9zTgNji1qV\r\nFLdZiULuulumGVHbt3jbnUWroZZQkHy9MuPaRg9YLHxizaR7W6Y0mzo2WBoG\r\n/GvTSjBi0r/V3OLgNnLvStiQeUYFsMPkYcA8piVjO4ndePz7rxvfFpWDURHN\r\ngwAdi2sXGmza18mCItKJmm5Y1PSZ5B9A8uVNCoGBq+aO9txnmN4PVvL/2TMf\r\nM4zm9j9AtM7LVumkHxQa9IC8phDc6gKHtw/hBebQVUyHYrdUxqf1QGFztVFR\r\n+0c85zp7b5MLomQuhCvGbglO1+GKnYMmUsWqZPxBes5qc/iKbrsGtr50IFdw\r\nKaXN7yxg400q5Zk0ZOpJ7ixkMGdyHVIAtsBygAU/x03779vWpKC8lGmjetVW\r\nJXaFaZXi3q3nZrLbQQWn7iddkXXLpMRmrvL93jAPWCm4e6yFynGr8LU8rMMP\r\nhzqXo1OKGg4nraA8iHBmfdkdzxiP/AZAMZ08s8if8xwyypvo0M+JBGIpFHTY\r\nCmErqWgEORxmwtl00oEdqmQmk2JNBTO18MdZR1gPfldL13IuyM/7DG6AivNE\r\n1xGtSevAobZV8j8eJwyPG2TOVJIz56G48pvq4qXNgijdntW+BmnClmsSx2Tq\r\n/fzLnN5t+s4pclB30T/Qvialvex72ejPmws=\r\n=Znzq\r\n-----END PGP SIGNATURE-----\r\n","size":6315,"noattachment":false,"key":"/@rc-component/portal/-/@rc-component/portal-1.0.1.tgz"},"_npmUser":{"name":"afc163","email":"afc163@gmail.com"},"directories":{},"maintainers":[{"name":"peachscript","email":"scdzwyxst@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/portal_1.0.1_1667360090760_0.7348955236310175"},"_hasShrinkwrap":false,"readme":"# rc-portal\n\nReact 18 supported Portal Component.\n\n[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-portal.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-portal\n[github-actions-image]: https://github.com/react-component/portal/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/portal/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/portal/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/portal\n[download-image]: https://img.shields.io/npm/dm/rc-portal.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-portal\n\n## Development\n\n```bash\nnpm install\nnpm start\nopen http://localhost:8000\n```\n\n## Feature\n\n- React life cycle support portal component\n\n## Install\n\n[![rc-portal](https://nodei.co/npm/rc-portal.png)](https://npmjs.org/package/rc-portal)\n\n## Usage\n\n```js | pure\nimport Portal from 'rc-portal';\n\nconst Demo = () => {\n  return <Portal open>Hello World</Portal>;\n};\n\nexport default Demo;\n```\n\n## 🔥 API\n\nWe use typescript to create the Type definition. You can view directly in IDE. But you can still check the type definition [here](https://github.com/react-component/portal/blob/master/src/interface.ts).\n\n### Portal\n\n| Prop         | Description                        | Type                     | Default       |\n| ------------ | ---------------------------------- | ------------------------ | ------------- |\n| getContainer | Customize portal container element | Element \\| () => Element | document.body |\n| open         | Show the portal                    | boolean                  | false         |\n| autoLock     | Lock screen scroll when open       | boolean                  | false         |\n","publish_time":1667360090989,"_cnpm_publish_time":1667360090989,"dist-tags":{"latest":"2.2.1"}}