How to use @material/line-ripple - 10 common examples

To help you get started, we’ve selected a few @material/line-ripple examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pgbross / vue-material-adapter / packages / mcwv-line-ripple / mdc-line-ripple.js View on Github external
this.$set(this.lineClasses, className, true);
      },
      removeClass: className => {
        this.$delete(this.lineClasses, className);
      },
      hasClass: className => {
        return Boolean(this.lineClasses[className]);
      },
      setStyle: (name, value) => {
        this.$set(this.lineStyles, name, value);
      },
    };

    // note: do not call the property 'foundation' as the tests will then
    // expext all methods to be implemented, and we handle transitionend locally
    this.foundation_ = new MDCLineRippleFoundation(adapter);
    this.foundation_.init();
  },
github pgbross / vue-material-adapter / packages / mcwv-line-ripple / line-ripple.js View on Github external
this.$set(this.lineClasses, className, true);
      },
      removeClass: className => {
        this.$delete(this.lineClasses, className);
      },
      hasClass: className => {
        return Boolean(this.lineClasses[className]);
      },
      setStyle: (name, value) => {
        this.$set(this.lineStyles, name, value);
      },
    };

    // note: do not call the property 'foundation' as the tests will then
    // expext all methods to be implemented, and we handle transitionend locally
    this.foundation_ = new MDCLineRippleFoundation(adapter);
    this.foundation_.init();
  },
github matsp / material-components-vue / components / line-ripple / LineRipple.vue View on Github external
mounted () {
    if (!(this.getLineRipple instanceof Function)) { // can not be init by parent
      this.mdcLineRipple = MDCLineRipple.attachTo(this.$el)
      if (this.rippleCenter) this.setRippleCenter(this.rippleCenter)
    }
  },
  beforeDestroy () {
github material-components / material-components-web-components / packages / line-ripple / src / mwc-line-ripple-directive.ts View on Github external
export const lineRipple = directive(() => (part: PropertyPart) => {
  const lastFoundation = partToFoundationMap.get(part);
  if (!lastFoundation) {
    const lineElement = part.committer.element as LineRipple;
    lineElement.classList.add('mdc-line-ripple');
    const adapter = createAdapter(lineElement);
    const foundation = new MDCLineRippleFoundation(adapter);
    foundation.init();
    part.setValue(foundation);
    partToFoundationMap.set(part, foundation);
  }
});
github material-components / material-components-web-react / packages / line-ripple / index.tsx View on Github external
componentDidMount() {
    this.foundation_ = new MDCLineRippleFoundation(this.adapter);
    this.foundation_.init();
    if (this.props.active) {
      this.foundation_.activate();
    }
  }
github SpringflowNL / aurelia-mdc-elements / node_modules / @material / select / component.js View on Github external
        if (lineRippleFactory === void 0) { lineRippleFactory = function (el) { return new MDCLineRipple(el); }; }
        if (outlineFactory === void 0) { outlineFactory = function (el) { return new MDCNotchedOutline(el); }; }
github SpringflowNL / aurelia-mdc-elements / node_modules / @material / textfield / component.js View on Github external
        if (lineRippleFactory === void 0) { lineRippleFactory = function (el) { return new MDCLineRipple(el); }; }
        if (helperTextFactory === void 0) { helperTextFactory = function (el) { return new MDCTextFieldHelperText(el); }; }
github material-components / material-components-web / packages / mdc-select / component.ts View on Github external
      lineRippleFactory: MDCLineRippleFactory = (el) => new MDCLineRipple(el),
      outlineFactory: MDCNotchedOutlineFactory = (el) => new MDCNotchedOutline(el),
github material-components / material-components-web / packages / mdc-textfield / component.ts View on Github external
      lineRippleFactory: MDCLineRippleFactory = (el) => new MDCLineRipple(el),
      helperTextFactory: MDCTextFieldHelperTextFactory = (el) => new MDCTextFieldHelperText(el),
github jamesmfriedman / rmwc / src / line-ripple / index.tsx View on Github external
getDefaultFoundation() {
    return new MDCLineRippleFoundation({
      addClass: (className: string) => this.root.addClass(className),
      removeClass: (className: string) => this.root.removeClass(className),
      hasClass: (className: string) => this.root.hasClass(className),
      setStyle: (propertyName: any, value: any) =>
        this.root.setStyle(propertyName, value),
      registerEventHandler: (
        evtType: K,
        handler: SpecificEventListener
      ) => this.root.addEventListener(evtType, handler),
      deregisterEventHandler: (
        evtType: K,
        handler: SpecificEventListener
      ) => this.root.removeEventListener(evtType, handler)
    });
  }