New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@progress/kendo-ripple

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@progress/kendo-ripple - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1-dev.202012100957

NOTICE.txt

2

dist/cdn/js/kendo-ripple.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KendoRipple=t():e.KendoRipple=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.register=r.register},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){var r=function(){n(),e.removeEventListener(t,r,!1)},o=function(){return e.addEventListener(t,r,!1)};return o(),{remove:o}},o=function(e,t){return function(n){var o,c=n.target,a=c.document||c.ownerDocument;if((o=t.container?t.container(c):function(e,t){if(e.closest)return e.closest(t);for(var n=Element.prototype.matches?function(e,t){return e.matches(t)}:function(e,t){return e.msMatchesSelector(t)},r=e;r;){if(n(r,t))return r;r=r.parentElement}}(c,e))&&!(/focus/i.test(n.type)&&o.classList.contains("k-ripple-target"))){o.classList.add("k-ripple-target");var l=function(e){var t=e.createElement("div");t.className="k-ripple";var n=e.createElement("div");return n.className="k-ripple-blob",t.appendChild(n),[t,n]}(a),s=l[0],p=l[1],f={animated:!1,released:!1,blob:p,container:o,ripple:s},d={focusin:"focusout",keydown:"keyup",mousedown:"mouseup",pointerdown:"pointerup",touchdown:"touchup"}[n.type];r(n.currentTarget,d,function(){return u(f)}),o.appendChild(s),window.getComputedStyle(s).getPropertyValue("opacity");var v=o.getBoundingClientRect(),m=0,y=0;/mouse|pointer|touch/.test(n.type)?(m=n.clientX-v.left,y=n.clientY-v.top):(m=v.width/2,y=v.height/2);var h=m-(m<v.width/2?v.width:0),b=y-(y<v.height/2?v.height:0),g=2*Math.sqrt(h*h+b*b);if(p.style.width=p.style.height=g+"px",p.offsetWidth<0)throw new Error("Inconceivable!");p.style.cssText="\n width: "+g+"px;\n height: "+g+"px;\n transform: translate(-50%, -50%) scale(1);\n left: "+m+"px;\n top: "+y+"px;\n ",setTimeout(function(){return i(f)},500)}}},i=function(e){e.animated=!0,c(e)},u=function(e){e.released=!0,c(e)},c=function(e){if(e.released&&e.animated){var t=e.blob,n=e.ripple,o=e.container;o&&r(o,"blur",function(){return o.classList.remove("k-ripple-target")}),t&&(r(t,"transitionend",function(){n&&n.parentNode&&n.parentNode.removeChild(n)}),t.style.transition="opacity 200ms linear",t.style.opacity="0")}};t.register=function(e,t){var n,r=(n=t.map(function(t){var n={events:["mousedown","touchdown"],global:!1},r=t.selector,i=t.options,u=void 0===i?n:i,c=o(r,u),a=u.events||n.events,l=u.global?document.body:e;return a.forEach(function(e){return l.addEventListener(e,c,!1)}),{events:a,options:u,activator:c}}),[].concat.apply([],n));return function(){if(e){r.forEach(function(t){var n=t.events,r=t.options,o=t.activator,i=r.global?document.body:e;n.forEach(function(e){return i.removeEventListener(e,o,!1)})}),e=null}}}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KendoRipple=t():e.KendoRipple=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.register=r.register},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){var r=function(){n(),e.removeEventListener(t,r,!1)},o=function(){return e.addEventListener(t,r,!1)};return o(),{remove:o}},o=function(e,t){return function(n){var o,u=n.target,c=u.document||u.ownerDocument;if((o=t.container?t.container(u):function(e,t){if(e.closest)return e.closest(t);for(var n=Element.prototype.matches?function(e,t){return e.matches(t)}:function(e,t){return e.msMatchesSelector(t)},r=e;r;){if(n(r,t))return r;r=r.parentElement}}(u,e))&&!(/focus/i.test(n.type)&&o.classList.contains("k-ripple-target")))if(u.classList.contains("k-checkbox")||u.classList.contains("k-radio"))n.target.classList.remove("k-ripple-focus"),"animationend"!==n.type&&n.target.classList.add("k-ripple-focus");else{o.classList.add("k-ripple-target");var s=function(e){var t=e.createElement("div");t.className="k-ripple";var n=e.createElement("div");return n.className="k-ripple-blob",t.appendChild(n),[t,n]}(c),l=s[0],p=s[1],f={animated:!1,released:!1,blob:p,container:o,ripple:l},d={focusin:"focusout",keydown:"keyup",mousedown:"mouseup",pointerdown:"pointerup",touchdown:"touchup",animationstart:"animationend"}[n.type];r(n.currentTarget,d,(function(){return a(f)})),o.appendChild(l),window.getComputedStyle(l).getPropertyValue("opacity");var v=o.getBoundingClientRect(),m=0,y=0;/mouse|pointer|touch/.test(n.type)?(m=n.clientX-v.left,y=n.clientY-v.top):(m=v.width/2,y=v.height/2);var h=m-(m<v.width/2?v.width:0),b=y-(y<v.height/2?v.height:0),g=2*Math.sqrt(h*h+b*b);if(p.style.width=p.style.height=g+"px",p.offsetWidth<0)throw new Error("Inconceivable!");p.style.cssText="\n width: "+g+"px;\n height: "+g+"px;\n transform: translate(-50%, -50%) scale(1);\n left: "+m+"px;\n top: "+y+"px;\n ",setTimeout((function(){return i(f)}),500)}}},i=function(e){e.animated=!0,u(e)},a=function(e){e.released=!0,u(e)},u=function(e){if(e.released&&e.animated){var t=e.blob,n=e.ripple,o=e.container;o&&r(o,"blur",(function(){return o.classList.remove("k-ripple-target")})),t&&(r(t,"transitionend",(function(){n&&n.parentNode&&n.parentNode.removeChild(n)})),t.style.transition="opacity 200ms linear",t.style.opacity="0")}};t.register=function(e,t){var n,r=(n=t.map((function(t){var n={events:["mousedown","touchdown"],global:!1},r=t.selector,i=t.options,a=void 0===i?n:i,u=o(r,a),c=a.events||n.events,s=a.global?document.body:e;return c.forEach((function(e){return s.addEventListener(e,u,!1)})),{events:c,options:a,activator:u}})),[].concat.apply([],n));return function(){if(e){r.forEach((function(t){var n=t.events,r=t.options,o=t.activator,i=r.global?document.body:e;n.forEach((function(e){return i.removeEventListener(e,o,!1)}))})),e=null}}}}])}));

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KendoRipple=t():e.KendoRipple=t()}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.register=r.register},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){var r=function(){n(),e.removeEventListener(t,r,!1)},o=function(){return e.addEventListener(t,r,!1)};return o(),{remove:o}},o=function(e,t){return function(n){var o,c=n.target,a=c.document||c.ownerDocument;if((o=t.container?t.container(c):function(e,t){if(e.closest)return e.closest(t);for(var n=Element.prototype.matches?function(e,t){return e.matches(t)}:function(e,t){return e.msMatchesSelector(t)},r=e;r;){if(n(r,t))return r;r=r.parentElement}}(c,e))&&!(/focus/i.test(n.type)&&o.classList.contains("k-ripple-target"))){o.classList.add("k-ripple-target");var l=function(e){var t=e.createElement("div");t.className="k-ripple";var n=e.createElement("div");return n.className="k-ripple-blob",t.appendChild(n),[t,n]}(a),s=l[0],p=l[1],f={animated:!1,released:!1,blob:p,container:o,ripple:s},d={focusin:"focusout",keydown:"keyup",mousedown:"mouseup",pointerdown:"pointerup",touchdown:"touchup"}[n.type];r(n.currentTarget,d,function(){return u(f)}),o.appendChild(s),window.getComputedStyle(s).getPropertyValue("opacity");var v=o.getBoundingClientRect(),m=0,y=0;/mouse|pointer|touch/.test(n.type)?(m=n.clientX-v.left,y=n.clientY-v.top):(m=v.width/2,y=v.height/2);var h=m-(m<v.width/2?v.width:0),b=y-(y<v.height/2?v.height:0),g=2*Math.sqrt(h*h+b*b);if(p.style.width=p.style.height=g+"px",p.offsetWidth<0)throw new Error("Inconceivable!");p.style.cssText="\n width: "+g+"px;\n height: "+g+"px;\n transform: translate(-50%, -50%) scale(1);\n left: "+m+"px;\n top: "+y+"px;\n ",setTimeout(function(){return i(f)},500)}}},i=function(e){e.animated=!0,c(e)},u=function(e){e.released=!0,c(e)},c=function(e){if(e.released&&e.animated){var t=e.blob,n=e.ripple,o=e.container;o&&r(o,"blur",function(){return o.classList.remove("k-ripple-target")}),t&&(r(t,"transitionend",function(){n&&n.parentNode&&n.parentNode.removeChild(n)}),t.style.transition="opacity 200ms linear",t.style.opacity="0")}};t.register=function(e,t){var n,r=(n=t.map(function(t){var n={events:["mousedown","touchdown"],global:!1},r=t.selector,i=t.options,u=void 0===i?n:i,c=o(r,u),a=u.events||n.events,l=u.global?document.body:e;return a.forEach(function(e){return l.addEventListener(e,c,!1)}),{events:a,options:u,activator:c}}),[].concat.apply([],n));return function(){if(e){r.forEach(function(t){var n=t.events,r=t.options,o=t.activator,i=r.global?document.body:e;n.forEach(function(e){return i.removeEventListener(e,o,!1)})}),e=null}}}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.KendoRipple=t():e.KendoRipple=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.register=r.register},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){var r=function(){n(),e.removeEventListener(t,r,!1)},o=function(){return e.addEventListener(t,r,!1)};return o(),{remove:o}},o=function(e,t){return function(n){var o,u=n.target,c=u.document||u.ownerDocument;if((o=t.container?t.container(u):function(e,t){if(e.closest)return e.closest(t);for(var n=Element.prototype.matches?function(e,t){return e.matches(t)}:function(e,t){return e.msMatchesSelector(t)},r=e;r;){if(n(r,t))return r;r=r.parentElement}}(u,e))&&!(/focus/i.test(n.type)&&o.classList.contains("k-ripple-target")))if(u.classList.contains("k-checkbox")||u.classList.contains("k-radio"))n.target.classList.remove("k-ripple-focus"),"animationend"!==n.type&&n.target.classList.add("k-ripple-focus");else{o.classList.add("k-ripple-target");var s=function(e){var t=e.createElement("div");t.className="k-ripple";var n=e.createElement("div");return n.className="k-ripple-blob",t.appendChild(n),[t,n]}(c),l=s[0],p=s[1],f={animated:!1,released:!1,blob:p,container:o,ripple:l},d={focusin:"focusout",keydown:"keyup",mousedown:"mouseup",pointerdown:"pointerup",touchdown:"touchup",animationstart:"animationend"}[n.type];r(n.currentTarget,d,(function(){return a(f)})),o.appendChild(l),window.getComputedStyle(l).getPropertyValue("opacity");var v=o.getBoundingClientRect(),m=0,y=0;/mouse|pointer|touch/.test(n.type)?(m=n.clientX-v.left,y=n.clientY-v.top):(m=v.width/2,y=v.height/2);var h=m-(m<v.width/2?v.width:0),b=y-(y<v.height/2?v.height:0),g=2*Math.sqrt(h*h+b*b);if(p.style.width=p.style.height=g+"px",p.offsetWidth<0)throw new Error("Inconceivable!");p.style.cssText="\n width: "+g+"px;\n height: "+g+"px;\n transform: translate(-50%, -50%) scale(1);\n left: "+m+"px;\n top: "+y+"px;\n ",setTimeout((function(){return i(f)}),500)}}},i=function(e){e.animated=!0,u(e)},a=function(e){e.released=!0,u(e)},u=function(e){if(e.released&&e.animated){var t=e.blob,n=e.ripple,o=e.container;o&&r(o,"blur",(function(){return o.classList.remove("k-ripple-target")})),t&&(r(t,"transitionend",(function(){n&&n.parentNode&&n.parentNode.removeChild(n)})),t.style.transition="opacity 200ms linear",t.style.opacity="0")}};t.register=function(e,t){var n,r=(n=t.map((function(t){var n={events:["mousedown","touchdown"],global:!1},r=t.selector,i=t.options,a=void 0===i?n:i,u=o(r,a),c=a.events||n.events,s=a.global?document.body:e;return c.forEach((function(e){return s.addEventListener(e,u,!1)})),{events:c,options:a,activator:u}})),[].concat.apply([],n));return function(){if(e){r.forEach((function(t){var n=t.events,r=t.options,o=t.activator,i=r.global?document.body:e;n.forEach((function(e){return i.removeEventListener(e,o,!1)}))})),e=null}}}}])}));

@@ -51,50 +51,59 @@ var closest = function (element, selector) {

}
// suppress focus when animating ripples
container.classList.add("k-ripple-target");
var _a = createRipple(doc), ripple = _a[0], blob = _a[1];
var state = {
animated: false,
released: false,
blob: blob,
container: container,
ripple: ripple
};
var eventType = {
'focusin': 'focusout',
'keydown': 'keyup',
'mousedown': 'mouseup',
'pointerdown': 'pointerup',
'touchdown': 'touchup'
}[e.type];
once(e.currentTarget, eventType, function () { return release(state); });
container.appendChild(ripple);
// recalc to allow the effect to animate
window.getComputedStyle(ripple).getPropertyValue('opacity');
var rect = container.getBoundingClientRect();
var left = 0;
var top = 0;
if ((/mouse|pointer|touch/).test(e.type)) {
left = e.clientX - rect.left;
top = e.clientY - rect.top;
if (!target.classList.contains('k-checkbox') && !target.classList.contains('k-radio')) {
// suppress focus when animating ripples
container.classList.add("k-ripple-target");
var _a = createRipple(doc), ripple = _a[0], blob = _a[1];
var state_1 = {
animated: false,
released: false,
blob: blob,
container: container,
ripple: ripple
};
var eventType = {
'focusin': 'focusout',
'keydown': 'keyup',
'mousedown': 'mouseup',
'pointerdown': 'pointerup',
'touchdown': 'touchup',
'animationstart': 'animationend'
}[e.type];
once(e.currentTarget, eventType, function () { return release(state_1); });
container.appendChild(ripple);
// recalc to allow the effect to animate
window.getComputedStyle(ripple).getPropertyValue('opacity');
var rect = container.getBoundingClientRect();
var left = 0;
var top_1 = 0;
if ((/mouse|pointer|touch/).test(e.type)) {
left = e.clientX - rect.left;
top_1 = e.clientY - rect.top;
}
else {
left = rect.width / 2;
top_1 = rect.height / 2;
}
// coordinates of the farthest corner
var xMax = left < rect.width / 2 ? rect.width : 0;
var yMax = top_1 < rect.height / 2 ? rect.height : 0;
// distance to the farthest corner
var dx = left - xMax;
var dy = top_1 - yMax;
// blob size is twice the blob radius
var size = 2 * Math.sqrt(dx * dx + dy * dy);
var duration = 500;
blob.style.width = blob.style.height = size + "px";
// force reflow for Safari 11 to align ripple blob
if (blob.offsetWidth < 0) {
throw new Error("Inconceivable!");
}
blob.style.cssText = "\n width: " + size + "px;\n height: " + size + "px;\n transform: translate(-50%, -50%) scale(1);\n left: " + left + "px;\n top: " + top_1 + "px;\n ";
setTimeout(function () { return finishAnimation(state_1); }, duration);
}
else {
left = rect.width / 2;
top = rect.height / 2;
e.target.classList.remove('k-ripple-focus');
if (e.type !== 'animationend') {
e.target.classList.add('k-ripple-focus');
}
}
// coordinates of the farthest corner
var xMax = left < rect.width / 2 ? rect.width : 0;
var yMax = top < rect.height / 2 ? rect.height : 0;
// distance to the farthest corner
var dx = left - xMax;
var dy = top - yMax;
// blob size is twice the blob radius
var size = 2 * Math.sqrt(dx * dx + dy * dy);
var duration = 500;
blob.style.width = blob.style.height = size + "px";
// force reflow for Safari 11 to align ripple blob
if (blob.offsetWidth < 0) {
throw new Error("Inconceivable!");
}
blob.style.cssText = "\n width: " + size + "px;\n height: " + size + "px;\n transform: translate(-50%, -50%) scale(1);\n left: " + left + "px;\n top: " + top + "px;\n ";
setTimeout(function () { return finishAnimation(state); }, duration);
}; };

@@ -101,0 +110,0 @@ var finishAnimation = function (state) {

@@ -51,56 +51,65 @@ const closest = (element, selector) => {

}
// suppress focus when animating ripples
container.classList.add("k-ripple-target");
const [ripple, blob] = createRipple(doc);
const state = {
animated: false,
released: false,
blob,
container,
ripple
};
const eventType = {
'focusin': 'focusout',
'keydown': 'keyup',
'mousedown': 'mouseup',
'pointerdown': 'pointerup',
'touchdown': 'touchup'
}[e.type];
once(e.currentTarget, eventType, () => release(state));
container.appendChild(ripple);
// recalc to allow the effect to animate
window.getComputedStyle(ripple).getPropertyValue('opacity');
const rect = container.getBoundingClientRect();
let left = 0;
let top = 0;
if ((/mouse|pointer|touch/).test(e.type)) {
left = e.clientX - rect.left;
top = e.clientY - rect.top;
if (!target.classList.contains('k-checkbox') && !target.classList.contains('k-radio')) {
// suppress focus when animating ripples
container.classList.add("k-ripple-target");
const [ripple, blob] = createRipple(doc);
const state = {
animated: false,
released: false,
blob,
container,
ripple
};
const eventType = {
'focusin': 'focusout',
'keydown': 'keyup',
'mousedown': 'mouseup',
'pointerdown': 'pointerup',
'touchdown': 'touchup',
'animationstart': 'animationend'
}[e.type];
once(e.currentTarget, eventType, () => release(state));
container.appendChild(ripple);
// recalc to allow the effect to animate
window.getComputedStyle(ripple).getPropertyValue('opacity');
const rect = container.getBoundingClientRect();
let left = 0;
let top = 0;
if ((/mouse|pointer|touch/).test(e.type)) {
left = e.clientX - rect.left;
top = e.clientY - rect.top;
}
else {
left = rect.width / 2;
top = rect.height / 2;
}
// coordinates of the farthest corner
const xMax = left < rect.width / 2 ? rect.width : 0;
const yMax = top < rect.height / 2 ? rect.height : 0;
// distance to the farthest corner
const dx = left - xMax;
const dy = top - yMax;
// blob size is twice the blob radius
const size = 2 * Math.sqrt(dx * dx + dy * dy);
const duration = 500;
blob.style.width = blob.style.height = `${size}px`;
// force reflow for Safari 11 to align ripple blob
if (blob.offsetWidth < 0) {
throw new Error("Inconceivable!");
}
blob.style.cssText = `
width: ${size}px;
height: ${size}px;
transform: translate(-50%, -50%) scale(1);
left: ${left}px;
top: ${top}px;
`;
setTimeout(() => finishAnimation(state), duration);
}
else {
left = rect.width / 2;
top = rect.height / 2;
e.target.classList.remove('k-ripple-focus');
if (e.type !== 'animationend') {
e.target.classList.add('k-ripple-focus');
}
}
// coordinates of the farthest corner
const xMax = left < rect.width / 2 ? rect.width : 0;
const yMax = top < rect.height / 2 ? rect.height : 0;
// distance to the farthest corner
const dx = left - xMax;
const dy = top - yMax;
// blob size is twice the blob radius
const size = 2 * Math.sqrt(dx * dx + dy * dy);
const duration = 500;
blob.style.width = blob.style.height = `${size}px`;
// force reflow for Safari 11 to align ripple blob
if (blob.offsetWidth < 0) {
throw new Error("Inconceivable!");
}
blob.style.cssText = `
width: ${size}px;
height: ${size}px;
transform: translate(-50%, -50%) scale(1);
left: ${left}px;
top: ${top}px;
`;
setTimeout(() => finishAnimation(state), duration);
};

@@ -107,0 +116,0 @@ const finishAnimation = (state) => {

@@ -53,50 +53,59 @@ "use strict";

}
// suppress focus when animating ripples
container.classList.add("k-ripple-target");
var _a = createRipple(doc), ripple = _a[0], blob = _a[1];
var state = {
animated: false,
released: false,
blob: blob,
container: container,
ripple: ripple
};
var eventType = {
'focusin': 'focusout',
'keydown': 'keyup',
'mousedown': 'mouseup',
'pointerdown': 'pointerup',
'touchdown': 'touchup'
}[e.type];
once(e.currentTarget, eventType, function () { return release(state); });
container.appendChild(ripple);
// recalc to allow the effect to animate
window.getComputedStyle(ripple).getPropertyValue('opacity');
var rect = container.getBoundingClientRect();
var left = 0;
var top = 0;
if ((/mouse|pointer|touch/).test(e.type)) {
left = e.clientX - rect.left;
top = e.clientY - rect.top;
if (!target.classList.contains('k-checkbox') && !target.classList.contains('k-radio')) {
// suppress focus when animating ripples
container.classList.add("k-ripple-target");
var _a = createRipple(doc), ripple = _a[0], blob = _a[1];
var state_1 = {
animated: false,
released: false,
blob: blob,
container: container,
ripple: ripple
};
var eventType = {
'focusin': 'focusout',
'keydown': 'keyup',
'mousedown': 'mouseup',
'pointerdown': 'pointerup',
'touchdown': 'touchup',
'animationstart': 'animationend'
}[e.type];
once(e.currentTarget, eventType, function () { return release(state_1); });
container.appendChild(ripple);
// recalc to allow the effect to animate
window.getComputedStyle(ripple).getPropertyValue('opacity');
var rect = container.getBoundingClientRect();
var left = 0;
var top_1 = 0;
if ((/mouse|pointer|touch/).test(e.type)) {
left = e.clientX - rect.left;
top_1 = e.clientY - rect.top;
}
else {
left = rect.width / 2;
top_1 = rect.height / 2;
}
// coordinates of the farthest corner
var xMax = left < rect.width / 2 ? rect.width : 0;
var yMax = top_1 < rect.height / 2 ? rect.height : 0;
// distance to the farthest corner
var dx = left - xMax;
var dy = top_1 - yMax;
// blob size is twice the blob radius
var size = 2 * Math.sqrt(dx * dx + dy * dy);
var duration = 500;
blob.style.width = blob.style.height = size + "px";
// force reflow for Safari 11 to align ripple blob
if (blob.offsetWidth < 0) {
throw new Error("Inconceivable!");
}
blob.style.cssText = "\n width: " + size + "px;\n height: " + size + "px;\n transform: translate(-50%, -50%) scale(1);\n left: " + left + "px;\n top: " + top_1 + "px;\n ";
setTimeout(function () { return finishAnimation(state_1); }, duration);
}
else {
left = rect.width / 2;
top = rect.height / 2;
e.target.classList.remove('k-ripple-focus');
if (e.type !== 'animationend') {
e.target.classList.add('k-ripple-focus');
}
}
// coordinates of the farthest corner
var xMax = left < rect.width / 2 ? rect.width : 0;
var yMax = top < rect.height / 2 ? rect.height : 0;
// distance to the farthest corner
var dx = left - xMax;
var dy = top - yMax;
// blob size is twice the blob radius
var size = 2 * Math.sqrt(dx * dx + dy * dy);
var duration = 500;
blob.style.width = blob.style.height = size + "px";
// force reflow for Safari 11 to align ripple blob
if (blob.offsetWidth < 0) {
throw new Error("Inconceivable!");
}
blob.style.cssText = "\n width: " + size + "px;\n height: " + size + "px;\n transform: translate(-50%, -50%) scale(1);\n left: " + left + "px;\n top: " + top + "px;\n ";
setTimeout(function () { return finishAnimation(state); }, duration);
}; };

@@ -103,0 +112,0 @@ var finishAnimation = function (state) {

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

System.register("@progress/kendo-ripple",[],function(o){return{setters:[],execute:function(){!function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var y=function(e,t,n){var r=function(){n(),e.removeEventListener(t,r,!1)},o=function(){return e.addEventListener(t,r,!1)};return o(),{remove:o}},g=function(e){e.animated=!0,r(e)},b=function(e){e.released=!0,r(e)},r=function(e){if(e.released&&e.animated){var t=e.blob,n=e.ripple,r=e.container;r&&y(r,"blur",function(){return r.classList.remove("k-ripple-target")}),t&&(y(t,"transitionend",function(){n&&n.parentNode&&n.parentNode.removeChild(n)}),t.style.transition="opacity 200ms linear",t.style.opacity="0")}};t.register=function(a,e){var t,n=(t=e.map(function(e){var m,h,t={events:["mousedown","touchdown"],global:!1},n=e.selector,r=e.options,o=void 0===r?t:r,i=(m=n,h=o,function(e){var t,n=e.target,r=n.document||n.ownerDocument;if((t=h.container?h.container(n):function(e,t){if(e.closest)return e.closest(t);for(var n=Element.prototype.matches?function(e,t){return e.matches(t)}:function(e,t){return e.msMatchesSelector(t)},r=e;r;){if(n(r,t))return r;r=r.parentElement}}(n,m))&&(!/focus/i.test(e.type)||!t.classList.contains("k-ripple-target"))){t.classList.add("k-ripple-target");var o=function(e){var t=e.createElement("div");t.className="k-ripple";var n=e.createElement("div");return n.className="k-ripple-blob",t.appendChild(n),[t,n]}(r),i=o[0],u=o[1],c={animated:!1,released:!1,blob:u,container:t,ripple:i},a={focusin:"focusout",keydown:"keyup",mousedown:"mouseup",pointerdown:"pointerup",touchdown:"touchup"}[e.type];y(e.currentTarget,a,function(){return b(c)}),t.appendChild(i),window.getComputedStyle(i).getPropertyValue("opacity");var s=t.getBoundingClientRect(),l=0,p=0;p=/mouse|pointer|touch/.test(e.type)?(l=e.clientX-s.left,e.clientY-s.top):(l=s.width/2,s.height/2);var f=l-(l<s.width/2?s.width:0),d=p-(p<s.height/2?s.height:0),v=2*Math.sqrt(f*f+d*d);if(u.style.width=u.style.height=v+"px",u.offsetWidth<0)throw new Error("Inconceivable!");u.style.cssText="\n width: "+v+"px;\n height: "+v+"px;\n transform: translate(-50%, -50%) scale(1);\n left: "+l+"px;\n top: "+p+"px;\n ",setTimeout(function(){return g(c)},500)}}),u=o.events||t.events,c=o.global?document.body:a;return u.forEach(function(e){return c.addEventListener(e,i,!1)}),{events:u,options:o,activator:i}}),[].concat.apply([],t));return function(){a&&(n.forEach(function(e){var t=e.events,n=e.options,r=e.activator,o=n.global?document.body:a;t.forEach(function(e){return o.removeEventListener(e,r,!1)})}),a=null)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.register=r.register,function(e){for(var t in e)o(t,e[t])}(t)}])}}});
System.register("@progress/kendo-ripple",[],function(i){return{setters:[],execute:function(){function r(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,o;o={},r.m=n=[function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function c(e,t,n){function r(){return e.addEventListener(t,o,!1)}var o=function(){n(),e.removeEventListener(t,o,!1)};return r(),1}var u=function(e){e.animated=!0,r(e)},l=function(e){e.released=!0,r(e)},r=function(e){var t,n,r;e.released&&e.animated&&(t=e.blob,n=e.ripple,(r=e.container)&&c(r,"blur",function(){return r.classList.remove("k-ripple-target")}),t&&(c(t,"transitionend",function(){n&&n.parentNode&&n.parentNode.removeChild(n)}),t.style.transition="opacity 200ms linear",t.style.opacity="0"))};t.register=function(i,e){var t=(e=e.map(function(e){var a,s,t={events:["mousedown","touchdown"],global:!1},n=e.selector,e=e.options,e=void 0===e?t:e,r=(a=n,function(e){var t=e.target,n=t.document||t.ownerDocument;if((i=s.container?s.container(t):function(e,t){if(e.closest)return e.closest(t);for(var n=Element.prototype.matches?function(e,t){return e.matches(t)}:function(e,t){return e.msMatchesSelector(t)},r=e;r;){if(n(r,t))return r;r=r.parentElement}}(t,a))&&(!/focus/i.test(e.type)||!i.classList.contains("k-ripple-target")))if(t.classList.contains("k-checkbox")||t.classList.contains("k-radio"))e.target.classList.remove("k-ripple-focus"),"animationend"!==e.type&&e.target.classList.add("k-ripple-focus");else{i.classList.add("k-ripple-target");var r=function(e){var t=e.createElement("div");t.className="k-ripple";e=e.createElement("div");return e.className="k-ripple-blob",t.appendChild(e),[t,e]}(n),t=r[0],n=r[1],o={animated:!1,released:!1,blob:n,container:i,ripple:t},r={focusin:"focusout",keydown:"keyup",mousedown:"mouseup",pointerdown:"pointerup",touchdown:"touchup",animationstart:"animationend"}[e.type];c(e.currentTarget,r,function(){return l(o)}),i.appendChild(t),window.getComputedStyle(t).getPropertyValue("opacity");var r=i.getBoundingClientRect(),t=0,i=0,i=/mouse|pointer|touch/.test(e.type)?(t=e.clientX-r.left,e.clientY-r.top):(t=r.width/2,r.height/2),e=t-(t<r.width/2?r.width:0),r=i-(i<r.height/2?r.height:0),r=2*Math.sqrt(e*e+r*r);if(n.style.width=n.style.height=r+"px",n.offsetWidth<0)throw new Error("Inconceivable!");n.style.cssText="\n width: "+r+"px;\n height: "+r+"px;\n transform: translate(-50%, -50%) scale(1);\n left: "+t+"px;\n top: "+i+"px;\n ",setTimeout(function(){return u(o)},500)}}),t=(s=e).events||t.events,o=e.global?document.body:i;return t.forEach(function(e){return o.addEventListener(e,r,!1)}),{events:t,options:e,activator:r}}),[].concat.apply([],e));return function(){i&&(t.forEach(function(e){var t=e.events,n=e.options,r=e.activator,o=n.global?document.body:i;t.forEach(function(e){return o.removeEventListener(e,r,!1)})}),i=null)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n=n(0);t.register=n.register,function(e){for(var t in e)i(t,e[t])}(t)}],r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},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=1)}}});

@@ -13,2 +13,2 @@ # Kendo UI

*Copyright © 2019 Progress Software EAD. All rights reserved.*
*Copyright © 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
{
"name": "@progress/kendo-ripple",
"description": "Kendo UI Ripple package",
"version": "1.0.0",
"version": "1.0.1-dev.202012100957",
"keywords": [

@@ -29,7 +29,6 @@ "Kendo UI"

"devDependencies": {
"@krux/condition-jenkins": "1.0.1",
"@progress/kendo-angular-jest-preset": "^1.1.0",
"@progress/kendo-theme-default": "^3.0.0",
"@progress/kendo-theme-material": "^2.0.0",
"@progress/kendo-typescript-tasks": "^5.0.3",
"@progress/kendo-theme-default": "^4.27.0",
"@progress/kendo-theme-material": "^3.23.0",
"@progress/kendo-typescript-tasks": "^9.0.3",
"@telerik/semantic-prerelease": "^1.0.0",

@@ -44,3 +43,3 @@ "@types/jest": "^21.0.0",

"ghooks": "^1.0.3",
"gulp": "^3.9.0",
"gulp": "^4.0.0",
"jest-cli": "^21.0.0",

@@ -98,3 +97,6 @@ "jest-preset-typescript": "^1.2.0",

"verifyRelease": "@telerik/semantic-prerelease/verifyRelease"
}
},
"files": [
"dist"
]
}
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