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

essy-react-controls

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

essy-react-controls - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

2

index.js

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

module.exports=function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=6)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("essy-util-ui")},function(e,t){e.exports=require("essy-util-misc")},function(e,t){e.exports=require("essy-react-icons")},function(e,t){e.exports=require("essy-react-hooks")},function(e,t,a){"use strict";a.r(t),a.d(t,"Button",(function(){return b})),a.d(t,"ButtonSplit",(function(){return f})),a.d(t,"Checkbox",(function(){return h})),a.d(t,"Input",(function(){return v})),a.d(t,"SpikeLoader",(function(){return d})),a.d(t,"SpikeLoaderMask",(function(){return g})),a.d(t,"Toggle",(function(){return y}));var n=a(1),r=a.n(n),o=a(0),l=a.n(o),i=a(2),c=a(3),s=a(4);const u={small:8,medium:10,large:12};function d({small:e,medium:t,text:a,white:n}){const o=u[e?"small":t?"medium":"large"];return r.a.createElement("div",{className:Object(i.classNames)("erc-spike-loader",e&&"small",t&&"medium",n&&"white")},a.length?r.a.createElement("div",{className:"erc-spike-loader-text"},a):null,r.a.createElement("div",{className:"erc-spike-loader-icon"},Object(c.getArray)(o).map((e,t)=>r.a.createElement("div",{key:t}))))}function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}function b({active:e,alt:t,arrow:a,block:n,border:o,btnRef:l,cancel:c,children:u,disabled:b,icon:p,iconSize:f,inverse:h,light:v,loading:g,minWidth:y,onClick:k,outline:x,secondary:E,small:N,text:w,warning:C}){const O={className:Object(i.classNames)("erc-btn",e&&"active",t&&"alt",a&&"arrow",n&&"block",o&&"border",c&&"cancel",h&&"inverse",v&&"light",void 0!==g&&"loader",x&&"outline",!t&&!E&&!C&&"primary",E&&"secondary",N&&"sm",y&&"min-width",C&&"warning"),disabled:b||g,onClick:k,...l&&{ref:l}};return r.a.createElement("button",O,function(){const e=[];if(g)return r.a.createElement(d,m({key:"0"},N?{small:N}:{medium:!0}));if(p){const t=f||(N?[12,12]:[16,16]);e.push(r.a.createElement(s.Icon,{key:"1",height:t[1],icon:p,width:t[0]}))}if(w)e.push(r.a.createElement("span",{key:"2",className:"text"},w));else if(u)return u;return e}())}d.defaultProps={medium:!1,small:!1,text:"",white:!1},d.propTypes={medium:l.a.bool,small:l.a.bool,text:l.a.string,white:l.a.bool},b.defaultProps={active:!1,alt:!1,arrow:!1,block:!1,border:!1,cancel:!1,disabled:!1,icon:!1,inverse:!1,light:!1,minWidth:!1,onClick:c.fnIdentity,outline:!1,secondary:!1,small:!1,warning:!1},b.propTypes={active:l.a.bool,alt:l.a.bool,arrow:l.a.bool,block:l.a.bool,border:l.a.bool,btnRef:l.a.object,cancel:l.a.bool,disabled:l.a.bool,icon:l.a.oneOfType([l.a.object,l.a.bool]),iconSize:l.a.array,inverse:l.a.bool,light:l.a.bool,loading:l.a.bool,minWidth:l.a.bool,onClick:l.a.func,outline:l.a.bool,secondary:l.a.bool,small:l.a.bool,text:l.a.string,warning:l.a.bool};var p=a(5);function f({disabled:e,disabledBtn:t,items:a,onClick:o,onClickItem:l,small:c,text:s}){const[u,d]=Object(n.useState)(!1),m=Object(n.useCallback)(()=>d(!1),[]);return Object(p.useEventListener)(document,"click",m,u),r.a.createElement("div",{className:Object(i.classNames)("erc-btn-split",c&&"sm")},r.a.createElement("div",{className:"btns"},r.a.createElement(b,{disabled:e||t,onClick:o,small:c,text:s}),r.a.createElement(b,{arrow:!0,onClick:()=>d(!u),small:c})),u&&r.a.createElement("div",{className:"erc-btn-split-menu"},a.map((e,t)=>r.a.createElement("div",{key:t,className:"erc-btn-split-item",onClick:()=>function(e,t){d(!1),l(e,t)}(e,t)},e))))}function h({checked:e,children:t,className:a,indeterminate:n,onChange:o}){return r.a.createElement("label",{className:Object(i.classNames)("erc-checkbox",a)},r.a.createElement("input",{type:"checkbox",className:"erc-checkbox-default",onChange:e=>o(e.target.checked),ref:e=>e&&(e.indeterminate=!!n)}),r.a.createElement("span",{className:"erc-checkbox-custom"}),r.a.createElement("span",{className:"erc-checkbox-content"},t))}function v({autoComplete:e,disabled:t,invalid:a,label:o,note:l,onBlur:c,onChange:u,passwordShow:d,textarea:m,type:b,validator:p,value:f}){const[h,v]=Object(n.useState)(!1),[g,y]=Object(n.useState)(!1),k=o.replace(/\s/g,""),x={disabled:t,name:k,onBlur:()=>{v(!1),c()},onChange:e=>u(e.target.value),onFocus:()=>v(!0),type:g?"text":b,value:f,...!e&&{autoComplete:"off"}};return r.a.createElement("div",{className:Object(i.classNames)("erc-input",t&&"disabled",h&&"focused",a&&!h&&"invalid",m&&"textarea",f.length&&"value")},r.a.createElement("label",{htmlFor:k},o),m?r.a.createElement("textarea",x):r.a.createElement("input",x),d&&f.length?r.a.createElement("div",{className:"icon-wrap",onClick:()=>y(!g)},r.a.createElement(s.Icon,{className:g?"active":"inactive",height:20,icon:s.icons.EyeIcon,width:20})):null,!h&&r.a.createElement("div",{className:"invalid",dangerouslySetInnerHTML:{__html:a||"&nbsp;"}}),l.length?r.a.createElement("div",{className:"note"},l):null)}function g(e){return r.a.createElement("div",{className:"erc-spike-loader-mask"},r.a.createElement(d,e))}function y({disabled:e,error:t,on:a,onClick:n,text:o,white:l}){return r.a.createElement("div",{className:Object(i.classNames)("erc-toggle",a&&"on",t&&"error",l&&"white",e&&"disabled"),onClick:e?()=>{}:n},r.a.createElement("div",{className:"track"},r.a.createElement("div",{className:"knob"})),r.a.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:o}}))}f.defaultProps={disabled:!1,disabledBtn:!1,small:!1},f.propTypes={disabled:l.a.bool,disabledBtn:l.a.bool,items:l.a.array.isRequired,onClick:l.a.func.isRequired,onClickItem:l.a.func.isRequired,small:l.a.bool,text:l.a.string.isRequired},h.propTypes={checked:l.a.bool.isRequired,className:l.a.string,indeterminate:l.a.bool,onChange:l.a.func.isRequired},v.defaultProps={autoComplete:!0,disabled:!1,invalid:!1,note:"",onBlur:c.fnNoOp,passwordShow:!1,textarea:!1,type:"text",validator:c.fnNoOp,value:""},v.propTypes={autoComplete:l.a.bool,disabled:l.a.bool,invalid:l.a.oneOfType([l.a.bool,l.a.string]),label:l.a.string.isRequired,note:l.a.string,onBlur:l.a.func,onChange:l.a.func.isRequired,passwordShow:l.a.bool,textarea:l.a.bool,type:l.a.string,validator:l.a.func,value:l.a.string.isRequired},y.defaultProps={disabled:!1,error:!1,on:!1,onClick:c.fnIdentity,text:"",white:!1},y.propTypes={disabled:l.a.bool,error:l.a.bool,on:l.a.bool,onClick:l.a.func,text:l.a.string,white:l.a.bool}}]);
module.exports=function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=6)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("essy-util-ui")},function(e,t){e.exports=require("essy-util-misc")},function(e,t){e.exports=require("essy-react-icons")},function(e,t){e.exports=require("essy-react-hooks")},function(e,t,a){"use strict";a.r(t),a.d(t,"Button",(function(){return b})),a.d(t,"ButtonSplit",(function(){return f})),a.d(t,"Checkbox",(function(){return h})),a.d(t,"Input",(function(){return v})),a.d(t,"SpikeLoader",(function(){return d})),a.d(t,"SpikeLoaderMask",(function(){return g})),a.d(t,"Toggle",(function(){return y}));var n=a(1),r=a.n(n),o=a(0),l=a.n(o),i=a(2),c=a(3),s=a(4);const u={small:8,medium:10,large:12};function d({small:e,medium:t,text:a,white:n}){const o=u[e?"small":t?"medium":"large"];return r.a.createElement("div",{className:Object(i.classNames)("erc-spike-loader",e&&"small",t&&"medium",n&&"white")},a.length?r.a.createElement("div",{className:"erc-spike-loader-text"},a):null,r.a.createElement("div",{className:"erc-spike-loader-icon"},Object(c.getArray)(o).map((e,t)=>r.a.createElement("div",{key:t}))))}function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}function b({active:e,alt:t,arrow:a,block:n,border:o,btnRef:l,cancel:c,children:u,disabled:b,icon:p,iconSize:f,inverse:h,light:v,loading:g,minWidth:y,onClick:k,outline:x,secondary:E,small:N,text:w,warning:C}){const O={className:Object(i.classNames)("erc-btn",e&&"active",t&&"alt",a&&"arrow",n&&"block",o&&"border",c&&"cancel",h&&"inverse",v&&"light",void 0!==g&&"loader",x&&"outline",!t&&!E&&!C&&"primary",E&&"secondary",N&&"sm",y&&"min-width",C&&"warning"),disabled:b||g,onClick:k,...l&&{ref:l}};return r.a.createElement("button",O,function(){const e=[];if(g)return r.a.createElement(d,m({key:"0"},N?{small:N}:{medium:!0}));if(p){const t=f||(N?[12,12]:[16,16]);e.push(r.a.createElement(s.Icon,{key:"1",height:t[1],icon:p,width:t[0]}))}if(w)e.push(r.a.createElement("span",{key:"2",className:"text"},w));else if(u)return u;return e}())}d.defaultProps={medium:!1,small:!1,text:"",white:!1},d.propTypes={medium:l.a.bool,small:l.a.bool,text:l.a.string,white:l.a.bool},b.defaultProps={active:!1,alt:!1,arrow:!1,block:!1,border:!1,cancel:!1,disabled:!1,icon:!1,inverse:!1,light:!1,minWidth:!1,onClick:c.fnIdentity,outline:!1,secondary:!1,small:!1,warning:!1},b.propTypes={active:l.a.bool,alt:l.a.bool,arrow:l.a.bool,block:l.a.bool,border:l.a.bool,btnRef:l.a.object,cancel:l.a.bool,disabled:l.a.bool,icon:l.a.oneOfType([l.a.object,l.a.bool]),iconSize:l.a.array,inverse:l.a.bool,light:l.a.bool,loading:l.a.bool,minWidth:l.a.bool,onClick:l.a.func,outline:l.a.bool,secondary:l.a.bool,small:l.a.bool,text:l.a.string,warning:l.a.bool};var p=a(5);function f({disabled:e,disabledBtn:t,items:a,onClick:o,onClickItem:l,small:c,text:s}){const[u,d]=Object(n.useState)(!1),m=Object(n.useCallback)(()=>d(!1),[]);return Object(p.useEventListener)(document,"click",m,u),r.a.createElement("div",{className:Object(i.classNames)("erc-btn-split",c&&"sm")},r.a.createElement("div",{className:"btns"},r.a.createElement(b,{disabled:e||t,onClick:o,small:c,text:s}),r.a.createElement(b,{arrow:!0,onClick:()=>d(!u),small:c})),u&&r.a.createElement("div",{className:"erc-btn-split-menu"},a.map((e,t)=>r.a.createElement("div",{key:t,className:"erc-btn-split-item",onClick:()=>function(e,t){d(!1),l(e,t)}(e,t)},e))))}function h({checked:e,children:t,className:a,indeterminate:n,onChange:o}){return r.a.createElement("label",{className:Object(i.classNames)("erc-checkbox",a)},r.a.createElement("input",{className:"erc-checkbox-default",checked:e,onChange:e=>o(e.target.checked),ref:e=>e&&(e.indeterminate=!!n),type:"checkbox"}),r.a.createElement("span",{className:"erc-checkbox-custom"}),r.a.createElement("span",{className:"erc-checkbox-content"},t))}function v({autoComplete:e,disabled:t,invalid:a,label:o,note:l,onBlur:c,onChange:u,passwordShow:d,textarea:m,type:b,validator:p,value:f}){const[h,v]=Object(n.useState)(!1),[g,y]=Object(n.useState)(!1),k=o.replace(/\s/g,""),x={disabled:t,name:k,onBlur:()=>{v(!1),c()},onChange:e=>u(e.target.value),onFocus:()=>v(!0),type:g?"text":b,value:f,...!e&&{autoComplete:"off"}};return r.a.createElement("div",{className:Object(i.classNames)("erc-input",t&&"disabled",h&&"focused",a&&!h&&"invalid",m&&"textarea",f.length&&"value")},r.a.createElement("label",{htmlFor:k},o),m?r.a.createElement("textarea",x):r.a.createElement("input",x),d&&f.length?r.a.createElement("div",{className:"icon-wrap",onClick:()=>y(!g)},r.a.createElement(s.Icon,{className:g?"active":"inactive",height:20,icon:s.icons.EyeIcon,width:20})):null,!h&&r.a.createElement("div",{className:"invalid",dangerouslySetInnerHTML:{__html:a||"&nbsp;"}}),l.length?r.a.createElement("div",{className:"note"},l):null)}function g(e){return r.a.createElement("div",{className:"erc-spike-loader-mask"},r.a.createElement(d,e))}function y({disabled:e,error:t,on:a,onClick:n,text:o,white:l}){return r.a.createElement("div",{className:Object(i.classNames)("erc-toggle",a&&"on",t&&"error",l&&"white",e&&"disabled"),onClick:e?()=>{}:n},r.a.createElement("div",{className:"track"},r.a.createElement("div",{className:"knob"})),r.a.createElement("div",{className:"text",dangerouslySetInnerHTML:{__html:o}}))}f.defaultProps={disabled:!1,disabledBtn:!1,small:!1},f.propTypes={disabled:l.a.bool,disabledBtn:l.a.bool,items:l.a.array.isRequired,onClick:l.a.func.isRequired,onClickItem:l.a.func.isRequired,small:l.a.bool,text:l.a.string.isRequired},h.propTypes={checked:l.a.bool.isRequired,className:l.a.string,indeterminate:l.a.bool,onChange:l.a.func.isRequired},v.defaultProps={autoComplete:!0,disabled:!1,invalid:!1,note:"",onBlur:c.fnNoOp,passwordShow:!1,textarea:!1,type:"text",validator:c.fnNoOp,value:""},v.propTypes={autoComplete:l.a.bool,disabled:l.a.bool,invalid:l.a.oneOfType([l.a.bool,l.a.string]),label:l.a.string.isRequired,note:l.a.string,onBlur:l.a.func,onChange:l.a.func.isRequired,passwordShow:l.a.bool,textarea:l.a.bool,type:l.a.string,validator:l.a.func,value:l.a.string.isRequired},y.defaultProps={disabled:!1,error:!1,on:!1,onClick:c.fnIdentity,text:"",white:!1},y.propTypes={disabled:l.a.bool,error:l.a.bool,on:l.a.bool,onClick:l.a.func,text:l.a.string,white:l.a.bool}}]);
{
"name": "essy-react-controls",
"version": "1.0.16",
"version": "1.0.17",
"description": "React control components.",

@@ -5,0 +5,0 @@ "main": "index.js",

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