UNPKG

@progress/kendo-angular-navigation

Version:

Kendo UI Navigation for Angular

70 lines (69 loc) 3.02 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, HostBinding, Input, Renderer2, ElementRef } from '@angular/core'; import { isPresent } from '../common/util'; import * as i0 from "@angular/core"; /** * Represents the [Kendo UI AppBarSpacer component for Angular]({% slug contentarrangement_appbar %}#toc-spacings). * * Use the AppBarSpacer component to add white space between AppBar sections and customize its width. * * @example * ```html * <kendo-appbar> * <kendo-appbar-section> * <button kendoButton fillMode="flat" [svgIcon]="menuIcon"></button> * </kendo-appbar-section> * * <kendo-appbar-spacer></kendo-appbar-spacer> * * <kendo-appbar-section> * <h2>Page Title</h2> * </kendo-appbar-section> * </kendo-appbar> * ``` */ export class AppBarSpacerComponent { renderer; element; hostClass = true; get sizedClass() { return isPresent(this.width); } /** * Specifies the width of the AppBarSpacer. * * If not set, the AppBarSpacer will take all of the available space. */ width; constructor(renderer, element) { this.renderer = renderer; this.element = element; } ngAfterViewInit() { if (isPresent(this.width)) { const element = this.element.nativeElement; this.renderer.setStyle(element, 'flexBasis', this.width); } } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AppBarSpacerComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AppBarSpacerComponent, isStandalone: true, selector: "kendo-appbar-spacer", inputs: { width: "width" }, host: { properties: { "class.k-spacer": "this.hostClass", "class.k-spacer-sized": "this.sizedClass" } }, ngImport: i0, template: ``, isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AppBarSpacerComponent, decorators: [{ type: Component, args: [{ selector: 'kendo-appbar-spacer', template: ``, standalone: true }] }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { hostClass: [{ type: HostBinding, args: ['class.k-spacer'] }], sizedClass: [{ type: HostBinding, args: ['class.k-spacer-sized'] }], width: [{ type: Input }] } });