@universal-material/web
Version:
Material web components
44 lines (43 loc) • 1.36 kB
JavaScript
import { __decorate } from "tslib";
import { css, html } from 'lit';
import { property } from 'lit/decorators.js';
// @ts-ignore
export const mixinSelectionControlListItem = (base) => {
// @ts-ignore
class SelectionControlListItem extends base {
constructor() {
super(...arguments);
this.leading = false;
this.inputDescribedById = 'description';
this.inputLabelledById = 'label';
}
static { this.styles = [
base.styles ?? [],
css `
:host {
--u-list-item-block-padding: 0;
display: block;
}
:host(:not([disabled])) {
cursor: pointer;
}
`,
]; }
render() {
return html `
<label>
<u-list-item ?selectable=${!this.disabled}>
<div slot="${this.leading ? 'leading' : 'trailing'}">${super.render()}</div>
<span id="label"><slot></slot></span>
<span id="description" slot="supporting-text"><slot name="supporting-text"></slot></span>
</u-list-item>
</label>
`;
}
}
__decorate([
property({ type: Boolean })
], SelectionControlListItem.prototype, "leading", void 0);
return SelectionControlListItem;
};
//# sourceMappingURL=selection-control-list-item.js.map