@taiga-ui/core 4.52.0-canary.a59c4d0 → 4.52.0-canary.bf9131e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/alert/alert.component.d.ts +3 -3
- package/components/alert/alert.interfaces.d.ts +2 -3
- package/components/alert/alert.service.d.ts +3 -2
- package/components/alert/alert.tokens.d.ts +1 -7
- package/components/alert/index.d.ts +0 -1
- package/components/data-list/data-list.component.d.ts +1 -1
- package/components/dialog/dialog.component.d.ts +1 -1
- package/components/dialog/dialog.directive.d.ts +4 -3
- package/components/dialog/dialog.service.d.ts +5 -2
- package/components/error/error.component.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/components/loader/loader.component.d.ts +7 -7
- package/components/modal/index.d.ts +2 -0
- package/components/modal/modal.component.d.ts +17 -0
- package/components/modal/modal.service.d.ts +13 -0
- package/components/spin-button/spin-button.component.d.ts +8 -9
- package/components/textfield/textfield.component.d.ts +1 -1
- package/components/textfield/textfield.directive.d.ts +1 -1
- package/components/textfield/textfield.options.d.ts +8 -11
- package/directives/dropdown/dropdown.directive.d.ts +1 -2
- package/directives/hint/hint-describe.directive.d.ts +4 -6
- package/directives/hint/hint-host.directive.d.ts +2 -2
- package/directives/hint/hint-hover.directive.d.ts +3 -4
- package/directives/hint/hint-manual.directive.d.ts +2 -2
- package/directives/hint/hint-overflow.directive.d.ts +2 -2
- package/directives/hint/hint-position.directive.d.ts +4 -5
- package/directives/hint/hint-unstyled.component.d.ts +2 -7
- package/directives/hint/hint.component.d.ts +7 -6
- package/directives/hint/hint.directive.d.ts +9 -11
- package/directives/hint/index.d.ts +0 -2
- package/directives/index.d.ts +1 -0
- package/directives/notification/index.d.ts +2 -0
- package/directives/notification/notification.directive.d.ts +11 -0
- package/directives/notification/notification.service.d.ts +12 -0
- package/fesm2022/taiga-ui-core-components-alert.mjs +40 -93
- package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs +2 -1
- package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-data-list.mjs +3 -3
- package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-dialog.mjs +31 -19
- package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-error.mjs +2 -2
- package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-loader.mjs +12 -25
- package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-modal.mjs +89 -0
- package/fesm2022/taiga-ui-core-components-modal.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-components-root.mjs +3 -5
- package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-spin-button.mjs +14 -27
- package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components-textfield.mjs +15 -28
- package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-components.mjs +1 -0
- package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-hint.mjs +94 -182
- package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +2 -2
- package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives-notification.mjs +73 -0
- package/fesm2022/taiga-ui-core-directives-notification.mjs.map +1 -0
- package/fesm2022/taiga-ui-core-directives-popup.mjs +2 -3
- package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-directives.mjs +1 -0
- package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs +2 -1
- package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +1 -1
- package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
- package/package.json +9 -1
- package/styles/mixins/mixins.less +0 -8
- package/styles/mixins/mixins.scss +0 -8
- package/tokens/i18n.d.ts +7 -7
- package/types/index.d.ts +0 -1
- package/components/alert/alerts.component.d.ts +0 -12
- package/directives/hint/hint.service.d.ts +0 -13
- package/directives/hint/hints.component.d.ts +0 -12
- package/types/portal-item.d.ts +0 -9
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken,
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
|
+
import { InjectionToken, Directive, Optional, Self, SkipSelf, inject, Input, input, output, INJECTOR, ChangeDetectionStrategy, Component, TemplateRef, signal, computed } from '@angular/core';
|
|
4
|
+
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { EMPTY_CLIENT_RECT } from '@taiga-ui/cdk/constants';
|
|
6
|
+
import * as i3 from '@taiga-ui/cdk/directives/active-zone';
|
|
7
|
+
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
6
8
|
import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
7
|
-
import { TuiAnimated
|
|
9
|
+
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
8
10
|
import { TuiHoveredService } from '@taiga-ui/cdk/directives/hovered';
|
|
9
11
|
import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
|
|
10
12
|
import { tuiInjectElement, tuiPointToClientRect } from '@taiga-ui/cdk/utils/dom';
|
|
11
13
|
import { tuiClamp } from '@taiga-ui/cdk/utils/math';
|
|
12
|
-
import { tuiProvide, tuiPure, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
14
|
+
import { tuiProvide, tuiPure, tuiSetSignal, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
13
15
|
import { TuiDriverDirective, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsRectAccessor, tuiAsVehicle, tuiPositionAccessorFor, tuiRectAccessorFor } from '@taiga-ui/core/classes';
|
|
14
16
|
import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
|
|
15
17
|
import * as i1 from '@taiga-ui/core/directives/appearance';
|
|
@@ -17,11 +19,11 @@ import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearan
|
|
|
17
19
|
import { TuiPositionService, TuiVisualViewportService } from '@taiga-ui/core/services';
|
|
18
20
|
import { TUI_VIEWPORT } from '@taiga-ui/core/tokens';
|
|
19
21
|
import { tuiOverrideOptions, tuiIsObscured } from '@taiga-ui/core/utils';
|
|
20
|
-
import { PolymorpheusComponent,
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
22
|
+
import { PolymorpheusComponent, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
23
|
+
import { Subject, merge, switchMap, of, delay, takeUntil, repeat, filter, map, tap, takeWhile, distinctUntilChanged, fromEvent, debounce, timer, startWith, skip, BehaviorSubject } from 'rxjs';
|
|
24
|
+
import { TuiPopupService } from '@taiga-ui/core/directives/popup';
|
|
23
25
|
import { DOCUMENT } from '@angular/common';
|
|
24
|
-
import { tuiIfMap, tuiTypedFromEvent,
|
|
26
|
+
import { tuiIfMap, tuiTypedFromEvent, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
|
|
25
27
|
import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
|
|
26
28
|
|
|
27
29
|
/**
|
|
@@ -31,31 +33,6 @@ const TUI_HINT_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_HINT_COMPONENT' :
|
|
|
31
33
|
factory: () => TuiHintComponent,
|
|
32
34
|
});
|
|
33
35
|
|
|
34
|
-
/**
|
|
35
|
-
* Service for displaying hints/tooltips
|
|
36
|
-
*/
|
|
37
|
-
class TuiHintService extends BehaviorSubject {
|
|
38
|
-
constructor() {
|
|
39
|
-
super([]);
|
|
40
|
-
}
|
|
41
|
-
add(directive) {
|
|
42
|
-
this.next(this.value.concat(directive));
|
|
43
|
-
}
|
|
44
|
-
remove(directive) {
|
|
45
|
-
if (this.value.includes(directive)) {
|
|
46
|
-
this.next(this.value.filter((hint) => hint !== directive));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
50
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, providedIn: 'root' }); }
|
|
51
|
-
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, decorators: [{
|
|
53
|
-
type: Injectable,
|
|
54
|
-
args: [{
|
|
55
|
-
providedIn: 'root',
|
|
56
|
-
}]
|
|
57
|
-
}], ctorParameters: () => [] });
|
|
58
|
-
|
|
59
36
|
class TuiHintDriver extends TuiDriverDirective {
|
|
60
37
|
constructor() {
|
|
61
38
|
super(...arguments);
|
|
@@ -65,10 +42,7 @@ class TuiHintDriver extends TuiDriverDirective {
|
|
|
65
42
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintDriver, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
66
43
|
}
|
|
67
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDriver, decorators: [{
|
|
68
|
-
type: Directive
|
|
69
|
-
args: [{
|
|
70
|
-
standalone: true,
|
|
71
|
-
}]
|
|
45
|
+
type: Directive
|
|
72
46
|
}] });
|
|
73
47
|
|
|
74
48
|
const TUI_HINT_DIRECTIONS = [
|
|
@@ -160,11 +134,11 @@ class TuiHintHover extends TuiDriver {
|
|
|
160
134
|
this.options = inject(TUI_HINT_OPTIONS);
|
|
161
135
|
this.visible = false;
|
|
162
136
|
this.toggle$ = new Subject();
|
|
163
|
-
this.stream$ = merge(this.toggle$.pipe(switchMap((
|
|
164
|
-
? of(
|
|
165
|
-
: of(
|
|
166
|
-
? of(
|
|
167
|
-
: of(
|
|
137
|
+
this.stream$ = merge(this.toggle$.pipe(switchMap((show) => this.isMobile
|
|
138
|
+
? of(show)
|
|
139
|
+
: of(show).pipe(delay(show ? 0 : this.hideDelay()))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((show) => this.isMobile
|
|
140
|
+
? of(show)
|
|
141
|
+
: of(show).pipe(delay(show ? this.showDelay() : this.hideDelay()))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
|
|
168
142
|
(this.el.hasAttribute('tuiHintPointer') || !tuiIsObscured(this.el))), tap((visible) => {
|
|
169
143
|
this.visible = visible;
|
|
170
144
|
}));
|
|
@@ -172,8 +146,12 @@ class TuiHintHover extends TuiDriver {
|
|
|
172
146
|
optional: true,
|
|
173
147
|
skipSelf: true,
|
|
174
148
|
});
|
|
175
|
-
this.
|
|
176
|
-
|
|
149
|
+
this.showDelay = input(this.options.showDelay, {
|
|
150
|
+
alias: 'tuiHintShowDelay',
|
|
151
|
+
});
|
|
152
|
+
this.hideDelay = input(this.options.hideDelay, {
|
|
153
|
+
alias: 'tuiHintHideDelay',
|
|
154
|
+
});
|
|
177
155
|
this.type = 'hint';
|
|
178
156
|
this.enabled = true;
|
|
179
157
|
}
|
|
@@ -185,20 +163,15 @@ class TuiHintHover extends TuiDriver {
|
|
|
185
163
|
this.toggle$.next(false);
|
|
186
164
|
}
|
|
187
165
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
188
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
166
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintHover, isStandalone: true, inputs: { showDelay: { classPropertyName: "showDelay", publicName: "tuiHintShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "tuiHintHideDelay", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintHover), TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0 }); }
|
|
189
167
|
}
|
|
190
168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, decorators: [{
|
|
191
169
|
type: Directive,
|
|
192
170
|
args: [{
|
|
193
|
-
standalone: true,
|
|
194
171
|
providers: [tuiAsDriver(TuiHintHover), TuiHoveredService],
|
|
195
172
|
exportAs: 'tuiHintHover',
|
|
196
173
|
}]
|
|
197
|
-
}], ctorParameters: () => []
|
|
198
|
-
type: Input
|
|
199
|
-
}], tuiHintHideDelay: [{
|
|
200
|
-
type: Input
|
|
201
|
-
}] } });
|
|
174
|
+
}], ctorParameters: () => [] });
|
|
202
175
|
|
|
203
176
|
const GAP$1 = 8;
|
|
204
177
|
const ARROW_OFFSET = 24;
|
|
@@ -212,14 +185,19 @@ class TuiHintPosition extends TuiPositionAccessor {
|
|
|
212
185
|
this.viewport = inject(TUI_VIEWPORT);
|
|
213
186
|
this.accessor = tuiFallbackAccessor('hint')(inject(TuiRectAccessor), inject(TuiHintDirective));
|
|
214
187
|
this.points = TUI_HINT_DIRECTIONS.reduce((acc, direction) => ({ ...acc, [direction]: [0, 0] }), {});
|
|
215
|
-
this.direction = inject(TUI_HINT_OPTIONS).direction
|
|
216
|
-
|
|
188
|
+
this.direction = input(inject(TUI_HINT_OPTIONS).direction, {
|
|
189
|
+
alias: 'tuiHintDirection',
|
|
190
|
+
});
|
|
191
|
+
this.directionChange = output({
|
|
192
|
+
alias: 'tuiHintDirectionChange',
|
|
193
|
+
});
|
|
217
194
|
this.type = 'hint';
|
|
218
195
|
}
|
|
219
196
|
emitDirection(direction) {
|
|
220
197
|
this.directionChange.emit(direction);
|
|
221
198
|
}
|
|
222
199
|
getPosition(rect, el) {
|
|
200
|
+
const direction = this.direction();
|
|
223
201
|
const width = el?.clientWidth ?? rect.width;
|
|
224
202
|
const height = el?.clientHeight ?? rect.height;
|
|
225
203
|
const hostRect = this.accessor.getClientRect() ?? EMPTY_CLIENT_RECT;
|
|
@@ -250,14 +228,14 @@ class TuiHintPosition extends TuiPositionAccessor {
|
|
|
250
228
|
this.points.right[LEFT] = this.points['right-top'][LEFT];
|
|
251
229
|
this.points['right-bottom'][TOP] = this.points['left-bottom'][TOP];
|
|
252
230
|
this.points['right-bottom'][LEFT] = this.points['right-top'][LEFT];
|
|
253
|
-
const array = Array.isArray(
|
|
231
|
+
const array = Array.isArray(direction) ? direction : [direction];
|
|
254
232
|
const priority = array.map((direction) => adjust(direction, rtl));
|
|
255
|
-
const
|
|
233
|
+
const updated = priority
|
|
256
234
|
.concat(TUI_HINT_DIRECTIONS)
|
|
257
235
|
.find((dir) => this.checkPosition(this.points[dir], width, height)) ||
|
|
258
236
|
this.fallback;
|
|
259
|
-
this.emitDirection(adjust(
|
|
260
|
-
return this.points[
|
|
237
|
+
this.emitDirection(adjust(updated, rtl));
|
|
238
|
+
return this.points[updated];
|
|
261
239
|
}
|
|
262
240
|
get fallback() {
|
|
263
241
|
return this.points.top[TOP] >
|
|
@@ -273,23 +251,14 @@ class TuiHintPosition extends TuiPositionAccessor {
|
|
|
273
251
|
left + width < viewport.right - GAP$1);
|
|
274
252
|
}
|
|
275
253
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
276
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
254
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintPosition, isStandalone: true, inputs: { direction: { classPropertyName: "direction", publicName: "tuiHintDirection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { directionChange: "tuiHintDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
277
255
|
}
|
|
278
256
|
__decorate([
|
|
279
257
|
tuiPure
|
|
280
258
|
], TuiHintPosition.prototype, "emitDirection", null);
|
|
281
259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, decorators: [{
|
|
282
|
-
type: Directive
|
|
283
|
-
|
|
284
|
-
standalone: true,
|
|
285
|
-
}]
|
|
286
|
-
}], propDecorators: { direction: [{
|
|
287
|
-
type: Input,
|
|
288
|
-
args: ['tuiHintDirection']
|
|
289
|
-
}], directionChange: [{
|
|
290
|
-
type: Output,
|
|
291
|
-
args: ['tuiHintDirectionChange']
|
|
292
|
-
}], emitDirection: [] } });
|
|
260
|
+
type: Directive
|
|
261
|
+
}], propDecorators: { emitDirection: [] } });
|
|
293
262
|
function adjust(direction, rtl) {
|
|
294
263
|
if (rtl && direction.includes('left')) {
|
|
295
264
|
return direction.replace('left', 'right');
|
|
@@ -302,18 +271,19 @@ function adjust(direction, rtl) {
|
|
|
302
271
|
|
|
303
272
|
class TuiHintDirective {
|
|
304
273
|
constructor() {
|
|
305
|
-
this.service = inject(
|
|
306
|
-
this.
|
|
307
|
-
this.
|
|
308
|
-
this.
|
|
274
|
+
this.service = inject(TuiPopupService);
|
|
275
|
+
this.content = input(null, { alias: 'tuiHint' });
|
|
276
|
+
this.context = input(undefined, { alias: 'tuiHintContext' });
|
|
277
|
+
this.appearance = input(inject(TUI_HINT_OPTIONS).appearance, {
|
|
278
|
+
alias: 'tuiHintAppearance',
|
|
279
|
+
});
|
|
280
|
+
this.visible = output({ alias: 'tuiHintVisible' });
|
|
309
281
|
this.component = inject((PolymorpheusComponent));
|
|
310
282
|
this.el = tuiInjectElement();
|
|
311
|
-
this.activeZone = inject(TuiActiveZone, { optional: true });
|
|
312
283
|
this.type = 'hint';
|
|
313
284
|
}
|
|
314
|
-
|
|
315
|
-
this.content
|
|
316
|
-
if (!content) {
|
|
285
|
+
ngOnChanges() {
|
|
286
|
+
if (!this.content()) {
|
|
317
287
|
this.toggle(false);
|
|
318
288
|
}
|
|
319
289
|
}
|
|
@@ -324,16 +294,18 @@ class TuiHintDirective {
|
|
|
324
294
|
return this.el.getBoundingClientRect();
|
|
325
295
|
}
|
|
326
296
|
toggle(show) {
|
|
327
|
-
if (show && this.content()) {
|
|
328
|
-
this.service.add(this);
|
|
297
|
+
if (show && this.content() && !this.ref) {
|
|
298
|
+
this.ref = this.service.add(this.component);
|
|
299
|
+
this.visible.emit(true);
|
|
329
300
|
}
|
|
330
|
-
else {
|
|
331
|
-
this.
|
|
301
|
+
else if (this.ref) {
|
|
302
|
+
this.ref.destroy();
|
|
303
|
+
this.ref = undefined;
|
|
304
|
+
this.visible.emit(false);
|
|
332
305
|
}
|
|
333
|
-
this.visible.emit(show);
|
|
334
306
|
}
|
|
335
307
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
336
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
308
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintDirective, isStandalone: true, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: { content: { classPropertyName: "content", publicName: "tuiHint", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "tuiHintContext", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "tuiHintAppearance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "tuiHintVisible" }, providers: [
|
|
337
309
|
tuiAsRectAccessor(TuiHintDirective),
|
|
338
310
|
tuiAsVehicle(TuiHintDirective),
|
|
339
311
|
{
|
|
@@ -341,12 +313,11 @@ class TuiHintDirective {
|
|
|
341
313
|
deps: [TUI_HINT_COMPONENT, INJECTOR],
|
|
342
314
|
useClass: PolymorpheusComponent,
|
|
343
315
|
},
|
|
344
|
-
], hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
|
|
316
|
+
], usesOnChanges: true, hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
|
|
345
317
|
}
|
|
346
318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, decorators: [{
|
|
347
319
|
type: Directive,
|
|
348
320
|
args: [{
|
|
349
|
-
standalone: true,
|
|
350
321
|
selector: '[tuiHint]:not(ng-container):not(ng-template)',
|
|
351
322
|
providers: [
|
|
352
323
|
tuiAsRectAccessor(TuiHintDirective),
|
|
@@ -370,18 +341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
370
341
|
},
|
|
371
342
|
],
|
|
372
343
|
}]
|
|
373
|
-
}]
|
|
374
|
-
type: Input,
|
|
375
|
-
args: ['tuiHintContext']
|
|
376
|
-
}], appearance: [{
|
|
377
|
-
type: Input,
|
|
378
|
-
args: ['tuiHintAppearance']
|
|
379
|
-
}], visible: [{
|
|
380
|
-
type: Output,
|
|
381
|
-
args: ['tuiHintVisible']
|
|
382
|
-
}], tuiHint: [{
|
|
383
|
-
type: Input
|
|
384
|
-
}] } });
|
|
344
|
+
}] });
|
|
385
345
|
|
|
386
346
|
class TuiHintPointer extends TuiHintHover {
|
|
387
347
|
constructor() {
|
|
@@ -400,7 +360,6 @@ class TuiHintPointer extends TuiHintHover {
|
|
|
400
360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPointer, decorators: [{
|
|
401
361
|
type: Directive,
|
|
402
362
|
args: [{
|
|
403
|
-
standalone: true,
|
|
404
363
|
selector: '[tuiHint][tuiHintPointer]',
|
|
405
364
|
providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)],
|
|
406
365
|
host: {
|
|
@@ -411,24 +370,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
411
370
|
|
|
412
371
|
class TuiHintUnstyledComponent {
|
|
413
372
|
constructor() {
|
|
414
|
-
this.
|
|
373
|
+
this.hint = inject(TuiHintDirective);
|
|
415
374
|
}
|
|
416
375
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
417
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyledComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<ng-container *polymorpheusOutlet="
|
|
376
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyledComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<ng-container *polymorpheusOutlet="hint.content()" />', isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
418
377
|
}
|
|
419
378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, decorators: [{
|
|
420
379
|
type: Component,
|
|
421
380
|
args: [{
|
|
422
381
|
imports: [PolymorpheusOutlet],
|
|
423
|
-
template: '<ng-container *polymorpheusOutlet="
|
|
382
|
+
template: '<ng-container *polymorpheusOutlet="hint.content()" />',
|
|
424
383
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
425
384
|
}]
|
|
426
385
|
}] });
|
|
427
386
|
class TuiHintUnstyled {
|
|
428
387
|
constructor() {
|
|
429
388
|
const hint = inject((TuiHintDirective));
|
|
430
|
-
hint.
|
|
431
|
-
hint.
|
|
389
|
+
tuiSetSignal(hint.content, inject((TemplateRef)));
|
|
390
|
+
hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent, inject(INJECTOR));
|
|
432
391
|
}
|
|
433
392
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
434
393
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyled, isStandalone: true, selector: "ng-template[tuiHint]", ngImport: i0 }); }
|
|
@@ -436,7 +395,6 @@ class TuiHintUnstyled {
|
|
|
436
395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, decorators: [{
|
|
437
396
|
type: Directive,
|
|
438
397
|
args: [{
|
|
439
|
-
standalone: true,
|
|
440
398
|
selector: 'ng-template[tuiHint]',
|
|
441
399
|
}]
|
|
442
400
|
}], ctorParameters: () => [] });
|
|
@@ -456,7 +414,7 @@ class TuiHintComponent {
|
|
|
456
414
|
this.viewport = inject(TUI_VIEWPORT);
|
|
457
415
|
this.pointer = inject(TuiHintPointer, { optional: true });
|
|
458
416
|
this.accessor = inject(TuiRectAccessor);
|
|
459
|
-
this.hint =
|
|
417
|
+
this.hint = inject(TuiHintDirective);
|
|
460
418
|
this.isMobile = inject(TUI_IS_MOBILE);
|
|
461
419
|
this.content = this.hint.component.component === TuiHintUnstyledComponent
|
|
462
420
|
? signal('')
|
|
@@ -503,13 +461,13 @@ class TuiHintComponent {
|
|
|
503
461
|
this.apply(tuiPx(Math.round(top)), tuiPx(Math.round(safeLeft)), Math.round((tuiClamp(beakTop, 0, clientHeight) / clientHeight) * 100), Math.round((tuiClamp(beakLeft, 0, clientWidth) / clientWidth) * 100));
|
|
504
462
|
}
|
|
505
463
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
506
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.tuiTheme": "theme" } }, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiAnimated }], ngImport: i0, template: `
|
|
464
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", host: { attributes: { "role": "tooltip" }, listeners: { "document:click": "onClick($event.target)" }, properties: { "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.tuiTheme": "theme" } }, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [{ directive: i1.TuiAppearance }, { directive: i2.TuiAnimated }, { directive: i3.TuiActiveZone }], ngImport: i0, template: `
|
|
507
465
|
<ng-content />
|
|
508
466
|
<span
|
|
509
|
-
*polymorpheusOutlet="content() as text; context: hint.context"
|
|
467
|
+
*polymorpheusOutlet="content() as text; context: hint.context()"
|
|
510
468
|
[innerHTML]="text"
|
|
511
469
|
></span>
|
|
512
|
-
`, isInline: true, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
470
|
+
`, isInline: true, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transition:none;transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
513
471
|
}
|
|
514
472
|
__decorate([
|
|
515
473
|
tuiPure
|
|
@@ -519,15 +477,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
519
477
|
args: [{ selector: 'tui-hint', imports: [PolymorpheusOutlet], template: `
|
|
520
478
|
<ng-content />
|
|
521
479
|
<span
|
|
522
|
-
*polymorpheusOutlet="content() as text; context: hint.context"
|
|
480
|
+
*polymorpheusOutlet="content() as text; context: hint.context()"
|
|
523
481
|
[innerHTML]="text"
|
|
524
482
|
></span>
|
|
525
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated], host: {
|
|
483
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated, TuiActiveZone], host: {
|
|
484
|
+
role: 'tooltip',
|
|
526
485
|
'[class._untouchable]': 'pointer',
|
|
527
486
|
'[class._mobile]': 'isMobile',
|
|
528
487
|
'[attr.tuiTheme]': 'theme',
|
|
529
488
|
'(document:click)': 'onClick($event.target)',
|
|
530
|
-
}, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"] }]
|
|
489
|
+
}, styles: [":host{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-font-text-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade}:host :host-context(tui-root._mobile).tui-enter{animation:tuiFade var(--tui-duration) ease-in-out,tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}:host :host-context(tui-root._mobile).tui-leave{animation:tuiFade var(--tui-duration) ease-in-out reverse,tuiScale var(--tui-duration) ease-in-out reverse}:host:before{content:\"\";position:absolute;top:var(--t-top);left:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox=\"0 0 12 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z\" /></svg>');transition:none;transform:translate(-50%,-50%) rotate(var(--t-rotate))}:host._mobile{font:var(--tui-font-text-m)}:host._mobile:before{inline-size:1.5rem;block-size:1.125rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>');mask-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 18\"><path d=\"M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z\" /></svg>')}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}:host ::ng-deep [tuiTitle]{margin-block-end:.75rem}:host ::ng-deep [tuiTitle]+footer{margin-block-start:.75rem}:host ::ng-deep [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end;margin-inline-end:-.25rem}:host ::ng-deep img{display:block;border-radius:var(--tui-radius-m)}:host ::ng-deep footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}\n"] }]
|
|
531
490
|
}], ctorParameters: () => [], propDecorators: { apply: [] } });
|
|
532
491
|
|
|
533
492
|
class TuiHintDescribe extends TuiDriver {
|
|
@@ -535,107 +494,87 @@ class TuiHintDescribe extends TuiDriver {
|
|
|
535
494
|
super((subscriber) => this.stream$.subscribe(subscriber));
|
|
536
495
|
this.doc = inject(DOCUMENT);
|
|
537
496
|
this.el = tuiInjectElement();
|
|
538
|
-
this.
|
|
539
|
-
this.id
|
|
540
|
-
this.stream$ = this.id$.pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
|
|
541
|
-
? of(false)
|
|
542
|
-
: merge(tuiTypedFromEvent(this.doc, 'keyup'), tuiTypedFromEvent(this.element, 'blur')).pipe(map(() => this.focused))), debounce((visible) => visible ? timer(1000, tuiZonefreeScheduler(this.zone)) : of(null)), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized());
|
|
497
|
+
this.element = computed((id = this.id()) => id ? this.doc.querySelector(`#${id}`) || this.el : this.el);
|
|
498
|
+
this.id = input('', { alias: 'tuiHintDescribe' });
|
|
543
499
|
this.type = 'hint';
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}
|
|
548
|
-
get element() {
|
|
549
|
-
const id = this.id$.value;
|
|
550
|
-
return id ? this.doc.querySelector(`#${id}`) || this.el : this.el;
|
|
500
|
+
this.stream$ = toObservable(this.id).pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
|
|
501
|
+
? of(false)
|
|
502
|
+
: merge(tuiTypedFromEvent(this.doc, 'keyup'), tuiTypedFromEvent(this.element(), 'blur')).pipe(map(() => this.focused))), debounce((visible) => (visible ? timer(1000) : of(null))), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized());
|
|
551
503
|
}
|
|
552
504
|
get focused() {
|
|
553
|
-
return tuiIsFocused(this.element);
|
|
505
|
+
return tuiIsFocused(this.element());
|
|
554
506
|
}
|
|
555
507
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
556
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
508
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintDescribe, isStandalone: true, selector: "[tuiHintDescribe]", inputs: { id: { classPropertyName: "id", publicName: "tuiHintDescribe", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintDescribe)], usesInheritance: true, ngImport: i0 }); }
|
|
557
509
|
}
|
|
558
|
-
__decorate([
|
|
559
|
-
tuiPure
|
|
560
|
-
], TuiHintDescribe.prototype, "element", null);
|
|
561
510
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, decorators: [{
|
|
562
511
|
type: Directive,
|
|
563
512
|
args: [{
|
|
564
|
-
standalone: true,
|
|
565
513
|
selector: '[tuiHintDescribe]',
|
|
566
514
|
providers: [tuiAsDriver(TuiHintDescribe)],
|
|
567
515
|
}]
|
|
568
|
-
}], ctorParameters: () => []
|
|
569
|
-
type: Input
|
|
570
|
-
}], element: [] } });
|
|
516
|
+
}], ctorParameters: () => [] });
|
|
571
517
|
|
|
572
518
|
class TuiHintHost extends TuiRectAccessor {
|
|
573
519
|
constructor() {
|
|
574
520
|
super(...arguments);
|
|
521
|
+
this.tuiHintHost = input();
|
|
575
522
|
this.type = 'hint';
|
|
576
523
|
}
|
|
577
524
|
getClientRect() {
|
|
578
|
-
return this.tuiHintHost?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
|
|
525
|
+
return this.tuiHintHost()?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
|
|
579
526
|
}
|
|
580
527
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
581
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
528
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintHost, isStandalone: true, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: { classPropertyName: "tuiHintHost", publicName: "tuiHintHost", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsRectAccessor(TuiHintHost)], usesInheritance: true, ngImport: i0 }); }
|
|
582
529
|
}
|
|
583
530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, decorators: [{
|
|
584
531
|
type: Directive,
|
|
585
532
|
args: [{
|
|
586
|
-
standalone: true,
|
|
587
533
|
selector: '[tuiHint][tuiHintHost]',
|
|
588
534
|
providers: [tuiAsRectAccessor(TuiHintHost)],
|
|
589
535
|
}]
|
|
590
|
-
}]
|
|
591
|
-
type: Input
|
|
592
|
-
}] } });
|
|
536
|
+
}] });
|
|
593
537
|
|
|
594
538
|
class TuiHintManual extends TuiDriver {
|
|
595
539
|
constructor() {
|
|
596
540
|
super((subscriber) => this.stream$.subscribe(subscriber));
|
|
597
541
|
this.hover = inject(TuiHintHover);
|
|
598
542
|
this.stream$ = new BehaviorSubject(false);
|
|
599
|
-
this.
|
|
543
|
+
this.visible = input(false, { alias: 'tuiHintManual' });
|
|
600
544
|
this.type = 'hint';
|
|
601
545
|
this.hover.enabled = false;
|
|
602
546
|
}
|
|
603
547
|
ngOnChanges() {
|
|
604
|
-
this.stream$.next(!!this.
|
|
605
|
-
this.hover.enabled = this.
|
|
548
|
+
this.stream$.next(!!this.visible());
|
|
549
|
+
this.hover.enabled = this.visible() === null;
|
|
606
550
|
}
|
|
607
551
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
608
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
552
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintManual, isStandalone: true, selector: "[tuiHint][tuiHintManual]", inputs: { visible: { classPropertyName: "visible", publicName: "tuiHintManual", isSignal: true, isRequired: false, transformFunction: null } }, providers: [tuiAsDriver(TuiHintManual)], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
609
553
|
}
|
|
610
554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, decorators: [{
|
|
611
555
|
type: Directive,
|
|
612
556
|
args: [{
|
|
613
|
-
standalone: true,
|
|
614
557
|
selector: '[tuiHint][tuiHintManual]',
|
|
615
558
|
providers: [tuiAsDriver(TuiHintManual)],
|
|
616
559
|
}]
|
|
617
|
-
}], ctorParameters: () => []
|
|
618
|
-
type: Input
|
|
619
|
-
}] } });
|
|
560
|
+
}], ctorParameters: () => [] });
|
|
620
561
|
|
|
621
562
|
class TuiHintOverflow {
|
|
622
563
|
constructor() {
|
|
623
564
|
this.hint = inject(TuiHintDirective);
|
|
624
|
-
this.
|
|
565
|
+
this.content = input('', { alias: 'tuiHintOverflow' });
|
|
625
566
|
}
|
|
626
567
|
onMouseEnter({ scrollWidth, clientWidth, textContent }) {
|
|
627
|
-
this.hint.
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
: '';
|
|
568
|
+
tuiSetSignal(this.hint.content, scrollWidth > clientWidth && this.content() !== null
|
|
569
|
+
? this.content() || textContent
|
|
570
|
+
: '');
|
|
631
571
|
}
|
|
632
572
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
633
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
573
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiHintOverflow, isStandalone: true, selector: "[tuiHintOverflow]", inputs: { content: { classPropertyName: "content", publicName: "tuiHintOverflow", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter($event.currentTarget)" } }, hostDirectives: [{ directive: TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance"] }], ngImport: i0 }); }
|
|
634
574
|
}
|
|
635
575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, decorators: [{
|
|
636
576
|
type: Directive,
|
|
637
577
|
args: [{
|
|
638
|
-
standalone: true,
|
|
639
578
|
selector: '[tuiHintOverflow]',
|
|
640
579
|
hostDirectives: [
|
|
641
580
|
{
|
|
@@ -647,9 +586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
647
586
|
'(mouseenter)': 'onMouseEnter($event.currentTarget)',
|
|
648
587
|
},
|
|
649
588
|
}]
|
|
650
|
-
}]
|
|
651
|
-
type: Input
|
|
652
|
-
}] } });
|
|
589
|
+
}] });
|
|
653
590
|
|
|
654
591
|
const TuiHint = [
|
|
655
592
|
TuiHintComponent,
|
|
@@ -666,34 +603,9 @@ const TuiHint = [
|
|
|
666
603
|
TuiHintPointer,
|
|
667
604
|
];
|
|
668
605
|
|
|
669
|
-
class TuiHints {
|
|
670
|
-
constructor() {
|
|
671
|
-
this.hints$ = inject(TuiHintService);
|
|
672
|
-
this.destroyRef = inject(DestroyRef);
|
|
673
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
674
|
-
this.hints = [];
|
|
675
|
-
}
|
|
676
|
-
ngOnInit() {
|
|
677
|
-
// Due to this view being parallel to app content, `markForCheck` from `async` pipe
|
|
678
|
-
// can happen after view was checked, so calling `detectChanges` instead
|
|
679
|
-
this.hints$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((hints) => {
|
|
680
|
-
this.hints = hints;
|
|
681
|
-
this.cdr.detectChanges();
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHints, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
685
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiHints, isStandalone: true, selector: "tui-hints", host: { attributes: { "aria-live": "polite" } }, ngImport: i0, template: "@for (hint of hints; track hint) {\n <div\n role=\"tooltip\"\n tuiAnimatedParent\n [tuiActiveZoneParent]=\"hint.activeZone || null\"\n >\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n </div>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;block-size:0}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiActiveZone, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { kind: "directive", type: TuiAnimatedParent, selector: "[tuiAnimatedParent]" }], changeDetection: i0.ChangeDetectionStrategy.Default }); }
|
|
686
|
-
}
|
|
687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHints, decorators: [{
|
|
688
|
-
type: Component,
|
|
689
|
-
args: [{ selector: 'tui-hints', imports: [PolymorpheusOutlet, TuiActiveZone, TuiAnimatedParent], changeDetection: ChangeDetectionStrategy.Default, host: {
|
|
690
|
-
'aria-live': 'polite',
|
|
691
|
-
}, template: "@for (hint of hints; track hint) {\n <div\n role=\"tooltip\"\n tuiAnimatedParent\n [tuiActiveZoneParent]=\"hint.activeZone || null\"\n >\n <ng-container *polymorpheusOutlet=\"hint.component; context: {$implicit: hint}\" />\n </div>\n}\n", styles: [":host{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;block-size:0}\n"] }]
|
|
692
|
-
}] });
|
|
693
|
-
|
|
694
606
|
/**
|
|
695
607
|
* Generated bundle index. Do not edit.
|
|
696
608
|
*/
|
|
697
609
|
|
|
698
|
-
export { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_DIRECTIONS, TUI_HINT_OPTIONS, TUI_HINT_PROVIDERS, TuiHint, TuiHintComponent, TuiHintDescribe, TuiHintDirective, TuiHintDriver, TuiHintHost, TuiHintHover, TuiHintManual, TuiHintOptionsDirective, TuiHintOverflow, TuiHintPointer, TuiHintPosition,
|
|
610
|
+
export { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_DIRECTIONS, TUI_HINT_OPTIONS, TUI_HINT_PROVIDERS, TuiHint, TuiHintComponent, TuiHintDescribe, TuiHintDirective, TuiHintDriver, TuiHintHost, TuiHintHover, TuiHintManual, TuiHintOptionsDirective, TuiHintOverflow, TuiHintPointer, TuiHintPosition, TuiHintUnstyled, TuiHintUnstyledComponent, tuiHintOptionsProvider };
|
|
699
611
|
//# sourceMappingURL=taiga-ui-core-directives-hint.mjs.map
|