@taiga-ui/core 4.52.0-canary.91aeb4a → 4.52.0-canary.974ca4b
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/README.md +1 -1
- package/classes/accessors.d.ts +1 -1
- package/components/alert/alert.interfaces.d.ts +4 -5
- package/components/calendar/calendar-sheet.options.d.ts +1 -3
- package/components/dialog/dialog.component.d.ts +2 -3
- package/components/dialog/dialog.options.d.ts +2 -3
- package/components/dialog/dialog.providers.d.ts +1 -2
- package/components/dialog/index.d.ts +0 -1
- package/components/index.d.ts +0 -1
- package/components/link/link.options.d.ts +1 -3
- package/components/loader/loader.options.d.ts +1 -3
- package/components/modal/modal.component.d.ts +3 -3
- package/components/modal/modal.service.d.ts +3 -3
- package/components/notification/notification.directive.d.ts +2 -3
- package/directives/date-format/date-format.directive.d.ts +3 -7
- package/directives/dropdown/dropdown-hover.options.d.ts +1 -3
- package/directives/dropdown/dropdown-position.directive.d.ts +1 -1
- package/directives/group/group.options.d.ts +1 -3
- package/directives/number-format/number-format.directive.d.ts +3 -7
- package/fesm2022/taiga-ui-core-classes.mjs +1 -1
- package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-alert.mjs +1 -1
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +8 -12
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +1 -8
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +8 -77
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-icon.mjs +1 -2
- package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-link.mjs +6 -10
- package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +3 -8
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-modal.mjs +10 -10
- package/fesm2022/taiga-ui-core-components-modal.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-notification.mjs +5 -6
- package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-root.mjs +3 -4
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs +0 -3
- package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +1 -8
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components.mjs +0 -1
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs +0 -1
- package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-date-format.mjs +24 -18
- package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs +18 -45
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-group.mjs +4 -8
- package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +5 -8
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs +0 -1
- package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +0 -3
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-number-format.mjs +30 -18
- package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -12
- package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -1
- package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-tokens.mjs +22 -16
- package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-format.mjs +1 -0
- package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
- package/package.json +17 -18
- package/pipes/format-number/format-number.pipe.d.ts +5 -3
- package/styles/components/link.less +1 -0
- package/styles/mixins/appearance.less +1 -1
- package/styles/mixins/mixins.less +0 -5
- package/styles/mixins/mixins.scss +0 -5
- package/styles/theme/variables.less +2 -4
- package/tokens/common-icons.d.ts +1 -3
- package/tokens/date-format.d.ts +2 -3
- package/tokens/number-format.d.ts +2 -3
- package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
- package/components/dialog/dialogs.component.d.ts +0 -8
- package/components/header/header.directive.d.ts +0 -17
- package/components/header/index.d.ts +0 -1
- package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
- package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
package/README.md
CHANGED
package/classes/accessors.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare abstract class TuiRectAccessor extends TuiAccessor {
|
|
|
10
10
|
abstract getClientRect(): DOMRect;
|
|
11
11
|
}
|
|
12
12
|
export declare function tuiProvideAccessor<T extends TuiAccessor>(provide: AbstractType<T>, type: string, fallback: Type<T>): FactoryProvider;
|
|
13
|
-
export declare function tuiFallbackAccessor<T extends TuiAccessor>(type: string): (accessors: readonly T[] | null, fallback: T) => T;
|
|
13
|
+
export declare function tuiFallbackAccessor<T extends TuiAccessor>(type: string): (accessors: readonly T[] | null, fallback: Omit<T, 'type'>) => T;
|
|
14
14
|
export declare function tuiPositionAccessorFor(type: string, fallback: Type<TuiPositionAccessor>): FactoryProvider;
|
|
15
15
|
export declare function tuiRectAccessorFor(type: string, fallback: Type<TuiRectAccessor>): FactoryProvider;
|
|
16
16
|
export declare function tuiAsPositionAccessor(accessor: Type<TuiPositionAccessor>): ExistingProvider;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type TuiPortalContext } from '@taiga-ui/cdk/portals';
|
|
2
|
+
import { type TuiNumberHandler } from '@taiga-ui/cdk/types';
|
|
3
3
|
import { type TuiNotificationOptions } from '@taiga-ui/core/components/notification';
|
|
4
4
|
import { type TuiPositionOptions } from '@taiga-ui/core/directives';
|
|
5
5
|
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
6
6
|
export interface TuiAlertOptions<I = undefined> extends Omit<TuiNotificationOptions, 'size'>, TuiPositionOptions {
|
|
7
|
-
readonly autoClose:
|
|
7
|
+
readonly autoClose: TuiNumberHandler<string> | number;
|
|
8
8
|
readonly data: I;
|
|
9
9
|
readonly closable: boolean;
|
|
10
10
|
readonly label: PolymorpheusContent<TuiAlertOptions<I>>;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
}
|
|
12
|
+
export type TuiAlertContext<O = void, I = undefined> = TuiPortalContext<TuiAlertOptions<I>, O>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { InjectionToken, type Provider } from '@angular/core';
|
|
2
1
|
export interface TuiCalendarSheetOptions {
|
|
3
2
|
readonly rangeMode: boolean;
|
|
4
3
|
}
|
|
5
4
|
export declare const TUI_CALENDAR_SHEET_DEFAULT_OPTIONS: TuiCalendarSheetOptions;
|
|
6
|
-
export declare const TUI_CALENDAR_SHEET_OPTIONS: InjectionToken<TuiCalendarSheetOptions
|
|
7
|
-
export declare function tuiCalendarSheetOptionsProvider(options: Partial<TuiCalendarSheetOptions>): Provider;
|
|
5
|
+
export declare const TUI_CALENDAR_SHEET_OPTIONS: import("@angular/core").InjectionToken<TuiCalendarSheetOptions>, tuiCalendarSheetOptionsProvider: (item: Partial<TuiCalendarSheetOptions> | (() => Partial<TuiCalendarSheetOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type TuiPopover } from '@taiga-ui/cdk/services';
|
|
2
1
|
import { Subject } from 'rxjs';
|
|
3
|
-
import { type
|
|
2
|
+
import { type TuiDialogContext } from './dialog.options';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
import * as i1 from "@taiga-ui/cdk/directives/animated";
|
|
6
5
|
export declare class TuiDialogComponent<O, I> {
|
|
7
6
|
protected readonly close$: Subject<void>;
|
|
8
7
|
protected readonly close: import("@angular/core").Signal<string>;
|
|
9
8
|
protected readonly icons: import("@taiga-ui/core/tokens").TuiCommonIcons;
|
|
10
|
-
protected readonly context:
|
|
9
|
+
protected readonly context: TuiDialogContext<I, O>;
|
|
11
10
|
protected readonly primitive: boolean;
|
|
12
11
|
protected readonly sub: import("rxjs").Subscription;
|
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDialogComponent<any, any>, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type TuiPortalContext } from '@taiga-ui/cdk/portals';
|
|
2
2
|
import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
|
|
3
3
|
import { type Observable } from 'rxjs';
|
|
4
4
|
/**
|
|
@@ -21,6 +21,5 @@ export interface TuiDialogOptions<I> {
|
|
|
21
21
|
readonly required: boolean;
|
|
22
22
|
readonly size: TuiSizeL | TuiSizeS;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
25
|
-
}
|
|
24
|
+
export type TuiDialogContext<O = void, I = undefined> = TuiPortalContext<TuiDialogOptions<I>, O>;
|
|
26
25
|
export declare const TUI_DIALOG_OPTIONS: import("@angular/core").InjectionToken<TuiDialogOptions<void>>, tuiDialogOptionsProvider: (item: Partial<TuiDialogOptions<void>> | (() => Partial<TuiDialogOptions<void>>)) => import("@angular/core").FactoryProvider;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare const TUI_DIALOGS: InjectionToken<BehaviorSubject<readonly any[]>>;
|
|
5
4
|
export declare const TUI_DIALOGS_CLOSE: InjectionToken<Observable<unknown>>;
|
|
6
5
|
export declare class TuiDialogCloseService extends Observable<unknown> {
|
|
7
6
|
private readonly win;
|
package/components/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export * from '@taiga-ui/core/components/data-list';
|
|
|
6
6
|
export * from '@taiga-ui/core/components/dialog';
|
|
7
7
|
export * from '@taiga-ui/core/components/error';
|
|
8
8
|
export * from '@taiga-ui/core/components/expand';
|
|
9
|
-
export * from '@taiga-ui/core/components/header';
|
|
10
9
|
export * from '@taiga-ui/core/components/icon';
|
|
11
10
|
export * from '@taiga-ui/core/components/label';
|
|
12
11
|
export * from '@taiga-ui/core/components/link';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type FactoryProvider, InjectionToken } from '@angular/core';
|
|
2
1
|
import { type TuiAppearanceOptions } from '@taiga-ui/core/directives/appearance';
|
|
3
2
|
export interface TuiLinkOptions extends TuiAppearanceOptions {
|
|
4
3
|
/**
|
|
@@ -8,5 +7,4 @@ export interface TuiLinkOptions extends TuiAppearanceOptions {
|
|
|
8
7
|
readonly pseudo: boolean;
|
|
9
8
|
}
|
|
10
9
|
export declare const TUI_LINK_DEFAULT_OPTIONS: TuiLinkOptions;
|
|
11
|
-
export declare const TUI_LINK_OPTIONS: InjectionToken<TuiLinkOptions
|
|
12
|
-
export declare function tuiLinkOptionsProvider(options: Partial<TuiLinkOptions>): FactoryProvider;
|
|
10
|
+
export declare const TUI_LINK_OPTIONS: import("@angular/core").InjectionToken<TuiLinkOptions>, tuiLinkOptionsProvider: (item: Partial<TuiLinkOptions> | (() => Partial<TuiLinkOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InjectionToken, type Provider } from '@angular/core';
|
|
2
1
|
import { type TuiSizeXS, type TuiSizeXXL } from '@taiga-ui/core/types';
|
|
3
2
|
export interface TuiLoaderOptions {
|
|
4
3
|
readonly inheritColor: boolean;
|
|
@@ -10,5 +9,4 @@ export declare const TUI_LOADER_DEFAULT_OPTIONS: TuiLoaderOptions;
|
|
|
10
9
|
/**
|
|
11
10
|
* Default parameters for loader component
|
|
12
11
|
*/
|
|
13
|
-
export declare const TUI_LOADER_OPTIONS: InjectionToken<TuiLoaderOptions
|
|
14
|
-
export declare function tuiLoaderOptionsProvider(options: Partial<TuiLoaderOptions>): Provider;
|
|
12
|
+
export declare const TUI_LOADER_OPTIONS: import("@angular/core").InjectionToken<TuiLoaderOptions>, tuiLoaderOptionsProvider: (item: Partial<TuiLoaderOptions> | (() => Partial<TuiLoaderOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -5,13 +5,13 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
import * as i1 from "@taiga-ui/cdk/directives/active-zone";
|
|
6
6
|
import * as i2 from "@taiga-ui/cdk/directives/focus-trap";
|
|
7
7
|
import * as i3 from "@taiga-ui/core/components/scrollbar";
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class TuiModalComponent<T> implements OnDestroy, OnInit {
|
|
9
9
|
private readonly current;
|
|
10
10
|
private readonly parent;
|
|
11
11
|
readonly context: TuiPortalContext<T>;
|
|
12
12
|
readonly component: import("@angular/core").WritableSignal<PolymorpheusContent<TuiPortalContext<T>>>;
|
|
13
13
|
ngOnInit(): void;
|
|
14
14
|
ngOnDestroy(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TuiModalComponent<any>, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TuiModalComponent<any>, "tui-modal", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiActiveZone; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiFocusTrap; inputs: {}; outputs: {}; }, { directive: typeof i3.TuiScrollRef; inputs: {}; outputs: {}; }]>;
|
|
17
17
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type Type } from '@angular/core';
|
|
2
2
|
import { TuiPortal } from '@taiga-ui/cdk/portals';
|
|
3
3
|
import { PolymorpheusComponent } from '@taiga-ui/polymorpheus';
|
|
4
|
-
import {
|
|
4
|
+
import { TuiModalComponent } from './modal.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare abstract class TuiModalService<T, K = void> extends TuiPortal<T, K> {
|
|
7
7
|
protected abstract readonly content: Type<unknown>;
|
|
8
|
-
protected readonly component: typeof
|
|
8
|
+
protected readonly component: typeof TuiModalComponent;
|
|
9
9
|
constructor();
|
|
10
|
-
protected add(component: PolymorpheusComponent<
|
|
10
|
+
protected add(component: PolymorpheusComponent<TuiModalComponent<T>>): () => void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiModalService<any, any>, never>;
|
|
12
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<TuiModalService<any, any>>;
|
|
13
13
|
}
|
|
@@ -4,12 +4,11 @@ import * as i1 from "@taiga-ui/core/directives/icons";
|
|
|
4
4
|
import * as i2 from "@taiga-ui/core/directives/appearance";
|
|
5
5
|
export declare class TuiNotification {
|
|
6
6
|
private readonly options;
|
|
7
|
-
protected readonly computedIcon: import("@angular/core").Signal<string>;
|
|
8
7
|
protected readonly nothing: undefined;
|
|
9
8
|
protected readonly icons: import("@angular/core").Signal<string>;
|
|
10
9
|
readonly appearance: import("@angular/core").InputSignal<"" | ("info" | "positive" | "negative" | "warning" | "neutral" | "accent" | "action-destructive" | "action-grayscale" | "action" | "flat-destructive" | "flat-grayscale" | "flat" | "floating" | "glass" | "icon" | "outline-destructive" | "outline-grayscale" | "outline" | "primary-destructive" | "primary-grayscale" | "primary" | "secondary-destructive" | "secondary-grayscale" | "secondary" | "textfield" | (Record<never, never> & string))>;
|
|
11
|
-
readonly icon: import("@angular/core").InputSignal<string | TuiStringHandler<string>>;
|
|
12
10
|
readonly size: import("@angular/core").InputSignal<"m" | "l" | "s">;
|
|
11
|
+
readonly icon: import("@angular/core").InputSignal<string | TuiStringHandler<string>>;
|
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiNotification, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiNotification, "tui-notification,
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiNotification, "tui-notification,[tuiNotification]", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.TuiWithIcons; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiWithAppearance; inputs: {}; outputs: {}; }]>;
|
|
15
14
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { type TuiDateFormatSettings } from '@taiga-ui/core/tokens';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiDateFormat
|
|
5
|
-
|
|
6
|
-
private readonly parent;
|
|
7
|
-
constructor();
|
|
8
|
-
set tuiDateFormat(format: Partial<TuiDateFormatSettings>);
|
|
3
|
+
export declare class TuiDateFormat {
|
|
4
|
+
readonly tuiDateFormat: import("@angular/core").InputSignal<Partial<TuiDateFormatSettings>>;
|
|
9
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDateFormat, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDateFormat, "[tuiDateFormat]", never, { "tuiDateFormat": { "alias": "tuiDateFormat"; "required":
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDateFormat, "[tuiDateFormat]", never, { "tuiDateFormat": { "alias": "tuiDateFormat"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
7
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InjectionToken, type Provider } from '@angular/core';
|
|
2
1
|
export interface TuiDropdownHoverOptions {
|
|
3
2
|
readonly hideDelay: number;
|
|
4
3
|
readonly showDelay: number;
|
|
@@ -8,5 +7,4 @@ export declare const TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS: TuiDropdownHoverOptions
|
|
|
8
7
|
/**
|
|
9
8
|
* Default parameters for dropdown hover directive
|
|
10
9
|
*/
|
|
11
|
-
export declare const TUI_DROPDOWN_HOVER_OPTIONS: InjectionToken<TuiDropdownHoverOptions
|
|
12
|
-
export declare function tuiDropdownHoverOptionsProvider(options: Partial<TuiDropdownHoverOptions>): Provider;
|
|
10
|
+
export declare const TUI_DROPDOWN_HOVER_OPTIONS: import("@angular/core").InjectionToken<TuiDropdownHoverOptions>, tuiDropdownHoverOptionsProvider: (item: Partial<TuiDropdownHoverOptions> | (() => Partial<TuiDropdownHoverOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -10,7 +10,7 @@ export declare class TuiDropdownPosition extends TuiPositionAccessor {
|
|
|
10
10
|
private previous?;
|
|
11
11
|
readonly directionChange: EventEmitter<TuiVerticalDirection>;
|
|
12
12
|
readonly type = "dropdown";
|
|
13
|
-
readonly accessor: TuiRectAccessor
|
|
13
|
+
readonly accessor: TuiRectAccessor;
|
|
14
14
|
emitDirection(direction: TuiVerticalDirection): void;
|
|
15
15
|
getPosition({ width, height }: DOMRect): TuiPoint;
|
|
16
16
|
getAlign(align: TuiDropdownAlign): TuiDropdownAlign;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InjectionToken, type Provider } from '@angular/core';
|
|
2
1
|
import { type TuiOrientation, type TuiSizeL } from '@taiga-ui/core/types';
|
|
3
2
|
export interface TuiGroupOptions {
|
|
4
3
|
readonly size: TuiSizeL;
|
|
@@ -7,5 +6,4 @@ export interface TuiGroupOptions {
|
|
|
7
6
|
readonly orientation: TuiOrientation;
|
|
8
7
|
}
|
|
9
8
|
export declare const TUI_GROUP_DEFAULT_OPTIONS: TuiGroupOptions;
|
|
10
|
-
export declare const TUI_GROUP_OPTIONS: InjectionToken<TuiGroupOptions
|
|
11
|
-
export declare function tuiGroupOptionsProvider(options: Partial<TuiGroupOptions>): Provider;
|
|
9
|
+
export declare const TUI_GROUP_OPTIONS: import("@angular/core").InjectionToken<TuiGroupOptions>, tuiGroupOptionsProvider: (item: Partial<TuiGroupOptions> | (() => Partial<TuiGroupOptions>)) => import("@angular/core").FactoryProvider;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { type TuiNumberFormatSettings } from '@taiga-ui/core/tokens';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiNumberFormat
|
|
5
|
-
|
|
6
|
-
private readonly parent;
|
|
7
|
-
constructor();
|
|
8
|
-
set tuiNumberFormat(format: Partial<TuiNumberFormatSettings>);
|
|
3
|
+
export declare class TuiNumberFormat {
|
|
4
|
+
readonly tuiNumberFormat: import("@angular/core").InputSignal<Partial<TuiNumberFormatSettings>>;
|
|
9
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<TuiNumberFormat, never>;
|
|
10
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiNumberFormat, "[tuiNumberFormat]", never, { "tuiNumberFormat": { "alias": "tuiNumberFormat"; "required":
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiNumberFormat, "[tuiNumberFormat]", never, { "tuiNumberFormat": { "alias": "tuiNumberFormat"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
7
|
}
|
|
@@ -18,7 +18,7 @@ function tuiProvideAccessor(provide, type, fallback) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function tuiFallbackAccessor(type) {
|
|
21
|
-
return (accessors, fallback) => accessors?.find?.((accessor) => accessor !== fallback && accessor.type === type) || fallback;
|
|
21
|
+
return (accessors, fallback) => accessors?.find?.((accessor) => accessor !== fallback && accessor.type === type) || Object.create(fallback, { type: { value: type } });
|
|
22
22
|
}
|
|
23
23
|
function tuiPositionAccessorFor(type, fallback) {
|
|
24
24
|
return tuiProvideAccessor(TuiPositionAccessor, type, fallback);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-classes.mjs","sources":["../../../projects/core/classes/accessors.ts","../../../projects/core/classes/vehicle.ts","../../../projects/core/classes/driver.ts","../../../projects/core/classes/taiga-ui-core-classes.ts"],"sourcesContent":["import {\n type AbstractType,\n type ExistingProvider,\n type FactoryProvider,\n Optional,\n SkipSelf,\n type Type,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiPoint} from '@taiga-ui/core/types';\n\nexport abstract class TuiAccessor {\n public abstract readonly type: string;\n}\n\nexport abstract class TuiPositionAccessor extends TuiAccessor {\n /*\n * TODO @deprecated switching from DOMRect to HTMLElement in v5\n */\n public abstract getPosition(rect: DOMRect, element?: HTMLElement): TuiPoint;\n}\n\nexport abstract class TuiRectAccessor extends TuiAccessor {\n public abstract getClientRect(): DOMRect;\n}\n\nexport function tuiProvideAccessor<T extends TuiAccessor>(\n provide: AbstractType<T>,\n type: string,\n fallback: Type<T>,\n): FactoryProvider {\n return {\n provide,\n deps: [[new SkipSelf(), new Optional(), provide], fallback],\n useFactory: tuiFallbackAccessor<T>(type),\n };\n}\n\nexport function tuiFallbackAccessor<T extends TuiAccessor>(\n type: string,\n): (accessors: readonly T[] | null, fallback: T) => T {\n return (accessors, fallback) =>\n accessors?.find?.(\n (accessor) => accessor !== fallback && accessor.type === type,\n ) || fallback;\n}\n\nexport function tuiPositionAccessorFor(\n type: string,\n fallback: Type<TuiPositionAccessor>,\n): FactoryProvider {\n return tuiProvideAccessor(TuiPositionAccessor, type, fallback);\n}\n\nexport function tuiRectAccessorFor(\n type: string,\n fallback: Type<TuiRectAccessor>,\n): FactoryProvider {\n return tuiProvideAccessor(TuiRectAccessor, type, fallback);\n}\n\nexport function tuiAsPositionAccessor(\n accessor: Type<TuiPositionAccessor>,\n): ExistingProvider {\n return tuiProvide(TuiPositionAccessor, accessor, true);\n}\n\nexport function tuiAsRectAccessor(accessor: Type<TuiRectAccessor>): ExistingProvider {\n return tuiProvide(TuiRectAccessor, accessor, true);\n}\n","import {type ExistingProvider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport abstract class TuiVehicle {\n public abstract readonly type: string;\n public abstract toggle(value: boolean): void;\n}\n\nexport function tuiAsVehicle(vehicle: Type<TuiVehicle>): ExistingProvider {\n return tuiProvide(TuiVehicle, vehicle, true);\n}\n","import {\n type AfterViewInit,\n DestroyRef,\n Directive,\n type ExistingProvider,\n inject,\n type Type,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {distinctUntilChanged, merge, Observable} from 'rxjs';\n\nimport {TuiVehicle} from './vehicle';\n\nexport abstract class TuiDriver extends Observable<boolean> {\n public abstract readonly type: string;\n}\n\nexport function tuiAsDriver(driver: Type<TuiDriver>): ExistingProvider {\n return tuiProvide(TuiDriver, driver, true);\n}\n\n@Directive()\nexport abstract class TuiDriverDirective implements AfterViewInit {\n public abstract type: string;\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly drivers: readonly TuiDriver[] =\n inject<any>(TuiDriver, {self: true, optional: true}) || [];\n\n private readonly vehicles: readonly TuiVehicle[] = inject<any>(TuiVehicle, {\n self: true,\n optional: true,\n });\n\n public ngAfterViewInit(): void {\n const vehicle = this.vehicles?.find(({type}) => type === this.type);\n\n merge(...this.drivers.filter(({type}) => type === this.type))\n .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => {\n vehicle?.toggle(value);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAWsB,WAAW,CAAA;AAEhC;AAEK,MAAgB,mBAAoB,SAAQ,WAAW,CAAA;AAK5D;AAEK,MAAgB,eAAgB,SAAQ,WAAW,CAAA;AAExD;SAEe,kBAAkB,CAC9B,OAAwB,EACxB,IAAY,EACZ,QAAiB,EAAA;IAEjB,OAAO;QACH,OAAO;AACP,QAAA,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,IAAI,QAAQ,EAAE,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC;AAC3D,QAAA,UAAU,EAAE,mBAAmB,CAAI,IAAI,CAAC;KAC3C;AACL;AAEM,SAAU,mBAAmB,CAC/B,IAAY,EAAA;
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-classes.mjs","sources":["../../../projects/core/classes/accessors.ts","../../../projects/core/classes/vehicle.ts","../../../projects/core/classes/driver.ts","../../../projects/core/classes/taiga-ui-core-classes.ts"],"sourcesContent":["import {\n type AbstractType,\n type ExistingProvider,\n type FactoryProvider,\n Optional,\n SkipSelf,\n type Type,\n} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiPoint} from '@taiga-ui/core/types';\n\nexport abstract class TuiAccessor {\n public abstract readonly type: string;\n}\n\nexport abstract class TuiPositionAccessor extends TuiAccessor {\n /*\n * TODO @deprecated switching from DOMRect to HTMLElement in v5\n */\n public abstract getPosition(rect: DOMRect, element?: HTMLElement): TuiPoint;\n}\n\nexport abstract class TuiRectAccessor extends TuiAccessor {\n public abstract getClientRect(): DOMRect;\n}\n\nexport function tuiProvideAccessor<T extends TuiAccessor>(\n provide: AbstractType<T>,\n type: string,\n fallback: Type<T>,\n): FactoryProvider {\n return {\n provide,\n deps: [[new SkipSelf(), new Optional(), provide], fallback],\n useFactory: tuiFallbackAccessor<T>(type),\n };\n}\n\nexport function tuiFallbackAccessor<T extends TuiAccessor>(\n type: string,\n): (accessors: readonly T[] | null, fallback: Omit<T, 'type'>) => T {\n return (accessors, fallback) =>\n accessors?.find?.(\n (accessor) => accessor !== fallback && accessor.type === type,\n ) || Object.create(fallback, {type: {value: type}});\n}\n\nexport function tuiPositionAccessorFor(\n type: string,\n fallback: Type<TuiPositionAccessor>,\n): FactoryProvider {\n return tuiProvideAccessor(TuiPositionAccessor, type, fallback);\n}\n\nexport function tuiRectAccessorFor(\n type: string,\n fallback: Type<TuiRectAccessor>,\n): FactoryProvider {\n return tuiProvideAccessor(TuiRectAccessor, type, fallback);\n}\n\nexport function tuiAsPositionAccessor(\n accessor: Type<TuiPositionAccessor>,\n): ExistingProvider {\n return tuiProvide(TuiPositionAccessor, accessor, true);\n}\n\nexport function tuiAsRectAccessor(accessor: Type<TuiRectAccessor>): ExistingProvider {\n return tuiProvide(TuiRectAccessor, accessor, true);\n}\n","import {type ExistingProvider, type Type} from '@angular/core';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport abstract class TuiVehicle {\n public abstract readonly type: string;\n public abstract toggle(value: boolean): void;\n}\n\nexport function tuiAsVehicle(vehicle: Type<TuiVehicle>): ExistingProvider {\n return tuiProvide(TuiVehicle, vehicle, true);\n}\n","import {\n type AfterViewInit,\n DestroyRef,\n Directive,\n type ExistingProvider,\n inject,\n type Type,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {distinctUntilChanged, merge, Observable} from 'rxjs';\n\nimport {TuiVehicle} from './vehicle';\n\nexport abstract class TuiDriver extends Observable<boolean> {\n public abstract readonly type: string;\n}\n\nexport function tuiAsDriver(driver: Type<TuiDriver>): ExistingProvider {\n return tuiProvide(TuiDriver, driver, true);\n}\n\n@Directive()\nexport abstract class TuiDriverDirective implements AfterViewInit {\n public abstract type: string;\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly drivers: readonly TuiDriver[] =\n inject<any>(TuiDriver, {self: true, optional: true}) || [];\n\n private readonly vehicles: readonly TuiVehicle[] = inject<any>(TuiVehicle, {\n self: true,\n optional: true,\n });\n\n public ngAfterViewInit(): void {\n const vehicle = this.vehicles?.find(({type}) => type === this.type);\n\n merge(...this.drivers.filter(({type}) => type === this.type))\n .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => {\n vehicle?.toggle(value);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAWsB,WAAW,CAAA;AAEhC;AAEK,MAAgB,mBAAoB,SAAQ,WAAW,CAAA;AAK5D;AAEK,MAAgB,eAAgB,SAAQ,WAAW,CAAA;AAExD;SAEe,kBAAkB,CAC9B,OAAwB,EACxB,IAAY,EACZ,QAAiB,EAAA;IAEjB,OAAO;QACH,OAAO;AACP,QAAA,IAAI,EAAE,CAAC,CAAC,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12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiAlertComponent, isStandalone: true, selector: "tui-alert", host: { attributes: { "role": "alert" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiNotificationDirective }], ngImport: i0, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{inline-size:18rem;margin:1.625rem 3rem;word-break:break-word;transform:translateZ(0);filter:drop-shadow(0 .375rem 1rem rgba(0,0,0,.12))}:host :host-context(tui-root._mobile){margin:.625rem 1rem}.t-wrapper{background:var(--tui-background-base);clip-path:inset(.375rem 0 round var(--tui-radius-m))}.t-closable{padding-inline-end:2.5rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiNotification, selector: "tui-notification,
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiAlertComponent, isStandalone: true, selector: "tui-alert", host: { attributes: { "role": "alert" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiNotificationDirective }], ngImport: i0, template: "<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n", styles: [":host{inline-size:18rem;margin:1.625rem 3rem;word-break:break-word;transform:translateZ(0);filter:drop-shadow(0 .375rem 1rem rgba(0,0,0,.12))}:host :host-context(tui-root._mobile){margin:.625rem 1rem}.t-wrapper{background:var(--tui-background-base);clip-path:inset(.375rem 0 round var(--tui-radius-m))}.t-closable{padding-inline-end:2.5rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiNotification, selector: "tui-notification,[tuiNotification]", inputs: ["appearance", "size", "icon"] }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
34
34
|
}
|
|
35
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiAlertComponent, decorators: [{
|
|
36
36
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-alert.mjs","sources":["../../../projects/core/components/alert/alert.component.ts","../../../projects/core/components/alert/alert.template.html","../../../projects/core/components/alert/alert.tokens.ts","../../../projects/core/components/alert/alert.service.ts","../../../projects/core/components/alert/alert.directive.ts","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiNotification} from '@taiga-ui/core/components/notification';\nimport {TuiNotificationDirective} from '@taiga-ui/core/directives';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, fromEvent, of, repeat, switchMap, takeUntil, timer} from 'rxjs';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\n@Component({\n selector: 'tui-alert',\n imports: [PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle],\n templateUrl: './alert.template.html',\n styleUrl: './alert.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiNotificationDirective],\n host: {role: 'alert'},\n})\nexport class TuiAlertComponent<O, I> {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly close = inject(TUI_CLOSE_WORD);\n protected readonly item = injectContext<TuiPortalContext<TuiAlertOptions<I>, O>>();\n\n protected readonly sub = of(\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.appearance)\n : this.item.autoClose,\n )\n .pipe(\n switchMap((autoClose) => (autoClose ? timer(autoClose) : EMPTY)),\n takeUntil(fromEvent(this.el, 'mouseenter')),\n repeat({delay: () => fromEvent(this.el, 'mouseleave')}),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.item.$implicit.complete());\n}\n","<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\nimport {tuiCreateToken} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\nexport const TUI_ALERT_CONCURRENCY = tuiCreateToken<number>(5);\n\nexport const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'> = {\n autoClose: 3000,\n label: '',\n closable: true,\n data: undefined,\n block: 'start',\n inline: 'end',\n};\n\nexport const TUI_ALERT_OPTIONS = new InjectionToken<TuiAlertOptions>(\n ngDevMode ? 'TUI_ALERT_OPTIONS' : '',\n {\n factory: () => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...inject(TUI_NOTIFICATION_OPTIONS),\n }),\n },\n);\n\nexport function tuiAlertOptionsProvider(\n options: Partial<TuiAlertOptions>,\n): FactoryProvider {\n return {\n provide: TUI_ALERT_OPTIONS,\n useFactory: (): TuiAlertOptions => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...(inject(TUI_ALERT_OPTIONS, {optional: true, skipSelf: true}) ||\n inject(TUI_NOTIFICATION_OPTIONS)),\n ...options,\n }),\n };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {TuiNotificationService} from '@taiga-ui/core/directives/notification';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_CONCURRENCY, TUI_ALERT_OPTIONS} from './alert.tokens';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiAlertService extends TuiNotificationService<TuiAlertOptions<any>> {\n protected override readonly options = inject(TUI_ALERT_OPTIONS);\n protected override readonly component = TuiAlertComponent;\n\n constructor() {\n super(inject(TUI_ALERT_CONCURRENCY));\n }\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n selector: 'ng-template[tuiAlert]',\n providers: [tuiAsPortal(TuiAlertService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n },\n ],\n})\nexport class TuiAlert<T> {\n public readonly tuiAlertOptions = input<Partial<TuiAlertOptions<T>>>({});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;MAwBa,iBAAiB,CAAA;AAT9B,IAAA,WAAA,GAAA;QAUqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AAErB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;QAC9B,IAAI,CAAA,IAAA,GAAG,aAAa,EAA2C;QAE/D,IAAG,CAAA,GAAA,GAAG,EAAE,CACvB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK;AAC3B,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU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A,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAShC,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAXpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;AACzC,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,kBAAkB;AAC7B,4BAAA,MAAM,EAAE,CAAC,0BAA0B,EAAE,gBAAgB,CAAC;4BACtD,OAAO,EAAE,CAAC,4BAA4B,CAAC;AAC1C,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-alert.mjs","sources":["../../../projects/core/components/alert/alert.component.ts","../../../projects/core/components/alert/alert.template.html","../../../projects/core/components/alert/alert.tokens.ts","../../../projects/core/components/alert/alert.service.ts","../../../projects/core/components/alert/alert.directive.ts","../../../projects/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiNotification} from '@taiga-ui/core/components/notification';\nimport {TuiNotificationDirective} from '@taiga-ui/core/directives';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {EMPTY, fromEvent, of, repeat, switchMap, takeUntil, timer} from 'rxjs';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\n@Component({\n selector: 'tui-alert',\n imports: [PolymorpheusOutlet, TuiButton, TuiNotification, TuiTitle],\n templateUrl: './alert.template.html',\n styleUrl: './alert.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiNotificationDirective],\n host: {role: 'alert'},\n})\nexport class TuiAlertComponent<O, I> {\n private readonly el = tuiInjectElement();\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly close = inject(TUI_CLOSE_WORD);\n protected readonly item = injectContext<TuiPortalContext<TuiAlertOptions<I>, O>>();\n\n protected readonly sub = of(\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.appearance)\n : this.item.autoClose,\n )\n .pipe(\n switchMap((autoClose) => (autoClose ? timer(autoClose) : EMPTY)),\n takeUntil(fromEvent(this.el, 'mouseenter')),\n repeat({delay: () => fromEvent(this.el, 'mouseleave')}),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.item.$implicit.complete());\n}\n","<div class=\"t-wrapper\">\n <tui-notification\n size=\"m\"\n [appearance]=\"item.appearance\"\n [class.t-closable]=\"item.closable\"\n [icon]=\"item.icon\"\n >\n <span tuiTitle>\n <ng-container *polymorpheusOutlet=\"item.label as text; context: item\">\n {{ text }}\n </ng-container>\n <span tuiSubtitle>\n <span\n *polymorpheusOutlet=\"item.content as text; context: item\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n </span>\n @if (item.closable) {\n <button\n tuiIconButton\n type=\"button\"\n [iconStart]=\"icons.close\"\n (click)=\"item.$implicit.complete()\"\n >\n {{ close() }}\n </button>\n }\n </tui-notification>\n</div>\n","import {type FactoryProvider, inject, InjectionToken} from '@angular/core';\nimport {tuiCreateToken} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\n\nexport const TUI_ALERT_CONCURRENCY = tuiCreateToken<number>(5);\n\nexport const TUI_ALERT_DEFAULT_OPTIONS: Omit<TuiAlertOptions, 'appearance' | 'icon'> = {\n autoClose: 3000,\n label: '',\n closable: true,\n data: undefined,\n block: 'start',\n inline: 'end',\n};\n\nexport const TUI_ALERT_OPTIONS = new InjectionToken<TuiAlertOptions>(\n ngDevMode ? 'TUI_ALERT_OPTIONS' : '',\n {\n factory: () => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...inject(TUI_NOTIFICATION_OPTIONS),\n }),\n },\n);\n\nexport function tuiAlertOptionsProvider(\n options: Partial<TuiAlertOptions>,\n): FactoryProvider {\n return {\n provide: TUI_ALERT_OPTIONS,\n useFactory: (): TuiAlertOptions => ({\n ...TUI_ALERT_DEFAULT_OPTIONS,\n ...(inject(TUI_ALERT_OPTIONS, {optional: true, skipSelf: true}) ||\n inject(TUI_NOTIFICATION_OPTIONS)),\n ...options,\n }),\n };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {TuiNotificationService} from '@taiga-ui/core/directives/notification';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TUI_ALERT_CONCURRENCY, TUI_ALERT_OPTIONS} from './alert.tokens';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiAlertService extends TuiNotificationService<TuiAlertOptions<any>> {\n protected override readonly options = inject(TUI_ALERT_OPTIONS);\n protected override readonly component = TuiAlertComponent;\n\n constructor() {\n super(inject(TUI_ALERT_CONCURRENCY));\n }\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiAlertOptions} from './alert.interfaces';\nimport {TuiAlertService} from './alert.service';\n\n@Directive({\n selector: 'ng-template[tuiAlert]',\n providers: [tuiAsPortal(TuiAlertService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiAlertOptions', 'open: tuiAlert'],\n outputs: ['openChange: tuiAlertChange'],\n },\n ],\n})\nexport class TuiAlert<T> {\n public readonly tuiAlertOptions = input<Partial<TuiAlertOptions<T>>>({});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;MAwBa,iBAAiB,CAAA;AAT9B,IAAA,WAAA,GAAA;QAUqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AAErB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAChC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;QAC9B,IAAI,CAAA,IAAA,GAAG,aAAa,EAA2C;QAE/D,IAAG,CAAA,GAAA,GAAG,EAAE,CACvB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK;AAC3B,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;AAC1C,cAAE,IAAI,CAAC,IAAI,CAAC,SAAS;aAExB,IAAI,CACD,SAAS,CAAC,CAAC,SAAS,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,EAChE,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,EAC3C,MAAM,CAAC,EAAC,KAAK,EAAE,MAAM,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,CAAC,EAAC,CAAC,EACvD,kBAAkB,EAAE;AAEvB,aAAA,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;AACvD;+GAnBY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EA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/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, computed, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import { TuiDay, TuiMonth, TuiDayRange, TUI_FIRST_DAY, TUI_LAST_DAY, MIN_YEAR, MAX_YEAR, TuiYear, TuiMonthRange, TUI_LAST_DISPLAYED_DAY } from '@taiga-ui/cdk/date-time';
|
|
4
4
|
import { TuiMapperPipe } from '@taiga-ui/cdk/pipes/mapper';
|
|
5
|
-
import {
|
|
5
|
+
import { tuiNullableSame, tuiPure, tuiIsNumber } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
6
6
|
import { TuiScrollIntoView, TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
|
|
7
7
|
import { TUI_ITEMS_HANDLERS } from '@taiga-ui/core/directives';
|
|
8
8
|
import { TUI_SHORT_WEEK_DAYS, TUI_DAY_TYPE_HANDLER, tuiAsAuxiliary } from '@taiga-ui/core/tokens';
|
|
@@ -14,18 +14,14 @@ import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
|
14
14
|
import { TuiHovered } from '@taiga-ui/cdk/directives/hovered';
|
|
15
15
|
import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
|
|
16
16
|
import { TuiCalendarSheetPipe, TuiOrderWeekDaysPipe, TuiMonthPipe } from '@taiga-ui/core/pipes';
|
|
17
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
17
18
|
import { TuiLink } from '@taiga-ui/core/components/link';
|
|
18
19
|
import { TuiSpinButton } from '@taiga-ui/core/components/spin-button';
|
|
19
20
|
|
|
20
21
|
const TUI_CALENDAR_SHEET_DEFAULT_OPTIONS = {
|
|
21
22
|
rangeMode: false,
|
|
22
23
|
};
|
|
23
|
-
const TUI_CALENDAR_SHEET_OPTIONS =
|
|
24
|
-
factory: () => TUI_CALENDAR_SHEET_DEFAULT_OPTIONS,
|
|
25
|
-
});
|
|
26
|
-
function tuiCalendarSheetOptionsProvider(options) {
|
|
27
|
-
return tuiProvideOptions(TUI_CALENDAR_SHEET_OPTIONS, options, TUI_CALENDAR_SHEET_DEFAULT_OPTIONS);
|
|
28
|
-
}
|
|
24
|
+
const [TUI_CALENDAR_SHEET_OPTIONS, tuiCalendarSheetOptionsProvider] = tuiCreateOptions(TUI_CALENDAR_SHEET_DEFAULT_OPTIONS);
|
|
29
25
|
|
|
30
26
|
class TuiCalendarSheet {
|
|
31
27
|
constructor() {
|
|
@@ -140,7 +136,7 @@ class TuiCalendarSheet {
|
|
|
140
136
|
this.hoveredItemChange.emit(day);
|
|
141
137
|
}
|
|
142
138
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCalendarSheet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
143
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiCalendarSheet, isStandalone: true, selector: "tui-calendar-sheet", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", markerHandler: "markerHandler", value: "value", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent", single: "single" }, outputs: { hoveredItemChange: "hoveredItemChange", dayClick: "dayClick" }, host: { properties: { "class._picking": "isRangePicking" } }, ngImport: i0, template: "<div class=\"t-row t-row_weekday\">\n @for (day of unorderedWeekDays$ | tuiOrderWeekDays | async; track day) {\n <div\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n }\n</div>\n@let sheet = month | tuiCalendarSheet: true;\n<div>\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n @let item = sheet[rowIndex]?.[colIndex];\n @if (item && (!itemIsUnavailable(item) || showAdjacent)) {\n <div\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n {{ item.day }}\n @if (\n item | tuiMapper: toMarkers : itemIsToday(item) : getItemRange(item) : markerHandler;\n as markers\n ) {\n <div class=\"t-dots\">\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n @if (markers.length > 1) {\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n }\n </div>\n }\n </div>\n }\n </ng-container>\n </div>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;
|
|
139
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiCalendarSheet, isStandalone: true, selector: "tui-calendar-sheet", inputs: { month: "month", disabledItemHandler: "disabledItemHandler", markerHandler: "markerHandler", value: "value", hoveredItem: "hoveredItem", showAdjacent: "showAdjacent", single: "single" }, outputs: { hoveredItemChange: "hoveredItemChange", dayClick: "dayClick" }, host: { properties: { "class._picking": "isRangePicking" } }, ngImport: i0, template: "<div class=\"t-row t-row_weekday\">\n @for (day of unorderedWeekDays$ | tuiOrderWeekDays | async; track day) {\n <div\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n }\n</div>\n@let sheet = month | tuiCalendarSheet: true;\n<div>\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n @let item = sheet[rowIndex]?.[colIndex];\n @if (item && (!itemIsUnavailable(item) || showAdjacent)) {\n <div\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n {{ item.day }}\n @if (\n item | tuiMapper: toMarkers : itemIsToday(item) : getItemRange(item) : markerHandler;\n as markers\n ) {\n <div class=\"t-dots\">\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n @if (markers.length > 1) {\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n }\n </div>\n }\n </div>\n }\n </ng-container>\n </div>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}.t-cell{inline-size:calc(100% / 7)}[data-type=weekday]{color:var(--tui-text-primary)}[data-type=weekend]{color:var(--tui-text-negative)}.t-row{justify-content:flex-start}.t-row:first-child{justify-content:flex-end}.t-row_weekday{font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none}.t-cell_unavailable{opacity:var(--tui-disabled-opacity)}.t-dots{position:absolute;bottom:0;display:flex;justify-content:center;margin-block-start:-.5rem;padding-block-end:.25rem}.t-dot{display:inline-block;inline-size:.25rem;block-size:.25rem;border-radius:100%;margin:0 .0625rem}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TuiCalendarSheetPipe, name: "tuiCalendarSheet" }, { kind: "directive", type: TuiHovered, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { kind: "pipe", type: TuiMapperPipe, name: "tuiMapper" }, { kind: "pipe", type: TuiOrderWeekDaysPipe, name: "tuiOrderWeekDays" }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
144
140
|
}
|
|
145
141
|
__decorate([
|
|
146
142
|
tuiPure
|
|
@@ -156,7 +152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
156
152
|
TuiRepeatTimes,
|
|
157
153
|
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
158
154
|
'[class._picking]': 'isRangePicking',
|
|
159
|
-
}, template: "<div class=\"t-row t-row_weekday\">\n @for (day of unorderedWeekDays$ | tuiOrderWeekDays | async; track day) {\n <div\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n }\n</div>\n@let sheet = month | tuiCalendarSheet: true;\n<div>\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n @let item = sheet[rowIndex]?.[colIndex];\n @if (item && (!itemIsUnavailable(item) || showAdjacent)) {\n <div\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n {{ item.day }}\n @if (\n item | tuiMapper: toMarkers : itemIsToday(item) : getItemRange(item) : markerHandler;\n as markers\n ) {\n <div class=\"t-dots\">\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n @if (markers.length > 1) {\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n }\n </div>\n }\n </div>\n }\n </ng-container>\n </div>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;
|
|
155
|
+
}, template: "<div class=\"t-row t-row_weekday\">\n @for (day of unorderedWeekDays$ | tuiOrderWeekDays | async; track day) {\n <div\n class=\"t-cell\"\n [textContent]=\"day\"\n ></div>\n }\n</div>\n@let sheet = month | tuiCalendarSheet: true;\n<div>\n <div\n *tuiRepeatTimes=\"let rowIndex of sheet.length\"\n automation-id=\"tui-calendar-sheet__row\"\n class=\"t-row\"\n >\n <ng-container *tuiRepeatTimes=\"let colIndex of sheet[rowIndex]?.length || 0\">\n @let item = sheet[rowIndex]?.[colIndex];\n @if (item && (!itemIsUnavailable(item) || showAdjacent)) {\n <div\n automation-id=\"tui-calendar-sheet__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [attr.data-type]=\"item | tuiMapper: dayTypeHandler\"\n [class.t-cell_disabled]=\"disabledItemHandler(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [class.t-cell_unavailable]=\"itemIsUnavailable(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event && item)\"\n >\n {{ item.day }}\n @if (\n item | tuiMapper: toMarkers : itemIsToday(item) : getItemRange(item) : markerHandler;\n as markers\n ) {\n <div class=\"t-dots\">\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[0]\"\n ></div>\n @if (markers.length > 1) {\n <div\n class=\"t-dot\"\n [style.background]=\"markers?.[1] || ''\"\n ></div>\n }\n </div>\n }\n </div>\n }\n </ng-container>\n </div>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}.t-cell{inline-size:calc(100% / 7)}[data-type=weekday]{color:var(--tui-text-primary)}[data-type=weekend]{color:var(--tui-text-negative)}.t-row{justify-content:flex-start}.t-row:first-child{justify-content:flex-end}.t-row_weekday{font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none}.t-cell_unavailable{opacity:var(--tui-disabled-opacity)}.t-dots{position:absolute;bottom:0;display:flex;justify-content:center;margin-block-start:-.5rem;padding-block-end:.25rem}.t-dot{display:inline-block;inline-size:.25rem;block-size:.25rem;border-radius:100%;margin:0 .0625rem}\n"] }]
|
|
160
156
|
}], propDecorators: { month: [{
|
|
161
157
|
type: Input
|
|
162
158
|
}], disabledItemHandler: [{
|
|
@@ -312,13 +308,13 @@ class TuiCalendarYear {
|
|
|
312
308
|
return max < initial ? max + 1 : initial;
|
|
313
309
|
}
|
|
314
310
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCalendarYear, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
315
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.15", type: TuiCalendarYear, isStandalone: true, selector: "tui-calendar-year", inputs: { rangeMode: "rangeMode", disabledItemHandler: "disabledItemHandler", initialItemSetter: ["initialItem", "initialItemSetter", (x) => x ?? CURRENT_YEAR], minSetter: ["min", "minSetter", (x) => x ?? MIN_YEAR], maxSetter: ["max", "maxSetter", (x) => x ?? MAX_YEAR], valueSetter: ["value", "valueSetter"] }, outputs: { yearClick: "yearClick" }, host: { properties: { "class._picking": "isRangePicking()" } }, providers: [tuiAsAuxiliary(TuiCalendarYear)], ngImport: i0, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n @let item = getItem(rowIndex, colIndex);\n <div\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n {{ item }}\n </div>\n </ng-container>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;
|
|
311
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.15", type: TuiCalendarYear, isStandalone: true, selector: "tui-calendar-year", inputs: { rangeMode: "rangeMode", disabledItemHandler: "disabledItemHandler", initialItemSetter: ["initialItem", "initialItemSetter", (x) => x ?? CURRENT_YEAR], minSetter: ["min", "minSetter", (x) => x ?? MIN_YEAR], maxSetter: ["max", "maxSetter", (x) => x ?? MAX_YEAR], valueSetter: ["value", "valueSetter"] }, outputs: { yearClick: "yearClick" }, host: { properties: { "class._picking": "isRangePicking()" } }, providers: [tuiAsAuxiliary(TuiCalendarYear)], ngImport: i0, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n @let item = getItem(rowIndex, colIndex);\n <div\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n {{ item }}\n </div>\n </ng-container>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;padding-inline-end:1rem;inline-size:15.75rem;padding:0 1.125rem}.t-cell{flex:1;border-block-start-width:.5rem;border-block-end-width:.5rem}\n"], dependencies: [{ kind: "directive", type: TuiHovered, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }, { kind: "directive", type: TuiScrollIntoView, selector: "[tuiScrollIntoView]", inputs: ["tuiScrollIntoView"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
316
312
|
}
|
|
317
313
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiCalendarYear, decorators: [{
|
|
318
314
|
type: Component,
|
|
319
315
|
args: [{ selector: 'tui-calendar-year', imports: [TuiHovered, TuiRepeatTimes, TuiScrollIntoView], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsAuxiliary(TuiCalendarYear)], host: {
|
|
320
316
|
'[class._picking]': 'isRangePicking()',
|
|
321
|
-
}, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n @let item = getItem(rowIndex, colIndex);\n <div\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n {{ item }}\n </div>\n </ng-container>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;
|
|
317
|
+
}, template: "<div\n *tuiRepeatTimes=\"let rowIndex of rows\"\n automation-id=\"tui-calendar-year__row\"\n class=\"t-row\"\n>\n <ng-container *tuiRepeatTimes=\"let colIndex of 4\">\n @let item = getItem(rowIndex, colIndex);\n <div\n automation-id=\"tui-calendar-year__cell\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [class.t-cell_disabled]=\"isDisabled(item)\"\n [class.t-cell_today]=\"itemIsToday(item)\"\n [tuiScrollIntoView]=\"scrollItemIntoView(item)\"\n (click)=\"yearClick.emit(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n >\n {{ item }}\n </div>\n </ng-container>\n</div>\n", styles: [".t-row{display:flex;justify-content:flex-start;font:var(--tui-font-text-m)}.t-row:first-child{justify-content:flex-end}.t-row:last-child{justify-content:flex-start}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;line-height:2rem;isolation:isolate;cursor:pointer;overflow:hidden;border:.125rem solid transparent;box-sizing:border-box;mask:linear-gradient(transparent calc(50% - 1rem),#000 calc(50% - 1rem),#000 calc(50% + 1rem),transparent calc(50% + 1rem))}.t-cell:first-child{border-inline-start-color:transparent!important}.t-cell:last-child{border-inline-end-color:transparent!important}.t-cell:before,.t-cell:after{position:absolute;inset:0;content:\"\";z-index:-1;border-radius:var(--tui-radius-m)}.t-cell:after{mask:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 12 32\"><path d=\"M0.2856 0L0.6763 0C2.9265 0 4.9876 1.259 6.0147 3.2611L10.2442 11.5048C11.5301 14.0113 11.5683 16.9754 10.3472 19.5141L5.9766 28.6007C4.9772 30.6786 2.8754 32 0.5696 32H0.285645V0Z\"></path></svg>') right / .75rem 100% no-repeat,linear-gradient(#000,#000) left / calc(100% - .7rem) 100% no-repeat}.t-cell[data-range]:before{background:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range]:before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1)}:host._picking .t-cell[data-range=middle]{border-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=middle]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=middle]:not(:last-child):before{border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=start]{border-inline-end-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:not(:last-child):before{right:-1rem}.t-cell[data-range=start]:after{background:var(--tui-background-accent-1)}.t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1);color:var(--tui-text-primary-on-accent-1)}:host._picking .t-cell[data-range=end]{border-inline-start-color:var(--tui-background-neutral-1-hover)}.t-cell[data-range=end]:not(:first-child):before{left:-1rem}.t-cell[data-range=end]:after{background:var(--tui-background-accent-1);transform:scaleX(-1)}.t-cell[data-range=active]{color:var(--tui-text-primary-on-accent-1)}.t-cell[data-range=active]:after{background:var(--tui-background-accent-1);mask:none}.t-cell_disabled{opacity:var(--tui-disabled-opacity);pointer-events:none}.t-cell_today{text-decoration:underline;text-underline-offset:.25rem}@media (hover: hover) and (pointer: fine){.t-cell:hover:not([data-range=start]):not([data-range=end]):before{background:var(--tui-background-neutral-1-hover)}.t-cell[data-range=start]:hover:after,.t-cell[data-range=end]:hover:after,.t-cell[data-range=active]:hover:after{background:var(--tui-background-accent-1-hover)}}:host{display:block;padding-inline-end:1rem;inline-size:15.75rem;padding:0 1.125rem}.t-cell{flex:1;border-block-start-width:.5rem;border-block-end-width:.5rem}\n"] }]
|
|
322
318
|
}], propDecorators: { rangeMode: [{
|
|
323
319
|
type: Input
|
|
324
320
|
}], disabledItemHandler: [{
|