UNPKG

@taiga-ui/kit

Version:

Taiga UI Angular main components kit

1 lines 3.98 kB
{"version":3,"file":"taiga-ui-kit-components-badged-content.mjs","sources":["../../../projects/kit/components/badged-content/badged-content.directive.ts","../../../projects/kit/components/badged-content/badged-content.component.ts","../../../projects/kit/components/badged-content/badged-content.template.html","../../../projects/kit/components/badged-content/badge-content.ts","../../../projects/kit/components/badged-content/taiga-ui-kit-components-badged-content.ts"],"sourcesContent":["import {Directive, Input} from '@angular/core';\nimport type {TuiLooseUnion} from '@taiga-ui/cdk/types';\n\n@Directive({\n standalone: true,\n selector: '[tuiSlot]',\n})\nexport class TuiBadgedContentDirective {\n @Input()\n public tuiSlot: TuiLooseUnion<'bottom' | 'top'> = 'top';\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n} from '@angular/core';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\n\nimport {TuiBadgedContentDirective} from './badged-content.directive';\n\n@Component({\n standalone: true,\n selector: 'tui-badged-content',\n imports: [TuiBadgedContentDirective, WaResizeObserver],\n templateUrl: './badged-content.template.html',\n styleUrls: ['./badged-content.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiBadgedContentComponent {\n private readonly cdr = inject(ChangeDetectorRef);\n\n public onResize(): void {\n this.cdr.detectChanges();\n }\n}\n","<ng-content />\n\n<div\n #badgeTop\n class=\"t-badge t-badge_top\"\n [style.--t-badge-height.px]=\"badgeTop.offsetHeight\"\n (waResizeObserver)=\"onResize()\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='top']\" />\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='top']\" />\n </div>\n</div>\n\n<div\n #badgeBottom\n class=\"t-badge t-badge_bottom\"\n [style.--t-badge-height.px]=\"badgeBottom.offsetHeight\"\n (waResizeObserver)=\"onResize()\"\n>\n <ng-content select=\"tui-badge-notification[tuiSlot='bottom']\" />\n <div class=\"t-border\">\n <ng-content select=\"[tuiSlot='bottom']\" />\n </div>\n</div>\n","import {TuiBadgedContentComponent} from './badged-content.component';\nimport {TuiBadgedContentDirective} from './badged-content.directive';\n\nexport const TuiBadgedContent = [\n TuiBadgedContentDirective,\n TuiBadgedContentComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAIa,yBAAyB,CAAA;AAJtC,IAAA,WAAA,GAAA;QAMW,IAAO,CAAA,OAAA,GAAoC,KAAK,CAAC;AAC3D,KAAA;+GAHY,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,WAAW;AACxB,iBAAA,CAAA;8BAGU,OAAO,EAAA,CAAA;sBADb,KAAK;;;ACEV,MAQa,yBAAyB,CAAA;AARtC,IAAA,WAAA,GAAA;AASqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAKpD,KAAA;IAHU,QAAQ,GAAA;AACX,QAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;KAC5B;+GALQ,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA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