igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
58 lines • 2.58 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { html } from 'lit';
import { property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { addThemingController } from '../../theming/theming-controller.js';
import { addSlotController, setSlots } from '../common/controllers/slot.js';
import { registerComponent } from '../common/definitions/register.js';
import { partMap } from '../common/part-map.js';
import { IgcProgressBaseComponent } from './base.js';
import { styles } from './themes/linear/linear.progress.base.css.js';
import { styles as shared } from './themes/linear/shared/linear.progress.common.css.js';
import { all } from './themes/linear/themes.js';
class IgcLinearProgressComponent extends IgcProgressBaseComponent {
static register() {
registerComponent(IgcLinearProgressComponent);
}
constructor() {
super();
this._slots = addSlotController(this, {
slots: setSlots(),
});
this.striped = false;
this.labelAlign = 'top-start';
addThemingController(this, all);
}
render() {
const parts = {
fill: true,
striped: this.striped,
indeterminate: this.indeterminate,
[this.variant]: true,
};
return html `
<div part="base" style=${styleMap(this._styleInfo)}>
<div part="track">
<div part=${partMap(parts)}></div>
<div part=${partMap({ ...parts, secondary: true })}></div>
</div>
${this._renderDefaultSlot()}
</div>
`;
}
}
IgcLinearProgressComponent.tagName = 'igc-linear-progress';
IgcLinearProgressComponent.styles = [styles, shared];
export default IgcLinearProgressComponent;
__decorate([
property({ type: Boolean, reflect: true })
], IgcLinearProgressComponent.prototype, "striped", void 0);
__decorate([
property({ attribute: 'label-align', reflect: true })
], IgcLinearProgressComponent.prototype, "labelAlign", void 0);
//# sourceMappingURL=linear-progress.js.map