@taiga-ui/kit 2.60.0 → 2.62.1

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.
Files changed (112) hide show
  1. package/bundles/taiga-ui-kit-components-badge.umd.js +1 -1
  2. package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-badge.umd.min.js +1 -1
  4. package/bundles/taiga-ui-kit-components-badge.umd.min.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-badged-content.umd.js +4 -14
  6. package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js +1 -1
  8. package/bundles/taiga-ui-kit-components-badged-content.umd.min.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-files.umd.js +1 -1
  10. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-files.umd.min.js +1 -1
  12. package/bundles/taiga-ui-kit-components-files.umd.min.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +1 -1
  14. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +1 -1
  16. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-input-tag.umd.js +1 -1
  18. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js +1 -1
  20. package/bundles/taiga-ui-kit-components-input-tag.umd.min.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-push.umd.js +499 -0
  22. package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -0
  23. package/bundles/taiga-ui-kit-components-push.umd.min.js +2 -0
  24. package/bundles/taiga-ui-kit-components-push.umd.min.js.map +1 -0
  25. package/bundles/taiga-ui-kit-components-text-area.umd.js +1 -1
  26. package/bundles/taiga-ui-kit-components-text-area.umd.min.js +1 -1
  27. package/bundles/taiga-ui-kit-components-text-area.umd.min.js.map +1 -1
  28. package/bundles/taiga-ui-kit-components.umd.js +12 -4
  29. package/bundles/taiga-ui-kit-components.umd.js.map +1 -1
  30. package/bundles/taiga-ui-kit-components.umd.min.js +1 -1
  31. package/components/badge/badge.component.d.ts +2 -2
  32. package/components/badge/taiga-ui-kit-components-badge.metadata.json +1 -1
  33. package/components/badged-content/badged-content.component.d.ts +2 -3
  34. package/components/badged-content/taiga-ui-kit-components-badged-content.metadata.json +1 -1
  35. package/components/index.d.ts +1 -0
  36. package/components/input-tag/taiga-ui-kit-components-input-tag.metadata.json +1 -1
  37. package/components/push/index.d.ts +7 -0
  38. package/components/push/package.json +13 -0
  39. package/components/push/push-alert.component.d.ts +16 -0
  40. package/components/push/push-alert.directive.d.ts +9 -0
  41. package/components/push/push.component.d.ts +11 -0
  42. package/components/push/push.directive.d.ts +10 -0
  43. package/components/push/push.module.d.ts +2 -0
  44. package/components/push/push.options.d.ts +10 -0
  45. package/components/push/push.service.d.ts +10 -0
  46. package/components/push/taiga-ui-kit-components-push.d.ts +4 -0
  47. package/components/push/taiga-ui-kit-components-push.metadata.json +1 -0
  48. package/components/taiga-ui-kit-components.metadata.json +1 -1
  49. package/components/text-area/taiga-ui-kit-components-text-area.metadata.json +1 -1
  50. package/esm2015/components/badge/badge.component.js +3 -3
  51. package/esm2015/components/badged-content/badged-content.component.js +5 -11
  52. package/esm2015/components/files/file/file.component.js +3 -3
  53. package/esm2015/components/index.js +2 -1
  54. package/esm2015/components/input-phone-international/const/countries.js +2 -2
  55. package/esm2015/components/input-tag/input-tag.component.js +2 -2
  56. package/esm2015/components/push/index.js +8 -0
  57. package/esm2015/components/push/push-alert.component.js +38 -0
  58. package/esm2015/components/push/push-alert.directive.js +40 -0
  59. package/esm2015/components/push/push.component.js +46 -0
  60. package/esm2015/components/push/push.directive.js +42 -0
  61. package/esm2015/components/push/push.module.js +46 -0
  62. package/esm2015/components/push/push.options.js +10 -0
  63. package/esm2015/components/push/push.service.js +24 -0
  64. package/esm2015/components/push/taiga-ui-kit-components-push.js +5 -0
  65. package/esm2015/components/text-area/text-area.component.js +1 -1
  66. package/esm5/components/badge/badge.component.js +3 -3
  67. package/esm5/components/badged-content/badged-content.component.js +5 -15
  68. package/esm5/components/files/file/file.component.js +3 -3
  69. package/esm5/components/index.js +2 -1
  70. package/esm5/components/input-phone-international/const/countries.js +2 -2
  71. package/esm5/components/input-tag/input-tag.component.js +2 -2
  72. package/esm5/components/push/index.js +8 -0
  73. package/esm5/components/push/push-alert.component.js +43 -0
  74. package/esm5/components/push/push-alert.directive.js +47 -0
  75. package/esm5/components/push/push.component.js +51 -0
  76. package/esm5/components/push/push.directive.js +50 -0
  77. package/esm5/components/push/push.module.js +49 -0
  78. package/esm5/components/push/push.options.js +10 -0
  79. package/esm5/components/push/push.service.js +28 -0
  80. package/esm5/components/push/taiga-ui-kit-components-push.js +5 -0
  81. package/esm5/components/text-area/text-area.component.js +1 -1
  82. package/fesm2015/taiga-ui-kit-components-badge.js +1 -1
  83. package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
  84. package/fesm2015/taiga-ui-kit-components-badged-content.js +4 -10
  85. package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
  86. package/fesm2015/taiga-ui-kit-components-files.js +2 -2
  87. package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
  88. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +1 -1
  89. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  90. package/fesm2015/taiga-ui-kit-components-input-tag.js +1 -1
  91. package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
  92. package/fesm2015/taiga-ui-kit-components-push.js +216 -0
  93. package/fesm2015/taiga-ui-kit-components-push.js.map +1 -0
  94. package/fesm2015/taiga-ui-kit-components-text-area.js +1 -1
  95. package/fesm2015/taiga-ui-kit-components.js +1 -0
  96. package/fesm2015/taiga-ui-kit-components.js.map +1 -1
  97. package/fesm5/taiga-ui-kit-components-badge.js +1 -1
  98. package/fesm5/taiga-ui-kit-components-badge.js.map +1 -1
  99. package/fesm5/taiga-ui-kit-components-badged-content.js +4 -14
  100. package/fesm5/taiga-ui-kit-components-badged-content.js.map +1 -1
  101. package/fesm5/taiga-ui-kit-components-files.js +2 -2
  102. package/fesm5/taiga-ui-kit-components-files.js.map +1 -1
  103. package/fesm5/taiga-ui-kit-components-input-phone-international.js +1 -1
  104. package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  105. package/fesm5/taiga-ui-kit-components-input-tag.js +1 -1
  106. package/fesm5/taiga-ui-kit-components-input-tag.js.map +1 -1
  107. package/fesm5/taiga-ui-kit-components-push.js +248 -0
  108. package/fesm5/taiga-ui-kit-components-push.js.map +1 -0
  109. package/fesm5/taiga-ui-kit-components-text-area.js +1 -1
  110. package/fesm5/taiga-ui-kit-components.js +1 -0
  111. package/fesm5/taiga-ui-kit-components.js.map +1 -1
  112. package/package.json +4 -4
@@ -0,0 +1,216 @@
1
+ import { __decorate, __param } from 'tslib';
2
+ import { EventEmitter, Inject, Input, Output, Component, ChangeDetectionStrategy, Optional, SkipSelf, Directive, TemplateRef, ChangeDetectorRef, forwardRef, HostBinding, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule } from '@angular/core';
3
+ import { tuiIsObserved, tuiDefaultProp, TuiDestroyService, AbstractTuiDialogService, TUI_ALERTS } from '@taiga-ui/cdk';
4
+ import { TUI_CLOSE_WORD, TuiModeDirective, TUI_BUTTON_OPTIONS, TUI_ANIMATION_OPTIONS, tuiFadeIn, tuiSlideInRight, tuiHeightCollapse, TuiButtonModule, TuiLinkModule, TuiSvgModule, TuiFormatDatePipeModule } from '@taiga-ui/core';
5
+ import { Observable, Subject, EMPTY } from 'rxjs';
6
+ import { CommonModule } from '@angular/common';
7
+ import { PolymorpheusTemplate, POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
8
+ import { switchMap, takeUntil } from 'rxjs/operators';
9
+ import { TuiIdService } from '@taiga-ui/cdk/services';
10
+
11
+ let TuiPushComponent = class TuiPushComponent {
12
+ constructor(closeWord$) {
13
+ this.closeWord$ = closeWord$;
14
+ this.heading = ``;
15
+ this.type = ``;
16
+ this.timestamp = 0;
17
+ this.close = new EventEmitter();
18
+ }
19
+ get closeable() {
20
+ return tuiIsObserved(this.close);
21
+ }
22
+ };
23
+ TuiPushComponent.ctorParameters = () => [
24
+ { type: Observable, decorators: [{ type: Inject, args: [TUI_CLOSE_WORD,] }] }
25
+ ];
26
+ __decorate([
27
+ Input(),
28
+ tuiDefaultProp()
29
+ ], TuiPushComponent.prototype, "heading", void 0);
30
+ __decorate([
31
+ Input(),
32
+ tuiDefaultProp()
33
+ ], TuiPushComponent.prototype, "type", void 0);
34
+ __decorate([
35
+ Input(),
36
+ tuiDefaultProp()
37
+ ], TuiPushComponent.prototype, "timestamp", void 0);
38
+ __decorate([
39
+ Output()
40
+ ], TuiPushComponent.prototype, "close", void 0);
41
+ TuiPushComponent = __decorate([
42
+ Component({
43
+ selector: `tui-push`,
44
+ template: "<div class=\"t-image\"><ng-content select=\"img\"></ng-content></div>\n<button\n *ngIf=\"closeable\"\n tuiIconButton\n icon=\"tuiIconCloseLarge\"\n size=\"xs\"\n appearance=\"\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close.emit()\"\n></button>\n<div class=\"t-top\">\n <span class=\"t-icon\"><ng-content select=\"tui-svg\"></ng-content></span>\n {{ type }}\n <span\n *ngIf=\"timestamp\"\n class=\"t-time\"\n [textContent]=\"timestamp | tuiFormatDate | async\"\n ></span>\n</div>\n<h3 class=\"t-heading\">{{ heading }}</h3>\n<div class=\"t-content\">\n <ng-content></ng-content>\n</div>\n<div class=\"t-actions\">\n <span class=\"t-button\"><ng-content select=\"[tuiButton]\"></ng-content></span>\n <span class=\"t-link\"><ng-content select=\"[tuiLink]\"></ng-content></span>\n</div>\n",
45
+ changeDetection: ChangeDetectionStrategy.OnPush,
46
+ styles: [":host{box-shadow:0 .25rem 1.5rem rgba(0,0,0,.12);position:relative;display:block;width:22.5rem;max-width:100%;box-sizing:border-box;padding:1.25rem 1.25rem .25rem;overflow:hidden;font:var(--tui-font-text-m);border-radius:var(--tui-radius-l);background:var(--tui-elevation-02)}.t-image{display:flex;flex-direction:column;max-height:10.625rem;overflow:hidden;margin:-1.25rem -1.25rem 1.25rem}.t-close{position:absolute;top:.75rem;right:.75rem;color:rgba(0,0,0,.54);background:rgba(242,242,242,.32);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.t-top{display:flex;align-items:center;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-icon{height:1.25rem;margin-right:.5rem;transform:scale(.833);transform-origin:top left;color:var(--tui-link)}.t-time:before{content:'\u2022';display:inline-block;width:1rem;text-align:center}.t-heading{line-height:1.25rem;font-weight:700;margin:.75rem 0 .25rem}.t-content,.t-heading{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;word-break:break-word;overflow:hidden}.t-actions{display:flex;align-items:center;font:var(--tui-font-text-s)}.t-button:not(:empty){margin:.75rem .75rem .75rem 0}.t-link{margin:.75rem 0}.t-link:empty{margin:.5rem}"]
47
+ }),
48
+ __param(0, Inject(TUI_CLOSE_WORD))
49
+ ], TuiPushComponent);
50
+
51
+ var TuiPushDirective_1;
52
+ let TuiPushDirective = TuiPushDirective_1 = class TuiPushDirective extends TuiModeDirective {
53
+ constructor(modeDirective) {
54
+ var _a;
55
+ super();
56
+ this.modeDirective = modeDirective;
57
+ this.size = `s`;
58
+ this.shape = null;
59
+ this.change$ = ((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.change$) || new Subject();
60
+ }
61
+ get appearance() {
62
+ var _a;
63
+ return ((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.mode) === `onDark` ? `accent` : `secondary`;
64
+ }
65
+ };
66
+ TuiPushDirective.ctorParameters = () => [
67
+ { type: TuiModeDirective, decorators: [{ type: Optional }, { type: SkipSelf }, { type: Inject, args: [TuiModeDirective,] }] }
68
+ ];
69
+ TuiPushDirective = TuiPushDirective_1 = __decorate([
70
+ Directive({
71
+ selector: `tui-push`,
72
+ providers: [
73
+ {
74
+ provide: TuiModeDirective,
75
+ useExisting: TuiPushDirective_1,
76
+ },
77
+ {
78
+ provide: TUI_BUTTON_OPTIONS,
79
+ useExisting: TuiPushDirective_1,
80
+ },
81
+ ],
82
+ }),
83
+ __param(0, Optional()),
84
+ __param(0, SkipSelf()),
85
+ __param(0, Inject(TuiModeDirective))
86
+ ], TuiPushDirective);
87
+
88
+ const TUI_PUSH_DEFAULT_OPTIONS = {
89
+ heading: ``,
90
+ type: ``,
91
+ timestamp: 0,
92
+ image: ``,
93
+ icon: ``,
94
+ iconColor: ``,
95
+ buttons: [],
96
+ };
97
+
98
+ let TuiPushAlertDirective = class TuiPushAlertDirective extends PolymorpheusTemplate {
99
+ constructor(template, changeDetectorRef, destroy$, push) {
100
+ super(template, changeDetectorRef);
101
+ this.show$ = new Subject();
102
+ this.show$
103
+ .pipe(switchMap(show => (show ? push.open(this) : EMPTY)), takeUntil(destroy$))
104
+ .subscribe();
105
+ }
106
+ set tuiPush(show) {
107
+ this.show$.next(show);
108
+ }
109
+ };
110
+ TuiPushAlertDirective.ctorParameters = () => [
111
+ { type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] },
112
+ { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
113
+ { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
114
+ { type: TuiPushService, decorators: [{ type: Inject, args: [forwardRef(() => TuiPushService),] }] }
115
+ ];
116
+ __decorate([
117
+ Input()
118
+ ], TuiPushAlertDirective.prototype, "tuiPush", null);
119
+ TuiPushAlertDirective = __decorate([
120
+ Directive({
121
+ selector: `[tuiPush]`,
122
+ providers: [TuiDestroyService],
123
+ }),
124
+ __param(0, Inject(TemplateRef)),
125
+ __param(1, Inject(ChangeDetectorRef)),
126
+ __param(2, Inject(TuiDestroyService)),
127
+ __param(3, Inject(forwardRef(() => TuiPushService)))
128
+ ], TuiPushAlertDirective);
129
+
130
+ let TuiPushAlertComponent = class TuiPushAlertComponent {
131
+ constructor(options, context) {
132
+ this.options = options;
133
+ this.context = context;
134
+ this.animation = Object.assign({ value: `` }, this.options);
135
+ }
136
+ get isDirective() {
137
+ return this.context.content instanceof TuiPushAlertDirective;
138
+ }
139
+ };
140
+ TuiPushAlertComponent.ctorParameters = () => [
141
+ { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
142
+ { type: undefined, decorators: [{ type: Inject, args: [POLYMORPHEUS_CONTEXT,] }] }
143
+ ];
144
+ __decorate([
145
+ HostBinding(`@tuiFadeIn`),
146
+ HostBinding(`@tuiSlideInRight`),
147
+ HostBinding(`@tuiHeightCollapse`)
148
+ ], TuiPushAlertComponent.prototype, "animation", void 0);
149
+ TuiPushAlertComponent = __decorate([
150
+ Component({
151
+ selector: `tui-push-alert`,
152
+ template: "<tui-push\n *ngIf=\"!isDirective; else content\"\n [heading]=\"context.heading\"\n [type]=\"context.type\"\n [timestamp]=\"context.timestamp\"\n (close)=\"context.$implicit.complete()\"\n>\n <img\n *ngIf=\"context.image\"\n alt=\"\"\n [src]=\"context.image\"\n />\n <tui-svg\n *ngIf=\"context.icon\"\n [style.color]=\"context.iconColor\"\n [src]=\"context.icon\"\n ></tui-svg>\n <div\n polymorpheus-outlet\n [content]=\"context.content\"\n ></div>\n <button\n *ngIf=\"context.buttons.length > 1\"\n tuiButton\n (click)=\"context.$implicit.next(context.buttons[0])\"\n >\n {{ context.buttons[0] }}\n </button>\n <button\n *ngIf=\"context.buttons.length\"\n tuiLink\n (click)=\"context.$implicit.next(context.buttons[context.buttons.length - 1])\"\n >\n {{ context.buttons[context.buttons.length - 1] }}\n </button>\n</tui-push>\n<ng-template #content>\n <div\n polymorpheus-outlet\n [content]=\"context.content\"\n ></div>\n</ng-template>\n",
153
+ changeDetection: ChangeDetectionStrategy.OnPush,
154
+ animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],
155
+ host: { role: `alert` },
156
+ styles: [":host{max-width:calc(100% - 2rem);margin:0 1rem 1rem auto}:host:first-child{margin-top:auto}"]
157
+ }),
158
+ __param(0, Inject(TUI_ANIMATION_OPTIONS)),
159
+ __param(1, Inject(POLYMORPHEUS_CONTEXT))
160
+ ], TuiPushAlertComponent);
161
+
162
+ let TuiPushService = class TuiPushService extends AbstractTuiDialogService {
163
+ constructor() {
164
+ super(...arguments);
165
+ this.component = new PolymorpheusComponent(TuiPushAlertComponent);
166
+ this.defaultOptions = TUI_PUSH_DEFAULT_OPTIONS;
167
+ }
168
+ open(content, options = {}) {
169
+ return super.open(content, options);
170
+ }
171
+ };
172
+ TuiPushService.ɵprov = ɵɵdefineInjectable({ factory: function TuiPushService_Factory() { return new TuiPushService(ɵɵinject(TuiIdService)); }, token: TuiPushService, providedIn: "root" });
173
+ TuiPushService = __decorate([
174
+ Injectable({ providedIn: `root` })
175
+ ], TuiPushService);
176
+
177
+ let TuiPushModule = class TuiPushModule {
178
+ };
179
+ TuiPushModule = __decorate([
180
+ NgModule({
181
+ imports: [
182
+ CommonModule,
183
+ PolymorpheusModule,
184
+ TuiButtonModule,
185
+ TuiLinkModule,
186
+ TuiSvgModule,
187
+ TuiFormatDatePipeModule,
188
+ ],
189
+ declarations: [
190
+ TuiPushComponent,
191
+ TuiPushDirective,
192
+ TuiPushAlertComponent,
193
+ TuiPushAlertDirective,
194
+ ],
195
+ exports: [
196
+ TuiPushComponent,
197
+ TuiPushDirective,
198
+ TuiPushAlertComponent,
199
+ TuiPushAlertDirective,
200
+ ],
201
+ providers: [
202
+ {
203
+ provide: TUI_ALERTS,
204
+ useExisting: TuiPushService,
205
+ multi: true,
206
+ },
207
+ ],
208
+ })
209
+ ], TuiPushModule);
210
+
211
+ /**
212
+ * Generated bundle index. Do not edit.
213
+ */
214
+
215
+ export { TUI_PUSH_DEFAULT_OPTIONS, TuiPushAlertComponent, TuiPushAlertDirective, TuiPushComponent, TuiPushDirective, TuiPushModule, TuiPushService };
216
+ //# sourceMappingURL=taiga-ui-kit-components-push.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-kit-components-push.js","sources":["ng://@taiga-ui/kit/components/push/push.component.ts","ng://@taiga-ui/kit/components/push/push.directive.ts","ng://@taiga-ui/kit/components/push/push.options.ts","ng://@taiga-ui/kit/components/push/push-alert.directive.ts","ng://@taiga-ui/kit/components/push/push-alert.component.ts","ng://@taiga-ui/kit/components/push/push.service.ts","ng://@taiga-ui/kit/components/push/push.module.ts","ng://@taiga-ui/kit/components/push/taiga-ui-kit-components-push.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiDefaultProp, tuiIsObserved} from '@taiga-ui/cdk';\nimport {TUI_CLOSE_WORD} from '@taiga-ui/core';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: `tui-push`,\n templateUrl: `./push.template.html`,\n styleUrls: [`./push.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiPushComponent {\n @Input()\n @tuiDefaultProp()\n heading = ``;\n\n @Input()\n @tuiDefaultProp()\n type = ``;\n\n @Input()\n @tuiDefaultProp()\n timestamp = 0;\n\n @Output()\n readonly close = new EventEmitter<void>();\n\n constructor(@Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>) {}\n\n get closeable(): boolean {\n return tuiIsObserved(this.close);\n }\n}\n","import {Directive, Inject, Optional, SkipSelf} from '@angular/core';\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions, TuiModeDirective} from '@taiga-ui/core';\nimport {Subject} from 'rxjs';\n\n@Directive({\n selector: `tui-push`,\n providers: [\n {\n provide: TuiModeDirective,\n useExisting: TuiPushDirective,\n },\n {\n provide: TUI_BUTTON_OPTIONS,\n useExisting: TuiPushDirective,\n },\n ],\n})\nexport class TuiPushDirective extends TuiModeDirective implements TuiButtonOptions {\n size: TuiButtonOptions['size'] = `s`;\n\n shape = null;\n\n readonly change$ = this.modeDirective?.change$ || new Subject();\n\n constructor(\n @Optional()\n @SkipSelf()\n @Inject(TuiModeDirective)\n private readonly modeDirective: TuiModeDirective | null,\n ) {\n super();\n }\n\n get appearance(): string {\n return this.modeDirective?.mode === `onDark` ? `accent` : `secondary`;\n }\n}\n","export interface TuiPushOptions {\n readonly heading: string;\n readonly type: string;\n readonly timestamp: number;\n readonly image: string;\n readonly icon: string;\n readonly iconColor: string;\n readonly buttons: readonly string[];\n}\n\nexport const TUI_PUSH_DEFAULT_OPTIONS: TuiPushOptions = {\n heading: ``,\n type: ``,\n timestamp: 0,\n image: ``,\n icon: ``,\n iconColor: ``,\n buttons: [],\n};\n","import {\n ChangeDetectorRef,\n Directive,\n forwardRef,\n Inject,\n Input,\n TemplateRef,\n} from '@angular/core';\nimport {TuiDestroyService} from '@taiga-ui/cdk';\nimport {PolymorpheusTemplate} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, Observable, Subject} from 'rxjs';\nimport {switchMap, takeUntil} from 'rxjs/operators';\n\nimport {TuiPushService} from './push.service';\n\n@Directive({\n selector: `[tuiPush]`,\n providers: [TuiDestroyService],\n})\nexport class TuiPushAlertDirective extends PolymorpheusTemplate<any> {\n private readonly show$ = new Subject<boolean>();\n\n @Input()\n set tuiPush(show: boolean) {\n this.show$.next(show);\n }\n\n constructor(\n @Inject(TemplateRef) template: TemplateRef<any>,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(forwardRef(() => TuiPushService)) push: TuiPushService,\n ) {\n super(template, changeDetectorRef);\n\n this.show$\n .pipe(\n switchMap(show => (show ? push.open(this) : EMPTY)),\n takeUntil(destroy$),\n )\n .subscribe();\n }\n}\n","import {AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TuiDialog} from '@taiga-ui/cdk';\nimport {\n TUI_ANIMATION_OPTIONS,\n tuiFadeIn,\n tuiHeightCollapse,\n tuiSlideInRight,\n} from '@taiga-ui/core';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPushOptions} from './push.options';\nimport {TuiPushAlertDirective} from './push-alert.directive';\n\n@Component({\n selector: `tui-push-alert`,\n templateUrl: `./push-alert.template.html`,\n styleUrls: [`./push-alert.style.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {role: `alert`},\n})\nexport class TuiPushAlertComponent {\n @HostBinding(`@tuiFadeIn`)\n @HostBinding(`@tuiSlideInRight`)\n @HostBinding(`@tuiHeightCollapse`)\n readonly animation = {value: ``, ...this.options} as const;\n\n constructor(\n @Inject(TUI_ANIMATION_OPTIONS) private readonly options: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialog<TuiPushOptions, string>,\n ) {}\n\n get isDirective(): boolean {\n return this.context.content instanceof TuiPushAlertDirective;\n }\n}\n","import {Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiBaseDialogContext} from '@taiga-ui/cdk';\nimport {PolymorpheusComponent, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_PUSH_DEFAULT_OPTIONS, TuiPushOptions} from './push.options';\nimport {TuiPushAlertComponent} from './push-alert.component';\n\n@Injectable({providedIn: `root`})\nexport class TuiPushService extends AbstractTuiDialogService<TuiPushOptions, string> {\n protected readonly component = new PolymorpheusComponent(TuiPushAlertComponent);\n protected readonly defaultOptions = TUI_PUSH_DEFAULT_OPTIONS;\n\n open(\n content: PolymorpheusContent<TuiBaseDialogContext<string> & TuiPushOptions>,\n options: Partial<TuiPushOptions> = {},\n ): Observable<string> {\n return super.open(content, options);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_ALERTS} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiFormatDatePipeModule,\n TuiLinkModule,\n TuiSvgModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiPushComponent} from './push.component';\nimport {TuiPushDirective} from './push.directive';\nimport {TuiPushService} from './push.service';\nimport {TuiPushAlertComponent} from './push-alert.component';\nimport {TuiPushAlertDirective} from './push-alert.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiButtonModule,\n TuiLinkModule,\n TuiSvgModule,\n TuiFormatDatePipeModule,\n ],\n declarations: [\n TuiPushComponent,\n TuiPushDirective,\n TuiPushAlertComponent,\n TuiPushAlertDirective,\n ],\n exports: [\n TuiPushComponent,\n TuiPushDirective,\n TuiPushAlertComponent,\n TuiPushAlertDirective,\n ],\n providers: [\n {\n provide: TUI_ALERTS,\n useExisting: TuiPushService,\n multi: true,\n },\n ],\n})\nexport class TuiPushModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAkBa,gBAAgB,GAA7B,MAAa,gBAAgB;IAgBzB,YAA6C,UAA8B;QAA9B,eAAU,GAAV,UAAU,CAAoB;QAb3E,YAAO,GAAG,EAAE,CAAC;QAIb,SAAI,GAAG,EAAE,CAAC;QAIV,cAAS,GAAG,CAAC,CAAC;QAGL,UAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;KAEqC;IAE/E,IAAI,SAAS;QACT,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACpC;EACJ;;YAL4D,UAAU,uBAAtD,MAAM,SAAC,cAAc;;AAblC;IAFC,KAAK,EAAE;IACP,cA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7BzB,QAAQ,CAAC;QACN,OAAO,EAAE;YACL,YAAY;YACZ,kBAAkB;YAClB,eAAe;YACf,aAAa;YACb,YAAY;YACZ,uBAAuB;SAC1B;QACD,YAAY,EAAE;YACV,gBAAgB;YAChB,gBAAgB;YAChB,qBAAqB;YACrB,qBAAqB;SACxB;QACD,OAAO,EAAE;YACL,gBAAgB;YAChB,gBAAgB;YAChB,qBAAqB;YACrB,qBAAqB;SACxB;QACD,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,cAAc;gBAC3B,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,aAAa,CAAG;;AC9C7B;;;;;;"}
@@ -170,7 +170,7 @@ TuiTextAreaComponent = __decorate([
170
170
  '($.data-mode.attr)': `mode$`,
171
171
  '[class._ios]': `isIOS`,
172
172
  },
173
- styles: [":host{position:relative;z-index:0;display:flex;font:var(--tui-font-text-m);flex-direction:column;min-height:6.75rem;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size='m']{font:var(--tui-font-text-s);min-height:5.5rem}:host[data-size='m']._has-counter{min-height:6.625rem}:host[data-size='l']._has-counter{min-height:7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;padding-bottom:.4375rem;box-sizing:border-box}:host[data-size='m']._label-outside .t-wrapper{padding-top:.75rem}:host[data-size='l']._label-outside .t-wrapper{padding-top:1rem}:host[data-size='m']:not(._label-outside) .t-wrapper{padding-top:1.375rem}:host[data-size='l']:not(._label-outside) .t-wrapper{padding-top:1.625rem}:host-context(table)[data-size='m']._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size='l']._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:100%;width:100%}:host:not(._expandable) .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}:host[data-size='m'] .t-pseudo-content{padding:0 .75rem}:host[data-size='l'] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:0;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:focus,.t-input:-webkit-autofill:hover{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:not(:last-of-type){display:none}.t-input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:read-only)::-ms-input-placeholder{opacity:1}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size='m'] .t-input{padding:0 .75rem}:host[data-size='l'] .t-input{padding:0 1rem}:host._ios .t-input{padding-left:.8125rem}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;left:0;max-width:100%;padding:0 1rem;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);box-sizing:border-box}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size='l']._focused._label-outside .t-placeholder,:host[data-size='m']._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size='l'] .t-placeholder{font-size:.9375rem}:host[data-size='l'] .t-placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .t-placeholder,:host[data-size='m']._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}:host[data-size='m'] .t-placeholder{top:.75rem;padding:0 .75rem}:host[data-size='l'] .t-placeholder{top:1rem}:host._label-outside .t-placeholder{overflow:initial;height:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:1rem .75rem}:host[data-size='m'] .t-icons{padding:.75rem}.t-cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform;pointer-events:auto}.t-cleaner:hover{color:var(--tui-text-02)}:host._disabled .t-cleaner,:host._readonly .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-tooltip{pointer-events:auto}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}"]
173
+ styles: [":host{position:relative;z-index:0;display:flex;font:var(--tui-font-text-m);flex-direction:column;min-height:6.75rem;border-radius:var(--tui-radius-m);color:var(--tui-text-01)}:host[data-mode=onDark]{color:var(--tui-text-01-night)}:host[data-size='m']{font:var(--tui-font-text-s);min-height:5.5rem}:host[data-size='m']._has-counter{min-height:6.625rem}:host[data-size='l']._has-counter{min-height:7.875rem}.t-outline{min-height:inherit}.t-content{display:block;margin-top:0;margin-bottom:0;min-height:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-height:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}.t-wrapper{position:relative;width:100%;height:100%;min-height:inherit;padding-bottom:.4375rem;box-sizing:border-box}:host[data-size='m']._label-outside .t-wrapper{padding-top:.75rem}:host[data-size='l']._label-outside .t-wrapper{padding-top:1rem}:host[data-size='m']:not(._label-outside) .t-wrapper{padding-top:1.375rem}:host[data-size='l']:not(._label-outside) .t-wrapper{padding-top:1.625rem}:host-context(table)[data-size='m']._label-outside .t-wrapper{padding-bottom:.75rem}:host-context(table)[data-size='l']._label-outside .t-wrapper{padding-bottom:1rem}.t-input-wrapper{min-height:inherit;width:100%;flex:1}.t-relative{position:relative;min-height:inherit}.t-box{display:flex;min-height:100%;width:100%}:host:not(._expandable) .t-box{height:100%}:host._has-counter._expandable .t-box{margin-bottom:1.25rem}.t-pseudo-content{white-space:pre-wrap;word-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}:host[data-size='m'] .t-pseudo-content{padding:0 .75rem}:host[data-size='l'] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-error-bg-night)}.t-input{padding:0;margin:0;border:0;border-radius:inherit;background:0 0;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;-moz-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:0;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:focus,.t-input:-webkit-autofill:hover{caret-color:var(--tui-base-09);border-radius:inherit;color:inherit!important;background-color:transparent!important;-webkit-text-fill-color:var(--tui-text-01)!important;border-color:var(--tui-autofill);-webkit-box-shadow:0 0 0 100rem var(--tui-autofill) inset!important}.t-input:not(:last-of-type){display:none}.t-input::-ms-input-placeholder{color:var(--tui-text-03);opacity:0}.t-input::placeholder{color:var(--tui-text-03);opacity:0}:host[data-mode=onDark] .t-input::-ms-input-placeholder{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-input::placeholder{color:var(--tui-text-03-night)}:host._focused .t-input:not(:read-only)::-ms-input-placeholder{opacity:1}:host._focused .t-input:not(:-moz-read-only)::placeholder{opacity:1}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size='m'] .t-input{padding:0 .75rem}:host[data-size='l'] .t-input{padding:0 1rem}:host[data-mode=onDark]._disabled .t-input{color:var(--tui-text-03-night)}@supports (-webkit-marquee-repetition:infinite) and (object-fit:fill){:host._ios .t-input{padding-left:.8125rem}}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;left:0;max-width:100%;padding:0 1rem;border:solid transparent;border-width:0 var(--border-end,0) 0 var(--border-start,0);border-inline-start-width:var(--border-start,0);border-inline-end-width:var(--border-end,0);box-sizing:border-box}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size='m'] .t-placeholder_raised{font:var(--tui-font-text-xs);transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill)}:host[data-mode=onDark]._invalid:not(._focused) .t-placeholder_raised,:host[data-mode=onDark]._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-error-fill-night)}:host._focused .t-placeholder,:host[data-size='l']._focused._label-outside .t-placeholder,:host[data-size='m']._focused._label-outside .t-placeholder{color:var(--tui-text-03)}:host[data-size='l'] .t-placeholder{font-size:.9375rem}:host[data-size='l'] .t-placeholder_raised{font-size:.8156rem}:host[data-size='l']._focused:not(._label-outside) .t-placeholder,:host[data-size='m']._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01)}:host[data-mode=onDark] .t-placeholder{color:var(--tui-text-02-night)}:host[data-size='l'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-01-night)}:host[data-mode=onDark]._focused .t-placeholder,:host[data-size='l'][data-mode=onDark]._focused._label-outside .t-placeholder,:host[data-size='m'][data-mode=onDark]._focused._label-outside .t-placeholder{color:var(--tui-text-02-night)}@supports (-webkit-hyphens:none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}:host[data-size='m'] .t-placeholder{top:.75rem;padding:0 .75rem}:host[data-size='l'] .t-placeholder{top:1rem}:host._label-outside .t-placeholder{overflow:initial;height:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:1rem .75rem}:host[data-size='m'] .t-icons{padding:.75rem}.t-cleaner{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform;pointer-events:auto}.t-cleaner:hover{color:var(--tui-text-02)}:host._disabled .t-cleaner,:host._readonly .t-cleaner{pointer-events:none}:host[data-mode=onDark] .t-cleaner{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-cleaner:hover{color:var(--tui-text-01-night)}.t-tooltip{pointer-events:auto}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-top:auto;text-align:right;color:var(--tui-text-03)}:host[data-mode=onDark] .t-counter{color:var(--tui-text-03-night)}"]
174
174
  }),
175
175
  __param(0, Optional()),
176
176
  __param(0, Self()),
@@ -43,6 +43,7 @@ export * from '@taiga-ui/kit/components/multi-select-option';
43
43
  export * from '@taiga-ui/kit/components/pagination';
44
44
  export * from '@taiga-ui/kit/components/pdf-viewer';
45
45
  export * from '@taiga-ui/kit/components/progress';
46
+ export * from '@taiga-ui/kit/components/push';
46
47
  export * from '@taiga-ui/kit/components/radio';
47
48
  export * from '@taiga-ui/kit/components/radio-block';
48
49
  export * from '@taiga-ui/kit/components/radio-group';
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components.js","sources":["ng://@taiga-ui/kit/components/taiga-ui-kit-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
@@ -79,7 +79,7 @@ var TuiBadgeComponent = /** @class */ (function () {
79
79
  host: {
80
80
  '($.data-mode.attr)': "mode$",
81
81
  },
82
- styles: [":host{transition-property:background-color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;--left-content-color:currentColor;position:relative;display:inline-flex;font:var(--tui-font-text-s);align-items:center;justify-content:center;box-sizing:border-box;color:var(--tui-base-01);border-radius:6.25rem;white-space:nowrap;overflow:hidden;vertical-align:middle}:host:after{transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;content:'';box-sizing:border-box;border-radius:inherit;pointer-events:none}:host._hoverable:active[data-tui-host-status=custom]:after,:host._hoverable:hover[data-tui-host-status=custom]:after{background-color:var(--tui-clear)}:host[data-tui-host-status=primary]{background-color:var(--tui-primary);color:var(--tui-primary-text)}:host[data-tui-host-status=primary]._hoverable:hover{background-color:var(--tui-primary-hover)}:host[data-tui-host-status=primary]._hoverable:active{background-color:var(--tui-primary-active)}:host[data-tui-host-status=error]{--left-content-color:var(--tui-error-fill);background-color:var(--tui-error-bg);color:var(--tui-text-01)}:host[data-tui-host-status=error]._hoverable:active,:host[data-tui-host-status=error]._hoverable:hover{background-color:var(--tui-error-bg-hover)}:host[data-tui-host-status=error][data-mode=onDark]{background-color:var(--tui-error-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=error][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=error][data-mode=onDark]._hoverable:hover{background-color:var(--tui-error-bg-night-hover)}:host[data-tui-host-status=success]{--left-content-color:var(--tui-success-fill);background-color:var(--tui-success-bg);color:var(--tui-text-01)}:host[data-tui-host-status=success]._hoverable:active,:host[data-tui-host-status=success]._hoverable:hover{background-color:var(--tui-success-bg-hover)}:host[data-tui-host-status=success][data-mode=onDark]{background-color:var(--tui-success-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=success][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=success][data-mode=onDark]._hoverable:hover{background-color:var(--tui-success-bg-night-hover)}:host[data-tui-host-status=warning]{--left-content-color:var(--tui-warning-fill);background-color:var(--tui-warning-bg);color:var(--tui-text-01)}:host[data-tui-host-status=warning]._hoverable:active,:host[data-tui-host-status=warning]._hoverable:hover{background-color:var(--tui-warning-bg-hover)}:host[data-tui-host-status=warning][data-mode=onDark]{background-color:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=warning][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=warning][data-mode=onDark]._hoverable:hover{background-color:var(--tui-warning-bg-night-hover)}:host[data-tui-host-status=info]{--left-content-color:var(--tui-info-fill);background-color:var(--tui-info-bg);color:var(--tui-text-01)}:host[data-tui-host-status=info]._hoverable:active,:host[data-tui-host-status=info]._hoverable:hover{background-color:var(--tui-info-bg-hover)}:host[data-tui-host-status=info][data-mode=onDark]{background-color:var(--tui-info-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=info][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=info][data-mode=onDark]._hoverable:hover{background-color:var(--tui-info-bg-night-hover)}:host[data-tui-host-status=neutral]{--left-content-color:var(--tui-neutral-fill);background-color:var(--tui-neutral-bg);color:var(--tui-text-01)}:host[data-tui-host-status=neutral]._hoverable:active,:host[data-tui-host-status=neutral]._hoverable:hover{background-color:var(--tui-neutral-bg-hover)}:host[data-tui-host-status=neutral][data-mode=onDark]{background-color:var(--tui-neutral-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=neutral][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=neutral][data-mode=onDark]._hoverable:hover{background-color:var(--tui-neutral-bg-night-hover)}:host[data-tui-host-status=default]{background-color:var(--tui-base-06)}:host[data-tui-host-status=default]:not([data-mode])._hoverable:hover{background-color:var(--tui-base-07)}:host[data-tui-host-status=default]:not([data-mode])._hoverable:active{background-color:var(--tui-base-08)}:host[data-tui-host-status=default][data-mode=onDark]{background-color:var(--tui-clear-inverse-hover)}:host[data-tui-host-status=default][data-mode=onDark]._hoverable:hover{background-color:var(--tui-clear-inverse-active)}:host[data-tui-host-status=default][data-mode=onDark]._hoverable:active{background-color:var(--tui-clear-inverse-active)}:host[data-tui-host-status=default][data-mode=onDark]:focus:after{border:2px solid var(--tui-base-01)}:host[data-tui-host-status=default][data-mode=onLight]{background-color:var(--tui-clear);color:var(--tui-text-01)}:host[data-tui-host-status=default][data-mode=onLight]._hoverable:hover{background-color:var(--tui-clear-hover)}:host[data-tui-host-status=default][data-mode=onLight]._hoverable:active{background-color:var(--tui-clear-active)}:host._hoverable{cursor:pointer}:host[data-tui-host-padding='m']{padding:0 .5rem}:host[data-tui-host-padding='m'][data-size='s']{padding:0 .375rem}:host[data-tui-host-padding='m'][data-size='l']{padding:0 .625rem}:host[data-tui-host-padding='l']{padding:0 .625rem}:host[data-tui-host-padding='l'][data-size='s']{padding:0 .5rem}:host[data-tui-host-padding='l'][data-size='l']{padding:0 .75rem}:host[data-size='s']{font:var(--tui-font-text-xs);height:1.25rem;min-width:1.25rem}:host[data-size='s'] .left-content:before{width:.25rem;height:.25rem}:host[data-size='m']{height:var(--tui-height-xs);line-height:var(--tui-height-xs);min-width:var(--tui-height-xs)}:host[data-size='l']{height:var(--tui-height-s);line-height:var(--tui-height-s);min-width:var(--tui-height-s)}:host[data-size='l'] .left-content:before{margin:0 .5rem 0 0;width:.5rem;height:.5rem}:host._empty-value .left-content{margin:0 -.25rem}:host._empty-value .left-content:before{margin:0}.left-content{display:none;color:var(--left-content-color);line-height:0}.left-content:not(:empty){display:block;margin-left:-.25rem}.left-content:not(:empty):before{content:none}:host[data-tui-host-status=error] .left-content,:host[data-tui-host-status=info] .left-content,:host[data-tui-host-status=neutral] .left-content,:host[data-tui-host-status=success] .left-content,:host[data-tui-host-status=warning] .left-content{display:block}.left-content:before{content:'';display:block;background:currentColor;margin:0 .375rem 0 0;width:.375rem;height:.375rem;border-radius:100%}"]
82
+ styles: [":host{transition-property:background-color;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;--left-content-color:currentColor;position:relative;display:inline-flex;font:var(--tui-font-text-s);align-items:center;justify-content:center;box-sizing:border-box;color:var(--tui-base-01);border-radius:6.25rem;white-space:nowrap;overflow:hidden;vertical-align:middle}:host:after{transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;content:'';box-sizing:border-box;border-radius:inherit;pointer-events:none}:host._hoverable:active[data-tui-host-status=custom]:after,:host._hoverable:hover[data-tui-host-status=custom]:after{background-color:var(--tui-clear)}:host[data-tui-host-status=primary]{background-color:var(--tui-primary);color:var(--tui-primary-text)}:host[data-tui-host-status=primary]._hoverable:hover{background-color:var(--tui-primary-hover)}:host[data-tui-host-status=primary]._hoverable:active{background-color:var(--tui-primary-active)}:host[data-tui-host-status=error]{--left-content-color:var(--tui-error-fill);background-color:var(--tui-error-bg);color:var(--tui-text-01)}:host[data-tui-host-status=error]._hoverable:active,:host[data-tui-host-status=error]._hoverable:hover{background-color:var(--tui-error-bg-hover)}:host[data-tui-host-status=error][data-mode=onDark]{background-color:var(--tui-error-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=error][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=error][data-mode=onDark]._hoverable:hover{background-color:var(--tui-error-bg-night-hover)}:host[data-tui-host-status=success]{--left-content-color:var(--tui-success-fill);background-color:var(--tui-success-bg);color:var(--tui-text-01)}:host[data-tui-host-status=success]._hoverable:active,:host[data-tui-host-status=success]._hoverable:hover{background-color:var(--tui-success-bg-hover)}:host[data-tui-host-status=success][data-mode=onDark]{background-color:var(--tui-success-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=success][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=success][data-mode=onDark]._hoverable:hover{background-color:var(--tui-success-bg-night-hover)}:host[data-tui-host-status=warning]{--left-content-color:var(--tui-warning-fill);background-color:var(--tui-warning-bg);color:var(--tui-text-01)}:host[data-tui-host-status=warning]._hoverable:active,:host[data-tui-host-status=warning]._hoverable:hover{background-color:var(--tui-warning-bg-hover)}:host[data-tui-host-status=warning][data-mode=onDark]{background-color:var(--tui-warning-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=warning][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=warning][data-mode=onDark]._hoverable:hover{background-color:var(--tui-warning-bg-night-hover)}:host[data-tui-host-status=info]{--left-content-color:var(--tui-info-fill);background-color:var(--tui-info-bg);color:var(--tui-text-01)}:host[data-tui-host-status=info]._hoverable:active,:host[data-tui-host-status=info]._hoverable:hover{background-color:var(--tui-info-bg-hover)}:host[data-tui-host-status=info][data-mode=onDark]{background-color:var(--tui-info-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=info][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=info][data-mode=onDark]._hoverable:hover{background-color:var(--tui-info-bg-night-hover)}:host[data-tui-host-status=neutral]{--left-content-color:var(--tui-neutral-fill);background-color:var(--tui-neutral-bg);color:var(--tui-text-01)}:host[data-tui-host-status=neutral]._hoverable:active,:host[data-tui-host-status=neutral]._hoverable:hover{background-color:var(--tui-neutral-bg-hover)}:host[data-tui-host-status=neutral][data-mode=onDark]{background-color:var(--tui-neutral-bg-night);color:var(--tui-text-01-night)}:host[data-tui-host-status=neutral][data-mode=onDark]._hoverable:active,:host[data-tui-host-status=neutral][data-mode=onDark]._hoverable:hover{background-color:var(--tui-neutral-bg-night-hover)}:host[data-tui-host-status=default]{background-color:var(--tui-base-06)}:host[data-tui-host-status=default]:not([data-mode])._hoverable:hover{background-color:var(--tui-base-07)}:host[data-tui-host-status=default]:not([data-mode])._hoverable:active{background-color:var(--tui-base-08)}:host[data-tui-host-status=default][data-mode=onDark]{background-color:var(--tui-clear-inverse-hover)}:host[data-tui-host-status=default][data-mode=onDark]._hoverable:hover{background-color:var(--tui-clear-inverse-active)}:host[data-tui-host-status=default][data-mode=onDark]._hoverable:active{background-color:var(--tui-clear-inverse-active)}:host[data-tui-host-status=default][data-mode=onDark]:focus:after{border:2px solid var(--tui-base-01)}:host[data-tui-host-status=default][data-mode=onLight]{background-color:var(--tui-clear);color:var(--tui-text-01)}:host[data-tui-host-status=default][data-mode=onLight]._hoverable:hover{background-color:var(--tui-clear-hover)}:host[data-tui-host-status=default][data-mode=onLight]._hoverable:active{background-color:var(--tui-clear-active)}:host._hoverable{cursor:pointer}:host[data-tui-host-padding='m']{padding:0 .5rem}:host[data-tui-host-padding='m'][data-size=xs]{padding:0 .25rem}:host[data-tui-host-padding='m'][data-size='s']{padding:0 .375rem}:host[data-tui-host-padding='m'][data-size='l']{padding:0 .625rem}:host[data-tui-host-padding='l']{padding:0 .625rem}:host[data-tui-host-padding='l'][data-size=xs]{padding:0 .375rem}:host[data-tui-host-padding='l'][data-size='s']{padding:0 .5rem}:host[data-tui-host-padding='l'][data-size='l']{padding:0 .75rem}:host[data-size=xs]{font:var(--tui-font-text-xs);height:1rem;min-width:1rem}:host[data-size=xs] .left-content:before{width:.34375rem;height:.34375rem}:host[data-size='s']{font:var(--tui-font-text-xs);height:1.25rem;min-width:1.25rem}:host[data-size='s'] .left-content:before{width:.25rem;height:.25rem}:host[data-size='m']{height:var(--tui-height-xs);line-height:var(--tui-height-xs);min-width:var(--tui-height-xs)}:host[data-size='l']{height:var(--tui-height-s);line-height:var(--tui-height-s);min-width:var(--tui-height-s)}:host[data-size='l'] .left-content:before{margin:0 .5rem 0 0;width:.5rem;height:.5rem}:host._empty-value .left-content{margin:0 -.25rem}:host._empty-value .left-content:before{margin:0}.left-content{display:none;color:var(--left-content-color);line-height:0}.left-content:not(:empty){display:block;margin-left:-.25rem}.left-content:not(:empty):before{content:none}:host[data-tui-host-status=error] .left-content,:host[data-tui-host-status=info] .left-content,:host[data-tui-host-status=neutral] .left-content,:host[data-tui-host-status=success] .left-content,:host[data-tui-host-status=warning] .left-content{display:block}.left-content:before{content:'';display:block;background:currentColor;margin:0 .375rem 0 0;width:.375rem;height:.375rem;border-radius:100%}"]
83
83
  }),
84
84
  __param(0, Inject(TUI_MODE))
85
85
  ], TuiBadgeComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-badge.js","sources":["ng://@taiga-ui/kit/components/badge/badge.component.ts","ng://@taiga-ui/kit/components/badge/badge.module.ts","ng://@taiga-ui/kit/components/badge/taiga-ui-kit-components-badge.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {isNumber, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {MODE_PROVIDER, TUI_MODE, TuiBrightness, TuiSizeL, TuiSizeS} from '@taiga-ui/core';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: `tui-badge`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: `./badge.template.html`,\n styleUrls: [`./badge.style.less`],\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': `mode$`,\n },\n})\nexport class TuiBadgeComponent {\n @Input()\n @tuiDefaultProp()\n value: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeS | TuiSizeL = `m`;\n\n @Input()\n @HostBinding(`attr.data-tui-host-status`)\n @tuiDefaultProp()\n status: TuiStatusT = `default`;\n\n @Input()\n @HostBinding(`class._hoverable`)\n @tuiDefaultProp()\n hoverable = false;\n\n constructor(@Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>) {}\n\n @HostBinding(`attr.data-tui-host-padding`)\n get padding(): string {\n if (this.isEmpty) {\n return `none`;\n }\n\n return isNumber(this.value.valueOf()) ? `m` : `l`;\n }\n\n get outputValue(): string {\n if (isNumber(this.value.valueOf()) && this.value.valueOf() > 99) {\n return `99+`;\n } else {\n return String(this.value);\n }\n }\n\n @HostBinding(`class._empty-value`)\n get isEmpty(): boolean {\n return this.value === ``;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiBadgeComponent} from './badge.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiBadgeComponent],\n exports: [TuiBadgeComponent],\n})\nexport class TuiBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IA2CI,2BAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;QAjB9E,UAAK,GAAwB,EAAE,CAAC;QAKh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a,CAAC;YAC1B,IAAI,EAAE;gBACF,oBAAoB,EAAE,OAAO;aAChC;;SACJ,CAAC;QAqBe,WAAA,MAAM,CAAC,QAAQ,CAAC,CAAA;OApBpB,iBAAiB,CA2C7B;IAAD,wBAAC;CA3CD;;;ICbA;KAA8B;IAAjB,cAAc;QAL1B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,CAAC;YACvB,YAAY,EAAE,CAAC,iBAAiB,CAAC;YACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;SAC/B,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAA9B;;ACVA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-badge.js","sources":["ng://@taiga-ui/kit/components/badge/badge.component.ts","ng://@taiga-ui/kit/components/badge/badge.module.ts","ng://@taiga-ui/kit/components/badge/taiga-ui-kit-components-badge.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Input,\n} from '@angular/core';\nimport {isNumber, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {\n MODE_PROVIDER,\n TUI_MODE,\n TuiBrightness,\n TuiSizeL,\n TuiSizeXS,\n} from '@taiga-ui/core';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: `tui-badge`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: `./badge.template.html`,\n styleUrls: [`./badge.style.less`],\n providers: [MODE_PROVIDER],\n host: {\n '($.data-mode.attr)': `mode$`,\n },\n})\nexport class TuiBadgeComponent {\n @Input()\n @tuiDefaultProp()\n value: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeL = `m`;\n\n @Input()\n @HostBinding(`attr.data-tui-host-status`)\n @tuiDefaultProp()\n status: TuiStatusT = `default`;\n\n @Input()\n @HostBinding(`class._hoverable`)\n @tuiDefaultProp()\n hoverable = false;\n\n constructor(@Inject(TUI_MODE) readonly mode$: Observable<TuiBrightness | null>) {}\n\n @HostBinding(`attr.data-tui-host-padding`)\n get padding(): string {\n if (this.isEmpty) {\n return `none`;\n }\n\n return isNumber(this.value.valueOf()) ? `m` : `l`;\n }\n\n get outputValue(): string {\n if (isNumber(this.value.valueOf()) && this.value.valueOf() > 99) {\n return `99+`;\n } else {\n return String(this.value);\n }\n }\n\n @HostBinding(`class._empty-value`)\n get isEmpty(): boolean {\n return this.value === ``;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {TuiBadgeComponent} from './badge.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TuiBadgeComponent],\n exports: [TuiBadgeComponent],\n})\nexport class TuiBadgeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAiDI,2BAAuC,KAAuC;QAAvC,UAAK,GAAL,KAAK,CAAkC;QAjB9E,UAAK,GAAwB,EAAE,CAAC;QAKhC,SAAI,GAAyB,GAAG,CAAC;QAKjC,WAAM,GAAe,SAAS,CAAC;QAK/B,cAAS,GAAG,KAAK,CAAC;KAEgE;IAGlF,sBAAI,sCAAO;aAAX;YACI,IAAI,IAAI,CAAC,OAAO,EAAE;gBACd,OAAO,MAAM,CAAC;aACjB;YAED,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;SACrD;;;OAAA;IAED,sBAAI,0CAAW;aAAf;YACI,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE;gBAC7D,OAAO,KAAK,CAAC;aAChB;iBAAM;gBACH,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC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11
11
  s: "s",
12
12
  m: "s",
13
13
  l: "m",
@@ -25,10 +25,7 @@ var TuiBadgedContentComponent = /** @class */ (function () {
25
25
  }
26
26
  Object.defineProperty(TuiBadgedContentComponent.prototype, "topNotification", {
27
27
  get: function () {
28
- return (!this.contentTop && this.colorTop) ||
29
- (this.contentTop && this.contentIsNumber(this.contentTop) && this.badgeHidden)
30
- ? this.colorTop
31
- : "";
28
+ return !this.contentTop && this.colorTop ? this.colorTop : "";
32
29
  },
33
30
  enumerable: true,
34
31
  configurable: true
@@ -47,13 +44,6 @@ var TuiBadgedContentComponent = /** @class */ (function () {
47
44
  enumerable: true,
48
45
  configurable: true
49
46
  });
50
- Object.defineProperty(TuiBadgedContentComponent.prototype, "badgeHidden", {
51
- get: function () {
52
- return this.size === "xs";
53
- },
54
- enumerable: true,
55
- configurable: true
56
- });
57
47
  Object.defineProperty(TuiBadgedContentComponent.prototype, "sizeBig", {
58
48
  get: function () {
59
49
  return sizeBigger(this.size);
@@ -110,8 +100,8 @@ var TuiBadgedContentComponent = /** @class */ (function () {
110
100
  Component({
111
101
  selector: "tui-badged-content",
112
102
  changeDetection: ChangeDetectionStrategy.OnPush,
113
- template: "<ng-content></ng-content>\n\n<div\n *ngIf=\"topNotification\"\n class=\"t-notification t-notification_top\"\n [style.background]=\"topNotification\"\n [style.boxShadow]=\"boxShadow\"\n></div>\n\n<div\n *ngIf=\"bottomNotification\"\n class=\"t-notification t-notification_bottom\"\n [style.background]=\"bottomNotification\"\n [style.boxShadow]=\"boxShadow\"\n></div>\n\n<div\n *ngIf=\"contentTop\"\n polymorpheus-outlet\n class=\"t-content t-content_top\"\n [style.boxShadow]=\"boxShadow\"\n [content]=\"contentTop\"\n>\n <ng-template let-content>\n <tui-badge\n *ngIf=\"contentIsNumber(content) && !badgeHidden\"\n [status]=\"getStatus(colorTop)\"\n [style.backgroundColor]=\"colorTop\"\n [size]=\"badgeSize\"\n [value]=\"contentTop\"\n ></tui-badge>\n <tui-svg\n *ngIf=\"contentIsString(content)\"\n class=\"t-icon\"\n [style.color]=\"colorTop\"\n [src]=\"content\"\n ></tui-svg>\n </ng-template>\n</div>\n\n<div\n *ngIf=\"contentBottom && sizeBig\"\n polymorpheus-outlet\n class=\"t-content t-content_bottom\"\n [style.boxShadow]=\"boxShadow\"\n [content]=\"contentBottom\"\n>\n <ng-template let-content>\n <tui-badge\n *ngIf=\"contentIsNumber(content)\"\n [status]=\"getStatus(colorBottom)\"\n [style.backgroundColor]=\"colorBottom\"\n [size]=\"badgeSize\"\n [value]=\"contentBottom\"\n ></tui-badge>\n <tui-svg\n *ngIf=\"contentIsString(content)\"\n class=\"t-icon\"\n [style.color]=\"colorBottom\"\n [src]=\"content\"\n ></tui-svg>\n </ng-template>\n</div>\n",
114
- styles: [":host{position:relative;display:inline-block;color:var(--tui-base-01)}.t-notification{position:absolute;border-radius:100%;box-shadow:0 0 0 2px currentColor}.t-notification:not([data-tui-background]){background-color:currentColor}:host[data-size='m']:not(._rounded) .t-notification_top,:host[data-size='s']:not(._rounded) .t-notification_top,:host[data-size=xs]:not(._rounded) .t-notification_top{top:-.125rem;right:-.125rem}:host[data-size='l']:not(._rounded) .t-notification_top,:host[data-size=xl]:not(._rounded) .t-notification_top{top:-.25rem;right:-.25rem}:host[data-size=xxl]:not(._rounded) .t-notification_top{top:-.5rem;right:-.5rem}:host[data-size=xs]._rounded .t-notification_top{top:0;right:0}:host[data-size='s']._rounded .t-notification_top{top:.0625rem;right:.0625rem}:host[data-size='m']._rounded .t-notification_top{top:.1875rem;right:.1875rem}:host[data-size='l']._rounded .t-notification_top{top:.25rem;right:.25rem}:host[data-size=xl]._rounded .t-notification_top{top:.375rem;right:.375rem}:host[data-size=xxl]._rounded .t-notification_top{top:.5rem;right:.5rem}:host[data-size='m']:not(._rounded) .t-notification_bottom{bottom:-.125rem;right:-.125rem}:host[data-size='l']:not(._rounded) .t-notification_bottom,:host[data-size=xl]:not(._rounded) .t-notification_bottom{bottom:-.25rem;right:-.25rem}:host[data-size=xxl]:not(._rounded) .t-notification_bottom{bottom:-.5rem;right:-.5rem}:host[data-size='m']._rounded .t-notification_bottom{bottom:.1875rem;right:.1875rem}:host[data-size='l']._rounded .t-notification_bottom{bottom:.25rem;right:.25rem}:host[data-size=xl]._rounded .t-notification_bottom{bottom:.375rem;right:.375rem}:host[data-size=xxl]._rounded .t-notification_bottom{bottom:.5rem;right:.5rem}:host[data-size='m'] .t-notification,:host[data-size='s'] .t-notification,:host[data-size=xs] .t-notification{width:.5rem;height:.5rem}:host[data-size='l'] .t-notification{width:.75rem;height:.75rem}:host[data-size=xl] .t-notification{width:1rem;height:1rem}:host[data-size=xxl] .t-notification{width:1.5rem;height:1.5rem}.t-icon[data-tui-color=normal],.t-notification[data-tui-color=normal]{color:var(--tui-base-06)}.t-icon[data-tui-color=onDark],.t-notification[data-tui-color=onDark]{color:var(--tui-secondary)}.t-icon[data-tui-color=gray],.t-notification[data-tui-color=gray]{color:var(--tui-base-03)}.t-icon[data-tui-color=warning],.t-notification[data-tui-color=warning]{color:var(--tui-primary)}.t-icon[data-tui-color=secondary],.t-notification[data-tui-color=secondary]{color:var(--tui-info-fill)}.t-icon[data-tui-color=highlight],.t-icon[data-tui-color=white],.t-notification[data-tui-color=highlight],.t-notification[data-tui-color=white]{color:var(--tui-base-01)}.t-icon[data-tui-color=transparent-dark],.t-notification[data-tui-color=transparent-dark]{color:var(--tui-clear)}.t-icon[data-tui-color=transparent-light],.t-notification[data-tui-color=transparent-light]{color:var(--tui-clear-inverse)}.t-icon{color:var(--tui-success-fill)}:host[data-size='m'] .t-icon,:host[data-size='s'] .t-icon{width:1.5rem;height:1.5rem;margin:-.125rem}:host[data-size='l'] .t-icon,:host[data-size=xl] .t-icon{transform:scale(1.2)}:host[data-size=xxl] .t-icon{transform:scale(1.6)}.t-content{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:6.25rem;overflow:hidden;background-color:currentColor;box-shadow:0 0 0 2px currentColor}:host[data-size='l'][data-tui-host-top]:not(._rounded) .t-content_top,:host[data-size=xxl][data-tui-host-top]:not(._rounded) .t-content_top{right:-.5rem;top:-.5rem}:host[data-size=xl][data-tui-host-top]:not(._rounded) .t-content_top{right:-.375rem;top:-.375rem}:host[data-size='m'][data-tui-host-top]:not(._rounded) .t-content_top,:host[data-size='s'][data-tui-host-top]:not(._rounded) .t-content_top,:host[data-size=xs][data-tui-host-top]:not(._rounded) .t-content_top{right:-.25rem;top:-.25rem}:host[data-size=xxl][data-tui-host-top]._rounded .t-content_top{right:.25rem;top:.25rem}:host[data-size=xl][data-tui-host-top]._rounded .t-content_top{right:.125rem;top:.125rem}:host[data-size='l'][data-tui-host-top]._rounded .t-content_top,:host[data-size='m'][data-tui-host-top]._rounded .t-content_top,:host[data-size='s'][data-tui-host-top]._rounded .t-content_top,:host[data-size=xs][data-tui-host-top]._rounded .t-content_top{right:-.25rem;top:-.25rem}:host[data-size='l'][data-tui-host-bottom]:not(._rounded) .t-content_bottom,:host[data-size=xxl][data-tui-host-bottom]:not(._rounded) .t-content_bottom{bottom:-.5rem;right:-.5rem}:host[data-size=xl][data-tui-host-bottom]:not(._rounded) .t-content_bottom{bottom:-.375rem;right:-.375rem}:host[data-size='m'][data-tui-host-bottom]:not(._rounded) .t-content_bottom{bottom:-.25rem;right:-.25rem}:host[data-size=xxl][data-tui-host-bottom]._rounded .t-content_bottom{bottom:.25rem;right:.25rem}:host[data-size=xl][data-tui-host-bottom]._rounded .t-content_bottom{bottom:.125rem;right:.125rem}:host[data-size='l'][data-tui-host-bottom]._rounded .t-content_bottom,:host[data-size='m'][data-tui-host-bottom]._rounded .t-content_bottom{bottom:-.25rem;right:-.25rem}:host[data-size=xxl] .t-content{height:2rem;min-width:2rem}:host[data-size='l'] .t-content,:host[data-size=xl] .t-content{height:1.5rem;min-width:1.5rem}:host[data-size='m'] .t-content,:host[data-size='s'] .t-content{height:1.25rem;min-width:1.25rem}:host[data-size=xs] .t-content{height:1rem;min-width:1rem}"]
103
+ template: "<ng-content></ng-content>\n\n<div\n *ngIf=\"topNotification\"\n class=\"t-notification t-notification_top\"\n [style.background]=\"topNotification\"\n [style.boxShadow]=\"boxShadow\"\n></div>\n\n<div\n *ngIf=\"bottomNotification\"\n class=\"t-notification t-notification_bottom\"\n [style.background]=\"bottomNotification\"\n [style.boxShadow]=\"boxShadow\"\n></div>\n\n<div\n *ngIf=\"contentTop\"\n polymorpheus-outlet\n class=\"t-content t-content_top\"\n [style.boxShadow]=\"boxShadow\"\n [content]=\"contentTop\"\n>\n <ng-template let-content>\n <tui-badge\n *ngIf=\"contentIsNumber(content)\"\n [status]=\"getStatus(colorTop)\"\n [style.backgroundColor]=\"colorTop\"\n [size]=\"badgeSize\"\n [value]=\"contentTop\"\n ></tui-badge>\n <tui-svg\n *ngIf=\"contentIsString(content)\"\n class=\"t-icon\"\n [style.color]=\"colorTop\"\n [src]=\"content\"\n ></tui-svg>\n </ng-template>\n</div>\n\n<div\n *ngIf=\"contentBottom && sizeBig\"\n polymorpheus-outlet\n class=\"t-content t-content_bottom\"\n [style.boxShadow]=\"boxShadow\"\n [content]=\"contentBottom\"\n>\n <ng-template let-content>\n <tui-badge\n *ngIf=\"contentIsNumber(content)\"\n [status]=\"getStatus(colorBottom)\"\n [style.backgroundColor]=\"colorBottom\"\n [size]=\"badgeSize\"\n [value]=\"contentBottom\"\n ></tui-badge>\n <tui-svg\n *ngIf=\"contentIsString(content)\"\n class=\"t-icon\"\n [style.color]=\"colorBottom\"\n [src]=\"content\"\n ></tui-svg>\n </ng-template>\n</div>\n",
104
+ styles: [":host{position:relative;display:inline-block;color:var(--tui-base-01)}.t-notification{position:absolute;border-radius:100%;box-shadow:0 0 0 2px currentColor}.t-notification:not([data-tui-background]){background-color:currentColor}:host[data-size='m']:not(._rounded) .t-notification_top,:host[data-size='s']:not(._rounded) .t-notification_top,:host[data-size=xs]:not(._rounded) .t-notification_top{top:-.125rem;right:-.125rem}:host[data-size='l']:not(._rounded) .t-notification_top,:host[data-size=xl]:not(._rounded) .t-notification_top{top:-.25rem;right:-.25rem}:host[data-size=xxl]:not(._rounded) .t-notification_top{top:-.5rem;right:-.5rem}:host[data-size=xs]._rounded .t-notification_top{top:0;right:0}:host[data-size='s']._rounded .t-notification_top{top:.0625rem;right:.0625rem}:host[data-size='m']._rounded .t-notification_top{top:.1875rem;right:.1875rem}:host[data-size='l']._rounded .t-notification_top{top:.25rem;right:.25rem}:host[data-size=xl]._rounded .t-notification_top{top:.375rem;right:.375rem}:host[data-size=xxl]._rounded .t-notification_top{top:.5rem;right:.5rem}:host[data-size='m']:not(._rounded) .t-notification_bottom{bottom:-.125rem;right:-.125rem}:host[data-size='l']:not(._rounded) .t-notification_bottom,:host[data-size=xl]:not(._rounded) .t-notification_bottom{bottom:-.25rem;right:-.25rem}:host[data-size=xxl]:not(._rounded) .t-notification_bottom{bottom:-.5rem;right:-.5rem}:host[data-size='m']._rounded .t-notification_bottom{bottom:.1875rem;right:.1875rem}:host[data-size='l']._rounded .t-notification_bottom{bottom:.25rem;right:.25rem}:host[data-size=xl]._rounded .t-notification_bottom{bottom:.375rem;right:.375rem}:host[data-size=xxl]._rounded .t-notification_bottom{bottom:.5rem;right:.5rem}:host[data-size='m'] .t-notification,:host[data-size='s'] .t-notification,:host[data-size=xs] .t-notification{width:.5rem;height:.5rem}:host[data-size='l'] .t-notification{width:.75rem;height:.75rem}:host[data-size=xl] .t-notification{width:1rem;height:1rem}:host[data-size=xxl] .t-notification{width:1.5rem;height:1.5rem}.t-icon[data-tui-color=normal],.t-notification[data-tui-color=normal]{color:var(--tui-base-06)}.t-icon[data-tui-color=onDark],.t-notification[data-tui-color=onDark]{color:var(--tui-secondary)}.t-icon[data-tui-color=gray],.t-notification[data-tui-color=gray]{color:var(--tui-base-03)}.t-icon[data-tui-color=warning],.t-notification[data-tui-color=warning]{color:var(--tui-primary)}.t-icon[data-tui-color=secondary],.t-notification[data-tui-color=secondary]{color:var(--tui-info-fill)}.t-icon[data-tui-color=highlight],.t-icon[data-tui-color=white],.t-notification[data-tui-color=highlight],.t-notification[data-tui-color=white]{color:var(--tui-base-01)}.t-icon[data-tui-color=transparent-dark],.t-notification[data-tui-color=transparent-dark]{color:var(--tui-clear)}.t-icon[data-tui-color=transparent-light],.t-notification[data-tui-color=transparent-light]{color:var(--tui-clear-inverse)}.t-icon{color:var(--tui-success-fill)}:host[data-size=xs] .t-icon{transform:scale(.66666667);margin:-.25rem}:host[data-size='m'] .t-icon,:host[data-size='s'] .t-icon{width:1.5rem;height:1.5rem;margin:-.125rem}:host[data-size='l'] .t-icon,:host[data-size=xl] .t-icon{transform:scale(1.2)}:host[data-size=xxl] .t-icon{transform:scale(1.6)}.t-content{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:6.25rem;overflow:hidden;background-color:currentColor;box-shadow:0 0 0 2px currentColor}:host[data-size='l'][data-tui-host-top]:not(._rounded) .t-content_top,:host[data-size=xxl][data-tui-host-top]:not(._rounded) .t-content_top{right:-.5rem;top:-.5rem}:host[data-size=xl][data-tui-host-top]:not(._rounded) .t-content_top{right:-.375rem;top:-.375rem}:host[data-size='m'][data-tui-host-top]:not(._rounded) .t-content_top,:host[data-size='s'][data-tui-host-top]:not(._rounded) .t-content_top,:host[data-size=xs][data-tui-host-top]:not(._rounded) .t-content_top{right:-.25rem;top:-.25rem}:host[data-size=xxl][data-tui-host-top]._rounded .t-content_top{right:.25rem;top:.25rem}:host[data-size=xl][data-tui-host-top]._rounded .t-content_top{right:.125rem;top:.125rem}:host[data-size='l'][data-tui-host-top]._rounded .t-content_top,:host[data-size='m'][data-tui-host-top]._rounded .t-content_top,:host[data-size='s'][data-tui-host-top]._rounded .t-content_top,:host[data-size=xs][data-tui-host-top]._rounded .t-content_top{right:-.25rem;top:-.25rem}:host[data-size='l'][data-tui-host-bottom]:not(._rounded) .t-content_bottom,:host[data-size=xxl][data-tui-host-bottom]:not(._rounded) .t-content_bottom{bottom:-.5rem;right:-.5rem}:host[data-size=xl][data-tui-host-bottom]:not(._rounded) .t-content_bottom{bottom:-.375rem;right:-.375rem}:host[data-size='m'][data-tui-host-bottom]:not(._rounded) .t-content_bottom{bottom:-.25rem;right:-.25rem}:host[data-size=xxl][data-tui-host-bottom]._rounded .t-content_bottom{bottom:.25rem;right:.25rem}:host[data-size=xl][data-tui-host-bottom]._rounded .t-content_bottom{bottom:.125rem;right:.125rem}:host[data-size='l'][data-tui-host-bottom]._rounded .t-content_bottom,:host[data-size='m'][data-tui-host-bottom]._rounded .t-content_bottom{bottom:-.25rem;right:-.25rem}:host[data-size=xxl] .t-content{height:2rem;min-width:2rem}:host[data-size='l'] .t-content,:host[data-size=xl] .t-content{height:1.5rem;min-width:1.5rem}:host[data-size='m'] .t-content,:host[data-size='s'] .t-content{height:1.25rem;min-width:1.25rem}:host[data-size=xs] .t-content{height:1rem;min-width:1rem}"]
115
105
  })
116
106
  ], TuiBadgedContentComponent);
117
107
  return TuiBadgedContentComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-badged-content.js","sources":["ng://@taiga-ui/kit/components/badged-content/badged-content.component.ts","ng://@taiga-ui/kit/components/badged-content/badged-content.module.ts","ng://@taiga-ui/kit/components/badged-content/taiga-ui-kit-components-badged-content.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {isNumber, px, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {sizeBigger, TuiSizeL, TuiSizeS, TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nconst BADGE_SIZE: {[key: string]: TuiSizeS | TuiSizeL} = {\n xs: `s`,\n s: `s`,\n m: `s`,\n l: `m`,\n xl: `m`,\n xxl: `l`,\n};\n\n@Component({\n selector: `tui-badged-content`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: `./badged-content.template.html`,\n styleUrls: [`./badged-content.style.less`],\n})\nexport class TuiBadgedContentComponent {\n @Input()\n @HostBinding(`attr.data-tui-host-top`)\n @tuiDefaultProp()\n contentTop: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-tui-host-bottom`)\n @tuiDefaultProp()\n contentBottom: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeXXL = `m`;\n\n @Input()\n @tuiDefaultProp()\n colorTop = ``;\n\n @Input()\n @tuiDefaultProp()\n colorBottom = ``;\n\n @Input()\n @HostBinding(`class._rounded`)\n @tuiDefaultProp()\n rounded = false;\n\n get topNotification(): string {\n return (!this.contentTop && this.colorTop) ||\n (this.contentTop && this.contentIsNumber(this.contentTop) && this.badgeHidden)\n ? this.colorTop\n : ``;\n }\n\n get bottomNotification(): string {\n return !this.contentBottom && this.colorBottom ? this.colorBottom : ``;\n }\n\n get badgeSize(): TuiSizeS | TuiSizeL {\n return BADGE_SIZE[this.size];\n }\n\n get badgeHidden(): boolean {\n return this.size === `xs`;\n }\n\n get sizeBig(): boolean {\n return sizeBigger(this.size);\n }\n\n get boxShadow(): string {\n const borderWidth = this.sizeBig ? 3 : 2;\n\n return `0 0 0 ${px(borderWidth)}`;\n }\n\n contentIsNumber(content: PolymorpheusContent): boolean {\n return isNumber(content.valueOf());\n }\n\n contentIsString(content: PolymorpheusContent): boolean {\n return typeof content.valueOf() === `string`;\n }\n\n getStatus(color: string): TuiStatusT {\n return color ? `custom` : `primary`;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\nimport {TuiBadgeModule} from '@taiga-ui/kit/components/badge';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiBadgedContentComponent} from './badged-content.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiSvgModule, TuiBadgeModule],\n declarations: [TuiBadgedContentComponent],\n exports: [TuiBadgedContentComponent],\n})\nexport class Tui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iga-ui-kit-components-badged-content.js","sources":["ng://@taiga-ui/kit/components/badged-content/badged-content.component.ts","ng://@taiga-ui/kit/components/badged-content/badged-content.module.ts","ng://@taiga-ui/kit/components/badged-content/taiga-ui-kit-components-badged-content.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, HostBinding, Input} from '@angular/core';\nimport {isNumber, px, tuiDefaultProp} from '@taiga-ui/cdk';\nimport {sizeBigger, TuiSizeL, TuiSizeXS, TuiSizeXXL} from '@taiga-ui/core';\nimport {TuiStatusT} from '@taiga-ui/kit/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nconst BADGE_SIZE: {[key: string]: TuiSizeXS | TuiSizeL} = {\n xs: `xs`,\n s: `s`,\n m: `s`,\n l: `m`,\n xl: `m`,\n xxl: `l`,\n};\n\n@Component({\n selector: `tui-badged-content`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: `./badged-content.template.html`,\n styleUrls: [`./badged-content.style.less`],\n})\nexport class TuiBadgedContentComponent {\n @Input()\n @HostBinding(`attr.data-tui-host-top`)\n @tuiDefaultProp()\n contentTop: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-tui-host-bottom`)\n @tuiDefaultProp()\n contentBottom: PolymorpheusContent = ``;\n\n @Input()\n @HostBinding(`attr.data-size`)\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeXXL = `m`;\n\n @Input()\n @tuiDefaultProp()\n colorTop = ``;\n\n @Input()\n @tuiDefaultProp()\n colorBottom = ``;\n\n @Input()\n @HostBinding(`class._rounded`)\n @tuiDefaultProp()\n rounded = false;\n\n get topNotification(): string {\n return !this.contentTop && this.colorTop ? this.colorTop : ``;\n }\n\n get bottomNotification(): string {\n return !this.contentBottom && this.colorBottom ? this.colorBottom : ``;\n }\n\n get badgeSize(): TuiSizeXS | TuiSizeL {\n return BADGE_SIZE[this.size];\n }\n\n get sizeBig(): boolean {\n return sizeBigger(this.size);\n }\n\n get boxShadow(): string {\n const borderWidth = this.sizeBig ? 3 : 2;\n\n return `0 0 0 ${px(borderWidth)}`;\n }\n\n contentIsNumber(content: PolymorpheusContent): boolean {\n return isNumber(content.valueOf());\n }\n\n contentIsString(content: PolymorpheusContent): boolean {\n return typeof content.valueOf() === `string`;\n }\n\n getStatus(color: string): TuiStatusT {\n return color ? `custom` : `primary`;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core';\nimport {TuiBadgeModule} from '@taiga-ui/kit/components/badge';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiBadgedContentComponent} from './badged-content.component';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiSvgModule, TuiBadgeModule],\n declarations: [TuiBadgedContentComponent],\n exports: [TuiBadgedContentComponent],\n})\nexport class TuiBadgedContentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAMA,IAAM,UAAU,GAA0C;IACtD,EAAE,EAAE,IAAI;IACR,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,EAAE,EAAE,GAAG;IACP,GAAG,EAAE,GAAG;CACX,CAAC;;IAQF;QAII,eAAU,GAAwB,EAAE,CAAC;QAKrC,kBAAa,GAAwB,EAAE,CAAC;QAKxC,SAAI,GAA2B,GAAG,CAAC;QAInC,aAAQ,GAAG,EAAE,CAAC;QAId,gBAAW,GAAG,EAAE,CAAC;QAKjB,YAAO,GAAG,KAAK,CAAC;KAmCnB;IAjCG,sBAAI,sDAAe;aAAnB;YACI,OAAO,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;SACjE;;;OAAA;IAED,sBAAI,yDAAkB;aAAtB;YACI,OAAO,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,WAAW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hD,CAAC;OACW,yBAAyB,CA8DrC;IAAD,gCAAC;CA9DD;;;ICRA;KAAsC;IAAzB,sBAAsB;QALlC,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,CAAC;YACzE,YAAY,EAAE,CAAC,yBAAyB,CAAC;YACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;OACW,sBAAsB,CAAG;IAAD,6BAAC;CAAtC;;ACbA;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __param } from 'tslib';
2
2
  import { EventEmitter, Inject, Input, Output, HostBinding, Component, ChangeDetectionStrategy, ContentChildren, TemplateRef, ViewEncapsulation, NgModule } from '@angular/core';
3
3
  import { DomSanitizer } from '@angular/platform-browser';
4
- import { TUI_IS_MOBILE, tuiDefaultProp, tuiPure, TuiItemDirective, TuiFocusVisibleModule, TuiItemModule } from '@taiga-ui/cdk';
4
+ import { tuiIsObserved, TUI_IS_MOBILE, tuiDefaultProp, tuiPure, TuiItemDirective, TuiFocusVisibleModule, TuiItemModule } from '@taiga-ui/cdk';
5
5
  import { TUI_FILE_TEXTS, TUI_DIGITAL_INFORMATION_UNITS, TUI_HIDE_TEXT, TUI_SHOW_ALL_TEXT } from '@taiga-ui/kit/tokens';
6
6
  import { formatSize } from '@taiga-ui/kit/utils/files';
7
7
  import { of, Observable } from 'rxjs';
@@ -62,7 +62,7 @@ var TuiFileComponent = /** @class */ (function () {
62
62
  });
63
63
  Object.defineProperty(TuiFileComponent.prototype, "allowDelete", {
64
64
  get: function () {
65
- return !!this.removed.observers.length;
65
+ return tuiIsObserved(this.removed);
66
66
  },
67
67
  enumerable: true,
68
68
  configurable: true
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-files.js","sources":["ng://@taiga-ui/kit/components/files/file/file.component.ts","ng://@taiga-ui/kit/components/files/files.component.ts","ng://@taiga-ui/kit/components/files/files.module.ts","ng://@taiga-ui/kit/components/files/taiga-ui-kit-components-files.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {DomSanitizer, SafeValue} from '@angular/platform-browser';\nimport {TUI_IS_MOBILE, tuiDefaultProp, tuiPure} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileState, TuiFileStateT} from '@taiga-ui/kit/enums';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {formatSize} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\ntype FileTexts = 'loadingError' | 'preview' | 'remove';\n\n// @dynamic\n@Component({\n selector: `tui-file`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: `./file.template.html`,\n styleUrls: [`./file.style.less`],\n})\nexport class TuiFileComponent {\n @Input()\n @tuiDefaultProp()\n file: TuiFileLike = {name: ``};\n\n @Input()\n @tuiDefaultProp()\n state: TuiFileStateT = `normal`;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n showSize = true;\n\n @Input()\n @tuiDefaultProp()\n leftContent: PolymorpheusContent = ``;\n\n @Output()\n readonly removed = new EventEmitter<void>();\n\n @HostBinding(`class._focused`)\n focused = false;\n\n constructor(\n @Inject(TUI_IS_MOBILE) readonly isMobile: boolean,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(TUI_FILE_TEXTS)\n readonly fileTexts$: Observable<Record<FileTexts, string>>,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: Observable<[string, string, string]>,\n ) {}\n\n get preview(): SafeValue {\n return this.isBig ? this.createPreview(this.file, this.sanitizer) : ``;\n }\n\n get isBig(): boolean {\n return this.size === `l`;\n }\n\n get isLoading(): boolean {\n return this.state === TuiFileState.Loading;\n }\n\n get isError(): boolean {\n return this.state === TuiFileState.Error;\n }\n\n get isDeleted(): boolean {\n return this.state === TuiFileState.Deleted;\n }\n\n get allowDelete(): boolean {\n return !!this.removed.observers.length;\n }\n\n get icon(): string {\n if (this.state === TuiFileState.Normal && this.isBig) {\n return `tuiIconDefaultDocLarge`;\n }\n\n switch (this.state) {\n case TuiFileState.Deleted:\n return `tuiIconTrashLarge`;\n case TuiFileState.Error:\n return `tuiIconAlertCircleLarge`;\n default:\n return `tuiIconCheckCircleLarge`;\n }\n }\n\n @HostBinding(`class._link`)\n get src(): string {\n return this.file.src || ``;\n }\n\n get name(): string {\n return this.getName(this.file);\n }\n\n get type(): string {\n return this.getType(this.file);\n }\n\n get content$(): Observable<PolymorpheusContent> {\n return this.calculateContent$(this.state, this.file, this.fileTexts$);\n }\n\n get fileSize$(): Observable<string | null> {\n return this.calculateFileSize$(this.file, this.units$);\n }\n\n onRemoveClick(): void {\n this.removed.emit();\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.focused = focusVisible;\n }\n\n @tuiPure\n private calculateContent$(\n state: TuiFileStateT,\n file: TuiFileLike,\n fileTexts$: Observable<Record<'loadingError' | 'preview' | 'remove', string>>,\n ): Observable<PolymorpheusContent> {\n return state === TuiFileState.Error && !file.content\n ? fileTexts$.pipe(map(texts => texts.loadingError))\n : of(this.file.content || ``);\n }\n\n @tuiPure\n private calculateFileSize$(\n file: TuiFileLike,\n units$: Observable<[string, string, string]>,\n ): Observable<string | null> {\n return units$.pipe(map(units => formatSize(units, file.size)));\n }\n\n @tuiPure\n private createPreview(file: TuiFileLike, sanitizer: DomSanitizer): SafeValue {\n if (file.src) {\n return file.src;\n }\n\n // TODO: iframe warning\n if (file instanceof File && file.type && file.type.startsWith(`image/`)) {\n return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));\n }\n\n return ``;\n }\n\n @tuiPure\n private getName(file: TuiFileLike): string {\n return file.name.split(`.`).slice(0, -1).join(`.`);\n }\n\n @tuiPure\n private getType(file: TuiFileLike): string {\n return `.${file.name.split(`.`).pop()}` || ``;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n Inject,\n Input,\n QueryList,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiDefaultProp, TuiItemDirective} from '@taiga-ui/cdk';\nimport {TUI_HIDE_TEXT, TUI_SHOW_ALL_TEXT} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: `tui-files`,\n templateUrl: `./files.component.html`,\n styleUrls: [`./files.component.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiFilesComponent {\n @ContentChildren(TuiItemDirective, {read: TemplateRef})\n readonly items: QueryList<TemplateRef<Record<string, unknown>>> | null = null;\n\n @Input()\n @tuiDefaultProp()\n max = 0;\n\n hidden = true;\n\n constructor(\n @Inject(TUI_HIDE_TEXT) readonly hideText$: Observable<string>,\n @Inject(TUI_SHOW_ALL_TEXT) readonly showAllText$: Observable<string>,\n ) {}\n\n get hasExtraItems(): boolean {\n return !!this.max && (this.items?.length ?? 0) > this.max;\n }\n\n toggle(): void {\n this.hidden = !this.hidden;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiFocusVisibleModule, TuiItemDirective, TuiItemModule} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiExpandModule,\n TuiGroupModule,\n TuiLoaderModule,\n TuiSvgModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiFileComponent} from './file/file.component';\nimport {TuiFilesComponent} from './files.component';\n\n@NgModule({\n declarations: [TuiFilesComponent, TuiFileComponent],\n imports: [\n CommonModule,\n TuiGroupModule,\n TuiLoaderModule,\n PolymorpheusModule,\n TuiSvgModule,\n TuiFocusVisibleModule,\n TuiButtonModule,\n TuiItemModule,\n TuiExpandModule,\n ],\n exports: [TuiFilesComponent, TuiFileComponent, TuiItemDirective],\n})\nexport class TuiFilesModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsBA;;IAkCI,0BACoC,QAAiB,EACV,SAAuB,EAErD,UAAiD,EAEzC,MAA4C;QAL7B,aAAQ,GAAR,QAAQ,CAAS;QACV,cAAS,GAAT,SAAS,CAAc;QAErD,eAAU,GAAV,UAAU,CAAuC;QAEzC,WAAM,GAAN,MAAM,CAAsC;QA9BjE,SAAI,GAAgB,EAAC,IAAI,EAAE,EAAE,EAAC,CAAC;QAI/B,UAAK,GAAkB,QAAQ,CAAC;QAIhC,SAAI,GAAa,GAAG,CAAC;QAIrB,aAAQ,GAAG,IAAI,CAAC;QAIhB,gBAAW,GAAwB,EAAE,CAAC;QAG7B,YAAO,GAAG,IAAI,YAAY,EAAQ,CAAC;QAG5C,YAAO,GAAG,KAAK,CAAC;KASZ;IAEJ,sBAAI,qCAAO;aAAX;YACI,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;SAC1E;;;OAAA;IAED,sBAAI,mCAAK;aAAT;YACI,OAAO,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC;SAC5B;;;OAAA;IAED,sBAAI,uCAAS;aAAb;YACI,OAAO,IAAI,CAAC,KAAK,6BAA0B;SAC9C;;;OAAA;IAED,sBAAI,qCAAO;aAAX;YACI,OAAO,IAAI,CAAC,KAAK,yBAAwB;SAC5C;;;OAAA;IAED,sBAAI,uCAAS;aAAb;YACI,OAAO,IAAI,CAAC,KAAK,6BAA0B;SAC9C;;;OAAA;IAED,sBAAI,yCAAW;aAAf;YACI,OAAO,CAAC,CAAC,IAA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AAC;KAC9B;;gBAV8C,UAAU,uBAApD,MAAM,SAAC,aAAa;gBAC6B,UAAU,uBAA3D,MAAM,SAAC,iBAAiB;;IAV7B;QADC,eAAe,CAAC,gBAAgB,EAAE,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;oDACuB;IAI9E;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;kDACT;IANC,iBAAiB;QAP7B,SAAS,CAAC;YACP,QAAQ,EAAE,WAAW;YACrB,iqCAAqC;YAErC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;;SACxC,CAAC;QAYO,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;QACrB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;OAZrB,iBAAiB,CAsB7B;IAAD,wBAAC;CAtBD;;;ICSA;KAA8B;IAAjB,cAAc;QAf1B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACnD,OAAO,EAAE;gBACL,YAAY;gBACZ,cAAc;gBACd,eAAe;gBACf,kBAAkB;gBAClB,YAAY;gBACZ,qBAAqB;gBACrB,eAAe;gBACf,aAAa;gBACb,eAAe;aAClB;YACD,OAAO,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;SACnE,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAA9B;;AC9BA;;;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-files.js","sources":["ng://@taiga-ui/kit/components/files/file/file.component.ts","ng://@taiga-ui/kit/components/files/files.component.ts","ng://@taiga-ui/kit/components/files/files.module.ts","ng://@taiga-ui/kit/components/files/taiga-ui-kit-components-files.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {DomSanitizer, SafeValue} from '@angular/platform-browser';\nimport {TUI_IS_MOBILE, tuiDefaultProp, tuiIsObserved, tuiPure} from '@taiga-ui/cdk';\nimport {TuiSizeL} from '@taiga-ui/core';\nimport {TuiFileState, TuiFileStateT} from '@taiga-ui/kit/enums';\nimport {TuiFileLike} from '@taiga-ui/kit/interfaces';\nimport {TUI_DIGITAL_INFORMATION_UNITS, TUI_FILE_TEXTS} from '@taiga-ui/kit/tokens';\nimport {formatSize} from '@taiga-ui/kit/utils/files';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\ntype FileTexts = 'loadingError' | 'preview' | 'remove';\n\n// @dynamic\n@Component({\n selector: `tui-file`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: `./file.template.html`,\n styleUrls: [`./file.style.less`],\n})\nexport class TuiFileComponent {\n @Input()\n @tuiDefaultProp()\n file: TuiFileLike = {name: ``};\n\n @Input()\n @tuiDefaultProp()\n state: TuiFileStateT = `normal`;\n\n @Input()\n @tuiDefaultProp()\n size: TuiSizeL = `m`;\n\n @Input()\n @tuiDefaultProp()\n showSize = true;\n\n @Input()\n @tuiDefaultProp()\n leftContent: PolymorpheusContent = ``;\n\n @Output()\n readonly removed = new EventEmitter<void>();\n\n @HostBinding(`class._focused`)\n focused = false;\n\n constructor(\n @Inject(TUI_IS_MOBILE) readonly isMobile: boolean,\n @Inject(DomSanitizer) private readonly sanitizer: DomSanitizer,\n @Inject(TUI_FILE_TEXTS)\n readonly fileTexts$: Observable<Record<FileTexts, string>>,\n @Inject(TUI_DIGITAL_INFORMATION_UNITS)\n private readonly units$: Observable<[string, string, string]>,\n ) {}\n\n get preview(): SafeValue {\n return this.isBig ? this.createPreview(this.file, this.sanitizer) : ``;\n }\n\n get isBig(): boolean {\n return this.size === `l`;\n }\n\n get isLoading(): boolean {\n return this.state === TuiFileState.Loading;\n }\n\n get isError(): boolean {\n return this.state === TuiFileState.Error;\n }\n\n get isDeleted(): boolean {\n return this.state === TuiFileState.Deleted;\n }\n\n get allowDelete(): boolean {\n return tuiIsObserved(this.removed);\n }\n\n get icon(): string {\n if (this.state === TuiFileState.Normal && this.isBig) {\n return `tuiIconDefaultDocLarge`;\n }\n\n switch (this.state) {\n case TuiFileState.Deleted:\n return `tuiIconTrashLarge`;\n case TuiFileState.Error:\n return `tuiIconAlertCircleLarge`;\n default:\n return `tuiIconCheckCircleLarge`;\n }\n }\n\n @HostBinding(`class._link`)\n get src(): string {\n return this.file.src || ``;\n }\n\n get name(): string {\n return this.getName(this.file);\n }\n\n get type(): string {\n return this.getType(this.file);\n }\n\n get content$(): Observable<PolymorpheusContent> {\n return this.calculateContent$(this.state, this.file, this.fileTexts$);\n }\n\n get fileSize$(): Observable<string | null> {\n return this.calculateFileSize$(this.file, this.units$);\n }\n\n onRemoveClick(): void {\n this.removed.emit();\n }\n\n onFocusVisible(focusVisible: boolean): void {\n this.focused = focusVisible;\n }\n\n @tuiPure\n private calculateContent$(\n state: TuiFileStateT,\n file: TuiFileLike,\n fileTexts$: Observable<Record<'loadingError' | 'preview' | 'remove', string>>,\n ): Observable<PolymorpheusContent> {\n return state === TuiFileState.Error && !file.content\n ? fileTexts$.pipe(map(texts => texts.loadingError))\n : of(this.file.content || ``);\n }\n\n @tuiPure\n private calculateFileSize$(\n file: TuiFileLike,\n units$: Observable<[string, string, string]>,\n ): Observable<string | null> {\n return units$.pipe(map(units => formatSize(units, file.size)));\n }\n\n @tuiPure\n private createPreview(file: TuiFileLike, sanitizer: DomSanitizer): SafeValue {\n if (file.src) {\n return file.src;\n }\n\n // TODO: iframe warning\n if (file instanceof File && file.type && file.type.startsWith(`image/`)) {\n return sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file));\n }\n\n return ``;\n }\n\n @tuiPure\n private getName(file: TuiFileLike): string {\n return file.name.split(`.`).slice(0, -1).join(`.`);\n }\n\n @tuiPure\n private getType(file: TuiFileLike): string {\n return `.${file.name.split(`.`).pop()}` || ``;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n Inject,\n Input,\n QueryList,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiDefaultProp, TuiItemDirective} from '@taiga-ui/cdk';\nimport {TUI_HIDE_TEXT, TUI_SHOW_ALL_TEXT} from '@taiga-ui/kit/tokens';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: `tui-files`,\n templateUrl: `./files.component.html`,\n styleUrls: [`./files.component.less`],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiFilesComponent {\n @ContentChildren(TuiItemDirective, {read: TemplateRef})\n readonly items: QueryList<TemplateRef<Record<string, unknown>>> | null = null;\n\n @Input()\n @tuiDefaultProp()\n max = 0;\n\n hidden = true;\n\n constructor(\n @Inject(TUI_HIDE_TEXT) readonly hideText$: Observable<string>,\n @Inject(TUI_SHOW_ALL_TEXT) readonly showAllText$: Observable<string>,\n ) {}\n\n get hasExtraItems(): boolean {\n return !!this.max && (this.items?.length ?? 0) > this.max;\n }\n\n toggle(): void {\n this.hidden = !this.hidden;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiFocusVisibleModule, TuiItemDirective, TuiItemModule} from '@taiga-ui/cdk';\nimport {\n TuiButtonModule,\n TuiExpandModule,\n TuiGroupModule,\n TuiLoaderModule,\n TuiSvgModule,\n} from '@taiga-ui/core';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiFileComponent} from './file/file.component';\nimport {TuiFilesComponent} from './files.component';\n\n@NgModule({\n declarations: [TuiFilesComponent, TuiFileComponent],\n imports: [\n CommonModule,\n TuiGroupModule,\n TuiLoaderModule,\n PolymorpheusModule,\n TuiSvgModule,\n TuiFocusVisibleModule,\n TuiButtonModule,\n TuiItemModule,\n TuiExpandModule,\n ],\n exports: [TuiFilesComponent, TuiFileComponent, TuiItemDirective],\n})\nexport class TuiFilesModule {}\n","/**\n * Generated bundle index. Do not edit.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AAK,EAAE;QACP,cAAc,EAAE;kDACT;IANC,iBAAiB;QAP7B,SAAS,CAAC;YACP,QAAQ,EAAE,WAAW;YACrB,iqCAAqC;YAErC,eAAe,EAAE,uBAAuB,CAAC,MAAM;YAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;;SACxC,CAAC;QAYO,WAAA,MAAM,CAAC,aAAa,CAAC,CAAA;QACrB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;OAZrB,iBAAiB,CAsB7B;IAAD,wBAAC;CAtBD;;;ICSA;KAA8B;IAAjB,cAAc;QAf1B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACnD,OAAO,EAAE;gBACL,YAAY;gBACZ,cAAc;gBACd,eAAe;gBACf,kBAAkB;gBAClB,YAAY;gBACZ,qBAAqB;gBACrB,eAAe;gBACf,aAAa;gBACb,eAAe;aAClB;YACD,OAAO,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;SACnE,CAAC;OACW,cAAc,CAAG;IAAD,qBAAC;CAA9B;;AC9BA;;;;;;"}
@@ -246,7 +246,7 @@ var COUNTRIES = (_a = {},
246
246
  _a[TuiCountryIsoCode$1.VN] = { mask: "+84(###) ####-###", name: "\u0412\u044C\u0435\u0442\u043D\u0430\u043C" },
247
247
  _a[TuiCountryIsoCode$1.VU] = { mask: "+678##-#####", name: "\u0412\u0430\u043D\u0443\u0430\u0442\u0443 " },
248
248
  _a[TuiCountryIsoCode$1.WS] = { mask: "+685##-####", name: "\u0421\u0430\u043C\u043E\u0430" },
249
- _a[TuiCountryIsoCode$1.XK] = { mask: "+383##-###-###", name: "\u0420\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u041A\u043E\u0441\u043E\u0432\u043E" },
249
+ _a[TuiCountryIsoCode$1.XK] = { mask: "+383##-###-###", name: "\u041A\u043E\u0441\u043E\u0432\u043E" },
250
250
  _a[TuiCountryIsoCode$1.YE] = { mask: "+967###-###-###", name: "\u0419\u0435\u043C\u0435\u043D " },
251
251
  _a[TuiCountryIsoCode$1.ZA] = { mask: "+27##-###-####", name: "\u042E\u0436\u043D\u043E-\u0410\u0444\u0440\u0438\u043A\u0430\u043D\u0441\u043A\u0430\u044F \u0420\u0435\u0441\u043F." },
252
252
  _a[TuiCountryIsoCode$1.ZM] = { mask: "+260##-###-####", name: "\u0417\u0430\u043C\u0431\u0438\u044F" },