@taiga-ui/core 4.34.0-canary.f3c7d23 → 4.34.0-canary.f8df2a7
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/directives/icons/icons.directive.d.ts +7 -5
- package/esm2022/components/notification/notification.directive.mjs +2 -4
- package/esm2022/components/root/root.component.mjs +1 -1
- package/esm2022/directives/icons/icons.directive.mjs +25 -12
- package/fesm2022/taiga-ui-core-components-notification.mjs +1 -3
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +24 -11
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { SafeResourceUrl } from '@angular/platform-browser';
|
|
2
|
-
import type { TuiStringHandler } from '@taiga-ui/cdk/types';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
/**
|
|
5
4
|
* Workaround for {@link TuiAvatar} to properly handle icon color in {@link TuiAppearance}
|
|
6
5
|
*/
|
|
7
6
|
type Icon = SafeResourceUrl | string | null | undefined;
|
|
8
7
|
export declare class TuiIcons {
|
|
8
|
+
private readonly resolver;
|
|
9
9
|
protected readonly nothing: undefined;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
readonly iconStart: import("@angular/core").WritableSignal<Icon>;
|
|
11
|
+
readonly iconEnd: import("@angular/core").WritableSignal<string>;
|
|
12
|
+
set iconStartSetter(x: Icon);
|
|
13
|
+
set iconEndSetter(x: string);
|
|
14
|
+
protected resolve(icon: Icon): string | null;
|
|
13
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiIcons, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiIcons, never, never, { "
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiIcons, never, never, { "iconStartSetter": { "alias": "iconStart"; "required": false; }; "iconEndSetter": { "alias": "iconEnd"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
17
|
}
|
|
16
18
|
export {};
|
|
@@ -34,9 +34,7 @@ class TuiNotification {
|
|
|
34
34
|
this.refresh();
|
|
35
35
|
}
|
|
36
36
|
refresh() {
|
|
37
|
-
this.icons.iconStart
|
|
38
|
-
? this.icon
|
|
39
|
-
: this.icon(this.appearance);
|
|
37
|
+
this.icons.iconStart.set(tuiIsString(this.icon) ? this.icon : this.icon(this.appearance));
|
|
40
38
|
}
|
|
41
39
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiNotification, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
40
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiNotification, isStandalone: true, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: { appearance: "appearance", icon: "icon", size: "size" }, host: { properties: { "attr.data-size": "size" } }, providers: [
|
|
@@ -80,4 +78,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
80
78
|
}], size: [{
|
|
81
79
|
type: Input
|
|
82
80
|
}] } });
|
|
83
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
81
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvcmUvY29tcG9uZW50cy9ub3RpZmljYXRpb24vbm90aWZpY2F0aW9uLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQ0gsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxTQ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biAgICB9XG5cbiAgICBwcml2YXRlIHJlZnJlc2goKTogdm9pZCB7XG4gICAgICAgIHRoaXMuaWNvbnMuaWNvblN0YXJ0LnNldChcbiAgICAgICAgICAgIHR1aUlzU3RyaW5nKHRoaXMuaWNvbikgPyB0aGlzLmljb24gOiB0aGlzLmljb24odGhpcy5hcHBlYXJhbmNlKSxcbiAgICAgICAgKTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -53,7 +53,7 @@ class TuiRoot {
|
|
|
53
53
|
: !this.isChildRoot;
|
|
54
54
|
}
|
|
55
55
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
56
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.34.0-canary.
|
|
56
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.34.0-canary.f8df2a7" }, listeners: { "touchstart.passive.zoneless": "0", "document:fullscreenchange": "top.set(isTopLayer)" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }, { directive: i3.TuiFontSize }], ngImport: i0, template: "<div class=\"t-root-content\"><ng-content /></div>\n<ng-container *ngIf=\"top()\">\n <tui-scroll-controls\n *ngIf=\"scrollbars\"\n class=\"t-root-scrollbar\"\n />\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\"tuiOverHints\" />\n</ng-container>\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;z-index:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiAlerts, selector: "tui-alerts" }, { kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiDropdowns, selector: "tui-dropdowns" }, { kind: "component", type: TuiHints, selector: "tui-hints" }, { kind: "component", type: TuiPopups, selector: "tui-popups" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
57
57
|
}
|
|
58
58
|
export { TuiRoot };
|
|
59
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, decorators: [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Directive, inject, Input, ViewEncapsulation, } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Directive, inject, Input, signal, ViewEncapsulation, } from '@angular/core';
|
|
2
2
|
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
3
3
|
import { TUI_ICON_END, TUI_ICON_START, tuiInjectIconResolver } from '@taiga-ui/core/tokens';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -14,13 +14,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
14
14
|
}] });
|
|
15
15
|
class TuiIcons {
|
|
16
16
|
constructor() {
|
|
17
|
-
this.nothing = tuiWithStyles(TuiIconsStyles);
|
|
18
17
|
this.resolver = tuiInjectIconResolver();
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
18
|
+
this.nothing = tuiWithStyles(TuiIconsStyles);
|
|
19
|
+
this.iconStart = signal(inject(TUI_ICON_START, { self: true, optional: true }) || '');
|
|
20
|
+
this.iconEnd = signal(inject(TUI_ICON_END, { self: true, optional: true }) || '');
|
|
21
|
+
}
|
|
22
|
+
// TODO(v5): use signal inputs
|
|
23
|
+
set iconStartSetter(x) {
|
|
24
|
+
this.iconStart.set(x);
|
|
25
|
+
}
|
|
26
|
+
// TODO(v5): use signal inputs
|
|
27
|
+
set iconEndSetter(x) {
|
|
28
|
+
this.iconEnd.set(x);
|
|
29
|
+
}
|
|
30
|
+
resolve(icon) {
|
|
31
|
+
return icon ? `url(${this.resolver(icon.toString())})` : null;
|
|
21
32
|
}
|
|
22
33
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIcons, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiIcons, isStandalone: true, inputs: {
|
|
34
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiIcons, isStandalone: true, inputs: { iconStartSetter: ["iconStart", "iconStartSetter"], iconEndSetter: ["iconEnd", "iconEndSetter"] }, host: { attributes: { "tuiIcons": "" }, properties: { "style.--t-icon-start": "resolve(iconStart())", "style.--t-icon-end": "resolve(iconEnd())" } }, ngImport: i0 }); }
|
|
24
35
|
}
|
|
25
36
|
export { TuiIcons };
|
|
26
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIcons, decorators: [{
|
|
@@ -29,13 +40,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
29
40
|
standalone: true,
|
|
30
41
|
host: {
|
|
31
42
|
tuiIcons: '',
|
|
32
|
-
'[style.--t-icon-start]': '
|
|
33
|
-
'[style.--t-icon-end]': 'iconEnd
|
|
43
|
+
'[style.--t-icon-start]': 'resolve(iconStart())',
|
|
44
|
+
'[style.--t-icon-end]': 'resolve(iconEnd())',
|
|
34
45
|
},
|
|
35
46
|
}]
|
|
36
|
-
}], propDecorators: {
|
|
37
|
-
type: Input
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
}], propDecorators: { iconStartSetter: [{
|
|
48
|
+
type: Input,
|
|
49
|
+
args: ['iconStart']
|
|
50
|
+
}], iconEndSetter: [{
|
|
51
|
+
type: Input,
|
|
52
|
+
args: ['iconEnd']
|
|
40
53
|
}] } });
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
54
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbnMuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29yZS9kaXJlY3RpdmVzL2ljb25zL2ljb25zLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0gsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxTQUFTLEVBQ1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sKCR7dGhpcy5yZXNvbHZlcihpY29uLnRvU3RyaW5nKCkpfSlgIDogbnVsbDtcbiAgICB9XG59XG4iXX0=
|
|
@@ -57,9 +57,7 @@ class TuiNotification {
|
|
|
57
57
|
this.refresh();
|
|
58
58
|
}
|
|
59
59
|
refresh() {
|
|
60
|
-
this.icons.iconStart
|
|
61
|
-
? this.icon
|
|
62
|
-
: this.icon(this.appearance);
|
|
60
|
+
this.icons.iconStart.set(tuiIsString(this.icon) ? this.icon : this.icon(this.appearance));
|
|
63
61
|
}
|
|
64
62
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiNotification, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
65
63
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiNotification, isStandalone: true, selector: "tui-notification,a[tuiNotification],button[tuiNotification]", inputs: { appearance: "appearance", icon: "icon", size: "size" }, host: { properties: { "attr.data-size": "size" } }, providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-notification.mjs","sources":["../../../projects/core/components/notification/notification.options.ts","../../../projects/core/components/notification/notification.directive.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiNotificationOptions extends TuiAppearanceOptions {\n readonly icon: TuiStringHandler<string> | string;\n readonly size: TuiSizeL | TuiSizeS;\n}\n\nconst ICONS: Record<string, string> = {\n info: '@tui.info',\n positive: '@tui.circle-check',\n negative: '@tui.circle-x',\n warning: '@tui.circle-alert',\n neutral: '@tui.info',\n /* TODO @deprecated remove in v5 */\n success: '@tui.circle-check',\n /* TODO @deprecated remove in v5 */\n error: '@tui.circle-x',\n};\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationOptions = {\n appearance: 'info',\n icon: (appearance) => ICONS[appearance] ?? '',\n size: 'l',\n};\n\n/**\n * Default parameters for notification alert component\n */\nexport const [TUI_NOTIFICATION_OPTIONS, tuiNotificationOptionsProvider] =\n tuiCreateOptions(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n","import type {OnChanges, OnInit} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiIsString, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {tuiLinkOptionsProvider} from '@taiga-ui/core/components/link';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiIcons, TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_NOTIFICATION_OPTIONS} from './notification.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/notification.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-notification',\n },\n})\nclass TuiNotificationStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-notification,a[tuiNotification],button[tuiNotification]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_NOTIFICATION_OPTIONS),\n tuiLinkOptionsProvider({\n appearance: '',\n pseudo: true,\n }),\n tuiButtonOptionsProvider({\n appearance: 'outline-grayscale',\n size: 's',\n }),\n ],\n hostDirectives: [TuiWithIcons, TuiWithAppearance],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiNotification implements OnChanges, OnInit {\n private readonly options = inject(TUI_NOTIFICATION_OPTIONS);\n\n protected readonly nothing = tuiWithStyles(TuiNotificationStyles);\n protected readonly icons = inject(TuiIcons);\n\n @Input()\n public appearance = this.options.appearance;\n\n @Input()\n public icon: TuiStringHandler<string> | string = this.options.icon;\n\n @Input()\n public size = this.options.size;\n\n public ngOnInit(): void {\n this.refresh();\n }\n\n public ngOnChanges(): void {\n this.refresh();\n }\n\n private refresh(): void {\n this.icons.iconStart
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-notification.mjs","sources":["../../../projects/core/components/notification/notification.options.ts","../../../projects/core/components/notification/notification.directive.ts","../../../projects/core/components/notification/taiga-ui-core-components-notification.ts"],"sourcesContent":["import type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport type {TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\nimport type {TuiSizeL, TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiNotificationOptions extends TuiAppearanceOptions {\n readonly icon: TuiStringHandler<string> | string;\n readonly size: TuiSizeL | TuiSizeS;\n}\n\nconst ICONS: Record<string, string> = {\n info: '@tui.info',\n positive: '@tui.circle-check',\n negative: '@tui.circle-x',\n warning: '@tui.circle-alert',\n neutral: '@tui.info',\n /* TODO @deprecated remove in v5 */\n success: '@tui.circle-check',\n /* TODO @deprecated remove in v5 */\n error: '@tui.circle-x',\n};\n\n/** Default values for the notification options. */\nexport const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationOptions = {\n appearance: 'info',\n icon: (appearance) => ICONS[appearance] ?? '',\n size: 'l',\n};\n\n/**\n * Default parameters for notification alert component\n */\nexport const [TUI_NOTIFICATION_OPTIONS, tuiNotificationOptionsProvider] =\n tuiCreateOptions(TUI_NOTIFICATION_DEFAULT_OPTIONS);\n","import type {OnChanges, OnInit} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiIsString, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {tuiLinkOptionsProvider} from '@taiga-ui/core/components/link';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiIcons, TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_NOTIFICATION_OPTIONS} from './notification.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/notification.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-notification',\n },\n})\nclass TuiNotificationStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-notification,a[tuiNotification],button[tuiNotification]',\n providers: [\n tuiAppearanceOptionsProvider(TUI_NOTIFICATION_OPTIONS),\n tuiLinkOptionsProvider({\n appearance: '',\n pseudo: true,\n }),\n tuiButtonOptionsProvider({\n appearance: 'outline-grayscale',\n size: 's',\n }),\n ],\n hostDirectives: [TuiWithIcons, TuiWithAppearance],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiNotification implements OnChanges, OnInit {\n private readonly options = inject(TUI_NOTIFICATION_OPTIONS);\n\n protected readonly nothing = tuiWithStyles(TuiNotificationStyles);\n protected readonly icons = inject(TuiIcons);\n\n @Input()\n public appearance = this.options.appearance;\n\n @Input()\n public icon: TuiStringHandler<string> | string = this.options.icon;\n\n @Input()\n public size = this.options.size;\n\n public ngOnInit(): void {\n this.refresh();\n }\n\n public ngOnChanges(): void {\n this.refresh();\n }\n\n private refresh(): void {\n this.icons.iconStart.set(\n tuiIsString(this.icon) ? this.icon : this.icon(this.appearance),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAUA,MAAM,KA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,CAAA;sBADV,KAAK;;;AChEV;;AAEG;;;;"}
|
|
@@ -54,7 +54,7 @@ class TuiRoot {
|
|
|
54
54
|
: !this.isChildRoot;
|
|
55
55
|
}
|
|
56
56
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.34.0-canary.
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.34.0-canary.f8df2a7" }, listeners: { "touchstart.passive.zoneless": "0", "document:fullscreenchange": "top.set(isTopLayer)" }, properties: { "style.--tui-duration.ms": "duration", "style.--tui-scroll-behavior": "reducedMotion ? \"auto\" : \"smooth\"", "class._mobile": "isMobileRes()" } }, hostDirectives: [{ directive: i1.TuiPlatform }, { directive: i2.TuiVisualViewport }, { directive: i3.TuiFontSize }], ngImport: i0, template: "<div class=\"t-root-content\"><ng-content /></div>\n<ng-container *ngIf=\"top()\">\n <tui-scroll-controls\n *ngIf=\"scrollbars\"\n class=\"t-root-scrollbar\"\n />\n <tui-popups />\n <ng-content select=\"tuiOverContent\" />\n <tui-dialogs />\n <ng-content select=\"tuiOverDialogs\" />\n <tui-alerts />\n <ng-content select=\"tuiOverAlerts\" />\n <tui-dropdowns />\n <ng-content select=\"tuiOverDropdowns\" />\n <tui-hints />\n <ng-content select=\"tuiOverHints\" />\n</ng-container>\n", styles: ["@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}.tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-font-text-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;z-index:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.t-root-content{position:relative;top:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TuiAlerts, selector: "tui-alerts" }, { kind: "component", type: TuiDialogs, selector: "tui-dialogs" }, { kind: "component", type: TuiDropdowns, selector: "tui-dropdowns" }, { kind: "component", type: TuiHints, selector: "tui-hints" }, { kind: "component", type: TuiPopups, selector: "tui-popups" }, { kind: "component", type: TuiScrollControls, selector: "tui-scroll-controls" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
58
58
|
}
|
|
59
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiRoot, decorators: [{
|
|
60
60
|
type: Component,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, Directive, Input } from '@angular/core';
|
|
2
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, signal, inject, Directive, Input } from '@angular/core';
|
|
3
3
|
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
4
|
import { tuiInjectIconResolver, TUI_ICON_START, TUI_ICON_END } from '@taiga-ui/core/tokens';
|
|
5
5
|
|
|
@@ -15,13 +15,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
15
15
|
}] });
|
|
16
16
|
class TuiIcons {
|
|
17
17
|
constructor() {
|
|
18
|
-
this.nothing = tuiWithStyles(TuiIconsStyles);
|
|
19
18
|
this.resolver = tuiInjectIconResolver();
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
19
|
+
this.nothing = tuiWithStyles(TuiIconsStyles);
|
|
20
|
+
this.iconStart = signal(inject(TUI_ICON_START, { self: true, optional: true }) || '');
|
|
21
|
+
this.iconEnd = signal(inject(TUI_ICON_END, { self: true, optional: true }) || '');
|
|
22
|
+
}
|
|
23
|
+
// TODO(v5): use signal inputs
|
|
24
|
+
set iconStartSetter(x) {
|
|
25
|
+
this.iconStart.set(x);
|
|
26
|
+
}
|
|
27
|
+
// TODO(v5): use signal inputs
|
|
28
|
+
set iconEndSetter(x) {
|
|
29
|
+
this.iconEnd.set(x);
|
|
30
|
+
}
|
|
31
|
+
resolve(icon) {
|
|
32
|
+
return icon ? `url(${this.resolver(icon.toString())})` : null;
|
|
22
33
|
}
|
|
23
34
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIcons, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
24
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiIcons, isStandalone: true, inputs: {
|
|
35
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiIcons, isStandalone: true, inputs: { iconStartSetter: ["iconStart", "iconStartSetter"], iconEndSetter: ["iconEnd", "iconEndSetter"] }, host: { attributes: { "tuiIcons": "" }, properties: { "style.--t-icon-start": "resolve(iconStart())", "style.--t-icon-end": "resolve(iconEnd())" } }, ngImport: i0 }); }
|
|
25
36
|
}
|
|
26
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiIcons, decorators: [{
|
|
27
38
|
type: Directive,
|
|
@@ -29,14 +40,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
29
40
|
standalone: true,
|
|
30
41
|
host: {
|
|
31
42
|
tuiIcons: '',
|
|
32
|
-
'[style.--t-icon-start]': '
|
|
33
|
-
'[style.--t-icon-end]': 'iconEnd
|
|
43
|
+
'[style.--t-icon-start]': 'resolve(iconStart())',
|
|
44
|
+
'[style.--t-icon-end]': 'resolve(iconEnd())',
|
|
34
45
|
},
|
|
35
46
|
}]
|
|
36
|
-
}], propDecorators: {
|
|
37
|
-
type: Input
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
}], propDecorators: { iconStartSetter: [{
|
|
48
|
+
type: Input,
|
|
49
|
+
args: ['iconStart']
|
|
50
|
+
}], iconEndSetter: [{
|
|
51
|
+
type: Input,
|
|
52
|
+
args: ['iconEnd']
|
|
40
53
|
}] } });
|
|
41
54
|
|
|
42
55
|
class TuiWithIcons {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-directives-icons.mjs","sources":["../../../projects/core/directives/icons/icons.directive.ts","../../../projects/core/directives/icons/with-icons.ts","../../../projects/core/directives/icons/taiga-ui-core-directives-icons.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {SafeResourceUrl} from '@angular/platform-browser';\nimport type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ICON_END, TUI_ICON_START, tuiInjectIconResolver} from '@taiga-ui/core/tokens';\n\n/**\n * Workaround for {@link TuiAvatar} to properly handle icon color in {@link TuiAppearance}\n */\ntype Icon = SafeResourceUrl | string | null | undefined;\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/icons.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-icons',\n },\n})\nclass TuiIconsStyles {}\n\n@Directive({\n standalone: true,\n host: {\n tuiIcons: '',\n '[style.--t-icon-start]'
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-directives-icons.mjs","sources":["../../../projects/core/directives/icons/icons.directive.ts","../../../projects/core/directives/icons/with-icons.ts","../../../projects/core/directives/icons/taiga-ui-core-directives-icons.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport type {SafeResourceUrl} from '@angular/platform-browser';\nimport type {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ICON_END, TUI_ICON_START, tuiInjectIconResolver} from '@taiga-ui/core/tokens';\n\n/**\n * Workaround for {@link TuiAvatar} to properly handle icon color in {@link TuiAppearance}\n */\ntype Icon = SafeResourceUrl | string | null | undefined;\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/icons.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-icons',\n },\n})\nclass TuiIconsStyles {}\n\n@Directive({\n standalone: true,\n host: {\n tuiIcons: '',\n '[style.--t-icon-start]': 'resolve(iconStart())',\n '[style.--t-icon-end]': 'resolve(iconEnd())',\n },\n})\nexport class TuiIcons {\n private readonly resolver: TuiStringHandler<string> = tuiInjectIconResolver();\n\n protected readonly nothing = tuiWithStyles(TuiIconsStyles);\n\n public readonly iconStart = signal<Icon>(\n inject(TUI_ICON_START, {self: true, optional: true}) || '',\n );\n\n public readonly iconEnd = signal<string>(\n inject(TUI_ICON_END, {self: true, optional: true}) || '',\n );\n\n // TODO(v5): use signal inputs\n @Input('iconStart')\n public set iconStartSetter(x: Icon) {\n this.iconStart.set(x);\n }\n\n // TODO(v5): use signal inputs\n @Input('iconEnd')\n public set iconEndSetter(x: string) {\n this.iconEnd.set(x);\n }\n\n protected resolve(icon: Icon): string | null {\n return icon ? `url(${this.resolver(icon.toString())})` : null;\n }\n}\n","import {Directive} from '@angular/core';\n\nimport {TuiIcons} from './icons.directive';\n\n@Directive({\n standalone: true,\n hostDirectives: [\n {\n directive: TuiIcons,\n inputs: ['iconStart', 'iconEnd'],\n },\n ],\n})\nexport class TuiWithIcons {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TuiIcons"],"mappings":";;;;;AAmBA,MAUM,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,+GARN,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,gfAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAQV,cAAc,EAAA,UAAA,EAAA,CAAA;kBAVnB,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,WAAW;AACrB,qBAAA,EAAA,MAAA,EAAA,CAAA,gfAAA,CAAA,EAAA,CAAA;;AAIL,MAQa,QAAQ,CAAA;AARrB,IAAA,WAAA,GAAA;QASqB,IAAQ,CAAA,QAAA,GAA6B,qBAAqB,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