UNPKG

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.

76 lines 3.28 kB
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; }; var IgcIconButtonComponent_1; import { html } from 'lit'; import { property } from 'lit/decorators.js'; import { ifDefined } from 'lit/directives/if-defined.js'; import { themes } from '../../theming/theming-decorator.js'; import { blazorInclude } from '../common/decorators/blazorInclude.js'; import { registerComponent } from '../common/definitions/register.js'; import IgcIconComponent from '../icon/icon.js'; import { registerIconFromText as registerIconFromText_impl, registerIcon as registerIcon_impl, } from '../icon/icon.registry.js'; import { IgcButtonBaseComponent } from './button-base.js'; import { styles } from './themes/icon-button/icon-button.base.css.js'; import { styles as shared } from './themes/icon-button/shared/icon-button.common.css.js'; import { all } from './themes/icon-button/themes.js'; let IgcIconButtonComponent = IgcIconButtonComponent_1 = class IgcIconButtonComponent extends IgcButtonBaseComponent { constructor() { super(...arguments); this.mirrored = false; this.variant = 'contained'; } static register() { registerComponent(IgcIconButtonComponent_1, IgcIconComponent); } renderContent() { return html ` ${this.name || this.mirrored ? html ` <igc-icon part="icon" name=${ifDefined(this.name)} collection=${ifDefined(this.collection)} .mirrored=${this.mirrored} aria-hidden="true" ></igc-icon> <slot></slot> ` : html `<slot></slot>`} `; } async registerIcon(name, url, collection = 'default') { await registerIcon_impl(name, url, collection); } registerIconFromText(name, iconText, collection = 'default') { registerIconFromText_impl(name, iconText, collection); } }; IgcIconButtonComponent.tagName = 'igc-icon-button'; IgcIconButtonComponent.styles = [styles, shared]; __decorate([ property() ], IgcIconButtonComponent.prototype, "name", void 0); __decorate([ property() ], IgcIconButtonComponent.prototype, "collection", void 0); __decorate([ property({ type: Boolean }) ], IgcIconButtonComponent.prototype, "mirrored", void 0); __decorate([ property({ reflect: true }) ], IgcIconButtonComponent.prototype, "variant", void 0); __decorate([ blazorInclude() ], IgcIconButtonComponent.prototype, "registerIcon", null); __decorate([ blazorInclude() ], IgcIconButtonComponent.prototype, "registerIconFromText", null); IgcIconButtonComponent = IgcIconButtonComponent_1 = __decorate([ themes(all) ], IgcIconButtonComponent); export default IgcIconButtonComponent; //# sourceMappingURL=icon-button.js.map