@ngneers/controls 0.0.1-next.0

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 (186) hide show
  1. package/fesm2022/ngneers-controls-accordion.mjs +234 -0
  2. package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
  3. package/fesm2022/ngneers-controls-api-ng.mjs +959 -0
  4. package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
  5. package/fesm2022/ngneers-controls-api-resize.mjs +712 -0
  6. package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
  7. package/fesm2022/ngneers-controls-api.mjs +347 -0
  8. package/fesm2022/ngneers-controls-api.mjs.map +1 -0
  9. package/fesm2022/ngneers-controls-avatar.mjs +77 -0
  10. package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
  11. package/fesm2022/ngneers-controls-base.mjs +620 -0
  12. package/fesm2022/ngneers-controls-base.mjs.map +1 -0
  13. package/fesm2022/ngneers-controls-breadcrumb.mjs +100 -0
  14. package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
  15. package/fesm2022/ngneers-controls-button-group.mjs +110 -0
  16. package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
  17. package/fesm2022/ngneers-controls-button.mjs +83 -0
  18. package/fesm2022/ngneers-controls-button.mjs.map +1 -0
  19. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs +74 -0
  20. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs.map +1 -0
  21. package/fesm2022/ngneers-controls-calendar.mjs +801 -0
  22. package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
  23. package/fesm2022/ngneers-controls-checkbox.mjs +63 -0
  24. package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
  25. package/fesm2022/ngneers-controls-chip.mjs +55 -0
  26. package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
  27. package/fesm2022/ngneers-controls-default-icons.mjs +82 -0
  28. package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -0
  29. package/fesm2022/ngneers-controls-defer.mjs +72 -0
  30. package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
  31. package/fesm2022/ngneers-controls-dialog.mjs +407 -0
  32. package/fesm2022/ngneers-controls-dialog.mjs.map +1 -0
  33. package/fesm2022/ngneers-controls-directives.mjs +498 -0
  34. package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
  35. package/fesm2022/ngneers-controls-drawer.mjs +271 -0
  36. package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
  37. package/fesm2022/ngneers-controls-edit-inplace.mjs +127 -0
  38. package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
  39. package/fesm2022/ngneers-controls-errors.mjs +329 -0
  40. package/fesm2022/ngneers-controls-errors.mjs.map +1 -0
  41. package/fesm2022/ngneers-controls-filter.mjs +708 -0
  42. package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
  43. package/fesm2022/ngneers-controls-hint.mjs +153 -0
  44. package/fesm2022/ngneers-controls-hint.mjs.map +1 -0
  45. package/fesm2022/ngneers-controls-i18n-translations-de.mjs +170 -0
  46. package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -0
  47. package/fesm2022/ngneers-controls-i18n-translations-en.mjs +170 -0
  48. package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -0
  49. package/fesm2022/ngneers-controls-i18n.mjs +57 -0
  50. package/fesm2022/ngneers-controls-i18n.mjs.map +1 -0
  51. package/fesm2022/ngneers-controls-icon.mjs +195 -0
  52. package/fesm2022/ngneers-controls-icon.mjs.map +1 -0
  53. package/fesm2022/ngneers-controls-inplace.mjs +150 -0
  54. package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
  55. package/fesm2022/ngneers-controls-input-field.mjs +165 -0
  56. package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
  57. package/fesm2022/ngneers-controls-input.mjs +72 -0
  58. package/fesm2022/ngneers-controls-input.mjs.map +1 -0
  59. package/fesm2022/ngneers-controls-item-view.mjs +473 -0
  60. package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
  61. package/fesm2022/ngneers-controls-list-box.mjs +281 -0
  62. package/fesm2022/ngneers-controls-list-box.mjs.map +1 -0
  63. package/fesm2022/ngneers-controls-mask-input.mjs +888 -0
  64. package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -0
  65. package/fesm2022/ngneers-controls-menu.mjs +371 -0
  66. package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
  67. package/fesm2022/ngneers-controls-message.mjs +30 -0
  68. package/fesm2022/ngneers-controls-message.mjs.map +1 -0
  69. package/fesm2022/ngneers-controls-number-input.mjs +366 -0
  70. package/fesm2022/ngneers-controls-number-input.mjs.map +1 -0
  71. package/fesm2022/ngneers-controls-paginator.mjs +129 -0
  72. package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
  73. package/fesm2022/ngneers-controls-popover.mjs +215 -0
  74. package/fesm2022/ngneers-controls-popover.mjs.map +1 -0
  75. package/fesm2022/ngneers-controls-progress.mjs +98 -0
  76. package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
  77. package/fesm2022/ngneers-controls-radio.mjs +152 -0
  78. package/fesm2022/ngneers-controls-radio.mjs.map +1 -0
  79. package/fesm2022/ngneers-controls-roving-focus.mjs +323 -0
  80. package/fesm2022/ngneers-controls-roving-focus.mjs.map +1 -0
  81. package/fesm2022/ngneers-controls-scroll-shadow.mjs +65 -0
  82. package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -0
  83. package/fesm2022/ngneers-controls-scroller.mjs +308 -0
  84. package/fesm2022/ngneers-controls-scroller.mjs.map +1 -0
  85. package/fesm2022/ngneers-controls-select-button.mjs +58 -0
  86. package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
  87. package/fesm2022/ngneers-controls-select.mjs +417 -0
  88. package/fesm2022/ngneers-controls-select.mjs.map +1 -0
  89. package/fesm2022/ngneers-controls-slider.mjs +167 -0
  90. package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
  91. package/fesm2022/ngneers-controls-snackbar.mjs +414 -0
  92. package/fesm2022/ngneers-controls-snackbar.mjs.map +1 -0
  93. package/fesm2022/ngneers-controls-spin-buttons.mjs +126 -0
  94. package/fesm2022/ngneers-controls-spin-buttons.mjs.map +1 -0
  95. package/fesm2022/ngneers-controls-spinner.mjs +184 -0
  96. package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
  97. package/fesm2022/ngneers-controls-splitter.mjs +604 -0
  98. package/fesm2022/ngneers-controls-splitter.mjs.map +1 -0
  99. package/fesm2022/ngneers-controls-state.mjs +185 -0
  100. package/fesm2022/ngneers-controls-state.mjs.map +1 -0
  101. package/fesm2022/ngneers-controls-switch.mjs +39 -0
  102. package/fesm2022/ngneers-controls-switch.mjs.map +1 -0
  103. package/fesm2022/ngneers-controls-table.mjs +2634 -0
  104. package/fesm2022/ngneers-controls-table.mjs.map +1 -0
  105. package/fesm2022/ngneers-controls-tabs.mjs +336 -0
  106. package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
  107. package/fesm2022/ngneers-controls-tag.mjs +30 -0
  108. package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
  109. package/fesm2022/ngneers-controls-toast.mjs +350 -0
  110. package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
  111. package/fesm2022/ngneers-controls-toggle-button.mjs +70 -0
  112. package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
  113. package/fesm2022/ngneers-controls-tooltip.mjs +506 -0
  114. package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
  115. package/fesm2022/ngneers-controls-tree.mjs +599 -0
  116. package/fesm2022/ngneers-controls-tree.mjs.map +1 -0
  117. package/fesm2022/ngneers-controls-upload.mjs +377 -0
  118. package/fesm2022/ngneers-controls-upload.mjs.map +1 -0
  119. package/fesm2022/ngneers-controls-utils-ng.mjs +411 -0
  120. package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
  121. package/fesm2022/ngneers-controls-utils.mjs +261 -0
  122. package/fesm2022/ngneers-controls-utils.mjs.map +1 -0
  123. package/fesm2022/ngneers-controls.mjs +6 -0
  124. package/fesm2022/ngneers-controls.mjs.map +1 -0
  125. package/package.json +302 -0
  126. package/types/ngneers-controls-accordion.d.ts +139 -0
  127. package/types/ngneers-controls-api-ng.d.ts +364 -0
  128. package/types/ngneers-controls-api-resize.d.ts +318 -0
  129. package/types/ngneers-controls-api.d.ts +145 -0
  130. package/types/ngneers-controls-avatar.d.ts +54 -0
  131. package/types/ngneers-controls-base.d.ts +277 -0
  132. package/types/ngneers-controls-breadcrumb.d.ts +272 -0
  133. package/types/ngneers-controls-button-group.d.ts +46 -0
  134. package/types/ngneers-controls-button.d.ts +48 -0
  135. package/types/ngneers-controls-calendar.d.ts +466 -0
  136. package/types/ngneers-controls-checkbox.d.ts +40 -0
  137. package/types/ngneers-controls-chip.d.ts +202 -0
  138. package/types/ngneers-controls-default-icons.d.ts +5 -0
  139. package/types/ngneers-controls-defer.d.ts +48 -0
  140. package/types/ngneers-controls-dialog.d.ts +399 -0
  141. package/types/ngneers-controls-directives.d.ts +171 -0
  142. package/types/ngneers-controls-drawer.d.ts +308 -0
  143. package/types/ngneers-controls-edit-inplace.d.ts +263 -0
  144. package/types/ngneers-controls-errors.d.ts +155 -0
  145. package/types/ngneers-controls-filter.d.ts +609 -0
  146. package/types/ngneers-controls-hint.d.ts +88 -0
  147. package/types/ngneers-controls-i18n-translations-de.d.ts +164 -0
  148. package/types/ngneers-controls-i18n-translations-en.d.ts +164 -0
  149. package/types/ngneers-controls-i18n.d.ts +186 -0
  150. package/types/ngneers-controls-icon.d.ts +68 -0
  151. package/types/ngneers-controls-inplace.d.ts +98 -0
  152. package/types/ngneers-controls-input-field.d.ts +248 -0
  153. package/types/ngneers-controls-input.d.ts +30 -0
  154. package/types/ngneers-controls-item-view.d.ts +215 -0
  155. package/types/ngneers-controls-list-box.d.ts +334 -0
  156. package/types/ngneers-controls-mask-input.d.ts +434 -0
  157. package/types/ngneers-controls-menu.d.ts +192 -0
  158. package/types/ngneers-controls-message.d.ts +21 -0
  159. package/types/ngneers-controls-number-input.d.ts +146 -0
  160. package/types/ngneers-controls-paginator.d.ts +255 -0
  161. package/types/ngneers-controls-popover.d.ts +116 -0
  162. package/types/ngneers-controls-progress.d.ts +49 -0
  163. package/types/ngneers-controls-radio.d.ts +91 -0
  164. package/types/ngneers-controls-roving-focus.d.ts +107 -0
  165. package/types/ngneers-controls-scroll-shadow.d.ts +25 -0
  166. package/types/ngneers-controls-scroller.d.ts +151 -0
  167. package/types/ngneers-controls-select-button.d.ts +51 -0
  168. package/types/ngneers-controls-select.d.ts +409 -0
  169. package/types/ngneers-controls-slider.d.ts +57 -0
  170. package/types/ngneers-controls-snackbar.d.ts +330 -0
  171. package/types/ngneers-controls-spin-buttons.d.ts +69 -0
  172. package/types/ngneers-controls-spinner.d.ts +117 -0
  173. package/types/ngneers-controls-splitter.d.ts +465 -0
  174. package/types/ngneers-controls-state.d.ts +102 -0
  175. package/types/ngneers-controls-switch.d.ts +18 -0
  176. package/types/ngneers-controls-table.d.ts +3127 -0
  177. package/types/ngneers-controls-tabs.d.ts +118 -0
  178. package/types/ngneers-controls-tag.d.ts +21 -0
  179. package/types/ngneers-controls-toast.d.ts +298 -0
  180. package/types/ngneers-controls-toggle-button.d.ts +48 -0
  181. package/types/ngneers-controls-tooltip.d.ts +189 -0
  182. package/types/ngneers-controls-tree.d.ts +409 -0
  183. package/types/ngneers-controls-upload.d.ts +347 -0
  184. package/types/ngneers-controls-utils-ng.d.ts +129 -0
  185. package/types/ngneers-controls-utils.d.ts +130 -0
  186. package/types/ngneers-controls.d.ts +2 -0
@@ -0,0 +1,506 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, ViewContainerRef, signal, input, computed, effect, afterRenderEffect, TemplateRef, Directive, viewChild, DOCUMENT, Component } from '@angular/core';
3
+ import { NGN_CONFIG, abortSignalOnDestroy, autoPositionElement, splitPlacement, roundByDpr } from '@ngneers/controls/api/ng';
4
+ import { NgnBase, provideSelf, NgnPt } from '@ngneers/controls/base';
5
+ import { NgnDefer } from '@ngneers/controls/defer';
6
+ import { getTimeSpanMilliseconds, notNullish } from '@ngneers/controls/utils';
7
+ import { generateElementId, computedWithPrevious } from '@ngneers/controls/utils-ng';
8
+ import { tooltipControlTemplate } from '@ngneers/controls-themes/templates/tooltip';
9
+
10
+ const relativeAnchorElementPosition = {
11
+ name: 'relativeAnchorElementPosition',
12
+ async fn(state) {
13
+ const { placement, rects } = state;
14
+ const axis = getAxis(placement);
15
+ const axisSize = axis === 'x' ? 'width' : 'height';
16
+ return {
17
+ data: {
18
+ start: rects.reference[axis] - state[axis],
19
+ center: rects.reference[axis] + rects.reference[axisSize] / 2 - state[axis],
20
+ end: rects.reference[axis] + rects.reference[axisSize] - state[axis],
21
+ },
22
+ };
23
+ },
24
+ };
25
+ function getAxis(placement) {
26
+ switch (placement.split('-')[0]) {
27
+ case 'top':
28
+ case 'bottom':
29
+ return 'x';
30
+ case 'left':
31
+ case 'right':
32
+ return 'y';
33
+ default:
34
+ throw new Error(`Unknown placement: ${placement}`);
35
+ }
36
+ }
37
+
38
+ /**
39
+ * @category control
40
+ */
41
+ class NgnTooltip extends NgnBase {
42
+ theme = null;
43
+ _viewContainerRef = inject(ViewContainerRef);
44
+ _config = inject(NGN_CONFIG);
45
+ _tooltip = signal(null, /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "_tooltip" }] : /* istanbul ignore next */ []));
47
+ /**
48
+ * The content of the tooltip, can be a string or a TemplateRef.
49
+ * If the value is falsy, the tooltip will not be shown.
50
+ * @alias ngnTooltip
51
+ */
52
+ content = input(null, { ...(ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {}), alias: 'ngnTooltip' });
53
+ /**
54
+ * If set to `true`, the tooltip will only be shown if the anchor element is truncated. `""` is equivalent to `true`.
55
+ * @alias ngnTooltipShowOnlyIfTruncated
56
+ * @default false
57
+ */
58
+ showOnlyIfTruncated = input(false, { ...(ngDevMode ? { debugName: "showOnlyIfTruncated" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipShowOnlyIfTruncated' });
59
+ /**
60
+ * The size constraints for the tooltip.
61
+ * This can be used to limit the width and height of the tooltip.
62
+ * If not provided, the tooltip is only constrained by the size of the screen.
63
+ * @alias ngnTooltipSize
64
+ */
65
+ size = input(null, { ...(ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipSize' });
66
+ /**
67
+ * The options for the tooltip.
68
+ * This is a shorthand for setting multiple options at once.
69
+ * The individual options take precedence over the options set here.
70
+ * @alias ngnTooltipOptions
71
+ */
72
+ options = input(null, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipOptions' });
73
+ /**
74
+ * The placement of the tooltip relative to the anchor element.
75
+ * @alias ngnTooltipPlacement
76
+ * @default 'bottom'
77
+ */
78
+ placement = input(null, { ...(ngDevMode ? { debugName: "placement" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipPlacement' });
79
+ /**
80
+ * The offset in Pixels of the tooltip from the anchor element.
81
+ * @alias ngnTooltipOffset
82
+ * @default 4
83
+ */
84
+ offset = input(null, { ...(ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipOffset' });
85
+ /**
86
+ * The delay before the tooltip is shown. If a number is provided, it is interpreted as milliseconds.
87
+ * @alias ngnTooltipShowDelay
88
+ * @default '0.5s'
89
+ */
90
+ showDelay = input(null, { ...(ngDevMode ? { debugName: "showDelay" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipShowDelay' });
91
+ /**
92
+ * The delay before the tooltip is hidden. If a number is provided, it is interpreted as milliseconds.
93
+ * @alias ngnTooltipHideDelay
94
+ * @default '0.1s'
95
+ */
96
+ hideDelay = input(null, { ...(ngDevMode ? { debugName: "hideDelay" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipHideDelay' });
97
+ /**
98
+ * Whether to show an arrow pointing to the anchor element. `""` is equivalent to `true`.
99
+ * @alias ngnTooltipShowArrow
100
+ * @default true
101
+ */
102
+ showArrow = input(null, { ...(ngDevMode ? { debugName: "showArrow" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipShowArrow' });
103
+ /**
104
+ * Shows the tooltip on hover.
105
+ * @alias ngnTooltipShowOnHover
106
+ * @default true
107
+ */
108
+ showOnHover = input(null, { ...(ngDevMode ? { debugName: "showOnHover" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipShowOnHover' });
109
+ /**
110
+ * Shows the tooltip on focus.
111
+ * @alias ngnTooltipShowOnFocus
112
+ * @default true
113
+ */
114
+ showOnFocus = input(null, { ...(ngDevMode ? { debugName: "showOnFocus" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipShowOnFocus' });
115
+ /**
116
+ * Hides the tooltip (without delay) when the mouse hovers over the tooltip.
117
+ * @alias ngnTooltipHideOnTooltipHover
118
+ * @default false
119
+ */
120
+ hideOnTooltipHover = input(null, { ...(ngDevMode ? { debugName: "hideOnTooltipHover" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipHideOnTooltipHover' });
121
+ /**
122
+ * Hides the tooltip (without delay) when the user clicks on the tooltip.
123
+ * @alias ngnTooltipHideOnClick
124
+ * @default true
125
+ */
126
+ hideOnClick = input(null, { ...(ngDevMode ? { debugName: "hideOnClick" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipHideOnClick' });
127
+ /**
128
+ * Whether to automatically manage ARIA attributes for the tooltip.
129
+ * @alias ngnTooltipAutoAriaMode
130
+ * @default 'description'
131
+ */
132
+ autoAriaMode = input(null, { ...(ngDevMode ? { debugName: "autoAriaMode" } : /* istanbul ignore next */ {}), alias: 'ngnTooltipAutoAriaMode' });
133
+ effectiveOptions = computed(() => {
134
+ const defaults = this._config.defaults.tooltip;
135
+ return {
136
+ placement: this.placement() ?? this.options()?.placement ?? defaults.placement,
137
+ offset: this.offset() ?? this.options()?.offset ?? defaults.offset,
138
+ showDelay: this.showDelay() ?? this.options()?.showDelay ?? defaults.showDelay,
139
+ hideDelay: this.hideDelay() ?? this.options()?.hideDelay ?? defaults.hideDelay,
140
+ showArrow: (this.showArrow() ?? this.options()?.showArrow ?? defaults.showArrow) !== false,
141
+ showOnHover: (this.showOnHover() ?? this.options()?.showOnHover ?? defaults.showOnHover) !== false,
142
+ showOnFocus: (this.showOnFocus() ?? this.options()?.showOnFocus ?? defaults.showOnFocus) !== false,
143
+ hideOnTooltipHover: (this.hideOnTooltipHover() ??
144
+ this.options()?.hideOnTooltipHover ??
145
+ defaults.hideOnTooltipHover) !== false,
146
+ hideOnClick: (this.hideOnClick() ?? this.options()?.hideOnClick ?? defaults.hideOnClick) !== false,
147
+ autoAriaMode: this.autoAriaMode() ?? this.options()?.autoAriaMode ?? defaults.autoAriaMode,
148
+ };
149
+ }, /* @ts-ignore */
150
+ ...(ngDevMode ? [{ debugName: "effectiveOptions" }] : /* istanbul ignore next */ []));
151
+ tooltip = computed(() => this._tooltip()?.instance, /* @ts-ignore */
152
+ ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
153
+ constructor() {
154
+ super();
155
+ const abortSignal = abortSignalOnDestroy();
156
+ this.element.nativeElement.addEventListener('mouseenter', this.onMouseEnter.bind(this), {
157
+ signal: abortSignal,
158
+ });
159
+ this.element.nativeElement.addEventListener('mouseleave', this.onMouseLeave.bind(this), {
160
+ signal: abortSignal,
161
+ });
162
+ this.element.nativeElement.addEventListener('focus', this.onFocus.bind(this), {
163
+ signal: abortSignal,
164
+ });
165
+ this.element.nativeElement.addEventListener('blur', this.onBlur.bind(this), {
166
+ signal: abortSignal,
167
+ });
168
+ effect(() => {
169
+ const tooltip = this._tooltip();
170
+ if (tooltip)
171
+ this.updateContent(tooltip);
172
+ });
173
+ effect(() => this._tooltip()?.setInput('showOnlyIfTruncated', this.showOnlyIfTruncated()));
174
+ effect(() => this._tooltip()?.setInput('size', this.size()));
175
+ effect(() => this._tooltip()?.setInput('options', this.effectiveOptions()));
176
+ afterRenderEffect(() => {
177
+ const el = this.element.nativeElement;
178
+ const content = this.content();
179
+ const autoAriaMode = this.effectiveOptions().autoAriaMode;
180
+ el.removeAttribute('aria-label');
181
+ el.removeAttribute('aria-description');
182
+ el.removeAttribute('aria-labelledby');
183
+ el.removeAttribute('aria-describedby');
184
+ if (autoAriaMode === 'none' || !content) {
185
+ return;
186
+ }
187
+ const tooltip = this.tooltip();
188
+ const isShown = tooltip?.isShown() ?? false;
189
+ if (typeof content === 'string') {
190
+ if (isShown && tooltip) {
191
+ const attr = autoAriaMode === 'label' ? 'aria-labelledby' : 'aria-describedby';
192
+ el.setAttribute(attr, tooltip.id);
193
+ }
194
+ else {
195
+ const attr = autoAriaMode === 'label' ? 'aria-label' : 'aria-description';
196
+ el.setAttribute(attr, content);
197
+ }
198
+ }
199
+ else if (content instanceof TemplateRef && isShown && tooltip) {
200
+ const attr = autoAriaMode === 'label' ? 'aria-labelledby' : 'aria-describedby';
201
+ el.setAttribute(attr, tooltip.id);
202
+ }
203
+ });
204
+ }
205
+ ngOnDestroy() {
206
+ this._tooltip()?.destroy();
207
+ this._tooltip.set(null);
208
+ }
209
+ show() {
210
+ const tooltip = this._tooltip();
211
+ if (tooltip) {
212
+ tooltip.instance.show();
213
+ }
214
+ else {
215
+ const tooltip = this.getTooltip();
216
+ if (tooltip) {
217
+ requestAnimationFrame(() => tooltip.show());
218
+ }
219
+ }
220
+ }
221
+ hide() {
222
+ this._tooltip()?.instance.hide();
223
+ }
224
+ onMouseEnter() {
225
+ if (this.effectiveOptions().showOnHover) {
226
+ this.show();
227
+ }
228
+ }
229
+ onMouseLeave() {
230
+ if (this.effectiveOptions().showOnHover) {
231
+ this.hide();
232
+ }
233
+ }
234
+ onFocus() {
235
+ if (this.effectiveOptions().showOnFocus) {
236
+ this.show();
237
+ }
238
+ }
239
+ onBlur() {
240
+ if (this.effectiveOptions().showOnFocus) {
241
+ this.hide();
242
+ }
243
+ }
244
+ getTooltip() {
245
+ let tooltip = this._tooltip();
246
+ if (!tooltip && this.content()) {
247
+ tooltip = this._viewContainerRef.createComponent(TooltipComponent);
248
+ tooltip.setInput('anchor', this.element.nativeElement);
249
+ this.updateContent(tooltip);
250
+ tooltip.setInput('showOnlyIfTruncated', this.showOnlyIfTruncated());
251
+ tooltip.setInput('size', this.size());
252
+ tooltip.setInput('options', this.effectiveOptions());
253
+ this._tooltip.set(tooltip);
254
+ }
255
+ return tooltip?.instance;
256
+ }
257
+ updateContent(tooltip) {
258
+ const content = this.content();
259
+ if (content instanceof TemplateRef) {
260
+ tooltip.setInput('text', null);
261
+ tooltip.setInput('content', content);
262
+ }
263
+ else {
264
+ tooltip.setInput('text', content);
265
+ tooltip.setInput('content', null);
266
+ }
267
+ }
268
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnTooltip, deps: [], target: i0.ɵɵFactoryTarget.Directive });
269
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: NgnTooltip, isStandalone: true, selector: "[ngnTooltip]", inputs: { content: { classPropertyName: "content", publicName: "ngnTooltip", isSignal: true, isRequired: false, transformFunction: null }, showOnlyIfTruncated: { classPropertyName: "showOnlyIfTruncated", publicName: "ngnTooltipShowOnlyIfTruncated", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "ngnTooltipSize", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "ngnTooltipOptions", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngnTooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngnTooltipOffset", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "ngnTooltipShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "ngnTooltipHideDelay", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "ngnTooltipShowArrow", isSignal: true, isRequired: false, transformFunction: null }, showOnHover: { classPropertyName: "showOnHover", publicName: "ngnTooltipShowOnHover", isSignal: true, isRequired: false, transformFunction: null }, showOnFocus: { classPropertyName: "showOnFocus", publicName: "ngnTooltipShowOnFocus", isSignal: true, isRequired: false, transformFunction: null }, hideOnTooltipHover: { classPropertyName: "hideOnTooltipHover", publicName: "ngnTooltipHideOnTooltipHover", isSignal: true, isRequired: false, transformFunction: null }, hideOnClick: { classPropertyName: "hideOnClick", publicName: "ngnTooltipHideOnClick", isSignal: true, isRequired: false, transformFunction: null }, autoAriaMode: { classPropertyName: "autoAriaMode", publicName: "ngnTooltipAutoAriaMode", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideSelf(NgnTooltip)], exportAs: ["ngnTooltip"], usesInheritance: true, ngImport: i0 });
270
+ }
271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnTooltip, decorators: [{
272
+ type: Directive,
273
+ args: [{
274
+ selector: '[ngnTooltip]',
275
+ exportAs: 'ngnTooltip',
276
+ providers: [provideSelf(NgnTooltip)],
277
+ }]
278
+ }], ctorParameters: () => [], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltip", required: false }] }], showOnlyIfTruncated: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipShowOnlyIfTruncated", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipSize", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipOptions", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipPlacement", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipOffset", required: false }] }], showDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipShowDelay", required: false }] }], hideDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipHideDelay", required: false }] }], showArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipShowArrow", required: false }] }], showOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipShowOnHover", required: false }] }], showOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipShowOnFocus", required: false }] }], hideOnTooltipHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipHideOnTooltipHover", required: false }] }], hideOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipHideOnClick", required: false }] }], autoAriaMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngnTooltipAutoAriaMode", required: false }] }] } });
279
+ class TooltipComponent extends NgnBase {
280
+ _showHideTimeout;
281
+ theme = this.injectThemeTemplate(tooltipControlTemplate, {
282
+ root: true,
283
+ closing: () => this.isClosing(),
284
+ 'with-arrow': () => this.options().showArrow !== false,
285
+ });
286
+ _config = inject(NGN_CONFIG);
287
+ /**
288
+ * The anchor element to which the tooltip is attached.
289
+ */
290
+ anchor = input.required(/* @ts-ignore */
291
+ ...(ngDevMode ? [{ debugName: "anchor" }] : /* istanbul ignore next */ []));
292
+ /**
293
+ * The text content of the tooltip.
294
+ */
295
+ text = input(/* @ts-ignore */
296
+ ...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
297
+ /**
298
+ * The content template of the tooltip.
299
+ */
300
+ content = input(/* @ts-ignore */
301
+ ...(ngDevMode ? [undefined, { debugName: "content" }] : /* istanbul ignore next */ []));
302
+ /**
303
+ * If set to `true`, the tooltip will only be shown if the anchor element is truncated. `""` is equivalent to `true`.
304
+ * @default `false`
305
+ */
306
+ showOnlyIfTruncated = input(false, /* @ts-ignore */
307
+ ...(ngDevMode ? [{ debugName: "showOnlyIfTruncated" }] : /* istanbul ignore next */ []));
308
+ /**
309
+ * The size constraints for the tooltip.
310
+ * This can be used to limit the width and height of the tooltip.
311
+ * If not provided, the tooltip is only constrained by the size of the screen.
312
+ */
313
+ size = input(/* @ts-ignore */
314
+ ...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
315
+ /**
316
+ * The options for the tooltip.
317
+ *
318
+ */
319
+ options = input(this._config.defaults.tooltip, /* @ts-ignore */
320
+ ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
321
+ showDelayMs = computed(() => getTimeSpanMilliseconds(this.options().showDelay), /* @ts-ignore */
322
+ ...(ngDevMode ? [{ debugName: "showDelayMs" }] : /* istanbul ignore next */ []));
323
+ hideDelayMs = computed(() => getTimeSpanMilliseconds(this.options().hideDelay), /* @ts-ignore */
324
+ ...(ngDevMode ? [{ debugName: "hideDelayMs" }] : /* istanbul ignore next */ []));
325
+ position = signal({ x: 0, y: 0 }, /* @ts-ignore */
326
+ ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
327
+ positionClass = signal('', /* @ts-ignore */
328
+ ...(ngDevMode ? [{ debugName: "positionClass" }] : /* istanbul ignore next */ []));
329
+ relativeAnchorElementPosition = signal(undefined, /* @ts-ignore */
330
+ ...(ngDevMode ? [{ debugName: "relativeAnchorElementPosition" }] : /* istanbul ignore next */ []));
331
+ _isShown = signal(false, /* @ts-ignore */
332
+ ...(ngDevMode ? [{ debugName: "_isShown" }] : /* istanbul ignore next */ []));
333
+ _isClosing = signal(false, /* @ts-ignore */
334
+ ...(ngDevMode ? [{ debugName: "_isClosing" }] : /* istanbul ignore next */ []));
335
+ id = generateElementId();
336
+ isShown = this._isShown.asReadonly();
337
+ isClosing = this._isClosing.asReadonly();
338
+ _defaultContentTemplate = viewChild.required('defaultContentTemplate');
339
+ contentTemplate = computed(() => this.content() ?? this._defaultContentTemplate(), /* @ts-ignore */
340
+ ...(ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []));
341
+ _autoPos = computedWithPrevious(prev => {
342
+ prev?.stop();
343
+ const element = this.element.nativeElement;
344
+ if (!element) {
345
+ return undefined;
346
+ }
347
+ return autoPositionElement(this.anchor(), element, {
348
+ injector: this.injector,
349
+ stopped: true,
350
+ resize: false,
351
+ sizeConstraints: this.size() ?? undefined,
352
+ placement: this.options().placement,
353
+ offset: this.options().offset,
354
+ middleware: [relativeAnchorElementPosition],
355
+ disableSettingStyles: true,
356
+ strategy: 'fixed',
357
+ onPositionChange: ({ x, y, placement, middlewareData }) => {
358
+ this.relativeAnchorElementPosition.set(middlewareData[relativeAnchorElementPosition.name]);
359
+ this.position.set({ x, y });
360
+ this.positionClass.set(splitPlacement(placement)
361
+ .filter(notNullish)
362
+ .map(x => this.theme.class(x))
363
+ .join(' '));
364
+ },
365
+ });
366
+ });
367
+ // Stable reference so addEventListener/removeEventListener target the same
368
+ // handler; `.bind()` returns a new function each call, which would leak
369
+ // listeners (remove never matches, add re-registers on every effect run).
370
+ onDocumentKeyDownBound = (event) => this.onDocumentKeyDown(event);
371
+ constructor() {
372
+ super();
373
+ const document = inject(DOCUMENT);
374
+ const destroyAbortSignal = abortSignalOnDestroy();
375
+ effect(() => {
376
+ if (this.isShown() && !this.isClosing()) {
377
+ document.addEventListener('keydown', this.onDocumentKeyDownBound, {
378
+ signal: destroyAbortSignal,
379
+ });
380
+ }
381
+ else {
382
+ document.removeEventListener('keydown', this.onDocumentKeyDownBound);
383
+ }
384
+ });
385
+ effect(() => {
386
+ if (this.isShown()) {
387
+ this._autoPos()?.start();
388
+ }
389
+ else {
390
+ this._autoPos()?.stop();
391
+ }
392
+ });
393
+ }
394
+ show(skipDelay = false) {
395
+ clearTimeout(this._showHideTimeout);
396
+ const delay = skipDelay ? 0 : this.showDelayMs();
397
+ if (delay <= 0) {
398
+ this.onShow();
399
+ }
400
+ else {
401
+ this._showHideTimeout = setTimeout(() => this.onShow(), delay);
402
+ }
403
+ }
404
+ hide(skipDelay = false) {
405
+ clearTimeout(this._showHideTimeout);
406
+ const delay = skipDelay ? 0 : this.hideDelayMs();
407
+ if (delay <= 0) {
408
+ this.onHide();
409
+ }
410
+ else {
411
+ this._showHideTimeout = setTimeout(() => this.onHide(), delay);
412
+ }
413
+ }
414
+ onMouseEnter() {
415
+ if (this.options().hideOnTooltipHover) {
416
+ this.hide(true);
417
+ }
418
+ else {
419
+ this.show(true);
420
+ }
421
+ }
422
+ onMouseLeave() {
423
+ this.hide();
424
+ }
425
+ onClick(event) {
426
+ if (this.options().hideOnClick) {
427
+ this.hide(true);
428
+ }
429
+ event.stopPropagation();
430
+ }
431
+ onDocumentKeyDown(event) {
432
+ if (event.key === 'Escape' || event.key === 'Esc') {
433
+ this.hide(true);
434
+ event.preventDefault();
435
+ }
436
+ }
437
+ onShow() {
438
+ if (!this.content() && !this.text()) {
439
+ return;
440
+ }
441
+ if (this.showOnlyIfTruncated() !== false && !isElementTruncated(this.anchor())) {
442
+ return;
443
+ }
444
+ this._isShown.set(true);
445
+ this.element.nativeElement.showPopover();
446
+ }
447
+ onHide() {
448
+ this._isClosing.set(true);
449
+ requestAnimationFrame(() => {
450
+ Promise.all(this.element.nativeElement.getAnimations().map(a => a.finished))
451
+ .then(() => this.element.nativeElement.hidePopover())
452
+ .catch(() => { })
453
+ .finally(() => this._isClosing.set(false));
454
+ });
455
+ }
456
+ onToggle(event) {
457
+ const evt = event;
458
+ if (evt.newState === 'closed') {
459
+ this._isShown.set(false);
460
+ }
461
+ else {
462
+ this._isShown.set(true);
463
+ }
464
+ }
465
+ toPixels(value) {
466
+ if (value === undefined) {
467
+ return undefined;
468
+ }
469
+ return `${roundByDpr(this.element.nativeElement, value)}px`;
470
+ }
471
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
472
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: TooltipComponent, isStandalone: true, selector: "ngn-tooltip", inputs: { anchor: { classPropertyName: "anchor", publicName: "anchor", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, showOnlyIfTruncated: { classPropertyName: "showOnlyIfTruncated", publicName: "showOnlyIfTruncated", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "toggle": "onToggle($event)", "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick($event)" }, properties: { "class": "positionClass()", "style.--anchor-start": "toPixels(relativeAnchorElementPosition()?.start)", "style.--anchor-center": "toPixels(relativeAnchorElementPosition()?.center)", "style.--anchor-end": "toPixels(relativeAnchorElementPosition()?.end)", "style.left": "toPixels(position().x)", "style.top": "toPixels(position().y)", "attr.popover": "'hint'", "attr.id": "id", "attr.role": "'tooltip'", "attr.aria-hidden": "isShown() ? null : true" } }, providers: [provideSelf(TooltipComponent)], viewQueries: [{ propertyName: "_defaultContentTemplate", first: true, predicate: ["defaultContentTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div [ptInt]=\"this\" [ptClass]=\"'content'\">\n <ngn-defer [lazyContent]=\"contentTemplate()\" [open]=\"isShown()\" [cache]=\"false\"></ngn-defer>\n</div>\n\n<ng-template #defaultContentTemplate>\n <span [ptInt]=\"this\" [ptClass]=\"'text'\">{{ text() }}</span>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass", "ptDep"] }, { kind: "component", type: NgnDefer, selector: "ngn-defer", inputs: ["lazyContent", "lazyContentContext", "open", "lazy", "cache", "hiddenOnClosed"] }] });
473
+ }
474
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TooltipComponent, decorators: [{
475
+ type: Component,
476
+ args: [{ selector: 'ngn-tooltip', imports: [NgnPt, NgnDefer], providers: [provideSelf(TooltipComponent)], host: {
477
+ '[class]': `positionClass()`,
478
+ '[style.--anchor-start]': `toPixels(relativeAnchorElementPosition()?.start)`,
479
+ '[style.--anchor-center]': `toPixels(relativeAnchorElementPosition()?.center)`,
480
+ '[style.--anchor-end]': `toPixels(relativeAnchorElementPosition()?.end)`,
481
+ '[style.left]': `toPixels(position().x)`,
482
+ '[style.top]': `toPixels(position().y)`,
483
+ '[attr.popover]': `'hint'`,
484
+ '[attr.id]': `id`,
485
+ '[attr.role]': `'tooltip'`,
486
+ '(toggle)': 'onToggle($event)',
487
+ '(mouseenter)': 'onMouseEnter()',
488
+ '(mouseleave)': 'onMouseLeave()',
489
+ '(click)': 'onClick($event)',
490
+ '[attr.aria-hidden]': `isShown() ? null : true`,
491
+ }, template: "<div [ptInt]=\"this\" [ptClass]=\"'content'\">\n <ngn-defer [lazyContent]=\"contentTemplate()\" [open]=\"isShown()\" [cache]=\"false\"></ngn-defer>\n</div>\n\n<ng-template #defaultContentTemplate>\n <span [ptInt]=\"this\" [ptClass]=\"'text'\">{{ text() }}</span>\n</ng-template>\n" }]
492
+ }], ctorParameters: () => [], propDecorators: { anchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "anchor", required: true }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], showOnlyIfTruncated: [{ type: i0.Input, args: [{ isSignal: true, alias: "showOnlyIfTruncated", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], _defaultContentTemplate: [{ type: i0.ViewChild, args: ['defaultContentTemplate', { isSignal: true }] }] } });
493
+ function isElementTruncated(element) {
494
+ return (element.clientWidth < element.scrollWidth || // horizontal overflow
495
+ element.clientHeight < element.scrollHeight || // vertical overflow
496
+ element.offsetWidth < element.scrollWidth || // single-line ellipsis
497
+ element.offsetHeight < element.scrollHeight // multi-line ellipsis (line-clamp)
498
+ );
499
+ }
500
+
501
+ /**
502
+ * Generated bundle index. Do not edit.
503
+ */
504
+
505
+ export { NgnTooltip, TooltipComponent };
506
+ //# sourceMappingURL=ngneers-controls-tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-tooltip.mjs","sources":["../../src/tooltip/relative-anchor-element-position.ts","../../src/tooltip/tooltip.ts","../../src/tooltip/tooltip.html","../../src/tooltip/ngneers-controls-tooltip.ts"],"sourcesContent":["import type { Middleware, Placement } from '@floating-ui/dom';\n\nexport type RelativeAnchorElementPositionData = {\n start: number;\n center: number;\n end: number;\n};\n\nexport const relativeAnchorElementPosition: Middleware = {\n name: 'relativeAnchorElementPosition',\n async fn(state) {\n const { placement, rects } = state;\n\n const axis = getAxis(placement);\n const axisSize = axis === 'x' ? 'width' : 'height';\n\n return {\n data: {\n start: rects.reference[axis] - state[axis],\n center: rects.reference[axis] + rects.reference[axisSize] / 2 - state[axis],\n end: rects.reference[axis] + rects.reference[axisSize] - state[axis],\n } satisfies RelativeAnchorElementPositionData,\n };\n },\n};\n\nfunction getAxis(placement: Placement): 'x' | 'y' {\n switch (placement.split('-')[0]) {\n case 'top':\n case 'bottom':\n return 'x';\n case 'left':\n case 'right':\n return 'y';\n default:\n throw new Error(`Unknown placement: ${placement}`);\n }\n}\n","import {\n Component,\n ComponentRef,\n computed,\n Directive,\n DOCUMENT,\n effect,\n inject,\n input,\n type OnDestroy,\n signal,\n TemplateRef,\n viewChild,\n ViewContainerRef,\n afterRenderEffect,\n} from '@angular/core';\nimport {\n abortSignalOnDestroy,\n autoPositionElement,\n type AutoPositioningHandle,\n NGN_CONFIG,\n type PositioningSizeConstraints,\n roundByDpr,\n splitPlacement,\n type TooltipOptions,\n} from '@ngneers/controls/api/ng';\nimport { NgnBase, provideSelf, NgnPt } from '@ngneers/controls/base';\nimport { NgnDefer } from '@ngneers/controls/defer';\nimport { getTimeSpanMilliseconds, notNullish, type TimeSpan } from '@ngneers/controls/utils';\nimport { computedWithPrevious, generateElementId } from '@ngneers/controls/utils-ng';\nimport { tooltipControlTemplate } from '@ngneers/controls-themes/templates/tooltip';\n\nimport {\n relativeAnchorElementPosition,\n type RelativeAnchorElementPositionData,\n} from './relative-anchor-element-position';\n\nimport type { Placement } from '@floating-ui/dom';\n\n/**\n * @category control\n */\n@Directive({\n selector: '[ngnTooltip]',\n exportAs: 'ngnTooltip',\n providers: [provideSelf(NgnTooltip)],\n})\nexport class NgnTooltip extends NgnBase<'tooltip'> implements OnDestroy {\n protected readonly theme = null;\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _config = inject(NGN_CONFIG);\n private readonly _tooltip = signal<ComponentRef<TooltipComponent> | null>(null);\n\n /**\n * The content of the tooltip, can be a string or a TemplateRef.\n * If the value is falsy, the tooltip will not be shown.\n * @alias ngnTooltip\n */\n public readonly content = input<TemplateRef<unknown> | string | null | undefined>(null, {\n alias: 'ngnTooltip',\n });\n /**\n * If set to `true`, the tooltip will only be shown if the anchor element is truncated. `\"\"` is equivalent to `true`.\n * @alias ngnTooltipShowOnlyIfTruncated\n * @default false\n */\n public readonly showOnlyIfTruncated = input<boolean | ''>(false, {\n alias: 'ngnTooltipShowOnlyIfTruncated',\n });\n /**\n * The size constraints for the tooltip.\n * This can be used to limit the width and height of the tooltip.\n * If not provided, the tooltip is only constrained by the size of the screen.\n * @alias ngnTooltipSize\n */\n public readonly size = input<PositioningSizeConstraints | null | undefined>(null, {\n alias: 'ngnTooltipSize',\n });\n\n /**\n * The options for the tooltip.\n * This is a shorthand for setting multiple options at once.\n * The individual options take precedence over the options set here.\n * @alias ngnTooltipOptions\n */\n public readonly options = input<Partial<TooltipOptions> | null | undefined>(null, {\n alias: 'ngnTooltipOptions',\n });\n /**\n * The placement of the tooltip relative to the anchor element.\n * @alias ngnTooltipPlacement\n * @default 'bottom'\n */\n public readonly placement = input<Placement | null | undefined>(null, {\n alias: 'ngnTooltipPlacement',\n });\n /**\n * The offset in Pixels of the tooltip from the anchor element.\n * @alias ngnTooltipOffset\n * @default 4\n */\n public readonly offset = input<number | null | undefined>(null, {\n alias: 'ngnTooltipOffset',\n });\n /**\n * The delay before the tooltip is shown. If a number is provided, it is interpreted as milliseconds.\n * @alias ngnTooltipShowDelay\n * @default '0.5s'\n */\n public readonly showDelay = input<TimeSpan | null | undefined>(null, {\n alias: 'ngnTooltipShowDelay',\n });\n /**\n * The delay before the tooltip is hidden. If a number is provided, it is interpreted as milliseconds.\n * @alias ngnTooltipHideDelay\n * @default '0.1s'\n */\n public readonly hideDelay = input<TimeSpan | null | undefined>(null, {\n alias: 'ngnTooltipHideDelay',\n });\n /**\n * Whether to show an arrow pointing to the anchor element. `\"\"` is equivalent to `true`.\n * @alias ngnTooltipShowArrow\n * @default true\n */\n public readonly showArrow = input<boolean | '' | null | undefined>(null, {\n alias: 'ngnTooltipShowArrow',\n });\n /**\n * Shows the tooltip on hover.\n * @alias ngnTooltipShowOnHover\n * @default true\n */\n public readonly showOnHover = input<boolean | '' | null | undefined>(null, {\n alias: 'ngnTooltipShowOnHover',\n });\n /**\n * Shows the tooltip on focus.\n * @alias ngnTooltipShowOnFocus\n * @default true\n */\n public readonly showOnFocus = input<boolean | '' | null | undefined>(null, {\n alias: 'ngnTooltipShowOnFocus',\n });\n /**\n * Hides the tooltip (without delay) when the mouse hovers over the tooltip.\n * @alias ngnTooltipHideOnTooltipHover\n * @default false\n */\n public readonly hideOnTooltipHover = input<boolean | '' | null | undefined>(null, {\n alias: 'ngnTooltipHideOnTooltipHover',\n });\n /**\n * Hides the tooltip (without delay) when the user clicks on the tooltip.\n * @alias ngnTooltipHideOnClick\n * @default true\n */\n public readonly hideOnClick = input<boolean | '' | null | undefined>(null, {\n alias: 'ngnTooltipHideOnClick',\n });\n /**\n * Whether to automatically manage ARIA attributes for the tooltip.\n * @alias ngnTooltipAutoAriaMode\n * @default 'description'\n */\n public readonly autoAriaMode = input<'label' | 'description' | 'none' | null | undefined>(null, {\n alias: 'ngnTooltipAutoAriaMode',\n });\n\n public readonly effectiveOptions = computed<TooltipOptions>(() => {\n const defaults = this._config.defaults.tooltip;\n return {\n placement: this.placement() ?? this.options()?.placement ?? defaults.placement,\n offset: this.offset() ?? this.options()?.offset ?? defaults.offset,\n showDelay: this.showDelay() ?? this.options()?.showDelay ?? defaults.showDelay,\n hideDelay: this.hideDelay() ?? this.options()?.hideDelay ?? defaults.hideDelay,\n showArrow: (this.showArrow() ?? this.options()?.showArrow ?? defaults.showArrow) !== false,\n showOnHover:\n (this.showOnHover() ?? this.options()?.showOnHover ?? defaults.showOnHover) !== false,\n showOnFocus:\n (this.showOnFocus() ?? this.options()?.showOnFocus ?? defaults.showOnFocus) !== false,\n hideOnTooltipHover:\n (this.hideOnTooltipHover() ??\n this.options()?.hideOnTooltipHover ??\n defaults.hideOnTooltipHover) !== false,\n hideOnClick:\n (this.hideOnClick() ?? this.options()?.hideOnClick ?? defaults.hideOnClick) !== false,\n autoAriaMode: this.autoAriaMode() ?? this.options()?.autoAriaMode ?? defaults.autoAriaMode,\n };\n });\n\n public readonly tooltip = computed(() => this._tooltip()?.instance);\n\n constructor() {\n super();\n\n const abortSignal = abortSignalOnDestroy();\n this.element.nativeElement.addEventListener('mouseenter', this.onMouseEnter.bind(this), {\n signal: abortSignal,\n });\n this.element.nativeElement.addEventListener('mouseleave', this.onMouseLeave.bind(this), {\n signal: abortSignal,\n });\n this.element.nativeElement.addEventListener('focus', this.onFocus.bind(this), {\n signal: abortSignal,\n });\n this.element.nativeElement.addEventListener('blur', this.onBlur.bind(this), {\n signal: abortSignal,\n });\n\n effect(() => {\n const tooltip = this._tooltip();\n if (tooltip) this.updateContent(tooltip);\n });\n effect(() => this._tooltip()?.setInput('showOnlyIfTruncated', this.showOnlyIfTruncated()));\n effect(() => this._tooltip()?.setInput('size', this.size()));\n effect(() => this._tooltip()?.setInput('options', this.effectiveOptions()));\n\n afterRenderEffect(() => {\n const el = this.element.nativeElement;\n const content = this.content();\n const autoAriaMode = this.effectiveOptions().autoAriaMode;\n\n el.removeAttribute('aria-label');\n el.removeAttribute('aria-description');\n el.removeAttribute('aria-labelledby');\n el.removeAttribute('aria-describedby');\n\n if (autoAriaMode === 'none' || !content) {\n return;\n }\n\n const tooltip = this.tooltip();\n const isShown = tooltip?.isShown() ?? false;\n\n if (typeof content === 'string') {\n if (isShown && tooltip) {\n const attr = autoAriaMode === 'label' ? 'aria-labelledby' : 'aria-describedby';\n el.setAttribute(attr, tooltip.id);\n } else {\n const attr = autoAriaMode === 'label' ? 'aria-label' : 'aria-description';\n el.setAttribute(attr, content);\n }\n } else if (content instanceof TemplateRef && isShown && tooltip) {\n const attr = autoAriaMode === 'label' ? 'aria-labelledby' : 'aria-describedby';\n el.setAttribute(attr, tooltip.id);\n }\n });\n }\n\n public ngOnDestroy(): void {\n this._tooltip()?.destroy();\n this._tooltip.set(null);\n }\n\n public show(): void {\n const tooltip = this._tooltip();\n if (tooltip) {\n tooltip.instance.show();\n } else {\n const tooltip = this.getTooltip();\n if (tooltip) {\n requestAnimationFrame(() => tooltip.show());\n }\n }\n }\n\n public hide(): void {\n this._tooltip()?.instance.hide();\n }\n\n protected onMouseEnter() {\n if (this.effectiveOptions().showOnHover) {\n this.show();\n }\n }\n\n protected onMouseLeave() {\n if (this.effectiveOptions().showOnHover) {\n this.hide();\n }\n }\n\n protected onFocus() {\n if (this.effectiveOptions().showOnFocus) {\n this.show();\n }\n }\n\n protected onBlur() {\n if (this.effectiveOptions().showOnFocus) {\n this.hide();\n }\n }\n\n private getTooltip(): TooltipComponent | undefined {\n let tooltip = this._tooltip();\n if (!tooltip && this.content()) {\n tooltip = this._viewContainerRef.createComponent(TooltipComponent);\n tooltip.setInput('anchor', this.element.nativeElement);\n this.updateContent(tooltip);\n tooltip.setInput('showOnlyIfTruncated', this.showOnlyIfTruncated());\n tooltip.setInput('size', this.size());\n tooltip.setInput('options', this.effectiveOptions());\n this._tooltip.set(tooltip);\n }\n return tooltip?.instance;\n }\n\n private updateContent(tooltip: ComponentRef<TooltipComponent>) {\n const content = this.content();\n if (content instanceof TemplateRef) {\n tooltip.setInput('text', null);\n tooltip.setInput('content', content);\n } else {\n tooltip.setInput('text', content);\n tooltip.setInput('content', null);\n }\n }\n}\n\n@Component({\n selector: 'ngn-tooltip',\n templateUrl: './tooltip.html',\n imports: [NgnPt, NgnDefer],\n providers: [provideSelf(TooltipComponent)],\n host: {\n '[class]': `positionClass()`,\n '[style.--anchor-start]': `toPixels(relativeAnchorElementPosition()?.start)`,\n '[style.--anchor-center]': `toPixels(relativeAnchorElementPosition()?.center)`,\n '[style.--anchor-end]': `toPixels(relativeAnchorElementPosition()?.end)`,\n '[style.left]': `toPixels(position().x)`,\n '[style.top]': `toPixels(position().y)`,\n '[attr.popover]': `'hint'`,\n '[attr.id]': `id`,\n '[attr.role]': `'tooltip'`,\n '(toggle)': 'onToggle($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave()',\n '(click)': 'onClick($event)',\n '[attr.aria-hidden]': `isShown() ? null : true`,\n },\n})\nexport class TooltipComponent extends NgnBase<'tooltip'> {\n private _showHideTimeout?: ReturnType<typeof setTimeout>;\n protected readonly theme = this.injectThemeTemplate(tooltipControlTemplate, {\n root: true,\n closing: () => this.isClosing(),\n 'with-arrow': () => this.options().showArrow !== false,\n });\n private readonly _config = inject(NGN_CONFIG);\n\n /**\n * The anchor element to which the tooltip is attached.\n */\n public readonly anchor = input.required<HTMLElement>();\n /**\n * The text content of the tooltip.\n */\n public readonly text = input<string | null>();\n /**\n * The content template of the tooltip.\n */\n public readonly content = input<TemplateRef<unknown>>();\n /**\n * If set to `true`, the tooltip will only be shown if the anchor element is truncated. `\"\"` is equivalent to `true`.\n * @default `false`\n */\n public readonly showOnlyIfTruncated = input<boolean | ''>(false);\n /**\n * The size constraints for the tooltip.\n * This can be used to limit the width and height of the tooltip.\n * If not provided, the tooltip is only constrained by the size of the screen.\n */\n public readonly size = input<PositioningSizeConstraints | null>();\n /**\n * The options for the tooltip.\n *\n */\n public readonly options = input<TooltipOptions>(this._config.defaults.tooltip);\n\n protected readonly showDelayMs = computed(() =>\n getTimeSpanMilliseconds(this.options().showDelay)\n );\n protected readonly hideDelayMs = computed(() =>\n getTimeSpanMilliseconds(this.options().hideDelay)\n );\n\n protected readonly position = signal<{ x: number; y: number }>({ x: 0, y: 0 });\n protected readonly positionClass = signal<string>('');\n protected readonly relativeAnchorElementPosition = signal<\n RelativeAnchorElementPositionData | undefined\n >(undefined);\n\n private readonly _isShown = signal(false);\n private readonly _isClosing = signal(false);\n\n public readonly id = generateElementId();\n public readonly isShown = this._isShown.asReadonly();\n public readonly isClosing = this._isClosing.asReadonly();\n\n private readonly _defaultContentTemplate =\n viewChild.required<TemplateRef<unknown>>('defaultContentTemplate');\n protected readonly contentTemplate = computed(\n () => this.content() ?? this._defaultContentTemplate()\n );\n\n private readonly _autoPos = computedWithPrevious<AutoPositioningHandle | undefined>(prev => {\n prev?.stop();\n const element = this.element.nativeElement;\n if (!element) {\n return undefined;\n }\n return autoPositionElement(this.anchor(), element, {\n injector: this.injector,\n stopped: true,\n resize: false,\n sizeConstraints: this.size() ?? undefined,\n placement: this.options().placement,\n offset: this.options().offset,\n middleware: [relativeAnchorElementPosition],\n disableSettingStyles: true,\n strategy: 'fixed',\n onPositionChange: ({ x, y, placement, middlewareData }) => {\n this.relativeAnchorElementPosition.set(middlewareData[relativeAnchorElementPosition.name]);\n this.position.set({ x, y });\n this.positionClass.set(\n splitPlacement(placement)\n .filter(notNullish)\n .map(x => this.theme.class(x))\n .join(' ')\n );\n },\n });\n });\n\n // Stable reference so addEventListener/removeEventListener target the same\n // handler; `.bind()` returns a new function each call, which would leak\n // listeners (remove never matches, add re-registers on every effect run).\n private readonly onDocumentKeyDownBound = (event: KeyboardEvent): void =>\n this.onDocumentKeyDown(event);\n\n constructor() {\n super();\n const document = inject(DOCUMENT);\n const destroyAbortSignal = abortSignalOnDestroy();\n effect(() => {\n if (this.isShown() && !this.isClosing()) {\n document.addEventListener('keydown', this.onDocumentKeyDownBound, {\n signal: destroyAbortSignal,\n });\n } else {\n document.removeEventListener('keydown', this.onDocumentKeyDownBound);\n }\n });\n effect(() => {\n if (this.isShown()) {\n this._autoPos()?.start();\n } else {\n this._autoPos()?.stop();\n }\n });\n }\n\n public show(skipDelay = false) {\n clearTimeout(this._showHideTimeout);\n\n const delay = skipDelay ? 0 : this.showDelayMs();\n if (delay <= 0) {\n this.onShow();\n } else {\n this._showHideTimeout = setTimeout(() => this.onShow(), delay);\n }\n }\n\n public hide(skipDelay = false) {\n clearTimeout(this._showHideTimeout);\n\n const delay = skipDelay ? 0 : this.hideDelayMs();\n if (delay <= 0) {\n this.onHide();\n } else {\n this._showHideTimeout = setTimeout(() => this.onHide(), delay);\n }\n }\n\n protected onMouseEnter() {\n if (this.options().hideOnTooltipHover) {\n this.hide(true);\n } else {\n this.show(true);\n }\n }\n\n protected onMouseLeave() {\n this.hide();\n }\n\n protected onClick(event: PointerEvent) {\n if (this.options().hideOnClick) {\n this.hide(true);\n }\n event.stopPropagation();\n }\n\n protected onDocumentKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' || event.key === 'Esc') {\n this.hide(true);\n event.preventDefault();\n }\n }\n\n protected onShow() {\n if (!this.content() && !this.text()) {\n return;\n }\n if (this.showOnlyIfTruncated() !== false && !isElementTruncated(this.anchor())) {\n return;\n }\n\n this._isShown.set(true);\n this.element.nativeElement.showPopover();\n }\n\n protected onHide() {\n this._isClosing.set(true);\n requestAnimationFrame(() => {\n Promise.all(this.element.nativeElement.getAnimations().map(a => a.finished))\n .then(() => this.element.nativeElement.hidePopover())\n .catch(() => {})\n .finally(() => this._isClosing.set(false));\n });\n }\n\n protected onToggle(event: Event) {\n const evt = event as ToggleEvent;\n if (evt.newState === 'closed') {\n this._isShown.set(false);\n } else {\n this._isShown.set(true);\n }\n }\n\n protected toPixels(value: number | undefined): string | undefined {\n if (value === undefined) {\n return undefined;\n }\n return `${roundByDpr(this.element.nativeElement, value)}px`;\n }\n}\n\nfunction isElementTruncated(element: HTMLElement): boolean {\n return (\n element.clientWidth < element.scrollWidth || // horizontal overflow\n element.clientHeight < element.scrollHeight || // vertical overflow\n element.offsetWidth < element.scrollWidth || // single-line ellipsis\n element.offsetHeight < element.scrollHeight // multi-line ellipsis (line-clamp)\n );\n}\n","<div [ptInt]=\"this\" [ptClass]=\"'content'\">\n <ngn-defer [lazyContent]=\"contentTemplate()\" [open]=\"isShown()\" [cache]=\"false\"></ngn-defer>\n</div>\n\n<ng-template #defaultContentTemplate>\n <span [ptInt]=\"this\" [ptClass]=\"'text'\">{{ text() }}</span>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQO,MAAM,6BAA6B,GAAe;AACvD,IAAA,IAAI,EAAE,+BAA+B;IACrC,MAAM,EAAE,CAAC,KAAK,EAAA;AACZ,QAAA,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK;AAElC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC;AAC/B,QAAA,MAAM,QAAQ,GAAG,IAAI,KAAK,GAAG,GAAG,OAAO,GAAG,QAAQ;QAElD,OAAO;AACL,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;gBAC1C,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;AAC3E,gBAAA,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC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