Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue3-star-ratings-ksh

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-star-ratings-ksh - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

10

dist/vue3-star-ratings.esm.js

@@ -149,3 +149,3 @@ import { defineComponent, openBlock, createBlock, createVNode, pushScopeId, popScopeId, resolveComponent, createCommentVNode, Fragment, renderList, withScopeId } from 'vue';

self.rating = Math.round(relativeX / this.offsetWidth) * self.numberOfStars;
self.rating = Math.round(relativeX / this.offsetWidth * self.numberOfStars);
});

@@ -156,5 +156,5 @@ }

const _withId = /*#__PURE__*/withScopeId("data-v-5dc025a2");
const _withId = /*#__PURE__*/withScopeId("data-v-c588298c");
pushScopeId("data-v-5dc025a2");
pushScopeId("data-v-c588298c");

@@ -264,7 +264,7 @@ const _hoisted_1 = {

var css_248z = "\n.vue3-star-ratings__wrapper[data-v-5dc025a2] {\r\n display: block;\r\n margin: 25px auto;\r\n text-align: center;\r\n padding: 25px;\n}\n.vue3-star-ratings[data-v-5dc025a2] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.vue3-star-ratings button[data-v-5dc025a2] {\r\n border: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 50%;\r\n cursor: pointer;\n}\n.vue3-star-ratings button svg[data-v-5dc025a2] {\r\n fill: currentColor;\n}\n.stars[data-v-5dc025a2] {\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n margin: 0 auto;\n}\n.stars-outer[data-v-5dc025a2],\r\n.stars-inner[data-v-5dc025a2] {\r\n height: inherit;\n}\n.stars-inner[data-v-5dc025a2] {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 0;\r\n max-width: 100%;\r\n min-width: 0;\r\n white-space: nowrap;\r\n transition: 320ms cubic-bezier(0.075, 0.82, 0.165, 1);\r\n overflow: hidden;\n}\n.stars svg[data-v-5dc025a2] {\r\n display: inline-block;\r\n fill: currentColor;\r\n cursor: pointer;\n}\r\n";
var css_248z = "\n.vue3-star-ratings__wrapper[data-v-c588298c] {\r\n display: block;\r\n margin: 25px auto;\r\n text-align: center;\r\n padding: 25px;\n}\n.vue3-star-ratings[data-v-c588298c] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.vue3-star-ratings button[data-v-c588298c] {\r\n border: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 50%;\r\n cursor: pointer;\n}\n.vue3-star-ratings button svg[data-v-c588298c] {\r\n fill: currentColor;\n}\n.stars[data-v-c588298c] {\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n margin: 0 auto;\n}\n.stars-outer[data-v-c588298c],\r\n.stars-inner[data-v-c588298c] {\r\n height: inherit;\n}\n.stars-inner[data-v-c588298c] {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 0;\r\n max-width: 100%;\r\n min-width: 0;\r\n white-space: nowrap;\r\n transition: 320ms cubic-bezier(0.075, 0.82, 0.165, 1);\r\n overflow: hidden;\n}\n.stars svg[data-v-c588298c] {\r\n display: inline-block;\r\n fill: currentColor;\r\n cursor: pointer;\n}\r\n";
styleInject(css_248z);
script.render = render;
script.__scopeId = "data-v-5dc025a2";
script.__scopeId = "data-v-c588298c";

@@ -271,0 +271,0 @@ // Import vue component

@@ -1,1 +0,1 @@

var Vue3StarRatings=function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,a,o=[],i=!0,s=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);i=!0);}catch(t){s=!0,a=t}finally{try{i||null==n.return||n.return()}finally{if(s)throw a}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var i=t.defineComponent({name:"StarIcon"}),s={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512.002 512.002"},c=t.createVNode("path",{d:"M511.267 197.258a14.995 14.995 0 00-12.107-10.209l-158.723-23.065-70.985-143.827a14.998 14.998 0 00-26.901 0l-70.988 143.827-158.72 23.065a14.998 14.998 0 00-8.312 25.585l114.848 111.954-27.108 158.083a14.999 14.999 0 0021.763 15.812l141.967-74.638 141.961 74.637a15 15 0 0021.766-15.813l-27.117-158.081 114.861-111.955a14.994 14.994 0 003.795-15.375z"},null,-1);i.render=function(e,n,r,a,o,i){return t.openBlock(),t.createBlock("svg",s,[c])};var l=t.defineComponent({components:{StarIcon:i},name:"Vue3StarRatings",props:{starColor:{type:String,default:"#ff9800"},inactiveColor:{type:String,default:"#333"},starSize:{type:String,default:"32"},controlBg:{type:String,default:"#2e5090"},controlColor:{type:String,default:"#fff"},controlSize:{type:String,default:"24"},numberOfStars:{type:Number,default:5},showControl:{type:Boolean,default:!0},modelValue:{type:Number},disableClick:{type:Boolean,default:!1},step:{type:Number,default:.5}},data:function(){return{rating:this.modelValue||0}},watch:{roundedRating:function(){this.$emit("update:modelValue",this.roundedRating)}},computed:{roundedRating:function(){return this.rounded(this.rating,0)},percent:function(){return this.roundedRating/this.numberOfStars*100+"%"}},methods:{increaseRating:function(){this.rating<this.numberOfStars?this.rating+=this.step:this.rating>this.numberOfStars&&(this.rating=this.numberOfStars),this.rating>this.numberOfStars&&(this.rating=this.numberOfStars)},decreaseRating:function(){this.rating<=0||(this.rating-=this.step,this.rating<0&&(this.rating=0))},rounded:function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n},numberMinusFifteenPercent:function(t){var e=+t;return this.rounded(e-.15*e,0)},generateSameWidthAndHeight:function(t){return{width:t+"px",height:t+"px"}}},mounted:function(){var t=this.$refs.starsContainer,e=this;t.addEventListener("click",(function(t){var n=t.pageX-this.offsetLeft;null!=this.offsetParent&&(n-=this.offsetParent.offsetLeft),e.rating=Math.round(n/this.offsetWidth)*e.numberOfStars}))}}),u=t.withScopeId("data-v-5dc025a2");t.pushScopeId("data-v-5dc025a2");var d={class:"vue3-star-ratings__wrapper"},f={class:"vue3-star-ratings"},p=t.createVNode("path",{d:"M317.896 396.024l304.749-276.467c27.36-27.36 27.36-71.677 0-99.037s-71.677-27.36-99.036 0L169.11 342.161c-14.783 14.783-21.302 34.538-20.084 53.897-1.218 19.359 5.301 39.114 20.084 53.897l354.531 321.606c27.36 27.36 71.677 27.36 99.037 0s27.36-71.677 0-99.036L317.896 396.024z"},null,-1),h=t.createVNode("path",{d:"M622.955 342.127L268.424 20.521c-27.36-27.36-71.677-27.36-99.037 0s-27.36 71.676 0 99.037l304.749 276.468-304.749 276.466c-27.36 27.359-27.36 71.676 0 99.036s71.677 27.36 99.037 0l354.531-321.606c14.783-14.783 21.302-34.538 20.084-53.897 1.186-19.36-5.301-39.114-20.084-53.898z"},null,-1);t.popScopeId();var g=u((function(e,r,a,o,i,s){var c=t.resolveComponent("star-icon");return t.openBlock(),t.createBlock("div",d,[t.createVNode("div",f,[e.showControl?(t.openBlock(),t.createBlock("button",{key:0,onClick:r[1]||(r[1]=function(){return e.decreaseRating&&e.decreaseRating.apply(e,arguments)}),style:n(n({},e.generateSameWidthAndHeight(e.controlSize)),{},{backgroundColor:e.controlBg,color:e.controlColor})},[(t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 792.082 792.082",style:n({},e.generateSameWidthAndHeight(e.numberMinusFifteenPercent(e.controlSize)))},[p],4))],4)):t.createCommentVNode("",!0),t.createVNode("div",{class:"stars",ref:"starsContainer",style:{pointerEvents:e.disableClick?"none":"auto"}},[t.createVNode("div",{class:"stars-outer",style:{color:e.inactiveColor}},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(e.numberOfStars,(function(r){return t.openBlock(),t.createBlock(c,{key:r,style:n({},e.generateSameWidthAndHeight(e.starSize))},null,8,["style"])})),128))],4),t.createVNode("div",{class:"stars-inner",style:{width:e.percent,color:e.starColor}},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(Math.round(e.rating),(function(r){return t.openBlock(),t.createBlock(c,{key:r,style:n({},e.generateSameWidthAndHeight(e.starSize))},null,8,["style"])})),128))],4)],4),e.showControl?(t.openBlock(),t.createBlock("button",{key:1,onClick:r[2]||(r[2]=function(){return e.increaseRating&&e.increaseRating.apply(e,arguments)}),style:n(n({},e.generateSameWidthAndHeight(e.starSize)),{},{backgroundColor:e.controlBg,color:e.controlColor})},[(t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 792.082 792.082",style:n({},e.generateSameWidthAndHeight(e.numberMinusFifteenPercent(e.controlSize)))},[h],4))],4)):t.createCommentVNode("",!0)])])}));!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}("\n.vue3-star-ratings__wrapper[data-v-5dc025a2] {\r\n display: block;\r\n margin: 25px auto;\r\n text-align: center;\r\n padding: 25px;\n}\n.vue3-star-ratings[data-v-5dc025a2] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.vue3-star-ratings button[data-v-5dc025a2] {\r\n border: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 50%;\r\n cursor: pointer;\n}\n.vue3-star-ratings button svg[data-v-5dc025a2] {\r\n fill: currentColor;\n}\n.stars[data-v-5dc025a2] {\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n margin: 0 auto;\n}\n.stars-outer[data-v-5dc025a2],\r\n.stars-inner[data-v-5dc025a2] {\r\n height: inherit;\n}\n.stars-inner[data-v-5dc025a2] {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 0;\r\n max-width: 100%;\r\n min-width: 0;\r\n white-space: nowrap;\r\n transition: 320ms cubic-bezier(0.075, 0.82, 0.165, 1);\r\n overflow: hidden;\n}\n.stars svg[data-v-5dc025a2] {\r\n display: inline-block;\r\n fill: currentColor;\r\n cursor: pointer;\n}\r\n"),l.render=g,l.__scopeId="data-v-5dc025a2";var m=function(){var t=l;return t.install=function(e){e.component("Vue3StarRatings",t)},t}(),v=Object.freeze({__proto__:null,default:m});return Object.entries(v).forEach((function(t){var e=a(t,2),n=e[0],r=e[1];"default"!==n&&(m[n]=r)})),m}(Vue);
var Vue3StarRatings=function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(t);!(i=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);i=!0);}catch(t){c=!0,o=t}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var i=t.defineComponent({name:"StarIcon"}),c={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512.002 512.002"},s=t.createVNode("path",{d:"M511.267 197.258a14.995 14.995 0 00-12.107-10.209l-158.723-23.065-70.985-143.827a14.998 14.998 0 00-26.901 0l-70.988 143.827-158.72 23.065a14.998 14.998 0 00-8.312 25.585l114.848 111.954-27.108 158.083a14.999 14.999 0 0021.763 15.812l141.967-74.638 141.961 74.637a15 15 0 0021.766-15.813l-27.117-158.081 114.861-111.955a14.994 14.994 0 003.795-15.375z"},null,-1);i.render=function(e,n,r,o,a,i){return t.openBlock(),t.createBlock("svg",c,[s])};var l=t.defineComponent({components:{StarIcon:i},name:"Vue3StarRatings",props:{starColor:{type:String,default:"#ff9800"},inactiveColor:{type:String,default:"#333"},starSize:{type:String,default:"32"},controlBg:{type:String,default:"#2e5090"},controlColor:{type:String,default:"#fff"},controlSize:{type:String,default:"24"},numberOfStars:{type:Number,default:5},showControl:{type:Boolean,default:!0},modelValue:{type:Number},disableClick:{type:Boolean,default:!1},step:{type:Number,default:.5}},data:function(){return{rating:this.modelValue||0}},watch:{roundedRating:function(){this.$emit("update:modelValue",this.roundedRating)}},computed:{roundedRating:function(){return this.rounded(this.rating,0)},percent:function(){return this.roundedRating/this.numberOfStars*100+"%"}},methods:{increaseRating:function(){this.rating<this.numberOfStars?this.rating+=this.step:this.rating>this.numberOfStars&&(this.rating=this.numberOfStars),this.rating>this.numberOfStars&&(this.rating=this.numberOfStars)},decreaseRating:function(){this.rating<=0||(this.rating-=this.step,this.rating<0&&(this.rating=0))},rounded:function(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n},numberMinusFifteenPercent:function(t){var e=+t;return this.rounded(e-.15*e,0)},generateSameWidthAndHeight:function(t){return{width:t+"px",height:t+"px"}}},mounted:function(){var t=this.$refs.starsContainer,e=this;t.addEventListener("click",(function(t){var n=t.pageX-this.offsetLeft;null!=this.offsetParent&&(n-=this.offsetParent.offsetLeft),e.rating=Math.round(n/this.offsetWidth*e.numberOfStars)}))}}),u=t.withScopeId("data-v-c588298c");t.pushScopeId("data-v-c588298c");var d={class:"vue3-star-ratings__wrapper"},f={class:"vue3-star-ratings"},p=t.createVNode("path",{d:"M317.896 396.024l304.749-276.467c27.36-27.36 27.36-71.677 0-99.037s-71.677-27.36-99.036 0L169.11 342.161c-14.783 14.783-21.302 34.538-20.084 53.897-1.218 19.359 5.301 39.114 20.084 53.897l354.531 321.606c27.36 27.36 71.677 27.36 99.037 0s27.36-71.677 0-99.036L317.896 396.024z"},null,-1),h=t.createVNode("path",{d:"M622.955 342.127L268.424 20.521c-27.36-27.36-71.677-27.36-99.037 0s-27.36 71.676 0 99.037l304.749 276.468-304.749 276.466c-27.36 27.359-27.36 71.676 0 99.036s71.677 27.36 99.037 0l354.531-321.606c14.783-14.783 21.302-34.538 20.084-53.897 1.186-19.36-5.301-39.114-20.084-53.898z"},null,-1);t.popScopeId();var g=u((function(e,r,o,a,i,c){var s=t.resolveComponent("star-icon");return t.openBlock(),t.createBlock("div",d,[t.createVNode("div",f,[e.showControl?(t.openBlock(),t.createBlock("button",{key:0,onClick:r[1]||(r[1]=function(){return e.decreaseRating&&e.decreaseRating.apply(e,arguments)}),style:n(n({},e.generateSameWidthAndHeight(e.controlSize)),{},{backgroundColor:e.controlBg,color:e.controlColor})},[(t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 792.082 792.082",style:n({},e.generateSameWidthAndHeight(e.numberMinusFifteenPercent(e.controlSize)))},[p],4))],4)):t.createCommentVNode("",!0),t.createVNode("div",{class:"stars",ref:"starsContainer",style:{pointerEvents:e.disableClick?"none":"auto"}},[t.createVNode("div",{class:"stars-outer",style:{color:e.inactiveColor}},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(e.numberOfStars,(function(r){return t.openBlock(),t.createBlock(s,{key:r,style:n({},e.generateSameWidthAndHeight(e.starSize))},null,8,["style"])})),128))],4),t.createVNode("div",{class:"stars-inner",style:{width:e.percent,color:e.starColor}},[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(Math.round(e.rating),(function(r){return t.openBlock(),t.createBlock(s,{key:r,style:n({},e.generateSameWidthAndHeight(e.starSize))},null,8,["style"])})),128))],4)],4),e.showControl?(t.openBlock(),t.createBlock("button",{key:1,onClick:r[2]||(r[2]=function(){return e.increaseRating&&e.increaseRating.apply(e,arguments)}),style:n(n({},e.generateSameWidthAndHeight(e.starSize)),{},{backgroundColor:e.controlBg,color:e.controlColor})},[(t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 792.082 792.082",style:n({},e.generateSameWidthAndHeight(e.numberMinusFifteenPercent(e.controlSize)))},[h],4))],4)):t.createCommentVNode("",!0)])])}));!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}("\n.vue3-star-ratings__wrapper[data-v-c588298c] {\r\n display: block;\r\n margin: 25px auto;\r\n text-align: center;\r\n padding: 25px;\n}\n.vue3-star-ratings[data-v-c588298c] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.vue3-star-ratings button[data-v-c588298c] {\r\n border: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 50%;\r\n cursor: pointer;\n}\n.vue3-star-ratings button svg[data-v-c588298c] {\r\n fill: currentColor;\n}\n.stars[data-v-c588298c] {\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n margin: 0 auto;\n}\n.stars-outer[data-v-c588298c],\r\n.stars-inner[data-v-c588298c] {\r\n height: inherit;\n}\n.stars-inner[data-v-c588298c] {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 0;\r\n max-width: 100%;\r\n min-width: 0;\r\n white-space: nowrap;\r\n transition: 320ms cubic-bezier(0.075, 0.82, 0.165, 1);\r\n overflow: hidden;\n}\n.stars svg[data-v-c588298c] {\r\n display: inline-block;\r\n fill: currentColor;\r\n cursor: pointer;\n}\r\n"),l.render=g,l.__scopeId="data-v-c588298c";var m=function(){var t=l;return t.install=function(e){e.component("Vue3StarRatings",t)},t}(),v=Object.freeze({__proto__:null,default:m});return Object.entries(v).forEach((function(t){var e=o(t,2),n=e[0],r=e[1];"default"!==n&&(m[n]=r)})),m}(Vue);

@@ -240,8 +240,8 @@ 'use strict';var vue=require('vue');function ownKeys(object, enumerableOnly) {

self.rating = Math.round(relativeX / this.offsetWidth) * self.numberOfStars;
self.rating = Math.round(relativeX / this.offsetWidth * self.numberOfStars);
});
}
});var _withId = /*#__PURE__*/vue.withScopeId("data-v-5dc025a2");
});var _withId = /*#__PURE__*/vue.withScopeId("data-v-c588298c");
vue.pushScopeId("data-v-5dc025a2");
vue.pushScopeId("data-v-c588298c");

@@ -347,5 +347,5 @@ var _hoisted_1 = {

}
}var css_248z = "\n.vue3-star-ratings__wrapper[data-v-5dc025a2] {\r\n display: block;\r\n margin: 25px auto;\r\n text-align: center;\r\n padding: 25px;\n}\n.vue3-star-ratings[data-v-5dc025a2] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.vue3-star-ratings button[data-v-5dc025a2] {\r\n border: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 50%;\r\n cursor: pointer;\n}\n.vue3-star-ratings button svg[data-v-5dc025a2] {\r\n fill: currentColor;\n}\n.stars[data-v-5dc025a2] {\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n margin: 0 auto;\n}\n.stars-outer[data-v-5dc025a2],\r\n.stars-inner[data-v-5dc025a2] {\r\n height: inherit;\n}\n.stars-inner[data-v-5dc025a2] {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 0;\r\n max-width: 100%;\r\n min-width: 0;\r\n white-space: nowrap;\r\n transition: 320ms cubic-bezier(0.075, 0.82, 0.165, 1);\r\n overflow: hidden;\n}\n.stars svg[data-v-5dc025a2] {\r\n display: inline-block;\r\n fill: currentColor;\r\n cursor: pointer;\n}\r\n";
}var css_248z = "\n.vue3-star-ratings__wrapper[data-v-c588298c] {\r\n display: block;\r\n margin: 25px auto;\r\n text-align: center;\r\n padding: 25px;\n}\n.vue3-star-ratings[data-v-c588298c] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\n}\n.vue3-star-ratings button[data-v-c588298c] {\r\n border: 0;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n border-radius: 50%;\r\n cursor: pointer;\n}\n.vue3-star-ratings button svg[data-v-c588298c] {\r\n fill: currentColor;\n}\n.stars[data-v-c588298c] {\r\n display: inline-block;\r\n position: relative;\r\n overflow: hidden;\r\n margin: 0 auto;\n}\n.stars-outer[data-v-c588298c],\r\n.stars-inner[data-v-c588298c] {\r\n height: inherit;\n}\n.stars-inner[data-v-c588298c] {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 0;\r\n max-width: 100%;\r\n min-width: 0;\r\n white-space: nowrap;\r\n transition: 320ms cubic-bezier(0.075, 0.82, 0.165, 1);\r\n overflow: hidden;\n}\n.stars svg[data-v-c588298c] {\r\n display: inline-block;\r\n fill: currentColor;\r\n cursor: pointer;\n}\r\n";
styleInject(css_248z);script.render = render;
script.__scopeId = "data-v-5dc025a2";// Import vue component
script.__scopeId = "data-v-c588298c";// Import vue component

@@ -352,0 +352,0 @@ // Default export is installable instance of component.

{
"name": "vue3-star-ratings-ksh",
"version": "2.0.4",
"version": "2.0.5",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "A simple, customizable vue3 component for star ratings",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc