{"_id":"@chaucerbao/modal.js","_rev":"2-e2753fc7e06b8b03fe69cbfbc4a0bd70","name":"@chaucerbao/modal.js","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@chaucerbao/modal.js","version":"0.1.0","description":"A simple, tiny modal","author":{"name":"Alvin Chan","email":"no@email.com"},"license":"ISC","homepage":"https://github.com/chaucerbao/modal.js#readme","repository":{"type":"git","url":"git+https://github.com/chaucerbao/modal.js.git"},"bugs":{"url":"https://github.com/chaucerbao/modal.js/issues"},"main":"dist/modal.js","types":"dist/modal.d.ts","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"linters":{"*.{json,ts}":["prettier --write","git add"]},"ignore":["package.json","package-lock.json"]},"prettier":{"semi":false,"singleQuote":true},"devDependencies":{"husky":"^1.1.3","lint-staged":"^8.0.4","parcel-bundler":"^1.10.3","prettier":"^1.15.1","shx":"^0.3.2","typescript":"^3.1.6"},"scripts":{"start":"shx rm -rf dist/ && parcel example/index.html","build":"shx rm -rf dist/ && tsc && parcel build --no-source-maps --global modal src/modal.ts","clean":"shx rm -rf .cache/ dist/","prepublishOnly":"npm run build"},"gitHead":"c1967832addd6a04c2f703ed840c8da803801ec2","_id":"@chaucerbao/modal.js@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"chaucerbao","email":"aschan98@yahoo.com"},"dist":{"integrity":"sha512-C9GrzdKzPOdAa7CX/PvXIEawgrq7pbmXk54PIBLwxv4eGId3FcqWXaGq2lGsPPsBUzlYAABgQg0fOLGW+4087Q==","shasum":"687eb739ccaa22fd35f0507510fb4ff833ded4c9","tarball":"https://registry.npmjs.org/@chaucerbao/modal.js/-/modal.js-0.1.0.tgz","fileCount":4,"unpackedSize":5311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8xzZCRA9TVsSAnZWagAApr4P+QHy98FVFBC4JgZ4Zaxf\n1AtrdvTXh6Fx6/FnJ+wbS5gvMU/dkEVxR4LYEUf9ho37MtHEvSD5sHwdwjlf\nz6KYMP1lnxNlVuOay1sKjhur1w38nu/jl9ACu2YvDHxiaCV+vo96m/1s8Rms\nRD12sRZy7bRfDc2jxqnVuM8ijLdeW9Q5AA1rLKY1+rjtlCK3P/HfpmVjs4i6\nB19HJ5pdNIc2NvX3igs9Q7Z8xDXFh8XagQaUdvNDEO8NnWd7Pl3WMfKAgEJ1\n4oGsumofmW01QLWOAO8PNih3PMcNHua2oKAKRXRDiGY+SKhbgx3Oy4ZTRmRM\nF0/UbYR1cyNL14btlYR96ghR7/fP0M52CL21Xjq0XjNlXfzw1hE7LK9Ob9MX\nt25Ed1QhNggjIqc4ehBU6oTGxz0vL1vJ2c5sEPDTe6ZVbMCWKD1EPP27/Ob4\nSNg/Wwz5B7ksAzePsTu1JvjTfz+oblMM8ooHRqE0O9NDkWdLflDAZYYpiaVa\nzWS5LFEpXy+BcUAyGHoWBsrTG8FHXLsiY0aFPdlx+fP4v5azAyrq/cdy3EqW\n5ttmfVILFYcfVsxkE2E20bwKuXmyoOio0zhRrXlCVPBRlqyIeSWssI4z93jJ\nKF7EkMlsjBCYaExObv40QOLYUjCHu7wj9e+fs3Umum1d7kuB1WS5bOHkIaU9\ntLsM\r\n=HMll\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFxFXNx9uqk8dEwD3NkgHbifGPQ7/vv3UNwvM5bz1FkqAiBq2aXcniF4b4l6w1ACXpKtYPgyFNFBpgi82Z2SXxKwAA=="}]},"maintainers":[{"name":"chaucerbao","email":"aschan98@yahoo.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal.js_0.1.0_1542659289095_0.816545555893478"},"_hasShrinkwrap":false},"0.1.1":{"name":"@chaucerbao/modal.js","version":"0.1.1","description":"A simple, tiny modal","author":{"name":"Alvin Chan","email":"no@email.com"},"license":"ISC","homepage":"https://github.com/chaucerbao/modal.js#readme","repository":{"type":"git","url":"git+https://github.com/chaucerbao/modal.js.git"},"bugs":{"url":"https://github.com/chaucerbao/modal.js/issues"},"main":"dist/modal.js","types":"dist/modal.d.ts","husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"linters":{"*.{json,ts}":["prettier --write","git add"]},"ignore":["package.json","package-lock.json"]},"prettier":{"semi":false,"singleQuote":true},"devDependencies":{"husky":"^1.1.3","lint-staged":"^8.0.4","parcel-bundler":"^1.10.3","prettier":"^1.15.1","shx":"^0.3.2","typescript":"^3.1.6"},"scripts":{"start":"shx rm -rf dist/ && parcel example/index.html","build":"shx rm -rf dist/ && tsc && parcel build --no-source-maps --global modal src/modal.ts","clean":"shx rm -rf .cache/ dist/","prepublishOnly":"npm run build"},"gitHead":"75ba35b1e317f03e0e333b673922a24ec86cf5d0","_id":"@chaucerbao/modal.js@0.1.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"chaucerbao","email":"aschan98@yahoo.com"},"dist":{"integrity":"sha512-O2GmbI3/7G9rbllS2PCRfBdDUCjFPYrYC5CH9RzMz3dcho9n8+b91iJ/oIKtZmCsqG1+773qXJKsIidnsWHhgA==","shasum":"615a6261f2e26213f9dc5a496b0fea477f6d3e31","tarball":"https://registry.npmjs.org/@chaucerbao/modal.js/-/modal.js-0.1.1.tgz","fileCount":4,"unpackedSize":5589,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9LM7CRA9TVsSAnZWagAAsP8P/2EPE0p8nI4BytYqT87/\naDCvPh9ac8Vghtg+GTnWZJy4Hp5jLZseNUoBZHfh0sJhIusGk4cYccmuvULW\nIxVtSrjuKmZC3nVxiyQFgif+mDQco4k8QS2MAg4EVhzCF/IpIEmrBL6+h9ro\nFIMzCa80YX/2ThJzDz7EO49WpKGpPJZxinwbOreu58pszHACWXzNT7KHardo\nYILY9eHIVEt9mXxDD3OWDksYy7VKUWxfZoU4YG5ev/Wk25HBkj5S2t2wp4Ha\nZ2Z55WiWgxiSLZici5Xt1+TvVZwRxeAaPYQyLTQ8joP8plluzDCDbw/bxV15\nOiG1Efxm2pZhLgg6VXP2mqPhtkD2Ya7ndp4przFv0fsrp8rvPhqVpIJWSmRh\n4QSLJq/pQt6hsKO6O5bat2uQ1PGuzrO1xTpsbR7XY6LtNpFFRZTTF4OVqYCa\nvJEDXnHik1W5eKq/kzihesNc9XYsFFqu9K4ggyQuIE4PjqW2MvLDi4msl3Ls\nq9g0/ZmdCg2nU7Y+BBTA5mrkB/TgXI36kW6rZc5Lx/mq46aN1akWeX5A/zY+\nCZ3t1MAzKYGAFl2iXZRPY6nS0fpORcCRWsfOp/9PWLboiEUs/8wSRcBGvZQh\nRbqZyFy41YqLBZ7rcDOyJ2Ukmz3DG5yLKN90zCxzisi7ycNZpFZuiNRyIOJW\naCvZ\r\n=IHe/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZrIK2q/WOlMdJp5UgSwCMBJgcCzgzEV9XKXVGCaYY9AiEA7N+oXdwM07jQAaNDcEOZ1XeZGticY7hqirY5CLvVRX8="}]},"maintainers":[{"name":"chaucerbao","email":"aschan98@yahoo.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/modal.js_0.1.1_1542763322868_0.7179330843717169"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-19T20:28:08.933Z","0.1.0":"2018-11-19T20:28:09.258Z","modified":"2022-04-04T22:34:12.230Z","0.1.1":"2018-11-21T01:22:03.053Z"},"maintainers":[{"name":"chaucerbao","email":"aschan98@yahoo.com"}],"description":"A simple, tiny modal","homepage":"https://github.com/chaucerbao/modal.js#readme","repository":{"type":"git","url":"git+https://github.com/chaucerbao/modal.js.git"},"author":{"name":"Alvin Chan","email":"no@email.com"},"bugs":{"url":"https://github.com/chaucerbao/modal.js/issues"},"license":"ISC","readme":"# Modal.js &middot; ![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/@chaucerbao/modal.js.svg)\n\nA simple, tiny modal.\n\n## Usage\nStructure your modal similar to the HTML example below. There are 4 attributes that Modal.js recognizes:\n`data-modal` - The modal container\n`data-modal-dialog` - The dialog box that houses the modal's content\n`data-modal-trigger` - Add it to any element(s) to attach a click-handler for opening a modal with the given ID\n`data-modal-close` - (Optional) Add it to any element(s) to attach a click-handler for closing the modal\n\n```html\n<!-- HTML -->\n<button data-modal-trigger=\"modal-id\">Open a modal</button>\n\n<div id=\"modal-id\" data-modal>\n  <div data-modal-dialog>\n    <h1>Amazing title</h1>\n    <p>Very intriguing content.</p>\n    <button data-modal-close>Close Modal</button>\n  </div>\n</div>\n```\n\nInitialize your modal(s) with customizable options for each modal.\n```javascript\n/* JavaScript */\nconst modalHandler = modal({\n  /* Options for all modals */\n  '*': {\n    onOpen: () => console.log('onOpen *'),\n    onClose: () => console.log('onClose *')\n  },\n\n  /* Options specifically for the modal with the ID of 'modal-id' */\n  'modal-id': {\n    onOpen: (modal) => console.log('Modal opened', modal),\n    onClose: (modal) => console.log('Modal closed', modal)\n  }\n})\n```\n\nYou can also open/close modals programmatically after initialization.\n```javascript\n/* JavaScript */\ndocument\n  .getElementById('opener')\n  .addEventListener('click', () => modalHandler.open('modal-id'))\n\ndocument\n  .getElementById('closer')\n  .addEventListener('click', () => modalHandler.close())\n```\n\nNow, style your modal ([example](example/style.css)) with CSS.\n\n## Options\nAvailable options for `modal(options)` where `options` are defined for each modal by its ID.\n\nOption  | Type     | Description\n------- | -------- | -----------\nonOpen  | function | A callback function to run when a modal is opened\nonClose | function | A callback function to run when a modal is closed\n","readmeFilename":"README.md"}