@taiga-ui/kit 4.7.0 → 4.8.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/badged-content/badged-content.directive.d.ts +2 -1
- package/components/files/file/file.options.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/components/like/index.d.ts +2 -0
- package/components/like/like.component.d.ts +16 -0
- package/components/like/like.options.d.ts +11 -0
- package/components/line-clamp/line-clamp.component.d.ts +4 -4
- package/directives/copy/copy.directive.d.ts +1 -1
- package/directives/copy/copy.options.d.ts +1 -1
- package/directives/highlight/highlight.directive.d.ts +5 -0
- package/directives/lazy-loading/lazy-loading.directive.d.ts +8 -9
- package/directives/password/password.options.d.ts +1 -1
- package/esm2022/components/avatar/avatar.component.mjs +5 -4
- package/esm2022/components/badged-content/badged-content.directive.mjs +1 -1
- package/esm2022/components/calendar-month/calendar-month.component.mjs +3 -3
- package/esm2022/components/calendar-range/calendar-range.component.mjs +4 -2
- package/esm2022/components/files/file/file.options.mjs +3 -3
- package/esm2022/components/files/input-files/input-files.directive.mjs +3 -3
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/components/input-phone-international/input-phone-international.component.mjs +3 -3
- package/esm2022/components/like/index.mjs +3 -0
- package/esm2022/components/like/like.component.mjs +46 -0
- package/esm2022/components/like/like.options.mjs +10 -0
- package/esm2022/components/like/taiga-ui-kit-components-like.mjs +5 -0
- package/esm2022/components/line-clamp/line-clamp.component.mjs +21 -21
- package/esm2022/components/routable-dialog/routable-dialog.component.mjs +1 -1
- package/esm2022/directives/chevron/chevron.directive.mjs +2 -2
- package/esm2022/directives/copy/copy.directive.mjs +3 -3
- package/esm2022/directives/highlight/highlight.directive.mjs +6 -2
- package/esm2022/directives/lazy-loading/lazy-loading.directive.mjs +27 -28
- package/esm2022/directives/password/password.directive.mjs +2 -2
- package/esm2022/pipes/filter-by-input/filter-by-input.pipe.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-avatar.mjs +4 -3
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +3 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +6 -5
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +2 -2
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-like.mjs +61 -0
- package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +23 -22
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components.mjs +1 -0
- package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-copy.mjs +2 -2
- package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs +6 -2
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +26 -27
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +1 -1
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
- package/package.json +19 -13
- package/styles/components/like.less +69 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, Injectable, Directive, Input } from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectorRef, Injectable, signal, Directive, Input } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { IntersectionObserverService } from '@ng-web-apis/intersection-observer';
|
|
5
5
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
@@ -25,46 +25,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
25
25
|
|
|
26
26
|
class TuiImgLazyLoading {
|
|
27
27
|
constructor() {
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
this.src$.pipe(takeUntilDestroyed()).subscribe((src) => {
|
|
37
|
-
this.src = src;
|
|
38
|
-
});
|
|
28
|
+
this.loading$ = inject(TuiLazyLoadingService);
|
|
29
|
+
this.supported = 'loading' in tuiInjectElement();
|
|
30
|
+
this.src = signal(null);
|
|
31
|
+
this.animation = signal('tuiSkeletonVibe ease-in-out 1s infinite alternate');
|
|
32
|
+
this.background = signal('var(--tui-background-neutral-2)');
|
|
33
|
+
this.$ = !this.supported &&
|
|
34
|
+
this.loading$.pipe(takeUntilDestroyed()).subscribe((src) => this.src.set(src));
|
|
39
35
|
}
|
|
40
36
|
set srcSetter(src) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
if (this.supported) {
|
|
38
|
+
this.src.set(src);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.loading$.next(src);
|
|
42
|
+
}
|
|
47
43
|
}
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
unset() {
|
|
45
|
+
this.background.set('');
|
|
46
|
+
this.animation.set('');
|
|
50
47
|
}
|
|
51
48
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiImgLazyLoading, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
52
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiImgLazyLoading, isStandalone: true, selector: "img[loading=\"lazy\"]", inputs: { srcSetter: ["src", "srcSetter"] }, host: { listeners: { "load": "
|
|
49
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiImgLazyLoading, isStandalone: true, selector: "img[loading=\"lazy\"],img[tuiLoading=\"lazy\"]", inputs: { srcSetter: ["src", "srcSetter"] }, host: { listeners: { "load": "unset()", "error": "unset()" }, properties: { "style.animation": "animation()", "style.background": "background()", "attr.loading": "supported ? \"lazy\" : null", "attr.src": "src()" } }, providers: [TuiLazyLoadingService, IntersectionObserverService], ngImport: i0 }); }
|
|
53
50
|
}
|
|
54
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiImgLazyLoading, decorators: [{
|
|
55
52
|
type: Directive,
|
|
56
53
|
args: [{
|
|
57
54
|
standalone: true,
|
|
58
|
-
selector: 'img[loading="lazy"]',
|
|
55
|
+
selector: 'img[loading="lazy"],img[tuiLoading="lazy"]',
|
|
59
56
|
providers: [TuiLazyLoadingService, IntersectionObserverService],
|
|
60
57
|
host: {
|
|
61
|
-
'[style.animation]': 'animation',
|
|
62
|
-
'[style.background]': 'background',
|
|
63
|
-
'[attr.
|
|
64
|
-
'
|
|
58
|
+
'[style.animation]': 'animation()',
|
|
59
|
+
'[style.background]': 'background()',
|
|
60
|
+
'[attr.loading]': 'supported ? "lazy" : null',
|
|
61
|
+
'[attr.src]': 'src()',
|
|
62
|
+
'(load)': 'unset()',
|
|
63
|
+
'(error)': 'unset()',
|
|
65
64
|
},
|
|
66
65
|
}]
|
|
67
|
-
}],
|
|
66
|
+
}], propDecorators: { srcSetter: [{
|
|
68
67
|
type: Input,
|
|
69
68
|
args: ['src']
|
|
70
69
|
}] } });
|
|
@@ -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((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)': '
|
|
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, signal} 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\"],img[tuiLoading=\"lazy\"]',\n providers: [TuiLazyLoadingService, IntersectionObserverService],\n host: {\n '[style.animation]': 'animation()',\n '[style.background]': 'background()',\n '[attr.loading]': 'supported ? \"lazy\" : null',\n '[attr.src]': 'src()',\n '(load)': 'unset()',\n '(error)': 'unset()',\n },\n})\nexport class TuiImgLazyLoading {\n private readonly loading$ = inject(TuiLazyLoadingService);\n protected readonly supported = 'loading' in tuiInjectElement<HTMLImageElement>();\n protected src = signal<SafeResourceUrl | string | null>(null);\n protected animation = signal('tuiSkeletonVibe ease-in-out 1s infinite alternate');\n protected background = signal('var(--tui-background-neutral-2)');\n\n protected readonly $ =\n !this.supported &&\n this.loading$.pipe(takeUntilDestroyed()).subscribe((src) => this.src.set(src));\n\n @Input('src')\n public set srcSetter(src: SafeResourceUrl | string) {\n if (this.supported) {\n this.src.set(src);\n } else {\n this.loading$.next(src);\n }\n }\n\n protected unset(): void {\n this.background.set('');\n this.animation.set('');\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,EAAE,cAAc,CAAC,EAC7C,GAAG,CAAC,MAAM,GAAG,CAAC,EACd,IAAI,CAAC,CAAC,CAAC,CACV,CACJ,EACD,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CACtC,CAAC;KAID;AAEM,IAAA,IAAI,CAAC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S;AACvB,qBAAA;AACJ,iBAAA,CAAA;8BAac,SAAS,EAAA,CAAA;sBADnB,KAAK;uBAAC,KAAK,CAAA;;;AChChB;;AAEG;;;;"}
|
|
@@ -36,7 +36,7 @@ class TuiPassword {
|
|
|
36
36
|
}
|
|
37
37
|
toggle() {
|
|
38
38
|
this.hidden.set(!this.hidden());
|
|
39
|
-
this.textfield.
|
|
39
|
+
this.textfield.input?.nativeElement.setAttribute('type', this.hidden() ? 'password' : 'text');
|
|
40
40
|
}
|
|
41
41
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiPassword, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
42
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiPassword, isStandalone: true, selector: "tui-icon[tuiPassword]", host: { listeners: { "click": "toggle()" }, properties: { "style.border": "textfield.options.size() === \"s\" ? \"0.25rem solid transparent\" : null" }, styleAttribute: "cursor: pointer" }, providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-directives-password.mjs","sources":["../../../projects/kit/directives/password/password.options.ts","../../../projects/kit/directives/password/password.directive.ts","../../../projects/kit/directives/password/taiga-ui-kit-directives-password.ts"],"sourcesContent":["import type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiPasswordOptions {\n readonly icons: Readonly<{\n hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n }>;\n}\n\nexport const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] =\n tuiCreateOptions<TuiPasswordOptions>({\n icons: {\n hide: '@tui.eye-off',\n show: '@tui.eye',\n },\n });\n","import {computed, Directive, inject, signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiDirectiveBinding, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_APPEARANCE_OPTIONS,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TUI_PASSWORD_TEXTS} from '@taiga-ui/kit/tokens';\n\nimport {TUI_PASSWORD_OPTIONS} from './password.options';\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[tuiPassword]',\n providers: [\n {\n provide: TUI_APPEARANCE_OPTIONS,\n useValue: {appearance: 'icon'},\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDirective,\n inputs: ['tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n style: 'cursor: pointer',\n '(click)': 'toggle()',\n '[style.border]':\n 'textfield.options.size() === \"s\" ? \"0.25rem solid transparent\" : null',\n },\n})\nexport class TuiPassword {\n private readonly options = inject(TUI_PASSWORD_OPTIONS);\n private readonly texts = toSignal(inject(TUI_PASSWORD_TEXTS), {\n initialValue: ['', ''] as const,\n });\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly hidden = signal(true);\n protected readonly icon = tuiDirectiveBinding(\n TuiIcon,\n 'icon',\n computed((size = this.textfield.options.size()) => {\n const icon = this.hidden()\n ? this.options.icons.show\n : this.options.icons.hide;\n\n return tuiIsString(icon) ? icon : icon(size);\n }),\n );\n\n protected readonly hint = tuiDirectiveBinding(\n TuiHintDirective,\n 'tuiHint',\n computed(() => (this.hidden() ? this.texts()[0] : this.texts()[1])),\n );\n\n protected toggle(): void {\n this.hidden.set(!this.hidden());\n this.textfield.
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-directives-password.mjs","sources":["../../../projects/kit/directives/password/password.options.ts","../../../projects/kit/directives/password/password.directive.ts","../../../projects/kit/directives/password/taiga-ui-kit-directives-password.ts"],"sourcesContent":["import type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiPasswordOptions {\n readonly icons: Readonly<{\n hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n }>;\n}\n\nexport const [TUI_PASSWORD_OPTIONS, tuiPasswordOptionsProvider] =\n tuiCreateOptions<TuiPasswordOptions>({\n icons: {\n hide: '@tui.eye-off',\n show: '@tui.eye',\n },\n });\n","import {computed, Directive, inject, signal} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiDirectiveBinding, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_APPEARANCE_OPTIONS,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TUI_PASSWORD_TEXTS} from '@taiga-ui/kit/tokens';\n\nimport {TUI_PASSWORD_OPTIONS} from './password.options';\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[tuiPassword]',\n providers: [\n {\n provide: TUI_APPEARANCE_OPTIONS,\n useValue: {appearance: 'icon'},\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDirective,\n inputs: ['tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n style: 'cursor: pointer',\n '(click)': 'toggle()',\n '[style.border]':\n 'textfield.options.size() === \"s\" ? \"0.25rem solid transparent\" : null',\n },\n})\nexport class TuiPassword {\n private readonly options = inject(TUI_PASSWORD_OPTIONS);\n private readonly texts = toSignal(inject(TUI_PASSWORD_TEXTS), {\n initialValue: ['', ''] as const,\n });\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly hidden = signal(true);\n protected readonly icon = tuiDirectiveBinding(\n TuiIcon,\n 'icon',\n computed((size = this.textfield.options.size()) => {\n const icon = this.hidden()\n ? this.options.icons.show\n : this.options.icons.hide;\n\n return tuiIsString(icon) ? icon : icon(size);\n }),\n );\n\n protected readonly hint = tuiDirectiveBinding(\n TuiHintDirective,\n 'tuiHint',\n computed(() => (this.hidden() ? this.texts()[0] : this.texts()[1])),\n );\n\n protected toggle(): void {\n this.hidden.set(!this.hidden());\n this.textfield.input?.nativeElement.setAttribute(\n 'type',\n this.hidden() ? 'password' : 'text',\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAWO,MAAM,CAAC,oBAAoB,EAAE,0BAA0B,CAAC,GAC3D,gBAAgB,CAAqB;AACjC,IAAA,KAAK,EAAE;AACH,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,IAAI,EAAE,UAAU;AACnB,KAAA;AACJ,CAAA,CAAC;;ACHN,MAuBa,WAAW,CAAA;AAvBxB,IAAA,WAAA,GAAA;AAwBqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACvC,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE;AAC1D,YAAA,YAAY,EAAE,CAAC,EAAE,EAAE,EAAE,CAAU;AAClC,SAAA,CAAC,CAAC;AAEgB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC1C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,CAAA,IAAA,GAAG,mBAAmB,CACzC,OAAO,EACP,MAAM,EACN,QAAQ,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,C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, matcher, this.host.stringify || String, this.textfield?.
|
|
18
|
+
return this.filter(items, matcher, this.host.stringify || String, this.textfield?.input?.nativeElement.value ||
|
|
19
19
|
this.host.nativeFocusableElement?.value ||
|
|
20
20
|
'');
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-pipes-filter-by-input.mjs","sources":["../../../projects/kit/pipes/filter-by-input/filter-by-input.pipe.ts","../../../projects/kit/pipes/filter-by-input/taiga-ui-kit-pipes-filter-by-input.ts"],"sourcesContent":["import type {PipeTransform} from '@angular/core';\nimport {inject, Pipe} from '@angular/core';\nimport {TUI_DEFAULT_MATCHER} from '@taiga-ui/cdk/constants';\nimport type {TuiStringHandler, TuiStringMatcher} from '@taiga-ui/cdk/types';\nimport {tuiIsPresent, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DATA_LIST_HOST} from '@taiga-ui/core/components/data-list';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {tuiIsFlat} from '@taiga-ui/kit/utils';\n\n// TODO: Consider replacing TuiTextfieldComponent with proper token once we refactor textfields\n@Pipe({\n standalone: true,\n name: 'tuiFilterByInput',\n pure: false,\n})\nexport class TuiFilterByInputPipe implements PipeTransform {\n // TODO: Remove optional after legacy controls are dropped\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly host = inject(TUI_DATA_LIST_HOST);\n\n public transform<T>(items: readonly T[], matcher?: TuiStringMatcher<T>): readonly T[];\n public transform<T>(\n items: ReadonlyArray<readonly T[]> | readonly T[] | null,\n matcher: TuiStringMatcher<T> = TUI_DEFAULT_MATCHER,\n ): ReadonlyArray<readonly T[]> | readonly T[] | null {\n return this.filter<T>(\n items,\n matcher,\n this.host.stringify || String,\n this.textfield?.
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-pipes-filter-by-input.mjs","sources":["../../../projects/kit/pipes/filter-by-input/filter-by-input.pipe.ts","../../../projects/kit/pipes/filter-by-input/taiga-ui-kit-pipes-filter-by-input.ts"],"sourcesContent":["import type {PipeTransform} from '@angular/core';\nimport {inject, Pipe} from '@angular/core';\nimport {TUI_DEFAULT_MATCHER} from '@taiga-ui/cdk/constants';\nimport type {TuiStringHandler, TuiStringMatcher} from '@taiga-ui/cdk/types';\nimport {tuiIsPresent, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DATA_LIST_HOST} from '@taiga-ui/core/components/data-list';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {tuiIsFlat} from '@taiga-ui/kit/utils';\n\n// TODO: Consider replacing TuiTextfieldComponent with proper token once we refactor textfields\n@Pipe({\n standalone: true,\n name: 'tuiFilterByInput',\n pure: false,\n})\nexport class TuiFilterByInputPipe implements PipeTransform {\n // TODO: Remove optional after legacy controls are dropped\n private readonly textfield = inject(TuiTextfieldComponent, {optional: true});\n private readonly host = inject(TUI_DATA_LIST_HOST);\n\n public transform<T>(items: readonly T[], matcher?: TuiStringMatcher<T>): readonly T[];\n public transform<T>(\n items: ReadonlyArray<readonly T[]> | readonly T[] | null,\n matcher: TuiStringMatcher<T> = TUI_DEFAULT_MATCHER,\n ): ReadonlyArray<readonly T[]> | readonly T[] | null {\n return this.filter<T>(\n items,\n matcher,\n this.host.stringify || String,\n this.textfield?.input?.nativeElement.value ||\n (this.host as any).nativeFocusableElement?.value ||\n '',\n );\n }\n\n @tuiPure\n private filter<T>(\n items: ReadonlyArray<readonly T[]> | readonly T[] | null,\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): ReadonlyArray<readonly T[]> | readonly T[] | null {\n if (!items) {\n return null;\n }\n\n return tuiIsFlat(items)\n ? this.filterFlat(items, matcher, stringify, query)\n : this.filter2d(items, matcher, stringify, query);\n }\n\n private filterFlat<T>(\n items: readonly T[],\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): readonly T[] {\n const match = this.getMatch(items, stringify, query);\n\n return tuiIsPresent(match)\n ? items\n : items.filter((item) => matcher(item, query, stringify));\n }\n\n private filter2d<T>(\n items: ReadonlyArray<readonly T[]>,\n matcher: TuiStringMatcher<T>,\n stringify: TuiStringHandler<T>,\n query: string,\n ): ReadonlyArray<readonly T[]> {\n const match = items.find((item) =>\n tuiIsPresent(this.getMatch(item, stringify, query)),\n );\n\n return tuiIsPresent(match)\n ? items\n : items.map((inner) => this.filterFlat(inner, matcher, stringify, query));\n }\n\n private getMatch<T>(\n items: readonly T[],\n stringify: TuiStringHandler<T>,\n query: string,\n ): T | undefined {\n return items.find(\n (item) => stringify(item).toLocaleLowerCase() === query.toLocaleLowerCase(),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AASA;AACA,MAKa,oBAAoB,CAAA;AALjC,IAAA,WAAA,GAAA;;QAOqB,IAAS,CAAA,SAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAC5D,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAsEtD,KAAA;AAnEU,IAAA,SAAS,CACZ,KAAwD,EACxD,OAAA,GAA+B,mBAAmB,EAAA;QAElD,OAAO,IAAI,CAAC,MAAM,CACd,KAAK,EACL,OAAO,EACP,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,EAC7B,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK;AACrC,YAAA,IAAI,CAAC,IAAY,CAAC,sBAAsB,EAAE,KAAK;AAChD,YAAA,EAAE,CACT,CAAC;KACL;AAGO,IAAA,MAAM,CACV,KAAwD,EACxD,OAA4B,EAC5B,SAA8B,EAC9B,KAAa,EAAA;QAEb,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,OAAO,IAAI,CAAC;AACf,SAAA;QAED,OAAO,SAAS,CAAC,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MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA,EAAA;;AAqBrB,UAAA,CAAA;IADP,OAAO;AAcP,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA,CAAA;4FAlCQ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,kBAAkB;AACxB,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA,CAAA;8BAsBW,MAAM,EAAA,EAAA,EAAA,EAAA,CAAA;;ACpClB;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/kit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Taiga UI Angular main components kit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -203,6 +203,12 @@
|
|
|
203
203
|
"esm": "./esm2022/components/items-with-more/taiga-ui-kit-components-items-with-more.mjs",
|
|
204
204
|
"default": "./fesm2022/taiga-ui-kit-components-items-with-more.mjs"
|
|
205
205
|
},
|
|
206
|
+
"./components/like": {
|
|
207
|
+
"types": "./components/like/index.d.ts",
|
|
208
|
+
"esm2022": "./esm2022/components/like/taiga-ui-kit-components-like.mjs",
|
|
209
|
+
"esm": "./esm2022/components/like/taiga-ui-kit-components-like.mjs",
|
|
210
|
+
"default": "./fesm2022/taiga-ui-kit-components-like.mjs"
|
|
211
|
+
},
|
|
206
212
|
"./components/line-clamp": {
|
|
207
213
|
"types": "./components/line-clamp/index.d.ts",
|
|
208
214
|
"esm2022": "./esm2022/components/line-clamp/taiga-ui-kit-components-line-clamp.mjs",
|
|
@@ -497,18 +503,18 @@
|
|
|
497
503
|
"@angular/core": ">=16.0.0",
|
|
498
504
|
"@angular/forms": ">=16.0.0",
|
|
499
505
|
"@angular/router": ">=16.0.0",
|
|
500
|
-
"@maskito/angular": "^3.0.
|
|
501
|
-
"@maskito/core": "^3.0.
|
|
502
|
-
"@maskito/kit": "^3.0.
|
|
503
|
-
"@maskito/phone": "^3.0.
|
|
504
|
-
"@ng-web-apis/common": "^4.6.
|
|
505
|
-
"@ng-web-apis/intersection-observer": "^4.6.
|
|
506
|
-
"@ng-web-apis/mutation-observer": "^4.6.
|
|
507
|
-
"@ng-web-apis/resize-observer": "^4.6.
|
|
508
|
-
"@taiga-ui/cdk": "^4.
|
|
509
|
-
"@taiga-ui/core": "^4.
|
|
510
|
-
"@taiga-ui/i18n": "^4.
|
|
511
|
-
"@taiga-ui/polymorpheus": "^4.7.
|
|
506
|
+
"@maskito/angular": "^3.0.2",
|
|
507
|
+
"@maskito/core": "^3.0.2",
|
|
508
|
+
"@maskito/kit": "^3.0.2",
|
|
509
|
+
"@maskito/phone": "^3.0.2",
|
|
510
|
+
"@ng-web-apis/common": "^4.6.3",
|
|
511
|
+
"@ng-web-apis/intersection-observer": "^4.6.3",
|
|
512
|
+
"@ng-web-apis/mutation-observer": "^4.6.3",
|
|
513
|
+
"@ng-web-apis/resize-observer": "^4.6.3",
|
|
514
|
+
"@taiga-ui/cdk": "^4.8.0",
|
|
515
|
+
"@taiga-ui/core": "^4.8.0",
|
|
516
|
+
"@taiga-ui/i18n": "^4.8.0",
|
|
517
|
+
"@taiga-ui/polymorpheus": "^4.7.3",
|
|
512
518
|
"rxjs": ">=7.0.0"
|
|
513
519
|
},
|
|
514
520
|
"module": "fesm2022/taiga-ui-kit.mjs",
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@import '@taiga-ui/core/styles/taiga-ui-local';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Like
|
|
5
|
+
* @selector [tuiLike]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A stylized input type="checkbox"
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'm') ('s' | 'm')
|
|
12
|
+
*
|
|
13
|
+
* @vars
|
|
14
|
+
* --t-icon-color - custom color for `:checked` state
|
|
15
|
+
* --t-unchecked-icon — default state icon
|
|
16
|
+
* --t-checked-icon — checkmark icon
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <input tuiLike />
|
|
20
|
+
*
|
|
21
|
+
* @see-also
|
|
22
|
+
* Checkbox, Switch, Radio, Appearance
|
|
23
|
+
*/
|
|
24
|
+
[tuiLike] {
|
|
25
|
+
--t-size: var(--tui-height-m);
|
|
26
|
+
--t-border-width: 0.75rem;
|
|
27
|
+
|
|
28
|
+
inline-size: var(--t-size);
|
|
29
|
+
block-size: var(--t-size);
|
|
30
|
+
border: var(--t-border-width) transparent solid;
|
|
31
|
+
border-radius: 100%;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
margin: 0;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
|
|
36
|
+
&::before,
|
|
37
|
+
&::after {
|
|
38
|
+
.fullsize();
|
|
39
|
+
.transition(~'transform, opacity');
|
|
40
|
+
|
|
41
|
+
content: '';
|
|
42
|
+
background: currentColor;
|
|
43
|
+
mask: var(--t-unchecked-icon) no-repeat center/contain;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&::after {
|
|
47
|
+
mask-image: var(--t-checked-icon);
|
|
48
|
+
opacity: 0;
|
|
49
|
+
color: var(--t-icon-color, inherit);
|
|
50
|
+
transform: scale(0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:checked {
|
|
54
|
+
&::before {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&::after {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
transform: scale(1);
|
|
61
|
+
transition-timing-function: cubic-bezier(0.2, 0.6, 0.5, 1.8), ease-in-out;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&[data-size='s'] {
|
|
66
|
+
--t-size: var(--tui-height-s);
|
|
67
|
+
--t-border-width: 0.5rem;
|
|
68
|
+
}
|
|
69
|
+
}
|