@taiga-ui/core 4.52.0-canary.6043e8f → 4.52.0-canary.65c65f9
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/error/error.component.d.ts +7 -5
- package/components/error/index.d.ts +0 -3
- package/components/root/root.component.d.ts +6 -5
- package/components/textfield/textfield-icon.d.ts +3 -3
- package/directives/icons/index.d.ts +0 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +6 -6
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +2 -36
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +22 -106
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs +2 -13
- package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +36 -19
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +7 -7
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +3 -3
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +4 -11
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +1 -6
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +3 -49
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/components/icons.less +2 -2
- package/tokens/index.d.ts +0 -1
- package/utils/miscellaneous/index.d.ts +0 -1
- package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
- package/components/error/error.d.ts +0 -4
- package/components/error/error.directive.d.ts +0 -19
- package/components/error/error.pipe.d.ts +0 -10
- package/directives/icons/icons.bindings.d.ts +0 -5
- package/tokens/validation-errors.d.ts +0 -4
- package/utils/miscellaneous/provide-taiga.d.ts +0 -13
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { DOCUMENT } from '@angular/common';
|
|
2
|
-
import { inject
|
|
2
|
+
import { inject } from '@angular/core';
|
|
3
3
|
import { TUI_FONT_SIZE_HANDLER } from '@taiga-ui/cdk/directives/font-size';
|
|
4
4
|
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
5
5
|
import { tuiGetElementObscures } from '@taiga-ui/cdk/utils/dom';
|
|
6
|
-
import {
|
|
7
|
-
import { tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
8
|
-
import { TUI_DARK_MODE, TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
|
|
9
|
-
import { provideEventPlugins } from '@taiga-ui/event-plugins';
|
|
6
|
+
import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
|
|
10
7
|
|
|
11
8
|
function tuiEnableFontScaling() {
|
|
12
9
|
return {
|
|
@@ -51,49 +48,6 @@ function tuiOverrideOptions(override, fallback) {
|
|
|
51
48
|
};
|
|
52
49
|
}
|
|
53
50
|
|
|
54
|
-
const DEFAULT = {
|
|
55
|
-
apis: 'stable',
|
|
56
|
-
fontScaling: true,
|
|
57
|
-
scrollbars: 'custom',
|
|
58
|
-
};
|
|
59
|
-
const TUI_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_OPTIONS' : '');
|
|
60
|
-
function provideTaiga(config = {}) {
|
|
61
|
-
const options = { ...DEFAULT, ...config };
|
|
62
|
-
const providers = [
|
|
63
|
-
{
|
|
64
|
-
provide: REMOVE_STYLES_ON_COMPONENT_DESTROY,
|
|
65
|
-
useValue: false,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
provide: TUI_OPTIONS,
|
|
69
|
-
useValue: options,
|
|
70
|
-
},
|
|
71
|
-
provideEventPlugins(),
|
|
72
|
-
provideAppInitializer(() => {
|
|
73
|
-
const doc = inject(DOCUMENT);
|
|
74
|
-
const mode = inject(TUI_DARK_MODE);
|
|
75
|
-
if (options.scrollbars === 'custom') {
|
|
76
|
-
doc.documentElement.classList.add('tui-zero-scrollbar');
|
|
77
|
-
}
|
|
78
|
-
if (tuiIsPresent(options.mode)) {
|
|
79
|
-
mode.set(options.mode === 'dark');
|
|
80
|
-
}
|
|
81
|
-
effect(() => {
|
|
82
|
-
if (mode()) {
|
|
83
|
-
doc.body.setAttribute('tuiTheme', 'dark');
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
doc.body.removeAttribute('tuiTheme');
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}),
|
|
90
|
-
];
|
|
91
|
-
if (options.fontScaling) {
|
|
92
|
-
providers.push(tuiEnableFontScaling());
|
|
93
|
-
}
|
|
94
|
-
return providers;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
51
|
const SIZES = {
|
|
98
52
|
xxs: 0,
|
|
99
53
|
xs: 1,
|
|
@@ -131,5 +85,5 @@ function tuiGetDuration(speed) {
|
|
|
131
85
|
* Generated bundle index. Do not edit.
|
|
132
86
|
*/
|
|
133
87
|
|
|
134
|
-
export { TUI_ANIMATIONS_DEFAULT_DURATION,
|
|
88
|
+
export { TUI_ANIMATIONS_DEFAULT_DURATION, tuiEnableFontScaling, tuiGetDuration, tuiIsEditingKey, tuiIsObscured, tuiOverrideOptions, tuiSizeBigger, tuiToAnimationOptions };
|
|
135
89
|
//# sourceMappingURL=taiga-ui-core-utils-miscellaneous.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-utils-miscellaneous.mjs","sources":["../../../projects/core/utils/miscellaneous/font-scaling.ts","../../../projects/core/utils/miscellaneous/is-editing-key.ts","../../../projects/core/utils/miscellaneous/is-obscured.ts","../../../projects/core/utils/miscellaneous/override-options.ts","../../../projects/core/utils/miscellaneous/
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-utils-miscellaneous.mjs","sources":["../../../projects/core/utils/miscellaneous/font-scaling.ts","../../../projects/core/utils/miscellaneous/is-editing-key.ts","../../../projects/core/utils/miscellaneous/is-obscured.ts","../../../projects/core/utils/miscellaneous/override-options.ts","../../../projects/core/utils/miscellaneous/size-bigger.ts","../../../projects/core/utils/miscellaneous/to-animation-options.ts","../../../projects/core/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, type Provider} from '@angular/core';\nimport {TUI_FONT_SIZE_HANDLER} from '@taiga-ui/cdk/directives/font-size';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\n\nexport function tuiEnableFontScaling(): Provider {\n return {\n provide: TUI_FONT_SIZE_HANDLER,\n useFactory:\n ({documentElement} = inject(DOCUMENT)) =>\n (size: number): void =>\n documentElement.style.setProperty(\n '--tui-font-offset',\n `${tuiClamp(size, 17, 28) - 17}px`,\n ),\n };\n}\n","const KEYS: readonly string[] = [\n 'Spacebar',\n 'Backspace',\n 'Delete',\n 'ArrowLeft',\n 'ArrowRight',\n 'Left',\n 'Right',\n 'End',\n 'Home',\n];\n\n/**\n * Check if pressed key is interactive in terms of input field\n */\nexport function tuiIsEditingKey(key = ''): boolean {\n return key.length === 1 || KEYS.includes(key);\n}\n","import {tuiGetElementObscures} from '@taiga-ui/cdk/utils/dom';\n\n/**\n * @internal\n */\nexport function tuiIsObscured(el: HTMLElement, exceptSelector = 'tui-hints'): boolean {\n return !!tuiGetElementObscures(el)?.some((el) => !el.closest(exceptSelector));\n}\n","export function tuiOverrideOptions<T>(\n override: Partial<T>,\n fallback: T,\n): (directive: T | null, options: T | null) => T {\n return (directive, options) => {\n const result: T = directive || {...(options || fallback)};\n\n Object.keys(override).forEach((key) => {\n // Update directive props with new defaults before inputs are processed\n (result as Record<string, unknown>)[key] = override[key as keyof T];\n });\n\n return result;\n };\n}\n","import {type TuiSizeXXL, type TuiSizeXXS} from '@taiga-ui/core/types';\n\nconst SIZES: Record<TuiSizeXXL | TuiSizeXXS, number> = {\n xxs: 0,\n xs: 1,\n s: 2,\n m: 3,\n l: 4,\n xl: 5,\n xxl: 6,\n};\n\n/**\n * Compares size constants to determine if first size is bigger than the second\n *\n * @param size size that we need to compare\n * @param biggerThanSize size to compare with, 's' by default\n */\nexport function tuiSizeBigger(\n size: TuiSizeXXL | TuiSizeXXS,\n biggerThanSize: TuiSizeXXL | TuiSizeXXS = 's',\n): boolean {\n return SIZES[size] > SIZES[biggerThanSize];\n}\n","import {type AnimationOptions} from '@angular/animations';\nimport {inject} from '@angular/core';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\n\nexport const TUI_ANIMATIONS_DEFAULT_DURATION = 300;\n\nexport function tuiToAnimationOptions(\n speed: number = inject(TUI_ANIMATIONS_SPEED),\n easing?: string,\n): AnimationOptions {\n return {\n value: '',\n params: {\n duration: tuiGetDuration(speed),\n easing,\n },\n } as unknown as AnimationOptions;\n}\n\nexport function tuiGetDuration(speed: number): number {\n return speed && TUI_ANIMATIONS_DEFAULT_DURATION / speed;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;SAKgB,oBAAoB,GAAA;IAChC,OAAO;AACH,QAAA,OAAO,EAAE,qBAAqB;AAC9B,QAAA,UAAU,EACN,CAAC,EAAC,eAAe,EAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,KACrC,CAAC,IAAY,KACT,eAAe,CAAC,KAAK,CAAC,WAAW,CAC7B,mBAAmB,EACnB,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,CACrC;KACZ;AACL;;AChBA,MAAM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AK,CAAC,cAAc,CAAC;AAC9C;;ACnBO,MAAM,+BAA+B,GAAG;AAEzC,SAAU,qBAAqB,CACjC,KAAA,GAAgB,MAAM,CAAC,oBAAoB,CAAC,EAC5C,MAAe,EAAA;IAEf,OAAO;AACH,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,MAAM,EAAE;AACJ,YAAA,QAAQ,EAAE,cAAc,CAAC,KAAK,CAAC;YAC/B,MAAM;AACT,SAAA;KAC2B;AACpC;AAEM,SAAU,cAAc,CAAC,KAAa,EAAA;AACxC,IAAA,OAAO,KAAK,IAAI,+BAA+B,GAAG,KAAK;AAC3D;;ACrBA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&::before {
|
|
37
|
-
display: var(--t-icon-start);
|
|
37
|
+
display: var(--t-icon-start, none);
|
|
38
38
|
mask:
|
|
39
39
|
var(--t-icon-start) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
|
|
40
40
|
~'min(1em, 100%)',
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
&::after {
|
|
45
|
-
display: var(--t-icon-end);
|
|
45
|
+
display: var(--t-icon-end, none);
|
|
46
46
|
mask: var(--t-icon-end) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
|
|
47
47
|
~'min(1em, 100%)' padding-box;
|
|
48
48
|
}
|
package/tokens/index.d.ts
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type OnDestroy, type OnInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@taiga-ui/cdk/directives/active-zone";
|
|
4
|
-
export declare class TuiActiveZoneAdapter implements OnDestroy, OnInit {
|
|
5
|
-
private readonly current;
|
|
6
|
-
private readonly parent;
|
|
7
|
-
ngOnInit(): void;
|
|
8
|
-
ngOnDestroy(): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiActiveZoneAdapter, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiActiveZoneAdapter, "[tuiActiveZoneAdapter]", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiActiveZone; inputs: {}; outputs: {}; }]>;
|
|
11
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TuiErrorComponent } from './error.component';
|
|
2
|
-
import { TuiErrorDirective } from './error.directive';
|
|
3
|
-
import { TuiErrorPipe } from './error.pipe';
|
|
4
|
-
export declare const TuiError: readonly [typeof TuiErrorComponent, typeof TuiErrorDirective, typeof TuiErrorPipe];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type Signal } from '@angular/core';
|
|
2
|
-
import { type AbstractControl, type ControlValueAccessor, type ValidationErrors, type Validator } from '@angular/forms';
|
|
3
|
-
import { TuiValidationError } from '@taiga-ui/cdk/classes';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class TuiErrorDirective implements ControlValueAccessor, Validator {
|
|
6
|
-
private readonly content;
|
|
7
|
-
private readonly control;
|
|
8
|
-
private readonly errors;
|
|
9
|
-
private readonly key;
|
|
10
|
-
readonly order: import("@angular/core").InputSignal<readonly string[]>;
|
|
11
|
-
readonly error: Signal<TuiValidationError<Record<string, unknown>> | null>;
|
|
12
|
-
registerOnChange(): void;
|
|
13
|
-
registerOnTouched(): void;
|
|
14
|
-
writeValue(): void;
|
|
15
|
-
validate(control: AbstractControl): ValidationErrors | null;
|
|
16
|
-
private getError;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiErrorDirective, never>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiErrorDirective, "tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName]", never, { "order": { "alias": "order"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type PipeTransform } from '@angular/core';
|
|
2
|
-
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiErrorPipe implements PipeTransform {
|
|
5
|
-
private readonly control;
|
|
6
|
-
private readonly directive;
|
|
7
|
-
transform(order: readonly string[]): PolymorpheusContent;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiErrorPipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<TuiErrorPipe, "tuiError", true>;
|
|
10
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type InjectOptions, type Signal, type WritableSignal } from '@angular/core';
|
|
2
|
-
export declare function tuiIconStart(value: WritableSignal<string> | string, options?: InjectOptions): WritableSignal<string>;
|
|
3
|
-
export declare function tuiIconStart(value: Signal<string>, options?: InjectOptions): Signal<string>;
|
|
4
|
-
export declare function tuiIconEnd(value: WritableSignal<string> | string, options?: InjectOptions): WritableSignal<string>;
|
|
5
|
-
export declare function tuiIconEnd(value: Signal<string>, options?: InjectOptions): Signal<string>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, type Provider, type Signal } from '@angular/core';
|
|
2
|
-
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
3
|
-
export declare const TUI_VALIDATION_ERRORS: InjectionToken<Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>>;
|
|
4
|
-
export declare const tuiValidationErrorsProvider: (useValue: Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>) => Provider;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type EnvironmentProviders, InjectionToken, type Provider } from '@angular/core';
|
|
2
|
-
interface ExperimentalAPIs {
|
|
3
|
-
readonly all: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface TuiOptions {
|
|
6
|
-
readonly mode?: 'dark' | 'light';
|
|
7
|
-
readonly apis: Partial<ExperimentalAPIs> | 'stable';
|
|
8
|
-
readonly fontScaling: boolean;
|
|
9
|
-
readonly scrollbars: 'custom' | 'native';
|
|
10
|
-
}
|
|
11
|
-
export declare const TUI_OPTIONS: InjectionToken<TuiOptions>;
|
|
12
|
-
export declare function provideTaiga(config?: Partial<TuiOptions>): Array<EnvironmentProviders | Provider>;
|
|
13
|
-
export {};
|