Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Radio buttons technically go "active" whenever there is *any* keyboard interaction. This is not the
// UI we desire.
isSurfaceActive: () => false,
registerInteractionHandler: (evt, handler) => {
this.$refs.controlEl.addEventListener(evt, handler, applyPassive());
},
deregisterInteractionHandler: (evt, handler) => {
this.$refs.controlEl.removeEventListener(evt, handler, applyPassive());
},
computeBoundingRect: () => {
return this.$refs.root.getBoundingClientRect();
},
});
this.formField = new MDCFormFieldFoundation({
registerInteractionHandler: (type, handler) => {
this.$refs.labelEl &&
this.$refs.labelEl.addEventListener(type, handler);
},
deregisterInteractionHandler: (type, handler) => {
this.$refs.labelEl &&
this.$refs.labelEl.removeEventListener(type, handler);
},
activateInputRipple: () => {
this.ripple && this.ripple.activate();
},
deactivateInputRipple: () => {
this.ripple && this.ripple.deactivate();
},
});
// Radio buttons technically go "active" whenever there is *any* keyboard interaction. This is not the
// UI we desire.
isSurfaceActive: () => false,
registerInteractionHandler: (evt, handler) => {
this.$refs.controlEl.addEventListener(evt, handler, applyPassive());
},
deregisterInteractionHandler: (evt, handler) => {
this.$refs.controlEl.removeEventListener(evt, handler, applyPassive());
},
computeBoundingRect: () => {
return this.$refs.root.getBoundingClientRect();
},
});
this.formField = new MDCFormFieldFoundation({
registerInteractionHandler: (type, handler) => {
this.$refs.labelEl &&
this.$refs.labelEl.addEventListener(type, handler);
},
deregisterInteractionHandler: (type, handler) => {
this.$refs.labelEl &&
this.$refs.labelEl.removeEventListener(type, handler);
},
activateInputRipple: () => {
this.ripple && this.ripple.activate();
},
deactivateInputRipple: () => {
this.ripple && this.ripple.deactivate();
},
});
this.ripple = new RippleBase(this, {
isUnbounded: () => true,
isSurfaceActive: () => RippleBase.isSurfaceActive(this.$refs.control),
registerInteractionHandler: (evt, handler) => {
this.$refs.control.addEventListener(evt, handler, applyPassive());
},
deregisterInteractionHandler: (evt, handler) => {
this.$refs.control.removeEventListener(evt, handler, applyPassive());
},
computeBoundingRect: () => {
return this.$refs.root.getBoundingClientRect();
},
});
this.formField = new MDCFormFieldFoundation({
registerInteractionHandler: (type, handler) => {
this.$refs.label.addEventListener(type, handler);
},
deregisterInteractionHandler: (type, handler) => {
this.$refs.label.removeEventListener(type, handler);
},
activateInputRipple: () => {
this.ripple && this.ripple.activate();
},
deactivateInputRipple: () => {
this.ripple && this.ripple.deactivate();
},
});
this.foundation.init();
this.ripple.init();
this.ripple = new RippleBase(this, {
isUnbounded: () => true,
isSurfaceActive: () => RippleBase.isSurfaceActive(this.$refs.control),
registerInteractionHandler: (evt, handler) => {
this.$refs.control.addEventListener(evt, handler, applyPassive());
},
deregisterInteractionHandler: (evt, handler) => {
this.$refs.control.removeEventListener(evt, handler, applyPassive());
},
computeBoundingRect: () => {
return this.$refs.root.getBoundingClientRect();
},
});
this.formField = new MDCFormFieldFoundation({
registerInteractionHandler: (type, handler) => {
this.$refs.label.addEventListener(type, handler);
},
deregisterInteractionHandler: (type, handler) => {
this.$refs.label.removeEventListener(type, handler);
},
activateInputRipple: () => {
this.ripple && this.ripple.activate();
},
deactivateInputRipple: () => {
this.ripple && this.ripple.deactivate();
},
});
this.foundation.init();
this.ripple.init();