@taiga-ui/addon-mobile 4.52.0-canary.e10b718 → 4.52.0-canary.e53e79e
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 +2 -2
- package/components/index.d.ts +0 -1
- package/components/mobile-calendar/mobile-calendar.component.d.ts +5 -4
- package/components/mobile-calendar/mobile-calendar.strategy.d.ts +2 -5
- package/components/sheet-dialog/sheet-dialog.component.d.ts +2 -2
- package/components/sheet-dialog/sheet-dialog.directive.d.ts +4 -3
- package/components/sheet-dialog/sheet-dialog.options.d.ts +4 -10
- package/components/sheet-dialog/sheet-dialog.service.d.ts +9 -4
- package/directives/dropdown-mobile/dropdown-mobile.component.d.ts +10 -14
- package/directives/dropdown-mobile/dropdown-mobile.directive.d.ts +1 -2
- package/directives/dropdown-sheet/dropdown-sheet.component.d.ts +14 -0
- package/directives/dropdown-sheet/dropdown-sheet.directive.d.ts +6 -0
- package/directives/dropdown-sheet/index.d.ts +2 -0
- package/directives/index.d.ts +1 -1
- package/directives/responsive-dialog/responsive-dialog.directive.d.ts +5 -4
- package/directives/responsive-dialog/responsive-dialog.service.d.ts +4 -7
- package/directives/ripple/ripple.directive.d.ts +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +5 -4
- package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +7 -8
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +7 -10
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs +22 -38
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +15 -16
- package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +61 -59
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs +6 -7
- package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +11 -13
- package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components.mjs +0 -1
- package/fesm2022/taiga-ui-addon-mobile-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +64 -87
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs +83 -0
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs.map +1 -0
- package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +7 -9
- package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +44 -27
- package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +17 -38
- package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs +3 -4
- package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives.mjs +1 -1
- package/fesm2022/taiga-ui-addon-mobile-services.mjs +36 -7
- package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
- package/package.json +21 -22
- package/services/index.d.ts +1 -0
- package/services/theme-color.service.d.ts +18 -0
- package/styles/common/card-large.less +4 -0
- package/styles/common/chip.less +0 -20
- package/styles/common/toast.less +21 -0
- package/styles/ios/switch.less +50 -1
- package/styles/taiga-ui-mobile.less +14 -0
- package/components/mobile-dialog/index.d.ts +0 -3
- package/components/mobile-dialog/mobile-dialog.component.d.ts +0 -10
- package/components/mobile-dialog/mobile-dialog.options.d.ts +0 -12
- package/components/mobile-dialog/mobile-dialog.service.d.ts +0 -10
- package/directives/sidebar/index.d.ts +0 -3
- package/directives/sidebar/sidebar.component.d.ts +0 -21
- package/directives/sidebar/sidebar.d.ts +0 -6
- package/directives/sidebar/sidebar.directive.d.ts +0 -22
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs +0 -64
- package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +0 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs +0 -114
- package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs.map +0 -1
package/styles/common/chip.less
CHANGED
|
@@ -2,26 +2,6 @@ tui-chip,
|
|
|
2
2
|
[tuiChip] {
|
|
3
3
|
border-radius: 2rem;
|
|
4
4
|
|
|
5
|
-
&[data-size='s'] {
|
|
6
|
-
--t-size: 1.875rem;
|
|
7
|
-
--t-padding: 0.6875rem;
|
|
8
|
-
|
|
9
|
-
> img,
|
|
10
|
-
[tuiAvatar] {
|
|
11
|
-
margin-inline-start: -0.5rem;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&[data-size='m'] {
|
|
16
|
-
--t-size: 2rem;
|
|
17
|
-
--t-padding: 0.875rem;
|
|
18
|
-
|
|
19
|
-
> img,
|
|
20
|
-
[tuiAvatar] {
|
|
21
|
-
margin-inline-start: -0.625rem;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
5
|
> img,
|
|
26
6
|
[tuiAvatar] {
|
|
27
7
|
border-radius: 100%;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[tuiToast] {
|
|
2
|
+
min-block-size: 3rem;
|
|
3
|
+
border-radius: 1.5rem;
|
|
4
|
+
font: var(--tui-font-text-m);
|
|
5
|
+
|
|
6
|
+
[tuiButton]:last-child {
|
|
7
|
+
margin: -0.1875rem -0.4375rem -0.1875rem 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:has([tuiAvatar]) {
|
|
11
|
+
gap: 1rem;
|
|
12
|
+
|
|
13
|
+
[tuiAvatar] {
|
|
14
|
+
margin: 0 -0.25rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[tuiButton]:last-child {
|
|
18
|
+
margin-inline-end: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/styles/ios/switch.less
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
@import '@taiga-ui/core/styles/taiga-ui-local.less';
|
|
2
2
|
|
|
3
|
-
input[tuiSwitch] {
|
|
3
|
+
input[tuiSwitch]._native {
|
|
4
|
+
block-size: 1.9375rem;
|
|
5
|
+
inline-size: 3.1875rem;
|
|
6
|
+
appearance: auto;
|
|
7
|
+
accent-color: var(--tui-background-accent-2);
|
|
8
|
+
|
|
9
|
+
&:invalid {
|
|
10
|
+
accent-color: var(--tui-status-negative);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&::before,
|
|
14
|
+
&::after {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@supports (anchor-name: --ios26) {
|
|
19
|
+
inline-size: 4rem;
|
|
20
|
+
block-size: 1.75rem;
|
|
21
|
+
|
|
22
|
+
&::before {
|
|
23
|
+
.transition(background);
|
|
24
|
+
|
|
25
|
+
position: absolute;
|
|
26
|
+
display: block;
|
|
27
|
+
inset: 0;
|
|
28
|
+
border-radius: 10rem;
|
|
29
|
+
inline-size: 100%;
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
mix-blend-mode: color;
|
|
32
|
+
transform: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:invalid:not(:checked)::before {
|
|
36
|
+
background-color: var(--tui-status-negative);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-theme='dark'] & {
|
|
40
|
+
&:invalid:not(:checked)::before {
|
|
41
|
+
background-color: var(--tui-status-negative-pale);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:disabled:not(:checked)::before {
|
|
45
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
46
|
+
mix-blend-mode: lighten;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
input[tuiSwitch]:not(._native) {
|
|
4
53
|
block-size: 1.9375rem;
|
|
5
54
|
inline-size: 3.1875rem;
|
|
6
55
|
border-radius: 2rem;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@import '@taiga-ui/core/styles/taiga-ui-local.less';
|
|
1
2
|
@import 'common/search.less';
|
|
2
3
|
|
|
3
4
|
[data-platform='android'] {
|
|
@@ -22,6 +23,12 @@
|
|
|
22
23
|
tui-segmented > .tui-segmented_active:active {
|
|
23
24
|
opacity: var(--tui-disabled-opacity);
|
|
24
25
|
}
|
|
26
|
+
|
|
27
|
+
[tuiToast]:active {
|
|
28
|
+
.interactive({
|
|
29
|
+
transform: scale(0.95);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
[data-platform='android'],
|
|
@@ -38,4 +45,11 @@
|
|
|
38
45
|
@import 'common/header.less';
|
|
39
46
|
@import 'common/message.less';
|
|
40
47
|
@import 'common/notification-middle.less';
|
|
48
|
+
@import 'common/toast.less';
|
|
49
|
+
|
|
50
|
+
tui-app-bar {
|
|
51
|
+
[tuiButton][data-size='l'] {
|
|
52
|
+
font-weight: normal;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
41
55
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type TuiPopover } from '@taiga-ui/cdk/services';
|
|
2
|
-
import { type TuiMobileDialogOptions } from './mobile-dialog.options';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TuiMobileDialog<I> {
|
|
5
|
-
protected readonly isIOS: boolean;
|
|
6
|
-
protected readonly context: TuiPopover<TuiMobileDialogOptions<I>, number>;
|
|
7
|
-
protected onAction(index: number): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMobileDialog<any>, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiMobileDialog<any>, "tui-mobile-dialog", never, {}, {}, never, never, true, never>;
|
|
10
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, type Provider } from '@angular/core';
|
|
2
|
-
export interface TuiMobileDialogOptions<I = undefined> {
|
|
3
|
-
readonly actions: readonly string[];
|
|
4
|
-
readonly data: I;
|
|
5
|
-
readonly label: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const TUI_MOBILE_DIALOG_DEFAULT_OPTIONS: TuiMobileDialogOptions;
|
|
8
|
-
/**
|
|
9
|
-
* Default parameters for mobile dialog component
|
|
10
|
-
*/
|
|
11
|
-
export declare const TUI_MOBILE_DIALOG_OPTIONS: InjectionToken<TuiMobileDialogOptions<undefined>>;
|
|
12
|
-
export declare function tuiMobileDialogOptionsProvider(options: Partial<TuiMobileDialogOptions<unknown>>): Provider;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type TuiPopoverContext, TuiPopoverService } from '@taiga-ui/cdk/services';
|
|
2
|
-
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
3
|
-
import { type Observable } from 'rxjs';
|
|
4
|
-
import { type TuiMobileDialogOptions } from './mobile-dialog.options';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class TuiMobileDialogService extends TuiPopoverService<TuiMobileDialogOptions<any>, number> {
|
|
7
|
-
open(content: PolymorpheusContent<TuiMobileDialogOptions<any> & TuiPopoverContext<number>>, options?: Partial<TuiMobileDialogOptions<any>>): Observable<number>;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiMobileDialogService, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TuiMobileDialogService>;
|
|
10
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type AnimationOptions } from '@angular/animations';
|
|
2
|
-
import { type DoCheck } from '@angular/core';
|
|
3
|
-
import { type TuiHorizontalDirection } from '@taiga-ui/core/types';
|
|
4
|
-
import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated use {@link TuiDrawer} instead
|
|
8
|
-
*/
|
|
9
|
-
export declare class TuiSidebarComponent implements DoCheck {
|
|
10
|
-
private readonly directive;
|
|
11
|
-
private readonly options;
|
|
12
|
-
private readonly left;
|
|
13
|
-
private readonly right;
|
|
14
|
-
ngDoCheck(): void;
|
|
15
|
-
protected get animation(): AnimationOptions;
|
|
16
|
-
protected get direction(): TuiHorizontalDirection;
|
|
17
|
-
protected get content(): PolymorpheusContent;
|
|
18
|
-
protected get autoWidth(): boolean;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiSidebarComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TuiSidebarComponent, "aside[tuiSidebar]", never, {}, {}, never, never, true, never>;
|
|
21
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { TuiSidebarComponent } from './sidebar.component';
|
|
2
|
-
import { TuiSidebarDirective } from './sidebar.directive';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated use {@link TuiDrawer} instead
|
|
5
|
-
*/
|
|
6
|
-
export declare const TuiSidebar: readonly [typeof TuiSidebarComponent, typeof TuiSidebarDirective];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type OnDestroy, TemplateRef } from '@angular/core';
|
|
2
|
-
import { type TuiHorizontalDirection } from '@taiga-ui/core/types';
|
|
3
|
-
import { PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated use {@link TuiDrawer} instead
|
|
7
|
-
*/
|
|
8
|
-
export declare class TuiSidebarDirective<T = Record<string, unknown>> extends PolymorpheusTemplate<T> implements OnDestroy {
|
|
9
|
-
private readonly injector;
|
|
10
|
-
private readonly service;
|
|
11
|
-
private readonly component;
|
|
12
|
-
private sidebarRef;
|
|
13
|
-
direction: TuiHorizontalDirection;
|
|
14
|
-
autoWidth: boolean;
|
|
15
|
-
readonly content: TemplateRef<any>;
|
|
16
|
-
set tuiSidebar(open: boolean);
|
|
17
|
-
ngOnDestroy(): void;
|
|
18
|
-
private show;
|
|
19
|
-
private hide;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiSidebarDirective<any>, never>;
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiSidebarDirective<any>, "[tuiSidebar]", never, { "direction": { "alias": "tuiSidebarDirection"; "required": false; }; "autoWidth": { "alias": "tuiSidebarAutoWidth"; "required": false; }; "tuiSidebar": { "alias": "tuiSidebar"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectionStrategy, Component, InjectionToken, Injectable } from '@angular/core';
|
|
3
|
-
import { TuiRipple } from '@taiga-ui/addon-mobile/directives';
|
|
4
|
-
import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
|
|
5
|
-
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
6
|
-
import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
7
|
-
import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
8
|
-
import { TuiPopoverService } from '@taiga-ui/cdk/services';
|
|
9
|
-
import { TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
|
|
10
|
-
|
|
11
|
-
class TuiMobileDialog {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.isIOS = inject(TUI_IS_IOS);
|
|
14
|
-
this.context = injectContext();
|
|
15
|
-
}
|
|
16
|
-
onAction(index) {
|
|
17
|
-
this.context.completeWith(index);
|
|
18
|
-
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialog, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiMobileDialog, isStandalone: true, selector: "tui-mobile-dialog", host: { properties: { "class._ios": "isIOS" } }, ngImport: i0, template: "@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action; let index = $index) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"context.actions.length > 2\"\n (click)=\"onAction(index)\"\n >\n {{ action }}\n </button>\n}\n", styles: [":host{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;background:var(--tui-background-base);word-break:break-word;overflow:hidden;padding:1.25rem .75rem 0 1.5rem}:host:not(._ios){max-inline-size:17.5rem;border-radius:.125rem;text-align:start;box-shadow:0 1.5rem 1.5rem #00000052}:host._ios{max-inline-size:16.875rem;padding:1.5rem 0 0;border-radius:.75rem;text-align:center}.t-heading{font-size:1rem}:host._ios .t-heading{font-weight:700;font-size:1.125rem}.t-content{margin-block-start:.75rem;font-size:.875rem;line-height:1.25rem;padding-inline-end:.75rem}:host._ios .t-content{margin-block-start:.25rem;padding-inline-start:1.5rem;padding-inline-end:1.5rem}.t-button{border-radius:0}:host._ios .t-button{border-block-start:#b8b8b8 1px solid;block-size:2.625rem;inline-size:100%}:host._ios .t-button:first-of-type{margin-block-start:1.125rem}:host:not(._ios) .t-button{margin:.5rem 0 .5rem .5rem;float:inline-end}:host:not(._ios) .t-button_column{display:block;float:none;margin-inline-start:auto}\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: TuiRipple, selector: "[tuiRipple]", inputs: ["tuiRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21
|
-
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialog, decorators: [{
|
|
23
|
-
type: Component,
|
|
24
|
-
args: [{ selector: 'tui-mobile-dialog', imports: [PolymorpheusOutlet, TuiButton, TuiRipple], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
25
|
-
'[class._ios]': 'isIOS',
|
|
26
|
-
}, template: "@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action; let index = $index) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"context.actions.length > 2\"\n (click)=\"onAction(index)\"\n >\n {{ action }}\n </button>\n}\n", styles: [":host{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;background:var(--tui-background-base);word-break:break-word;overflow:hidden;padding:1.25rem .75rem 0 1.5rem}:host:not(._ios){max-inline-size:17.5rem;border-radius:.125rem;text-align:start;box-shadow:0 1.5rem 1.5rem #00000052}:host._ios{max-inline-size:16.875rem;padding:1.5rem 0 0;border-radius:.75rem;text-align:center}.t-heading{font-size:1rem}:host._ios .t-heading{font-weight:700;font-size:1.125rem}.t-content{margin-block-start:.75rem;font-size:.875rem;line-height:1.25rem;padding-inline-end:.75rem}:host._ios .t-content{margin-block-start:.25rem;padding-inline-start:1.5rem;padding-inline-end:1.5rem}.t-button{border-radius:0}:host._ios .t-button{border-block-start:#b8b8b8 1px solid;block-size:2.625rem;inline-size:100%}:host._ios .t-button:first-of-type{margin-block-start:1.125rem}:host:not(._ios) .t-button{margin:.5rem 0 .5rem .5rem;float:inline-end}:host:not(._ios) .t-button_column{display:block;float:none;margin-inline-start:auto}\n"] }]
|
|
27
|
-
}] });
|
|
28
|
-
|
|
29
|
-
const TUI_MOBILE_DIALOG_DEFAULT_OPTIONS = {
|
|
30
|
-
label: '',
|
|
31
|
-
actions: ['OK'],
|
|
32
|
-
data: undefined,
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Default parameters for mobile dialog component
|
|
36
|
-
*/
|
|
37
|
-
const TUI_MOBILE_DIALOG_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_MOBILE_DIALOG_OPTIONS' : '', {
|
|
38
|
-
factory: () => TUI_MOBILE_DIALOG_DEFAULT_OPTIONS,
|
|
39
|
-
});
|
|
40
|
-
function tuiMobileDialogOptionsProvider(options) {
|
|
41
|
-
return tuiProvideOptions(TUI_MOBILE_DIALOG_OPTIONS, options, TUI_MOBILE_DIALOG_DEFAULT_OPTIONS);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
class TuiMobileDialogService extends TuiPopoverService {
|
|
45
|
-
open(content, options = {}) {
|
|
46
|
-
return super.open(content, options);
|
|
47
|
-
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
49
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, providedIn: 'root', useFactory: () => new TuiMobileDialogService(TUI_DIALOGS, TuiMobileDialog, inject(TUI_MOBILE_DIALOG_OPTIONS)) }); }
|
|
50
|
-
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiMobileDialogService, decorators: [{
|
|
52
|
-
type: Injectable,
|
|
53
|
-
args: [{
|
|
54
|
-
providedIn: 'root',
|
|
55
|
-
useFactory: () => new TuiMobileDialogService(TUI_DIALOGS, TuiMobileDialog, inject(TUI_MOBILE_DIALOG_OPTIONS)),
|
|
56
|
-
}]
|
|
57
|
-
}] });
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Generated bundle index. Do not edit.
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
export { TUI_MOBILE_DIALOG_DEFAULT_OPTIONS, TUI_MOBILE_DIALOG_OPTIONS, TuiMobileDialog, TuiMobileDialogService, tuiMobileDialogOptionsProvider };
|
|
64
|
-
//# sourceMappingURL=taiga-ui-addon-mobile-components-mobile-dialog.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-mobile-dialog.mjs","sources":["../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.component.ts","../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.template.html","../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.options.ts","../../../projects/addon-mobile/components/mobile-dialog/mobile-dialog.service.ts","../../../projects/addon-mobile/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiRipple} from '@taiga-ui/addon-mobile/directives';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {type TuiMobileDialogOptions} from './mobile-dialog.options';\n\n@Component({\n selector: 'tui-mobile-dialog',\n imports: [PolymorpheusOutlet, TuiButton, TuiRipple],\n templateUrl: './mobile-dialog.template.html',\n styleUrls: ['./mobile-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._ios]': 'isIOS',\n },\n})\nexport class TuiMobileDialog<I> {\n protected readonly isIOS = inject(TUI_IS_IOS);\n protected readonly context =\n injectContext<TuiPopover<TuiMobileDialogOptions<I>, number>>();\n\n protected onAction(index: number): void {\n this.context.completeWith(index);\n }\n}\n","@if (!!context.label) {\n <h2\n automation-id=\"tui-mobile-dialog__label\"\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n {{ context.label }}\n </h2>\n}\n<div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n</div>\n@for (action of context.actions; track action; let index = $index) {\n <button\n appearance=\"flat\"\n size=\"s\"\n tuiButton\n tuiRipple\n type=\"button\"\n class=\"t-button\"\n [class.t-button_column]=\"context.actions.length > 2\"\n (click)=\"onAction(index)\"\n >\n {{ action }}\n </button>\n}\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\n\nexport interface TuiMobileDialogOptions<I = undefined> {\n readonly actions: readonly string[];\n readonly data: I;\n readonly label: string;\n}\n\nexport const TUI_MOBILE_DIALOG_DEFAULT_OPTIONS: TuiMobileDialogOptions = {\n label: '',\n actions: ['OK'],\n data: undefined,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_MOBILE_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_MOBILE_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_MOBILE_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiMobileDialogOptionsProvider(\n options: Partial<TuiMobileDialogOptions<unknown>>,\n): Provider {\n return tuiProvideOptions(\n TUI_MOBILE_DIALOG_OPTIONS,\n options,\n TUI_MOBILE_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {type TuiPopoverContext, TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {TuiMobileDialog} from './mobile-dialog.component';\nimport {\n TUI_MOBILE_DIALOG_OPTIONS,\n type TuiMobileDialogOptions,\n} from './mobile-dialog.options';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiMobileDialogService(\n TUI_DIALOGS,\n TuiMobileDialog,\n inject(TUI_MOBILE_DIALOG_OPTIONS),\n ),\n})\nexport class TuiMobileDialogService extends TuiPopoverService<\n TuiMobileDialogOptions<any>,\n number\n> {\n public override open(\n content: PolymorpheusContent<\n TuiMobileDialogOptions<any> & TuiPopoverContext<number>\n >,\n options: Partial<TuiMobileDialogOptions<any>> = {},\n ): Observable<number> {\n return super.open(content, options);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAmBa,eAAe,CAAA;AAV5B,IAAA,WAAA,GAAA;AAWuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC;QAC1B,IAAO,CAAA,OAAA,GACtB,aAAa,EAAiD;AAKrE;AAHa,IAAA,QAAQ,CAAC,KAAa,EAAA;AAC5B,Q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AAI,cAAc,CACvD,SAAS,GAAG,2BAA2B,GAAG,EAAE,EAC5C;AACI,IAAA,OAAO,EAAE,MAAM,iCAAiC;AACnD,CAAA;AAGC,SAAU,8BAA8B,CAC1C,OAAiD,EAAA;IAEjD,OAAO,iBAAiB,CACpB,yBAAyB,EACzB,OAAO,EACP,iCAAiC,CACpC;AACL;;ACZM,MAAO,sBAAuB,SAAQ,iBAG3C,CAAA;AACmB,IAAA,IAAI,CAChB,OAEC,EACD,OAAA,GAAgD,EAAE,EAAA;QAElD,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;;+GAV9B,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cARnB,MAAM,EAAA,UAAA,EACN,MACR,IAAI,sBAAsB,CACtB,WAAW,EACX,eAAe,EACf,MAAM,CAAC,yBAAyB,CAAC,CACpC,EAAA,CAAA,CAAA;;4FAEI,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBATlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AAClB,oBAAA,UAAU,EAAE,MACR,IACI,sBAAA,CAAA,WAAW,EACX,eAAe,EACf,MAAM,CAAC,yBAAyB,CAAC,CACpC;AACR,iBAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, INJECTOR, TemplateRef, Input, Directive, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
4
|
-
import { tuiSlideIn } from '@taiga-ui/core/animations';
|
|
5
|
-
import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
|
|
6
|
-
import { tuiToAnimationOptions } from '@taiga-ui/core/utils/miscellaneous';
|
|
7
|
-
import { PolymorpheusTemplate, PolymorpheusComponent, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
8
|
-
import { TuiPopupService } from '@taiga-ui/core/directives/popup';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated use {@link TuiDrawer} instead
|
|
12
|
-
*/
|
|
13
|
-
class TuiSidebarDirective extends PolymorpheusTemplate {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.injector = inject(INJECTOR);
|
|
17
|
-
this.service = inject(TuiPopupService);
|
|
18
|
-
this.component = new PolymorpheusComponent(TuiSidebarComponent, this.injector);
|
|
19
|
-
this.sidebarRef = null;
|
|
20
|
-
this.direction = 'left';
|
|
21
|
-
this.autoWidth = false;
|
|
22
|
-
this.content = inject((TemplateRef));
|
|
23
|
-
}
|
|
24
|
-
set tuiSidebar(open) {
|
|
25
|
-
if (open) {
|
|
26
|
-
this.show();
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
this.hide();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
ngOnDestroy() {
|
|
33
|
-
this.hide();
|
|
34
|
-
}
|
|
35
|
-
show() {
|
|
36
|
-
if (this.sidebarRef !== null) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
this.sidebarRef = this.service.add(this.component);
|
|
40
|
-
this.sidebarRef.changeDetectorRef.detectChanges();
|
|
41
|
-
}
|
|
42
|
-
hide() {
|
|
43
|
-
if (this.sidebarRef === null) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
this.service.remove(this.sidebarRef);
|
|
47
|
-
this.sidebarRef = null;
|
|
48
|
-
}
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSidebarDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
50
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSidebarDirective, isStandalone: true, selector: "[tuiSidebar]", inputs: { direction: ["tuiSidebarDirection", "direction"], autoWidth: ["tuiSidebarAutoWidth", "autoWidth"], tuiSidebar: "tuiSidebar" }, usesInheritance: true, ngImport: i0 }); }
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSidebarDirective, decorators: [{
|
|
53
|
-
type: Directive,
|
|
54
|
-
args: [{
|
|
55
|
-
standalone: true,
|
|
56
|
-
selector: '[tuiSidebar]',
|
|
57
|
-
}]
|
|
58
|
-
}], propDecorators: { direction: [{
|
|
59
|
-
type: Input,
|
|
60
|
-
args: ['tuiSidebarDirection']
|
|
61
|
-
}], autoWidth: [{
|
|
62
|
-
type: Input,
|
|
63
|
-
args: ['tuiSidebarAutoWidth']
|
|
64
|
-
}], tuiSidebar: [{
|
|
65
|
-
type: Input
|
|
66
|
-
}] } });
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @deprecated use {@link TuiDrawer} instead
|
|
70
|
-
*/
|
|
71
|
-
class TuiSidebarComponent {
|
|
72
|
-
constructor() {
|
|
73
|
-
this.directive = inject(TuiSidebarDirective);
|
|
74
|
-
this.options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));
|
|
75
|
-
this.left = { ...this.options, value: 'left' };
|
|
76
|
-
this.right = { ...this.options, value: 'right' };
|
|
77
|
-
}
|
|
78
|
-
ngDoCheck() {
|
|
79
|
-
this.directive.check();
|
|
80
|
-
}
|
|
81
|
-
get animation() {
|
|
82
|
-
return this.direction === 'left' ? this.left : this.right;
|
|
83
|
-
}
|
|
84
|
-
get direction() {
|
|
85
|
-
return this.directive.direction;
|
|
86
|
-
}
|
|
87
|
-
get content() {
|
|
88
|
-
return this.directive.content;
|
|
89
|
-
}
|
|
90
|
-
get autoWidth() {
|
|
91
|
-
return this.directive.autoWidth;
|
|
92
|
-
}
|
|
93
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
94
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiSidebarComponent, isStandalone: true, selector: "aside[tuiSidebar]", host: { properties: { "class": "\"t-\" + direction", "@tuiSlideIn": "animation" } }, ngImport: i0, template: "<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host:before,:host:after{position:absolute;top:0;left:0;inline-size:100%;content:\"\";block-size:100%;background:#00000061;animation:tuiFadeIn var(--tui-duration)}:host:before{left:-100%;inline-size:200%}:host:after{left:100%}:host.ng-animating:before,:host.ng-animating:after{opacity:0;transition:opacity var(--tui-duration)}:host.t-right{justify-content:flex-end}:host.t-left{justify-content:flex-start}.t-wrapper{position:relative;display:flex;flex-direction:column;background:var(--tui-background-base);box-shadow:0 10rem var(--tui-background-base);inline-size:17.25rem}.t-wrapper_auto-width{inline-size:auto}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZone, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }], animations: [tuiSlideIn], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
95
|
-
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSidebarComponent, decorators: [{
|
|
97
|
-
type: Component,
|
|
98
|
-
args: [{ selector: 'aside[tuiSidebar]', imports: [PolymorpheusOutlet, TuiActiveZone], changeDetection: ChangeDetectionStrategy.OnPush, animations: [tuiSlideIn], host: {
|
|
99
|
-
'[class]': '"t-" + direction',
|
|
100
|
-
'[@tuiSlideIn]': 'animation',
|
|
101
|
-
}, template: "<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;display:flex}:host:before,:host:after{position:absolute;top:0;left:0;inline-size:100%;content:\"\";block-size:100%;background:#00000061;animation:tuiFadeIn var(--tui-duration)}:host:before{left:-100%;inline-size:200%}:host:after{left:100%}:host.ng-animating:before,:host.ng-animating:after{opacity:0;transition:opacity var(--tui-duration)}:host.t-right{justify-content:flex-end}:host.t-left{justify-content:flex-start}.t-wrapper{position:relative;display:flex;flex-direction:column;background:var(--tui-background-base);box-shadow:0 10rem var(--tui-background-base);inline-size:17.25rem}.t-wrapper_auto-width{inline-size:auto}\n"] }]
|
|
102
|
-
}] });
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* @deprecated use {@link TuiDrawer} instead
|
|
106
|
-
*/
|
|
107
|
-
const TuiSidebar = [TuiSidebarComponent, TuiSidebarDirective];
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Generated bundle index. Do not edit.
|
|
111
|
-
*/
|
|
112
|
-
|
|
113
|
-
export { TuiSidebar, TuiSidebarComponent, TuiSidebarDirective };
|
|
114
|
-
//# sourceMappingURL=taiga-ui-addon-mobile-directives-sidebar.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.mjs","sources":["../../../projects/addon-mobile/directives/sidebar/sidebar.directive.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.component.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.template.html","../../../projects/addon-mobile/directives/sidebar/sidebar.ts","../../../projects/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n type ComponentRef,\n Directive,\n inject,\n INJECTOR,\n Input,\n type OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusComponent, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Directive({\n standalone: true,\n selector: '[tuiSidebar]',\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private readonly injector = inject(INJECTOR);\n private readonly service = inject(TuiPopupService);\n\n private readonly component = new PolymorpheusComponent(\n TuiSidebarComponent,\n this.injector,\n );\n\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input('tuiSidebarDirection')\n public direction: TuiHorizontalDirection = 'left';\n\n @Input('tuiSidebarAutoWidth')\n public autoWidth = false;\n\n public readonly content = inject(TemplateRef<T>);\n\n @Input()\n public set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n this.sidebarRef = this.service.add(this.component);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.service.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import {type AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, type DoCheck, inject} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils/miscellaneous';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Component({\n selector: 'aside[tuiSidebar]',\n imports: [PolymorpheusOutlet, TuiActiveZone],\n templateUrl: './sidebar.template.html',\n styleUrls: ['./sidebar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n host: {\n '[class]': '\"t-\" + direction',\n '[@tuiSlideIn]': 'animation',\n },\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly directive = inject(TuiSidebarDirective);\n private readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n private readonly left = {...this.options, value: 'left'};\n private readonly right = {...this.options, value: 'right'};\n\n public ngDoCheck(): void {\n this.directive.check();\n }\n\n protected get animation(): AnimationOptions {\n return this.direction === 'left' ? this.left : this.right;\n }\n\n protected get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n protected get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n protected get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n}\n","<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n","import {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\nexport const TuiSidebar = [TuiSidebarComponent, TuiSidebarDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAeA;;AAEG;AAKG,MAAO,mBACT,SAAQ,oBAAuB,CAAA;AALnC,IAAA,WAAA,GAAA;;AAQqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;QAEjC,IAAS,CAAA,SAAA,GAAG,IAAI,qBAAqB,CAClD,mBAAmB,EACnB,IAAI,CAAC,QAAQ,CAChB;QAEO,IAAU,CAAA,UAAA,GAA6C,IAAI;QAG5D,IAAS,CAAA,SAAA,GAA2B,MAAM;QAG1C,IAAS,CAAA,SAAA,GAAG,KAAK;AAER,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,EAAC,WAAc,EAAC;AAgCnD;IA9BG,IACW,UAAU,CAAC,IAAa,EAAA;QAC/B,IAAI,IAAI,EAAE;YACN,IAAI,CAAC,IAAI,EAAE;;aACR;YACH,IAAI,CAAC,IAAI,EAAE;;;IAIZ,WAAW,GAAA;QACd,IAAI,CAAC,IAAI,EAAE;;IAGP,IAAI,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;YAC1B;;AAGJ,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;AAClD,QAAA,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,aAAa,EAAE;;IAG7C,IAAI,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;YAC1B;;QAGJ,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;AACpC,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI;;+GAlDjB,mBAAmB,EAAA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