Socket
Socket
Sign inDemoInstall

@zumper/react-ladda

Package Overview
Dependencies
10
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.2.3 to 7.2.4

54

dist/zumper-react-ladda.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
(global = global || self, factory(global.ZumperReactLadda = {}, global.React));
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ZumperReactLadda = {}, global.React));
}(this, (function (exports, React) { 'use strict';
React = React && Object.prototype.hasOwnProperty.call(React, 'default') ? React['default'] : React;
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
function _classCallCheck(instance, Constructor) {

@@ -62,15 +64,2 @@ if (!(instance instanceof Constructor)) {

function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _objectWithoutPropertiesLoose(source, excluded) {

@@ -128,19 +117,2 @@ if (source == null) return {};

function _createSuper(Derived) {
return function () {
var Super = _getPrototypeOf(Derived),
result;
if (_isNativeReflectConstruct()) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
var defaults = {

@@ -718,4 +690,2 @@ lines: 12,

var _super = _createSuper(LaddaButton);
function LaddaButton() {

@@ -726,4 +696,4 @@ var _this;

_this = _super.call(this);
_this.buttonRef = React.createRef();
_this = _possibleConstructorReturn(this, _getPrototypeOf(LaddaButton).call(this));
_this.buttonRef = React__default['default'].createRef();
return _this;

@@ -779,11 +749,11 @@ }

disabled = _this$props3.disabled,
loading = _this$props3.loading,
progress = _this$props3.progress,
otherProps = _objectWithoutProperties(_this$props3, ["className", "children", "disabled", "loading", "progress"]);
loading = _this$props3.loading;
_this$props3.progress;
var otherProps = _objectWithoutProperties(_this$props3, ["className", "children", "disabled", "loading", "progress"]);
return /*#__PURE__*/React.createElement("button", Object.assign({}, mapLegacyProps(otherProps), {
return React__default['default'].createElement("button", Object.assign({}, mapLegacyProps(otherProps), {
className: "ladda-button ".concat(className || ''),
ref: this.buttonRef,
disabled: disabled || loading
}), /*#__PURE__*/React.createElement("span", {
}), React__default['default'].createElement("span", {
className: "ladda-label"

@@ -795,3 +765,3 @@ }, children));

return LaddaButton;
}(React.Component);
}(React__default['default'].Component);

@@ -798,0 +768,0 @@ exports.BLUE = BLUE;

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t=t||self).ZumperReactLadda={},t.React)}(this,(function(t,e){"use strict";function n(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function i(t,e){if(null==t)return{};var n,r,a=function(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function s(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var l={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},d=function(){function t(t){void 0===t&&(t={}),this.opts=Object.assign(Object.assign({},l),t)}return t.prototype.spin=function(t){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),u(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),function(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",r="none";!0===e.shadow?r="0 2px 4px #000":"string"==typeof e.shadow&&(r=e.shadow);for(var a=function(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],r=0,a=t.split(",");a.length>r;r++){var o=a[r].match(e);if(null!==o){var i=+o[2],s=+o[5],l=o[4],d=o[7];0!==i||l||(l=d),0!==s||d||(d=l),l===d&&n.push({prefix:o[1]||"",x:i,y:s,xUnits:l,yUnits:d,end:o[8]})}}return n}(r),o=0;e.lines>o;o++){var i=~~(360/e.lines*o+e.rotate),s=u(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:c(e.fadeColor,o),borderRadius:n,transformOrigin:"left",transform:"rotate("+i+"deg) translateX("+e.radius+"px)"}),l=o*e.direction/e.lines/e.speed;l-=1/e.speed;var d=u(document.createElement("div"),{width:"100%",height:"100%",background:c(e.color,o),borderRadius:n,boxShadow:p(a,i),animation:1/e.speed+"s linear "+l+"s infinite "+e.animation});s.appendChild(d),t.appendChild(s)}}(this.el,this.opts),this},t.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();function u(t,e){for(var n in e)t.style[n]=e[n];return t}function c(t,e){return"string"==typeof t?t:t[e%t.length]}function p(t,e){for(var n=[],r=0,a=t;a.length>r;r++){var o=a[r],i=f(o.x,o.y,e);n.push(o.prefix+i[0]+o.xUnits+" "+i[1]+o.yUnits+o.end)}return n.join(", ")}function f(t,e,n){var r=n*Math.PI/180,a=Math.sin(r),o=Math.cos(r);return[Math.round(1e3*(t*o+e*a))/1e3,Math.round(1e3*(-t*a+e*o))/1e3]}
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ZumperReactLadda={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=n(e);function a(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e){if(null==t)return{};var n,r,a=function(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;o.length>r;r++)0>e.indexOf(n=o[r])&&Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function l(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}var d={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",fadeColor:"transparent",animation:"spinner-line-fade-default",rotate:0,direction:1,speed:1,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:"0 0 1px transparent",position:"absolute"},u=function(){function t(t){void 0===t&&(t={}),this.opts=Object.assign(Object.assign({},d),t)}return t.prototype.spin=function(t){return this.stop(),this.el=document.createElement("div"),this.el.className=this.opts.className,this.el.setAttribute("role","progressbar"),c(this.el,{position:this.opts.position,width:0,zIndex:this.opts.zIndex,left:this.opts.left,top:this.opts.top,transform:"scale("+this.opts.scale+")"}),t&&t.insertBefore(this.el,t.firstChild||null),function(t,e){var n=Math.round(e.corners*e.width*500)/1e3+"px",r="none";!0===e.shadow?r="0 2px 4px #000":"string"==typeof e.shadow&&(r=e.shadow);for(var a=function(t){for(var e=/^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/,n=[],r=0,a=t.split(",");a.length>r;r++){var o=a[r].match(e);if(null!==o){var i=+o[2],s=+o[5],l=o[4],d=o[7];0!==i||l||(l=d),0!==s||d||(d=l),l===d&&n.push({prefix:o[1]||"",x:i,y:s,xUnits:l,yUnits:d,end:o[8]})}}return n}(r),o=0;e.lines>o;o++){var i=~~(360/e.lines*o+e.rotate),s=c(document.createElement("div"),{position:"absolute",top:-e.width/2+"px",width:e.length+e.width+"px",height:e.width+"px",background:p(e.fadeColor,o),borderRadius:n,transformOrigin:"left",transform:"rotate("+i+"deg) translateX("+e.radius+"px)"}),l=o*e.direction/e.lines/e.speed;l-=1/e.speed;var d=c(document.createElement("div"),{width:"100%",height:"100%",background:p(e.color,o),borderRadius:n,boxShadow:f(a,i),animation:1/e.speed+"s linear "+l+"s infinite "+e.animation});s.appendChild(d),t.appendChild(s)}}(this.el,this.opts),this},t.prototype.stop=function(){return this.el&&("undefined"!=typeof requestAnimationFrame?cancelAnimationFrame(this.animateId):clearTimeout(this.animateId),this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=void 0),this},t}();function c(t,e){for(var n in e)t.style[n]=e[n];return t}function p(t,e){return"string"==typeof t?t:t[e%t.length]}function f(t,e){for(var n=[],r=0,a=t;a.length>r;r++){var o=a[r],i=h(o.x,o.y,e);n.push(o.prefix+i[0]+o.xUnits+" "+i[1]+o.yUnits+o.end)}return n.join(", ")}function h(t,e,n){var r=n*Math.PI/180,a=Math.sin(r),o=Math.cos(r);return[Math.round(1e3*(t*o+e*a))/1e3,Math.round(1e3*(-t*a+e*o))/1e3]}
/*!

@@ -8,2 +8,2 @@ * Ladda

* Copyright (C) 2018 Hakim El Hattab, http://hakim.se
*/var h=[];function m(t){if(void 0!==t){if(t.classList.contains("ladda-button")||t.classList.add("ladda-button"),t.hasAttribute("data-style")||t.setAttribute("data-style","expand-right"),!t.querySelector(".ladda-label")){var e=document.createElement("span");e.className="ladda-label",n=t,r=e,(a=document.createRange()).selectNodeContents(n),a.surroundContents(r),n.appendChild(r)}var n,r,a,o,i,s=t.querySelector(".ladda-spinner");s||((s=document.createElement("span")).className="ladda-spinner"),t.appendChild(s);var l={start:function(){return o||(o=function(t){var e,n,r=t.offsetHeight;0===r&&(r=parseFloat(window.getComputedStyle(t).height));r>32&&(r*=.8);t.hasAttribute("data-spinner-size")&&(r=parseInt(t.getAttribute("data-spinner-size"),10));t.hasAttribute("data-spinner-color")&&(e=t.getAttribute("data-spinner-color"));t.hasAttribute("data-spinner-lines")&&(n=parseInt(t.getAttribute("data-spinner-lines"),10));var a=.2*r;return new d({color:e||"#fff",lines:n||12,radius:a,length:.6*a,width:7>a?2:3,animation:"ladda-spinner-line-fade",zIndex:"auto",top:"auto",left:"auto",className:""})}(t)),t.disabled=!0,t.setAttribute("data-loading",""),clearTimeout(i),o.spin(s),this.setProgress(0),this},startAfter:function(t){return clearTimeout(i),i=setTimeout((function(){l.start()}),t),this},stop:function(){return l.isLoading()&&(t.disabled=!1,t.removeAttribute("data-loading")),clearTimeout(i),o&&(i=setTimeout((function(){o.stop()}),1e3)),this},toggle:function(){return this.isLoading()?this.stop():this.start()},setProgress:function(e){e=Math.max(Math.min(e,1),0);var n=t.querySelector(".ladda-progress");0===e&&n&&n.parentNode?n.parentNode.removeChild(n):(n||((n=document.createElement("div")).className="ladda-progress",t.appendChild(n)),n.style.width=(e||0)*t.offsetWidth+"px")},isLoading:function(){return t.hasAttribute("data-loading")},remove:function(){clearTimeout(i),t.disabled=!1,t.removeAttribute("data-loading"),o&&(o.stop(),o=null),h.splice(h.indexOf(l),1)}};return h.push(l),l}console.warn("Ladda button target must be defined.")}function b(t,e){if("function"==typeof t.addEventListener){var n=m(t),r=-1;t.addEventListener("click",(function(){var a=!0,o=function(t,e){for(;t.parentNode&&t.tagName!==e;)t=t.parentNode;return e===t.tagName?t:void 0}(t,"FORM");void 0===o||o.hasAttribute("novalidate")||"function"==typeof o.checkValidity&&(a=o.checkValidity()),a&&(n.startAfter(1),"number"==typeof e.timeout&&(clearTimeout(r),r=setTimeout(n.stop,e.timeout)),"function"==typeof e.callback&&e.callback.call(null,n))}),!1)}}var g=Object.freeze({__proto__:null,create:m,bind:function(t,e){var n;if("string"==typeof t)n=document.querySelectorAll(t);else{if("object"!=typeof t)throw Error("target must be string or object");n=[t]}e=e||{};for(var r=0;n.length>r;r++)b(n[r],e)},stopAll:function(){for(var t=0,e=h.length;e>t;t++)h[t].stop()}}),y=["green","red","blue","purple","mint"],v=["xs","s","l","xl"],x=["contract","contract-overlay","expand-left","expand-right","expand-up","expand-down","slide-left","slide-right","slide-up","slide-down","zoom-in","zoom-out"],O={color:"data-color",size:"data-size",style:"data-style",spinnerSize:"data-spinner-size",spinnerColor:"data-spinner-color",spinnerLines:"data-spinner-lines"},w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(f,t);var l,d,u,c,p=(l=f,function(){var t,e=r(l);if(o()){var n=r(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return s(this,t)});function f(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(t=p.call(this)).buttonRef=e.createRef(),t}return d=f,(u=[{key:"componentDidMount",value:function(){var t=this.props,e=t.loading,n=t.progress;this.laddaInstance=m(this.buttonRef.current),e&&this.laddaInstance.start(),void 0!==n&&this.laddaInstance.setProgress(n)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.loading,r=e.progress;t.loading!==n&&(n?this.laddaInstance.start():this.laddaInstance.stop()),t.progress!==r&&this.laddaInstance.setProgress(r)}},{key:"componentWillUnmount",value:function(){this.laddaInstance.remove()}},{key:"render",value:function(){var t,n=this.props,r=n.className,a=n.children,o=n.disabled,s=n.loading,l=i(n,["className","children","disabled","loading","progress"]);return e.createElement("button",Object.assign({},Object.keys(t=l).reduce((function(e,n){return e[O[n]||n]=t[n],e}),{}),{className:"ladda-button ".concat(r||""),ref:this.buttonRef,disabled:o||s}),e.createElement("span",{className:"ladda-label"},a))}}])&&n(d.prototype,u),c&&n(d,c),f}(e.Component);t.BLUE="blue",t.COLORS=y,t.CONTRACT="contract",t.CONTRACT_OVERLAY="contract-overlay",t.EXPAND_DOWN="expand-down",t.EXPAND_LEFT="expand-left",t.EXPAND_RIGHT="expand-right",t.EXPAND_UP="expand-up",t.GREEN="green",t.L="l",t.Ladda=g,t.MINT="mint",t.PURPLE="purple",t.RED="red",t.S="s",t.SIZES=v,t.SLIDE_DOWN="slide-down",t.SLIDE_LEFT="slide-left",t.SLIDE_RIGHT="slide-right",t.SLIDE_UP="slide-up",t.STYLES=x,t.Spinner=d,t.XL="xl",t.XS="xs",t.ZOOM_IN="zoom-in",t.ZOOM_OUT="zoom-out",t.default=w,Object.defineProperty(t,"__esModule",{value:!0})}));
*/var m=[];function b(t){if(void 0!==t){if(t.classList.contains("ladda-button")||t.classList.add("ladda-button"),t.hasAttribute("data-style")||t.setAttribute("data-style","expand-right"),!t.querySelector(".ladda-label")){var e=document.createElement("span");e.className="ladda-label",n=t,r=e,(a=document.createRange()).selectNodeContents(n),a.surroundContents(r),n.appendChild(r)}var n,r,a,o,i,s=t.querySelector(".ladda-spinner");s||((s=document.createElement("span")).className="ladda-spinner"),t.appendChild(s);var l={start:function(){return o||(o=function(t){var e,n,r=t.offsetHeight;0===r&&(r=parseFloat(window.getComputedStyle(t).height));r>32&&(r*=.8);t.hasAttribute("data-spinner-size")&&(r=parseInt(t.getAttribute("data-spinner-size"),10));t.hasAttribute("data-spinner-color")&&(e=t.getAttribute("data-spinner-color"));t.hasAttribute("data-spinner-lines")&&(n=parseInt(t.getAttribute("data-spinner-lines"),10));var a=.2*r;return new u({color:e||"#fff",lines:n||12,radius:a,length:.6*a,width:7>a?2:3,animation:"ladda-spinner-line-fade",zIndex:"auto",top:"auto",left:"auto",className:""})}(t)),t.disabled=!0,t.setAttribute("data-loading",""),clearTimeout(i),o.spin(s),this.setProgress(0),this},startAfter:function(t){return clearTimeout(i),i=setTimeout((function(){l.start()}),t),this},stop:function(){return l.isLoading()&&(t.disabled=!1,t.removeAttribute("data-loading")),clearTimeout(i),o&&(i=setTimeout((function(){o.stop()}),1e3)),this},toggle:function(){return this.isLoading()?this.stop():this.start()},setProgress:function(e){e=Math.max(Math.min(e,1),0);var n=t.querySelector(".ladda-progress");0===e&&n&&n.parentNode?n.parentNode.removeChild(n):(n||((n=document.createElement("div")).className="ladda-progress",t.appendChild(n)),n.style.width=(e||0)*t.offsetWidth+"px")},isLoading:function(){return t.hasAttribute("data-loading")},remove:function(){clearTimeout(i),t.disabled=!1,t.removeAttribute("data-loading"),o&&(o.stop(),o=null),m.splice(m.indexOf(l),1)}};return m.push(l),l}console.warn("Ladda button target must be defined.")}function g(t,e){if("function"==typeof t.addEventListener){var n=b(t),r=-1;t.addEventListener("click",(function(){var a=!0,o=function(t,e){for(;t.parentNode&&t.tagName!==e;)t=t.parentNode;return e===t.tagName?t:void 0}(t,"FORM");void 0===o||o.hasAttribute("novalidate")||"function"==typeof o.checkValidity&&(a=o.checkValidity()),a&&(n.startAfter(1),"number"==typeof e.timeout&&(clearTimeout(r),r=setTimeout(n.stop,e.timeout)),"function"==typeof e.callback&&e.callback.call(null,n))}),!1)}}var v=Object.freeze({__proto__:null,create:b,bind:function(t,e){var n;if("string"==typeof t)n=document.querySelectorAll(t);else{if("object"!=typeof t)throw Error("target must be string or object");n=[t]}e=e||{};for(var r=0;n.length>r;r++)g(n[r],e)},stopAll:function(){for(var t=0,e=m.length;e>t;t++)m[t].stop()}}),y=["green","red","blue","purple","mint"],x=["xs","s","l","xl"],O=["contract","contract-overlay","expand-left","expand-right","expand-up","expand-down","slide-left","slide-right","slide-up","slide-down","zoom-in","zoom-out"],w={color:"data-color",size:"data-size",style:"data-style",spinnerSize:"data-spinner-size",spinnerColor:"data-spinner-color",spinnerLines:"data-spinner-lines"},E=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=l(this,o(e).call(this))).buttonRef=r.default.createRef(),t}var n,d,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(e,t),n=e,(d=[{key:"componentDidMount",value:function(){var t=this.props,e=t.loading,n=t.progress;this.laddaInstance=b(this.buttonRef.current),e&&this.laddaInstance.start(),void 0!==n&&this.laddaInstance.setProgress(n)}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.loading,r=e.progress;t.loading!==n&&(n?this.laddaInstance.start():this.laddaInstance.stop()),t.progress!==r&&this.laddaInstance.setProgress(r)}},{key:"componentWillUnmount",value:function(){this.laddaInstance.remove()}},{key:"render",value:function(){var t,e=this.props,n=e.className,a=e.children,o=e.disabled,i=e.loading,l=s(e,["className","children","disabled","loading","progress"]);return r.default.createElement("button",Object.assign({},Object.keys(t=l).reduce((function(e,n){return e[w[n]||n]=t[n],e}),{}),{className:"ladda-button ".concat(n||""),ref:this.buttonRef,disabled:o||i}),r.default.createElement("span",{className:"ladda-label"},a))}}])&&a(n.prototype,d),u&&a(n,u),e}(r.default.Component);t.BLUE="blue",t.COLORS=y,t.CONTRACT="contract",t.CONTRACT_OVERLAY="contract-overlay",t.EXPAND_DOWN="expand-down",t.EXPAND_LEFT="expand-left",t.EXPAND_RIGHT="expand-right",t.EXPAND_UP="expand-up",t.GREEN="green",t.L="l",t.Ladda=v,t.MINT="mint",t.PURPLE="purple",t.RED="red",t.S="s",t.SIZES=x,t.SLIDE_DOWN="slide-down",t.SLIDE_LEFT="slide-left",t.SLIDE_RIGHT="slide-right",t.SLIDE_UP="slide-up",t.STYLES=O,t.Spinner=u,t.XL="xl",t.XS="xs",t.ZOOM_IN="zoom-in",t.ZOOM_OUT="zoom-out",t.default=E,Object.defineProperty(t,"__esModule",{value:!0})}));

@@ -79,7 +79,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";

return /*#__PURE__*/React.createElement("button", Object.assign({}, mapLegacyProps(otherProps), {
return React.createElement("button", Object.assign({}, mapLegacyProps(otherProps), {
className: "ladda-button ".concat(className || ''),
ref: this.buttonRef,
disabled: disabled || loading
}), /*#__PURE__*/React.createElement("span", {
}), React.createElement("span", {
className: "ladda-label"

@@ -86,0 +86,0 @@ }, children));

@@ -35,2 +35,3 @@ "use strict";

if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _constants[key]) return;
Object.defineProperty(exports, key, {

@@ -37,0 +38,0 @@ enumerable: true,

@@ -87,7 +87,7 @@ "use strict";

} = this.props;
return /*#__PURE__*/_react.default.createElement("button", { ...mapLegacyProps(otherProps),
return _react.default.createElement("button", { ...mapLegacyProps(otherProps),
className: `ladda-button ${className || ''}`,
ref: this.buttonRef,
disabled: disabled || loading
}, /*#__PURE__*/_react.default.createElement("span", {
}, _react.default.createElement("span", {
className: "ladda-label"

@@ -94,0 +94,0 @@ }, children));

{
"name": "@zumper/react-ladda",
"version": "7.2.3",
"version": "7.2.4",
"description": "React wrapper for Ladda buttons",

@@ -51,10 +51,66 @@ "keywords": [

"devDependencies": {
"@babel/cli": "7.7.4",
"@babel/core": "7.7.4",
"@babel/cli": "7.8.4",
"@babel/compat-data": "7.8.4",
"@babel/core": "7.8.4",
"@babel/helper-compilation-targets": "7.8.4",
"@babel/helper-module-imports": "7.8.3",
"@babel/helper-plugin-utils": "7.8.3",
"@babel/plugin-proposal-async-generator-functions": "7.8.3",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-dynamic-import": "7.8.3",
"@babel/plugin-proposal-json-strings": "7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.8.3",
"@babel/plugin-proposal-object-rest-spread": "7.8.3",
"@babel/plugin-proposal-optional-catch-binding": "7.8.3",
"@babel/plugin-proposal-optional-chaining": "7.8.3",
"@babel/plugin-proposal-unicode-property-regex": "7.8.3",
"@babel/plugin-syntax-async-generators": "7.8.4",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-json-strings": "7.8.3",
"@babel/plugin-syntax-nullish-coalescing-operator": "7.8.3",
"@babel/plugin-syntax-object-rest-spread": "7.8.3",
"@babel/plugin-syntax-optional-catch-binding": "7.8.3",
"@babel/plugin-syntax-optional-chaining": "7.8.3",
"@babel/plugin-syntax-top-level-await": "7.8.3",
"@babel/plugin-transform-arrow-functions": "7.8.3",
"@babel/plugin-transform-async-to-generator": "7.8.3",
"@babel/plugin-transform-block-scoped-functions": "7.8.3",
"@babel/plugin-transform-block-scoping": "7.8.3",
"@babel/plugin-transform-classes": "7.8.3",
"@babel/plugin-transform-computed-properties": "7.8.3",
"@babel/plugin-transform-destructuring": "7.8.3",
"@babel/plugin-transform-dotall-regex": "7.8.3",
"@babel/plugin-transform-duplicate-keys": "7.8.3",
"@babel/plugin-transform-exponentiation-operator": "7.8.3",
"@babel/plugin-transform-for-of": "7.8.4",
"@babel/plugin-transform-function-name": "7.8.3",
"@babel/plugin-transform-literals": "7.8.3",
"@babel/plugin-transform-member-expression-literals": "7.8.3",
"@babel/plugin-transform-modules-amd": "7.8.3",
"@babel/plugin-transform-modules-commonjs": "7.8.3",
"@babel/plugin-transform-modules-systemjs": "7.8.3",
"@babel/plugin-transform-modules-umd": "7.8.3",
"@babel/plugin-transform-named-capturing-groups-regex": "7.8.3",
"@babel/plugin-transform-new-target": "7.8.3",
"@babel/plugin-transform-object-super": "7.8.3",
"@babel/plugin-transform-parameters": "7.8.4",
"@babel/plugin-transform-property-literals": "7.8.3",
"@babel/plugin-transform-react-display-name": "7.8.3",
"@babel/plugin-transform-react-jsx": "7.8.3",
"@babel/plugin-transform-react-jsx-self": "7.8.3",
"@babel/plugin-transform-react-jsx-source": "7.8.3",
"@babel/plugin-transform-regenerator": "7.8.3",
"@babel/plugin-transform-reserved-words": "7.8.3",
"@babel/plugin-transform-shorthand-properties": "7.8.3",
"@babel/plugin-transform-spread": "7.8.3",
"@babel/plugin-transform-sticky-regex": "7.8.3",
"@babel/plugin-transform-template-literals": "7.8.3",
"@babel/plugin-transform-typeof-symbol": "7.8.4",
"@babel/plugin-transform-unicode-regex": "7.8.3",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-replace": "^2.3.1",
"@testing-library/jest-dom": "^5.3.0",
"@zumper/babel-preset-react-app": "9.0.2-zumper.23",
"@zumper/babel-preset-react-app": "9.1.1-zumper.25",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.2.4",
"babel-jest": "^26.6.3",
"cross-env": "^7.0.2",

@@ -79,9 +135,9 @@ "enzyme": "^3.11.0",

"fs-extra": "^9.0.0",
"jest": "^25.2.4",
"jest": "^26.6.3",
"jest-environment-enzyme": "^7.1.2",
"jest-environment-jsdom": "^25.2.4",
"jest-environment-jsdom-global": "^1.2.1",
"jest-environment-jsdom": "^26.6.2",
"jest-environment-jsdom-global": "^2.0.4",
"jest-enzyme": "^7.1.2",
"jest-pnp-resolver": "^1.2.1",
"jest-resolve": "^25.2.3",
"jest-resolve": "^26.6.2",
"jsdom": "^16.2.2",

@@ -88,0 +144,0 @@ "lodash": "^4.17.15",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc