UNPKG

@progress/kendo-react-ripple

Version:

React Ripple provides the Material ink ripple effect. KendoReact Ripple package

16 lines (15 loc) 2.82 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ /** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-ripple"),require("@progress/kendo-react-common")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-ripple","@progress/kendo-react-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactRipple={},e.React,e.PropTypes,e.KendoRipple,e.KendoReactCommon)}(this,(function(e,t,r,s,o){"use strict";function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=n(t);const c={name:"@progress/kendo-react-ripple",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"11.3.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},p=class extends i.PureComponent{constructor(e){super(e),this._element=null,this.removeListeners=()=>{},this.showLicenseWatermark=!1,this.registerListeners=()=>{const e=this._element;this.removeListeners();const t=s.register(e,[{selector:".k-button:not(li)"},{selector:".k-list>.k-item,.k-list>.k-list-item",options:{global:!0}},{selector:".k-checkbox-label,.k-radio-label"},{selector:".k-checkbox,.k-radio",options:{events:["focusin","animationend","click"]}}]);this.removeListeners=t},this.showLicenseWatermark=!o.validatePackage(c,{component:"Ripple"})}componentDidMount(){this.registerListeners()}componentDidUpdate(){const{disabled:e}=this.props;e?this.removeListeners():this.registerListeners()}componentWillUnmount(){this.removeListeners()}render(){const e=this.props.className?"k-ripple-container "+this.props.className:"k-ripple-container";return i.createElement("span",{className:e,ref:e=>{this._element=e}},this.props.children,this.showLicenseWatermark&&i.createElement(o.WatermarkOverlay,null))}};p.propTypes={disabled:r.bool};let l=p;e.Ripple=l}));