{"_id":"@aponahmed/tooltip","_rev":"7-5893b9555e0dad2fd5cb046d7b67b088","name":"@aponahmed/tooltip","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"@aponahmed/tooltip","version":"0.0.1","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","gitHead":"c625f40f0055365bfabd9d7797bbdec391c9912d","_id":"@aponahmed/tooltip@0.0.1","_nodeVersion":"18.18.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-E37FLYUC2ucXw4oQErLQJStIqP9qQQsx9OiY+vDgKRXLX56dDShKu6hiqaamtfOmYVsJGIIotGWjImu9FGXjYw==","shasum":"fbad73229e38756d75e0dbb9c55b6acfc75cfdc2","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.1.tgz","fileCount":7,"unpackedSize":9196,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBJAJLF5/b3jCzcc0fZwLN6cNQRg8GRCilgrPMHQAfliAiEA2FvyRiDeyG1naV+9E27i9Jg2lEa9XdEhwG9BIY9YkR0="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.1_1704277037880_0.8890444465748983"},"_hasShrinkwrap":false},"0.0.2":{"name":"@aponahmed/tooltip","version":"0.0.2","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","gitHead":"58c224a5d59b9b8a011b6b105603e5d951cd2522","_id":"@aponahmed/tooltip@0.0.2","_nodeVersion":"18.18.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-xm3SGTv8DareRCDh8jXF1UNu35iNu+XQgElnI2PdiLWWliacW+Z/oMcIQm8/rbtHm+/iEsdStpeidnRxSo112g==","shasum":"5cfb6b433fcf98c266a7416469d11f429cef1e81","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.2.tgz","fileCount":7,"unpackedSize":9118,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAK0fRZiT4jwamUoiSHeiW6y+NxX98PeMykie4McNc5iAiEAxVIBlZpP0T+TfwNAXmRjglxgtosi6Wkee4nwHasfgFM="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.2_1704278618668_0.7755815388316072"},"_hasShrinkwrap":false},"0.0.4":{"name":"@aponahmed/tooltip","version":"0.0.4","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","gitHead":"9f02312ecf1abd783f4f22b951c3abaa7f01bc6d","_id":"@aponahmed/tooltip@0.0.4","_nodeVersion":"18.18.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-oG4aghObd7VysOG1ZJlnpaN0UTU363LN842wd3jdae+KY661DLZk/4PjBHfrwcL0I160UkoJ6kzLrU7i/rhJqg==","shasum":"2bb99d56be4664cb7763695be341535e9b6f88fa","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.4.tgz","fileCount":7,"unpackedSize":9246,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhxg91ZHRyJVnvM0G4XGXGZYVgta/zk9Nvlg/jtFqTIAiAkapZ283SYR3tY7OAuAlrKLkVym2oQPX0tuST/qwAXGQ=="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.4_1704279260109_0.3318011765316591"},"_hasShrinkwrap":false},"0.0.5":{"name":"@aponahmed/tooltip","version":"0.0.5","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","_id":"@aponahmed/tooltip@0.0.5","gitHead":"363ba051f5078fc75f8e3cf75cf9ea0ecc000706","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-XMLFuPZp9yxuTVsRQRp1EDFsUARQZ5CHesXUAeUgnZOG4end8JUA1YxbAvo1MsMVfbikRzP7QWPoTPrKRLIqlA==","shasum":"995cdc9e93a13fe4f50161550cff97d4da8a8278","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.5.tgz","fileCount":7,"unpackedSize":9990,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3my13U2IQs70CYD4UmsFBpjH8g0j5/E/3lz4OmnY1gQIgVQuAMVn+3L8CZj8TMXc9s6vM4CdbugwREJBYA+jxtGo="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.5_1714042119536_0.2248459409258987"},"_hasShrinkwrap":false},"0.0.6":{"name":"@aponahmed/tooltip","version":"0.0.6","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","_id":"@aponahmed/tooltip@0.0.6","gitHead":"c0c6db13f0a0e340458318c961f9ab12b23f2d05","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-yiGjZ/uZiCSypz38AQKxkB6OdOFBJ4ol2hYmHqufXSfYSTHNWOoxEGIsGlZF5g/2dMSltuRAQEWF0v543joD9w==","shasum":"471e5618404d68df1ff00a88bf2aa7d8682443ce","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.6.tgz","fileCount":7,"unpackedSize":10343,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5obYxcGr2Q8BBjz/s7ELHtJkjMzPbCNksORo02eC7aAiAM8ri/2TcTtD56RivyU8LVcrVbPDZi5sOgOSoRTFE4VQ=="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.6_1714043666411_0.14649789900454846"},"_hasShrinkwrap":false},"0.0.7":{"name":"@aponahmed/tooltip","version":"0.0.7","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","_id":"@aponahmed/tooltip@0.0.7","gitHead":"14f14a734087d65f41f3467233deb2d95e82f6ac","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-6R9uahsM8TQzQtV/NxJcII9tCgtTRHck0dYtTN/sbjUY9IM5KpPk7pga9BsEpCiruQeRugzLkejtxHU+0VnAhA==","shasum":"2d1c30c45eb150753bbfc059e772575700f06b3e","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.7.tgz","fileCount":7,"unpackedSize":10343,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8BxXdeVLUFns1xBbNk2AIjhY/Qfa2CjA/d/LxM5aHJwIgHz/1XLrOZGoWSr+4FyKS1Nj+Un5qWaIbSPTeqJCTZwE="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.7_1714044100892_0.728310704156863"},"_hasShrinkwrap":false},"0.0.8":{"name":"@aponahmed/tooltip","version":"0.0.8","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","_id":"@aponahmed/tooltip@0.0.8","gitHead":"3331c4f46ca6845b176bd183ba963bcb1590ef0d","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-Q0vsFNPfoLkF2/83Yeqq36iPDMkNQw+AYPlXcJJXvBPASvss6UR/NIYtJMPRFy5OJz/7/moLj/+CqS47YM0btg==","shasum":"438f101fa973639b369d092bce391460b4cb8f00","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.8.tgz","fileCount":7,"unpackedSize":10424,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHa1pmecBDcIIrzfhXr687iVRJPWyuvel4HYoMdN9vHtAiEAx/45eAMJvJA53FoRyvWGCpb9OPN8JU2jya07QnFF1bw="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.8_1714044957171_0.8906863452499205"},"_hasShrinkwrap":false},"0.0.9":{"name":"@aponahmed/tooltip","version":"0.0.9","description":"A simple tooltip plugin to show hint","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"keywords":["tooltip","Hint","Title","Tooltip","title"],"author":{"name":"MD. Muhiminul Haque"},"license":"ISC","bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"homepage":"https://github.com/AponAhmed/Tooltip#readme","_id":"@aponahmed/tooltip@0.0.9","gitHead":"4cd513710ab8f9d17ffdc908b1d9951e1144d065","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-slsvebRJbJJzyWtYip+i1vQZR6WHvEA8IIT206ZiRFTM3rqE7hWfmvwup26dLp7aRlB62IqiezEmdqBm0J2Tfg==","shasum":"c3de0439888af47353da8b8024f6275affe14739","tarball":"https://registry.npmjs.org/@aponahmed/tooltip/-/tooltip-0.0.9.tgz","fileCount":7,"unpackedSize":10420,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBDabFXQnQdmgEoqkcmaJSNWFCDq1ND/dS8YOexaTfvAiEAnN+aDk3IoXsjucRVODnv587REb40zpp+yzLciAuDHng="}]},"_npmUser":{"name":"m2766","email":"apon2041@gmail.com"},"directories":{},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_0.0.9_1714045210019_0.7811352788155057"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-03T10:17:17.794Z","0.0.1":"2024-01-03T10:17:18.087Z","modified":"2024-04-25T11:40:10.430Z","0.0.2":"2024-01-03T10:43:38.817Z","0.0.4":"2024-01-03T10:54:20.282Z","0.0.5":"2024-04-25T10:48:39.724Z","0.0.6":"2024-04-25T11:14:26.628Z","0.0.7":"2024-04-25T11:21:41.038Z","0.0.8":"2024-04-25T11:35:57.330Z","0.0.9":"2024-04-25T11:40:10.179Z"},"maintainers":[{"name":"m2766","email":"apon2041@gmail.com"}],"description":"A simple tooltip plugin to show hint","homepage":"https://github.com/AponAhmed/Tooltip#readme","keywords":["tooltip","Hint","Title","Tooltip","title"],"repository":{"type":"git","url":"git+https://github.com/AponAhmed/Tooltip.git"},"author":{"name":"MD. Muhiminul Haque"},"bugs":{"url":"https://github.com/AponAhmed/Tooltip/issues"},"license":"ISC","readme":"# Tooltip Class\n\nThe Tooltip class is designed to create and display tooltips on HTML elements.\n\n## Installation\n\n```bash\n      npm i @aponahmed/tooltip --save-dev\n```\n\n## Usage\n\n```html \n<button class=\"tooltip\" data-color=\"#fff\" data-bg=\"#000\" data-position=\"top\" title=\"Top Tooltip\">Hover me</button>\n\n```\n\n1. Import the Tooltip class and its associated styles:\n2. \n   ```javascript\n   import Tooltip from \"@aponahmed/tooltip\";\n\n   ```\n\n3. Create an instance of the Tooltip class:\n\n   ```javascript\n   const tooltip = new Tooltip({\n       item: document.getElementById('tooltip-trigger'), // HTML element triggering the tooltip\n       position: 'right', // Tooltip position (optional, default is 'right')\n       text: 'Tooltip Content', // Tooltip text content (optional, default is false)\n       bg: '#1a1f30', // Tooltip background color (optional, default is '#1a1f30')\n       color: '#fff' // Tooltip text color (optional, default is '#fff')\n   });\n   ```\n\n   Alternatively, you can use the `all` method to apply tooltips to multiple elements with a common class:\n\n   ```javascript\n   import { tooltip } from \"@aponahmed/tooltip\"\n   \n   tooltip(\".tooltip\", {\n    position: 'right', // Tooltip position (optional, default is 'right')\n    text: 'Tooltip Content', // Tooltip text content (optional, default is 'Tooltip Content')\n    bg: '#1a1f30', // Tooltip background color (optional, default is '#1a1f30')\n    color: '#fff' // Tooltip text color (optional, default is '#fff')\n\t});\n\t```\n\n\t## Properties\n\n- `item`: HTML element triggering the tooltip.\n- `position`: Position of the tooltip relative to the triggering element ('right', 'left', 'top', 'bottom').\n- `text`: Tooltip content text.\n- `bg`: Background color of the tooltip.\n- `color`: Text color of the tooltip.\n- `extraMargin`: Extra margin applied to the tooltip position.\n\n## Methods\n\n- `init()`: Initializes the tooltip and sets up event listeners.\n- `removeTooltip()`: Removes the tooltip from the DOM.\n- `positionSet(item)`: Sets the position of the tooltip based on the specified or default position.\n- `colorSet(item)`: Sets the background color of the tooltip based on the specified or default color.\n- `showTooltip(item, e)`: Displays the tooltip for the specified item and event.\n","readmeFilename":"README.md"}