{"_id":"@cubetiq/antd-modal","_rev":"3-eb57015144c8c02faf9f757beb90de49","name":"@cubetiq/antd-modal","dist-tags":{"latest":"0.0.1-alpha.3"},"versions":{"0.0.1-alpha.1":{"name":"@cubetiq/antd-modal","version":"0.0.1-alpha.1","author":{"name":"DylanVann"},"license":"MIT","_id":"@cubetiq/antd-modal@0.0.1-alpha.1","maintainers":[{"name":"vutpov","email":"vuthpov26@gmail.com"},{"name":"sombochea","email":"sombochea100@gmail.com"}],"contributors":[{"name":"Sambo Chea","email":"sombochea@cubetiqs.com"}],"homepage":"https://github.com/sombochea/antd-modal#readme","bugs":{"url":"https://github.com/sombochea/antd-modal/issues"},"dist":{"shasum":"ed88b21ea8cc59298f8b96b505401a5f8dfe7a67","tarball":"https://registry.npmjs.org/@cubetiq/antd-modal/-/antd-modal-0.0.1-alpha.1.tgz","fileCount":22,"integrity":"sha512-mnh03O6SvHYa6j/h5LM+MuxdCr/jZ3BIcpwCQ7Zwn47LMqg9Bp42SpyKfuqCNyvKBKSbeRQOczn+ogEjsB0rtw==","signatures":[{"sig":"MEQCIB99/yQ3jMlxKRA3i0bXgJedKjTxiyt76x3JC88qqq8LAiBeJap63zNnPeOB2U+JHZq6i9CYXvnHx7kswuc9d1i54g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkXhnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqwcQ/9G/cTApZGzk9RtMVm1gFY2GezCsr1l7eQOnGT1GQdkANz3jhQ\r\nwqybyxmIWnd1A0anmjcULxcbK/YJT9C/YUT1EUCzfETSsqu3qD5Fq+6Cu7le\r\nRkjCRtkqRWhKOh4MBoSFWzDuXd6fwHt+tEb2lOUNo3uJAB2nSuAs9JO63pIt\r\nVqw00akgpTIqKyvfKgWJyQ+oEN1sJ/Hs51SQ5Ljcl4KPrZR1JVDSxNkmLun5\r\niUDDj+3l5mF5kBr0a8nAtobCiDbDhuEBeFcAUel2IQLwNl+3ZtFI+BwsYTcr\r\nFjFpozKvqOJq0X/miJEduv5eWZ4lux8SWLohfLyD1zeNdjxS4jG62g2o1PrV\r\npEC5HoCnmQ0mORxhUtTfsSwaKelfqpn2+MzVp+oe+7SJJZ7+Lm5VsAG23CeP\r\nTPEph6EiDwW4oYLwwjMTUvS1kCLyrHe2qexMQw74iRgYF/D8DA4P+tB8ivYR\r\nWbiUC9D3AllIFlkz5Maycu4wOJEgyfPSiQ6jNPj9URCvs4mySwYJ7x0mFgu7\r\nMqkFHU2adOjpuir8MK1LtsPGnbzZ//b4wJnLbsagePVY2sxv3y2vxkL41H68\r\ns/poD+engEOY2USDFJfP2xlo4tPBJo9XUUPsv15kn59bCIbdrP7sipApoiLM\r\nIgPA6c2jZOs2otlad6k/B46yLlgWHV4Vtbg=\r\n=9Gah\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","module":"dist/antd-modal.esm.js","gitHead":"a4062b745edd402d592c379364920254f503b793","scripts":{"dev":"tsdx watch --noClean","lint":"tsdx lint src","test":"tsdx test --passWithNoTests","build":"yarn build:bundle && yarn build:copy","test-ci":"yarn build && yarn lint && yarn test","build:copy":"cp ../../README.md ./ && cp ./index.css ./dist","build:bundle":"tsdx build"},"typings":"dist/index.d.ts","_npmUser":{"name":"sombochea","email":"sombochea100@gmail.com"},"repository":{"url":"git+https://github.com/sombochea/antd-modal.git","type":"git"},"_npmVersion":"8.11.0","description":"Modal from Ant Design, draggable, resizable.","directories":{},"sideEffects":["dist/index.css"],"_nodeVersion":"16.15.1","dependencies":{"react-uid":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"antd":"^5","tsdx":"^0.14.1","react":"^18","tslib":"^2.3.1","react-dom":"^18","typescript":"^4.8.4","@types/jest":"^29.2.4","@types/react":"^18","@types/react-dom":"^18","@testing-library/react":"^13.4.0","eslint-config-prettier":"^8.3.0"},"peerDependencies":{"antd":"^5","react":"^18","react-dom":"^18"},"_npmOperationalInternal":{"tmp":"tmp/antd-modal_0.0.1-alpha.1_1670477927483_0.43298876935914454","host":"s3://npm-registry-packages"}},"0.0.1-alpha.3":{"name":"@cubetiq/antd-modal","version":"0.0.1-alpha.3","author":{"name":"DylanVann"},"license":"MIT","_id":"@cubetiq/antd-modal@0.0.1-alpha.3","maintainers":[{"name":"vutpov","email":"vuthpov26@gmail.com"},{"name":"sombochea","email":"sombochea100@gmail.com"}],"contributors":[{"name":"Sambo Chea","email":"sombochea@cubetiqs.com"}],"homepage":"https://github.com/sombochea/antd-modal#readme","bugs":{"url":"https://github.com/sombochea/antd-modal/issues"},"dist":{"shasum":"3c3660ef3d5984fc53f537416278398f8c8e27bf","tarball":"https://registry.npmjs.org/@cubetiq/antd-modal/-/antd-modal-0.0.1-alpha.3.tgz","fileCount":22,"integrity":"sha512-3XwoPgbWuz3JjUzeERo0lfGzzWuy4iy9+/KL2LesuS594zXdk/OCfDgfl3KRNEgMycdTVd/HCIbh6l9IugwdTg==","signatures":[{"sig":"MEQCIAllZt6qjektMYezZ3meMcn9omjVByF4aFAuFua2rS7AAiBdWHWCL+fCVbPZNFYPVVgTCAFO8zTBsf7WwZP1U5/6Ig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151822},"main":"dist/index.js","module":"dist/antd-modal.esm.js","gitHead":"686c7b240a6dda83165c8b8ccce21f0abf31736e","scripts":{"dev":"tsdx watch --noClean","lint":"tsdx lint src","test":"tsdx test --passWithNoTests","build":"yarn build:bundle && yarn build:copy","test-ci":"yarn build && yarn lint && yarn test","build:copy":"cp ../../README.md ./ && cp ./index.css ./dist","build:bundle":"tsdx build"},"typings":"dist/index.d.ts","_npmUser":{"name":"vutpov","email":"vuthpov26@gmail.com"},"repository":{"url":"git+https://github.com/sombochea/antd-modal.git","type":"git"},"_npmVersion":"10.5.2","description":"Modal from Ant Design, draggable, resizable.","directories":{},"sideEffects":["dist/index.css"],"_nodeVersion":"20.13.1","dependencies":{"react-uid":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"antd":"^5","tsdx":"^0.14.1","react":"^18","tslib":"^2.3.1","react-dom":"^18","typescript":"^4.8.4","@types/jest":"^29.2.4","@types/react":"^18","@types/react-dom":"^18","@testing-library/react":"^13.4.0","eslint-config-prettier":"^8.3.0"},"peerDependencies":{"antd":"^5","react":"^18","react-dom":"^18"},"_npmOperationalInternal":{"tmp":"tmp/antd-modal_0.0.1-alpha.3_1716455124649_0.43701938027801956","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-12-08T05:38:47.433Z","modified":"2026-09-05T15:24:11.059Z","0.0.1-alpha.1":"2022-12-08T05:38:47.684Z","0.0.1-alpha.3":"2024-05-23T09:05:24.802Z"},"bugs":{"url":"https://github.com/sombochea/antd-modal/issues"},"author":{"name":"DylanVann"},"license":"MIT","homepage":"https://github.com/sombochea/antd-modal#readme","repository":{"url":"git+https://github.com/sombochea/antd-modal.git","type":"git"},"description":"Modal from Ant Design, draggable, resizable.","contributors":[{"name":"Sambo Chea","email":"sombochea@cubetiqs.com"}],"maintainers":[{"email":"sombochea100@gmail.com","name":"sombochea"}],"readme":"<h1 align=\"center\">Ant Design Draggable Modal</h1>\n\n<div align=\"center\">\n\nModal from Ant Design, draggable, resizable.\n\n[![Version][version-badge]][package]\n[![Downloads][downloads-badge]][npmtrends]\n[![BundlePhobia](https://img.shields.io/bundlephobia/minzip/@cubetiq/antd-modal.svg?style=flat-square)](https://bundlephobia.com/result?p=@cubetiq/antd-modal)\n[![MIT License][license-badge]][license]\n[![Watch on GitHub][github-watch-badge]][github-watch]\n[![Star on GitHub][github-star-badge]][github-star]\n\n</div>\n\n<div align=\"center\">\n<!-- <a href=\"https://distracted-hugle-66cb55.netlify.com/\"> -->\n<img src=\"https://user-images.githubusercontent.com/1537615/52606003-06002180-2e3f-11e9-83f2-21fc6212924a.gif\" alt=\"Example of @cubetiq/antd-modal.\">\n</a>\n</div>\n\n## 🌎 Example\n\n## Required\n\n-   Ant Design 5.x\n-   React 18.x\n\n## ✨ Features\n\n-   [x] Drag with title bar.\n-   [x] Resize with handle.\n-   [x] Keep in bounds.\n    -   [x] During drag.\n    -   [x] During resize.\n    -   [x] During resize window.\n-   [x] Multiple modals with managed `zIndex`.\n-   [x] Open from center.\n-   [ ] Better API for using as a controlled component.\n-   [ ] Open from quadrants.\n-   [ ] Better escape key management.\n-   [ ] Resize with option key.\n\n## ✨ Enhancements\n\n-   [x] Ant Design 5.x\n-   [ ] Modal `visible` to `open`\n\n## 📦 Install\n\n```bash\nyarn add @cubetiq/antd-modal\n```\n\nNOTE: You must use `react@18` and `react-dom@18` or higher and `antd@5` or higher.\n\n## 🔨 Usage\n\n```tsx\nimport { useState, useCallback } from 'react'\nimport { Button } from 'antd'\nimport { DraggableModal, DraggableModalProvider } from '@cubetiq/antd-modal'\nimport '@cubetiq/antd-modal/dist/index.css'\n\nconst ModalWithButton = () => {\n    const [visible, setVisible] = useState(false)\n    const onOk = useCallback(() => setVisible(true), [])\n    const onCancel = useCallback(() => setVisible(false), [])\n    return (\n        <>\n            <Button onClick={onOk}>Open</Button>\n            <DraggableModal open={visible} onOk={onOk} onCancel={onCancel}>\n                Body text.\n            </DraggableModal>\n        </>\n    )\n}\n\n// DraggableModalProvider manages the zIndex\n// of DraggableModals rendered beneath it.\nconst App = () => (\n    <DraggableModalProvider>\n        <ModalWithButton />\n        <ModalWithButton />\n        <ModalWithButton />\n    </DraggableModalProvider>\n)\n```\n\n## ⚠️ User Experience Warning\n\nYou should probably try to design your app not to need to use this, apps should usually not be window managers.\n\n## License\n\nMIT © [DylanVann](https://github.com/DylanVann)\n\n#### Enhanced for Ant Design 5.x by [Sambo Chea](https://github.com/sombochea)\n\n<!--\nLinks:\n-->\n\n<!-- prettier-ignore-start -->\n\n[downloads-badge]: https://img.shields.io/npm/dm/@cubetiq/antd-modal.svg?style=flat-square\n[npmtrends]: http://www.npmtrends.com/@cubetiq/antd-modal\n[package]: https://www.npmjs.com/package/@cubetiq/antd-modal\n[version-badge]: https://img.shields.io/npm/v/@cubetiq/antd-modal.svg?style=flat-square\n[license-badge]: https://img.shields.io/npm/l/@cubetiq/antd-modal.svg?style=flat-square\n[license]: https://github.com/sombochea/antd-modal/blob/main/LICENSE\n[github-watch-badge]: https://img.shields.io/github/watchers/sombochea/antd-modal.svg?style=social\n[github-watch]: https://github.com/sombochea/antd-modal/watchers\n[github-star-badge]: https://img.shields.io/github/stars/sombochea/antd-modal.svg?style=social\n[github-star]: https://github.com/sombochea/antd-modal/stargazers\n\n<!-- prettier-ignore-end -->\n","readmeFilename":"README.md"}