UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

62 lines (61 loc) 1.94 kB
/** * DevExtreme (esm/__internal/ui/button/ink_ripple.js) * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; const _excluded = ["config"]; import { createVNode, normalizeProps } from "inferno"; import { hideWave, initConfig, showWave } from "../../../ui/widget/utils.ink_ripple"; import { BaseInfernoComponent } from "../../core/r1/runtime/inferno/index"; export const defaultInkRippleProps = { config: {} }; export class InkRipple extends BaseInfernoComponent { constructor(props) { super(props); this.__getterCache = {}; this.state = {}; this.hideWave = this.hideWave.bind(this); this.showWave = this.showWave.bind(this) } get getConfig() { if (void 0 === this.__getterCache.getConfig) { this.__getterCache.getConfig = initConfig(this.props.config) } return this.__getterCache.getConfig } get restAttributes() { const _this$props = this.props, restProps = _objectWithoutPropertiesLoose(_this$props, _excluded); return restProps } hideWave(opts) { hideWave(this.getConfig, opts) } showWave(opts) { showWave(this.getConfig, opts) } componentWillUpdate(nextProps) { if (this.props.config !== nextProps.config) { this.__getterCache.getConfig = void 0 } } render() { return normalizeProps(createVNode(1, "div", "dx-inkripple", null, 1, _extends({}, this.restAttributes))) } } InkRipple.defaultProps = defaultInkRippleProps;