@nanahoshi/mona-ui 0.27.2 → 0.29.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.
- package/docs/api/chart.md +2 -2
- package/docs/api/locales.md +8 -0
- package/docs/api/popup.md +1 -1
- package/docs/api/theme.md +2 -2
- package/docs/chart.md +14 -0
- package/docs/editor.md +2 -0
- package/docs/installation.md +147 -15
- package/docs/introduction.md +37 -15
- package/docs/theming-built-in-themes.md +67 -0
- package/docs/theming-custom-colors.md +274 -0
- package/docs/theming-custom-themes.md +168 -0
- package/docs/theming.md +164 -248
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
- package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2071 -1573
- package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
- package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
- package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
- package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
- package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
- package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +599 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +61 -77
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
- package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
- package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
- package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
- package/llms.txt +7 -3
- package/locales/pl-pl/package.json +4 -0
- package/locales/pl-pl/pl-pl.messages.json +536 -0
- package/package.json +66 -23
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
- package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
- package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
- package/types/nanahoshi-mona-ui-button.d.ts +227 -166
- package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
- package/types/nanahoshi-mona-ui-card.d.ts +125 -111
- package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
- package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
- package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
- package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
- package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
- package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
- package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
- package/types/nanahoshi-mona-ui-command.d.ts +279 -191
- package/types/nanahoshi-mona-ui-common.d.ts +354 -385
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
- package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
- package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
- package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
- package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
- package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
- package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
- package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
- package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
- package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
- package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
- package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
- package/types/nanahoshi-mona-ui-label.d.ts +108 -78
- package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
- package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
- package/types/nanahoshi-mona-ui-list.d.ts +2 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +540 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales.d.ts +18 -19
- package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
- package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
- package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
- package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
- package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
- package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
- package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
- package/types/nanahoshi-mona-ui-query.d.ts +82 -88
- package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
- package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
- package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
- package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
- package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
- package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
- package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
- package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
- package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
- package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
- package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
- package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
- package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
- package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
- package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
- package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
- package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
- package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
- package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
- package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
- package/types/nanahoshi-mona-ui-window.d.ts +494 -399
- package/types/nanahoshi-mona-ui.d.ts +1 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import { Directionality } from
|
|
2
|
-
import { DOCUMENT, NgTemplateOutlet } from
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import { resolveComponentDirection } from
|
|
6
|
-
import {
|
|
7
|
-
import { PopupService, fadePopupAnimation
|
|
8
|
-
import { take, takeUntil } from
|
|
9
|
-
import { cva } from
|
|
10
|
-
import { twMerge } from
|
|
11
|
-
|
|
1
|
+
import { Directionality } from "@angular/cdk/bidi";
|
|
2
|
+
import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Component, DestroyRef, Directive, ElementRef, EnvironmentInjector, TemplateRef, afterNextRender, computed, createComponent, effect, inject, input, output, signal, untracked, viewChild } from "@angular/core";
|
|
5
|
+
import { resolveComponentDirection } from "@nanahoshi/mona-ui/i18n";
|
|
6
|
+
import { HoverIntent, addAriaReference, createElementControlId, listenForHover, onDisconnect, overlaySidePositions, removeAriaReference, resolveOverlaySide, sideOfPosition, themeOverlaySurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
7
|
+
import { PopupCloseSource, PopupService, fadePopupAnimation } from "@nanahoshi/mona-ui/popup";
|
|
8
|
+
import { take, takeUntil } from "rxjs";
|
|
9
|
+
import { cva } from "class-variance-authority";
|
|
10
|
+
import { twMerge } from "tailwind-merge";
|
|
12
11
|
const tooltipBaseThemeVariants = cva(`
|
|
13
12
|
relative z-1 flex items-center justify-center
|
|
14
13
|
${themeOverlaySurfaceClasses} text-foreground
|
|
15
14
|
border border-border shadow-(--shadow-overlay)
|
|
16
|
-
`, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
small: "rounded-sm"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
15
|
+
`, { variants: { rounded: {
|
|
16
|
+
full: "rounded-full",
|
|
17
|
+
large: "rounded-lg",
|
|
18
|
+
medium: "rounded-md",
|
|
19
|
+
none: "rounded-none",
|
|
20
|
+
small: "rounded-sm"
|
|
21
|
+
} } });
|
|
27
22
|
const tooltipArrowThemeVariants = cva(`
|
|
28
23
|
absolute z-0 h-3 w-3 rotate-45 transform-center box-border
|
|
29
24
|
pointer-events-none
|
|
@@ -50,477 +45,686 @@ const tooltipArrowThemeVariants = cva(`
|
|
|
50
45
|
data-[position="right"]:border-t-0
|
|
51
46
|
data-[position="right"]:[clip-path:inset(1px_1px_0_0)]
|
|
52
47
|
`);
|
|
53
|
-
|
|
54
|
-
/** The gap between a tooltip and its anchor, leaving room for the arrow. */
|
|
55
48
|
const TOOLTIP_GAP$1 = 12;
|
|
56
|
-
class TooltipComponent {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
49
|
+
var TooltipComponent = class TooltipComponent {
|
|
50
|
+
#destroyRef;
|
|
51
|
+
#directionality;
|
|
52
|
+
#document;
|
|
53
|
+
#intent;
|
|
54
|
+
#popupService;
|
|
55
|
+
#destroyed;
|
|
56
|
+
#popupRef;
|
|
57
|
+
constructor() {
|
|
58
|
+
this.#destroyRef = inject(DestroyRef);
|
|
59
|
+
this.#directionality = inject(Directionality, { optional: true });
|
|
60
|
+
this.#document = inject(DOCUMENT);
|
|
61
|
+
this.#intent = new HoverIntent({
|
|
62
|
+
hide: () => this.#popupRef?.close(),
|
|
63
|
+
hideDelay: () => this.hideDelay(),
|
|
64
|
+
show: (anchor) => this.#open(anchor),
|
|
65
|
+
showDelay: () => this.showDelay()
|
|
66
|
+
});
|
|
67
|
+
this.#popupService = inject(PopupService);
|
|
68
|
+
this.#destroyed = false;
|
|
69
|
+
this.#popupRef = null;
|
|
70
|
+
this.arrowClasses = computed(() => {
|
|
71
|
+
return tooltipArrowThemeVariants();
|
|
72
|
+
}, ...ngDevMode ? [{ debugName: "arrowClasses" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.baseClasses = computed(() => {
|
|
74
|
+
const rounded = this.rounded();
|
|
75
|
+
return tooltipBaseThemeVariants({ rounded });
|
|
76
|
+
}, ...ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []);
|
|
77
|
+
this.currentArrowPosition = signal("top", ...ngDevMode ? [{ debugName: "currentArrowPosition" }] : /* istanbul ignore next */ []);
|
|
78
|
+
this.templateRef = viewChild.required(TemplateRef, ...ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []);
|
|
79
|
+
this.tooltipId = createElementControlId();
|
|
80
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
81
|
+
this.hidden = output();
|
|
82
|
+
this.hideDelay = input(0, ...ngDevMode ? [{ debugName: "hideDelay" }] : /* istanbul ignore next */ []);
|
|
83
|
+
this.position = input("top", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
84
|
+
this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
85
|
+
this.showDelay = input(0, ...ngDevMode ? [{ debugName: "showDelay" }] : /* istanbul ignore next */ []);
|
|
86
|
+
this.shown = output();
|
|
87
|
+
this.target = input.required(...ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []);
|
|
88
|
+
effect((onCleanup) => {
|
|
89
|
+
const target = this.target();
|
|
90
|
+
this.position();
|
|
91
|
+
const stop = untracked(() => this.#listen(target));
|
|
92
|
+
onCleanup(() => {
|
|
93
|
+
stop();
|
|
94
|
+
this.#intent.hideNow();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
effect(() => {
|
|
98
|
+
if (this.disabled()) untracked(() => this.#intent.hideNow());
|
|
99
|
+
});
|
|
100
|
+
this.#destroyRef.onDestroy(() => {
|
|
101
|
+
this.#destroyed = true;
|
|
102
|
+
this.#intent.dispose();
|
|
103
|
+
this.#popupRef?.close();
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
#listen(target) {
|
|
107
|
+
if (typeof target === "string") return listenForHover(this.#document, (node) => node.closest(target), this.#intent);
|
|
108
|
+
const element = target instanceof ElementRef ? target.nativeElement : target;
|
|
109
|
+
if (!(element instanceof HTMLElement)) return () => void 0;
|
|
110
|
+
return listenForHover(element, (node) => element.contains(node) ? element : null, this.#intent);
|
|
111
|
+
}
|
|
112
|
+
#open(anchor) {
|
|
113
|
+
if (this.disabled() || this.#destroyed) return;
|
|
114
|
+
const direction = resolveComponentDirection(anchor, this.#directionality);
|
|
115
|
+
const side = resolveOverlaySide(this.position(), direction);
|
|
116
|
+
this.currentArrowPosition.set(side);
|
|
117
|
+
const popupRef = this.#popupService.create({
|
|
118
|
+
anchor,
|
|
119
|
+
animation: fadePopupAnimation,
|
|
120
|
+
closeOnEscape: true,
|
|
121
|
+
closeOnMouseLeave: false,
|
|
122
|
+
closeOnOutsideClick: true,
|
|
123
|
+
content: this.templateRef(),
|
|
124
|
+
hasBackdrop: false,
|
|
125
|
+
positions: overlaySidePositions(side, TOOLTIP_GAP$1, direction),
|
|
126
|
+
restoreFocus: false,
|
|
127
|
+
withPush: false
|
|
128
|
+
});
|
|
129
|
+
this.#popupRef = popupRef;
|
|
130
|
+
addAriaReference(anchor, "aria-describedby", this.tooltipId);
|
|
131
|
+
this.#intent.opened(anchor, popupRef.overlayRef.overlayElement);
|
|
132
|
+
const stopWatching = onDisconnect(anchor, () => popupRef.close());
|
|
133
|
+
popupRef.opened.pipe(take(1)).subscribe(() => {
|
|
134
|
+
if (!this.#destroyed) this.shown.emit();
|
|
135
|
+
});
|
|
136
|
+
popupRef.positionChanges.pipe(takeUntil(popupRef.closeStart)).subscribe((position) => {
|
|
137
|
+
this.currentArrowPosition.set(sideOfPosition(position, direction));
|
|
138
|
+
});
|
|
139
|
+
popupRef.closeStart.pipe(take(1)).subscribe((event) => {
|
|
140
|
+
stopWatching();
|
|
141
|
+
removeAriaReference(anchor, "aria-describedby", this.tooltipId);
|
|
142
|
+
this.#intent.closed(anchor, event.via === PopupCloseSource.Escape);
|
|
143
|
+
});
|
|
144
|
+
popupRef.closed.pipe(take(1)).subscribe(() => {
|
|
145
|
+
if (this.#popupRef === popupRef) this.#popupRef = null;
|
|
146
|
+
if (!this.#destroyed) this.hidden.emit();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
static {
|
|
150
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
151
|
+
minVersion: "12.0.0",
|
|
152
|
+
version: "22.2.6",
|
|
153
|
+
ngImport: i0,
|
|
154
|
+
type: TooltipComponent,
|
|
155
|
+
deps: [],
|
|
156
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
static {
|
|
160
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
161
|
+
minVersion: "17.2.0",
|
|
162
|
+
version: "22.2.6",
|
|
163
|
+
type: TooltipComponent,
|
|
164
|
+
isStandalone: true,
|
|
165
|
+
selector: "mona-tooltip",
|
|
166
|
+
inputs: {
|
|
167
|
+
disabled: {
|
|
168
|
+
classPropertyName: "disabled",
|
|
169
|
+
publicName: "disabled",
|
|
170
|
+
isSignal: true,
|
|
171
|
+
isRequired: false,
|
|
172
|
+
transformFunction: null
|
|
173
|
+
},
|
|
174
|
+
hideDelay: {
|
|
175
|
+
classPropertyName: "hideDelay",
|
|
176
|
+
publicName: "hideDelay",
|
|
177
|
+
isSignal: true,
|
|
178
|
+
isRequired: false,
|
|
179
|
+
transformFunction: null
|
|
180
|
+
},
|
|
181
|
+
position: {
|
|
182
|
+
classPropertyName: "position",
|
|
183
|
+
publicName: "position",
|
|
184
|
+
isSignal: true,
|
|
185
|
+
isRequired: false,
|
|
186
|
+
transformFunction: null
|
|
187
|
+
},
|
|
188
|
+
rounded: {
|
|
189
|
+
classPropertyName: "rounded",
|
|
190
|
+
publicName: "rounded",
|
|
191
|
+
isSignal: true,
|
|
192
|
+
isRequired: false,
|
|
193
|
+
transformFunction: null
|
|
194
|
+
},
|
|
195
|
+
showDelay: {
|
|
196
|
+
classPropertyName: "showDelay",
|
|
197
|
+
publicName: "showDelay",
|
|
198
|
+
isSignal: true,
|
|
199
|
+
isRequired: false,
|
|
200
|
+
transformFunction: null
|
|
201
|
+
},
|
|
202
|
+
target: {
|
|
203
|
+
classPropertyName: "target",
|
|
204
|
+
publicName: "target",
|
|
205
|
+
isSignal: true,
|
|
206
|
+
isRequired: true,
|
|
207
|
+
transformFunction: null
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
outputs: {
|
|
211
|
+
hidden: "hidden",
|
|
212
|
+
shown: "shown"
|
|
213
|
+
},
|
|
214
|
+
viewQueries: [{
|
|
215
|
+
propertyName: "templateRef",
|
|
216
|
+
first: true,
|
|
217
|
+
predicate: TemplateRef,
|
|
218
|
+
descendants: true,
|
|
219
|
+
isSignal: true
|
|
220
|
+
}],
|
|
221
|
+
ngImport: i0,
|
|
222
|
+
template: "<ng-template>\n <div role=\"tooltip\" [id]=\"tooltipId\" [class]=\"baseClasses()\">\n <div>\n <ng-content></ng-content>\n </div>\n <div [class]=\"arrowClasses()\" [attr.data-position]=\"currentArrowPosition()\"></div>\n </div>\n</ng-template>\n",
|
|
223
|
+
styles: [":host{display:contents}\n"]
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
228
|
+
minVersion: "12.0.0",
|
|
229
|
+
version: "22.2.6",
|
|
230
|
+
ngImport: i0,
|
|
231
|
+
type: TooltipComponent,
|
|
232
|
+
decorators: [{
|
|
233
|
+
type: Component,
|
|
234
|
+
args: [{
|
|
235
|
+
selector: "mona-tooltip",
|
|
236
|
+
template: "<ng-template>\n <div role=\"tooltip\" [id]=\"tooltipId\" [class]=\"baseClasses()\">\n <div>\n <ng-content></ng-content>\n </div>\n <div [class]=\"arrowClasses()\" [attr.data-position]=\"currentArrowPosition()\"></div>\n </div>\n</ng-template>\n",
|
|
237
|
+
styles: [":host{display:contents}\n"]
|
|
238
|
+
}]
|
|
239
|
+
}],
|
|
240
|
+
ctorParameters: () => [],
|
|
241
|
+
propDecorators: {
|
|
242
|
+
templateRef: [{
|
|
243
|
+
type: i0.ViewChild,
|
|
244
|
+
args: [i0.forwardRef(() => TemplateRef), { isSignal: true }]
|
|
245
|
+
}],
|
|
246
|
+
disabled: [{
|
|
247
|
+
type: i0.Input,
|
|
248
|
+
args: [{
|
|
249
|
+
isSignal: true,
|
|
250
|
+
alias: "disabled",
|
|
251
|
+
required: false
|
|
252
|
+
}]
|
|
253
|
+
}],
|
|
254
|
+
hidden: [{
|
|
255
|
+
type: i0.Output,
|
|
256
|
+
args: ["hidden"]
|
|
257
|
+
}],
|
|
258
|
+
hideDelay: [{
|
|
259
|
+
type: i0.Input,
|
|
260
|
+
args: [{
|
|
261
|
+
isSignal: true,
|
|
262
|
+
alias: "hideDelay",
|
|
263
|
+
required: false
|
|
264
|
+
}]
|
|
265
|
+
}],
|
|
266
|
+
position: [{
|
|
267
|
+
type: i0.Input,
|
|
268
|
+
args: [{
|
|
269
|
+
isSignal: true,
|
|
270
|
+
alias: "position",
|
|
271
|
+
required: false
|
|
272
|
+
}]
|
|
273
|
+
}],
|
|
274
|
+
rounded: [{
|
|
275
|
+
type: i0.Input,
|
|
276
|
+
args: [{
|
|
277
|
+
isSignal: true,
|
|
278
|
+
alias: "rounded",
|
|
279
|
+
required: false
|
|
280
|
+
}]
|
|
281
|
+
}],
|
|
282
|
+
showDelay: [{
|
|
283
|
+
type: i0.Input,
|
|
284
|
+
args: [{
|
|
285
|
+
isSignal: true,
|
|
286
|
+
alias: "showDelay",
|
|
287
|
+
required: false
|
|
288
|
+
}]
|
|
289
|
+
}],
|
|
290
|
+
shown: [{
|
|
291
|
+
type: i0.Output,
|
|
292
|
+
args: ["shown"]
|
|
293
|
+
}],
|
|
294
|
+
target: [{
|
|
295
|
+
type: i0.Input,
|
|
296
|
+
args: [{
|
|
297
|
+
isSignal: true,
|
|
298
|
+
alias: "target",
|
|
299
|
+
required: true
|
|
300
|
+
}]
|
|
301
|
+
}]
|
|
302
|
+
}
|
|
303
|
+
});
|
|
218
304
|
const TOOLTIP_GAP = 12;
|
|
219
|
-
/** Where the directive keeps an element's `title`, so the browser's own tooltip never shows next to it. */
|
|
220
305
|
const TITLE_ATTRIBUTE = "data-mona-title";
|
|
221
|
-
class TooltipDirective {
|
|
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
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
306
|
+
var TooltipDirective = class TooltipDirective {
|
|
307
|
+
#destroyRef;
|
|
308
|
+
#directionality;
|
|
309
|
+
#host;
|
|
310
|
+
#injector;
|
|
311
|
+
#intent;
|
|
312
|
+
#labelled;
|
|
313
|
+
#popupService;
|
|
314
|
+
#stripped;
|
|
315
|
+
#suppressed;
|
|
316
|
+
#tooltipId;
|
|
317
|
+
#destroyed;
|
|
318
|
+
#popupRef;
|
|
319
|
+
constructor() {
|
|
320
|
+
this.#destroyRef = inject(DestroyRef);
|
|
321
|
+
this.#directionality = inject(Directionality, { optional: true });
|
|
322
|
+
this.#host = inject(ElementRef);
|
|
323
|
+
this.#injector = inject(EnvironmentInjector);
|
|
324
|
+
this.#intent = new HoverIntent({
|
|
325
|
+
hide: () => this.#popupRef?.close(),
|
|
326
|
+
hideDelay: () => this.hideDelay(),
|
|
327
|
+
show: (anchor) => this.#open(anchor),
|
|
328
|
+
showDelay: () => this.showDelay()
|
|
329
|
+
});
|
|
330
|
+
this.#labelled = /* @__PURE__ */ new Set();
|
|
331
|
+
this.#popupService = inject(PopupService);
|
|
332
|
+
this.#stripped = /* @__PURE__ */ new Set();
|
|
333
|
+
this.#suppressed = computed(() => this.disabled() || this.tooltipDisabled(), ...ngDevMode ? [{ debugName: "#suppressed" }] : /* istanbul ignore next */ []);
|
|
334
|
+
this.#tooltipId = createElementControlId();
|
|
335
|
+
this.#destroyed = false;
|
|
336
|
+
this.#popupRef = null;
|
|
337
|
+
this.contentOf = input(null, ...ngDevMode ? [{ debugName: "contentOf" }] : /* istanbul ignore next */ []);
|
|
338
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
339
|
+
this.filter = input("[title]", ...ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []);
|
|
340
|
+
this.hidden = output();
|
|
341
|
+
this.hideDelay = input(0, ...ngDevMode ? [{ debugName: "hideDelay" }] : /* istanbul ignore next */ []);
|
|
342
|
+
this.mode = input("host", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
343
|
+
this.monaTooltip = input("", ...ngDevMode ? [{ debugName: "monaTooltip" }] : /* istanbul ignore next */ []);
|
|
344
|
+
this.position = input("top", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
345
|
+
this.rounded = input("medium", {
|
|
346
|
+
...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
|
|
347
|
+
alias: "tooltipRounded"
|
|
348
|
+
});
|
|
349
|
+
this.showDelay = input(0, ...ngDevMode ? [{ debugName: "showDelay" }] : /* istanbul ignore next */ []);
|
|
350
|
+
this.shown = output();
|
|
351
|
+
this.tooltipDisabled = input(false, ...ngDevMode ? [{ debugName: "tooltipDisabled" }] : /* istanbul ignore next */ []);
|
|
352
|
+
effect((onCleanup) => {
|
|
353
|
+
const mode = this.mode();
|
|
354
|
+
const filter = this.filter();
|
|
355
|
+
this.position();
|
|
356
|
+
const stop = untracked(() => this.#listen(mode, filter));
|
|
357
|
+
onCleanup(() => {
|
|
358
|
+
stop();
|
|
359
|
+
this.#intent.hideNow();
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
effect(() => {
|
|
363
|
+
if (this.#suppressed()) untracked(() => this.#intent.hideNow());
|
|
364
|
+
});
|
|
365
|
+
afterNextRender({ write: () => {
|
|
366
|
+
if (this.mode() === "host") this.#textOf(this.#host.nativeElement);
|
|
367
|
+
} });
|
|
368
|
+
this.#destroyRef.onDestroy(() => {
|
|
369
|
+
this.#destroyed = true;
|
|
370
|
+
this.#intent.dispose();
|
|
371
|
+
this.#popupRef?.close();
|
|
372
|
+
for (const element of this.#stripped) {
|
|
373
|
+
const title = element.getAttribute(TITLE_ATTRIBUTE);
|
|
374
|
+
element.removeAttribute(TITLE_ATTRIBUTE);
|
|
375
|
+
if (this.#labelled.has(element) && element.getAttribute("aria-label") === title) element.removeAttribute("aria-label");
|
|
376
|
+
if (title != null && !element.hasAttribute("title")) element.setAttribute("title", title);
|
|
377
|
+
}
|
|
378
|
+
this.#labelled.clear();
|
|
379
|
+
this.#stripped.clear();
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
#contentFor(anchor) {
|
|
383
|
+
const contentOf = this.contentOf();
|
|
384
|
+
if (contentOf) return contentOf(anchor);
|
|
385
|
+
return this.mode() === "host" ? this.monaTooltip() || this.#textOf(anchor) : this.#textOf(anchor);
|
|
386
|
+
}
|
|
387
|
+
#listen(mode, filter) {
|
|
388
|
+
const host = this.#host.nativeElement;
|
|
389
|
+
if (mode === "host") return listenForHover(host, (node) => host.contains(node) ? host : null, this.#intent);
|
|
390
|
+
const selector = `${filter}, [${TITLE_ATTRIBUTE}]`;
|
|
391
|
+
return listenForHover(host, (node) => {
|
|
392
|
+
const match = node.closest(selector);
|
|
393
|
+
return match && match !== host && host.contains(match) ? match : null;
|
|
394
|
+
}, this.#intent);
|
|
395
|
+
}
|
|
396
|
+
#open(anchor) {
|
|
397
|
+
if (this.#suppressed() || this.#destroyed) return;
|
|
398
|
+
const content = this.#contentFor(anchor);
|
|
399
|
+
if (!content) return;
|
|
400
|
+
const direction = resolveComponentDirection(anchor, this.#directionality);
|
|
401
|
+
const side = resolveOverlaySide(this.position(), direction);
|
|
402
|
+
const component = createComponent(TooltipTemplateComponent, { environmentInjector: this.#injector });
|
|
403
|
+
component.setInput("content", content);
|
|
404
|
+
component.setInput("rounded", this.rounded());
|
|
405
|
+
component.setInput("tooltipId", this.#tooltipId);
|
|
406
|
+
component.instance.currentArrowPosition.set(side);
|
|
407
|
+
component.changeDetectorRef.detectChanges();
|
|
408
|
+
const popupRef = this.#popupService.create({
|
|
409
|
+
anchor,
|
|
410
|
+
animation: fadePopupAnimation,
|
|
411
|
+
closeOnEscape: true,
|
|
412
|
+
closeOnMouseLeave: false,
|
|
413
|
+
closeOnOutsideClick: true,
|
|
414
|
+
content: component.instance.templateRef(),
|
|
415
|
+
hasBackdrop: false,
|
|
416
|
+
positions: overlaySidePositions(side, TOOLTIP_GAP, direction),
|
|
417
|
+
restoreFocus: false,
|
|
418
|
+
withPush: false
|
|
419
|
+
});
|
|
420
|
+
this.#popupRef = popupRef;
|
|
421
|
+
addAriaReference(anchor, "aria-describedby", this.#tooltipId);
|
|
422
|
+
this.#intent.opened(anchor, popupRef.overlayRef.overlayElement);
|
|
423
|
+
const stopWatching = onDisconnect(anchor, () => popupRef.close());
|
|
424
|
+
popupRef.opened.pipe(take(1)).subscribe(() => {
|
|
425
|
+
if (!this.#destroyed) this.shown.emit();
|
|
426
|
+
});
|
|
427
|
+
popupRef.positionChanges.pipe(takeUntil(popupRef.closeStart)).subscribe((position) => {
|
|
428
|
+
component.instance.currentArrowPosition.set(sideOfPosition(position, direction));
|
|
429
|
+
});
|
|
430
|
+
popupRef.closeStart.pipe(take(1)).subscribe((event) => {
|
|
431
|
+
stopWatching();
|
|
432
|
+
removeAriaReference(anchor, "aria-describedby", this.#tooltipId);
|
|
433
|
+
this.#intent.closed(anchor, event.via === PopupCloseSource.Escape);
|
|
434
|
+
});
|
|
435
|
+
popupRef.closed.pipe(take(1)).subscribe(() => {
|
|
436
|
+
if (this.#popupRef === popupRef) this.#popupRef = null;
|
|
437
|
+
component.destroy();
|
|
438
|
+
if (!this.#destroyed) this.hidden.emit();
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
#textOf(element) {
|
|
442
|
+
const title = element.getAttribute("title");
|
|
443
|
+
if (title != null) {
|
|
444
|
+
const namedByTitle = this.#labelled.has(element) || !hasNameOfItsOwn(element);
|
|
445
|
+
element.setAttribute(TITLE_ATTRIBUTE, title);
|
|
446
|
+
element.removeAttribute("title");
|
|
447
|
+
this.#stripped.add(element);
|
|
448
|
+
if (namedByTitle && title.trim()) {
|
|
449
|
+
element.setAttribute("aria-label", title);
|
|
450
|
+
this.#labelled.add(element);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return element.getAttribute(TITLE_ATTRIBUTE) ?? "";
|
|
454
|
+
}
|
|
455
|
+
static {
|
|
456
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
457
|
+
minVersion: "12.0.0",
|
|
458
|
+
version: "22.2.6",
|
|
459
|
+
ngImport: i0,
|
|
460
|
+
type: TooltipDirective,
|
|
461
|
+
deps: [],
|
|
462
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
static {
|
|
466
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
467
|
+
minVersion: "17.1.0",
|
|
468
|
+
version: "22.2.6",
|
|
469
|
+
type: TooltipDirective,
|
|
470
|
+
isStandalone: true,
|
|
471
|
+
selector: "[monaTooltip]",
|
|
472
|
+
inputs: {
|
|
473
|
+
contentOf: {
|
|
474
|
+
classPropertyName: "contentOf",
|
|
475
|
+
publicName: "contentOf",
|
|
476
|
+
isSignal: true,
|
|
477
|
+
isRequired: false,
|
|
478
|
+
transformFunction: null
|
|
479
|
+
},
|
|
480
|
+
disabled: {
|
|
481
|
+
classPropertyName: "disabled",
|
|
482
|
+
publicName: "disabled",
|
|
483
|
+
isSignal: true,
|
|
484
|
+
isRequired: false,
|
|
485
|
+
transformFunction: null
|
|
486
|
+
},
|
|
487
|
+
filter: {
|
|
488
|
+
classPropertyName: "filter",
|
|
489
|
+
publicName: "filter",
|
|
490
|
+
isSignal: true,
|
|
491
|
+
isRequired: false,
|
|
492
|
+
transformFunction: null
|
|
493
|
+
},
|
|
494
|
+
hideDelay: {
|
|
495
|
+
classPropertyName: "hideDelay",
|
|
496
|
+
publicName: "hideDelay",
|
|
497
|
+
isSignal: true,
|
|
498
|
+
isRequired: false,
|
|
499
|
+
transformFunction: null
|
|
500
|
+
},
|
|
501
|
+
mode: {
|
|
502
|
+
classPropertyName: "mode",
|
|
503
|
+
publicName: "mode",
|
|
504
|
+
isSignal: true,
|
|
505
|
+
isRequired: false,
|
|
506
|
+
transformFunction: null
|
|
507
|
+
},
|
|
508
|
+
monaTooltip: {
|
|
509
|
+
classPropertyName: "monaTooltip",
|
|
510
|
+
publicName: "monaTooltip",
|
|
511
|
+
isSignal: true,
|
|
512
|
+
isRequired: false,
|
|
513
|
+
transformFunction: null
|
|
514
|
+
},
|
|
515
|
+
position: {
|
|
516
|
+
classPropertyName: "position",
|
|
517
|
+
publicName: "position",
|
|
518
|
+
isSignal: true,
|
|
519
|
+
isRequired: false,
|
|
520
|
+
transformFunction: null
|
|
521
|
+
},
|
|
522
|
+
rounded: {
|
|
523
|
+
classPropertyName: "rounded",
|
|
524
|
+
publicName: "tooltipRounded",
|
|
525
|
+
isSignal: true,
|
|
526
|
+
isRequired: false,
|
|
527
|
+
transformFunction: null
|
|
528
|
+
},
|
|
529
|
+
showDelay: {
|
|
530
|
+
classPropertyName: "showDelay",
|
|
531
|
+
publicName: "showDelay",
|
|
532
|
+
isSignal: true,
|
|
533
|
+
isRequired: false,
|
|
534
|
+
transformFunction: null
|
|
535
|
+
},
|
|
536
|
+
tooltipDisabled: {
|
|
537
|
+
classPropertyName: "tooltipDisabled",
|
|
538
|
+
publicName: "tooltipDisabled",
|
|
539
|
+
isSignal: true,
|
|
540
|
+
isRequired: false,
|
|
541
|
+
transformFunction: null
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
outputs: {
|
|
545
|
+
hidden: "hidden",
|
|
546
|
+
shown: "shown"
|
|
547
|
+
},
|
|
548
|
+
ngImport: i0
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
553
|
+
minVersion: "12.0.0",
|
|
554
|
+
version: "22.2.6",
|
|
555
|
+
ngImport: i0,
|
|
556
|
+
type: TooltipDirective,
|
|
557
|
+
decorators: [{
|
|
558
|
+
type: Directive,
|
|
559
|
+
args: [{ selector: "[monaTooltip]" }]
|
|
560
|
+
}],
|
|
561
|
+
ctorParameters: () => [],
|
|
562
|
+
propDecorators: {
|
|
563
|
+
contentOf: [{
|
|
564
|
+
type: i0.Input,
|
|
565
|
+
args: [{
|
|
566
|
+
isSignal: true,
|
|
567
|
+
alias: "contentOf",
|
|
568
|
+
required: false
|
|
569
|
+
}]
|
|
570
|
+
}],
|
|
571
|
+
disabled: [{
|
|
572
|
+
type: i0.Input,
|
|
573
|
+
args: [{
|
|
574
|
+
isSignal: true,
|
|
575
|
+
alias: "disabled",
|
|
576
|
+
required: false
|
|
577
|
+
}]
|
|
578
|
+
}],
|
|
579
|
+
filter: [{
|
|
580
|
+
type: i0.Input,
|
|
581
|
+
args: [{
|
|
582
|
+
isSignal: true,
|
|
583
|
+
alias: "filter",
|
|
584
|
+
required: false
|
|
585
|
+
}]
|
|
586
|
+
}],
|
|
587
|
+
hidden: [{
|
|
588
|
+
type: i0.Output,
|
|
589
|
+
args: ["hidden"]
|
|
590
|
+
}],
|
|
591
|
+
hideDelay: [{
|
|
592
|
+
type: i0.Input,
|
|
593
|
+
args: [{
|
|
594
|
+
isSignal: true,
|
|
595
|
+
alias: "hideDelay",
|
|
596
|
+
required: false
|
|
597
|
+
}]
|
|
598
|
+
}],
|
|
599
|
+
mode: [{
|
|
600
|
+
type: i0.Input,
|
|
601
|
+
args: [{
|
|
602
|
+
isSignal: true,
|
|
603
|
+
alias: "mode",
|
|
604
|
+
required: false
|
|
605
|
+
}]
|
|
606
|
+
}],
|
|
607
|
+
monaTooltip: [{
|
|
608
|
+
type: i0.Input,
|
|
609
|
+
args: [{
|
|
610
|
+
isSignal: true,
|
|
611
|
+
alias: "monaTooltip",
|
|
612
|
+
required: false
|
|
613
|
+
}]
|
|
614
|
+
}],
|
|
615
|
+
position: [{
|
|
616
|
+
type: i0.Input,
|
|
617
|
+
args: [{
|
|
618
|
+
isSignal: true,
|
|
619
|
+
alias: "position",
|
|
620
|
+
required: false
|
|
621
|
+
}]
|
|
622
|
+
}],
|
|
623
|
+
rounded: [{
|
|
624
|
+
type: i0.Input,
|
|
625
|
+
args: [{
|
|
626
|
+
isSignal: true,
|
|
627
|
+
alias: "tooltipRounded",
|
|
628
|
+
required: false
|
|
629
|
+
}]
|
|
630
|
+
}],
|
|
631
|
+
showDelay: [{
|
|
632
|
+
type: i0.Input,
|
|
633
|
+
args: [{
|
|
634
|
+
isSignal: true,
|
|
635
|
+
alias: "showDelay",
|
|
636
|
+
required: false
|
|
637
|
+
}]
|
|
638
|
+
}],
|
|
639
|
+
shown: [{
|
|
640
|
+
type: i0.Output,
|
|
641
|
+
args: ["shown"]
|
|
642
|
+
}],
|
|
643
|
+
tooltipDisabled: [{
|
|
644
|
+
type: i0.Input,
|
|
645
|
+
args: [{
|
|
646
|
+
isSignal: true,
|
|
647
|
+
alias: "tooltipDisabled",
|
|
648
|
+
required: false
|
|
649
|
+
}]
|
|
650
|
+
}]
|
|
651
|
+
}
|
|
652
|
+
});
|
|
475
653
|
function hasNameOfItsOwn(element) {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
if (element.labels?.length) {
|
|
480
|
-
return true;
|
|
481
|
-
}
|
|
482
|
-
return !!element.textContent?.trim() || element.querySelector('img[alt]:not([alt=""])') != null;
|
|
654
|
+
if (element.hasAttribute("aria-labelledby") || element.getAttribute("aria-label")?.trim()) return true;
|
|
655
|
+
if (element.labels?.length) return true;
|
|
656
|
+
return !!element.textContent?.trim() || element.querySelector("img[alt]:not([alt=\"\"])") != null;
|
|
483
657
|
}
|
|
484
|
-
class TooltipTemplateComponent {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
658
|
+
var TooltipTemplateComponent = class TooltipTemplateComponent {
|
|
659
|
+
constructor() {
|
|
660
|
+
this.arrowClasses = computed(() => {
|
|
661
|
+
return tooltipArrowThemeVariants();
|
|
662
|
+
}, ...ngDevMode ? [{ debugName: "arrowClasses" }] : /* istanbul ignore next */ []);
|
|
663
|
+
this.baseClasses = computed(() => {
|
|
664
|
+
const rounded = this.rounded();
|
|
665
|
+
const userClasses = `p-2`;
|
|
666
|
+
const variants = tooltipBaseThemeVariants({ rounded });
|
|
667
|
+
return twMerge(variants, userClasses);
|
|
668
|
+
}, ...ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []);
|
|
669
|
+
this.contentTemplate = computed(() => {
|
|
670
|
+
const content = this.content();
|
|
671
|
+
return content instanceof TemplateRef ? content : null;
|
|
672
|
+
}, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
|
|
673
|
+
this.content = input.required(...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
674
|
+
this.currentArrowPosition = signal("top", ...ngDevMode ? [{ debugName: "currentArrowPosition" }] : /* istanbul ignore next */ []);
|
|
675
|
+
this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
676
|
+
this.templateRef = viewChild.required(TemplateRef, ...ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []);
|
|
677
|
+
this.tooltipId = input("", ...ngDevMode ? [{ debugName: "tooltipId" }] : /* istanbul ignore next */ []);
|
|
678
|
+
}
|
|
679
|
+
static {
|
|
680
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
681
|
+
minVersion: "12.0.0",
|
|
682
|
+
version: "22.2.6",
|
|
683
|
+
ngImport: i0,
|
|
684
|
+
type: TooltipTemplateComponent,
|
|
685
|
+
deps: [],
|
|
686
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
static {
|
|
690
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
691
|
+
minVersion: "17.0.0",
|
|
692
|
+
version: "22.2.6",
|
|
693
|
+
type: TooltipTemplateComponent,
|
|
694
|
+
isStandalone: true,
|
|
695
|
+
selector: "ng-component",
|
|
696
|
+
inputs: {
|
|
697
|
+
content: {
|
|
698
|
+
classPropertyName: "content",
|
|
699
|
+
publicName: "content",
|
|
700
|
+
isSignal: true,
|
|
701
|
+
isRequired: true,
|
|
702
|
+
transformFunction: null
|
|
703
|
+
},
|
|
704
|
+
rounded: {
|
|
705
|
+
classPropertyName: "rounded",
|
|
706
|
+
publicName: "rounded",
|
|
707
|
+
isSignal: true,
|
|
708
|
+
isRequired: false,
|
|
709
|
+
transformFunction: null
|
|
710
|
+
},
|
|
711
|
+
tooltipId: {
|
|
712
|
+
classPropertyName: "tooltipId",
|
|
713
|
+
publicName: "tooltipId",
|
|
714
|
+
isSignal: true,
|
|
715
|
+
isRequired: false,
|
|
716
|
+
transformFunction: null
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
viewQueries: [{
|
|
720
|
+
propertyName: "templateRef",
|
|
721
|
+
first: true,
|
|
722
|
+
predicate: TemplateRef,
|
|
723
|
+
descendants: true,
|
|
724
|
+
isSignal: true
|
|
725
|
+
}],
|
|
726
|
+
ngImport: i0,
|
|
727
|
+
template: `
|
|
524
728
|
<ng-template>
|
|
525
729
|
<div role="tooltip" [id]="tooltipId()" [class]="baseClasses()">
|
|
526
730
|
<div>
|
|
@@ -533,13 +737,31 @@ class TooltipTemplateComponent {
|
|
|
533
737
|
<div [class]="arrowClasses()" [attr.data-position]="currentArrowPosition()"></div>
|
|
534
738
|
</div>
|
|
535
739
|
</ng-template>
|
|
536
|
-
`,
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
740
|
+
`,
|
|
741
|
+
isInline: true,
|
|
742
|
+
dependencies: [{
|
|
743
|
+
kind: "directive",
|
|
744
|
+
type: NgTemplateOutlet,
|
|
745
|
+
selector: "[ngTemplateOutlet]",
|
|
746
|
+
inputs: [
|
|
747
|
+
"ngTemplateOutletContext",
|
|
748
|
+
"ngTemplateOutlet",
|
|
749
|
+
"ngTemplateOutletInjector"
|
|
750
|
+
]
|
|
751
|
+
}]
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
756
|
+
minVersion: "12.0.0",
|
|
757
|
+
version: "22.2.6",
|
|
758
|
+
ngImport: i0,
|
|
759
|
+
type: TooltipTemplateComponent,
|
|
760
|
+
decorators: [{
|
|
761
|
+
type: Component,
|
|
762
|
+
args: [{
|
|
763
|
+
imports: [NgTemplateOutlet],
|
|
764
|
+
template: `
|
|
543
765
|
<ng-template>
|
|
544
766
|
<div role="tooltip" [id]="tooltipId()" [class]="baseClasses()">
|
|
545
767
|
<div>
|
|
@@ -553,51 +775,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
553
775
|
</div>
|
|
554
776
|
</ng-template>
|
|
555
777
|
`
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
778
|
+
}]
|
|
779
|
+
}],
|
|
780
|
+
propDecorators: {
|
|
781
|
+
content: [{
|
|
782
|
+
type: i0.Input,
|
|
783
|
+
args: [{
|
|
784
|
+
isSignal: true,
|
|
785
|
+
alias: "content",
|
|
786
|
+
required: true
|
|
787
|
+
}]
|
|
788
|
+
}],
|
|
789
|
+
rounded: [{
|
|
790
|
+
type: i0.Input,
|
|
791
|
+
args: [{
|
|
792
|
+
isSignal: true,
|
|
793
|
+
alias: "rounded",
|
|
794
|
+
required: false
|
|
795
|
+
}]
|
|
796
|
+
}],
|
|
797
|
+
templateRef: [{
|
|
798
|
+
type: i0.ViewChild,
|
|
799
|
+
args: [i0.forwardRef(() => TemplateRef), { isSignal: true }]
|
|
800
|
+
}],
|
|
801
|
+
tooltipId: [{
|
|
802
|
+
type: i0.Input,
|
|
803
|
+
args: [{
|
|
804
|
+
isSignal: true,
|
|
805
|
+
alias: "tooltipId",
|
|
806
|
+
required: false
|
|
807
|
+
}]
|
|
808
|
+
}]
|
|
809
|
+
}
|
|
810
|
+
});
|
|
565
811
|
function getOffsetForPosition(position, arrowVisible) {
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
812
|
+
const arrowOffset = arrowVisible ? 12 : 4;
|
|
813
|
+
switch (position) {
|
|
814
|
+
case "top": return {
|
|
815
|
+
horizontal: 0,
|
|
816
|
+
vertical: -arrowOffset
|
|
817
|
+
};
|
|
818
|
+
case "bottom": return {
|
|
819
|
+
horizontal: 0,
|
|
820
|
+
vertical: arrowOffset
|
|
821
|
+
};
|
|
822
|
+
case "right": return {
|
|
823
|
+
horizontal: arrowOffset,
|
|
824
|
+
vertical: 0
|
|
825
|
+
};
|
|
826
|
+
case "left": return {
|
|
827
|
+
horizontal: -arrowOffset,
|
|
828
|
+
vertical: 0
|
|
829
|
+
};
|
|
830
|
+
}
|
|
577
831
|
}
|
|
578
|
-
/**
|
|
579
|
-
* @deprecated No longer used by the tooltip or popover. Kept for existing callers.
|
|
580
|
-
*/
|
|
581
832
|
function getPositionConnectionPoints(position) {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
833
|
+
switch (position) {
|
|
834
|
+
case "top": return {
|
|
835
|
+
anchor: "topcenter",
|
|
836
|
+
popup: "bottomcenter"
|
|
837
|
+
};
|
|
838
|
+
case "bottom": return {
|
|
839
|
+
anchor: "bottomcenter",
|
|
840
|
+
popup: "topcenter"
|
|
841
|
+
};
|
|
842
|
+
case "right": return {
|
|
843
|
+
anchor: "centerright",
|
|
844
|
+
popup: "centerleft"
|
|
845
|
+
};
|
|
846
|
+
case "left": return {
|
|
847
|
+
anchor: "centerleft",
|
|
848
|
+
popup: "centerright"
|
|
849
|
+
};
|
|
850
|
+
}
|
|
592
851
|
}
|
|
593
|
-
|
|
594
|
-
/*
|
|
595
|
-
* Public API Surface of @nanahoshi/mona-ui/tooltip
|
|
596
|
-
*/
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Generated bundle index. Do not edit.
|
|
600
|
-
*/
|
|
601
|
-
|
|
602
852
|
export { TooltipComponent, TooltipDirective, getOffsetForPosition, getPositionConnectionPoints, tooltipArrowThemeVariants };
|
|
603
|
-
|
|
853
|
+
|
|
854
|
+
//# sourceMappingURL=nanahoshi-mona-ui-tooltip.mjs.map
|