@taiga-ui/core 4.52.0-canary.6c67ccf → 4.52.0-canary.932d3ef
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/button/button.options.d.ts +1 -1
- package/components/icon/icon.component.d.ts +1 -1
- package/components/notification/notification.options.d.ts +1 -1
- package/components/scrollbar/scrollbar.options.d.ts +1 -1
- package/directives/appearance/appearance.directive.d.ts +5 -13
- package/directives/icons/icons.directive.d.ts +6 -14
- package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +3 -2
- 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-appearance.mjs +15 -49
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +17 -31
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/package.json +1 -5
- package/pipes/index.d.ts +0 -1
- package/styles/components/icons.less +2 -2
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +0 -29
- package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +0 -1
- package/pipes/fallback-src/fallback-src.pipe.d.ts +0 -9
- package/pipes/fallback-src/index.d.ts +0 -1
|
@@ -4,4 +4,4 @@ export interface TuiButtonOptions extends TuiAppearanceOptions {
|
|
|
4
4
|
readonly size: TuiSizeXL | TuiSizeXS;
|
|
5
5
|
}
|
|
6
6
|
export declare const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions;
|
|
7
|
-
export declare const TUI_BUTTON_OPTIONS: import("@angular/core").InjectionToken<TuiButtonOptions>, tuiButtonOptionsProvider: (item: Partial<TuiButtonOptions> |
|
|
7
|
+
export declare const TUI_BUTTON_OPTIONS: import("@angular/core").InjectionToken<TuiButtonOptions>, tuiButtonOptionsProvider: (item: Partial<TuiButtonOptions> | (() => Partial<TuiButtonOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -3,8 +3,8 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import * as i1 from "@taiga-ui/core/directives";
|
|
4
4
|
export declare class TuiIcon {
|
|
5
5
|
protected readonly icons: TuiIcons;
|
|
6
|
+
protected readonly mask: import("@angular/core").Signal<string | null>;
|
|
6
7
|
readonly background: import("@angular/core").InputSignal<string>;
|
|
7
|
-
readonly mask: import("@angular/core").Signal<string | null>;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiIcon, never>;
|
|
9
9
|
static ɵcmp: i0.ɵɵComponentDeclaration<TuiIcon, "tui-icon:not([tuiBadge])", never, { "background": { "alias": "background"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.TuiIcons; inputs: { "iconStart": "icon"; "iconEnd": "badge"; }; outputs: {}; }]>;
|
|
10
10
|
}
|
|
@@ -10,4 +10,4 @@ export declare const TUI_NOTIFICATION_DEFAULT_OPTIONS: TuiNotificationOptions;
|
|
|
10
10
|
/**
|
|
11
11
|
* Default parameters for notification alert component
|
|
12
12
|
*/
|
|
13
|
-
export declare const TUI_NOTIFICATION_OPTIONS: import("@angular/core").InjectionToken<TuiNotificationOptions>, tuiNotificationOptionsProvider: (item: Partial<TuiNotificationOptions> |
|
|
13
|
+
export declare const TUI_NOTIFICATION_OPTIONS: import("@angular/core").InjectionToken<TuiNotificationOptions>, tuiNotificationOptionsProvider: (item: Partial<TuiNotificationOptions> | (() => Partial<TuiNotificationOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -2,4 +2,4 @@ export interface TuiScrollbarOptions {
|
|
|
2
2
|
mode: 'always' | 'hidden' | 'hover' | 'native';
|
|
3
3
|
}
|
|
4
4
|
export declare const TUI_DEFAULT_SCROLLBAR_OPTIONS: TuiScrollbarOptions;
|
|
5
|
-
export declare const TUI_SCROLLBAR_OPTIONS: import("@angular/core").InjectionToken<TuiScrollbarOptions>, tuiScrollbarOptionsProvider: (item: Partial<TuiScrollbarOptions> |
|
|
5
|
+
export declare const TUI_SCROLLBAR_OPTIONS: import("@angular/core").InjectionToken<TuiScrollbarOptions>, tuiScrollbarOptionsProvider: (item: Partial<TuiScrollbarOptions> | (() => Partial<TuiScrollbarOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import { type TuiInteractiveState } from '@taiga-ui/core/types';
|
|
2
|
-
import { type TuiAppearanceOptions } from './appearance.options';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
import * as i1 from "@taiga-ui/cdk/directives/transitioned";
|
|
5
4
|
export declare class TuiAppearance {
|
|
6
|
-
private readonly cdr;
|
|
7
|
-
private readonly el;
|
|
8
5
|
protected readonly nothing: undefined;
|
|
9
6
|
protected readonly modes: import("@angular/core").Signal<string | null>;
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly update: import("@angular/core").EffectRef;
|
|
15
|
-
set tuiAppearance(appearance: TuiAppearanceOptions['appearance']);
|
|
16
|
-
set tuiAppearanceState(state: TuiInteractiveState | null);
|
|
17
|
-
set tuiAppearanceFocus(focus: boolean | null);
|
|
18
|
-
set tuiAppearanceMode(mode: string | readonly string[] | null);
|
|
7
|
+
readonly tuiAppearance: import("@angular/core").InputSignal<"accent" | "action-destructive" | "action-grayscale" | "action" | "flat-destructive" | "flat-grayscale" | "flat" | "floating" | "glass" | "icon" | "info" | "negative" | "neutral" | "outline-destructive" | "outline-grayscale" | "outline" | "positive" | "primary-destructive" | "primary-grayscale" | "primary" | "secondary-destructive" | "secondary-grayscale" | "secondary" | "textfield" | "warning" | (Record<never, never> & string)>;
|
|
8
|
+
readonly tuiAppearanceState: import("@angular/core").InputSignal<TuiInteractiveState | null>;
|
|
9
|
+
readonly tuiAppearanceFocus: import("@angular/core").InputSignal<boolean | null>;
|
|
10
|
+
readonly tuiAppearanceMode: import("@angular/core").InputSignal<string | readonly string[] | null>;
|
|
19
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAppearance, never>;
|
|
20
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiAppearance, "[tuiAppearance]", never, { "tuiAppearance": { "alias": "tuiAppearance"; "required": false; }; "tuiAppearanceState": { "alias": "tuiAppearanceState"; "required": false; }; "tuiAppearanceFocus": { "alias": "tuiAppearanceFocus"; "required": false; }; "tuiAppearanceMode": { "alias": "tuiAppearanceMode"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.TuiTransitioned; inputs: {}; outputs: {}; }]>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiAppearance, "[tuiAppearance]", never, { "tuiAppearance": { "alias": "tuiAppearance"; "required": false; "isSignal": true; }; "tuiAppearanceState": { "alias": "tuiAppearanceState"; "required": false; "isSignal": true; }; "tuiAppearanceFocus": { "alias": "tuiAppearanceFocus"; "required": false; "isSignal": true; }; "tuiAppearanceMode": { "alias": "tuiAppearanceMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.TuiTransitioned; inputs: {}; outputs: {}; }]>;
|
|
21
13
|
}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import { type SafeResourceUrl } from '@angular/platform-browser';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Workaround for {@link TuiAvatar} to properly handle icon color in {@link TuiAppearance}
|
|
5
|
-
*/
|
|
6
|
-
type Icon = SafeResourceUrl | string | null | undefined;
|
|
7
2
|
export declare class TuiIcons {
|
|
8
3
|
private readonly resolver;
|
|
9
4
|
protected readonly nothing: undefined;
|
|
10
|
-
protected readonly
|
|
11
|
-
protected readonly
|
|
5
|
+
protected readonly start: import("@angular/core").Signal<string | null>;
|
|
6
|
+
protected readonly end: import("@angular/core").Signal<string | null>;
|
|
12
7
|
protected readonly startMode: import("@angular/core").Signal<string | undefined>;
|
|
13
8
|
protected readonly endMode: import("@angular/core").Signal<string | undefined>;
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
|
|
17
|
-
set iconEndSetter(x: string);
|
|
18
|
-
resolve(icon: Icon): string | null;
|
|
9
|
+
readonly iconEnd: import("@angular/core").InputSignal<string | null | undefined>;
|
|
10
|
+
readonly iconStart: import("@angular/core").InputSignal<string | null | undefined>;
|
|
11
|
+
resolve(icon?: string | null): string | null;
|
|
19
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiIcons, never>;
|
|
20
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiIcons, never, never, { "
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiIcons, never, never, { "iconEnd": { "alias": "iconEnd"; "required": false; "isSignal": true; }; "iconStart": { "alias": "iconStart"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
14
|
}
|
|
22
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject,
|
|
2
|
+
import { inject, computed, input, ChangeDetectionStrategy, ViewEncapsulation, Component, Pipe } from '@angular/core';
|
|
3
3
|
import * as i1 from '@taiga-ui/core/directives';
|
|
4
4
|
import { TuiIcons } from '@taiga-ui/core/directives';
|
|
5
5
|
import { tuiInjectIconResolver } from '@taiga-ui/core/tokens';
|
|
@@ -7,8 +7,8 @@ import { tuiInjectIconResolver } from '@taiga-ui/core/tokens';
|
|
|
7
7
|
class TuiIcon {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.icons = inject(TuiIcons);
|
|
10
|
-
this.background = input('');
|
|
11
10
|
this.mask = computed(() => this.icons.resolve(this.background()));
|
|
11
|
+
this.background = input('');
|
|
12
12
|
}
|
|
13
13
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
14
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiIcon, isStandalone: true, selector: "tui-icon:not([tuiBadge])", inputs: { background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--t-icon-bg": "mask()" } }, hostDirectives: [{ directive: i1.TuiIcons, inputs: ["iconStart", "icon", "iconEnd", "badge"] }], ngImport: i0, template: '', isInline: true, styles: ["tui-icon{--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;mask:var(--t-icon-bg) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%}@media (hover: hover) and (pointer: fine){tui-icon[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon[data-icon-end][data-icon-start=img]:before,tui-icon[data-icon-end][data-icon-start=font]:before{mask:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon[data-icon-end]:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-icon.mjs","sources":["../../../projects/core/components/icon/icon.component.ts","../../../projects/core/components/icon/icon.pipe.ts","../../../projects/core/components/icon/taiga-ui-core-components-icon.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiIcons} from '@taiga-ui/core/directives';\n\n@Component({\n standalone: true,\n // :not([tuiBadge]) is required to avoid double matching of TuiIcons\n selector: 'tui-icon:not([tuiBadge])',\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/icon.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiIcons,\n inputs: ['iconStart: icon', 'iconEnd: badge'],\n },\n ],\n host: {\n '[style.--t-icon-bg]': 'mask()',\n },\n})\nexport class TuiIcon {\n protected readonly icons = inject(TuiIcons);\n
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-icon.mjs","sources":["../../../projects/core/components/icon/icon.component.ts","../../../projects/core/components/icon/icon.pipe.ts","../../../projects/core/components/icon/taiga-ui-core-components-icon.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiIcons} from '@taiga-ui/core/directives';\n\n@Component({\n standalone: true,\n // :not([tuiBadge]) is required to avoid double matching of TuiIcons\n selector: 'tui-icon:not([tuiBadge])',\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/icon.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiIcons,\n inputs: ['iconStart: icon', 'iconEnd: badge'],\n },\n ],\n host: {\n '[style.--t-icon-bg]': 'mask()',\n },\n})\nexport class TuiIcon {\n protected readonly icons = inject(TuiIcons);\n protected readonly mask = computed(() => this.icons.resolve(this.background()));\n\n public readonly background = input('');\n}\n","import {Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectIconResolver} from '@taiga-ui/core/tokens';\n\n@Pipe({\n standalone: true,\n name: 'tuiIcon',\n})\nexport class TuiIconPipe implements PipeTransform {\n public readonly transform: TuiStringHandler<string> = tuiInjectIconResolver();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA4Ba,OAAO,CAAA;AAlBpB,IAAA,WAAA,GAAA;AAmBuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAE/D,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC;AACzC;+GALY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,iYAdN,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8sCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAcH,OAAO,EAAA,UAAA,EAAA,CAAA;kBAlBnB,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EAEN,QAAA,EAAA,0BAA0B,EAC1B,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAC/B,cAAA,EAAA;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,QAAQ;AACnB,4BAAA,MAAM,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;AAChD,yBAAA;qBACJ,EACK,IAAA,EAAA;AACF,wBAAA,qBAAqB,EAAE,QAAQ;AAClC,qBAAA,EAAA,MAAA,EAAA,CAAA,8sCAAA,CAAA,EAAA;;;MClBQ,WAAW,CAAA;AAJxB,IAAA,WAAA,GAAA;QAKoB,IAAS,CAAA,SAAA,GAA6B,qBAAqB,EAAE;AAChF;+GAFY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,CAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,SAAS;AAClB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, Input, Directive } from '@angular/core';
|
|
3
|
-
import { tuiWithStyles, tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
3
|
+
import { tuiWithStyles, tuiSetSignal, tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
4
|
import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
|
|
5
5
|
import { tuiLinkOptionsProvider } from '@taiga-ui/core/components/link';
|
|
6
6
|
import * as i2 from '@taiga-ui/core/directives/appearance';
|
|
@@ -57,7 +57,8 @@ class TuiNotification {
|
|
|
57
57
|
this.refresh();
|
|
58
58
|
}
|
|
59
59
|
refresh() {
|
|
60
|
-
|
|
60
|
+
// TODO: Refactor to tuiDirectiveBinding
|
|
61
|
+
tuiSetSignal(this.icons.iconStart, tuiIsString(this.icon) ? this.icon : this.icon(this.appearance));
|
|
61
62
|
}
|
|
62
63
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNotification, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
63
64
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", 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, type 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 {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n type OnChanges,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiIsString
|
|
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, type 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 {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n type OnChanges,\n type OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {\n tuiIsString,\n tuiSetSignal,\n tuiWithStyles,\n} 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 // TODO: Refactor to tuiDirectiveBinding\n tuiSetSignal(\n this.icons.iconStart,\n tuiIsString(this.icon) ? this.icon : this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AEG;;;;"}
|
|
@@ -59,7 +59,7 @@ class TuiRoot {
|
|
|
59
59
|
: !this.isChildRoot;
|
|
60
60
|
}
|
|
61
61
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRoot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
62
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.52.0-canary.
|
|
62
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiRoot, isStandalone: true, selector: "tui-root", host: { attributes: { "data-tui-version": "4.52.0-canary.932d3ef" }, 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\">\n <ng-content />\n</div>\n@if (top()) {\n @if (scrollbars) {\n <tui-scroll-controls 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}\n", styles: ["@keyframes tuiSkeletonVibe{to{opacity:.5}}@keyframes tuiPresent{to{content:\"\"}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:ease-in-out;pointer-events:none}.tui-leave{animation-direction:reverse}\n", ".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}:root{--tui-inline-start: left;--tui-inline-end: right;--tui-inline: 1}[dir=rtl]{--tui-inline-start: right;--tui-inline-end: left;--tui-inline: -1}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: "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 }); }
|
|
63
63
|
}
|
|
64
64
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRoot, decorators: [{
|
|
65
65
|
type: Component,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { tuiProvide, tuiWithStyles, tuiIsString, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, ChangeDetectionStrategy, ViewEncapsulation, Component,
|
|
4
|
-
import { TUI_ALLOW_SIGNAL_WRITES } from '@taiga-ui/cdk/constants';
|
|
3
|
+
import { InjectionToken, ChangeDetectionStrategy, ViewEncapsulation, Component, computed, input, inject, Directive } from '@angular/core';
|
|
5
4
|
import * as i1 from '@taiga-ui/cdk/directives/transitioned';
|
|
6
5
|
import { TuiTransitioned } from '@taiga-ui/cdk/directives/transitioned';
|
|
7
|
-
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
8
6
|
|
|
9
7
|
const TUI_APPEARANCE_DEFAULT_OPTIONS = {
|
|
10
8
|
appearance: '',
|
|
@@ -28,39 +26,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
28
26
|
}] });
|
|
29
27
|
class TuiAppearance {
|
|
30
28
|
constructor() {
|
|
31
|
-
this.cdr = inject(ChangeDetectorRef, { skipSelf: true });
|
|
32
|
-
this.el = tuiInjectElement();
|
|
33
29
|
this.nothing = tuiWithStyles(TuiAppearanceStyles);
|
|
34
|
-
this.modes = computed((mode = this.
|
|
35
|
-
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.mode = signal(null);
|
|
40
|
-
// TODO: Remove when Angular is updated
|
|
41
|
-
this.update = effect(() => {
|
|
42
|
-
this.mode();
|
|
43
|
-
this.state();
|
|
44
|
-
this.focus();
|
|
45
|
-
if (this.el.matches('tui-textfield[multi]')) {
|
|
46
|
-
this.cdr.detectChanges();
|
|
47
|
-
}
|
|
48
|
-
}, TUI_ALLOW_SIGNAL_WRITES);
|
|
49
|
-
}
|
|
50
|
-
set tuiAppearance(appearance) {
|
|
51
|
-
this.appearance.set(appearance);
|
|
52
|
-
}
|
|
53
|
-
set tuiAppearanceState(state) {
|
|
54
|
-
this.state.set(state);
|
|
55
|
-
}
|
|
56
|
-
set tuiAppearanceFocus(focus) {
|
|
57
|
-
this.focus.set(focus);
|
|
58
|
-
}
|
|
59
|
-
set tuiAppearanceMode(mode) {
|
|
60
|
-
this.mode.set(mode);
|
|
30
|
+
this.modes = computed((mode = this.tuiAppearanceMode()) => !mode || tuiIsString(mode) ? mode : mode.join(' '));
|
|
31
|
+
this.tuiAppearance = input(inject(TUI_APPEARANCE_OPTIONS).appearance);
|
|
32
|
+
this.tuiAppearanceState = input(null);
|
|
33
|
+
this.tuiAppearanceFocus = input(null);
|
|
34
|
+
this.tuiAppearanceMode = input(null);
|
|
61
35
|
}
|
|
62
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAppearance, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
63
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
37
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiAppearance, isStandalone: true, selector: "[tuiAppearance]", inputs: { tuiAppearance: { classPropertyName: "tuiAppearance", publicName: "tuiAppearance", isSignal: true, isRequired: false, transformFunction: null }, tuiAppearanceState: { classPropertyName: "tuiAppearanceState", publicName: "tuiAppearanceState", isSignal: true, isRequired: false, transformFunction: null }, tuiAppearanceFocus: { classPropertyName: "tuiAppearanceFocus", publicName: "tuiAppearanceFocus", isSignal: true, isRequired: false, transformFunction: null }, tuiAppearanceMode: { classPropertyName: "tuiAppearanceMode", publicName: "tuiAppearanceMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiAppearance": "" }, properties: { "attr.data-appearance": "tuiAppearance()", "attr.data-state": "tuiAppearanceState()", "attr.data-focus": "tuiAppearanceFocus()", "attr.data-mode": "modes()" } }, hostDirectives: [{ directive: i1.TuiTransitioned }], ngImport: i0 }); }
|
|
64
38
|
}
|
|
65
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAppearance, decorators: [{
|
|
66
40
|
type: Directive,
|
|
@@ -70,33 +44,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
70
44
|
hostDirectives: [TuiTransitioned],
|
|
71
45
|
host: {
|
|
72
46
|
tuiAppearance: '',
|
|
73
|
-
'[attr.data-appearance]': '
|
|
74
|
-
'[attr.data-state]': '
|
|
75
|
-
'[attr.data-focus]': '
|
|
47
|
+
'[attr.data-appearance]': 'tuiAppearance()',
|
|
48
|
+
'[attr.data-state]': 'tuiAppearanceState()',
|
|
49
|
+
'[attr.data-focus]': 'tuiAppearanceFocus()',
|
|
76
50
|
'[attr.data-mode]': 'modes()',
|
|
77
51
|
},
|
|
78
52
|
}]
|
|
79
|
-
}]
|
|
80
|
-
type: Input
|
|
81
|
-
}], tuiAppearanceState: [{
|
|
82
|
-
type: Input
|
|
83
|
-
}], tuiAppearanceFocus: [{
|
|
84
|
-
type: Input
|
|
85
|
-
}], tuiAppearanceMode: [{
|
|
86
|
-
type: Input
|
|
87
|
-
}] } });
|
|
53
|
+
}] });
|
|
88
54
|
|
|
89
55
|
function tuiAppearance(value, options) {
|
|
90
|
-
return tuiDirectiveBinding(TuiAppearance, '
|
|
56
|
+
return tuiDirectiveBinding(TuiAppearance, 'tuiAppearance', value, options);
|
|
91
57
|
}
|
|
92
58
|
function tuiAppearanceState(value, options) {
|
|
93
|
-
return tuiDirectiveBinding(TuiAppearance, '
|
|
59
|
+
return tuiDirectiveBinding(TuiAppearance, 'tuiAppearanceState', value, options);
|
|
94
60
|
}
|
|
95
61
|
function tuiAppearanceFocus(value, options) {
|
|
96
|
-
return tuiDirectiveBinding(TuiAppearance, '
|
|
62
|
+
return tuiDirectiveBinding(TuiAppearance, 'tuiAppearanceFocus', value, options);
|
|
97
63
|
}
|
|
98
64
|
function tuiAppearanceMode(value, options) {
|
|
99
|
-
return tuiDirectiveBinding(TuiAppearance, '
|
|
65
|
+
return tuiDirectiveBinding(TuiAppearance, 'tuiAppearanceMode', value, options);
|
|
100
66
|
}
|
|
101
67
|
|
|
102
68
|
class TuiWithAppearance {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-directives-appearance.mjs","sources":["../../../projects/core/directives/appearance/appearance.options.ts","../../../projects/core/directives/appearance/appearance.directive.ts","../../../projects/core/directives/appearance/appearance.bindings.ts","../../../projects/core/directives/appearance/with-appearance.ts","../../../projects/core/directives/appearance/taiga-ui-core-directives-appearance.ts"],"sourcesContent":["import {type ExistingProvider, InjectionToken, type ProviderToken} from '@angular/core';\nimport {type TuiLooseUnion} from '@taiga-ui/cdk/types';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\n/**\n * Bundled appearances for autocomplete purposes, not exported on purpose\n */\ntype Appearance = TuiLooseUnion<\n | 'accent'\n | 'action-destructive'\n | 'action-grayscale'\n | 'action'\n | 'flat-destructive'\n | 'flat-grayscale'\n | 'flat'\n | 'floating'\n | 'glass'\n | 'icon'\n | 'info'\n | 'negative'\n | 'neutral'\n | 'outline-destructive'\n | 'outline-grayscale'\n | 'outline'\n | 'positive'\n | 'primary-destructive'\n | 'primary-grayscale'\n | 'primary'\n | 'secondary-destructive'\n | 'secondary-grayscale'\n | 'secondary'\n | 'textfield'\n | 'warning'\n>;\n\nexport interface TuiAppearanceOptions {\n readonly appearance: Appearance;\n}\n\nexport const TUI_APPEARANCE_DEFAULT_OPTIONS: TuiAppearanceOptions = {\n appearance: '',\n};\n\nexport const TUI_APPEARANCE_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_APPEARANCE_OPTIONS' : '',\n {\n factory: () => TUI_APPEARANCE_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiAppearanceOptionsProvider(\n token: ProviderToken<TuiAppearanceOptions>,\n): ExistingProvider {\n return tuiProvide(TUI_APPEARANCE_OPTIONS, token);\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n Directive,\n effect,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_ALLOW_SIGNAL_WRITES} from '@taiga-ui/cdk/constants';\nimport {TuiTransitioned} from '@taiga-ui/cdk/directives/transitioned';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsString, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TUI_APPEARANCE_OPTIONS, type TuiAppearanceOptions} from './appearance.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/appearance.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-appearance',\n },\n})\nclass TuiAppearanceStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiAppearance]',\n hostDirectives: [TuiTransitioned],\n host: {\n tuiAppearance: '',\n '[attr.data-appearance]': 'appearance()',\n '[attr.data-state]': 'state()',\n '[attr.data-focus]': 'focus()',\n '[attr.data-mode]': 'modes()',\n },\n})\nexport class TuiAppearance {\n private readonly cdr = inject(ChangeDetectorRef, {skipSelf: true});\n private readonly el = tuiInjectElement();\n\n protected readonly nothing = tuiWithStyles(TuiAppearanceStyles);\n protected readonly modes = computed((mode = this.mode()) =>\n !mode || tuiIsString(mode) ? mode : mode.join(' '),\n );\n\n // TODO: refactor to signal inputs after Angular update\n public readonly appearance = signal(inject(TUI_APPEARANCE_OPTIONS).appearance);\n public readonly state = signal<TuiInteractiveState | null>(null);\n public readonly focus = signal<boolean | null>(null);\n public readonly mode = signal<string | readonly string[] | null>(null);\n\n // TODO: Remove when Angular is updated\n public readonly update = effect(() => {\n this.mode();\n this.state();\n this.focus();\n\n if (this.el.matches('tui-textfield[multi]')) {\n this.cdr.detectChanges();\n }\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n @Input()\n public set tuiAppearance(appearance: TuiAppearanceOptions['appearance']) {\n this.appearance.set(appearance);\n }\n\n @Input()\n public set tuiAppearanceState(state: TuiInteractiveState | null) {\n this.state.set(state);\n }\n\n @Input()\n public set tuiAppearanceFocus(focus: boolean | null) {\n this.focus.set(focus);\n }\n\n @Input()\n public set tuiAppearanceMode(mode: string | readonly string[] | null) {\n this.mode.set(mode);\n }\n}\n","import {type InjectOptions, type Signal, type WritableSignal} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TuiAppearance} from './appearance.directive';\n\ntype A = string;\n\ntype S = TuiInteractiveState | null;\n\ntype F = boolean | null;\n\ntype M = string | readonly string[] | null;\n\nexport function tuiAppearance(\n value: A | WritableSignal<A>,\n options?: InjectOptions,\n): WritableSignal<A>;\nexport function tuiAppearance(value: Signal<A>, options?: InjectOptions): Signal<A>;\nexport function tuiAppearance(value: A | Signal<A>, options?: InjectOptions): Signal<A> {\n return tuiDirectiveBinding(TuiAppearance, 'appearance', value, options);\n}\n\nexport function tuiAppearanceState(\n value: S | WritableSignal<S>,\n options?: InjectOptions,\n): WritableSignal<S>;\nexport function tuiAppearanceState(value: Signal<S>, options?: InjectOptions): Signal<S>;\nexport function tuiAppearanceState(\n value: S | Signal<S>,\n options?: InjectOptions,\n): Signal<S> {\n return tuiDirectiveBinding(TuiAppearance, 'state', value, options);\n}\n\nexport function tuiAppearanceFocus(\n value: F | WritableSignal<F>,\n options?: InjectOptions,\n): WritableSignal<F>;\nexport function tuiAppearanceFocus(value: Signal<F>, options?: InjectOptions): Signal<F>;\nexport function tuiAppearanceFocus(\n value: F | Signal<F>,\n options?: InjectOptions,\n): Signal<F> {\n return tuiDirectiveBinding(TuiAppearance, 'focus', value, options);\n}\n\nexport function tuiAppearanceMode(\n value: M | WritableSignal<M>,\n options?: InjectOptions,\n): WritableSignal<M>;\nexport function tuiAppearanceMode(value: Signal<M>, options?: InjectOptions): Signal<M>;\nexport function tuiAppearanceMode(\n value: M | Signal<M>,\n options?: InjectOptions,\n): Signal<M> {\n return tuiDirectiveBinding(TuiAppearance, 'mode', value, options);\n}\n","import {Directive} from '@angular/core';\n\nimport {TuiAppearance} from './appearance.directive';\n\n@Directive({\n standalone: true,\n hostDirectives: [\n {\n directive: TuiAppearance,\n inputs: [\n 'tuiAppearance: appearance',\n 'tuiAppearanceState',\n 'tuiAppearanceFocus',\n 'tuiAppearanceMode',\n ],\n },\n ],\n})\nexport class TuiWithAppearance {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TuiAppearance"],"mappings":";;;;;;;;AAuCa,MAAA,8BAA8B,GAAyB;AAChE,IAAA,UAAU,EAAE,EAAE;;AAGL,MAAA,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,wBAAwB,GAAG,EAAE,EACzC;AACI,IAAA,OAAO,EAAE,MAAM,8BAA8B;AAChD,CAAA;AAGC,SAAU,4BAA4B,CACxC,KAA0C,EAAA;AAE1C,IAAA,OAAO,UAAU,CAAC,sBAAsB,EAAE,KAAK,CAAC;AACpD;;AClCA,MAUM,mBAAmB,CAAA;+GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,oHARX,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+gCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAQV,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAVxB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,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,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,aAAa;AACxB,4BAAA,MAAM,EAAE;gCACJ,2BAA2B;gCAC3B,oBAAoB;gCACpB,oBAAoB;gCACpB,mBAAmB;AACtB,6BAAA;AACJ,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-directives-appearance.mjs","sources":["../../../projects/core/directives/appearance/appearance.options.ts","../../../projects/core/directives/appearance/appearance.directive.ts","../../../projects/core/directives/appearance/appearance.bindings.ts","../../../projects/core/directives/appearance/with-appearance.ts","../../../projects/core/directives/appearance/taiga-ui-core-directives-appearance.ts"],"sourcesContent":["import {type ExistingProvider, InjectionToken, type ProviderToken} from '@angular/core';\nimport {type TuiLooseUnion} from '@taiga-ui/cdk/types';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\n/**\n * Bundled appearances for autocomplete purposes, not exported on purpose\n */\ntype Appearance = TuiLooseUnion<\n | 'accent'\n | 'action-destructive'\n | 'action-grayscale'\n | 'action'\n | 'flat-destructive'\n | 'flat-grayscale'\n | 'flat'\n | 'floating'\n | 'glass'\n | 'icon'\n | 'info'\n | 'negative'\n | 'neutral'\n | 'outline-destructive'\n | 'outline-grayscale'\n | 'outline'\n | 'positive'\n | 'primary-destructive'\n | 'primary-grayscale'\n | 'primary'\n | 'secondary-destructive'\n | 'secondary-grayscale'\n | 'secondary'\n | 'textfield'\n | 'warning'\n>;\n\nexport interface TuiAppearanceOptions {\n readonly appearance: Appearance;\n}\n\nexport const TUI_APPEARANCE_DEFAULT_OPTIONS: TuiAppearanceOptions = {\n appearance: '',\n};\n\nexport const TUI_APPEARANCE_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_APPEARANCE_OPTIONS' : '',\n {\n factory: () => TUI_APPEARANCE_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiAppearanceOptionsProvider(\n token: ProviderToken<TuiAppearanceOptions>,\n): ExistingProvider {\n return tuiProvide(TUI_APPEARANCE_OPTIONS, token);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiTransitioned} from '@taiga-ui/cdk/directives/transitioned';\nimport {tuiIsString, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TUI_APPEARANCE_OPTIONS} from './appearance.options';\n\n@Component({\n standalone: true,\n template: '',\n styles: ['@import \"@taiga-ui/core/styles/components/appearance.less\";'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-appearance',\n },\n})\nclass TuiAppearanceStyles {}\n\n@Directive({\n standalone: true,\n selector: '[tuiAppearance]',\n hostDirectives: [TuiTransitioned],\n host: {\n tuiAppearance: '',\n '[attr.data-appearance]': 'tuiAppearance()',\n '[attr.data-state]': 'tuiAppearanceState()',\n '[attr.data-focus]': 'tuiAppearanceFocus()',\n '[attr.data-mode]': 'modes()',\n },\n})\nexport class TuiAppearance {\n protected readonly nothing = tuiWithStyles(TuiAppearanceStyles);\n protected readonly modes = computed((mode = this.tuiAppearanceMode()) =>\n !mode || tuiIsString(mode) ? mode : mode.join(' '),\n );\n\n public readonly tuiAppearance = input(inject(TUI_APPEARANCE_OPTIONS).appearance);\n public readonly tuiAppearanceState = input<TuiInteractiveState | null>(null);\n public readonly tuiAppearanceFocus = input<boolean | null>(null);\n public readonly tuiAppearanceMode = input<string | readonly string[] | null>(null);\n}\n","import {type InjectOptions, type Signal, type WritableSignal} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiInteractiveState} from '@taiga-ui/core/types';\n\nimport {TuiAppearance} from './appearance.directive';\n\ntype A = string;\n\ntype S = TuiInteractiveState | null;\n\ntype F = boolean | null;\n\ntype M = string | readonly string[] | null;\n\nexport function tuiAppearance(\n value: A | WritableSignal<A>,\n options?: InjectOptions,\n): WritableSignal<A>;\nexport function tuiAppearance(value: Signal<A>, options?: InjectOptions): Signal<A>;\nexport function tuiAppearance(value: A | Signal<A>, options?: InjectOptions): Signal<A> {\n return tuiDirectiveBinding(TuiAppearance, 'tuiAppearance', value, options);\n}\n\nexport function tuiAppearanceState(\n value: S | WritableSignal<S>,\n options?: InjectOptions,\n): WritableSignal<S>;\nexport function tuiAppearanceState(value: Signal<S>, options?: InjectOptions): Signal<S>;\nexport function tuiAppearanceState(\n value: S | Signal<S>,\n options?: InjectOptions,\n): Signal<S> {\n return tuiDirectiveBinding(TuiAppearance, 'tuiAppearanceState', value, options);\n}\n\nexport function tuiAppearanceFocus(\n value: F | WritableSignal<F>,\n options?: InjectOptions,\n): WritableSignal<F>;\nexport function tuiAppearanceFocus(value: Signal<F>, options?: InjectOptions): Signal<F>;\nexport function tuiAppearanceFocus(\n value: F | Signal<F>,\n options?: InjectOptions,\n): Signal<F> {\n return tuiDirectiveBinding(TuiAppearance, 'tuiAppearanceFocus', value, options);\n}\n\nexport function tuiAppearanceMode(\n value: M | WritableSignal<M>,\n options?: InjectOptions,\n): WritableSignal<M>;\nexport function tuiAppearanceMode(value: Signal<M>, options?: InjectOptions): Signal<M>;\nexport function tuiAppearanceMode(\n value: M | Signal<M>,\n options?: InjectOptions,\n): Signal<M> {\n return tuiDirectiveBinding(TuiAppearance, 'tuiAppearanceMode', value, options);\n}\n","import {Directive} from '@angular/core';\n\nimport {TuiAppearance} from './appearance.directive';\n\n@Directive({\n standalone: true,\n hostDirectives: [\n {\n directive: TuiAppearance,\n inputs: [\n 'tuiAppearance: appearance',\n 'tuiAppearanceState',\n 'tuiAppearanceFocus',\n 'tuiAppearanceMode',\n ],\n },\n ],\n})\nexport class TuiWithAppearance {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TuiAppearance"],"mappings":";;;;;;AAuCa,MAAA,8BAA8B,GAAyB;AAChE,IAAA,UAAU,EAAE,EAAE;;AAGL,MAAA,sBAAsB,GAAG,IAAI,cAAc,CACpD,SAAS,GAAG,wBAAwB,GAAG,EAAE,EACzC;AACI,IAAA,OAAO,EAAE,MAAM,8BAA8B;AAChD,CAAA;AAGC,SAAU,4BAA4B,CACxC,KAA0C,EAAA;AAE1C,IAAA,OAAO,UAAU,CAAC,sBAAsB,EAAE,KAAK,CAAC;AACpD;;ACvCA,MAUM,mBAAmB,CAAA;+GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,oHARX,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+gCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAQV,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAVxB,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,gBAAgB;AAC1B,qBAAA,EAAA,MAAA,EAAA,CAAA,+gCAAA,CAAA,EAAA;;MAgBQ,aAAa,CAAA;AAZ1B,IAAA,WAAA,GAAA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E,OAAO,CAAC;AACnF;AAOgB,SAAA,iBAAiB,CAC7B,KAAoB,EACpB,OAAuB,EAAA;IAEvB,OAAO,mBAAmB,CAAC,aAAa,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,CAAC;AAClF;;MCvCa,iBAAiB,CAAA;+GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,aAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,YAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,aAAa;AACxB,4BAAA,MAAM,EAAE;gCACJ,2BAA2B;gCAC3B,oBAAoB;gCACpB,oBAAoB;gCACpB,mBAAmB;AACtB,6BAAA;AACJ,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1,48 +1,40 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, ViewEncapsulation, Component, computed,
|
|
2
|
+
import { ChangeDetectionStrategy, ViewEncapsulation, Component, computed, input, inject, Directive } from '@angular/core';
|
|
3
3
|
import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
4
|
-
import { tuiInjectIconResolver, tuiGetIconMode,
|
|
4
|
+
import { tuiInjectIconResolver, tuiGetIconMode, TUI_ICON_END, TUI_ICON_START } from '@taiga-ui/core/tokens';
|
|
5
5
|
|
|
6
|
+
const OPT = { self: true, optional: true };
|
|
6
7
|
class TuiIconsStyles {
|
|
7
8
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIconsStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiIconsStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-icons" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiIcons]{--t-icon-start: none;--t-icon-end: none}[tuiIcons]:before,[tuiIcons]:after{content:\"\";inline-size:1em;block-size:1em;line-height:1em;font-size:var(--tui-icon-size, 1.5rem);flex-shrink:0;box-sizing:content-box;background:currentColor}[tuiIcons]:before{display:var(--t-icon-start, none);mask:var(--t-icon-start) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%),100% padding-box}[tuiIcons]:after{display:var(--t-icon-end, none);mask:var(--t-icon-end) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%) padding-box}[tuiIcons][data-icon-start=img]:before{mask:none;background:var(--t-icon-start) no-repeat center /
|
|
9
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiIconsStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-icons" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiIcons]{--t-icon-start: none;--t-icon-end: none}[tuiIcons]:before,[tuiIcons]:after{content:\"\";inline-size:1em;block-size:1em;line-height:1em;font-size:var(--tui-icon-size, 1.5rem);flex-shrink:0;box-sizing:content-box;background:currentColor}[tuiIcons]:before{display:var(--t-icon-start, none);mask:var(--t-icon-start) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%),100% padding-box}[tuiIcons]:after{display:var(--t-icon-end, none);mask:var(--t-icon-end) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%) padding-box}[tuiIcons][data-icon-start=img]:before{mask:none;background:var(--t-icon-start) no-repeat center / 1em padding-box}[tuiIcons][data-icon-end=img]:after{mask:none;background:var(--t-icon-end) no-repeat center / 1em padding-box}[tuiIcons][data-icon-start=font]:before,[tuiIcons][data-icon-end=font]:after{display:grid;mask:none;background:none;font:1.3em/1 var(--tui-font-icon, inherit);text-align:center;place-content:center;text-transform:none}[tuiIcons][data-icon-start=font]:before{content:var(--t-icon-start)}[tuiIcons][data-icon-end=font]:after{content:var(--t-icon-end)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
9
10
|
}
|
|
10
11
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIconsStyles, decorators: [{
|
|
11
12
|
type: Component,
|
|
12
13
|
args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
13
14
|
class: 'tui-icons',
|
|
14
|
-
}, styles: ["[tuiIcons]{--t-icon-start: none;--t-icon-end: none}[tuiIcons]:before,[tuiIcons]:after{content:\"\";inline-size:1em;block-size:1em;line-height:1em;font-size:var(--tui-icon-size, 1.5rem);flex-shrink:0;box-sizing:content-box;background:currentColor}[tuiIcons]:before{display:var(--t-icon-start, none);mask:var(--t-icon-start) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%),100% padding-box}[tuiIcons]:after{display:var(--t-icon-end, none);mask:var(--t-icon-end) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%) padding-box}[tuiIcons][data-icon-start=img]:before{mask:none;background:var(--t-icon-start) no-repeat center /
|
|
15
|
+
}, styles: ["[tuiIcons]{--t-icon-start: none;--t-icon-end: none}[tuiIcons]:before,[tuiIcons]:after{content:\"\";inline-size:1em;block-size:1em;line-height:1em;font-size:var(--tui-icon-size, 1.5rem);flex-shrink:0;box-sizing:content-box;background:currentColor}[tuiIcons]:before{display:var(--t-icon-start, none);mask:var(--t-icon-start) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%),100% padding-box}[tuiIcons]:after{display:var(--t-icon-end, none);mask:var(--t-icon-end) no-repeat center / calc(min(1em,100%) + 10 * var(--tui-stroke-width, .125rem)) min(1em,100%) padding-box}[tuiIcons][data-icon-start=img]:before{mask:none;background:var(--t-icon-start) no-repeat center / 1em padding-box}[tuiIcons][data-icon-end=img]:after{mask:none;background:var(--t-icon-end) no-repeat center / 1em padding-box}[tuiIcons][data-icon-start=font]:before,[tuiIcons][data-icon-end=font]:after{display:grid;mask:none;background:none;font:1.3em/1 var(--tui-font-icon, inherit);text-align:center;place-content:center;text-transform:none}[tuiIcons][data-icon-start=font]:before{content:var(--t-icon-start)}[tuiIcons][data-icon-end=font]:after{content:var(--t-icon-end)}\n"] }]
|
|
15
16
|
}] });
|
|
16
17
|
class TuiIcons {
|
|
17
18
|
constructor() {
|
|
18
19
|
this.resolver = tuiInjectIconResolver();
|
|
19
20
|
this.nothing = tuiWithStyles(TuiIconsStyles);
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.startMode = computed(() => tuiGetIconMode(this.iconStart()
|
|
21
|
+
this.start = computed(() => this.resolve(this.iconStart()));
|
|
22
|
+
this.end = computed(() => this.resolve(this.iconEnd()));
|
|
23
|
+
this.startMode = computed(() => tuiGetIconMode(this.iconStart()));
|
|
23
24
|
this.endMode = computed(() => tuiGetIconMode(this.iconEnd()));
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
}
|
|
27
|
-
// TODO(v5): use signal inputs
|
|
28
|
-
set iconStartSetter(x) {
|
|
29
|
-
this.iconStart.set(x);
|
|
30
|
-
}
|
|
31
|
-
// TODO(v5): use signal inputs
|
|
32
|
-
set iconEndSetter(x) {
|
|
33
|
-
this.iconEnd.set(x);
|
|
25
|
+
this.iconEnd = input(inject(TUI_ICON_END, OPT));
|
|
26
|
+
this.iconStart = input(inject(TUI_ICON_START, OPT));
|
|
34
27
|
}
|
|
35
28
|
resolve(icon) {
|
|
36
29
|
if (!icon) {
|
|
37
30
|
return null;
|
|
38
31
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
: `url(${this.resolver(iconStr)})`;
|
|
32
|
+
return tuiGetIconMode(icon) === 'font'
|
|
33
|
+
? `'${this.resolver(icon)}'`
|
|
34
|
+
: `url(${this.resolver(icon)})`;
|
|
43
35
|
}
|
|
44
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIcons, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
45
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
37
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiIcons, isStandalone: true, inputs: { iconEnd: { classPropertyName: "iconEnd", publicName: "iconEnd", isSignal: true, isRequired: false, transformFunction: null }, iconStart: { classPropertyName: "iconStart", publicName: "iconStart", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiIcons": "" }, properties: { "style.--t-icon-start": "start()", "style.--t-icon-end": "end()", "attr.data-icon-start": "startMode()", "attr.data-icon-end": "endMode()" } }, ngImport: i0 }); }
|
|
46
38
|
}
|
|
47
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIcons, decorators: [{
|
|
48
40
|
type: Directive,
|
|
@@ -50,19 +42,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
50
42
|
standalone: true,
|
|
51
43
|
host: {
|
|
52
44
|
tuiIcons: '',
|
|
53
|
-
'[style.--t-icon-start]': '
|
|
54
|
-
'[style.--t-icon-end]': '
|
|
45
|
+
'[style.--t-icon-start]': 'start()',
|
|
46
|
+
'[style.--t-icon-end]': 'end()',
|
|
55
47
|
'[attr.data-icon-start]': 'startMode()',
|
|
56
48
|
'[attr.data-icon-end]': 'endMode()',
|
|
57
49
|
},
|
|
58
50
|
}]
|
|
59
|
-
}]
|
|
60
|
-
type: Input,
|
|
61
|
-
args: ['iconStart']
|
|
62
|
-
}], iconEndSetter: [{
|
|
63
|
-
type: Input,
|
|
64
|
-
args: ['iconEnd']
|
|
65
|
-
}] } });
|
|
51
|
+
}] });
|
|
66
52
|
|
|
67
53
|
class TuiWithIcons {
|
|
68
54
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiWithIcons, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -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 computed,\n Directive,\n inject,\n
|
|
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 computed,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TUI_ICON_END,\n TUI_ICON_START,\n tuiGetIconMode,\n tuiInjectIconResolver,\n} from '@taiga-ui/core/tokens';\n\nconst OPT = {self: true, optional: true} as const;\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]': 'start()',\n '[style.--t-icon-end]': 'end()',\n '[attr.data-icon-start]': 'startMode()',\n '[attr.data-icon-end]': 'endMode()',\n },\n})\nexport class TuiIcons {\n private readonly resolver: TuiStringHandler<string> = tuiInjectIconResolver();\n\n protected readonly nothing = tuiWithStyles(TuiIconsStyles);\n protected readonly start = computed(() => this.resolve(this.iconStart()));\n protected readonly end = computed(() => this.resolve(this.iconEnd()));\n protected readonly startMode = computed(() => tuiGetIconMode(this.iconStart()));\n protected readonly endMode = computed(() => tuiGetIconMode(this.iconEnd()));\n\n public readonly iconEnd = input(inject<string | undefined>(TUI_ICON_END, OPT));\n public readonly iconStart = input(inject<string | undefined>(TUI_ICON_START, OPT));\n\n public resolve(icon?: string | null): string | null {\n if (!icon) {\n return null;\n }\n\n return tuiGetIconMode(icon) === 'font'\n ? `'${this.resolver(icon)}'`\n : `url(${this.resolver(icon)})`;\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":";;;;;AAkBA,MAAM,GAAG,GAAG,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAU;AAEjD,MAUM,cAAc,CAAA;+GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAA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ACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,QAAQ,EAAE,EAAE;AACZ,wBAAA,wBAAwB,EAAE,SAAS;AACnC,wBAAA,sBAAsB,EAAE,OAAO;AAC/B,wBAAA,wBAAwB,EAAE,aAAa;AACvC,wBAAA,sBAAsB,EAAE,WAAW;AACtC,qBAAA;AACJ,iBAAA;;;MC5BY,YAAY,CAAA;+GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,QAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBATxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,QAAQ;AACnB,4BAAA,MAAM,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;AACnC,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from '@taiga-ui/core/pipes/auto-color';
|
|
2
2
|
export * from '@taiga-ui/core/pipes/calendar-sheet';
|
|
3
|
-
export * from '@taiga-ui/core/pipes/fallback-src';
|
|
4
3
|
export * from '@taiga-ui/core/pipes/flag';
|
|
5
4
|
export * from '@taiga-ui/core/pipes/format-date';
|
|
6
5
|
export * from '@taiga-ui/core/pipes/format-number';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-pipes.mjs","sources":["../../../projects/core/pipes/taiga-ui-core-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-pipes.mjs","sources":["../../../projects/core/pipes/taiga-ui-core-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;AAEG"}
|
|
@@ -207,7 +207,7 @@ const TUI_ICON_RESOLVER = new InjectionToken(ngDevMode ? 'TUI_ICON_RESOLVER' : '
|
|
|
207
207
|
*/
|
|
208
208
|
const TUI_ICON_START_RESOLVER = TUI_ICON_RESOLVER;
|
|
209
209
|
function tuiGetIconMode(icon) {
|
|
210
|
-
return icon?.
|
|
210
|
+
return icon?.match(/@([^.]*)\./)?.[1] || icon || undefined;
|
|
211
211
|
}
|
|
212
212
|
function tuiInjectIconResolver() {
|
|
213
213
|
const icons = inject(TUI_ICON_REGISTRY);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/day-type-handler.ts","../../../projects/core/tokens/first-day-of-week.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/scroll-ref.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/spin-icons.ts","../../../projects/core/tokens/theme.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {\n factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1),\n },\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n}\n\nexport const TUI_COMMON_ICONS = new InjectionToken(ngDevMode ? 'TUI_COMMON_ICONS' : '', {\n factory: () => COMMON_ICONS,\n});\n\nexport function tuiCommonIconsProvider(icons: Partial<TuiCommonIcons>): Provider {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n","import {\n effect,\n inject,\n InjectionToken,\n signal,\n untracked,\n type WritableSignal,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {\n factory: () => TUI_DARK_MODE_DEFAULT_KEY,\n },\n);\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n let automatic = true;\n\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(Boolean((saved && JSON.parse(saved)) ?? media.matches));\n\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n automatic = true;\n result.set(media.matches);\n });\n\n untracked(() => {\n effect(() => {\n const value = String(result());\n\n if (automatic) {\n automatic = false;\n } else {\n storage?.setItem(key, value);\n }\n });\n });\n\n return Object.assign(result, {\n reset: () => {\n storage?.removeItem(key);\n automatic = true;\n result.set(media.matches);\n },\n });\n },\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\nimport {map, type Observable, of} from 'rxjs';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'DMY',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Observable<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_DATE_FORMAT),\n },\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_DATE_FORMAT]],\n useFactory: (\n parent: Observable<TuiDateFormatSettings> | null,\n ): Observable<TuiDateFormatSettings> =>\n (parent || of(TUI_DEFAULT_DATE_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {type TuiDay} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nexport const TUI_DAY_TYPE_HANDLER = new InjectionToken<TuiHandler<TuiDay, string>>(\n ngDevMode ? 'TUI_DAY_TYPE_HANDLER' : '',\n {\n factory: () => (day) => (day.isWeekend ? 'weekend' : 'weekday'),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk/date-time';\n\n/**\n * The first day of the week index\n */\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<0 | 1 | 2 | 3 | 4 | 5 | 6>(\n ngDevMode ? 'TUI_FIRST_DAY_OF_WEEK' : '',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {\n factory: tuiExtractI18n('nothingFoundMessage'),\n },\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {\n factory: tuiExtractI18n('defaultErrorMessage'),\n },\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {\n factory: tuiExtractI18n('shortWeekDays'),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {\n factory: () => ({}),\n },\n);\n\n/**\n * @deprecated: use {@link TUI_ICON_REGISTRY}\n */\nexport const TUI_ICON_STARTS = TUI_ICON_REGISTRY;\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `\"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}\"`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon.replace(/@[a-zA-Z]+\\./, '').replaceAll('.', '/')}.svg`;\n },\n },\n);\n\n/**\n * @deprecated use {@link TUI_ICON_RESOLVER}\n */\nexport const TUI_ICON_START_RESOLVER = TUI_ICON_RESOLVER;\n\nexport function tuiGetIconMode(icon?: string | null): string | undefined {\n return icon?.slice(icon.indexOf('@') + 1, icon.indexOf('.')) || undefined;\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon;\n }\n\n return icon.startsWith('@font.')\n ? icon.replace('@font.', '')\n : (icons[icon] ?? resolver(icon));\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\nimport {map, type Observable, of} from 'rxjs';\n\nexport type TuiDecimalMode = 'always' | 'not-zero' | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport interface TuiNumberFormatSettings {\n /**\n * Number of digits of decimal part.\n * @note Use `Infinity` to keep untouched.\n */\n readonly precision: number;\n /**\n * Separator between the integer and the decimal part.\n * @example 0,42 (',' by default)\n */\n readonly decimalSeparator: TuiDecimalSymbol;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Separator between thousands.\n * @example 360 000 (' ' by default)\n */\n readonly thousandSeparator: string;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n}\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Observable<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_NUMBER_FORMAT),\n },\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_NUMBER_FORMAT]],\n useFactory: (\n parent: Observable<TuiNumberFormatSettings> | null,\n ): Observable<TuiNumberFormatSettings> =>\n (parent || of(TUI_DEFAULT_NUMBER_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {\n factory: () => new ElementRef(inject(DOCUMENT).documentElement),\n});\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiSpinIcons {\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const TUI_SPIN_ICONS = new InjectionToken<TuiSpinIcons>(\n ngDevMode ? 'TUI_SPIN_ICONS' : '',\n {\n factory: () => ({\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n }),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {\n factory: () => 'Taiga UI',\n});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n return tuiProvide(TUI_VIEWPORT, accessor);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGa,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,UAAU,GAAG,kCAAkC;AACxE,SAAA,OAAO,IAAI,KAAK;AAC5B,CAAA;;ACLL;;AAEG;AACU,MAAA,oBAAoB,GAAG,IAAI,cAAc,CAClD,SAAS,GAAG,sBAAsB,GAAG,EAAE,EACvC;AACI,IAAA,OAAO,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACtD,CAAA;;ACTQ,MAAA,eAAe,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,iBAAiB,GAAG,EAAE,EAAE;AAClF,IAAA,OAAO,EAAE,MAAM,uBAAuB;AACzC,CAAA;AAEK,SAAU,qBAAqB,CAAC,QAAgB,EAAA;IAClD,OAAO;AACH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S,GAAG,cAAc,GAAG,EAAE,EAC/B;IACI,OAAO,EAAE,MAAK;AACV,QAAA,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC;QAE7B,OAAO;AACH,YAAA,IAAI,EAAE,UAAU;YAChB,aAAa,GAAA;AACT,gBAAA,MAAM,EAAC,MAAM,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAC,GAAG,GAAG,CAAC,cAAc,IAAI,EAAE;AAC5D,gBAAA,MAAM,IAAI,GAAG;AACT,oBAAA,GAAG,EAAE,CAAC;AACN,oBAAA,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,GAAG,CAAC,UAAU;oBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;oBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;AACrB,oBAAA,MAAM,EAAE,MAAM,GAAG,SAAS,IAAI,GAAG,CAAC,WAAW;AAC7C,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,CAAC,EAAE,CAAC;iBACP;gBAED,OAAO;AACH,oBAAA,GAAG,IAAI;oBACP,MAAM,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBACrC;aACJ;SACJ;KACJ;AACJ,CAAA;AAGC,SAAU,aAAa,CAAC,QAA+B,EAAA;AACzD,IAAA,OAAO,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC;AAC7C;;ACzCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-tokens.mjs","sources":["../../../projects/core/tokens/reduced-motion.ts","../../../projects/core/tokens/animations-speed.ts","../../../projects/core/tokens/assets-path.ts","../../../projects/core/tokens/auxiliary.ts","../../../projects/core/tokens/common-icons.ts","../../../projects/core/tokens/dark-mode.ts","../../../projects/core/tokens/date-format.ts","../../../projects/core/tokens/day-type-handler.ts","../../../projects/core/tokens/first-day-of-week.ts","../../../projects/core/tokens/i18n.ts","../../../projects/core/tokens/icon.ts","../../../projects/core/tokens/icons.ts","../../../projects/core/tokens/icon-resolver.ts","../../../projects/core/tokens/media.ts","../../../projects/core/tokens/number-format.ts","../../../projects/core/tokens/scroll-ref.ts","../../../projects/core/tokens/selection-stream.ts","../../../projects/core/tokens/spin-icons.ts","../../../projects/core/tokens/theme.ts","../../../projects/core/tokens/viewport.ts","../../../projects/core/tokens/taiga-ui-core-tokens.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\n\nexport const TUI_REDUCED_MOTION = new InjectionToken(\n ngDevMode ? 'TUI_REDUCED_MOTION' : '',\n {\n factory: () =>\n inject(DOCUMENT).defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)')\n .matches ?? false,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_REDUCED_MOTION} from './reduced-motion';\n\n/**\n * Speed of all Taiga UI animations. 1 equals 300ms.\n */\nexport const TUI_ANIMATIONS_SPEED = new InjectionToken<number>(\n ngDevMode ? 'TUI_ANIMATIONS_SPEED' : '',\n {\n factory: () => (inject(TUI_REDUCED_MOTION) ? 0 : 1),\n },\n);\n","import {InjectionToken, type ValueProvider} from '@angular/core';\n\nexport const TUI_ASSETS_PATH = new InjectionToken(ngDevMode ? 'TUI_ASSETS_PATH' : '', {\n factory: () => 'assets/taiga-ui/icons',\n});\n\nexport function tuiAssetsPathProvider(useValue: string): ValueProvider {\n return {\n provide: TUI_ASSETS_PATH,\n useValue,\n };\n}\n","import {InjectionToken, type Provider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport const TUI_AUXILIARY = new InjectionToken(ngDevMode ? 'TUI_AUXILIARY' : '', {\n factory: () => null,\n});\n\nexport function tuiAsAuxiliary(x: Type<unknown>): Provider {\n return tuiProvide(TUI_AUXILIARY, x);\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\n// TODO: Rename `ellipsis` to `more` in the next major version\nconst COMMON_ICONS: TuiCommonIcons = {\n check: '@tui.check',\n close: '@tui.x',\n error: '@tui.circle-alert',\n more: '@tui.chevron-right',\n search: '@tui.search',\n ellipsis: '@tui.ellipsis',\n};\n\nexport interface TuiCommonIcons {\n readonly check: string;\n readonly close: string;\n readonly error: string;\n readonly more: string;\n readonly search: string;\n readonly ellipsis: string;\n}\n\nexport const TUI_COMMON_ICONS = new InjectionToken(ngDevMode ? 'TUI_COMMON_ICONS' : '', {\n factory: () => COMMON_ICONS,\n});\n\nexport function tuiCommonIconsProvider(icons: Partial<TuiCommonIcons>): Provider {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n","import {\n effect,\n inject,\n InjectionToken,\n signal,\n untracked,\n type WritableSignal,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WA_LOCAL_STORAGE, WA_WINDOW} from '@ng-web-apis/common';\nimport {filter, fromEvent} from 'rxjs';\n\nexport const TUI_DARK_MODE_DEFAULT_KEY = 'tuiDark';\nexport const TUI_DARK_MODE_KEY = new InjectionToken(\n ngDevMode ? 'TUI_DARK_MODE_KEY' : '',\n {\n factory: () => TUI_DARK_MODE_DEFAULT_KEY,\n },\n);\nexport const TUI_DARK_MODE = new InjectionToken<\n WritableSignal<boolean> & {reset(): void}\n>(ngDevMode ? 'TUI_DARK_MODE' : '', {\n factory: () => {\n let automatic = true;\n\n const storage = inject(WA_LOCAL_STORAGE);\n const key = inject(TUI_DARK_MODE_KEY);\n const saved = storage?.getItem(key);\n const media = inject(WA_WINDOW).matchMedia('(prefers-color-scheme: dark)');\n const result = signal(Boolean((saved && JSON.parse(saved)) ?? media.matches));\n\n fromEvent(media, 'change')\n .pipe(\n filter(() => !storage?.getItem(key)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n automatic = true;\n result.set(media.matches);\n });\n\n untracked(() => {\n effect(() => {\n const value = String(result());\n\n if (automatic) {\n automatic = false;\n } else {\n storage?.setItem(key, value);\n }\n });\n });\n\n return Object.assign(result, {\n reset: () => {\n storage?.removeItem(key);\n automatic = true;\n result.set(media.matches);\n },\n });\n },\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {type TuiDateMode} from '@taiga-ui/cdk/date-time';\nimport {map, type Observable, of} from 'rxjs';\n\n/**\n * Formatting configuration for displayed dates\n */\nexport interface TuiDateFormatSettings {\n /**\n * Date format mode.\n */\n readonly mode: TuiDateMode;\n /**\n * Separator between date segments\n * @example 10.02 ('.' by default)\n */\n readonly separator: string;\n}\n\nexport const TUI_DEFAULT_DATE_FORMAT: TuiDateFormatSettings = {\n mode: 'DMY',\n separator: '.',\n};\n\n/**\n * Formatting configuration for displayed dates\n */\nexport const TUI_DATE_FORMAT = new InjectionToken<Observable<TuiDateFormatSettings>>(\n ngDevMode ? 'TUI_DATE_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_DATE_FORMAT),\n },\n);\n\nexport function tuiDateFormatProvider(options: Partial<TuiDateFormatSettings>): Provider {\n return {\n provide: TUI_DATE_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_DATE_FORMAT]],\n useFactory: (\n parent: Observable<TuiDateFormatSettings> | null,\n ): Observable<TuiDateFormatSettings> =>\n (parent || of(TUI_DEFAULT_DATE_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {InjectionToken} from '@angular/core';\nimport {type TuiDay} from '@taiga-ui/cdk/date-time';\nimport {type TuiHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nexport const TUI_DAY_TYPE_HANDLER = new InjectionToken<TuiHandler<TuiDay, string>>(\n ngDevMode ? 'TUI_DAY_TYPE_HANDLER' : '',\n {\n factory: () => (day) => (day.isWeekend ? 'weekend' : 'weekday'),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiDayOfWeek} from '@taiga-ui/cdk/date-time';\n\n/**\n * The first day of the week index\n */\nexport const TUI_FIRST_DAY_OF_WEEK = new InjectionToken<0 | 1 | 2 | 3 | 4 | 5 | 6>(\n ngDevMode ? 'TUI_FIRST_DAY_OF_WEEK' : '',\n {\n factory: () => TuiDayOfWeek.Monday,\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {tuiExtractI18n} from '@taiga-ui/i18n/utils';\n\n/**\n * Localized months names\n */\nexport const TUI_MONTHS = new InjectionToken(ngDevMode ? 'TUI_MONTHS' : '', {\n factory: tuiExtractI18n('months'),\n});\n\n/**\n * i18n 'close' word\n */\nexport const TUI_CLOSE_WORD = new InjectionToken(ngDevMode ? 'TUI_CLOSE_WORD' : '', {\n factory: tuiExtractI18n('close'),\n});\n\n/**\n * i18n 'clear' word\n */\nexport const TUI_CLEAR_WORD = new InjectionToken(ngDevMode ? 'TUI_CLEAR_WORD' : '', {\n factory: tuiExtractI18n('clear'),\n});\n\n/**\n * i18n 'Nothing found' message\n */\nexport const TUI_NOTHING_FOUND_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_NOTHING_FOUND_MESSAGE' : '',\n {\n factory: tuiExtractI18n('nothingFoundMessage'),\n },\n);\n\n/**\n * i18n of error message\n */\nexport const TUI_DEFAULT_ERROR_MESSAGE = new InjectionToken(\n ngDevMode ? 'TUI_DEFAULT_ERROR_MESSAGE' : '',\n {\n factory: tuiExtractI18n('defaultErrorMessage'),\n },\n);\n\n/**\n * spin i18n texts\n */\nexport const TUI_SPIN_TEXTS = new InjectionToken(ngDevMode ? 'TUI_SPIN_TEXTS' : '', {\n factory: tuiExtractI18n('spinTexts'),\n});\n\n/**\n * calendars i18n texts\n */\nexport const TUI_SHORT_WEEK_DAYS = new InjectionToken(\n ngDevMode ? 'TUI_SHORT_WEEK_DAYS' : '',\n {\n factory: tuiExtractI18n('shortWeekDays'),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_START = new InjectionToken(ngDevMode ? 'TUI_ICON_START' : '', {\n factory: () => '',\n});\nexport const TUI_ICON_END = new InjectionToken(ngDevMode ? 'TUI_ICON_END' : '', {\n factory: () => '',\n});\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_ICON_REGISTRY = new InjectionToken<Record<string, string>>(\n ngDevMode ? 'TUI_ICON_REGISTRY' : '',\n {\n factory: () => ({}),\n },\n);\n\n/**\n * @deprecated: use {@link TUI_ICON_REGISTRY}\n */\nexport const TUI_ICON_STARTS = TUI_ICON_REGISTRY;\n\nexport function tuiIconsProvider(icons: Record<string, string>): FactoryProvider {\n return {\n provide: TUI_ICON_REGISTRY,\n useFactory: () => ({\n ...(inject(TUI_ICON_REGISTRY, {skipSelf: true, optional: true}) || {}),\n ...Object.fromEntries(\n Object.entries(icons).map(([key, value]) => [\n key,\n `\"data:image/svg+xml;charset=UTF-8,${encodeURIComponent(value)}\"`,\n ]),\n ),\n }),\n };\n}\n","import {inject, InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\n\nimport {TUI_ASSETS_PATH} from './assets-path';\nimport {TUI_ICON_REGISTRY} from './icons';\n\nexport const TUI_ICON_RESOLVER = new InjectionToken<TuiStringHandler<string>>(\n ngDevMode ? 'TUI_ICON_RESOLVER' : '',\n {\n factory: () => {\n const path = inject(TUI_ASSETS_PATH);\n\n // regex for @{any text}. used as a default fallback, returns path to svg from icon pack\n return (icon) =>\n `${path}/${icon.replace(/@[a-zA-Z]+\\./, '').replaceAll('.', '/')}.svg`;\n },\n },\n);\n\n/**\n * @deprecated use {@link TUI_ICON_RESOLVER}\n */\nexport const TUI_ICON_START_RESOLVER = TUI_ICON_RESOLVER;\n\nexport function tuiGetIconMode(icon?: string | null): string | undefined {\n return icon?.match(/@([^.]*)\\./)?.[1] || icon || undefined;\n}\n\nexport function tuiInjectIconResolver(): TuiStringHandler<string> {\n const icons = inject(TUI_ICON_REGISTRY);\n const resolver = inject(TUI_ICON_RESOLVER);\n\n return (icon) => {\n if (!icon || icon.includes('/')) {\n return icon;\n }\n\n return icon.startsWith('@font.')\n ? icon.replace('@font.', '')\n : (icons[icon] ?? resolver(icon));\n };\n}\n\nexport function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider {\n return {provide: TUI_ICON_RESOLVER, useValue};\n}\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiMedia {\n readonly desktopLarge: number;\n readonly desktopSmall: number;\n readonly mobile: number;\n readonly tablet?: number;\n}\n\n/**\n * Token for media constant\n */\nexport const TUI_MEDIA = new InjectionToken<TuiMedia>(ngDevMode ? 'TUI_MEDIA' : '', {\n factory: () => ({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280,\n }),\n});\n","import {InjectionToken, Optional, type Provider, SkipSelf} from '@angular/core';\nimport {CHAR_NO_BREAK_SPACE} from '@taiga-ui/cdk/constants';\nimport {type TuiRounding} from '@taiga-ui/cdk/types';\nimport {map, type Observable, of} from 'rxjs';\n\nexport type TuiDecimalMode = 'always' | 'not-zero' | 'pad';\nexport type TuiDecimalSymbol = ',' | '.';\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport interface TuiNumberFormatSettings {\n /**\n * Number of digits of decimal part.\n * @note Use `Infinity` to keep untouched.\n */\n readonly precision: number;\n /**\n * Separator between the integer and the decimal part.\n * @example 0,42 (',' by default)\n */\n readonly decimalSeparator: TuiDecimalSymbol;\n /**\n * Rounding method.\n */\n readonly rounding: TuiRounding;\n /**\n * Separator between thousands.\n * @example 360 000 (' ' by default)\n */\n readonly thousandSeparator: string;\n /**\n * Decimal part display mode. ('pad' by default)\n */\n readonly decimalMode: TuiDecimalMode;\n}\n\nexport const TUI_DEFAULT_NUMBER_FORMAT: TuiNumberFormatSettings = {\n precision: NaN,\n decimalSeparator: '.',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n rounding: 'truncate',\n decimalMode: 'pad',\n};\n\n/**\n * Formatting configuration for displayed numbers\n */\nexport const TUI_NUMBER_FORMAT = new InjectionToken<Observable<TuiNumberFormatSettings>>(\n ngDevMode ? 'TUI_NUMBER_FORMAT' : '',\n {\n factory: () => of(TUI_DEFAULT_NUMBER_FORMAT),\n },\n);\n\nexport function tuiNumberFormatProvider(\n options: Partial<TuiNumberFormatSettings>,\n): Provider {\n return {\n provide: TUI_NUMBER_FORMAT,\n deps: [[new Optional(), new SkipSelf(), TUI_NUMBER_FORMAT]],\n useFactory: (\n parent: Observable<TuiNumberFormatSettings> | null,\n ): Observable<TuiNumberFormatSettings> =>\n (parent || of(TUI_DEFAULT_NUMBER_FORMAT)).pipe(\n map((format) => ({...format, ...options})),\n ),\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, inject, InjectionToken} from '@angular/core';\n\nexport const TUI_SCROLL_REF = new InjectionToken(ngDevMode ? 'TUI_SCROLL_REF' : '', {\n factory: () => new ElementRef(inject(DOCUMENT).documentElement),\n});\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, type Observable, share, switchMap, takeUntil} from 'rxjs';\n\n/**\n * A stream of possible selection changes\n */\nexport const TUI_SELECTION_STREAM = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_SELECTION_STREAM' : '',\n {\n factory: () => {\n const doc = inject(DOCUMENT);\n\n return merge(\n tuiTypedFromEvent(doc, 'selectionchange'),\n tuiTypedFromEvent(doc, 'mouseup'),\n tuiTypedFromEvent(doc, 'mousedown').pipe(\n switchMap(() =>\n tuiTypedFromEvent(doc, 'mousemove').pipe(\n takeUntil(tuiTypedFromEvent(doc, 'mouseup')),\n ),\n ),\n ),\n tuiTypedFromEvent(doc, 'keydown'),\n tuiTypedFromEvent(doc, 'keyup'),\n ).pipe(share());\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport interface TuiSpinIcons {\n readonly decrement: string;\n readonly increment: string;\n}\n\nexport const TUI_SPIN_ICONS = new InjectionToken<TuiSpinIcons>(\n ngDevMode ? 'TUI_SPIN_ICONS' : '',\n {\n factory: () => ({\n decrement: '@tui.chevron-left',\n increment: '@tui.chevron-right',\n }),\n },\n);\n","import {InjectionToken} from '@angular/core';\n\nexport const TUI_THEME = new InjectionToken(ngDevMode ? 'TUI_THEME' : '', {\n factory: () => 'Taiga UI',\n});\n","import {inject, InjectionToken, type Provider, type Type} from '@angular/core';\nimport {WA_WINDOW} from '@ng-web-apis/common';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiRectAccessor} from '@taiga-ui/core/classes';\n\n/**\n * Viewport accessor\n */\nexport const TUI_VIEWPORT = new InjectionToken<TuiRectAccessor>(\n ngDevMode ? 'TUI_VIEWPORT' : '',\n {\n factory: () => {\n const win = inject(WA_WINDOW);\n\n return {\n type: 'viewport',\n getClientRect() {\n const {height = 0, offsetTop = 0} = win.visualViewport || {};\n const rect = {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: height + offsetTop || win.innerHeight,\n x: 0,\n y: 0,\n };\n\n return {\n ...rect,\n toJSON: () => JSON.stringify(rect),\n };\n },\n };\n },\n },\n);\n\nexport function tuiAsViewport(accessor: Type<TuiRectAccessor>): Provider {\n return tuiProvide(TUI_VIEWPORT, accessor);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGa,MAAA,kBAAkB,GAAG,IAAI,cAAc,CAChD,SAAS,GAAG,oBAAoB,GAAG,EAAE,EACrC;AACI,IAAA,OAAO,EAAE,MACL,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,UAAU,GAAG,kCAAkC;AACxE,SAAA,OAAO,IAAI,KAAK;AAC5B,CAAA;;ACLL;;AAEG;AACU,MAAA,oBAAoB,GAAG,IAAI,cAAc,CAClD,SAAS,GAAG,sBAAsB,GAAG,EAAE,EACvC;AACI,IAAA,OAAO,EAAE,OAAO,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC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S,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,WAAW,GAAG,EAAE,EAAE;AACtE,IAAA,OAAO,EAAE,MAAM,UAAU;AAC5B,CAAA;;ACCD;;AAEG;AACU,MAAA,YAAY,GAAG,IAAI,cAAc,CAC1C,SAAS,GAAG,cAAc,GAAG,EAAE,EAC/B;IACI,OAAO,EAAE,MAAK;AACV,QAAA,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC;QAE7B,OAAO;AACH,YAAA,IAAI,EAAE,UAAU;YAChB,aAAa,GAAA;AACT,gBAAA,MAAM,EAAC,MAAM,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAC,GAAG,GAAG,CAAC,cAAc,IAAI,EAAE;AAC5D,gBAAA,MAAM,IAAI,GAAG;AACT,oBAAA,GAAG,EAAE,CAAC;AACN,oBAAA,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,GAAG,CAAC,UAAU;oBACrB,MAAM,EAAE,GAAG,CAAC,WAAW;oBACvB,KAAK,EAAE,GAAG,CAAC,UAAU;AACrB,oBAAA,MAAM,EAAE,MAAM,GAAG,SAAS,IAAI,GAAG,CAAC,WAAW;AAC7C,oBAAA,CAAC,EAAE,CAAC;AACJ,oBAAA,CAAC,EAAE,CAAC;iBACP;gBAED,OAAO;AACH,oBAAA,GAAG,IAAI;oBACP,MAAM,EAAE,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;iBACrC;aACJ;SACJ;KACJ;AACJ,CAAA;AAGC,SAAU,aAAa,CAAC,QAA+B,EAAA;AACzD,IAAA,OAAO,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC;AAC7C;;ACzCA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/core",
|
|
3
|
-
"version": "4.52.0-canary.
|
|
3
|
+
"version": "4.52.0-canary.932d3ef",
|
|
4
4
|
"description": "Core library for creating Angular components and applications using Taiga UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -179,10 +179,6 @@
|
|
|
179
179
|
"types": "./pipes/calendar-sheet/index.d.ts",
|
|
180
180
|
"default": "./fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs"
|
|
181
181
|
},
|
|
182
|
-
"./pipes/fallback-src": {
|
|
183
|
-
"types": "./pipes/fallback-src/index.d.ts",
|
|
184
|
-
"default": "./fesm2022/taiga-ui-core-pipes-fallback-src.mjs"
|
|
185
|
-
},
|
|
186
182
|
"./pipes/flag": {
|
|
187
183
|
"types": "./pipes/flag/index.d.ts",
|
|
188
184
|
"default": "./fesm2022/taiga-ui-core-pipes-flag.mjs"
|
package/pipes/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from '@taiga-ui/core/pipes/auto-color';
|
|
2
2
|
export * from '@taiga-ui/core/pipes/calendar-sheet';
|
|
3
|
-
export * from '@taiga-ui/core/pipes/fallback-src';
|
|
4
3
|
export * from '@taiga-ui/core/pipes/flag';
|
|
5
4
|
export * from '@taiga-ui/core/pipes/format-date';
|
|
6
5
|
export * from '@taiga-ui/core/pipes/format-number';
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
|
|
50
50
|
&[data-icon-start='img']::before {
|
|
51
51
|
mask: none;
|
|
52
|
-
background: var(--t-icon-start) no-repeat center/
|
|
52
|
+
background: var(--t-icon-start) no-repeat center / 1em padding-box;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
&[data-icon-end='img']::after {
|
|
56
56
|
mask: none;
|
|
57
|
-
background: var(--t-icon-end) no-repeat center/
|
|
57
|
+
background: var(--t-icon-end) no-repeat center / 1em padding-box;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&[data-icon-start='font']::before,
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe } from '@angular/core';
|
|
3
|
-
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
4
|
-
import { fromEvent, map, startWith } from 'rxjs';
|
|
5
|
-
|
|
6
|
-
class TuiFallbackSrcPipe {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.el = tuiInjectElement();
|
|
9
|
-
}
|
|
10
|
-
transform(src, fallback) {
|
|
11
|
-
return fromEvent(this.el, 'error', { capture: true }).pipe(map(() => fallback), startWith(src || fallback));
|
|
12
|
-
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFallbackSrcPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
14
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFallbackSrcPipe, isStandalone: true, name: "tuiFallbackSrc" }); }
|
|
15
|
-
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFallbackSrcPipe, decorators: [{
|
|
17
|
-
type: Pipe,
|
|
18
|
-
args: [{
|
|
19
|
-
standalone: true,
|
|
20
|
-
name: 'tuiFallbackSrc',
|
|
21
|
-
}]
|
|
22
|
-
}] });
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Generated bundle index. Do not edit.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
export { TuiFallbackSrcPipe };
|
|
29
|
-
//# sourceMappingURL=taiga-ui-core-pipes-fallback-src.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-pipes-fallback-src.mjs","sources":["../../../projects/core/pipes/fallback-src/fallback-src.pipe.ts","../../../projects/core/pipes/fallback-src/taiga-ui-core-pipes-fallback-src.ts"],"sourcesContent":["import {Pipe, type PipeTransform} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {fromEvent, map, type Observable, startWith} from 'rxjs';\n\n@Pipe({\n standalone: true,\n name: 'tuiFallbackSrc',\n})\nexport class TuiFallbackSrcPipe implements PipeTransform {\n private readonly el = tuiInjectElement();\n\n public transform(src: string, fallback: string): Observable<string> {\n return fromEvent(this.el, 'error', {capture: true}).pipe(\n map(() => fallback),\n startWith(src || fallback),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAQa,kBAAkB,CAAA;AAJ/B,IAAA,WAAA,GAAA;QAKqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AAQ3C;IANU,SAAS,CAAC,GAAW,EAAE,QAAgB,EAAA;AAC1C,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CACpD,GAAG,CAAC,MAAM,QAAQ,CAAC,EACnB,SAAS,CAAC,GAAG,IAAI,QAAQ,CAAC,CAC7B;;+GAPI,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,gBAAgB;AACzB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import { type Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiFallbackSrcPipe implements PipeTransform {
|
|
5
|
-
private readonly el;
|
|
6
|
-
transform(src: string, fallback: string): Observable<string>;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiFallbackSrcPipe, never>;
|
|
8
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiFallbackSrcPipe, "tuiFallbackSrc", true>;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './fallback-src.pipe';
|