@taiga-ui/kit 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/calendar-range/calendar-range.component.d.ts +16 -6
- package/components/preview/preview.component.d.ts +1 -1
- package/directives/button-close/index.d.ts +0 -1
- package/directives/icon-badge/icon-badge.directive.d.ts +9 -0
- package/directives/icon-badge/index.d.ts +1 -0
- package/directives/index.d.ts +1 -0
- package/esm2022/components/calendar-range/calendar-range.component.mjs +37 -41
- package/esm2022/components/carousel/carousel.component.mjs +3 -3
- package/esm2022/components/checkbox/checkbox.component.mjs +2 -2
- package/esm2022/components/files/input-files/input-files.directive.mjs +6 -3
- package/esm2022/components/items-with-more/items-with-more.service.mjs +3 -3
- package/esm2022/components/pagination/pagination.component.mjs +2 -2
- package/esm2022/components/preview/preview.component.mjs +4 -6
- package/esm2022/components/push/push-alert.component.mjs +3 -3
- package/esm2022/components/radio/radio.component.mjs +2 -2
- package/esm2022/components/range/range-change.directive.mjs +5 -5
- package/esm2022/components/range/range.component.mjs +3 -3
- package/esm2022/components/slider/helpers/key-steps.mjs +3 -2
- package/esm2022/components/slider/helpers/slider-key-steps.directive.mjs +2 -2
- package/esm2022/components/switch/switch.component.mjs +3 -3
- package/esm2022/components/tabs/tabs-with-more.component.mjs +7 -6
- package/esm2022/components/tiles/tiles.component.mjs +3 -3
- package/esm2022/directives/button-close/button-close.directive.mjs +5 -6
- package/esm2022/directives/button-close/index.mjs +1 -2
- package/esm2022/directives/icon-badge/icon-badge.directive.mjs +41 -0
- package/esm2022/directives/icon-badge/index.mjs +2 -0
- package/esm2022/directives/icon-badge/taiga-ui-kit-directives-icon-badge.mjs +5 -0
- package/esm2022/directives/index.mjs +2 -1
- package/esm2022/directives/lazy-loading/lazy-loading.service.mjs +2 -2
- package/esm2022/directives/sensitive/sensitive.directive.mjs +5 -5
- package/esm2022/directives/skeleton/skeleton.directive.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +36 -40
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +5 -2
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview.mjs +3 -5
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-push.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio.mjs +1 -1
- package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-range.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +3 -2
- package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-switch.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tabs.mjs +6 -5
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs +5 -8
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs +47 -0
- package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +1 -1
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +4 -4
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +1 -1
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives.mjs +1 -0
- package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
- package/package.json +10 -4
- package/directives/button-close/button-close.options.d.ts +0 -1
- package/esm2022/directives/button-close/button-close.options.mjs +0 -3
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive } from '@angular/core';
|
|
2
|
+
import { inject, Directive } from '@angular/core';
|
|
3
3
|
import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
|
|
4
|
-
import { TUI_ICON_START } from '@taiga-ui/core/tokens';
|
|
5
|
-
import { tuiCreateToken } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
6
|
-
|
|
7
|
-
const TUI_BUTTON_CLOSE_ICON = tuiCreateToken('@tui.x');
|
|
4
|
+
import { TUI_ICON_START, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
8
5
|
|
|
9
6
|
class TuiButtonClose {
|
|
10
7
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiButtonClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -12,7 +9,7 @@ class TuiButtonClose {
|
|
|
12
9
|
tuiButtonOptionsProvider({ appearance: 'neutral', size: 's' }),
|
|
13
10
|
{
|
|
14
11
|
provide: TUI_ICON_START,
|
|
15
|
-
|
|
12
|
+
useFactory: () => inject(TUI_COMMON_ICONS).close,
|
|
16
13
|
},
|
|
17
14
|
], ngImport: i0 }); }
|
|
18
15
|
}
|
|
@@ -25,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
25
22
|
tuiButtonOptionsProvider({ appearance: 'neutral', size: 's' }),
|
|
26
23
|
{
|
|
27
24
|
provide: TUI_ICON_START,
|
|
28
|
-
|
|
25
|
+
useFactory: () => inject(TUI_COMMON_ICONS).close,
|
|
29
26
|
},
|
|
30
27
|
],
|
|
31
28
|
host: {
|
|
@@ -39,5 +36,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
39
36
|
* Generated bundle index. Do not edit.
|
|
40
37
|
*/
|
|
41
38
|
|
|
42
|
-
export {
|
|
39
|
+
export { TuiButtonClose };
|
|
43
40
|
//# sourceMappingURL=taiga-ui-kit-directives-button-close.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-button-close.mjs","sources":["../../../projects/kit/directives/button-close/button-close.
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-button-close.mjs","sources":["../../../projects/kit/directives/button-close/button-close.directive.ts","../../../projects/kit/directives/button-close/taiga-ui-kit-directives-button-close.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TUI_COMMON_ICONS, TUI_ICON_START} from '@taiga-ui/core/tokens';\n\n@Directive({\n standalone: true,\n selector: '[tuiIconButton][tuiButtonClose]',\n providers: [\n tuiButtonOptionsProvider({appearance: 'neutral', size: 's'}),\n {\n provide: TUI_ICON_START,\n useFactory: () => inject(TUI_COMMON_ICONS).close,\n },\n ],\n host: {\n '[style.--t-radius.%]': '100',\n '[style.--tui-height-s.rem]': '1.875',\n },\n})\nexport class TuiButtonClose {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4B,EAAE,OAAO;AACxC,qBAAA;AACJ,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, signal, Directive, Input } from '@angular/core';
|
|
3
|
+
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
|
+
import { TuiIcon } from '@taiga-ui/core/components/icon';
|
|
5
|
+
|
|
6
|
+
class TuiIconBadgeStyles {
|
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIconBadgeStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiIconBadgeStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-icon-badge" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiIconBadge]:before{content:\"\";position:absolute;right:.143em;bottom:.143em;display:var(--t-icon-badge, none);width:.57em;height:.57em;transform:translate(50%,50%);-webkit-mask:var(--t-icon-badge) no-repeat center / contain;mask:var(--t-icon-badge) no-repeat center / contain;background:currentColor}[tuiIconBadge][style*=\"--t-icon-badge:\"]:after{-webkit-mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),black .4em);mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),black .4em)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIconBadgeStyles, decorators: [{
|
|
11
|
+
type: Component,
|
|
12
|
+
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
13
|
+
class: 'tui-icon-badge',
|
|
14
|
+
}, styles: ["[tuiIconBadge]:before{content:\"\";position:absolute;right:.143em;bottom:.143em;display:var(--t-icon-badge, none);width:.57em;height:.57em;transform:translate(50%,50%);-webkit-mask:var(--t-icon-badge) no-repeat center / contain;mask:var(--t-icon-badge) no-repeat center / contain;background:currentColor}[tuiIconBadge][style*=\"--t-icon-badge:\"]:after{-webkit-mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),black .4em);mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),black .4em)}\n"] }]
|
|
15
|
+
}] });
|
|
16
|
+
class TuiIconBadge {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.icon = inject(TuiIcon);
|
|
19
|
+
this.nothing = tuiWithStyles(TuiIconBadgeStyles);
|
|
20
|
+
this.badgeSrc = signal(null);
|
|
21
|
+
}
|
|
22
|
+
set badge(icon) {
|
|
23
|
+
this.badgeSrc.set(this.icon.resolve(icon));
|
|
24
|
+
}
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIconBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
26
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiIconBadge, isStandalone: true, selector: "tui-icon[badge]", inputs: { badge: "badge" }, host: { attributes: { "tuiIconBadge": "" }, properties: { "style.--t-icon-badge": "badgeSrc()" } }, ngImport: i0 }); }
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIconBadge, decorators: [{
|
|
29
|
+
type: Directive,
|
|
30
|
+
args: [{
|
|
31
|
+
standalone: true,
|
|
32
|
+
selector: 'tui-icon[badge]',
|
|
33
|
+
host: {
|
|
34
|
+
tuiIconBadge: '',
|
|
35
|
+
'[style.--t-icon-badge]': 'badgeSrc()',
|
|
36
|
+
},
|
|
37
|
+
}]
|
|
38
|
+
}], propDecorators: { badge: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}] } });
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Generated bundle index. Do not edit.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
export { TuiIconBadge };
|
|
47
|
+
//# sourceMappingURL=taiga-ui-kit-directives-icon-badge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-icon-badge.mjs","sources":["../../../projects/kit/directives/icon-badge/icon-badge.directive.ts","../../../projects/kit/directives/icon-badge/taiga-ui-kit-directives-icon-badge.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./icon-badge.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-icon-badge',\n },\n})\nclass TuiIconBadgeStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[badge]',\n host: {\n tuiIconBadge: '',\n '[style.--t-icon-badge]': 'badgeSrc()',\n },\n})\nexport class TuiIconBadge {\n private readonly icon = inject(TuiIcon);\n\n protected readonly nothing = tuiWithStyles(TuiIconBadgeStyles);\n protected readonly badgeSrc = signal<string | null>(null);\n\n @Input()\n public set badge(icon: string) {\n this.badgeSrc.set(this.icon.resolve(icon));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA,MAUM,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA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GAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,cAAA,EAAA,EAAA,EAAA,EAAA,UAAA,EAAA,EAAA,sBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACF,wBAAA,YAAY,EAAE,EAAE;AAChB,wBAAA,wBAAwB,EAAE,YAAY;AACzC,qBAAA;AACJ,iBAAA,CAAA;8BAQc,KAAK,EAAA,CAAA;sBADf,KAAK;;;ACtCV;;AAEG;;;;"}
|
|
@@ -11,7 +11,7 @@ class TuiLazyLoadingService extends Observable {
|
|
|
11
11
|
super((subscriber) => this.stream$.subscribe(subscriber));
|
|
12
12
|
this.src$ = new Subject();
|
|
13
13
|
this.intersections$ = inject(IntersectionObserverService);
|
|
14
|
-
this.stream$ = this.src$.pipe(switchMap((src) => this.intersections$.pipe(filter((
|
|
14
|
+
this.stream$ = this.src$.pipe(switchMap((src) => this.intersections$.pipe(filter((entry) => !!entry[0]?.isIntersecting), map(() => src), take(1))), tuiWatch(inject(ChangeDetectorRef)));
|
|
15
15
|
}
|
|
16
16
|
next(src) {
|
|
17
17
|
this.src$.next(src);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.mjs","sources":["../../../projects/kit/directives/lazy-loading/lazy-loading.service.ts","../../../projects/kit/directives/lazy-loading/lazy-loading.directive.ts","../../../projects/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {ChangeDetectorRef, inject, Injectable} from '@angular/core';\nimport type {SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {filter, map, Observable, Subject, switchMap, take} from 'rxjs';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<SafeResourceUrl | string> {\n private readonly src$ = new Subject<SafeResourceUrl | string>();\n private readonly intersections$ = inject(IntersectionObserverService);\n private readonly stream$ = this.src$.pipe(\n switchMap((src) =>\n this.intersections$.pipe(\n filter((
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-lazy-loading.mjs","sources":["../../../projects/kit/directives/lazy-loading/lazy-loading.service.ts","../../../projects/kit/directives/lazy-loading/lazy-loading.directive.ts","../../../projects/kit/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.ts"],"sourcesContent":["import {ChangeDetectorRef, inject, Injectable} from '@angular/core';\nimport type {SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {filter, map, Observable, Subject, switchMap, take} from 'rxjs';\n\n@Injectable()\nexport class TuiLazyLoadingService extends Observable<SafeResourceUrl | string> {\n private readonly src$ = new Subject<SafeResourceUrl | string>();\n private readonly intersections$ = inject(IntersectionObserverService);\n private readonly stream$ = this.src$.pipe(\n switchMap((src) =>\n this.intersections$.pipe(\n filter((entry) => !!entry[0]?.isIntersecting),\n map(() => src),\n take(1),\n ),\n ),\n tuiWatch(inject(ChangeDetectorRef)),\n );\n\n constructor() {\n super((subscriber) => this.stream$.subscribe(subscriber));\n }\n\n public next(src: SafeResourceUrl | string): void {\n this.src$.next(src);\n }\n}\n","import {Directive, inject, Input} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport type {SafeResourceUrl} from '@angular/platform-browser';\nimport {IntersectionObserverService} from '@ng-web-apis/intersection-observer';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiLazyLoadingService} from './lazy-loading.service';\n\n@Directive({\n standalone: true,\n selector: 'img[loading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService],\n host: {\n '[style.animation]': 'animation',\n '[style.background]': 'background',\n '[attr.src]': 'src',\n '(load)': 'onLoad()',\n },\n})\nexport class TuiImgLazyLoading {\n private readonly el = tuiInjectElement<HTMLImageElement>();\n private readonly src$ = inject(TuiLazyLoadingService);\n protected animation = 'tuiSkeletonVibe ease-in-out 1s infinite alternate';\n protected background = 'var(--tui-background-neutral-2)';\n protected src: SafeResourceUrl | string | null = null;\n\n constructor() {\n if (this.supported) {\n return;\n }\n\n this.src$.pipe(takeUntilDestroyed()).subscribe((src) => {\n this.src = src;\n });\n }\n\n @Input('src')\n public set srcSetter(src: SafeResourceUrl | string) {\n this.src = this.supported ? src : null;\n this.src$.next(src);\n }\n\n protected onLoad(): void {\n this.background = '';\n this.animation = '';\n }\n\n private get supported(): boolean {\n return 'loading' in this.el;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAMA,MACa,qBAAsB,SAAQ,UAAoC,CAAA;AAc3E,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAd7C,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,OAAO,EAA4B,CAAC;AAC/C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AACrD,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CACrC,SAAS,CAAC,CAAC,GAAG,KACV,IAAI,CAAC,cAAc,CAAC,IAAI,CACpB,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC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;AACJ,iBAAA,CAAA;0EAmBc,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK,CAAA;;;ACpChB;;AAEG;;;;"}
|
|
@@ -21,10 +21,10 @@ class TuiSensitive {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
this.nothing = tuiWithStyles(TuiSensitiveStyles);
|
|
23
23
|
this.offset = Math.round(Math.random() * 10) * 10;
|
|
24
|
-
this.height = toSignal(inject(ResizeObserverService, { self: true }).pipe(map((
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
this.height = toSignal(inject(ResizeObserverService, { self: true }).pipe(map((entry) => {
|
|
25
|
+
const height = entry[0]?.contentRect.height ?? 0;
|
|
26
|
+
return [Math.max(2, Math.floor(height / 16) + 1), height];
|
|
27
|
+
}), map(([rows, height]) => height * (rowsInSvg / rows)), tuiZonefull(inject(NgZone)), tuiWatch(inject(ChangeDetectorRef))));
|
|
28
28
|
this.tuiSensitive = false;
|
|
29
29
|
}
|
|
30
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSensitive, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-sensitive.mjs","sources":["../../../projects/kit/directives/sensitive/sensitive.directive.ts","../../../projects/kit/directives/sensitive/taiga-ui-kit-directives-sensitive.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n inject,\n Input,\n NgZone,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiWatch, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {map} from 'rxjs';\n\nconst rowsInSvg = 3;\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./sensitive.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-sensitive-styles',\n },\n})\nclass TuiSensitiveStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSensitive]',\n providers: [ResizeObserverService],\n host: {\n '[style.--t-offset.px]': 'offset',\n '[style.--t-mask-height.px]': 'height()',\n '[class.tui-sensitive]': 'tuiSensitive',\n },\n})\nexport class TuiSensitive {\n protected readonly nothing = tuiWithStyles(TuiSensitiveStyles);\n protected readonly offset = Math.round(Math.random() * 10) * 10;\n\n protected readonly height = toSignal(\n inject(ResizeObserverService, {self: true}).pipe(\n map(([
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-sensitive.mjs","sources":["../../../projects/kit/directives/sensitive/sensitive.directive.ts","../../../projects/kit/directives/sensitive/taiga-ui-kit-directives-sensitive.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n inject,\n Input,\n NgZone,\n ViewEncapsulation,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiWatch, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {map} from 'rxjs';\n\nconst rowsInSvg = 3;\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./sensitive.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-sensitive-styles',\n },\n})\nclass TuiSensitiveStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSensitive]',\n providers: [ResizeObserverService],\n host: {\n '[style.--t-offset.px]': 'offset',\n '[style.--t-mask-height.px]': 'height()',\n '[class.tui-sensitive]': 'tuiSensitive',\n },\n})\nexport class TuiSensitive {\n protected readonly nothing = tuiWithStyles(TuiSensitiveStyles);\n protected readonly offset = Math.round(Math.random() * 10) * 10;\n\n protected readonly height = toSignal(\n inject(ResizeObserverService, {self: true}).pipe(\n map((entry): [number, number] => {\n const height = entry[0]?.contentRect.height ?? 0;\n\n return [Math.max(2, Math.floor(height / 16) + 1), height];\n }),\n map(([rows, height]) => height * (rowsInSvg / rows)),\n tuiZonefull(inject(NgZone)),\n tuiWatch(inject(ChangeDetectorRef)),\n ),\n );\n\n @Input()\n public tuiSensitive: boolean | null = false;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAgBA,MAAM,SAAS,GAAG,CAAC,CAAC;AAEpB,MAUM,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,0HARV,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,msNAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAQV,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAVvB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,EAAE,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACF,wBAAA,KAAK,EAAE,sBAAsB;AAChC,qBAAA,EAAA,MAAA,EAAA,CAAA,msNAAA,CAAA,EAAA,CAAA;;AAIL,MAUa,YAAY,CAAA;AAVzB,IAAA,WAAA,GAAA;AAWuB,QA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AAA,EAPV,CAAC,qBAAqB,CAAC,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAOzB,YAAY,EAAA,UAAA,EAAA,CAAA;kBAVxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,SAAS,EAAE,CAAC,qBAAqB,CAAC;AAClC,oBAAA,IAAI,EAAE;AACF,wBAAA,uBAAuB,EAAE,QAAQ;AACjC,wBAAA,4BAA4B,EAAE,UAAU;AACxC,wBAAA,uBAAuB,EAAE,cAAc;AAC1C,qBAAA;AACJ,iBAAA,CAAA;8BAmBU,YAAY,EAAA,CAAA;sBADlB,KAAK;;;ACzDV;;AAEG;;;;"}
|
|
@@ -27,7 +27,7 @@ class TuiSkeleton {
|
|
|
27
27
|
}
|
|
28
28
|
ngOnChanges({ tuiSkeleton }) {
|
|
29
29
|
this.animation?.cancel();
|
|
30
|
-
if (!tuiSkeleton
|
|
30
|
+
if (!tuiSkeleton?.currentValue && !tuiSkeleton?.firstChange) {
|
|
31
31
|
this.animation = this.el.animate(FADE, this.duration);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-skeleton.mjs","sources":["../../../projects/kit/directives/skeleton/skeleton.directive.ts","../../../projects/kit/directives/skeleton/taiga-ui-kit-directives-skeleton.ts"],"sourcesContent":["import type {OnChanges, SimpleChanges} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPure, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {TUI_ANIMATIONS_DEFAULT_DURATION} from '@taiga-ui/core/utils/miscellaneous';\n\nconst FADE = [{opacity: 0.06}, {opacity: 1}];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./skeleton.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-skeleton-styles',\n },\n})\nclass TuiSkeletonStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSkeleton]',\n host: {\n tuiSkeleton: '',\n '[class._skeleton]': 'tuiSkeleton',\n '[attr.data-tui-skeleton]': 'getPlaceholder(tuiSkeleton)',\n },\n})\nexport class TuiSkeleton implements OnChanges {\n private animation?: Animation;\n private readonly el = tuiInjectElement();\n private readonly duration =\n inject(TUI_ANIMATIONS_SPEED) * TUI_ANIMATIONS_DEFAULT_DURATION * 2;\n\n protected readonly nothing = tuiWithStyles(TuiSkeletonStyles);\n\n @Input()\n public tuiSkeleton: boolean | number | string = false;\n\n public ngOnChanges({tuiSkeleton}: SimpleChanges): void {\n this.animation?.cancel();\n\n if (!tuiSkeleton
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-skeleton.mjs","sources":["../../../projects/kit/directives/skeleton/skeleton.directive.ts","../../../projects/kit/directives/skeleton/taiga-ui-kit-directives-skeleton.ts"],"sourcesContent":["import type {OnChanges, SimpleChanges} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPure, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {TUI_ANIMATIONS_DEFAULT_DURATION} from '@taiga-ui/core/utils/miscellaneous';\n\nconst FADE = [{opacity: 0.06}, {opacity: 1}];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./skeleton.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-skeleton-styles',\n },\n})\nclass TuiSkeletonStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiSkeleton]',\n host: {\n tuiSkeleton: '',\n '[class._skeleton]': 'tuiSkeleton',\n '[attr.data-tui-skeleton]': 'getPlaceholder(tuiSkeleton)',\n },\n})\nexport class TuiSkeleton implements OnChanges {\n private animation?: Animation;\n private readonly el = tuiInjectElement();\n private readonly duration =\n inject(TUI_ANIMATIONS_SPEED) * TUI_ANIMATIONS_DEFAULT_DURATION * 2;\n\n protected readonly nothing = tuiWithStyles(TuiSkeletonStyles);\n\n @Input()\n public tuiSkeleton: boolean | number | string = false;\n\n public ngOnChanges({tuiSkeleton}: SimpleChanges): void {\n this.animation?.cancel();\n\n if (!tuiSkeleton?.currentValue && !tuiSkeleton?.firstChange) {\n this.animation = this.el.animate(FADE, this.duration);\n }\n }\n\n @tuiPure\n protected getPlaceholder(value: boolean | number | string): string | null {\n switch (typeof value) {\n case 'number':\n return Array.from({length: value})\n .map(() => CHAR_NO_BREAK_SPACE.repeat(getLength()))\n .join(' ');\n case 'string':\n return value;\n default:\n return null;\n }\n }\n}\n\nfunction getLength(): number {\n return Math.floor(Math.random() * (15 - 5 + 1)) + 5;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAeA,MAAM,IAAI,GAAG,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,EAAE,EAAC,OAAO,EAAE,CAAC,EAAC,CAAC,CAAC;AAE7C,MAUM,iBAAiB,CAAA;+GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,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ADjB,KAAK;gBAYI,cAAc,EAAA,EAAA,EAAA,EAAA,CAAA,CAAA;AAc5B,SAAS,SAAS,GAAA;AACd,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACxD;;AC1EA;;AAEG;;;;"}
|
|
@@ -7,6 +7,7 @@ export * from '@taiga-ui/kit/directives/data-list-dropdown-manager';
|
|
|
7
7
|
export * from '@taiga-ui/kit/directives/fade';
|
|
8
8
|
export * from '@taiga-ui/kit/directives/fluid-typography';
|
|
9
9
|
export * from '@taiga-ui/kit/directives/highlight';
|
|
10
|
+
export * from '@taiga-ui/kit/directives/icon-badge';
|
|
10
11
|
export * from '@taiga-ui/kit/directives/lazy-loading';
|
|
11
12
|
export * from '@taiga-ui/kit/directives/present';
|
|
12
13
|
export * from '@taiga-ui/kit/directives/sensitive';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives.mjs","sources":["../../../projects/kit/directives/taiga-ui-kit-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives.mjs","sources":["../../../projects/kit/directives/taiga-ui-kit-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/kit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Taiga UI Angular main components kit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -377,6 +377,12 @@
|
|
|
377
377
|
"esm": "./esm2022/directives/highlight/taiga-ui-kit-directives-highlight.mjs",
|
|
378
378
|
"default": "./fesm2022/taiga-ui-kit-directives-highlight.mjs"
|
|
379
379
|
},
|
|
380
|
+
"./directives/icon-badge": {
|
|
381
|
+
"types": "./directives/icon-badge/index.d.ts",
|
|
382
|
+
"esm2022": "./esm2022/directives/icon-badge/taiga-ui-kit-directives-icon-badge.mjs",
|
|
383
|
+
"esm": "./esm2022/directives/icon-badge/taiga-ui-kit-directives-icon-badge.mjs",
|
|
384
|
+
"default": "./fesm2022/taiga-ui-kit-directives-icon-badge.mjs"
|
|
385
|
+
},
|
|
380
386
|
"./directives/lazy-loading": {
|
|
381
387
|
"types": "./directives/lazy-loading/index.d.ts",
|
|
382
388
|
"esm2022": "./esm2022/directives/lazy-loading/taiga-ui-kit-directives-lazy-loading.mjs",
|
|
@@ -481,9 +487,9 @@
|
|
|
481
487
|
"@ng-web-apis/intersection-observer": "^4.2.1",
|
|
482
488
|
"@ng-web-apis/mutation-observer": "^4.2.1",
|
|
483
489
|
"@ng-web-apis/resize-observer": "^4.2.1",
|
|
484
|
-
"@taiga-ui/cdk": "^4.
|
|
485
|
-
"@taiga-ui/core": "^4.
|
|
486
|
-
"@taiga-ui/i18n": "^4.
|
|
490
|
+
"@taiga-ui/cdk": "^4.4.0",
|
|
491
|
+
"@taiga-ui/core": "^4.4.0",
|
|
492
|
+
"@taiga-ui/i18n": "^4.4.0",
|
|
487
493
|
"@taiga-ui/polymorpheus": "^4.6.4",
|
|
488
494
|
"rxjs": ">=7.0.0"
|
|
489
495
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TUI_BUTTON_CLOSE_ICON: import("@angular/core").InjectionToken<string>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { tuiCreateToken } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
2
|
-
export const TUI_BUTTON_CLOSE_ICON = tuiCreateToken('@tui.x');
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWNsb3NlLm9wdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9raXQvZGlyZWN0aXZlcy9idXR0b24tY2xvc2UvYnV0dG9uLWNsb3NlLm9wdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLG1DQUFtQyxDQUFDO0FBRWpFLE1BQU0sQ0FBQyxNQUFNLHFCQUFxQixHQUFHLGNBQWMsQ0FBQyxRQUFRLENBQUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7dHVpQ3JlYXRlVG9rZW59IGZyb20gJ0B0YWlnYS11aS9jZGsvdXRpbHMvbWlzY2VsbGFuZW91cyc7XG5cbmV4cG9ydCBjb25zdCBUVUlfQlVUVE9OX0NMT1NFX0lDT04gPSB0dWlDcmVhdGVUb2tlbignQHR1aS54Jyk7XG4iXX0=
|