@taiga-ui/core 4.52.0-canary.e444d19 → 4.52.0-canary.eb5ffe3

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 (175) hide show
  1. package/components/alert/alert.component.d.ts +5 -6
  2. package/components/alert/alert.directive.d.ts +4 -3
  3. package/components/alert/alert.interfaces.d.ts +3 -2
  4. package/components/alert/alert.service.d.ts +6 -2
  5. package/components/alert/alert.tokens.d.ts +1 -7
  6. package/components/alert/index.d.ts +0 -1
  7. package/components/button/button.directive.d.ts +2 -2
  8. package/components/button/button.options.d.ts +1 -1
  9. package/components/cell/cell.directive.d.ts +9 -0
  10. package/components/cell/cell.options.d.ts +6 -0
  11. package/components/cell/index.d.ts +2 -0
  12. package/components/data-list/data-list.component.d.ts +1 -1
  13. package/components/dialog/active-zone-adapter.directive.d.ts +11 -0
  14. package/components/dialog/dialog.component.d.ts +6 -11
  15. package/components/dialog/dialog.directive.d.ts +1 -1
  16. package/components/dialog/dialog.factory.d.ts +1 -1
  17. package/components/dialog/dialog.options.d.ts +26 -0
  18. package/components/dialog/{dialog-close.service.d.ts → dialog.providers.d.ts} +4 -1
  19. package/components/dialog/dialog.service.d.ts +1 -1
  20. package/components/dialog/index.d.ts +2 -3
  21. package/components/error/error.component.d.ts +6 -8
  22. package/components/error/error.d.ts +4 -0
  23. package/components/error/error.directive.d.ts +19 -0
  24. package/components/error/error.pipe.d.ts +10 -0
  25. package/components/error/index.d.ts +3 -0
  26. package/components/expand/expand.component.d.ts +9 -28
  27. package/components/expand/index.d.ts +0 -2
  28. package/components/header/header.directive.d.ts +17 -0
  29. package/components/header/index.d.ts +1 -0
  30. package/components/icon/icon.component.d.ts +1 -1
  31. package/components/index.d.ts +2 -1
  32. package/components/notification/notification.directive.d.ts +1 -1
  33. package/components/notification/notification.options.d.ts +1 -1
  34. package/components/root/root.component.d.ts +4 -6
  35. package/components/scrollbar/scrollbar.options.d.ts +1 -1
  36. package/components/spin-button/spin-button.component.d.ts +1 -1
  37. package/components/textfield/index.d.ts +1 -3
  38. package/components/textfield/textfield-content.directive.d.ts +3 -2
  39. package/components/textfield/textfield-icon.d.ts +3 -3
  40. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +4 -5
  41. package/components/textfield/textfield.component.d.ts +2 -3
  42. package/components/textfield/textfield.d.ts +2 -3
  43. package/components/textfield/textfield.directive.d.ts +2 -2
  44. package/components/textfield/textfield.options.d.ts +8 -11
  45. package/directives/appearance/appearance.directive.d.ts +5 -13
  46. package/directives/appearance/appearance.options.d.ts +1 -1
  47. package/directives/dropdown/dropdown-content.directive.d.ts +9 -0
  48. package/directives/dropdown/dropdown.d.ts +2 -2
  49. package/directives/dropdown/dropdown.directive.d.ts +1 -2
  50. package/directives/dropdown/index.d.ts +1 -3
  51. package/directives/hint/hint-describe.directive.d.ts +4 -6
  52. package/directives/hint/hint-host.directive.d.ts +2 -2
  53. package/directives/hint/hint-hover.directive.d.ts +3 -4
  54. package/directives/hint/hint-manual.directive.d.ts +2 -2
  55. package/directives/hint/hint-options.directive.d.ts +3 -3
  56. package/directives/hint/hint-overflow.directive.d.ts +2 -2
  57. package/directives/hint/hint-position.directive.d.ts +4 -5
  58. package/directives/hint/hint-unstyled.component.d.ts +2 -7
  59. package/directives/hint/hint.component.d.ts +10 -11
  60. package/directives/hint/hint.directive.d.ts +9 -11
  61. package/directives/hint/index.d.ts +0 -2
  62. package/directives/icons/icons.bindings.d.ts +5 -0
  63. package/directives/icons/icons.directive.d.ts +6 -14
  64. package/directives/icons/index.d.ts +1 -0
  65. package/directives/index.d.ts +1 -1
  66. package/directives/notification/index.d.ts +2 -0
  67. package/directives/notification/notification.directive.d.ts +11 -0
  68. package/directives/notification/notification.service.d.ts +12 -0
  69. package/directives/popup/popup.directive.d.ts +6 -5
  70. package/directives/popup/popup.service.d.ts +1 -1
  71. package/directives/popup/popups.component.d.ts +2 -2
  72. package/directives/title/title.directive.d.ts +2 -3
  73. package/fesm2022/taiga-ui-core-components-alert.mjs +58 -97
  74. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-core-components-button.mjs +11 -18
  76. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-core-components-calendar.mjs +4 -3
  78. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-components-cell.mjs +45 -0
  80. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -0
  81. package/fesm2022/taiga-ui-core-components-data-list.mjs +7 -7
  82. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-components-dialog.mjs +89 -69
  84. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-components-error.mjs +108 -24
  86. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-core-components-expand.mjs +33 -131
  88. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-components-header.mjs +42 -0
  90. package/fesm2022/taiga-ui-core-components-header.mjs.map +1 -0
  91. package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
  92. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-core-components-label.mjs +6 -9
  94. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-components-link.mjs +6 -9
  96. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-core-components-loader.mjs +2 -2
  98. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-components-notification.mjs +13 -27
  100. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-components-root.mjs +17 -46
  102. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  104. package/fesm2022/taiga-ui-core-components-spin-button.mjs +4 -5
  105. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  106. package/fesm2022/taiga-ui-core-components-textfield.mjs +143 -248
  107. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  108. package/fesm2022/taiga-ui-core-components.mjs +2 -1
  109. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  110. package/fesm2022/taiga-ui-core-directives-appearance.mjs +21 -58
  111. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  112. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +34 -71
  113. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  114. package/fesm2022/taiga-ui-core-directives-group.mjs +6 -9
  115. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  116. package/fesm2022/taiga-ui-core-directives-hint.mjs +113 -211
  117. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  118. package/fesm2022/taiga-ui-core-directives-icons.mjs +30 -40
  119. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  120. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +2 -2
  121. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  122. package/fesm2022/taiga-ui-core-directives-notification.mjs +73 -0
  123. package/fesm2022/taiga-ui-core-directives-notification.mjs.map +1 -0
  124. package/fesm2022/taiga-ui-core-directives-popup.mjs +13 -20
  125. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
  126. package/fesm2022/taiga-ui-core-directives-title.mjs +11 -17
  127. package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
  128. package/fesm2022/taiga-ui-core-directives.mjs +1 -1
  129. package/fesm2022/taiga-ui-core-pipes-month.mjs +2 -1
  130. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-core-pipes.mjs +0 -1
  132. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-core-tokens.mjs +7 -6
  134. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +50 -4
  136. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  137. package/package.json +14 -14
  138. package/pipes/index.d.ts +0 -1
  139. package/styles/components/button.less +0 -2
  140. package/styles/components/icons.less +4 -4
  141. package/styles/mixins/mixins.less +0 -1
  142. package/styles/mixins/mixins.scss +0 -1
  143. package/styles/mixins/slider.less +21 -16
  144. package/tokens/i18n.d.ts +7 -7
  145. package/tokens/icon-resolver.d.ts +0 -4
  146. package/tokens/index.d.ts +1 -0
  147. package/tokens/validation-errors.d.ts +4 -0
  148. package/types/index.d.ts +0 -1
  149. package/utils/miscellaneous/index.d.ts +1 -0
  150. package/utils/miscellaneous/provide-taiga.d.ts +13 -0
  151. package/components/alert/alerts.component.d.ts +0 -12
  152. package/components/dialog/dialog.interfaces.d.ts +0 -34
  153. package/components/dialog/dialog.tokens.d.ts +0 -15
  154. package/components/expand/expand-content.directive.d.ts +0 -8
  155. package/components/expand/expand.d.ts +0 -6
  156. package/components/fullscreen/fullscreen.component.d.ts +0 -14
  157. package/components/fullscreen/index.d.ts +0 -1
  158. package/components/textfield/select.directive.d.ts +0 -19
  159. package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
  160. package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
  161. package/directives/dropdown/dropdown.service.d.ts +0 -6
  162. package/directives/dropdown/dropdowns.component.d.ts +0 -9
  163. package/directives/hint/hint.service.d.ts +0 -13
  164. package/directives/hint/hints.component.d.ts +0 -12
  165. package/directives/surface/index.d.ts +0 -1
  166. package/directives/surface/surface.directive.d.ts +0 -8
  167. package/fesm2022/taiga-ui-core-components-fullscreen.mjs +0 -66
  168. package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +0 -1
  169. package/fesm2022/taiga-ui-core-directives-surface.mjs +0 -50
  170. package/fesm2022/taiga-ui-core-directives-surface.mjs.map +0 -1
  171. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +0 -29
  172. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +0 -1
  173. package/pipes/fallback-src/fallback-src.pipe.d.ts +0 -9
  174. package/pipes/fallback-src/index.d.ts +0 -1
  175. package/types/portal-item.d.ts +0 -9
@@ -1,25 +1,30 @@
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, 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 i1 from '@taiga-ui/cdk/directives/animated';
7
- import { TuiAnimated, TuiAnimatedParent } from '@taiga-ui/cdk/directives/animated';
6
+ import * as i3 from '@taiga-ui/cdk/directives/active-zone';
7
+ import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
8
+ import * as i2 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';
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';
16
+ import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
17
+ import * as i1 from '@taiga-ui/core/directives/appearance';
18
+ import { tuiAppearance, TuiAppearance } from '@taiga-ui/core/directives/appearance';
14
19
  import { TuiPositionService, TuiVisualViewportService } from '@taiga-ui/core/services';
15
20
  import { TUI_VIEWPORT } from '@taiga-ui/core/tokens';
16
21
  import { tuiOverrideOptions, tuiIsObscured } from '@taiga-ui/core/utils';
17
- import { PolymorpheusComponent, injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
18
- import { BehaviorSubject, Subject, merge, switchMap, of, delay, takeUntil, repeat, filter, map, tap, takeWhile, distinctUntilChanged, fromEvent, debounce, timer, startWith, skip } from 'rxjs';
19
- 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';
20
25
  import { DOCUMENT } from '@angular/common';
21
- import { tuiIfMap, tuiTypedFromEvent, tuiZonefreeScheduler, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
22
- import { tuiIsNativeFocused } from '@taiga-ui/cdk/utils/focus';
26
+ import { tuiIfMap, tuiTypedFromEvent, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
27
+ import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
23
28
 
24
29
  /**
25
30
  * A component to display a hint
@@ -28,31 +33,6 @@ const TUI_HINT_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_HINT_COMPONENT' :
28
33
  factory: () => TuiHintComponent,
29
34
  });
30
35
 
31
- /**
32
- * Service for displaying hints/tooltips
33
- */
34
- class TuiHintService extends BehaviorSubject {
35
- constructor() {
36
- super([]);
37
- }
38
- add(directive) {
39
- this.next(this.value.concat(directive));
40
- }
41
- remove(directive) {
42
- if (this.value.includes(directive)) {
43
- this.next(this.value.filter((hint) => hint !== directive));
44
- }
45
- }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
47
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, providedIn: 'root' }); }
48
- }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintService, decorators: [{
50
- type: Injectable,
51
- args: [{
52
- providedIn: 'root',
53
- }]
54
- }], ctorParameters: () => [] });
55
-
56
36
  class TuiHintDriver extends TuiDriverDirective {
57
37
  constructor() {
58
38
  super(...arguments);
@@ -62,10 +42,7 @@ class TuiHintDriver extends TuiDriverDirective {
62
42
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintDriver, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
63
43
  }
64
44
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDriver, decorators: [{
65
- type: Directive,
66
- args: [{
67
- standalone: true,
68
- }]
45
+ type: Directive
69
46
  }] });
70
47
 
71
48
  const TUI_HINT_DIRECTIONS = [
@@ -157,11 +134,11 @@ class TuiHintHover extends TuiDriver {
157
134
  this.options = inject(TUI_HINT_OPTIONS);
158
135
  this.visible = false;
159
136
  this.toggle$ = new Subject();
160
- this.stream$ = merge(this.toggle$.pipe(switchMap((visible) => this.isMobile
161
- ? of(visible)
162
- : of(visible).pipe(delay(visible ? 0 : this.tuiHintHideDelay))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap((visible) => this.isMobile
163
- ? of(visible)
164
- : of(visible).pipe(delay(visible ? this.tuiHintShowDelay : this.tuiHintHideDelay))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled), map((value) => value &&
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 &&
165
142
  (this.el.hasAttribute('tuiHintPointer') || !tuiIsObscured(this.el))), tap((visible) => {
166
143
  this.visible = visible;
167
144
  }));
@@ -169,8 +146,12 @@ class TuiHintHover extends TuiDriver {
169
146
  optional: true,
170
147
  skipSelf: true,
171
148
  });
172
- this.tuiHintShowDelay = this.options.showDelay;
173
- this.tuiHintHideDelay = this.options.hideDelay;
149
+ this.showDelay = input(this.options.showDelay, {
150
+ alias: 'tuiHintShowDelay',
151
+ });
152
+ this.hideDelay = input(this.options.hideDelay, {
153
+ alias: 'tuiHintHideDelay',
154
+ });
174
155
  this.type = 'hint';
175
156
  this.enabled = true;
176
157
  }
@@ -182,20 +163,15 @@ class TuiHintHover extends TuiDriver {
182
163
  this.toggle$.next(false);
183
164
  }
184
165
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
185
- 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 }); }
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 }); }
186
167
  }
187
168
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHover, decorators: [{
188
169
  type: Directive,
189
170
  args: [{
190
- standalone: true,
191
171
  providers: [tuiAsDriver(TuiHintHover), TuiHoveredService],
192
172
  exportAs: 'tuiHintHover',
193
173
  }]
194
- }], ctorParameters: () => [], propDecorators: { tuiHintShowDelay: [{
195
- type: Input
196
- }], tuiHintHideDelay: [{
197
- type: Input
198
- }] } });
174
+ }], ctorParameters: () => [] });
199
175
 
200
176
  const GAP$1 = 8;
201
177
  const ARROW_OFFSET = 24;
@@ -209,14 +185,19 @@ class TuiHintPosition extends TuiPositionAccessor {
209
185
  this.viewport = inject(TUI_VIEWPORT);
210
186
  this.accessor = tuiFallbackAccessor('hint')(inject(TuiRectAccessor), inject(TuiHintDirective));
211
187
  this.points = TUI_HINT_DIRECTIONS.reduce((acc, direction) => ({ ...acc, [direction]: [0, 0] }), {});
212
- this.direction = inject(TUI_HINT_OPTIONS).direction;
213
- this.directionChange = new EventEmitter();
188
+ this.direction = input(inject(TUI_HINT_OPTIONS).direction, {
189
+ alias: 'tuiHintDirection',
190
+ });
191
+ this.directionChange = output({
192
+ alias: 'tuiHintDirectionChange',
193
+ });
214
194
  this.type = 'hint';
215
195
  }
216
196
  emitDirection(direction) {
217
197
  this.directionChange.emit(direction);
218
198
  }
219
199
  getPosition(rect, el) {
200
+ const direction = this.direction();
220
201
  const width = el?.clientWidth ?? rect.width;
221
202
  const height = el?.clientHeight ?? rect.height;
222
203
  const hostRect = this.accessor.getClientRect() ?? EMPTY_CLIENT_RECT;
@@ -247,14 +228,14 @@ class TuiHintPosition extends TuiPositionAccessor {
247
228
  this.points.right[LEFT] = this.points['right-top'][LEFT];
248
229
  this.points['right-bottom'][TOP] = this.points['left-bottom'][TOP];
249
230
  this.points['right-bottom'][LEFT] = this.points['right-top'][LEFT];
250
- const array = Array.isArray(this.direction) ? this.direction : [this.direction];
231
+ const array = Array.isArray(direction) ? direction : [direction];
251
232
  const priority = array.map((direction) => adjust(direction, rtl));
252
- const direction = priority
233
+ const updated = priority
253
234
  .concat(TUI_HINT_DIRECTIONS)
254
235
  .find((dir) => this.checkPosition(this.points[dir], width, height)) ||
255
236
  this.fallback;
256
- this.emitDirection(adjust(direction, rtl));
257
- return this.points[direction];
237
+ this.emitDirection(adjust(updated, rtl));
238
+ return this.points[updated];
258
239
  }
259
240
  get fallback() {
260
241
  return this.points.top[TOP] >
@@ -270,23 +251,14 @@ class TuiHintPosition extends TuiPositionAccessor {
270
251
  left + width < viewport.right - GAP$1);
271
252
  }
272
253
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
273
- 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 }); }
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 }); }
274
255
  }
275
256
  __decorate([
276
257
  tuiPure
277
258
  ], TuiHintPosition.prototype, "emitDirection", null);
278
259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPosition, decorators: [{
279
- type: Directive,
280
- args: [{
281
- standalone: true,
282
- }]
283
- }], propDecorators: { direction: [{
284
- type: Input,
285
- args: ['tuiHintDirection']
286
- }], directionChange: [{
287
- type: Output,
288
- args: ['tuiHintDirectionChange']
289
- }], emitDirection: [] } });
260
+ type: Directive
261
+ }], propDecorators: { emitDirection: [] } });
290
262
  function adjust(direction, rtl) {
291
263
  if (rtl && direction.includes('left')) {
292
264
  return direction.replace('left', 'right');
@@ -299,18 +271,19 @@ function adjust(direction, rtl) {
299
271
 
300
272
  class TuiHintDirective {
301
273
  constructor() {
302
- this.service = inject(TuiHintService);
303
- this.appearance = inject(TUI_HINT_OPTIONS).appearance;
304
- this.visible = new EventEmitter();
305
- this.content = signal(null);
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' });
306
281
  this.component = inject((PolymorpheusComponent));
307
282
  this.el = tuiInjectElement();
308
- this.activeZone = inject(TuiActiveZone, { optional: true });
309
283
  this.type = 'hint';
310
284
  }
311
- set tuiHint(content) {
312
- this.content.set(content);
313
- if (!content) {
285
+ ngOnChanges() {
286
+ if (!this.content()) {
314
287
  this.toggle(false);
315
288
  }
316
289
  }
@@ -321,16 +294,18 @@ class TuiHintDirective {
321
294
  return this.el.getBoundingClientRect();
322
295
  }
323
296
  toggle(show) {
324
- if (show && this.content()) {
325
- this.service.add(this);
297
+ if (show && this.content() && !this.ref) {
298
+ this.ref = this.service.add(this.component);
299
+ this.visible.emit(true);
326
300
  }
327
- else {
328
- this.service.remove(this);
301
+ else if (this.ref) {
302
+ this.ref.destroy();
303
+ this.ref = undefined;
304
+ this.visible.emit(false);
329
305
  }
330
- this.visible.emit(show);
331
306
  }
332
307
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
333
- 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: [
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: [
334
309
  tuiAsRectAccessor(TuiHintDirective),
335
310
  tuiAsVehicle(TuiHintDirective),
336
311
  {
@@ -338,12 +313,11 @@ class TuiHintDirective {
338
313
  deps: [TUI_HINT_COMPONENT, INJECTOR],
339
314
  useClass: PolymorpheusComponent,
340
315
  },
341
- ], 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 }); }
342
317
  }
343
318
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDirective, decorators: [{
344
319
  type: Directive,
345
320
  args: [{
346
- standalone: true,
347
321
  selector: '[tuiHint]:not(ng-container):not(ng-template)',
348
322
  providers: [
349
323
  tuiAsRectAccessor(TuiHintDirective),
@@ -367,18 +341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
367
341
  },
368
342
  ],
369
343
  }]
370
- }], propDecorators: { context: [{
371
- type: Input,
372
- args: ['tuiHintContext']
373
- }], appearance: [{
374
- type: Input,
375
- args: ['tuiHintAppearance']
376
- }], visible: [{
377
- type: Output,
378
- args: ['tuiHintVisible']
379
- }], tuiHint: [{
380
- type: Input
381
- }] } });
344
+ }] });
382
345
 
383
346
  class TuiHintPointer extends TuiHintHover {
384
347
  constructor() {
@@ -397,7 +360,6 @@ class TuiHintPointer extends TuiHintHover {
397
360
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintPointer, decorators: [{
398
361
  type: Directive,
399
362
  args: [{
400
- standalone: true,
401
363
  selector: '[tuiHint][tuiHintPointer]',
402
364
  providers: [tuiAsRectAccessor(TuiHintPointer), tuiAsDriver(TuiHintPointer)],
403
365
  host: {
@@ -408,24 +370,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
408
370
 
409
371
  class TuiHintUnstyledComponent {
410
372
  constructor() {
411
- this.context = injectContext();
373
+ this.hint = inject(TuiHintDirective);
412
374
  }
413
375
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
414
- 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 }); }
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 }); }
415
377
  }
416
378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyledComponent, decorators: [{
417
379
  type: Component,
418
380
  args: [{
419
381
  imports: [PolymorpheusOutlet],
420
- template: '<ng-container *polymorpheusOutlet="context.$implicit.content()" />',
382
+ template: '<ng-container *polymorpheusOutlet="hint.content()" />',
421
383
  changeDetection: ChangeDetectionStrategy.OnPush,
422
384
  }]
423
385
  }] });
424
386
  class TuiHintUnstyled {
425
387
  constructor() {
426
388
  const hint = inject((TuiHintDirective));
427
- hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent);
428
- hint.content.set(inject((TemplateRef)));
389
+ tuiSetSignal(hint.content, inject((TemplateRef)));
390
+ hint.component = new PolymorpheusComponent(TuiHintUnstyledComponent, inject(INJECTOR));
429
391
  }
430
392
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
431
393
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintUnstyled, isStandalone: true, selector: "ng-template[tuiHint]", ngImport: i0 }); }
@@ -433,7 +395,6 @@ class TuiHintUnstyled {
433
395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintUnstyled, decorators: [{
434
396
  type: Directive,
435
397
  args: [{
436
- standalone: true,
437
398
  selector: 'ng-template[tuiHint]',
438
399
  }]
439
400
  }], ctorParameters: () => [] });
@@ -445,8 +406,7 @@ const TUI_HINT_PROVIDERS = [
445
406
  tuiRectAccessorFor('hint', TuiHintDirective),
446
407
  ];
447
408
  const GAP = 8;
448
- // TODO(v5): remove base component after angular update
449
- class TuiHintBaseComponent {
409
+ class TuiHintComponent {
450
410
  constructor() {
451
411
  this.el = tuiInjectElement();
452
412
  this.hover = inject(TuiHintHover);
@@ -454,13 +414,15 @@ class TuiHintBaseComponent {
454
414
  this.viewport = inject(TUI_VIEWPORT);
455
415
  this.pointer = inject(TuiHintPointer, { optional: true });
456
416
  this.accessor = inject(TuiRectAccessor);
457
- this.hint = injectContext().$implicit;
417
+ this.hint = inject(TuiHintDirective);
458
418
  this.isMobile = inject(TUI_IS_MOBILE);
459
419
  this.content = this.hint.component.component === TuiHintUnstyledComponent
460
420
  ? signal('')
461
421
  : this.hint.content;
462
- this.appearance = this.hint.appearance ||
463
- this.hint.el.closest('[tuiTheme]')?.getAttribute('tuiTheme');
422
+ this.theme = this.hint.el
423
+ .closest('[tuiTheme]')
424
+ ?.getAttribute('tuiTheme');
425
+ this.appearance = tuiAppearance(this.hint.appearance);
464
426
  inject(TuiPositionService)
465
427
  .pipe(takeWhile(() => this.hint.el.isConnected), map((point) => this.vvs.correct(point)), takeUntilDestroyed())
466
428
  .subscribe({
@@ -498,154 +460,121 @@ class TuiHintBaseComponent {
498
460
  ]);
499
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));
500
462
  }
501
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
502
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintBaseComponent, isStandalone: true, selector: "ng-component", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "class._untouchable": "pointer", "class._mobile": "isMobile", "attr.data-appearance": "appearance", "attr.tuiTheme": "appearance === \"dark\" ? \"light\" : null" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
503
- }
504
- __decorate([
505
- tuiPure
506
- ], TuiHintBaseComponent.prototype, "apply", null);
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintBaseComponent, decorators: [{
508
- type: Component,
509
- args: [{
510
- standalone: true,
511
- template: '',
512
- changeDetection: ChangeDetectionStrategy.OnPush,
513
- host: {
514
- '[class._untouchable]': 'pointer',
515
- '[class._mobile]': 'isMobile',
516
- '[attr.data-appearance]': 'appearance',
517
- '[attr.tuiTheme]': 'appearance === "dark" ? "light" : null',
518
- '(document:click)': 'onClick($event.target)',
519
- },
520
- }]
521
- }], ctorParameters: () => [], propDecorators: { apply: [] } });
522
- class TuiHintComponent extends TuiHintBaseComponent {
523
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
524
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiHintComponent, isStandalone: true, selector: "tui-hint", providers: TUI_HINT_PROVIDERS, usesInheritance: true, hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: `
463
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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: `
525
465
  <ng-content />
526
466
  <span
527
- *polymorpheusOutlet="content() as text; context: hint.context"
467
+ *polymorpheusOutlet="content() as text; context: hint.context()"
528
468
  [innerHTML]="text"
529
469
  ></span>
530
- `, isInline: true, styles: [":host{position:absolute;max-inline-size:min(18rem,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[data-appearance=error]{background:var(--tui-status-negative)}:host[data-appearance=dark]{background:var(--tui-background-elevation-1);color:var(--tui-text-primary);filter:drop-shadow(0 0 .125rem rgba(0,0,0,.16)) drop-shadow(0 1.5rem 1rem rgba(0,0,0,.03)) drop-shadow(0 .75rem .75rem rgba(0,0,0,.04)) drop-shadow(0 .25rem .375rem rgba(0,0,0,.05))}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}\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 }); }
531
471
  }
472
+ __decorate([
473
+ tuiPure
474
+ ], TuiHintComponent.prototype, "apply", null);
532
475
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintComponent, decorators: [{
533
476
  type: Component,
534
477
  args: [{ selector: 'tui-hint', imports: [PolymorpheusOutlet], template: `
535
478
  <ng-content />
536
479
  <span
537
- *polymorpheusOutlet="content() as text; context: hint.context"
480
+ *polymorpheusOutlet="content() as text; context: hint.context()"
538
481
  [innerHTML]="text"
539
482
  ></span>
540
- `, changeDetection: ChangeDetectionStrategy.OnPush, providers: TUI_HINT_PROVIDERS, hostDirectives: [TuiAnimated], styles: [":host{position:absolute;max-inline-size:min(18rem,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[data-appearance=error]{background:var(--tui-status-negative)}:host[data-appearance=dark]{background:var(--tui-background-elevation-1);color:var(--tui-text-primary);filter:drop-shadow(0 0 .125rem rgba(0,0,0,.16)) drop-shadow(0 1.5rem 1rem rgba(0,0,0,.03)) drop-shadow(0 .75rem .75rem rgba(0,0,0,.04)) drop-shadow(0 .25rem .375rem rgba(0,0,0,.05))}:host:not([style*=top]){visibility:hidden}:host._untouchable{pointer-events:none}\n"] }]
541
- }] });
483
+ `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [TUI_HINT_PROVIDERS, tuiButtonOptionsProvider({ size: 's' })], hostDirectives: [TuiAppearance, TuiAnimated, TuiActiveZone], host: {
484
+ role: 'tooltip',
485
+ '[class._untouchable]': 'pointer',
486
+ '[class._mobile]': 'isMobile',
487
+ '[attr.tuiTheme]': 'theme',
488
+ '(document:click)': 'onClick($event.target)',
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"] }]
490
+ }], ctorParameters: () => [], propDecorators: { apply: [] } });
542
491
 
543
492
  class TuiHintDescribe extends TuiDriver {
544
493
  constructor() {
545
494
  super((subscriber) => this.stream$.subscribe(subscriber));
546
495
  this.doc = inject(DOCUMENT);
547
496
  this.el = tuiInjectElement();
548
- this.zone = inject(NgZone);
549
- this.id$ = new BehaviorSubject('');
550
- this.stream$ = this.id$.pipe(distinctUntilChanged(), tuiIfMap(() => fromEvent(this.doc, 'keydown', { capture: true }), tuiIsPresent), switchMap(() => this.focused
551
- ? of(false)
552
- : 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' });
553
499
  this.type = 'hint';
554
- }
555
- set tuiHintDescribe(id) {
556
- this.id$.next(id || '');
557
- }
558
- get element() {
559
- const id = this.id$.value;
560
- 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());
561
503
  }
562
504
  get focused() {
563
- return tuiIsNativeFocused(this.element);
505
+ return tuiIsFocused(this.element());
564
506
  }
565
507
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
566
- 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 }); }
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 }); }
567
509
  }
568
- __decorate([
569
- tuiPure
570
- ], TuiHintDescribe.prototype, "element", null);
571
510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintDescribe, decorators: [{
572
511
  type: Directive,
573
512
  args: [{
574
- standalone: true,
575
513
  selector: '[tuiHintDescribe]',
576
514
  providers: [tuiAsDriver(TuiHintDescribe)],
577
515
  }]
578
- }], ctorParameters: () => [], propDecorators: { tuiHintDescribe: [{
579
- type: Input
580
- }], element: [] } });
516
+ }], ctorParameters: () => [] });
581
517
 
582
518
  class TuiHintHost extends TuiRectAccessor {
583
519
  constructor() {
584
520
  super(...arguments);
521
+ this.tuiHintHost = input();
585
522
  this.type = 'hint';
586
523
  }
587
524
  getClientRect() {
588
- return this.tuiHintHost?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
525
+ return this.tuiHintHost()?.getBoundingClientRect() || EMPTY_CLIENT_RECT;
589
526
  }
590
527
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
591
- 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 }); }
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 }); }
592
529
  }
593
530
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintHost, decorators: [{
594
531
  type: Directive,
595
532
  args: [{
596
- standalone: true,
597
533
  selector: '[tuiHint][tuiHintHost]',
598
534
  providers: [tuiAsRectAccessor(TuiHintHost)],
599
535
  }]
600
- }], propDecorators: { tuiHintHost: [{
601
- type: Input
602
- }] } });
536
+ }] });
603
537
 
604
538
  class TuiHintManual extends TuiDriver {
605
539
  constructor() {
606
540
  super((subscriber) => this.stream$.subscribe(subscriber));
607
541
  this.hover = inject(TuiHintHover);
608
542
  this.stream$ = new BehaviorSubject(false);
609
- this.tuiHintManual = false;
543
+ this.visible = input(false, { alias: 'tuiHintManual' });
610
544
  this.type = 'hint';
611
545
  this.hover.enabled = false;
612
546
  }
613
547
  ngOnChanges() {
614
- this.stream$.next(!!this.tuiHintManual);
615
- this.hover.enabled = this.tuiHintManual === null;
548
+ this.stream$.next(!!this.visible());
549
+ this.hover.enabled = this.visible() === null;
616
550
  }
617
551
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
618
- 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 }); }
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 }); }
619
553
  }
620
554
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintManual, decorators: [{
621
555
  type: Directive,
622
556
  args: [{
623
- standalone: true,
624
557
  selector: '[tuiHint][tuiHintManual]',
625
558
  providers: [tuiAsDriver(TuiHintManual)],
626
559
  }]
627
- }], ctorParameters: () => [], propDecorators: { tuiHintManual: [{
628
- type: Input
629
- }] } });
560
+ }], ctorParameters: () => [] });
630
561
 
631
562
  class TuiHintOverflow {
632
563
  constructor() {
633
564
  this.hint = inject(TuiHintDirective);
634
- this.tuiHintOverflow = '';
565
+ this.content = input('', { alias: 'tuiHintOverflow' });
635
566
  }
636
567
  onMouseEnter({ scrollWidth, clientWidth, textContent }) {
637
- this.hint.tuiHint =
638
- scrollWidth > clientWidth && this.tuiHintOverflow !== null
639
- ? this.tuiHintOverflow || textContent
640
- : '';
568
+ tuiSetSignal(this.hint.content, scrollWidth > clientWidth && this.content() !== null
569
+ ? this.content() || textContent
570
+ : '');
641
571
  }
642
572
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
643
- 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 }); }
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 }); }
644
574
  }
645
575
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHintOverflow, decorators: [{
646
576
  type: Directive,
647
577
  args: [{
648
- standalone: true,
649
578
  selector: '[tuiHintOverflow]',
650
579
  hostDirectives: [
651
580
  {
@@ -657,9 +586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
657
586
  '(mouseenter)': 'onMouseEnter($event.currentTarget)',
658
587
  },
659
588
  }]
660
- }], propDecorators: { tuiHintOverflow: [{
661
- type: Input
662
- }] } });
589
+ }] });
663
590
 
664
591
  const TuiHint = [
665
592
  TuiHintComponent,
@@ -676,34 +603,9 @@ const TuiHint = [
676
603
  TuiHintPointer,
677
604
  ];
678
605
 
679
- class TuiHints {
680
- constructor() {
681
- this.hints$ = inject(TuiHintService);
682
- this.destroyRef = inject(DestroyRef);
683
- this.cdr = inject(ChangeDetectorRef);
684
- this.hints = [];
685
- }
686
- ngOnInit() {
687
- // Due to this view being parallel to app content, `markForCheck` from `async` pipe
688
- // can happen after view was checked, so calling `detectChanges` instead
689
- this.hints$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((hints) => {
690
- this.hints = hints;
691
- this.cdr.detectChanges();
692
- });
693
- }
694
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHints, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
695
- 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 }); }
696
- }
697
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiHints, decorators: [{
698
- type: Component,
699
- args: [{ selector: 'tui-hints', imports: [PolymorpheusOutlet, TuiActiveZone, TuiAnimatedParent], changeDetection: ChangeDetectionStrategy.Default, host: {
700
- 'aria-live': 'polite',
701
- }, 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"] }]
702
- }] });
703
-
704
606
  /**
705
607
  * Generated bundle index. Do not edit.
706
608
  */
707
609
 
708
- export { TUI_HINT_COMPONENT, TUI_HINT_DEFAULT_OPTIONS, TUI_HINT_DIRECTIONS, TUI_HINT_OPTIONS, TUI_HINT_PROVIDERS, TuiHint, TuiHintBaseComponent, TuiHintComponent, TuiHintDescribe, TuiHintDirective, TuiHintDriver, TuiHintHost, TuiHintHover, TuiHintManual, TuiHintOptionsDirective, TuiHintOverflow, TuiHintPointer, TuiHintPosition, TuiHintService, TuiHintUnstyled, TuiHintUnstyledComponent, TuiHints, tuiHintOptionsProvider };
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 };
709
611
  //# sourceMappingURL=taiga-ui-core-directives-hint.mjs.map