@taiga-ui/core 4.52.0-canary.24b31eb → 4.52.0-canary.2c75afa

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 (166) hide show
  1. package/classes/accessors.d.ts +1 -1
  2. package/components/alert/alert.component.d.ts +5 -6
  3. package/components/alert/alert.directive.d.ts +4 -3
  4. package/components/alert/alert.interfaces.d.ts +6 -6
  5. package/components/alert/alert.service.d.ts +6 -2
  6. package/components/alert/alert.tokens.d.ts +1 -7
  7. package/components/alert/index.d.ts +0 -1
  8. package/components/data-list/data-list.component.d.ts +1 -1
  9. package/components/dialog/dialog.component.d.ts +3 -4
  10. package/components/dialog/dialog.directive.d.ts +4 -3
  11. package/components/dialog/dialog.options.d.ts +2 -3
  12. package/components/dialog/dialog.providers.d.ts +1 -2
  13. package/components/dialog/dialog.service.d.ts +5 -2
  14. package/components/dialog/index.d.ts +0 -1
  15. package/components/error/error.component.d.ts +1 -1
  16. package/components/index.d.ts +1 -1
  17. package/components/link/link.directive.d.ts +2 -2
  18. package/components/loader/loader.component.d.ts +7 -7
  19. package/components/modal/index.d.ts +2 -0
  20. package/components/modal/modal.component.d.ts +17 -0
  21. package/components/modal/modal.service.d.ts +13 -0
  22. package/components/notification/notification.directive.d.ts +6 -11
  23. package/components/root/root.component.d.ts +1 -1
  24. package/components/scrollbar/scroll-into-view.directive.d.ts +3 -2
  25. package/components/scrollbar/scrollbar.component.d.ts +2 -2
  26. package/components/scrollbar/scrollbar.directive.d.ts +2 -2
  27. package/components/spin-button/spin-button.component.d.ts +8 -9
  28. package/components/textfield/index.d.ts +1 -3
  29. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +5 -6
  30. package/components/textfield/textfield.component.d.ts +5 -7
  31. package/components/textfield/textfield.d.ts +2 -3
  32. package/components/textfield/textfield.directive.d.ts +10 -13
  33. package/components/textfield/textfield.options.d.ts +8 -11
  34. package/directives/appearance/appearance.directive.d.ts +1 -1
  35. package/directives/appearance/appearance.options.d.ts +1 -1
  36. package/directives/date-format/date-format.directive.d.ts +3 -7
  37. package/directives/dropdown/dropdown-content.directive.d.ts +9 -0
  38. package/directives/dropdown/dropdown-position.directive.d.ts +1 -1
  39. package/directives/dropdown/dropdown.d.ts +2 -2
  40. package/directives/dropdown/dropdown.directive.d.ts +1 -2
  41. package/directives/dropdown/index.d.ts +1 -3
  42. package/directives/hint/hint-describe.directive.d.ts +4 -6
  43. package/directives/hint/hint-host.directive.d.ts +2 -2
  44. package/directives/hint/hint-hover.directive.d.ts +3 -4
  45. package/directives/hint/hint-manual.directive.d.ts +2 -2
  46. package/directives/hint/hint-options.directive.d.ts +1 -1
  47. package/directives/hint/hint-overflow.directive.d.ts +2 -2
  48. package/directives/hint/hint-position.directive.d.ts +4 -5
  49. package/directives/hint/hint-unstyled.component.d.ts +2 -7
  50. package/directives/hint/hint.component.d.ts +7 -6
  51. package/directives/hint/hint.directive.d.ts +9 -11
  52. package/directives/hint/index.d.ts +0 -2
  53. package/directives/index.d.ts +1 -0
  54. package/directives/notification/index.d.ts +2 -0
  55. package/directives/notification/notification.directive.d.ts +11 -0
  56. package/directives/notification/notification.service.d.ts +12 -0
  57. package/directives/number-format/number-format.directive.d.ts +3 -7
  58. package/directives/popup/popup.directive.d.ts +6 -5
  59. package/directives/popup/popup.service.d.ts +1 -1
  60. package/directives/popup/popups.component.d.ts +2 -2
  61. package/fesm2022/taiga-ui-core-classes.mjs +1 -1
  62. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-core-components-alert.mjs +57 -96
  64. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-core-components-calendar.mjs +7 -8
  67. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-core-components-data-list.mjs +4 -11
  70. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-core-components-dialog.mjs +34 -91
  72. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-core-components-error.mjs +2 -2
  74. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-core-components-icon.mjs +1 -2
  77. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-components-link.mjs +7 -9
  80. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-components-loader.mjs +12 -25
  82. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-components-modal.mjs +89 -0
  84. package/fesm2022/taiga-ui-core-components-modal.mjs.map +1 -0
  85. package/fesm2022/taiga-ui-core-components-notification.mjs +12 -28
  86. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-core-components-root.mjs +3 -14
  88. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +35 -43
  90. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-core-components-spin-button.mjs +14 -27
  92. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-core-components-textfield.mjs +127 -271
  94. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-components.mjs +1 -1
  96. package/fesm2022/taiga-ui-core-directives-appearance.mjs +0 -1
  97. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  98. package/fesm2022/taiga-ui-core-directives-date-format.mjs +24 -18
  99. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  100. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +44 -104
  101. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  102. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-directives-hint.mjs +98 -189
  104. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-directives-icons.mjs +0 -1
  106. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +2 -5
  108. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-core-directives-notification.mjs +73 -0
  110. package/fesm2022/taiga-ui-core-directives-notification.mjs.map +1 -0
  111. package/fesm2022/taiga-ui-core-directives-number-format.mjs +30 -18
  112. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-core-directives-popup.mjs +13 -20
  114. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
  116. package/fesm2022/taiga-ui-core-directives.mjs +1 -0
  117. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  118. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -1
  119. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
  120. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -1
  121. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
  122. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -1
  123. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
  124. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -1
  125. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
  126. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +21 -12
  127. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  128. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -1
  129. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
  130. package/fesm2022/taiga-ui-core-pipes-month.mjs +2 -2
  131. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
  132. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -1
  133. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
  134. package/fesm2022/taiga-ui-core-tokens.mjs +19 -9
  135. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  136. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -0
  137. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  138. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +1 -1
  139. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  140. package/package.json +13 -6
  141. package/pipes/format-number/format-number.pipe.d.ts +5 -3
  142. package/styles/components/link.less +1 -0
  143. package/styles/mixins/appearance.less +1 -1
  144. package/styles/mixins/mixins.less +0 -5
  145. package/styles/mixins/mixins.scss +0 -5
  146. package/styles/mixins/slider.less +24 -14
  147. package/styles/theme/variables.less +2 -4
  148. package/tokens/date-format.d.ts +2 -3
  149. package/tokens/i18n.d.ts +7 -7
  150. package/tokens/number-format.d.ts +2 -3
  151. package/types/index.d.ts +0 -1
  152. package/components/alert/alerts.component.d.ts +0 -12
  153. package/components/dialog/active-zone-adapter.directive.d.ts +0 -11
  154. package/components/dialog/dialogs.component.d.ts +0 -8
  155. package/components/header/header.directive.d.ts +0 -17
  156. package/components/header/index.d.ts +0 -1
  157. package/components/textfield/select.directive.d.ts +0 -19
  158. package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
  159. package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
  160. package/directives/dropdown/dropdown.service.d.ts +0 -6
  161. package/directives/dropdown/dropdowns.component.d.ts +0 -9
  162. package/directives/hint/hint.service.d.ts +0 -13
  163. package/directives/hint/hints.component.d.ts +0 -12
  164. package/fesm2022/taiga-ui-core-components-header.mjs +0 -42
  165. package/fesm2022/taiga-ui-core-components-header.mjs.map +0 -1
  166. package/types/portal-item.d.ts +0 -9
@@ -1,27 +1,29 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, Injectable, Directive, Optional, Self, SkipSelf, inject, Input, EventEmitter, Output, signal, INJECTOR, ChangeDetectionStrategy, Component, TemplateRef, NgZone, DestroyRef, ChangeDetectorRef } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
+ import { InjectionToken, Directive, Optional, Self, SkipSelf, inject, Input, input, output, INJECTOR, ChangeDetectionStrategy, Component, TemplateRef, forwardRef, 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, TuiAnimatedParent } from '@taiga-ui/cdk/directives/animated';
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';
13
- import { TuiDriverDirective, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsRectAccessor, tuiAsVehicle, tuiPositionAccessorFor, tuiRectAccessorFor } from '@taiga-ui/core/classes';
14
+ import { tuiProvide, tuiPure, tuiSetSignal, tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
15
+ import { TuiDriverDirective, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackAccessor, TuiRectAccessor, tuiAsVehicle, tuiAsRectAccessor, 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';
16
18
  import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearance';
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, injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
21
- import { BehaviorSubject, Subject, merge, switchMap, of, delay, takeUntil, repeat, filter, map, tap, takeWhile, distinctUntilChanged, fromEvent, debounce, timer, startWith, skip } from 'rxjs';
22
- import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
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, tuiZonefreeScheduler, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
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 = [
@@ -130,7 +104,6 @@ class TuiHintOptionsDirective {
130
104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOptionsDirective, decorators: [{
131
105
  type: Directive,
132
106
  args: [{
133
- standalone: true,
134
107
  selector: '[tuiHintContent]',
135
108
  providers: [tuiProvide(TUI_HINT_OPTIONS, TuiHintOptionsDirective)],
136
109
  }]
@@ -160,11 +133,11 @@ class TuiHintHover extends TuiDriver {
160
133
  this.options = inject(TUI_HINT_OPTIONS);
161
134
  this.visible = false;
162
135
  this.toggle$ = new Subject();
163
- this.stream$ = merge(this.toggle$.pipe(switchMap((visible) => this.isMobile
164
- ? of(visible)
165
- : of(visible).pipe(delay(visible ? 0 : this.tuiHintHideDelay))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((visible) => this.isMobile
166
- ? of(visible)
167
- : of(visible).pipe(delay(visible ? this.tuiHintShowDelay : this.tuiHintHideDelay))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
136
+ this.stream$ = merge(this.toggle$.pipe(switchMap((show) => this.isMobile
137
+ ? of(show)
138
+ : of(show).pipe(delay(show ? 0 : this.hideDelay()))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((show) => this.isMobile
139
+ ? of(show)
140
+ : of(show).pipe(delay(show ? this.showDelay() : this.hideDelay()))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
168
141
  (this.el.hasAttribute('tuiHintPointer') || !tuiIsObscured(this.el))), tap((visible) => {
169
142
  this.visible = visible;
170
143
  }));
@@ -172,8 +145,12 @@ class TuiHintHover extends TuiDriver {
172
145
  optional: true,
173
146
  skipSelf: true,
174
147
  });
175
- this.tuiHintShowDelay = this.options.showDelay;
176
- this.tuiHintHideDelay = this.options.hideDelay;
148
+ this.showDelay = input(this.options.showDelay, {
149
+ alias: 'tuiHintShowDelay',
150
+ });
151
+ this.hideDelay = input(this.options.hideDelay, {
152
+ alias: 'tuiHintHideDelay',
153
+ });
177
154
  this.type = 'hint';
178
155
  this.enabled = true;
179
156
  }
@@ -185,20 +162,15 @@ class TuiHintHover extends TuiDriver {
185
162
  this.toggle$.next(false);
186
163
  }
187
164
  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: "14.0.0", version: "19.2.15", type: TuiHintHover, isStandalone: true, inputs: { tuiHintShowDelay: "tuiHintShowDelay", tuiHintHideDelay: "tuiHintHideDelay" }, providers: [tuiAsDriver(TuiHintHover), TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0 }); }
165
+ 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
166
  }
190
167
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, decorators: [{
191
168
  type: Directive,
192
169
  args: [{
193
- standalone: true,
194
170
  providers: [tuiAsDriver(TuiHintHover), TuiHoveredService],
195
171
  exportAs: 'tuiHintHover',
196
172
  }]
197
- }], ctorParameters: () => [], propDecorators: { tuiHintShowDelay: [{
198
- type: Input
199
- }], tuiHintHideDelay: [{
200
- type: Input
201
- }] } });
173
+ }], ctorParameters: () => [] });
202
174
 
203
175
  const GAP$1 = 8;
204
176
  const ARROW_OFFSET = 24;
@@ -210,19 +182,24 @@ class TuiHintPosition extends TuiPositionAccessor {
210
182
  this.el = tuiInjectElement();
211
183
  this.offset = inject(TUI_IS_MOBILE) ? 16 : 8;
212
184
  this.viewport = inject(TUI_VIEWPORT);
213
- this.accessor = tuiFallbackAccessor('hint')(inject(TuiRectAccessor), inject(TuiHintDirective));
185
+ this.accessor = tuiFallbackAccessor('hint')(inject(TuiRectAccessor, { optional: true }), { getClientRect: () => this.el.getBoundingClientRect() });
214
186
  this.points = TUI_HINT_DIRECTIONS.reduce((acc, direction) => ({ ...acc, [direction]: [0, 0] }), {});
215
- this.direction = inject(TUI_HINT_OPTIONS).direction;
216
- this.directionChange = new EventEmitter();
187
+ this.direction = input(inject(TUI_HINT_OPTIONS).direction, {
188
+ alias: 'tuiHintDirection',
189
+ });
190
+ this.directionChange = output({
191
+ alias: 'tuiHintDirectionChange',
192
+ });
217
193
  this.type = 'hint';
218
194
  }
219
195
  emitDirection(direction) {
220
196
  this.directionChange.emit(direction);
221
197
  }
222
198
  getPosition(rect, el) {
199
+ const direction = this.direction();
223
200
  const width = el?.clientWidth ?? rect.width;
224
201
  const height = el?.clientHeight ?? rect.height;
225
- const hostRect = this.accessor.getClientRect() ?? EMPTY_CLIENT_RECT;
202
+ const hostRect = this.accessor.getClientRect();
226
203
  const leftCenter = hostRect.left + hostRect.width / 2;
227
204
  const topCenter = hostRect.top + hostRect.height / 2;
228
205
  const rtl = this.el.matches('[dir="rtl"] :scope');
@@ -250,14 +227,14 @@ class TuiHintPosition extends TuiPositionAccessor {
250
227
  this.points.right[LEFT] = this.points['right-top'][LEFT];
251
228
  this.points['right-bottom'][TOP] = this.points['left-bottom'][TOP];
252
229
  this.points['right-bottom'][LEFT] = this.points['right-top'][LEFT];
253
- const array = Array.isArray(this.direction) ? this.direction : [this.direction];
230
+ const array = Array.isArray(direction) ? direction : [direction];
254
231
  const priority = array.map((direction) => adjust(direction, rtl));
255
- const direction = priority
232
+ const updated = priority
256
233
  .concat(TUI_HINT_DIRECTIONS)
257
234
  .find((dir) => this.checkPosition(this.points[dir], width, height)) ||
258
235
  this.fallback;
259
- this.emitDirection(adjust(direction, rtl));
260
- return this.points[direction];
236
+ this.emitDirection(adjust(updated, rtl));
237
+ return this.points[updated];
261
238
  }
262
239
  get fallback() {
263
240
  return this.points.top[TOP] >
@@ -273,23 +250,14 @@ class TuiHintPosition extends TuiPositionAccessor {
273
250
  left + width < viewport.right - GAP$1);
274
251
  }
275
252
  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: "14.0.0", version: "19.2.15", type: TuiHintPosition, isStandalone: true, inputs: { direction: ["tuiHintDirection", "direction"] }, outputs: { directionChange: "tuiHintDirectionChange" }, usesInheritance: true, ngImport: i0 }); }
253
+ 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
254
  }
278
255
  __decorate([
279
256
  tuiPure
280
257
  ], TuiHintPosition.prototype, "emitDirection", null);
281
258
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, decorators: [{
282
- type: Directive,
283
- args: [{
284
- standalone: true,
285
- }]
286
- }], propDecorators: { direction: [{
287
- type: Input,
288
- args: ['tuiHintDirection']
289
- }], directionChange: [{
290
- type: Output,
291
- args: ['tuiHintDirectionChange']
292
- }], emitDirection: [] } });
259
+ type: Directive
260
+ }], propDecorators: { emitDirection: [] } });
293
261
  function adjust(direction, rtl) {
294
262
  if (rtl && direction.includes('left')) {
295
263
  return direction.replace('left', 'right');
@@ -302,18 +270,19 @@ function adjust(direction, rtl) {
302
270
 
303
271
  class TuiHintDirective {
304
272
  constructor() {
305
- this.service = inject(TuiHintService);
306
- this.appearance = inject(TUI_HINT_OPTIONS).appearance;
307
- this.visible = new EventEmitter();
308
- this.content = signal(null);
273
+ this.service = inject(TuiPopupService);
274
+ this.content = input(null, { alias: 'tuiHint' });
275
+ this.context = input(undefined, { alias: 'tuiHintContext' });
276
+ this.appearance = input(inject(TUI_HINT_OPTIONS).appearance, {
277
+ alias: 'tuiHintAppearance',
278
+ });
279
+ this.visible = output({ alias: 'tuiHintVisible' });
309
280
  this.component = inject((PolymorpheusComponent));
310
281
  this.el = tuiInjectElement();
311
- this.activeZone = inject(TuiActiveZone, { optional: true });
312
282
  this.type = 'hint';
313
283
  }
314
- set tuiHint(content) {
315
- this.content.set(content);
316
- if (!content) {
284
+ ngOnChanges() {
285
+ if (!this.content()) {
317
286
  this.toggle(false);
318
287
  }
319
288
  }
@@ -324,32 +293,31 @@ class TuiHintDirective {
324
293
  return this.el.getBoundingClientRect();
325
294
  }
326
295
  toggle(show) {
327
- if (show && this.content()) {
328
- this.service.add(this);
296
+ if (show && this.content() && !this.ref) {
297
+ this.ref = this.service.add(this.component);
298
+ this.visible.emit(true);
329
299
  }
330
- else {
331
- this.service.remove(this);
300
+ else if (this.ref) {
301
+ this.ref.destroy();
302
+ this.ref = undefined;
303
+ this.visible.emit(false);
332
304
  }
333
- this.visible.emit(show);
334
305
  }
335
306
  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: "14.0.0", version: "19.2.15", type: TuiHintDirective, isStandalone: true, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: { context: ["tuiHintContext", "context"], appearance: ["tuiHintAppearance", "appearance"], tuiHint: "tuiHint" }, outputs: { visible: "tuiHintVisible" }, providers: [
337
- tuiAsRectAccessor(TuiHintDirective),
307
+ 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: [
338
308
  tuiAsVehicle(TuiHintDirective),
339
309
  {
340
310
  provide: PolymorpheusComponent,
341
311
  deps: [TUI_HINT_COMPONENT, INJECTOR],
342
312
  useClass: PolymorpheusComponent,
343
313
  },
344
- ], hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
314
+ ], usesOnChanges: true, hostDirectives: [{ directive: TuiHintDriver }, { directive: TuiHintHover, inputs: ["tuiHintHideDelay", "tuiHintHideDelay", "tuiHintShowDelay", "tuiHintShowDelay"] }, { directive: TuiHintPosition, inputs: ["tuiHintDirection", "tuiHintDirection"], outputs: ["tuiHintDirectionChange", "tuiHintDirectionChange"] }], ngImport: i0 }); }
345
315
  }
346
316
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, decorators: [{
347
317
  type: Directive,
348
318
  args: [{
349
- standalone: true,
350
319
  selector: '[tuiHint]:not(ng-container):not(ng-template)',
351
320
  providers: [
352
- tuiAsRectAccessor(TuiHintDirective),
353
321
  tuiAsVehicle(TuiHintDirective),
354
322
  {
355
323
  provide: PolymorpheusComponent,
@@ -370,18 +338,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
370
338
  },
371
339
  ],
372
340
  }]
373
- }], propDecorators: { context: [{
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
- }] } });
341
+ }] });
385
342
 
386
343
  class TuiHintPointer extends TuiHintHover {
387
344
  constructor() {
@@ -400,7 +357,6 @@ class TuiHintPointer extends TuiHintHover {
400
357
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPointer, decorators: [{
401
358
  type: Directive,
402
359
  args: [{
403
- standalone: true,
404
360
  selector: '[tuiHint][tuiHintPointer]',
405
361
  providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)],
406
362
  host: {
@@ -411,24 +367,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
411
367
 
412
368
  class TuiHintUnstyledComponent {
413
369
  constructor() {
414
- this.context = injectContext();
370
+ this.hint = inject(TuiHintDirective);
415
371
  }
416
372
  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="context.$implicit.content()" />', isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
373
+ 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
374
  }
419
375
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, decorators: [{
420
376
  type: Component,
421
377
  args: [{
422
378
  imports: [PolymorpheusOutlet],
423
- template: '<ng-container *polymorpheusOutlet="context.$implicit.content()" />',
379
+ template: '<ng-container *polymorpheusOutlet="hint.content()" />',
424
380
  changeDetection: ChangeDetectionStrategy.OnPush,
425
381
  }]
426
382
  }] });
427
383
  class TuiHintUnstyled {
428
384
  constructor() {
429
385
  const hint = inject((TuiHintDirective));
430
- hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent);
431
- hint.content.set(inject((TemplateRef)));
386
+ tuiSetSignal(hint.content, inject((TemplateRef)));
387
+ hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent, inject(INJECTOR));
432
388
  }
433
389
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
434
390
  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 +392,6 @@ class TuiHintUnstyled {
436
392
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, decorators: [{
437
393
  type: Directive,
438
394
  args: [{
439
- standalone: true,
440
395
  selector: 'ng-template[tuiHint]',
441
396
  }]
442
397
  }], ctorParameters: () => [] });
@@ -445,7 +400,7 @@ const TUI_HINT_PROVIDERS = [
445
400
  TuiPositionService,
446
401
  TuiHoveredService,
447
402
  tuiPositionAccessorFor('hint', TuiHintPosition),
448
- tuiRectAccessorFor('hint', TuiHintDirective),
403
+ tuiRectAccessorFor('hint', forwardRef(() => TuiHintDirective)),
449
404
  ];
450
405
  const GAP = 8;
451
406
  class TuiHintComponent {
@@ -456,7 +411,7 @@ class TuiHintComponent {
456
411
  this.viewport = inject(TUI_VIEWPORT);
457
412
  this.pointer = inject(TuiHintPointer, { optional: true });
458
413
  this.accessor = inject(TuiRectAccessor);
459
- this.hint = injectContext().$implicit;
414
+ this.hint = inject(TuiHintDirective);
460
415
  this.isMobile = inject(TUI_IS_MOBILE);
461
416
  this.content = this.hint.component.component === TuiHintUnstyledComponent
462
417
  ? signal('')
@@ -503,13 +458,13 @@ class TuiHintComponent {
503
458
  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
459
  }
505
460
  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: `
461
+ 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
462
  <ng-content />
508
463
  <span
509
- *polymorpheusOutlet="content() as text; context: hint.context"
464
+ *polymorpheusOutlet="content() as text; context: hint.context()"
510
465
  [innerHTML]="text"
511
466
  ></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 }); }
467
+ `, 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
468
  }
514
469
  __decorate([
515
470
  tuiPure
@@ -519,15 +474,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
519
474
  args: [{ selector: 'tui-hint', imports: [PolymorpheusOutlet], template: `
520
475
  <ng-content />
521
476
  <span
522
- *polymorpheusOutlet="content() as text; context: hint.context"
477
+ *polymorpheusOutlet="content() as text; context: hint.context()"
523
478
  [innerHTML]="text"
524
479
  ></span>
525
- `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated], host: {
480
+ `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated, TuiActiveZone], host: {
481
+ role: 'tooltip',
526
482
  '[class._untouchable]': 'pointer',
527
483
  '[class._mobile]': 'isMobile',
528
484
  '[attr.tuiTheme]': 'theme',
529
485
  '(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"] }]
486
+ }, 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
487
  }], ctorParameters: () => [], propDecorators: { apply: [] } });
532
488
 
533
489
  class TuiHintDescribe extends TuiDriver {
@@ -535,107 +491,87 @@ class TuiHintDescribe extends TuiDriver {
535
491
  super((subscriber) => this.stream$.subscribe(subscriber));
536
492
  this.doc = inject(DOCUMENT);
537
493
  this.el = tuiInjectElement();
538
- this.zone = inject(NgZone);
539
- this.id$ = new BehaviorSubject('');
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());
494
+ this.element = computed((id = this.id()) => id ? this.doc.querySelector(`#${id}`) || this.el : this.el);
495
+ this.id = input('', { alias: 'tuiHintDescribe' });
543
496
  this.type = 'hint';
544
- }
545
- set tuiHintDescribe(id) {
546
- this.id$.next(id || '');
547
- }
548
- get element() {
549
- const id = this.id$.value;
550
- return id ? this.doc.querySelector(`#${id}`) || this.el : this.el;
497
+ this.stream$ = toObservable(this.id).pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
498
+ ? of(false)
499
+ : 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
500
  }
552
501
  get focused() {
553
- return tuiIsFocused(this.element);
502
+ return tuiIsFocused(this.element());
554
503
  }
555
504
  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: "14.0.0", version: "19.2.15", type: TuiHintDescribe, isStandalone: true, selector: "[tuiHintDescribe]", inputs: { tuiHintDescribe: "tuiHintDescribe" }, providers: [tuiAsDriver(TuiHintDescribe)], usesInheritance: true, ngImport: i0 }); }
505
+ 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
506
  }
558
- __decorate([
559
- tuiPure
560
- ], TuiHintDescribe.prototype, "element", null);
561
507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, decorators: [{
562
508
  type: Directive,
563
509
  args: [{
564
- standalone: true,
565
510
  selector: '[tuiHintDescribe]',
566
511
  providers: [tuiAsDriver(TuiHintDescribe)],
567
512
  }]
568
- }], ctorParameters: () => [], propDecorators: { tuiHintDescribe: [{
569
- type: Input
570
- }], element: [] } });
513
+ }], ctorParameters: () => [] });
571
514
 
572
515
  class TuiHintHost extends TuiRectAccessor {
573
516
  constructor() {
574
517
  super(...arguments);
518
+ this.tuiHintHost = input();
575
519
  this.type = 'hint';
576
520
  }
577
521
  getClientRect() {
578
- return this.tuiHintHost?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
522
+ return this.tuiHintHost()?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
579
523
  }
580
524
  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: "14.0.0", version: "19.2.15", type: TuiHintHost, isStandalone: true, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: "tuiHintHost" }, providers: [tuiAsRectAccessor(TuiHintHost)], usesInheritance: true, ngImport: i0 }); }
525
+ 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
526
  }
583
527
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, decorators: [{
584
528
  type: Directive,
585
529
  args: [{
586
- standalone: true,
587
530
  selector: '[tuiHint][tuiHintHost]',
588
531
  providers: [tuiAsRectAccessor(TuiHintHost)],
589
532
  }]
590
- }], propDecorators: { tuiHintHost: [{
591
- type: Input
592
- }] } });
533
+ }] });
593
534
 
594
535
  class TuiHintManual extends TuiDriver {
595
536
  constructor() {
596
537
  super((subscriber) => this.stream$.subscribe(subscriber));
597
538
  this.hover = inject(TuiHintHover);
598
539
  this.stream$ = new BehaviorSubject(false);
599
- this.tuiHintManual = false;
540
+ this.visible = input(false, { alias: 'tuiHintManual' });
600
541
  this.type = 'hint';
601
542
  this.hover.enabled = false;
602
543
  }
603
544
  ngOnChanges() {
604
- this.stream$.next(!!this.tuiHintManual);
605
- this.hover.enabled = this.tuiHintManual === null;
545
+ this.stream$.next(!!this.visible());
546
+ this.hover.enabled = this.visible() === null;
606
547
  }
607
548
  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: "14.0.0", version: "19.2.15", type: TuiHintManual, isStandalone: true, selector: "[tuiHint][tuiHintManual]", inputs: { tuiHintManual: "tuiHintManual" }, providers: [tuiAsDriver(TuiHintManual)], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
549
+ 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
550
  }
610
551
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, decorators: [{
611
552
  type: Directive,
612
553
  args: [{
613
- standalone: true,
614
554
  selector: '[tuiHint][tuiHintManual]',
615
555
  providers: [tuiAsDriver(TuiHintManual)],
616
556
  }]
617
- }], ctorParameters: () => [], propDecorators: { tuiHintManual: [{
618
- type: Input
619
- }] } });
557
+ }], ctorParameters: () => [] });
620
558
 
621
559
  class TuiHintOverflow {
622
560
  constructor() {
623
561
  this.hint = inject(TuiHintDirective);
624
- this.tuiHintOverflow = '';
562
+ this.content = input('', { alias: 'tuiHintOverflow' });
625
563
  }
626
564
  onMouseEnter({ scrollWidth, clientWidth, textContent }) {
627
- this.hint.tuiHint =
628
- scrollWidth > clientWidth && this.tuiHintOverflow !== null
629
- ? this.tuiHintOverflow || textContent
630
- : '';
565
+ tuiSetSignal(this.hint.content, scrollWidth > clientWidth && this.content() !== null
566
+ ? this.content() || textContent
567
+ : '');
631
568
  }
632
569
  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: "14.0.0", version: "19.2.15", type: TuiHintOverflow, isStandalone: true, selector: "[tuiHintOverflow]", inputs: { tuiHintOverflow: "tuiHintOverflow" }, host: { listeners: { "mouseenter": "onMouseEnter($event.currentTarget)" } }, hostDirectives: [{ directive: TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance"] }], ngImport: i0 }); }
570
+ 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
571
  }
635
572
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, decorators: [{
636
573
  type: Directive,
637
574
  args: [{
638
- standalone: true,
639
575
  selector: '[tuiHintOverflow]',
640
576
  hostDirectives: [
641
577
  {
@@ -647,9 +583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
647
583
  '(mouseenter)': 'onMouseEnter($event.currentTarget)',
648
584
  },
649
585
  }]
650
- }], propDecorators: { tuiHintOverflow: [{
651
- type: Input
652
- }] } });
586
+ }] });
653
587
 
654
588
  const TuiHint = [
655
589
  TuiHintComponent,
@@ -666,34 +600,9 @@ const TuiHint = [
666
600
  TuiHintPointer,
667
601
  ];
668
602
 
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
603
  /**
695
604
  * Generated bundle index. Do not edit.
696
605
  */
697
606
 
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, TuiHintService, TuiHintUnstyled, TuiHintUnstyledComponent, TuiHints, tuiHintOptionsProvider };
607
+ 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
608
  //# sourceMappingURL=taiga-ui-core-directives-hint.mjs.map