@universal-material/web
Version:
Material web components
29 lines • 1.02 kB
JavaScript
import { __decorate } from "tslib";
import { LitElement } from 'lit';
import { property } from 'lit/decorators.js';
import { UmFieldBase } from '../../field/field-base.js';
import { styles } from './text-field-base.styles.js';
export class UmTextFieldBase extends UmFieldBase {
static { this.formAssociated = true; }
static { this.styles = [UmFieldBase.styles, styles]; }
static { this.shadowRootOptions = {
...LitElement.shadowRootOptions,
delegatesFocus: true,
}; }
get form() {
return this.elementInternals.form;
}
constructor() {
super();
/**
* Whether the field is empty or not. This changes the behavior of the floating label when the field is not focused.
*/
this.empty = true;
this.placeholder = '';
this.elementInternals = this.attachInternals();
}
}
__decorate([
property({ reflect: true })
], UmTextFieldBase.prototype, "placeholder", void 0);
//# sourceMappingURL=text-field-base.js.map