class Foo extends HTMLElement {
__foo() {
}
}
const bar = klass => class SomethingMixin extends klass {
__bar(){
}
}
/**
* A text field web component
* @attr {Boolean} disabled - Disables this element
* @fires change - Dispatched when the text of the text field changes
* @slot - Default content placed inside of the text field
* @slot header - Content placed in the header of the text field
* @cssprop --placeholder-color - Controls the color of the placeholder
* @csspart placeholder - Placeholder css shadow part
*/
export class TextField extends bar(Foo) {
/**
* Size of the text field
* @attr
* @type {"small"|"large"}
*/
size = "large";
constructor() {
super();
this.value = "";
}
static get observedAttributes() {
return ["placeholder"];
}
onEnterKey() {
/**
* Dispatched when the enter key is pressed
*/
this.dispatchEvent(new CustomEvent("enter"));
}
}
customElements.define("text-field", TextField);
Given the following example:
The
exports
field will list:Even though neither
bar
norFoo
are technically exported