esb-component-library
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -1,1 +0,1 @@ | ||
var r=Object.defineProperty,e=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,t=(e,o,l)=>o in e?r(e,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[o]=l;import a from"react";import n from"prop-types";const i=r=>{var n=r,{primary:i,disabled:b,backgroundColor:p,size:d,label:s}=n,c=((r,t)=>{var a={};for(var n in r)o.call(r,n)&&t.indexOf(n)<0&&(a[n]=r[n]);if(null!=r&&e)for(var n of e(r))t.indexOf(n)<0&&l.call(r,n)&&(a[n]=r[n]);return a})(n,["primary","disabled","backgroundColor","size","label"]);const u=i?"button--primary":"button--secondary",f=b?"button--disabled":null;return a.createElement("button",((r,a)=>{for(var n in a||(a={}))o.call(a,n)&&t(r,n,a[n]);if(e)for(var n of e(a))l.call(a,n)&&t(r,n,a[n]);return r})({type:"button",className:["button",u,f].filter(Boolean).join(" "),style:p&&{backgroundColor:p},disabled:b},c),s)};i.propTypes={primary:n.bool,disabled:n.bool,label:n.string.isRequired,onClick:n.func},i.defaultProps={primary:!1,disabled:!1,onClick:void 0};export{i as Button}; | ||
var r=Object.defineProperty,e=Object.defineProperties,t=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,l=(e,t,o)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,i=(r,e)=>{for(var t in e||(e={}))a.call(e,t)&&l(r,t,e[t]);if(o)for(var t of o(e))n.call(e,t)&&l(r,t,e[t]);return r};import p from"react";import b from"prop-types";function d(r){var l=r,{primary:b,href:d,disabled:f,children:c}=l,s=((r,e)=>{var t={};for(var l in r)a.call(r,l)&&e.indexOf(l)<0&&(t[l]=r[l]);if(null!=r&&o)for(var l of o(r))e.indexOf(l)<0&&n.call(r,l)&&(t[l]=r[l]);return t})(l,["primary","href","disabled","children"]);const u=b?"button--primary":"button--secondary",y=f?"button--disabled":null;return p.createElement(d?"a":"button",i((m=i({},!d&&{type:"button"}),O={className:["button",u,y].filter(Boolean).join(" "),disabled:f,href:d},e(m,t(O))),s),c);var m,O}d.propTypes={primary:b.bool,disabled:b.bool,children:b.node,href:b.string},d.defaultProps={primary:!1,disabled:!1};export{d as Button}; |
@@ -1,1 +0,1 @@ | ||
var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,o,r)=>o in e?__defProp(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r,__spreadValues=(e,o)=>{for(var r in o||(o={}))__hasOwnProp.call(o,r)&&__defNormalProp(e,r,o[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(o))__propIsEnum.call(o,r)&&__defNormalProp(e,r,o[r]);return e},__objRest=(e,o)=>{var r={};for(var t in e)__hasOwnProp.call(e,t)&&o.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))o.indexOf(t)<0&&__propIsEnum.call(e,t)&&(r[t]=e[t]);return r};!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).ESBComponentLibrary={},e.React,e.PropTypes)}(this,(function(e,o,r){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=t(o),n=t(r);const a=e=>{var o=e,{primary:r,disabled:t,backgroundColor:n,size:a,label:p}=o,s=__objRest(o,["primary","disabled","backgroundColor","size","label"]);const i=r?"button--primary":"button--secondary",d=t?"button--disabled":null;return l.default.createElement("button",__spreadValues({type:"button",className:["button",i,d].filter(Boolean).join(" "),style:n&&{backgroundColor:n},disabled:t},s),p)};a.propTypes={primary:n.default.bool,disabled:n.default.bool,label:n.default.string.isRequired,onClick:n.default.func},a.defaultProps={primary:!1,disabled:!1,onClick:void 0},e.Button=a,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"})); | ||
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,o)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,__spreadValues=(e,r)=>{for(var o in r||(r={}))__hasOwnProp.call(r,o)&&__defNormalProp(e,o,r[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(r))__propIsEnum.call(r,o)&&__defNormalProp(e,o,r[o]);return e},__spreadProps=(e,r)=>__defProps(e,__getOwnPropDescs(r)),__objRest=(e,r)=>{var o={};for(var t in e)__hasOwnProp.call(e,t)&&r.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))r.indexOf(t)<0&&__propIsEnum.call(e,t)&&(o[t]=e[t]);return o};!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).ESBComponentLibrary={},e.React,e.T)}(this,(function(e,r,o){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(r),p=t(o);function a(e){var r=e,{primary:o,href:t,disabled:p,children:a}=r,l=__objRest(r,["primary","href","disabled","children"]);const s=o?"button--primary":"button--secondary",_=p?"button--disabled":null;return n.default.createElement(t?"a":"button",__spreadValues(__spreadProps(__spreadValues({},!t&&{type:"button"}),{className:["button",s,_].filter(Boolean).join(" "),disabled:p,href:t}),l),a)}a.propTypes={primary:p.default.bool,disabled:p.default.bool,children:p.default.node,href:p.default.string},a.defaultProps={primary:!1,disabled:!1},e.Button=a,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"})); |
{ | ||
"name": "esb-component-library", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist" |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5880
17
1