@fundamental-ngx/core 0.66.1-rc.9 → 0.66.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/fesm2022/fundamental-ngx-core-card.mjs +55 -3
  2. package/fesm2022/fundamental-ngx-core-card.mjs.map +1 -1
  3. package/fesm2022/fundamental-ngx-core-combobox.mjs +5 -2
  4. package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
  5. package/fesm2022/fundamental-ngx-core-date-picker.mjs +1 -1
  6. package/fesm2022/fundamental-ngx-core-date-picker.mjs.map +1 -1
  7. package/fesm2022/fundamental-ngx-core-datetime-picker.mjs +1 -1
  8. package/fesm2022/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
  9. package/fesm2022/fundamental-ngx-core-datetime.mjs +4 -2
  10. package/fesm2022/fundamental-ngx-core-datetime.mjs.map +1 -1
  11. package/fesm2022/fundamental-ngx-core-dialog.mjs +71 -19
  12. package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
  13. package/fesm2022/fundamental-ngx-core-form.mjs +932 -69
  14. package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
  15. package/fesm2022/fundamental-ngx-core-input-group.mjs +2 -2
  16. package/fesm2022/fundamental-ngx-core-input-group.mjs.map +1 -1
  17. package/fesm2022/fundamental-ngx-core-menu.mjs +1 -1
  18. package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
  19. package/fesm2022/fundamental-ngx-core-message-box.mjs +2 -10
  20. package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
  21. package/fesm2022/fundamental-ngx-core-message-strip.mjs +2 -3
  22. package/fesm2022/fundamental-ngx-core-message-strip.mjs.map +1 -1
  23. package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +3 -3
  24. package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
  25. package/fesm2022/fundamental-ngx-core-multi-input.mjs +2 -2
  26. package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
  27. package/fesm2022/fundamental-ngx-core-pagination.mjs +1 -1
  28. package/fesm2022/fundamental-ngx-core-pagination.mjs.map +1 -1
  29. package/fesm2022/fundamental-ngx-core-popover.mjs +22 -6
  30. package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
  31. package/fesm2022/fundamental-ngx-core-product-switch.mjs +2 -2
  32. package/fesm2022/fundamental-ngx-core-product-switch.mjs.map +1 -1
  33. package/fesm2022/fundamental-ngx-core-radio.mjs +47 -2
  34. package/fesm2022/fundamental-ngx-core-radio.mjs.map +1 -1
  35. package/fesm2022/fundamental-ngx-core-select.mjs +1 -1
  36. package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
  37. package/fesm2022/fundamental-ngx-core-settings.mjs +2 -2
  38. package/fesm2022/fundamental-ngx-core-settings.mjs.map +1 -1
  39. package/fesm2022/fundamental-ngx-core-shellbar.mjs +732 -113
  40. package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
  41. package/fesm2022/fundamental-ngx-core-text.mjs +2 -2
  42. package/fesm2022/fundamental-ngx-core-text.mjs.map +1 -1
  43. package/fesm2022/fundamental-ngx-core-time-picker.mjs +3 -4
  44. package/fesm2022/fundamental-ngx-core-time-picker.mjs.map +1 -1
  45. package/fesm2022/fundamental-ngx-core-token.mjs +14 -18
  46. package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
  47. package/fesm2022/fundamental-ngx-core-tooltip.mjs +903 -0
  48. package/fesm2022/fundamental-ngx-core-tooltip.mjs.map +1 -0
  49. package/fesm2022/fundamental-ngx-core-upload-collection.mjs +1 -1
  50. package/fesm2022/fundamental-ngx-core-upload-collection.mjs.map +1 -1
  51. package/fesm2022/fundamental-ngx-core-user-menu.mjs +21 -8
  52. package/fesm2022/fundamental-ngx-core-user-menu.mjs.map +1 -1
  53. package/fesm2022/fundamental-ngx-core.mjs +1 -0
  54. package/fesm2022/fundamental-ngx-core.mjs.map +1 -1
  55. package/package.json +7 -3
  56. package/schematics/package.json +1 -1
  57. package/types/fundamental-ngx-core-card.d.ts +34 -1
  58. package/types/fundamental-ngx-core-dialog.d.ts +33 -5
  59. package/types/fundamental-ngx-core-form.d.ts +261 -34
  60. package/types/fundamental-ngx-core-popover.d.ts +6 -0
  61. package/types/fundamental-ngx-core-radio.d.ts +8 -0
  62. package/types/fundamental-ngx-core-shellbar.d.ts +259 -75
  63. package/types/fundamental-ngx-core-token.d.ts +2 -0
  64. package/types/fundamental-ngx-core-tooltip.d.ts +456 -0
  65. package/types/fundamental-ngx-core-user-menu.d.ts +4 -0
  66. package/types/fundamental-ngx-core.d.ts +1 -0
@@ -0,0 +1,456 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, TemplateRef } from '@angular/core';
3
+
4
+ /**
5
+ * @hidden
6
+ * Minimal contract the coordinator needs from a tooltip instance.
7
+ * The coordinator only decides *when* a tooltip is shown or hidden; the tooltip decides *how* (overlay rendering).
8
+ */
9
+ interface TooltipHandle {
10
+ /** Whether the tooltip overlay is currently open. Can become `false` on its own, e.g. after an outside click. */
11
+ isOpen(): boolean;
12
+ /** Opens the tooltip overlay right away, without any delay. */
13
+ open(): void;
14
+ /** Closes the tooltip overlay right away, without any delay. */
15
+ close(): void;
16
+ }
17
+ /**
18
+ * Application-wide service that decides when tooltips are shown and hidden.
19
+ *
20
+ * - Guarantees that at most one tooltip is visible at any time.
21
+ * - Owns the show, hide and sequence delay timers, so timing is consistent across all tooltips.
22
+ * - Listens globally for `Escape`, window blur and tab switching to dismiss the open tooltip.
23
+ *
24
+ * Tooltips request showing and hiding through `show()` and `hide()`; they never open their overlay on their own.
25
+ */
26
+ declare class TooltipCoordinator {
27
+ /**
28
+ * @hidden
29
+ * Tooltip that was opened last. Its overlay may already be closed (e.g. by an outside click),
30
+ * so check `isOpen()` before treating it as visible.
31
+ */
32
+ private _active;
33
+ /** @hidden Tooltip waiting for its show delay to elapse. Only one tooltip can be pending at a time. */
34
+ private _pending;
35
+ /** @hidden Timer that opens the pending tooltip once its show or sequence delay elapses. */
36
+ private _showTimer;
37
+ /** @hidden Timer that closes the active tooltip once its hide delay elapses. */
38
+ private _hideTimer;
39
+ /**
40
+ * @hidden
41
+ * `true` only during the task in which the browser window or tab was activated again.
42
+ * Lets tooltips ignore the focus event the browser then fires on the previously focused element.
43
+ */
44
+ private _windowRefocused;
45
+ /** @hidden Whether the `Escape` listener is currently attached to the document. */
46
+ private _listeningToKeydown;
47
+ /** @hidden Document the global listeners are attached to. */
48
+ private readonly _document;
49
+ /** @hidden Browser window, or `null` on the server, where no global listeners are attached. */
50
+ private readonly _window;
51
+ /** @hidden Stable reference to the `Escape` handler, so the same listener can be added and removed. */
52
+ private readonly _keydownListener;
53
+ /**
54
+ * @hidden
55
+ * Registers the window `blur`, window `focus` and `visibilitychange` listeners for the whole application
56
+ * (browser only) and removes them when the root injector is destroyed. These events are rare, so they
57
+ * are always listened to. The frequent `keydown` event is only listened to while a tooltip needs it,
58
+ * see `_syncKeydownListener()`.
59
+ */
60
+ constructor();
61
+ /**
62
+ * Requests to show a tooltip.
63
+ *
64
+ * - If the tooltip is already visible, it stays open and a scheduled hide is cancelled.
65
+ * - If the tooltip is already waiting for its delay, the running timer is kept.
66
+ * - If another tooltip is visible, that one closes immediately and this one opens after
67
+ * `sequenceDelay` (or `delay`, if shorter), so moving between elements feels faster.
68
+ * - A `delay` of `0` or less opens the tooltip immediately (keyboard shortcut, long-press, `show()`).
69
+ *
70
+ * @param tooltip Tooltip to show.
71
+ * @param delay Delay in ms before showing when no other tooltip is visible.
72
+ * @param sequenceDelay Delay in ms before showing when another tooltip is visible.
73
+ */
74
+ show(tooltip: TooltipHandle, delay: number, sequenceDelay?: number): void;
75
+ /**
76
+ * Requests to hide a tooltip.
77
+ *
78
+ * - Cancels the tooltip's pending show, so it does not appear after the pointer or focus has already left.
79
+ * - If the tooltip is visible, closes it after `delay`, or immediately when `delay` is `0` or less.
80
+ * - Does nothing for a tooltip that is neither pending nor visible.
81
+ *
82
+ * @param tooltip Tooltip to hide.
83
+ * @param delay Delay in ms before hiding.
84
+ */
85
+ hide(tooltip: TooltipHandle, delay: number): void;
86
+ /**
87
+ * Cancels a scheduled hide and keeps the tooltip open.
88
+ * Used when the pointer moves from the host onto the tooltip, so its text can be read or selected.
89
+ *
90
+ * @param tooltip Tooltip to keep open.
91
+ */
92
+ cancelHide(tooltip: TooltipHandle): void;
93
+ /**
94
+ * Removes every reference to the tooltip: cancels its pending show and scheduled hide and
95
+ * forgets it as the active tooltip. The overlay is not touched, because it is disposed together
96
+ * with the tooltip. Must be called when the tooltip is destroyed.
97
+ *
98
+ * @param tooltip Tooltip being destroyed.
99
+ */
100
+ unregister(tooltip: TooltipHandle): void;
101
+ /**
102
+ * Whether the current focus event was caused by the browser restoring focus after the window
103
+ * or tab was activated again. Tooltips skip showing on such focus events, because the user did
104
+ * not interact with the page.
105
+ */
106
+ isWindowRefocus(): boolean;
107
+ /**
108
+ * @hidden
109
+ * Makes the tooltip the active one and opens it.
110
+ * Closes any other visible tooltip first to keep the single-tooltip guarantee.
111
+ */
112
+ private _open;
113
+ /**
114
+ * @hidden
115
+ * Closes the active tooltip immediately and cancels its scheduled hide.
116
+ * `_active` is reset before `close()` runs, so re-entrant calls see a consistent state.
117
+ */
118
+ private _hideActive;
119
+ /**
120
+ * @hidden
121
+ * Global `Escape` handler. Always cancels a pending show. If a tooltip is visible, closes it and
122
+ * stops the event, so the first `Escape` only closes the tooltip and not, for example, the surrounding
123
+ * dialog. If no tooltip is visible, the event passes through untouched.
124
+ */
125
+ private _onKeydown;
126
+ /**
127
+ * @hidden
128
+ * Closes the active tooltip and cancels a pending show.
129
+ * Called when the window loses focus or the page becomes hidden (tab switch, minimised window).
130
+ */
131
+ private _dismiss;
132
+ /**
133
+ * @hidden
134
+ * Marks the current task as a window re-activation (see `isWindowRefocus()`).
135
+ * The flag is reset in the next task.
136
+ */
137
+ private _onWindowFocus;
138
+ /** @hidden Cancels the pending show and forgets the pending tooltip. */
139
+ private _clearShowTimer;
140
+ /** @hidden Cancels the scheduled hide of the active tooltip. */
141
+ private _clearHideTimer;
142
+ /**
143
+ * @hidden
144
+ * Attaches the `Escape` listener while a tooltip is open or pending and removes it otherwise,
145
+ * so key presses do not reach this service (or trigger change detection) when no tooltip is involved.
146
+ * The listener uses the capture phase, so an open tooltip consumes `Escape` before the host
147
+ * (e.g. a dialog) sees it.
148
+ */
149
+ private _syncKeydownListener;
150
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipCoordinator, never>;
151
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<any>;
152
+ }
153
+
154
+ interface TooltipConfig {
155
+ /** Delay in ms before the tooltip is shown on hover or keyboard focus. */
156
+ showDelay: number;
157
+ /** Delay in ms before the tooltip is hidden when the pointer or focus leaves. */
158
+ hideDelay: number;
159
+ /** Delay in ms before the next tooltip is shown while another one is already open. */
160
+ sequenceDelay: number;
161
+ }
162
+ declare const DEFAULT_TOOLTIP_CONFIG: TooltipConfig;
163
+ /**
164
+ * Overrides the global tooltip timing. Missing values fall back to `DEFAULT_TOOLTIP_CONFIG`.
165
+ * ```ts
166
+ * providers: [{ provide: TOOLTIP_CONFIG, useValue: { showDelay: 300 } }]
167
+ * ```
168
+ */
169
+ declare const TOOLTIP_CONFIG: InjectionToken<Partial<TooltipConfig>>;
170
+
171
+ /** Side of the host element the tooltip is shown on. */
172
+ type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
173
+ /** Alignment along the chosen side: `start`/`end` align with the host's edge, `middle` centres the tooltip. */
174
+ type TooltipAlignment = 'start' | 'middle' | 'end';
175
+ /** How the tooltip is opened: on hover and keyboard focus, or by clicking the host. */
176
+ type TooltipTrigger = 'hover' | 'click';
177
+ /**
178
+ * Shows a short tooltip for the host element.
179
+ *
180
+ * By default, the tooltip opens after a delay on mouse hover or keyboard focus, and immediately on touch
181
+ * long-press or `Ctrl+Alt+I` (Windows/Linux) / `Ctrl+Option+I` (Mac). It closes when the pointer or focus leaves, on `Escape`, when the host is
182
+ * activated, on outside click, and when the window loses focus. With `fdTooltipTrigger="click"` it is
183
+ * toggled by clicking the host instead.
184
+ *
185
+ * The overlay is rendered by `PopoverService` (positioning, flipping, arrow), while `TooltipCoordinator`
186
+ * decides when to show and hide, so only one tooltip is visible at a time. The host's DOM is never
187
+ * changed; only ARIA attributes are added.
188
+ *
189
+ * The text is assembled by the caller, e.g. `Label - Description (Shortcut)`. A template can be passed
190
+ * instead of text for formatted, non-interactive content.
191
+ *
192
+ * ```html
193
+ * <button fd-button glyph="save" aria-label="Save" fdTooltip="Save (Ctrl+S)" fdTooltipKeyShortcuts="Control+S"></button>
194
+ * ```
195
+ */
196
+ declare class TooltipDirective {
197
+ /**
198
+ * Content of the tooltip: text already assembled by the caller, e.g. `Save (Ctrl+S)`, or a template
199
+ * for formatted text. Templates must not contain interactive elements; use a popover for those.
200
+ * An empty or whitespace-only text disables the tooltip, the same as `fdTooltipDisabled`.
201
+ */
202
+ readonly fdTooltip: _angular_core.InputSignal<string | TemplateRef<unknown> | null | undefined>;
203
+ /**
204
+ * Side of the host element the tooltip is shown on.
205
+ * When there is not enough room, the tooltip flips to the opposite side automatically.
206
+ */
207
+ readonly fdTooltipPlacement: _angular_core.InputSignal<TooltipPlacement>;
208
+ /** Alignment along the chosen side: `start`/`end` align with the host's edge, `middle` centres the tooltip. */
209
+ readonly fdTooltipAlignment: _angular_core.InputSignal<TooltipAlignment>;
210
+ /**
211
+ * How the tooltip is opened:
212
+ * - `hover` (default): after a delay on mouse hover or keyboard focus, immediately on touch long-press.
213
+ * - `click`: toggled immediately by clicking, tapping or activating the host with the keyboard. It stays
214
+ * open until it is toggled again, `Escape` is pressed, the user clicks elsewhere or focus moves away.
215
+ * Use it only on hosts without their own action, e.g. an information button next to a label.
216
+ *
217
+ * `Ctrl+Alt+I` (Windows/Linux) / `Ctrl+Option+I` (Mac) toggles the tooltip in both modes.
218
+ */
219
+ readonly fdTooltipTrigger: _angular_core.InputSignal<TooltipTrigger>;
220
+ /**
221
+ * Disables the tooltip. A disabled tooltip never shows and adds no ARIA attributes or event listeners,
222
+ * so the host behaves exactly as without the directive. Use it, for example, to enable the tooltip
223
+ * only while the host text is truncated.
224
+ */
225
+ readonly fdTooltipDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
226
+ /**
227
+ * Delay in ms before the tooltip shows on hover or keyboard focus.
228
+ * When `null`, `TOOLTIP_CONFIG.showDelay` (500 ms by default) is used.
229
+ */
230
+ readonly fdTooltipShowDelay: _angular_core.InputSignal<number | null>;
231
+ /**
232
+ * Delay in ms before the tooltip hides after the pointer or focus leaves the host or the tooltip.
233
+ * When `null`, `TOOLTIP_CONFIG.hideDelay` (500 ms by default) is used.
234
+ */
235
+ readonly fdTooltipHideDelay: _angular_core.InputSignal<number | null>;
236
+ /**
237
+ * Keyboard shortcut of the host action in `aria-keyshortcuts` format, e.g. `Control+S`.
238
+ * It is set as `aria-keyshortcuts` on the host, and for text content a trailing parenthesised
239
+ * shortcut that matches this value, e.g. ` (Ctrl+S)`, is removed from the screen reader
240
+ * description so it is not announced twice. A trailing parenthetical that is not the shortcut
241
+ * (e.g. ` (3 copies)`) is left intact.
242
+ */
243
+ readonly fdTooltipKeyShortcuts: _angular_core.InputSignal<string | null>;
244
+ /**
245
+ * Additional CSS class(es) for the tooltip body, e.g. to customise its styling.
246
+ * The tooltip is rendered in an overlay, so the styles must not be encapsulated in a component.
247
+ */
248
+ readonly fdTooltipBodyClass: _angular_core.InputSignal<string | null>;
249
+ /**
250
+ * Unique id of the rendered tooltip container (`role="tooltip"`).
251
+ * The hidden screen reader description uses `<tooltipId>-description`.
252
+ */
253
+ readonly tooltipId: string;
254
+ /** @hidden Host element reference, passed to `PopoverService` as the overlay origin. */
255
+ private readonly _elementRef;
256
+ /** @hidden Host element, used for event listeners and ARIA attributes. */
257
+ private readonly _host;
258
+ /** @hidden Per-instance popover service that renders, positions and disposes the tooltip overlay. */
259
+ private readonly _popoverService;
260
+ /** @hidden Application-wide service that decides when this tooltip shows or hides. */
261
+ private readonly _coordinator;
262
+ /**
263
+ * @hidden
264
+ * What the coordinator uses to open and close this tooltip's overlay without delay.
265
+ * Kept in a private object so these delay-free operations are not part of the directive's public API.
266
+ */
267
+ private readonly _handle;
268
+ /**
269
+ * @hidden
270
+ * Tracks whether the last user input was keyboard, mouse or touch,
271
+ * so focus only shows the tooltip when it came from the keyboard.
272
+ */
273
+ private readonly _inputModality;
274
+ /** @hidden Text direction, used to mirror left/right placements in RTL. */
275
+ private readonly _rtlService;
276
+ /** @hidden Used for all DOM writes and event listeners. */
277
+ private readonly _renderer;
278
+ /** @hidden Used to append and look up the hidden description element. */
279
+ private readonly _document;
280
+ /** @hidden Keeps the template rendered into the hidden description element up to date. */
281
+ private readonly _appRef;
282
+ /** @hidden Effective timing: the defaults overridden by the provided `TOOLTIP_CONFIG`. */
283
+ private readonly _config;
284
+ /** @hidden Id of the hidden description element referenced by the host's `aria-describedby`. */
285
+ private readonly _descriptionId;
286
+ /** @hidden Text content, or an empty string when a template is used. */
287
+ private readonly _text;
288
+ /** @hidden Template content, or `null` when text is used. */
289
+ private readonly _template;
290
+ /**
291
+ * @hidden
292
+ * Whether the tooltip is active: not disabled and has a template or non-empty text.
293
+ * Drives the host listeners, the ARIA attributes and the popover `disabled` state.
294
+ */
295
+ private readonly _enabled;
296
+ /**
297
+ * @hidden
298
+ * Text announced by screen readers for text content. Equals the tooltip text, except that the trailing
299
+ * `(shortcut)` is removed when `fdTooltipKeyShortcuts` is set, because the shortcut is announced via
300
+ * `aria-keyshortcuts`. Template content is announced as rendered.
301
+ */
302
+ private readonly _description;
303
+ /**
304
+ * @hidden
305
+ * Overlay positions passed to the popover: the preferred placement first and the opposite side second,
306
+ * so the overlay flips to the opposite side when the preferred one does not fit.
307
+ */
308
+ private readonly _positions;
309
+ /**
310
+ * @hidden
311
+ * Popover configuration for the tooltip overlay. Triggers are empty because this directive and the
312
+ * coordinator handle all events and timing; the popover only renders. `Escape` is handled by the
313
+ * coordinator, outside clicks by the popover.
314
+ */
315
+ private readonly _popoverConfig;
316
+ /**
317
+ * @hidden
318
+ * Hidden element in `document.body` that holds the screen reader description.
319
+ * `null` while the tooltip is disabled or has no content.
320
+ */
321
+ private _descriptionElement;
322
+ /** @hidden Template content rendered into the hidden description element. */
323
+ private _descriptionView;
324
+ /** @hidden Whether this directive set `aria-keyshortcuts`, so it only removes an attribute it owns. */
325
+ private _keyShortcutsApplied;
326
+ /** @hidden Cleanup functions for the pointer listeners on the open tooltip overlay. */
327
+ private _bodyListeners;
328
+ /** @hidden Timer that detects a touch long-press. */
329
+ private _longPressTimer;
330
+ /** @hidden Whether `PopoverService.initialise()` was called; later changes use `refreshConfiguration()`. */
331
+ private _initialised;
332
+ /**
333
+ * @hidden
334
+ * Wires the directive up reactively:
335
+ * 1. Keeps the popover configuration in sync with the inputs.
336
+ * 2. Keeps the overlay content in sync with `fdTooltip`.
337
+ * 3. Attaches the host listeners only while the tooltip is enabled; disabling it removes them and closes the tooltip.
338
+ * 4. After each render, updates the ARIA attributes and the hidden description element.
339
+ * 5. Attaches hover listeners to the overlay each time it opens, so the tooltip stays open while hovered.
340
+ * 6. On destroy, unregisters from the coordinator and removes everything added to the DOM.
341
+ */
342
+ constructor();
343
+ /**
344
+ * Shows the tooltip immediately, without the show delay, and closes any other open tooltip.
345
+ * Does nothing while the tooltip is disabled or has no content.
346
+ * Accessible from templates via `#ref="fdTooltip"`.
347
+ */
348
+ show(): void;
349
+ /** Hides the tooltip immediately and cancels a pending show. */
350
+ hide(): void;
351
+ /**
352
+ * @hidden
353
+ * Asks the coordinator to show this tooltip after `delay`. Refreshes `aria-describedby` first,
354
+ * because the host's accessible name may have changed since the last render.
355
+ */
356
+ private _requestShow;
357
+ /** @hidden Effective show delay: the `fdTooltipShowDelay` input, or the configured default. */
358
+ private _showDelay;
359
+ /** @hidden Effective hide delay: the `fdTooltipHideDelay` input, or the configured default. */
360
+ private _hideDelay;
361
+ /**
362
+ * @hidden
363
+ * Attaches the host listeners for the given trigger and returns their cleanup functions.
364
+ * Both triggers listen to `keydown` for `Ctrl+Alt+I` (Windows/Linux) / `Ctrl+Option+I` (Mac).
365
+ *
366
+ * `click` trigger:
367
+ * - `click`: toggles the tooltip immediately.
368
+ * - `focusout`: hides the tooltip when focus moves to another element.
369
+ *
370
+ * `hover` trigger:
371
+ * - `pointerenter` / `pointerleave` (mouse and pen only): show / hide with delay.
372
+ * - `focusin` / `focusout`: show on keyboard focus, hide when focus leaves the host.
373
+ * - `click` and `Enter`: hide immediately, because the host action was triggered.
374
+ * - `touchstart` / `touchmove` / `touchend` / `touchcancel`: detect a long-press.
375
+ */
376
+ private _listenToHost;
377
+ /**
378
+ * @hidden
379
+ * Shows the tooltip when the host receives keyboard focus. Ignores focus moving between elements
380
+ * inside the host, focus caused by a mouse click or touch, and focus restored by the browser when
381
+ * the window is activated again.
382
+ */
383
+ private _onFocusIn;
384
+ /**
385
+ * @hidden
386
+ * Handles keyboard input on the host: `Ctrl+Alt+I` (Windows/Linux) / `Ctrl+Option+I` (Mac) toggles the tooltip without delay. With the `hover`
387
+ * trigger, `Enter` hides the tooltip because it triggers the host action; with the `click` trigger,
388
+ * `Enter` already toggles it through the resulting `click` event.
389
+ */
390
+ private _onKeydown;
391
+ /** @hidden Shows the tooltip immediately if it is hidden, hides it otherwise. */
392
+ private _toggle;
393
+ /**
394
+ * @hidden
395
+ * Starts the long-press detection on touch. When the touch is held for `LONG_PRESS_DURATION`,
396
+ * the tooltip shows immediately. Skipped on links so the native link context menu keeps working.
397
+ */
398
+ private _startLongPress;
399
+ /** @hidden Cancels the long-press detection, e.g. when the touch ends early or moves. */
400
+ private _clearLongPress;
401
+ /**
402
+ * @hidden
403
+ * Passes the host size to the tooltip styles, so that with `start`/`end` alignment
404
+ * the arrow points at the centre of the host instead of a fixed icon-button offset.
405
+ */
406
+ private _setHostSize;
407
+ /**
408
+ * @hidden
409
+ * Attaches pointer listeners to the opened overlay, so the tooltip stays open while hovered
410
+ * (e.g. to select its text) and hides after the hide delay when the pointer leaves it.
411
+ * Not used with the `click` trigger, where the pointer position does not close the tooltip.
412
+ */
413
+ private _listenToBody;
414
+ /** @hidden Removes the pointer listeners from the overlay. */
415
+ private _removeBodyListeners;
416
+ /**
417
+ * @hidden
418
+ * Applies the ARIA state to the host:
419
+ * - fills the hidden description element with the text or the rendered template, or removes it,
420
+ * - adds or removes this tooltip's id in `aria-describedby`,
421
+ * - sets or removes `aria-keyshortcuts`.
422
+ * Empty text, no template and `null` shortcuts remove everything this directive added.
423
+ */
424
+ private _updateAria;
425
+ /**
426
+ * @hidden
427
+ * Renders the template into the hidden description element, so screen readers announce the same
428
+ * content as shown in the tooltip. The view is attached to the application, so it stays up to date.
429
+ */
430
+ private _renderDescriptionTemplate;
431
+ /**
432
+ * @hidden
433
+ * Creates the hidden description element in `document.body`. It lives outside the host so the host's
434
+ * DOM and accessible name stay untouched; hidden content is still announced when referenced by
435
+ * `aria-describedby`.
436
+ */
437
+ private _createDescriptionElement;
438
+ /**
439
+ * @hidden
440
+ * Adds this tooltip's description id to the host's `aria-describedby` only when the description
441
+ * differs from the host's accessible name, so screen readers do not announce the same text twice.
442
+ * Ids added by others are always kept.
443
+ */
444
+ private _syncDescribedBy;
445
+ /**
446
+ * @hidden
447
+ * Approximates the host's accessible name for the duplicate-announcement check, using the first
448
+ * available source: `aria-labelledby`, `aria-label`, associated `<label>` elements, text content.
449
+ */
450
+ private _accessibleName;
451
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TooltipDirective, never>;
452
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TooltipDirective, "[fdTooltip]", ["fdTooltip"], { "fdTooltip": { "alias": "fdTooltip"; "required": false; "isSignal": true; }; "fdTooltipPlacement": { "alias": "fdTooltipPlacement"; "required": false; "isSignal": true; }; "fdTooltipAlignment": { "alias": "fdTooltipAlignment"; "required": false; "isSignal": true; }; "fdTooltipTrigger": { "alias": "fdTooltipTrigger"; "required": false; "isSignal": true; }; "fdTooltipDisabled": { "alias": "fdTooltipDisabled"; "required": false; "isSignal": true; }; "fdTooltipShowDelay": { "alias": "fdTooltipShowDelay"; "required": false; "isSignal": true; }; "fdTooltipHideDelay": { "alias": "fdTooltipHideDelay"; "required": false; "isSignal": true; }; "fdTooltipKeyShortcuts": { "alias": "fdTooltipKeyShortcuts"; "required": false; "isSignal": true; }; "fdTooltipBodyClass": { "alias": "fdTooltipBodyClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
453
+ }
454
+
455
+ export { DEFAULT_TOOLTIP_CONFIG, TOOLTIP_CONFIG, TooltipCoordinator, TooltipDirective };
456
+ export type { TooltipAlignment, TooltipConfig, TooltipHandle, TooltipPlacement, TooltipTrigger };
@@ -229,6 +229,10 @@ declare class UserMenuControlComponent {
229
229
  private el;
230
230
  /** Event emitted when control element is clicked */
231
231
  clicked: EventEmitter<void>;
232
+ /** Whether the user menu is expanded */
233
+ readonly isExpanded: _angular_core.WritableSignal<boolean>;
234
+ /** @hidden */
235
+ protected readonly ariaLabel: _angular_core.Signal<string>;
232
236
  /** @hidden */
233
237
  constructor(el: ElementRef<HTMLElement>);
234
238
  /** @hidden */
@@ -188,6 +188,7 @@ export * from '@fundamental-ngx/core/avatar-group';
188
188
  export * from '@fundamental-ngx/core/datetime';
189
189
  export * from '@fundamental-ngx/core/mobile-mode';
190
190
  export * from '@fundamental-ngx/core/shared';
191
+ export * from '@fundamental-ngx/core/tooltip';
191
192
 
192
193
  /**
193
194
  * @deprecated