@aeris-ui/core 22.0.0-alpha.8 → 22.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1171 -428
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +205 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +547 -177
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +730 -110
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +690 -353
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +915 -423
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +432 -135
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-color-picker.mjs +1313 -683
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +819 -310
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1392 -551
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1447 -744
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +900 -450
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1656 -863
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1066 -355
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1002 -326
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +402 -249
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +934 -572
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1313 -511
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +672 -170
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-galleria.mjs +1987 -797
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -106
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -114
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +650 -248
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +902 -334
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +667 -253
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +618 -152
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +601 -388
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1032 -495
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +960 -491
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +587 -196
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1550 -552
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +518 -202
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +455 -177
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +329 -127
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +894 -247
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +892 -386
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +545 -177
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +386 -119
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +502 -225
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +204 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1794 -643
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +868 -404
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +800 -329
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +880 -270
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +1984 -865
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +686 -324
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +846 -212
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1256 -1423
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -147
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +885 -465
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +855 -615
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +390 -127
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +623 -345
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1356 -601
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2001 -942
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1103 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +861 -842
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/aeris-ui-core-accordion.d.ts +166 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +71 -31
- package/types/aeris-ui-core-auto-complete.d.ts +326 -149
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -47
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +162 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -64
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +197 -117
- package/types/aeris-ui-core-cascade-select.d.ts +252 -131
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -55
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-color-picker.d.ts +347 -150
- package/types/aeris-ui-core-compare.d.ts +224 -101
- package/types/aeris-ui-core-confirm-dialog.d.ts +441 -249
- package/types/aeris-ui-core-confirm-popup.d.ts +440 -268
- package/types/aeris-ui-core-context-menu.d.ts +262 -150
- package/types/aeris-ui-core-date-picker.d.ts +488 -226
- package/types/aeris-ui-core-dialog.d.ts +288 -121
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -116
- package/types/aeris-ui-core-dynamic-dialog.d.ts +157 -140
- package/types/aeris-ui-core-editor.d.ts +243 -124
- package/types/aeris-ui-core-file-upload.d.ts +366 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +158 -62
- package/types/aeris-ui-core-galleria.d.ts +589 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -34
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -35
- package/types/aeris-ui-core-input-mask.d.ts +194 -71
- package/types/aeris-ui-core-input-number.d.ts +272 -90
- package/types/aeris-ui-core-input-otp.d.ts +190 -82
- package/types/aeris-ui-core-input-text.d.ts +185 -62
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +174 -123
- package/types/aeris-ui-core-menu.d.ts +275 -172
- package/types/aeris-ui-core-menubar.d.ts +272 -160
- package/types/aeris-ui-core-message.d.ts +132 -61
- package/types/aeris-ui-core-meter-group.d.ts +162 -90
- package/types/aeris-ui-core-multi-select.d.ts +435 -187
- package/types/aeris-ui-core-order-list.d.ts +143 -66
- package/types/aeris-ui-core-organization-chart.d.ts +132 -77
- package/types/aeris-ui-core-paginator.d.ts +92 -46
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +257 -108
- package/types/aeris-ui-core-pick-list.d.ts +373 -179
- package/types/aeris-ui-core-popover.d.ts +218 -107
- package/types/aeris-ui-core-progress-bar.d.ts +156 -74
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -51
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +64 -29
- package/types/aeris-ui-core-select.d.ts +474 -226
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -116
- package/types/aeris-ui-core-speed-dial.d.ts +240 -112
- package/types/aeris-ui-core-split-button.d.ts +264 -121
- package/types/aeris-ui-core-splitter.d.ts +224 -106
- package/types/aeris-ui-core-stepper.d.ts +183 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +595 -308
- package/types/aeris-ui-core-tabs.d.ts +163 -90
- package/types/aeris-ui-core-textarea.d.ts +261 -81
- package/types/aeris-ui-core-theme-builder.d.ts +463 -475
- package/types/aeris-ui-core-theming.d.ts +42 -49
- package/types/aeris-ui-core-tiered-menu.d.ts +249 -147
- package/types/aeris-ui-core-timeline.d.ts +108 -71
- package/types/aeris-ui-core-toast.d.ts +219 -155
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -52
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -92
- package/types/aeris-ui-core-tree-select.d.ts +359 -179
- package/types/aeris-ui-core-tree-table.d.ts +565 -290
- package/types/aeris-ui-core-tree.d.ts +269 -165
- package/types/aeris-ui-core.d.ts +161 -125
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { aerisInternalCreateFrameScheduler,
|
|
5
|
-
|
|
1
|
+
import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ApplicationRef, Component, DestroyRef, Directive, ElementRef, EnvironmentInjector, TemplateRef, booleanAttribute, computed, createComponent, inject, input, output, signal } from "@angular/core";
|
|
4
|
+
import { AERIS_OVERLAY_APPEND_TO, aerisInternalCreateFrameScheduler, aerisInternalPositionAnchoredOverlay, ɵaerisResolveAppendTo } from "@aeris-ui/core";
|
|
6
5
|
let nextTooltipId = 0;
|
|
7
|
-
class AerisTooltipOverlay {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
6
|
+
var AerisTooltipOverlay = class AerisTooltipOverlay {
|
|
7
|
+
id = signal("", ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
|
|
8
|
+
text = signal("", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
9
|
+
templateContent = signal(null, ...ngDevMode ? [{ debugName: "templateContent" }] : /* istanbul ignore next */ []);
|
|
10
|
+
position = signal("top", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
11
|
+
coordinates = signal({
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0
|
|
14
|
+
}, ...ngDevMode ? [{ debugName: "coordinates" }] : /* istanbul ignore next */ []);
|
|
15
|
+
interactive = signal(false, ...ngDevMode ? [{ debugName: "interactive" }] : /* istanbul ignore next */ []);
|
|
16
|
+
maxWidth = signal("", ...ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []);
|
|
17
|
+
styleClass = signal("", ...ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []);
|
|
18
|
+
panelClass = computed(() => ["aeris-tooltip__panel", this.styleClass()].filter(Boolean).join(" "), ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
|
|
19
|
+
templateContext = computed(() => ({ $implicit: this.text() }), ...ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []);
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
|
+
minVersion: "12.0.0",
|
|
22
|
+
version: "22.2.1",
|
|
23
|
+
ngImport: i0,
|
|
24
|
+
type: AerisTooltipOverlay,
|
|
25
|
+
deps: [],
|
|
26
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
27
|
+
});
|
|
28
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
29
|
+
minVersion: "17.0.0",
|
|
30
|
+
version: "22.2.1",
|
|
31
|
+
type: AerisTooltipOverlay,
|
|
32
|
+
isStandalone: true,
|
|
33
|
+
selector: "aeris-tooltip-overlay",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
template: `
|
|
32
36
|
<div
|
|
33
37
|
[class]="panelClass()"
|
|
34
38
|
role="tooltip"
|
|
@@ -46,11 +50,32 @@ class AerisTooltipOverlay {
|
|
|
46
50
|
{{ text() }}
|
|
47
51
|
}
|
|
48
52
|
</div>
|
|
49
|
-
`,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
`,
|
|
54
|
+
isInline: true,
|
|
55
|
+
styles: [":host{display:contents}.aeris-tooltip__panel{position:fixed;z-index:var(--aeris-tooltip-z-index, 1060);max-width:var(--aeris-tooltip-max-width, 18rem);padding:var(--aeris-tooltip-padding, .45rem .625rem);border-radius:var(--aeris-tooltip-radius, var(--aeris-radius-sm, .4375rem));background:var(--aeris-tooltip-background, var(--aeris-text, #222222));color:var(--aeris-tooltip-color, var(--aeris-surface, #fff));box-shadow:var(--aeris-tooltip-shadow, 0 12px 32px color-mix(in srgb, var(--aeris-text, #222222) 20%, transparent));font-size:var(--aeris-tooltip-font-size, .75rem);font-weight:650;line-height:1.4;pointer-events:none;white-space:normal}.aeris-tooltip__panel[data-interactive=true]{pointer-events:auto}.aeris-tooltip__arrow{position:absolute;width:.5rem;height:.5rem;background:inherit;transform:rotate(45deg)}.aeris-tooltip__panel[data-position=top] .aeris-tooltip__arrow{bottom:-.25rem;left:calc(50% - .25rem)}.aeris-tooltip__panel[data-position=bottom] .aeris-tooltip__arrow{top:-.25rem;left:calc(50% - .25rem)}.aeris-tooltip__panel[data-position=left] .aeris-tooltip__arrow{top:calc(50% - .25rem);right:-.25rem}.aeris-tooltip__panel[data-position=right] .aeris-tooltip__arrow{top:calc(50% - .25rem);left:-.25rem}@media(prefers-reduced-motion:reduce){.aeris-tooltip__panel{transition:none}}\n"],
|
|
56
|
+
dependencies: [{
|
|
57
|
+
kind: "directive",
|
|
58
|
+
type: NgTemplateOutlet,
|
|
59
|
+
selector: "[ngTemplateOutlet]",
|
|
60
|
+
inputs: [
|
|
61
|
+
"ngTemplateOutletContext",
|
|
62
|
+
"ngTemplateOutlet",
|
|
63
|
+
"ngTemplateOutletInjector"
|
|
64
|
+
]
|
|
65
|
+
}]
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
69
|
+
minVersion: "12.0.0",
|
|
70
|
+
version: "22.2.1",
|
|
71
|
+
ngImport: i0,
|
|
72
|
+
type: AerisTooltipOverlay,
|
|
73
|
+
decorators: [{
|
|
74
|
+
type: Component,
|
|
75
|
+
args: [{
|
|
76
|
+
selector: "aeris-tooltip-overlay",
|
|
77
|
+
imports: [NgTemplateOutlet],
|
|
78
|
+
template: `
|
|
54
79
|
<div
|
|
55
80
|
[class]="panelClass()"
|
|
56
81
|
role="tooltip"
|
|
@@ -68,315 +93,568 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
68
93
|
{{ text() }}
|
|
69
94
|
}
|
|
70
95
|
</div>
|
|
71
|
-
`,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
96
|
+
`,
|
|
97
|
+
styles: [":host{display:contents}.aeris-tooltip__panel{position:fixed;z-index:var(--aeris-tooltip-z-index, 1060);max-width:var(--aeris-tooltip-max-width, 18rem);padding:var(--aeris-tooltip-padding, .45rem .625rem);border-radius:var(--aeris-tooltip-radius, var(--aeris-radius-sm, .4375rem));background:var(--aeris-tooltip-background, var(--aeris-text, #222222));color:var(--aeris-tooltip-color, var(--aeris-surface, #fff));box-shadow:var(--aeris-tooltip-shadow, 0 12px 32px color-mix(in srgb, var(--aeris-text, #222222) 20%, transparent));font-size:var(--aeris-tooltip-font-size, .75rem);font-weight:650;line-height:1.4;pointer-events:none;white-space:normal}.aeris-tooltip__panel[data-interactive=true]{pointer-events:auto}.aeris-tooltip__arrow{position:absolute;width:.5rem;height:.5rem;background:inherit;transform:rotate(45deg)}.aeris-tooltip__panel[data-position=top] .aeris-tooltip__arrow{bottom:-.25rem;left:calc(50% - .25rem)}.aeris-tooltip__panel[data-position=bottom] .aeris-tooltip__arrow{top:-.25rem;left:calc(50% - .25rem)}.aeris-tooltip__panel[data-position=left] .aeris-tooltip__arrow{top:calc(50% - .25rem);right:-.25rem}.aeris-tooltip__panel[data-position=right] .aeris-tooltip__arrow{top:calc(50% - .25rem);left:-.25rem}@media(prefers-reduced-motion:reduce){.aeris-tooltip__panel{transition:none}}\n"]
|
|
98
|
+
}]
|
|
99
|
+
}]
|
|
100
|
+
});
|
|
101
|
+
var AerisTooltip = class AerisTooltip {
|
|
102
|
+
repositionFrame = aerisInternalCreateFrameScheduler(() => this.reposition());
|
|
103
|
+
host = inject(ElementRef);
|
|
104
|
+
appRef = inject(ApplicationRef);
|
|
105
|
+
document = inject(DOCUMENT);
|
|
106
|
+
destroyRef = inject(DestroyRef);
|
|
107
|
+
environmentInjector = inject(EnvironmentInjector);
|
|
108
|
+
defaultAppendTo = inject(AERIS_OVERLAY_APPEND_TO);
|
|
109
|
+
overlayRef = null;
|
|
110
|
+
showTimer = null;
|
|
111
|
+
hideTimer = null;
|
|
112
|
+
overlayPanel = null;
|
|
113
|
+
overlayPointerInside = false;
|
|
114
|
+
visible = false;
|
|
115
|
+
tooltipId = `aeris-tooltip-${nextTooltipId++}`;
|
|
116
|
+
content = input("", {
|
|
117
|
+
...ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {},
|
|
118
|
+
alias: "aerisTooltip"
|
|
119
|
+
});
|
|
120
|
+
position = input("top", {
|
|
121
|
+
...ngDevMode ? { debugName: "position" } : /* istanbul ignore next */ {},
|
|
122
|
+
alias: "aerisTooltipPosition"
|
|
123
|
+
});
|
|
124
|
+
event = input("both", {
|
|
125
|
+
...ngDevMode ? { debugName: "event" } : /* istanbul ignore next */ {},
|
|
126
|
+
alias: "aerisTooltipEvent"
|
|
127
|
+
});
|
|
128
|
+
showDelay = input(0, {
|
|
129
|
+
...ngDevMode ? { debugName: "showDelay" } : /* istanbul ignore next */ {},
|
|
130
|
+
alias: "aerisTooltipShowDelay"
|
|
131
|
+
});
|
|
132
|
+
hideDelay = input(0, {
|
|
133
|
+
...ngDevMode ? { debugName: "hideDelay" } : /* istanbul ignore next */ {},
|
|
134
|
+
alias: "aerisTooltipHideDelay"
|
|
135
|
+
});
|
|
136
|
+
disabled = input(false, {
|
|
137
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
138
|
+
alias: "aerisTooltipDisabled",
|
|
139
|
+
transform: booleanAttribute
|
|
140
|
+
});
|
|
141
|
+
autoHide = input(true, {
|
|
142
|
+
...ngDevMode ? { debugName: "autoHide" } : /* istanbul ignore next */ {},
|
|
143
|
+
alias: "aerisTooltipAutoHide",
|
|
144
|
+
transform: booleanAttribute
|
|
145
|
+
});
|
|
146
|
+
offset = input(8, {
|
|
147
|
+
...ngDevMode ? { debugName: "offset" } : /* istanbul ignore next */ {},
|
|
148
|
+
alias: "aerisTooltipOffset"
|
|
149
|
+
});
|
|
150
|
+
viewportMargin = input(6, {
|
|
151
|
+
...ngDevMode ? { debugName: "viewportMargin" } : /* istanbul ignore next */ {},
|
|
152
|
+
alias: "aerisTooltipViewportMargin"
|
|
153
|
+
});
|
|
154
|
+
maxWidth = input("", {
|
|
155
|
+
...ngDevMode ? { debugName: "maxWidth" } : /* istanbul ignore next */ {},
|
|
156
|
+
alias: "aerisTooltipMaxWidth"
|
|
157
|
+
});
|
|
158
|
+
styleClass = input("", {
|
|
159
|
+
...ngDevMode ? { debugName: "styleClass" } : /* istanbul ignore next */ {},
|
|
160
|
+
alias: "aerisTooltipStyleClass"
|
|
161
|
+
});
|
|
162
|
+
appendTo = input(void 0, {
|
|
163
|
+
...ngDevMode ? { debugName: "appendTo" } : /* istanbul ignore next */ {},
|
|
164
|
+
alias: "aerisTooltipAppendTo"
|
|
165
|
+
});
|
|
166
|
+
truncatedOnly = input(false, {
|
|
167
|
+
...ngDevMode ? { debugName: "truncatedOnly" } : /* istanbul ignore next */ {},
|
|
168
|
+
alias: "aerisTooltipTruncatedOnly",
|
|
169
|
+
transform: booleanAttribute
|
|
170
|
+
});
|
|
171
|
+
opened = output({ alias: "aerisTooltipOpened" });
|
|
172
|
+
closed = output({ alias: "aerisTooltipClosed" });
|
|
173
|
+
constructor() {
|
|
174
|
+
this.destroyRef.onDestroy(() => {
|
|
175
|
+
this.clearShowTimer();
|
|
176
|
+
this.clearHideTimer();
|
|
177
|
+
this.unbindPositionTracking();
|
|
178
|
+
this.removeTooltipDescription();
|
|
179
|
+
this.destroyOverlay();
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
show(originalEvent = null) {
|
|
183
|
+
if (this.disabled() || !this.hasContent() || !this.canShowForSize()) {
|
|
184
|
+
this.hide(originalEvent, "disabled");
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
this.clearHideTimer();
|
|
188
|
+
this.clearShowTimer();
|
|
189
|
+
const delay = Math.max(0, this.showDelay());
|
|
190
|
+
if (delay > 0) this.showTimer = setTimeout(() => this.open(originalEvent), delay);
|
|
191
|
+
else this.open(originalEvent);
|
|
192
|
+
}
|
|
193
|
+
hide(originalEvent = null, reason = "api") {
|
|
194
|
+
this.clearShowTimer();
|
|
195
|
+
this.clearHideTimer();
|
|
196
|
+
const delay = Math.max(0, this.hideDelay());
|
|
197
|
+
if (delay > 0) this.hideTimer = setTimeout(() => this.close(originalEvent, reason), delay);
|
|
198
|
+
else this.close(originalEvent, reason);
|
|
199
|
+
}
|
|
200
|
+
handlePointerEnter(event) {
|
|
201
|
+
if (this.event() === "focus") return;
|
|
202
|
+
this.show(event);
|
|
203
|
+
}
|
|
204
|
+
handlePointerLeave(event) {
|
|
205
|
+
if (this.event() === "focus") return;
|
|
206
|
+
if (!this.autoHide() && this.overlayPointerInside) return;
|
|
207
|
+
this.hide(event, "pointerleave");
|
|
208
|
+
}
|
|
209
|
+
handleFocusIn(event) {
|
|
210
|
+
if (this.event() === "hover") return;
|
|
211
|
+
this.show(event);
|
|
212
|
+
}
|
|
213
|
+
handleFocusOut(event) {
|
|
214
|
+
if (this.event() === "hover") return;
|
|
215
|
+
this.hide(event, "blur");
|
|
216
|
+
}
|
|
217
|
+
handleEscape(event) {
|
|
218
|
+
if (!this.visible) return;
|
|
219
|
+
event.preventDefault();
|
|
220
|
+
this.hide(event, "escape");
|
|
221
|
+
}
|
|
222
|
+
open(originalEvent) {
|
|
223
|
+
if (this.disabled() || !this.hasContent() || !this.canShowForSize()) return;
|
|
224
|
+
const overlay = this.ensureOverlay();
|
|
225
|
+
const content = this.content();
|
|
226
|
+
overlay.instance.id.set(this.tooltipId);
|
|
227
|
+
overlay.instance.position.set(this.position());
|
|
228
|
+
overlay.instance.interactive.set(!this.autoHide());
|
|
229
|
+
overlay.instance.maxWidth.set(this.maxWidth());
|
|
230
|
+
overlay.instance.styleClass.set(this.styleClass());
|
|
231
|
+
if (content instanceof TemplateRef) {
|
|
232
|
+
overlay.instance.templateContent.set(content);
|
|
233
|
+
overlay.instance.text.set("");
|
|
234
|
+
} else {
|
|
235
|
+
overlay.instance.templateContent.set(null);
|
|
236
|
+
overlay.instance.text.set(String(content ?? ""));
|
|
237
|
+
}
|
|
238
|
+
overlay.changeDetectorRef.detectChanges();
|
|
239
|
+
this.bindOverlayPanel(overlay);
|
|
240
|
+
this.reposition();
|
|
241
|
+
this.addTooltipDescription();
|
|
242
|
+
if (!this.visible) {
|
|
243
|
+
this.visible = true;
|
|
244
|
+
this.opened.emit({
|
|
245
|
+
originalEvent,
|
|
246
|
+
visible: true,
|
|
247
|
+
reason: "show"
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
close(originalEvent, reason) {
|
|
252
|
+
if (!this.overlayRef && !this.visible) return;
|
|
253
|
+
this.removeTooltipDescription();
|
|
254
|
+
this.destroyOverlay();
|
|
255
|
+
if (!this.visible) return;
|
|
256
|
+
this.visible = false;
|
|
257
|
+
this.closed.emit({
|
|
258
|
+
originalEvent,
|
|
259
|
+
visible: false,
|
|
260
|
+
reason
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
ensureOverlay() {
|
|
264
|
+
if (this.overlayRef) return this.overlayRef;
|
|
265
|
+
const overlayRef = createComponent(AerisTooltipOverlay, { environmentInjector: this.environmentInjector });
|
|
266
|
+
this.overlayRef = overlayRef;
|
|
267
|
+
this.appRef.attachView(overlayRef.hostView);
|
|
268
|
+
const target = ɵaerisResolveAppendTo(this.appendTo() ?? this.defaultAppendTo, this.document);
|
|
269
|
+
(target === "self" ? this.document.body : target).appendChild(this.rootNode(overlayRef));
|
|
270
|
+
const element = this.rootElement(overlayRef);
|
|
271
|
+
element.addEventListener("pointerenter", this.handleOverlayPointerEnter);
|
|
272
|
+
element.addEventListener("pointerleave", this.handleOverlayPointerLeave);
|
|
273
|
+
this.bindPositionTracking();
|
|
274
|
+
return overlayRef;
|
|
275
|
+
}
|
|
276
|
+
destroyOverlay() {
|
|
277
|
+
const overlayRef = this.overlayRef;
|
|
278
|
+
if (!overlayRef) return;
|
|
279
|
+
this.unbindPositionTracking();
|
|
280
|
+
const element = this.rootElement(overlayRef);
|
|
281
|
+
element.removeEventListener("pointerenter", this.handleOverlayPointerEnter);
|
|
282
|
+
element.removeEventListener("pointerleave", this.handleOverlayPointerLeave);
|
|
283
|
+
this.overlayPanel?.removeEventListener("pointerenter", this.handleOverlayPointerEnter);
|
|
284
|
+
this.overlayPanel?.removeEventListener("pointerleave", this.handleOverlayPointerLeave);
|
|
285
|
+
this.overlayPanel = null;
|
|
286
|
+
this.appRef.detachView(overlayRef.hostView);
|
|
287
|
+
overlayRef.destroy();
|
|
288
|
+
this.overlayRef = null;
|
|
289
|
+
this.overlayPointerInside = false;
|
|
290
|
+
}
|
|
291
|
+
bindPositionTracking() {
|
|
292
|
+
const view = this.document.defaultView;
|
|
293
|
+
const viewport = view?.visualViewport;
|
|
294
|
+
this.document.addEventListener("scroll", this.repositionFrame.schedule, true);
|
|
295
|
+
view?.addEventListener("scroll", this.repositionFrame.schedule);
|
|
296
|
+
view?.addEventListener("resize", this.repositionFrame.schedule);
|
|
297
|
+
viewport?.addEventListener("scroll", this.repositionFrame.schedule);
|
|
298
|
+
viewport?.addEventListener("resize", this.repositionFrame.schedule);
|
|
299
|
+
}
|
|
300
|
+
unbindPositionTracking() {
|
|
301
|
+
const view = this.document.defaultView;
|
|
302
|
+
const viewport = view?.visualViewport;
|
|
303
|
+
this.document.removeEventListener("scroll", this.repositionFrame.schedule, true);
|
|
304
|
+
view?.removeEventListener("scroll", this.repositionFrame.schedule);
|
|
305
|
+
view?.removeEventListener("resize", this.repositionFrame.schedule);
|
|
306
|
+
viewport?.removeEventListener("scroll", this.repositionFrame.schedule);
|
|
307
|
+
viewport?.removeEventListener("resize", this.repositionFrame.schedule);
|
|
308
|
+
this.repositionFrame.cancel();
|
|
309
|
+
}
|
|
310
|
+
reposition() {
|
|
311
|
+
const overlay = this.overlayRef;
|
|
312
|
+
if (!overlay) return;
|
|
313
|
+
const panel = this.rootElement(overlay).querySelector(".aeris-tooltip__panel");
|
|
314
|
+
const view = this.document.defaultView;
|
|
315
|
+
if (!panel || !view) return;
|
|
316
|
+
const targetRect = this.host.nativeElement.getBoundingClientRect();
|
|
317
|
+
const panelRect = panel.getBoundingClientRect();
|
|
318
|
+
const width = panelRect.width || panel.offsetWidth || 160;
|
|
319
|
+
const height = panelRect.height || panel.offsetHeight || 38;
|
|
320
|
+
const viewport = view.visualViewport;
|
|
321
|
+
const { x, y, placement } = aerisInternalPositionAnchoredOverlay({
|
|
322
|
+
target: targetRect,
|
|
323
|
+
width,
|
|
324
|
+
height,
|
|
325
|
+
placement: this.position(),
|
|
326
|
+
alignment: "center",
|
|
327
|
+
offset: this.offset(),
|
|
328
|
+
margin: 0,
|
|
329
|
+
collisionPadding: this.viewportMargin(),
|
|
330
|
+
viewportWidth: viewport?.width ?? view.innerWidth,
|
|
331
|
+
viewportHeight: viewport?.height ?? view.innerHeight,
|
|
332
|
+
viewportLeft: viewport?.offsetLeft ?? 0,
|
|
333
|
+
viewportTop: viewport?.offsetTop ?? 0
|
|
334
|
+
});
|
|
335
|
+
overlay.instance.position.set(placement);
|
|
336
|
+
overlay.instance.coordinates.set({
|
|
337
|
+
x,
|
|
338
|
+
y
|
|
339
|
+
});
|
|
340
|
+
overlay.changeDetectorRef.detectChanges();
|
|
341
|
+
panel.style.left = `${x}px`;
|
|
342
|
+
panel.style.top = `${y}px`;
|
|
343
|
+
}
|
|
344
|
+
bindOverlayPanel(overlayRef) {
|
|
345
|
+
const panel = this.rootElement(overlayRef).querySelector(".aeris-tooltip__panel");
|
|
346
|
+
if (!panel || panel === this.overlayPanel) return;
|
|
347
|
+
this.overlayPanel?.removeEventListener("pointerenter", this.handleOverlayPointerEnter);
|
|
348
|
+
this.overlayPanel?.removeEventListener("pointerleave", this.handleOverlayPointerLeave);
|
|
349
|
+
panel.addEventListener("pointerenter", this.handleOverlayPointerEnter);
|
|
350
|
+
panel.addEventListener("pointerleave", this.handleOverlayPointerLeave);
|
|
351
|
+
this.overlayPanel = panel;
|
|
352
|
+
}
|
|
353
|
+
hasContent() {
|
|
354
|
+
const content = this.content();
|
|
355
|
+
return content instanceof TemplateRef || String(content ?? "").trim().length > 0;
|
|
356
|
+
}
|
|
357
|
+
canShowForSize() {
|
|
358
|
+
if (!this.truncatedOnly()) return true;
|
|
359
|
+
const element = this.host.nativeElement;
|
|
360
|
+
return element.scrollWidth > element.clientWidth || element.scrollHeight > element.clientHeight;
|
|
361
|
+
}
|
|
362
|
+
addTooltipDescription() {
|
|
363
|
+
const host = this.host.nativeElement;
|
|
364
|
+
const ids = new Set((host.getAttribute("aria-describedby") ?? "").split(/\s+/u).filter(Boolean));
|
|
365
|
+
ids.add(this.tooltipId);
|
|
366
|
+
host.setAttribute("aria-describedby", [...ids].join(" "));
|
|
367
|
+
}
|
|
368
|
+
removeTooltipDescription() {
|
|
369
|
+
const host = this.host.nativeElement;
|
|
370
|
+
const ids = (host.getAttribute("aria-describedby") ?? "").split(/\s+/u).filter((id) => id && id !== this.tooltipId);
|
|
371
|
+
if (ids.length) host.setAttribute("aria-describedby", ids.join(" "));
|
|
372
|
+
else host.removeAttribute("aria-describedby");
|
|
373
|
+
}
|
|
374
|
+
clearShowTimer() {
|
|
375
|
+
if (!this.showTimer) return;
|
|
376
|
+
clearTimeout(this.showTimer);
|
|
377
|
+
this.showTimer = null;
|
|
378
|
+
}
|
|
379
|
+
clearHideTimer() {
|
|
380
|
+
if (!this.hideTimer) return;
|
|
381
|
+
clearTimeout(this.hideTimer);
|
|
382
|
+
this.hideTimer = null;
|
|
383
|
+
}
|
|
384
|
+
rootNode(overlayRef) {
|
|
385
|
+
const [node] = overlayRef.hostView.rootNodes;
|
|
386
|
+
return node instanceof Node ? node : this.document.createTextNode("");
|
|
387
|
+
}
|
|
388
|
+
rootElement(overlayRef) {
|
|
389
|
+
const node = this.rootNode(overlayRef);
|
|
390
|
+
return node instanceof HTMLElement ? node : this.document.body;
|
|
391
|
+
}
|
|
392
|
+
handleOverlayPointerEnter = () => {
|
|
393
|
+
this.overlayPointerInside = true;
|
|
394
|
+
this.clearHideTimer();
|
|
395
|
+
};
|
|
396
|
+
handleOverlayPointerLeave = (event) => {
|
|
397
|
+
this.overlayPointerInside = false;
|
|
398
|
+
if (!this.autoHide()) this.hide(event, "pointerleave");
|
|
399
|
+
};
|
|
400
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
401
|
+
minVersion: "12.0.0",
|
|
402
|
+
version: "22.2.1",
|
|
403
|
+
ngImport: i0,
|
|
404
|
+
type: AerisTooltip,
|
|
405
|
+
deps: [],
|
|
406
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
407
|
+
});
|
|
408
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
409
|
+
minVersion: "17.1.0",
|
|
410
|
+
version: "22.2.1",
|
|
411
|
+
type: AerisTooltip,
|
|
412
|
+
isStandalone: true,
|
|
413
|
+
selector: "[aerisTooltip]",
|
|
414
|
+
inputs: {
|
|
415
|
+
content: {
|
|
416
|
+
classPropertyName: "content",
|
|
417
|
+
publicName: "aerisTooltip",
|
|
418
|
+
isSignal: true,
|
|
419
|
+
isRequired: false,
|
|
420
|
+
transformFunction: null
|
|
421
|
+
},
|
|
422
|
+
position: {
|
|
423
|
+
classPropertyName: "position",
|
|
424
|
+
publicName: "aerisTooltipPosition",
|
|
425
|
+
isSignal: true,
|
|
426
|
+
isRequired: false,
|
|
427
|
+
transformFunction: null
|
|
428
|
+
},
|
|
429
|
+
event: {
|
|
430
|
+
classPropertyName: "event",
|
|
431
|
+
publicName: "aerisTooltipEvent",
|
|
432
|
+
isSignal: true,
|
|
433
|
+
isRequired: false,
|
|
434
|
+
transformFunction: null
|
|
435
|
+
},
|
|
436
|
+
showDelay: {
|
|
437
|
+
classPropertyName: "showDelay",
|
|
438
|
+
publicName: "aerisTooltipShowDelay",
|
|
439
|
+
isSignal: true,
|
|
440
|
+
isRequired: false,
|
|
441
|
+
transformFunction: null
|
|
442
|
+
},
|
|
443
|
+
hideDelay: {
|
|
444
|
+
classPropertyName: "hideDelay",
|
|
445
|
+
publicName: "aerisTooltipHideDelay",
|
|
446
|
+
isSignal: true,
|
|
447
|
+
isRequired: false,
|
|
448
|
+
transformFunction: null
|
|
449
|
+
},
|
|
450
|
+
disabled: {
|
|
451
|
+
classPropertyName: "disabled",
|
|
452
|
+
publicName: "aerisTooltipDisabled",
|
|
453
|
+
isSignal: true,
|
|
454
|
+
isRequired: false,
|
|
455
|
+
transformFunction: null
|
|
456
|
+
},
|
|
457
|
+
autoHide: {
|
|
458
|
+
classPropertyName: "autoHide",
|
|
459
|
+
publicName: "aerisTooltipAutoHide",
|
|
460
|
+
isSignal: true,
|
|
461
|
+
isRequired: false,
|
|
462
|
+
transformFunction: null
|
|
463
|
+
},
|
|
464
|
+
offset: {
|
|
465
|
+
classPropertyName: "offset",
|
|
466
|
+
publicName: "aerisTooltipOffset",
|
|
467
|
+
isSignal: true,
|
|
468
|
+
isRequired: false,
|
|
469
|
+
transformFunction: null
|
|
470
|
+
},
|
|
471
|
+
viewportMargin: {
|
|
472
|
+
classPropertyName: "viewportMargin",
|
|
473
|
+
publicName: "aerisTooltipViewportMargin",
|
|
474
|
+
isSignal: true,
|
|
475
|
+
isRequired: false,
|
|
476
|
+
transformFunction: null
|
|
477
|
+
},
|
|
478
|
+
maxWidth: {
|
|
479
|
+
classPropertyName: "maxWidth",
|
|
480
|
+
publicName: "aerisTooltipMaxWidth",
|
|
481
|
+
isSignal: true,
|
|
482
|
+
isRequired: false,
|
|
483
|
+
transformFunction: null
|
|
484
|
+
},
|
|
485
|
+
styleClass: {
|
|
486
|
+
classPropertyName: "styleClass",
|
|
487
|
+
publicName: "aerisTooltipStyleClass",
|
|
488
|
+
isSignal: true,
|
|
489
|
+
isRequired: false,
|
|
490
|
+
transformFunction: null
|
|
491
|
+
},
|
|
492
|
+
appendTo: {
|
|
493
|
+
classPropertyName: "appendTo",
|
|
494
|
+
publicName: "aerisTooltipAppendTo",
|
|
495
|
+
isSignal: true,
|
|
496
|
+
isRequired: false,
|
|
497
|
+
transformFunction: null
|
|
498
|
+
},
|
|
499
|
+
truncatedOnly: {
|
|
500
|
+
classPropertyName: "truncatedOnly",
|
|
501
|
+
publicName: "aerisTooltipTruncatedOnly",
|
|
502
|
+
isSignal: true,
|
|
503
|
+
isRequired: false,
|
|
504
|
+
transformFunction: null
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
outputs: {
|
|
508
|
+
opened: "aerisTooltipOpened",
|
|
509
|
+
closed: "aerisTooltipClosed"
|
|
510
|
+
},
|
|
511
|
+
host: { listeners: {
|
|
512
|
+
"pointerenter": "handlePointerEnter($event)",
|
|
513
|
+
"pointerleave": "handlePointerLeave($event)",
|
|
514
|
+
"focusin": "handleFocusIn($event)",
|
|
515
|
+
"focusout": "handleFocusOut($event)",
|
|
516
|
+
"keydown.escape": "handleEscape($event)"
|
|
517
|
+
} },
|
|
518
|
+
exportAs: ["aerisTooltip"],
|
|
519
|
+
ngImport: i0
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
523
|
+
minVersion: "12.0.0",
|
|
524
|
+
version: "22.2.1",
|
|
525
|
+
ngImport: i0,
|
|
526
|
+
type: AerisTooltip,
|
|
527
|
+
decorators: [{
|
|
528
|
+
type: Directive,
|
|
529
|
+
args: [{
|
|
530
|
+
selector: "[aerisTooltip]",
|
|
531
|
+
exportAs: "aerisTooltip",
|
|
532
|
+
host: {
|
|
533
|
+
"(pointerenter)": "handlePointerEnter($event)",
|
|
534
|
+
"(pointerleave)": "handlePointerLeave($event)",
|
|
535
|
+
"(focusin)": "handleFocusIn($event)",
|
|
536
|
+
"(focusout)": "handleFocusOut($event)",
|
|
537
|
+
"(keydown.escape)": "handleEscape($event)"
|
|
538
|
+
}
|
|
539
|
+
}]
|
|
540
|
+
}],
|
|
541
|
+
ctorParameters: () => [],
|
|
542
|
+
propDecorators: {
|
|
543
|
+
content: [{
|
|
544
|
+
type: i0.Input,
|
|
545
|
+
args: [{
|
|
546
|
+
isSignal: true,
|
|
547
|
+
alias: "aerisTooltip",
|
|
548
|
+
required: false
|
|
549
|
+
}]
|
|
550
|
+
}],
|
|
551
|
+
position: [{
|
|
552
|
+
type: i0.Input,
|
|
553
|
+
args: [{
|
|
554
|
+
isSignal: true,
|
|
555
|
+
alias: "aerisTooltipPosition",
|
|
556
|
+
required: false
|
|
557
|
+
}]
|
|
558
|
+
}],
|
|
559
|
+
event: [{
|
|
560
|
+
type: i0.Input,
|
|
561
|
+
args: [{
|
|
562
|
+
isSignal: true,
|
|
563
|
+
alias: "aerisTooltipEvent",
|
|
564
|
+
required: false
|
|
565
|
+
}]
|
|
566
|
+
}],
|
|
567
|
+
showDelay: [{
|
|
568
|
+
type: i0.Input,
|
|
569
|
+
args: [{
|
|
570
|
+
isSignal: true,
|
|
571
|
+
alias: "aerisTooltipShowDelay",
|
|
572
|
+
required: false
|
|
573
|
+
}]
|
|
574
|
+
}],
|
|
575
|
+
hideDelay: [{
|
|
576
|
+
type: i0.Input,
|
|
577
|
+
args: [{
|
|
578
|
+
isSignal: true,
|
|
579
|
+
alias: "aerisTooltipHideDelay",
|
|
580
|
+
required: false
|
|
581
|
+
}]
|
|
582
|
+
}],
|
|
583
|
+
disabled: [{
|
|
584
|
+
type: i0.Input,
|
|
585
|
+
args: [{
|
|
586
|
+
isSignal: true,
|
|
587
|
+
alias: "aerisTooltipDisabled",
|
|
588
|
+
required: false
|
|
589
|
+
}]
|
|
590
|
+
}],
|
|
591
|
+
autoHide: [{
|
|
592
|
+
type: i0.Input,
|
|
593
|
+
args: [{
|
|
594
|
+
isSignal: true,
|
|
595
|
+
alias: "aerisTooltipAutoHide",
|
|
596
|
+
required: false
|
|
597
|
+
}]
|
|
598
|
+
}],
|
|
599
|
+
offset: [{
|
|
600
|
+
type: i0.Input,
|
|
601
|
+
args: [{
|
|
602
|
+
isSignal: true,
|
|
603
|
+
alias: "aerisTooltipOffset",
|
|
604
|
+
required: false
|
|
605
|
+
}]
|
|
606
|
+
}],
|
|
607
|
+
viewportMargin: [{
|
|
608
|
+
type: i0.Input,
|
|
609
|
+
args: [{
|
|
610
|
+
isSignal: true,
|
|
611
|
+
alias: "aerisTooltipViewportMargin",
|
|
612
|
+
required: false
|
|
613
|
+
}]
|
|
614
|
+
}],
|
|
615
|
+
maxWidth: [{
|
|
616
|
+
type: i0.Input,
|
|
617
|
+
args: [{
|
|
618
|
+
isSignal: true,
|
|
619
|
+
alias: "aerisTooltipMaxWidth",
|
|
620
|
+
required: false
|
|
621
|
+
}]
|
|
622
|
+
}],
|
|
623
|
+
styleClass: [{
|
|
624
|
+
type: i0.Input,
|
|
625
|
+
args: [{
|
|
626
|
+
isSignal: true,
|
|
627
|
+
alias: "aerisTooltipStyleClass",
|
|
628
|
+
required: false
|
|
629
|
+
}]
|
|
630
|
+
}],
|
|
631
|
+
appendTo: [{
|
|
632
|
+
type: i0.Input,
|
|
633
|
+
args: [{
|
|
634
|
+
isSignal: true,
|
|
635
|
+
alias: "aerisTooltipAppendTo",
|
|
636
|
+
required: false
|
|
637
|
+
}]
|
|
638
|
+
}],
|
|
639
|
+
truncatedOnly: [{
|
|
640
|
+
type: i0.Input,
|
|
641
|
+
args: [{
|
|
642
|
+
isSignal: true,
|
|
643
|
+
alias: "aerisTooltipTruncatedOnly",
|
|
644
|
+
required: false
|
|
645
|
+
}]
|
|
646
|
+
}],
|
|
647
|
+
opened: [{
|
|
648
|
+
type: i0.Output,
|
|
649
|
+
args: ["aerisTooltipOpened"]
|
|
650
|
+
}],
|
|
651
|
+
closed: [{
|
|
652
|
+
type: i0.Output,
|
|
653
|
+
args: ["aerisTooltipClosed"]
|
|
654
|
+
}]
|
|
655
|
+
}
|
|
656
|
+
});
|
|
375
657
|
const AerisTooltipModule = [AerisTooltip];
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Generated bundle index. Do not edit.
|
|
379
|
-
*/
|
|
380
|
-
|
|
381
658
|
export { AerisTooltip, AerisTooltipModule, AerisTooltipOverlay };
|
|
382
|
-
|
|
659
|
+
|
|
660
|
+
//# sourceMappingURL=aeris-ui-core-tooltip.mjs.map
|