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

@elderbraum/rvk-elements

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elderbraum/rvk-elements - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

dist/main.js

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

!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@fortawesome/free-solid-svg-icons")},function(e,t){e.exports=require("@fortawesome/react-fontawesome")},function(e,t,r){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},a=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function s(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},n=[],o=0;o<e.length;o++){var a=e[o],c=t.base?a[0]+t.base:a[0],u=r[c]||0,l="".concat(c," ").concat(u);r[c]=u+1;var f=s(l),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==f?(i[f].references++,i[f].updater(p)):i.push({identifier:l,updater:h(p,t),references:1}),n.push(l)}return n}function u(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var l,f=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function p(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function d(e,t,r){var n=r.css,o=r.media,a=r.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),a&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,m=0;function h(e,t){var r,n,o;if(t.singleton){var a=m++;r=v||(v=u(t)),n=p.bind(null,r,a,!1),o=p.bind(null,r,a,!0)}else r=u(t),n=d.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=s(r[n]);i[o].references--}for(var a=c(e,t),u=0;u<r.length;u++){var l=s(r[u]);0===i[l].references&&(i[l].updater(),i.splice(l,1))}r=a}}}},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var o=(i=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(a).concat([o]).join("\n")}var i,s,c;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&o[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},function(e,t){e.exports=require("@fortawesome/free-regular-svg-icons")},function(e,t,r){var n=r(4),o=r(8);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(5)(!1)).push([e.i,".rvk--reviews--score__stars{color:var(--rvk-star-color)}.rvk--reviews--score__stars h2{margin:0}\n",""]),e.exports=t},function(e,t,r){var n=r(4),o=r(10);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(5)(!1)).push([e.i,".rvk--reviews--input--score__star{color:var(--rvk-star-input-color, #f93);cursor:pointer}.rvk--reviews--input--score__star:hover ~ .rvk--reviews--input--score__star,.rvk--reviews--input--score__star.active ~ .rvk--reviews--input--score__star{color:var(--rvk-star-input-color-disabled, black)}\n",""]),e.exports=t},function(e,t,r){"use strict";r.r(t),r.d(t,"Stars",(function(){return l})),r.d(t,"Input",(function(){return p}));var n=r(0),o=r.n(n),a=r(1),i=r.n(a),s=r(3),c=r(2),u=r(6);r(7);class l extends o.a.Component{constructor(){super(),this.computedScore=this.computedScore.bind(this)}computedScore(){const{score:e}=this.props;let t=e/2;const r=new Array(5);return r.fill(u.faStar),t>=5?(r.fill(c.faStar),r):(t<1||(e%2==0?r.fill(c.faStar,0,t):(r.fill(c.faStar,0,t),r.fill(c.faStarHalfAlt,t,t+1))),r)}render(){const{color:e,showScore:t}=this.props;return e&&document.documentElement.style.setProperty("--rvk-star-color",e),o.a.createElement("span",{className:"rvk--reviews--score__stars"},this.computedScore().map((e,t)=>o.a.createElement(s.FontAwesomeIcon,{icon:e,key:t})),t&&o.a.createElement("h2",{className:"rvk--reviews--score__number"},this.props.score))}}l.propTypes={score:i.a.number.isRequired,color:i.a.string,showScore:i.a.bool};r(9);class f extends o.a.Component{constructor(e){var t,r,n;super(e),t=this,r="starsRef",n=o.a.createRef(),r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.computedScore=this.computedScore.bind(this),this.changeScore=this.changeScore.bind(this),this.state={score:10}}changeScore(e){this.setState({score:2*e})}computedScore(){const e=new Array(5);return e.fill(c.faStar),e}render(){const{color:e,showScore:t,input:r}=this.props,{score:n}=this.state;return e&&document.documentElement.style.setProperty("--rvk-star-input-color",e),o.a.createElement(o.a.StrictMode,null,o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"hidden",id:r.id,name:r.name?r.name:r.id,value:n}),o.a.createElement("span",{className:"rvk--reviews--input--score__stars"},this.computedScore().map((e,t)=>o.a.createElement(s.FontAwesomeIcon,{className:["rvk--reviews--input--score__star",Number(n)===2*(t+1)?"active":""].join(" "),icon:e,key:t,onClick:()=>this.changeScore(t+1)})),t&&o.a.createElement("h2",{className:"rvk--reviews--score__number"},n))))}}f.propTypes={input:i.a.shape({id:i.a.string.isRequired,name:i.a.string}).isRequired,color:i.a.string,showScore:i.a.bool};var p={Stars:f}}]));
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=11)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("@fortawesome/free-solid-svg-icons")},function(e,t){e.exports=require("@fortawesome/react-fontawesome")},function(e,t,r){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},a=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function s(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},n=[],o=0;o<e.length;o++){var a=e[o],c=t.base?a[0]+t.base:a[0],u=r[c]||0,l="".concat(c," ").concat(u);r[c]=u+1;var f=s(l),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==f?(i[f].references++,i[f].updater(p)):i.push({identifier:l,updater:h(p,t),references:1}),n.push(l)}return n}function u(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var l,f=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function p(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=f(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function d(e,t,r){var n=r.css,o=r.media,a=r.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),a&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var v=null,m=0;function h(e,t){var r,n,o;if(t.singleton){var a=m++;r=v||(v=u(t)),n=p.bind(null,r,a,!1),o=p.bind(null,r,a,!0)}else r=u(t),n=d.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=s(r[n]);i[o].references--}for(var a=c(e,t),u=0;u<r.length;u++){var l=s(r[u]);0===i[l].references&&(i[l].updater(),i.splice(l,1))}r=a}}}},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var o=(i=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(a).concat([o]).join("\n")}var i,s,c;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&o[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},function(e,t){e.exports=require("@fortawesome/free-regular-svg-icons")},function(e,t,r){var n=r(4),o=r(8);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(5)(!1)).push([e.i,".rvk--reviews--score__stars{color:var(--rvk-star-color)}.rvk--reviews--score__stars h2{margin:0}\n",""]),e.exports=t},function(e,t,r){var n=r(4),o=r(10);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var a={insert:"head",singleton:!1};n(o,a);e.exports=o.locals||{}},function(e,t,r){(t=r(5)(!1)).push([e.i,".rvk--reviews--input--score__star{color:var(--rvk-star-input-color, #f93);cursor:pointer}.rvk--reviews--input--score__star:hover ~ .rvk--reviews--input--score__star,.rvk--reviews--input--score__star.active ~ .rvk--reviews--input--score__star{color:var(--rvk-star-input-color-disabled, black)}\n",""]),e.exports=t},function(e,t,r){"use strict";r.r(t),r.d(t,"Stars",(function(){return l})),r.d(t,"Input",(function(){return p}));var n=r(0),o=r.n(n),a=r(1),i=r.n(a),s=r(3),c=r(2),u=r(6);r(7);class l extends o.a.Component{constructor(){super(),this.computedScore=this.computedScore.bind(this)}computedScore(){const{score:e}=this.props;let t=e/2;const r=new Array(5);return r.fill(u.faStar),t>=5?(r.fill(c.faStar),r):(t<1||(e%2==0?r.fill(c.faStar,0,t):(r.fill(c.faStar,0,t),r.fill(c.faStarHalfAlt,t,t+1))),r)}render(){const{color:e,showScore:t}=this.props;return e&&document.documentElement.style.setProperty("--rvk-star-color",e),o.a.createElement("span",{className:"rvk--reviews--score__stars"},this.computedScore().map((e,t)=>o.a.createElement(s.FontAwesomeIcon,{icon:e,key:t})),t&&o.a.createElement("h2",{className:"rvk--reviews--score__number"},this.props.score))}}l.propTypes={score:i.a.number.isRequired,color:i.a.string,showScore:i.a.bool};r(9);class f extends o.a.Component{constructor(e){var t,r,n;super(e),t=this,r="starsRef",n=o.a.createRef(),r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.computedScore=this.computedScore.bind(this),this.changeScore=this.changeScore.bind(this),this.state={score:10}}changeScore(e){this.setState({score:2*e})}computedScore(){const e=new Array(5);return e.fill(c.faStar),e}render(){const{color:e,showScore:t,input:r}=this.props,{score:n}=this.state;return e&&document.documentElement.style.setProperty("--rvk-star-input-color",e),o.a.createElement(o.a.StrictMode,null,o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"hidden",id:r.id,name:r.name?r.name:r.id,value:n}),o.a.createElement("span",{className:"rvk--reviews--input--score__stars"},this.computedScore().map((e,t)=>o.a.createElement(s.FontAwesomeIcon,{className:["rvk--reviews--input--score__star",Number(n)===2*(t+1)?"active":""].join(" "),icon:e,key:t,onClick:()=>this.changeScore(t+1)})),t&&o.a.createElement("h2",{className:"rvk--reviews--score__number"},n))))}}f.propTypes={input:i.a.shape({id:i.a.string.isRequired,name:i.a.string}).isRequired,color:i.a.string,showScore:i.a.bool};var p={Stars:f}}]);
{
"name": "@elderbraum/rvk-elements",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/main.js",

@@ -5,0 +5,0 @@ "publishConfig": {

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