@fuse_ui/tooltip 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/fesm2022/fuse_ui-tooltip.mjs +154 -0
- package/fesm2022/fuse_ui-tooltip.mjs.map +1 -0
- package/package.json +61 -0
- package/types/fuse_ui-tooltip.d.ts +38 -0
package/README.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, ChangeDetectionStrategy, Component, input, inject, DestroyRef, ElementRef, HostListener, Directive } from '@angular/core';
|
|
3
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
4
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
|
+
import { FuseAnimationService } from '@fuse_ui/core';
|
|
6
|
+
|
|
7
|
+
class FuseTooltipContentComponent {
|
|
8
|
+
text = signal('', ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuseTooltipContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: FuseTooltipContentComponent, isStandalone: true, selector: "fuse-tooltip-content", ngImport: i0, template: `<div class="fuse-tooltip" role="tooltip">{{ text() }}</div>`, isInline: true, styles: [".fuse-tooltip{background:var(--fuse-color-bg-elevated);color:var(--fuse-color-text-primary);border:.5px solid var(--fuse-color-border-default);border-radius:var(--fuse-radius-md, 8px);font-size:var(--fuse-fluid-sm, .875rem);font-family:var(--fuse-font-family, system-ui, sans-serif);padding:var(--fuse-spacing-1, 4px) var(--fuse-spacing-3, 12px);box-shadow:var(--fuse-shadow-md);max-width:240px;pointer-events:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);white-space:normal;word-break:break-word;line-height:1.5}:host-context(.ios) .fuse-tooltip{border-radius:var(--fuse-radius-lg, 12px);font-size:var(--fuse-fluid-xs, .8125rem);padding:var(--fuse-spacing-2, 8px) var(--fuse-spacing-3, 12px)}:host-context(.md) .fuse-tooltip{border-radius:var(--fuse-radius-sm, 4px);font-size:var(--fuse-fluid-sm, .875rem)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuseTooltipContentComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{ selector: 'fuse-tooltip-content', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div class="fuse-tooltip" role="tooltip">{{ text() }}</div>`, styles: [".fuse-tooltip{background:var(--fuse-color-bg-elevated);color:var(--fuse-color-text-primary);border:.5px solid var(--fuse-color-border-default);border-radius:var(--fuse-radius-md, 8px);font-size:var(--fuse-fluid-sm, .875rem);font-family:var(--fuse-font-family, system-ui, sans-serif);padding:var(--fuse-spacing-1, 4px) var(--fuse-spacing-3, 12px);box-shadow:var(--fuse-shadow-md);max-width:240px;pointer-events:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);white-space:normal;word-break:break-word;line-height:1.5}:host-context(.ios) .fuse-tooltip{border-radius:var(--fuse-radius-lg, 12px);font-size:var(--fuse-fluid-xs, .8125rem);padding:var(--fuse-spacing-2, 8px) var(--fuse-spacing-3, 12px)}:host-context(.md) .fuse-tooltip{border-radius:var(--fuse-radius-sm, 4px);font-size:var(--fuse-fluid-sm, .875rem)}\n"] }]
|
|
15
|
+
}] });
|
|
16
|
+
|
|
17
|
+
// ─── Placement → CDK ConnectedPosition map ────────────────────────────────────
|
|
18
|
+
const POSITIONS = {
|
|
19
|
+
top: [
|
|
20
|
+
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -6 },
|
|
21
|
+
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 6 },
|
|
22
|
+
],
|
|
23
|
+
bottom: [
|
|
24
|
+
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 6 },
|
|
25
|
+
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -6 },
|
|
26
|
+
],
|
|
27
|
+
left: [
|
|
28
|
+
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -6 },
|
|
29
|
+
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 6 },
|
|
30
|
+
],
|
|
31
|
+
right: [
|
|
32
|
+
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 6 },
|
|
33
|
+
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -6 },
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
class FuseTooltipDirective {
|
|
37
|
+
// ─── Inputs ────────────────────────────────────────────────────────────────
|
|
38
|
+
fuseTooltip = input.required(...(ngDevMode ? [{ debugName: "fuseTooltip" }] : /* istanbul ignore next */ []));
|
|
39
|
+
fuseTooltipPlacement = input('top', ...(ngDevMode ? [{ debugName: "fuseTooltipPlacement" }] : /* istanbul ignore next */ []));
|
|
40
|
+
fuseTooltipDelay = input(200, ...(ngDevMode ? [{ debugName: "fuseTooltipDelay" }] : /* istanbul ignore next */ []));
|
|
41
|
+
fuseTooltipDisabled = input(false, ...(ngDevMode ? [{ debugName: "fuseTooltipDisabled" }] : /* istanbul ignore next */ []));
|
|
42
|
+
// ─── Services ──────────────────────────────────────────────────────────────
|
|
43
|
+
destroyRef = inject(DestroyRef);
|
|
44
|
+
animSvc = inject(FuseAnimationService);
|
|
45
|
+
overlay = inject(Overlay);
|
|
46
|
+
el = inject((ElementRef));
|
|
47
|
+
// ─── State ─────────────────────────────────────────────────────────────────
|
|
48
|
+
overlayRef = null;
|
|
49
|
+
portal = null;
|
|
50
|
+
openTimer = null;
|
|
51
|
+
isOpen = false;
|
|
52
|
+
constructor() {
|
|
53
|
+
this.portal = new ComponentPortal(FuseTooltipContentComponent);
|
|
54
|
+
this.destroyRef.onDestroy(() => this.disposeAll());
|
|
55
|
+
}
|
|
56
|
+
// ─── Host listeners ────────────────────────────────────────────────────────
|
|
57
|
+
show() {
|
|
58
|
+
if (this.fuseTooltipDisabled())
|
|
59
|
+
return;
|
|
60
|
+
this.clearTimer();
|
|
61
|
+
this.openTimer = setTimeout(() => this.createTooltip(), this.fuseTooltipDelay());
|
|
62
|
+
}
|
|
63
|
+
hide() {
|
|
64
|
+
this.clearTimer();
|
|
65
|
+
this.destroyTooltip();
|
|
66
|
+
}
|
|
67
|
+
onFocus() { this.show(); }
|
|
68
|
+
onBlur() { this.hide(); }
|
|
69
|
+
// ─── Tooltip lifecycle ─────────────────────────────────────────────────────
|
|
70
|
+
createTooltip() {
|
|
71
|
+
if (this.isOpen || !this.fuseTooltip())
|
|
72
|
+
return;
|
|
73
|
+
const positionStrategy = this.overlay
|
|
74
|
+
.position()
|
|
75
|
+
.flexibleConnectedTo(this.el)
|
|
76
|
+
.withPositions(POSITIONS[this.fuseTooltipPlacement()])
|
|
77
|
+
.withPush(false);
|
|
78
|
+
this.overlayRef = this.overlay.create({
|
|
79
|
+
positionStrategy,
|
|
80
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
81
|
+
panelClass: 'fuse-tooltip-panel',
|
|
82
|
+
});
|
|
83
|
+
const ref = this.overlayRef.attach(this.portal);
|
|
84
|
+
ref.instance.text.set(this.fuseTooltip());
|
|
85
|
+
this.isOpen = true;
|
|
86
|
+
// Animate in
|
|
87
|
+
const node = this.overlayRef.overlayElement.firstElementChild;
|
|
88
|
+
this.animSvc.addEnterState(node, 'tooltip');
|
|
89
|
+
// Accessible: link tooltip to host via aria-describedby
|
|
90
|
+
const id = `fuse-tt-${Math.random().toString(36).slice(2)}`;
|
|
91
|
+
node.id = id;
|
|
92
|
+
this.el.nativeElement.setAttribute('aria-describedby', id);
|
|
93
|
+
}
|
|
94
|
+
destroyTooltip() {
|
|
95
|
+
if (!this.isOpen || !this.overlayRef)
|
|
96
|
+
return;
|
|
97
|
+
this.isOpen = false;
|
|
98
|
+
const node = this.overlayRef.overlayElement.firstElementChild;
|
|
99
|
+
if (!node) {
|
|
100
|
+
this.overlayRef.detach();
|
|
101
|
+
this.el.nativeElement.removeAttribute('aria-describedby');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.animSvc.addLeaveState(node, () => {
|
|
105
|
+
this.overlayRef?.detach();
|
|
106
|
+
this.el.nativeElement.removeAttribute('aria-describedby');
|
|
107
|
+
}, 'default');
|
|
108
|
+
}
|
|
109
|
+
// ─── Cleanup ───────────────────────────────────────────────────────────────
|
|
110
|
+
ngOnDestroy() {
|
|
111
|
+
this.disposeAll();
|
|
112
|
+
}
|
|
113
|
+
disposeAll() {
|
|
114
|
+
this.clearTimer();
|
|
115
|
+
this.overlayRef?.dispose();
|
|
116
|
+
this.overlayRef = null;
|
|
117
|
+
this.isOpen = false;
|
|
118
|
+
this.el.nativeElement.removeAttribute('aria-describedby');
|
|
119
|
+
}
|
|
120
|
+
clearTimer() {
|
|
121
|
+
if (this.openTimer !== null) {
|
|
122
|
+
clearTimeout(this.openTimer);
|
|
123
|
+
this.openTimer = null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuseTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
127
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.6", type: FuseTooltipDirective, isStandalone: true, selector: "[fuseTooltip]", inputs: { fuseTooltip: { classPropertyName: "fuseTooltip", publicName: "fuseTooltip", isSignal: true, isRequired: true, transformFunction: null }, fuseTooltipPlacement: { classPropertyName: "fuseTooltipPlacement", publicName: "fuseTooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, fuseTooltipDelay: { classPropertyName: "fuseTooltipDelay", publicName: "fuseTooltipDelay", isSignal: true, isRequired: false, transformFunction: null }, fuseTooltipDisabled: { classPropertyName: "fuseTooltipDisabled", publicName: "fuseTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "show()", "mouseleave": "hide()", "focus": "onFocus()", "blur": "onBlur()" } }, ngImport: i0 });
|
|
128
|
+
}
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: FuseTooltipDirective, decorators: [{
|
|
130
|
+
type: Directive,
|
|
131
|
+
args: [{
|
|
132
|
+
selector: '[fuseTooltip]',
|
|
133
|
+
standalone: true,
|
|
134
|
+
}]
|
|
135
|
+
}], ctorParameters: () => [], propDecorators: { fuseTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "fuseTooltip", required: true }] }], fuseTooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "fuseTooltipPlacement", required: false }] }], fuseTooltipDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "fuseTooltipDelay", required: false }] }], fuseTooltipDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "fuseTooltipDisabled", required: false }] }], show: [{
|
|
136
|
+
type: HostListener,
|
|
137
|
+
args: ['mouseenter']
|
|
138
|
+
}], hide: [{
|
|
139
|
+
type: HostListener,
|
|
140
|
+
args: ['mouseleave']
|
|
141
|
+
}], onFocus: [{
|
|
142
|
+
type: HostListener,
|
|
143
|
+
args: ['focus']
|
|
144
|
+
}], onBlur: [{
|
|
145
|
+
type: HostListener,
|
|
146
|
+
args: ['blur']
|
|
147
|
+
}] } });
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Generated bundle index. Do not edit.
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
export { FuseTooltipContentComponent, FuseTooltipDirective };
|
|
154
|
+
//# sourceMappingURL=fuse_ui-tooltip.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuse_ui-tooltip.mjs","sources":["../../../../packages/tooltip/src/lib/tooltip/fuse-tooltip-content.component.ts","../../../../packages/tooltip/src/lib/tooltip/fuse-tooltip.directive.ts","../../../../packages/tooltip/src/fuse_ui-tooltip.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, signal } from '@angular/core';\n\n@Component({\n selector: 'fuse-tooltip-content',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<div class=\"fuse-tooltip\" role=\"tooltip\">{{ text() }}</div>`,\n styleUrl: './fuse-tooltip-content.component.scss',\n})\nexport class FuseTooltipContentComponent {\n readonly text = signal('');\n}\n","import {\n DestroyRef,\n Directive,\n ElementRef,\n HostListener,\n inject,\n input,\n OnDestroy,\n} from '@angular/core';\nimport {\n ConnectedPosition,\n Overlay,\n OverlayRef,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { FuseAnimationService } from '@fuse_ui/core';\nimport { FuseTooltipContentComponent } from './fuse-tooltip-content.component';\n\ntype Placement = 'top' | 'bottom' | 'left' | 'right';\n\n// ─── Placement → CDK ConnectedPosition map ────────────────────────────────────\n\nconst POSITIONS: Record<Placement, ConnectedPosition[]> = {\n top: [\n { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -6 },\n { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 6 },\n ],\n bottom: [\n { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 6 },\n { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -6 },\n ],\n left: [\n { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -6 },\n { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 6 },\n ],\n right: [\n { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 6 },\n { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -6 },\n ],\n};\n\n@Directive({\n selector: '[fuseTooltip]',\n standalone: true,\n})\nexport class FuseTooltipDirective implements OnDestroy {\n // ─── Inputs ────────────────────────────────────────────────────────────────\n\n readonly fuseTooltip = input.required<string>();\n readonly fuseTooltipPlacement = input<Placement>('top');\n readonly fuseTooltipDelay = input<number>(200);\n readonly fuseTooltipDisabled = input<boolean>(false);\n\n // ─── Services ──────────────────────────────────────────────────────────────\n\n private readonly destroyRef = inject(DestroyRef);\n private readonly animSvc = inject(FuseAnimationService);\n private readonly overlay = inject(Overlay);\n private readonly el = inject(ElementRef<HTMLElement>);\n\n // ─── State ─────────────────────────────────────────────────────────────────\n\n private overlayRef: OverlayRef | null = null;\n private portal: ComponentPortal<FuseTooltipContentComponent> | null = null;\n private openTimer: ReturnType<typeof setTimeout> | null = null;\n private isOpen = false;\n\n constructor() {\n this.portal = new ComponentPortal(FuseTooltipContentComponent);\n this.destroyRef.onDestroy(() => this.disposeAll());\n }\n\n // ─── Host listeners ────────────────────────────────────────────────────────\n\n @HostListener('mouseenter')\n show(): void {\n if (this.fuseTooltipDisabled()) return;\n this.clearTimer();\n this.openTimer = setTimeout(() => this.createTooltip(), this.fuseTooltipDelay());\n }\n\n @HostListener('mouseleave')\n hide(): void {\n this.clearTimer();\n this.destroyTooltip();\n }\n\n @HostListener('focus')\n onFocus(): void { this.show(); }\n\n @HostListener('blur')\n onBlur(): void { this.hide(); }\n\n // ─── Tooltip lifecycle ─────────────────────────────────────────────────────\n\n private createTooltip(): void {\n if (this.isOpen || !this.fuseTooltip()) return;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.el)\n .withPositions(POSITIONS[this.fuseTooltipPlacement()])\n .withPush(false);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n panelClass: 'fuse-tooltip-panel',\n });\n\n const ref = this.overlayRef.attach(this.portal!);\n ref.instance.text.set(this.fuseTooltip());\n this.isOpen = true;\n\n // Animate in\n const node = this.overlayRef.overlayElement.firstElementChild as HTMLElement;\n this.animSvc.addEnterState(node, 'tooltip');\n\n // Accessible: link tooltip to host via aria-describedby\n const id = `fuse-tt-${Math.random().toString(36).slice(2)}`;\n node.id = id;\n this.el.nativeElement.setAttribute('aria-describedby', id);\n }\n\n private destroyTooltip(): void {\n if (!this.isOpen || !this.overlayRef) return;\n this.isOpen = false;\n\n const node = this.overlayRef.overlayElement.firstElementChild as HTMLElement | null;\n if (!node) {\n this.overlayRef.detach();\n this.el.nativeElement.removeAttribute('aria-describedby');\n return;\n }\n\n this.animSvc.addLeaveState(\n node,\n () => {\n this.overlayRef?.detach();\n this.el.nativeElement.removeAttribute('aria-describedby');\n },\n 'default',\n );\n }\n\n // ─── Cleanup ───────────────────────────────────────────────────────────────\n\n ngOnDestroy(): void {\n this.disposeAll();\n }\n\n private disposeAll(): void {\n this.clearTimer();\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.isOpen = false;\n this.el.nativeElement.removeAttribute('aria-describedby');\n }\n\n private clearTimer(): void {\n if (this.openTimer !== null) {\n clearTimeout(this.openTimer);\n this.openTimer = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAUa,2BAA2B,CAAA;AAC7B,IAAA,IAAI,GAAG,MAAM,CAAC,EAAE,2EAAC;uGADf,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA3B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,gFAH5B,CAAA,2DAAA,CAA6D,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,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BAMzB,YAAY;uBAAC,OAAO;;sBAGpB,YAAY;uBAAC,MAAM;;;AC1FtB;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fuse_ui/tooltip",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"fuse-ui",
|
|
10
|
+
"angular",
|
|
11
|
+
"ionic",
|
|
12
|
+
"ionic8",
|
|
13
|
+
"angular18",
|
|
14
|
+
"angular19",
|
|
15
|
+
"angular20",
|
|
16
|
+
"angular21",
|
|
17
|
+
"ui-components",
|
|
18
|
+
"design-system",
|
|
19
|
+
"css-variables",
|
|
20
|
+
"signals",
|
|
21
|
+
"standalone",
|
|
22
|
+
"multi-theme",
|
|
23
|
+
"dark-mode",
|
|
24
|
+
"fluid-typography",
|
|
25
|
+
"animated"
|
|
26
|
+
],
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@angular/core": ">=18.0.0",
|
|
29
|
+
"@angular/common": ">=18.0.0",
|
|
30
|
+
"rxjs": ">=7.4.0",
|
|
31
|
+
"@angular/cdk": "^21.2.4",
|
|
32
|
+
"@fuse_ui/core": "0.0.1"
|
|
33
|
+
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"@ionic/angular": {
|
|
36
|
+
"optional": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"sideEffects": [
|
|
40
|
+
"*.css",
|
|
41
|
+
"**/*.scss"
|
|
42
|
+
],
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=20.0.0"
|
|
45
|
+
},
|
|
46
|
+
"module": "fesm2022/fuse_ui-tooltip.mjs",
|
|
47
|
+
"typings": "types/fuse_ui-tooltip.d.ts",
|
|
48
|
+
"exports": {
|
|
49
|
+
"./package.json": {
|
|
50
|
+
"default": "./package.json"
|
|
51
|
+
},
|
|
52
|
+
".": {
|
|
53
|
+
"types": "./types/fuse_ui-tooltip.d.ts",
|
|
54
|
+
"default": "./fesm2022/fuse_ui-tooltip.mjs"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"type": "module",
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"tslib": "^2.3.0"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
type Placement = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
declare class FuseTooltipDirective implements OnDestroy {
|
|
6
|
+
readonly fuseTooltip: _angular_core.InputSignal<string>;
|
|
7
|
+
readonly fuseTooltipPlacement: _angular_core.InputSignal<Placement>;
|
|
8
|
+
readonly fuseTooltipDelay: _angular_core.InputSignal<number>;
|
|
9
|
+
readonly fuseTooltipDisabled: _angular_core.InputSignal<boolean>;
|
|
10
|
+
private readonly destroyRef;
|
|
11
|
+
private readonly animSvc;
|
|
12
|
+
private readonly overlay;
|
|
13
|
+
private readonly el;
|
|
14
|
+
private overlayRef;
|
|
15
|
+
private portal;
|
|
16
|
+
private openTimer;
|
|
17
|
+
private isOpen;
|
|
18
|
+
constructor();
|
|
19
|
+
show(): void;
|
|
20
|
+
hide(): void;
|
|
21
|
+
onFocus(): void;
|
|
22
|
+
onBlur(): void;
|
|
23
|
+
private createTooltip;
|
|
24
|
+
private destroyTooltip;
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
private disposeAll;
|
|
27
|
+
private clearTimer;
|
|
28
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FuseTooltipDirective, never>;
|
|
29
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FuseTooltipDirective, "[fuseTooltip]", never, { "fuseTooltip": { "alias": "fuseTooltip"; "required": true; "isSignal": true; }; "fuseTooltipPlacement": { "alias": "fuseTooltipPlacement"; "required": false; "isSignal": true; }; "fuseTooltipDelay": { "alias": "fuseTooltipDelay"; "required": false; "isSignal": true; }; "fuseTooltipDisabled": { "alias": "fuseTooltipDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class FuseTooltipContentComponent {
|
|
33
|
+
readonly text: _angular_core.WritableSignal<string>;
|
|
34
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FuseTooltipContentComponent, never>;
|
|
35
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FuseTooltipContentComponent, "fuse-tooltip-content", never, {}, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { FuseTooltipContentComponent, FuseTooltipDirective };
|