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.
52 lines • 2.49 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;
};
var IgcCarouselIndicatorContainerComponent_1;
import { LitElement, html } from 'lit';
import { themes } from '../../theming/theming-decorator.js';
import { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';
import { registerComponent } from '../common/definitions/register.js';
import { partNameMap } from '../common/util.js';
import IgcCarouselIndicatorComponent from './carousel-indicator.js';
import { styles } from './themes/carousel-indicator-container.base.css.js';
import { all } from './themes/indicator-container.js';
import { styles as shared } from './themes/shared/indicator-container/indicator-container.common.css.js';
let IgcCarouselIndicatorContainerComponent = IgcCarouselIndicatorContainerComponent_1 = class IgcCarouselIndicatorContainerComponent extends LitElement {
constructor() {
super(...arguments);
this._kbFocus = addKeyboardFocusRing(this);
}
static register() {
registerComponent(IgcCarouselIndicatorContainerComponent_1);
}
handleFocusOut(event) {
const target = event.relatedTarget;
if (!target?.matches(IgcCarouselIndicatorComponent.tagName)) {
this._kbFocus.reset();
}
}
render() {
return html `
<div
part=${partNameMap({
base: true,
focused: this._kbFocus.focused,
})}
@click=${this._kbFocus.reset}
@focusout=${this.handleFocusOut}
>
<slot></slot>
</div>
`;
}
};
IgcCarouselIndicatorContainerComponent.tagName = 'igc-carousel-indicator-container';
IgcCarouselIndicatorContainerComponent.styles = [styles, shared];
IgcCarouselIndicatorContainerComponent = IgcCarouselIndicatorContainerComponent_1 = __decorate([
themes(all)
], IgcCarouselIndicatorContainerComponent);
export default IgcCarouselIndicatorContainerComponent;
//# sourceMappingURL=carousel-indicator-container.js.map