{"_id":"@annoyingmouse/wc-star-review","_rev":"4-1b428cb72c46b3f66ef3ccac7ccf250f","name":"@annoyingmouse/wc-star-review","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@annoyingmouse/wc-star-review","version":"1.0.0","keywords":["star","rating","review","web-component"],"author":{"name":"Dominic Myers"},"license":"MIT","_id":"@annoyingmouse/wc-star-review@1.0.0","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"homepage":"https://github.com/annoyingmouse/wc-star-review#readme","bugs":{"url":"https://github.com/annoyingmouse/wc-star-review/issues"},"dist":{"shasum":"4a74518d80a4cf32c0e38d7bd66936710d3325ce","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-star-review/-/wc-star-review-1.0.0.tgz","fileCount":9,"integrity":"sha512-olqyyVmRAPbxbmHebqZ4UyGe+7XpBnhxLw1s/avdZqetZPxnAeU0O3HkxBm7JBt1HIAvCIjLmruvLlh0OFEWJQ==","signatures":[{"sig":"MEQCIB8yqtBX2JP6JJ9HpTxs2vaC2BVeSXEJOlgD6JGran4gAiACwPs+52+VQsloPLumG/4RH8FajJQ9eACkrdI8M6eNNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWQNoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAcA//cVxBB4WBcAiHVJTnBJJi9Xcx4QjpcuMLToet5yp+Fc6+suDq\r\nrEWWOLSmGyOc76HucV3N35cuO2e7PbKDitWfYFjb6v8XG+XYILaBV3urWI6z\r\niMyV9evIJBZ5SNhMCvo4KYiUFfuUdaNKj9RnoUvWkkQQX2cfZcZZM0mN2Dah\r\nBTYR1aNnTrCzcTeoL4b4dAqNayHZrptzWn76rWOMTiU48C2vWQy6ZGkFGuNU\r\nr0Vr/9paH3w2lHe/R2C9chgbunNpZ4dCHq4qyR3AFZKNd8xdQuV9vEoAi6Ac\r\nurrmci9/WzNelvEZNxZPiTmkIy2wcFNqJrQ79jnTE4cDYKta4Lb/Q1EdqszC\r\nKzB76E519/nURconsA7dmShvJpJoMj1ANuymAX69Y4xjKPVNHNGpUbzb5CQU\r\nYVWxbh9xb8fQ0dtlwnJeXCg5cl0e2eSIsAq9ZwRMbr6c+R0wvRY9DVq+vfTS\r\n4TmUpnWFHpu/ZZEtfN/UrMTzOpYfM0ZVqZWFYH6RhhCIiG67RyqrZ0/cYXZN\r\nFJjKqVYFZYbwHMzIpZMAdJ4/LOZaA2Mk5pNVeK06XABGEKPh2IhJZbF+qagc\r\neuP3pcr48IZS8OSduDyfiusJKShywD4jPNJ4zt4YSmSl7RXuSiIxIMoxkkOl\r\nVjdAXp7bmchZaaGEt8Y6FN7+/qlgFaQgbOY=\r\n=IB6A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"main.js","gitHead":"27f1211e6206a9a3b9f3c8272b85b084fbd29f3d","scripts":{"test":"echo \"No test specified\"","build":"rollup -c"},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/annoyingmouse/wc-star-review.git","type":"git"},"_npmVersion":"6.14.6","description":"<h1>&lt;wc-star-review&gt;</h1>\r <p>This web component creates a configurable way of displaying a rating.</p>\r <p style=\"margin-bottom: 0;\">\r   <a href=\"https://www.webcomponents.org/element/@annoyingmouse/wc-star-review\"\r       rel=\"nofollow\">\r     <img ","directories":{},"_nodeVersion":"14.6.0","_hasShrinkwrap":false,"devDependencies":{"rollup":"^2.36.2","rollup-plugin-terser":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/wc-star-review_1.0.0_1666777959846_0.9754014344751107","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@annoyingmouse/wc-star-review","version":"1.0.1","keywords":["star","rating","review","web-component"],"author":{"name":"Dominic Myers"},"license":"MIT","_id":"@annoyingmouse/wc-star-review@1.0.1","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"homepage":"https://github.com/annoyingmouse/wc-star-review#readme","bugs":{"url":"https://github.com/annoyingmouse/wc-star-review/issues"},"dist":{"shasum":"c47a46de74a44421058a2d9da98274d5f401fecc","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-star-review/-/wc-star-review-1.0.1.tgz","fileCount":9,"integrity":"sha512-dR57bCGU+RbqHZ97AYB2Ne1tTEbZFQp6Sh1zPLBLDlLESPxT8bBdDoUfsT7g8FVnrX+gxJA4rQ1jcFBLirUn1w==","signatures":[{"sig":"MEUCIDq7MyIgHiCqAJkS0j4NCbuHFHVPCi0zNYZr40vv7vJ7AiEA6m0glePKOVQ49T3D40LpXw4bcQXn9qlcyTAI3ODM68c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25313,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXkpWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrmAQ/+NWNuXqoBpZTo8GcuSfW1DsEAtOwsU8y49SdCFBJszQlEFz6e\r\nUSNgok1WxMRjfWCsw1fRPryrJBkvL6K8hjwa1tXKfkio34vCld+gkfILTclM\r\nFSS/Jw9UYgx/X7nhQB1NA0uV8rcEqwFUEbRYcZGUjs/2bHc7mugn0Ov7/+Hb\r\neaRB1BhSzyPZvE6eqFInvnraY4CieVFpeI92dPSeA6LRgvA9TdCzWv4N70lu\r\n3w/P6sxDQ2QDPHc3+dFAmsHQb6eWjcvUVShznKAonAJhnvYYEfrqbysEXtjM\r\nsM8Az/xv+SFu2cgo6gEnz4FzWUxoNzIfMJ/G0eA4sM48zUjnRCSOeSrwvew7\r\nm1IupedPSRJOb3lr3lju8Enz84lYhRrvbPQYtQCpu7YessTfEn6aeKAMBD3u\r\nP5YJ8AHBLp80b1vvdNz7igRFAEJXcFi45lI0So4dD+ZEP1KkIV4VXqK0e7FX\r\ne/ZDrO8x8Wyqa0CJnOkskRbqh+0QDIJD9+u4fynbNnZHN9GeLHRQTgLUuz2L\r\n7IQ/DxEVe0tVP2NK2vfsURNdbekBRO1A6c3v7nqjwMqXv7Pynw4MVI5sUhXg\r\nHA8ngzCmPflCmHwtaNpLap9DUQ/qkMyrqNzdunLXWWzSDEhArPyukPwjqwAA\r\nvAuFZ3F0zKABW4Ht1VCf3BGrvRKjDN5iGS8=\r\n=OkxC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"main.js","gitHead":"6f93df8ae3d3a7789921203e60d5359bf8c414c5","scripts":{"test":"echo \"No test specified\"","build":"rollup -c"},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/annoyingmouse/wc-star-review.git","type":"git"},"_npmVersion":"6.14.6","description":"<h1>&lt;wc-star-review&gt;</h1>\r <p>This web component creates a configurable way of displaying a rating.</p>\r <p style=\"margin-bottom: 0;\">\r   <a href=\"https://www.webcomponents.org/element/@annoyingmouse/wc-star-review\"\r       rel=\"nofollow\">\r     <img ","directories":{},"_nodeVersion":"14.6.0","dependencies":{"np":"^7.6.2"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^2.36.2","rollup-plugin-terser":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/wc-star-review_1.0.1_1667123798585_0.3747019231411164","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@annoyingmouse/wc-star-review","version":"1.0.2","keywords":["star","rating","review","web-component"],"author":{"name":"Dominic Myers"},"license":"MIT","_id":"@annoyingmouse/wc-star-review@1.0.2","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"homepage":"https://github.com/annoyingmouse/wc-star-review#readme","bugs":{"url":"https://github.com/annoyingmouse/wc-star-review/issues"},"dist":{"shasum":"1265ef3214fe1227ae3a5f93111547577f9cbbc3","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-star-review/-/wc-star-review-1.0.2.tgz","fileCount":9,"integrity":"sha512-AHF/Rgpj9hSdinsd7ue6R6RgGDE5/C1DOb+dBEhd8yzNHCTpJ4yWyvbHI71Ny+QB+2icmGEgP2S5BLdddrszuw==","signatures":[{"sig":"MEQCIDunBuTGus3Jeu4pRLwWPXdOm1b0x6RscHDy4Sc1NBSYAiAOk55qYHWXiRNolnLewtLPUWyiBW/JZwZ4odn2lKHFog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXky4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7XxAAnji/mm+6/l4apIJ2olA6k3/FZ5JCS28pOmK/Rxb5Z+ARn1o9\r\ngRQUtminlQTeQVChk/x+9UXueLiJyOaPMP+eommhojD16EGJL+Yp1xbwFFnT\r\nxwiuk/59j0pKUsrk11AhRtuwBQcIqd4x/zRuBEt6UHyh1VwJWzXSFAY5lXoR\r\n4MpsaNT77gVbTq7jsK4XZLNnAlo5tdtE7LqutEn5huKvFnbAwU0XzNZ3VSgS\r\nWGPsnpYwfKSi9nMEjfFiyouLaXO/sWuV4wueXMzMbxxJ6YAdtTNuKz9vfeJ/\r\nzZxASqo7dWFEiTggDciqCnigJxt9YRYBm6//Njkf1/8mzGWWteopI4NCk+EG\r\nyXULl8ih1Wi7zXaSMMZLsfrK6CaPCbNpoZghOjPuy/E1W/ygMZIQBZkU9Wj1\r\nReDyq9Xx80p1mf8itqUdNW3dFgCtPIZKcBtSvp8Tr6Zu5Hlmvv/bMlBYXg0N\r\nV/xvZzN9RSaxfjEokG5uHLONrHHIRCTbsNm1rkx4Lqpaq5nz0DYbfDxxgxB4\r\n58wOGrXAMpsfoI+unafA2ZGasoAUFw81nndfUgbYkAYD41C7f3KJ5jGf2+xP\r\nIEDdl2h4Lktunknc4eGhmPjiYJ1K51NaaLaAvF3Zv7WJctIw7qXL8jcLuvKl\r\nHOiuSLRykJgKctn+PJdSnnzx6MEADrVhWvQ=\r\n=RV5e\r\n-----END PGP SIGNATURE-----\r\n"},"main":"main.js","gitHead":"c534f624bdcfae2061f96de4f6de68d139d19a4e","scripts":{"test":"echo \"No test specified\"","build":"rollup -c"},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/annoyingmouse/wc-star-review.git","type":"git"},"_npmVersion":"6.14.6","description":"This web component creates a configurable way of displaying a rating.","directories":{},"_nodeVersion":"14.6.0","dependencies":{"np":"^7.6.2"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^2.36.2","rollup-plugin-terser":"^7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/wc-star-review_1.0.2_1667124408081_0.5823311869302905","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@annoyingmouse/wc-star-review","version":"1.1.0","description":"Accessible star rating display web component with colour customisation, zero dependencies, and full keyboard support.","type":"module","main":"wc-star-review.js","scripts":{"test":"web-test-runner","build":"rollup -c"},"repository":{"type":"git","url":"git+https://github.com/annoyingmouse/wc-star-review.git"},"keywords":["web-component","custom-element","star","star-rating","rating","review","accessible","wcag","zero-dependency"],"author":{"name":"Dominic Myers"},"license":"MIT","bugs":{"url":"https://github.com/annoyingmouse/wc-star-review/issues"},"homepage":"https://github.com/annoyingmouse/wc-star-review#readme","prettier":{"singleQuote":true,"semi":false},"devDependencies":{"@open-wc/testing":"^4.0.0","@rollup/plugin-terser":"^1.0.0","@web/test-runner":"^0.20.2","@web/test-runner-playwright":"^0.11.1","rollup":"^4.0.0"},"dependencies":{"np":"^7.6.2"},"gitHead":"13ce3c98471b07c34f0ff24e05d7d4510b4857c0","_id":"@annoyingmouse/wc-star-review@1.1.0","_nodeVersion":"22.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-UMxwihIQihL2NmjathsnRIewbgDXsOOb+3+nTplH/xBL2Kyd4q1HspwLn6ILsHf9vvjpKma77wGtfbh78N+hcw==","shasum":"c99671903bdf6763638e3106a6ee7a322104623b","tarball":"https://registry.npmjs.org/@annoyingmouse/wc-star-review/-/wc-star-review-1.1.0.tgz","fileCount":5,"unpackedSize":20386,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD3cNw+r5n7XB0vy0oeiReZrr5E066vVdmhr4xNwTdAbQIhAMl6Er8wDLrZWKfxKWKDdWxUH6WlJQ4BFiuEIY159uzt"}]},"_npmUser":{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"},"directories":{},"maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wc-star-review_1.1.0_1774181469324_0.9878038662193573"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-26T09:52:39.769Z","modified":"2026-03-22T12:11:09.598Z","1.0.0":"2022-10-26T09:52:40.004Z","1.0.1":"2022-10-30T09:56:38.758Z","1.0.2":"2022-10-30T10:06:48.273Z","1.1.0":"2026-03-22T12:11:09.475Z"},"bugs":{"url":"https://github.com/annoyingmouse/wc-star-review/issues"},"author":{"name":"Dominic Myers"},"license":"MIT","homepage":"https://github.com/annoyingmouse/wc-star-review#readme","keywords":["web-component","custom-element","star","star-rating","rating","review","accessible","wcag","zero-dependency"],"repository":{"type":"git","url":"git+https://github.com/annoyingmouse/wc-star-review.git"},"description":"Accessible star rating display web component with colour customisation, zero dependencies, and full keyboard support.","maintainers":[{"name":"annoyingmouse","email":"annoyingmouse@gmail.com"}],"readme":"# <wc-star-review>\r\n\r\nThis web component creates a configurable way of displaying a rating.\r\n\r\n[![Published on webcomponents.org](https://camo.githubusercontent.com/fa095f7c7b24972f3525b39a6f31c15626f3a4cc019314b4f19ad88ccfd47ddb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f776562636f6d706f6e656e74732e6f72672d7075626c69736865642d626c75652e737667)](https://www.webcomponents.org/element/@annoyingmouse/wc-star-review)\r\n\r\nDemo here: [https://wc-star-review.annoyingmouse.repl.co](https://wc-star-review.annoyingmouse.repl.co)\r\n\r\n## Installation\r\n```\r\n<script type=\"module\" \r\n        src=\"https://unpkg.com/@annoyingmouse/wc-star-review/wc-star-review.js\"></script>\r\n```\r\n\r\nAlternatively:\r\n\r\n```\r\n<script type=\"module\"\r\n        src=\"https://cdn.skypack.dev/@annoyingmouse/wc-star-review/wc-star-review.js\"></script>\r\n```\r\n\r\nYou can use it minified by adding using this instead:\r\n\r\n```\r\n<script type=\"module\"\r\n        src=\"[WHATEVER CDN]/@annoyingmouse/wc-star-review/dist/wc-star-review.min.js\"></script>\r\n```\r\n\r\nPlease remember to change `[WHATEVER CDN]` to your favourite CDN\r\n\r\n## Usage\r\n\r\n```\r\n<wc-star-review rating=\"1\"\r\n                reviews=\"1\"></wc-star-review>\r\n<wc-star-review rating=\"2\"\r\n                reviews=\"2\"></wc-star-review>\r\n<wc-star-review rating=\"3\"\r\n                reviews=\"3\"></wc-star-review>\r\n<wc-star-review rating=\"4\"\r\n                reviews=\"4\"></wc-star-review>\r\n<wc-star-review rating=\"5\"\r\n                reviews=\"5\"></wc-star-review>\r\n<script type=\"module\"\r\n        src=\"wc-star-review.js\"></script>\r\n```\r\n\r\n## Configuration\r\n\r\nThe rating is provided using the `rating` attribute, it defaults to `0`.\r\n\r\nThe number of stars visible is controlled by the `total` attribute, it defaults to `5` (see the **Caution** below).\r\n\r\nThe number of reviews, if known, can be shown in brackets by providing a `reviews` attribute. The count is also included in the component's accessible label.\r\n\r\nThe colour of the stars can be changed from the default of `#FFC107` by adding a `colour` attribute (or `color` for the American spelling) with a suitable CSS color value. If the value is not a valid CSS color it is ignored and the default is used.\r\n\r\nThe background behind the stars can be changed from the default of `#CCCCCC` by adding a `background` attribute with a suitable CSS color value. If the value is not a valid CSS color it is ignored and the default is used.\r\n\r\n## Accessibility\r\n\r\nThe component automatically sets `role=\"img\"`, `tabindex=\"0\"`, and an `aria-label` on the host element. The label is generated from the current rating, total, and review count — for example: `\"100 reviews. Rated 4.50 out of 5 stars.\"`.\r\n\r\nAll three can be overridden by setting them directly on the element:\r\n\r\n```html\r\n<!-- suppress keyboard focus -->\r\n<wc-star-review rating=\"4\" tabindex=\"-1\"></wc-star-review>\r\n\r\n<!-- custom accessible name -->\r\n<wc-star-review rating=\"4\" aria-label=\"Rated 4 out of 5 by 20 customers\"></wc-star-review>\r\n\r\n<!-- decorative — remove from accessibility tree entirely -->\r\n<wc-star-review rating=\"4\" role=\"presentation\" tabindex=\"-1\"></wc-star-review>\r\n```\r\n\r\n## Caution\r\n\r\nIncreasing the `total` to numbers above 5 is not advised, besides, 5 stars are commonly [used in eCommerce](https://uxplanet.org/how-to-design-user-rating-and-reviews-1b26c0208d3a)","readmeFilename":"README.md"}