@seniorsistemas/scala-ng 2.1.0 → 2.2.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/README.md +4 -5
- package/avatar-summary/README.md +6 -2
- package/avatar-summary/public-api.d.ts +1 -1
- package/avatar-summary/src/avatar-summary/avatar-summary.component.d.ts +1 -1
- package/banner/README.md +13 -9
- package/banner/public-api.d.ts +1 -1
- package/breadcrumb/README.md +15 -8
- package/breadcrumb/public-api.d.ts +3 -3
- package/breadcrumb/src/breadcrumb-router/breadcrumb-route-data.d.ts +1 -0
- package/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.d.ts +7 -1
- package/card/README.md +1 -0
- package/checkbox/README.md +3 -1
- package/date-picker/README.md +1 -0
- package/date-picker/public-api.d.ts +1 -1
- package/drawer/README.md +4 -0
- package/empty-state/README.md +17 -11
- package/empty-state/src/empty-state/empty-state.component.d.ts +1 -1
- package/esm2022/autocomplete/src/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2022/avatar-summary/public-api.mjs +1 -1
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.component.mjs +2 -2
- package/esm2022/banner/public-api.mjs +2 -2
- package/esm2022/banner/src/banner/banner.component.mjs +4 -4
- package/esm2022/breadcrumb/public-api.mjs +2 -2
- package/esm2022/breadcrumb/src/breadcrumb/breadcrumb.component.mjs +4 -4
- package/esm2022/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.mjs +6 -3
- package/esm2022/breadcrumb/src/breadcrumb-router/breadcrumb-route-data.mjs +1 -1
- package/esm2022/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.mjs +23 -6
- package/esm2022/breadcrumb/src/breadcrumb-truncator/breadcrumb-truncator.component.mjs +2 -2
- package/esm2022/card/src/card/card.component.mjs +4 -4
- package/esm2022/checkbox/src/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/date-picker/public-api.mjs +2 -2
- package/esm2022/date-picker/src/date-picker/datepicker.component.mjs +4 -4
- package/esm2022/drawer/src/drawer/drawer.component.mjs +3 -3
- package/esm2022/empty-state/src/empty-state/empty-state.component.mjs +4 -4
- package/esm2022/input/src/input/input.component.mjs +3 -4
- package/esm2022/item-strip/public-api.mjs +1 -1
- package/esm2022/item-strip/src/item-strip/item-strip.component.mjs +59 -11
- package/esm2022/item-strip/src/item-strip-item/item-strip-item.component.mjs +97 -9
- package/esm2022/lib/chip/chip.utils.mjs +2 -2
- package/esm2022/lib/overlay/scroll-lock.utils.mjs +1 -1
- package/esm2022/lib/theme/theme.service.mjs +2 -2
- package/esm2022/list/public-api.mjs +1 -1
- package/esm2022/list/src/list/list.component.mjs +3 -3
- package/esm2022/list/src/list/list.models.mjs +1 -1
- package/esm2022/list/src/list-item/list-item.component.mjs +26 -5
- package/esm2022/locale/fallback.mjs +1 -2
- package/esm2022/page-header/src/page-header/page-header.component.mjs +8 -6
- package/esm2022/paginator/src/paginator/paginator.component.mjs +2 -2
- package/esm2022/panel/src/panel/panel.component.mjs +4 -4
- package/esm2022/public-api.mjs +5 -5
- package/esm2022/radio-button/public-api.mjs +2 -2
- package/esm2022/radio-button/src/radio-button/radio-button.component.mjs +3 -3
- package/esm2022/select/src/select/select.component.mjs +5 -5
- package/esm2022/select-button/src/select-button/select-button.component.mjs +4 -4
- package/esm2022/stats-card/src/stats-card/stats-card.component.mjs +5 -28
- package/esm2022/switch/src/switch/switch.component.mjs +3 -3
- package/esm2022/table/public-api.mjs +1 -1
- package/esm2022/table/src/components/actions-cell/table-actions-cell.component.mjs +10 -5
- package/esm2022/table/src/components/fields/rich-field-table/rich-field-table.component.mjs +1 -1
- package/esm2022/table/src/components/selection-cell/table-selection-cell.component.mjs +2 -2
- package/esm2022/table/src/components/toolbar/table-toolbar.component.mjs +3 -3
- package/esm2022/table/src/directives/table-container.directive.mjs +3 -3
- package/esm2022/table/src/table/table.component.mjs +3 -3
- package/esm2022/table/src/table/table.models.mjs +1 -1
- package/esm2022/table/src/utils/table-lazy-event.utils.mjs +1 -1
- package/esm2022/tooltip/src/tooltip/tooltip-focus-origin.service.mjs +32 -0
- package/esm2022/tooltip/src/tooltip-panel/tooltip-panel.component.mjs +5 -3
- package/esm2022/tooltip/src/tooltip-trigger/tooltip-trigger.directive.mjs +77 -23
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs +53 -53
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs +30 -11
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-card.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs +154 -18
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-list.mjs +27 -6
- package/fesm2022/seniorsistemas-scala-ng-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs +0 -1
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs +7 -5
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs +3 -3
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select.mjs +4 -4
- package/fesm2022/seniorsistemas-scala-ng-select.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs +4 -27
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs +2 -2
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs.map +1 -1
- package/fesm2022/{seniorsistemas-scala-ng-table-table-actions-cell.component-DZU3DYW8.mjs → seniorsistemas-scala-ng-table-table-actions-cell.component-D6ffnUl1.mjs} +10 -5
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-D6ffnUl1.mjs.map +1 -0
- package/fesm2022/{seniorsistemas-scala-ng-table-table-toolbar.component-DWhF_ejJ.mjs → seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs} +3 -3
- package/fesm2022/{seniorsistemas-scala-ng-table-table-toolbar.component-DWhF_ejJ.mjs.map → seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs.map} +1 -1
- package/fesm2022/seniorsistemas-scala-ng-table.mjs +21 -21
- package/fesm2022/seniorsistemas-scala-ng-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs +109 -24
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng.mjs +55 -55
- package/fesm2022/seniorsistemas-scala-ng.mjs.map +1 -1
- package/filter-tag/README.md +2 -1
- package/item-strip/README.md +11 -4
- package/item-strip/public-api.d.ts +1 -1
- package/item-strip/src/item-strip/item-strip.component.d.ts +12 -1
- package/item-strip/src/item-strip-item/item-strip-item.component.d.ts +32 -3
- package/list/README.md +17 -0
- package/list/public-api.d.ts +1 -1
- package/list/src/list/list.models.d.ts +19 -0
- package/list/src/list-item/list-item.component.d.ts +15 -2
- package/package.json +1 -7
- package/page-header/README.md +68 -24
- package/page-header/src/page-header/page-header.component.d.ts +5 -3
- package/panel/README.md +5 -1
- package/public-api.d.ts +7 -7
- package/radio-button/README.md +8 -1
- package/radio-button/public-api.d.ts +2 -2
- package/schematics/ng-add/index.js +39 -23
- package/schematics/ng-add/index.js.map +1 -1
- package/select/src/select/select.component.d.ts +3 -3
- package/select-button/README.md +1 -0
- package/selection-chip/README.md +1 -0
- package/stats-card/README.md +35 -29
- package/stats-card/src/stats-card/stats-card.component.d.ts +18 -31
- package/styles/tailwind-tokens.js +103 -1
- package/styles/tokens/radius.scss +0 -2
- package/styles/tokens/spacing.scss +0 -2
- package/styles/tokens/typography.scss +0 -2
- package/styles.scss +2 -0
- package/switch/README.md +7 -1
- package/table/README.md +21 -10
- package/table/public-api.d.ts +4 -4
- package/table/src/table/table.models.d.ts +2 -1
- package/tooltip/README.md +15 -5
- package/tooltip/src/tooltip/tooltip-focus-origin.service.d.ts +16 -0
- package/tooltip/src/tooltip-panel/tooltip-panel.component.d.ts +3 -1
- package/tooltip/src/tooltip-trigger/tooltip-trigger.directive.d.ts +21 -5
- package/avatar-profile/README.md +0 -204
- package/avatar-profile/index.d.ts +0 -5
- package/avatar-profile/package.json +0 -3
- package/avatar-profile/public-api.d.ts +0 -1
- package/avatar-profile/src/avatar-profile/avatar-profile.component.d.ts +0 -21
- package/esm2022/avatar-profile/public-api.mjs +0 -2
- package/esm2022/avatar-profile/seniorsistemas-scala-ng-avatar-profile.mjs +0 -5
- package/esm2022/avatar-profile/src/avatar-profile/avatar-profile.component.mjs +0 -33
- package/fesm2022/seniorsistemas-scala-ng-avatar-profile.mjs +0 -40
- package/fesm2022/seniorsistemas-scala-ng-avatar-profile.mjs.map +0 -1
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-DZU3DYW8.mjs.map +0 -1
|
@@ -3,6 +3,7 @@ import { ComponentPortal } from '@angular/cdk/portal';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { input, computed, TemplateRef, Component, ChangeDetectionStrategy, Injectable, inject, ElementRef, DestroyRef, signal, effect, Directive } from '@angular/core';
|
|
5
5
|
import { NgClass, NgTemplateOutlet } from '@angular/common';
|
|
6
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
6
7
|
|
|
7
8
|
const ARROW_EDGE = {
|
|
8
9
|
top: "bottom",
|
|
@@ -24,6 +25,8 @@ class SdsTooltipPanelComponent {
|
|
|
24
25
|
panelId = `sds-tooltip-panel-${++panelIdCounter}`;
|
|
25
26
|
/** Plain text or a template to render. */
|
|
26
27
|
content = input.required();
|
|
28
|
+
/** Context for a template `content`. */
|
|
29
|
+
context = input(null);
|
|
27
30
|
/** Title of the rich variant; empty renders the plain variant. */
|
|
28
31
|
tooltipTitle = input("");
|
|
29
32
|
/** Whether to show the arrow. */
|
|
@@ -55,7 +58,7 @@ class SdsTooltipPanelComponent {
|
|
|
55
58
|
arrowLeftPx = computed(() => this.arrowOnHorizontalEdge() ? this.arrowOffsetPx() : null);
|
|
56
59
|
arrowTopPx = computed(() => this.arrowOnHorizontalEdge() ? null : this.arrowOffsetPx());
|
|
57
60
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTooltipPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsTooltipPanelComponent, isStandalone: true, selector: "sds-tooltip-panel", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "showArrow", isSignal: true, isRequired: false, transformFunction: null }, resolvedPosition: { classPropertyName: "resolvedPosition", publicName: "resolvedPosition", isSignal: true, isRequired: false, transformFunction: null }, arrowOffsetPx: { classPropertyName: "arrowOffsetPx", publicName: "arrowOffsetPx", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tooltip" }, properties: { "id": "panelId", "attr.data-position": "resolvedPosition()" }, classAttribute: "block" }, ngImport: i0, template: "<div\n class=\"relative flex w-max flex-col items-start gap-space-0-50 rounded-radius-xlarge bg-color-background-inverse p-space-2 text-color-text-inverse\"\n [ngClass]=\"containerClasses()\"\n>\n @if (tooltipTitle(); as title) {\n <p class=\"text-font-size-2 font-font-weight-medium leading-line-height-125\">{{ title }}</p>\n }\n @if (contentAsTemplate(); as template) {\n <ng-container
|
|
61
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsTooltipPanelComponent, isStandalone: true, selector: "sds-tooltip-panel", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null }, tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "showArrow", isSignal: true, isRequired: false, transformFunction: null }, resolvedPosition: { classPropertyName: "resolvedPosition", publicName: "resolvedPosition", isSignal: true, isRequired: false, transformFunction: null }, arrowOffsetPx: { classPropertyName: "arrowOffsetPx", publicName: "arrowOffsetPx", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tooltip" }, properties: { "id": "panelId", "attr.data-position": "resolvedPosition()" }, classAttribute: "block" }, ngImport: i0, template: "<div\n class=\"relative flex w-max flex-col items-start gap-space-0-50 rounded-radius-xlarge bg-color-background-inverse p-space-2 text-color-text-inverse\"\n [ngClass]=\"containerClasses()\"\n>\n @if (tooltipTitle(); as title) {\n <p class=\"text-font-size-2 font-font-weight-medium leading-line-height-125\">{{ title }}</p>\n }\n @if (contentAsTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"context()\"\n />\n } @else {\n @if (contentAsString(); as text) {\n <p class=\"text-font-size-2 font-font-weight-regular leading-line-height-150\">{{ text }}</p>\n }\n }\n @if (showArrow()) {\n <span\n aria-hidden=\"true\"\n class=\"absolute h-0 w-0\"\n [class]=\"arrowClasses()\"\n [attr.data-offset]=\"arrowOffsetPx()\"\n [style.left.px]=\"arrowLeftPx()\"\n [style.top.px]=\"arrowTopPx()\"\n ></span>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
59
62
|
}
|
|
60
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTooltipPanelComponent, decorators: [{
|
|
61
64
|
type: Component,
|
|
@@ -64,7 +67,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
64
67
|
"[id]": "panelId",
|
|
65
68
|
"[attr.data-position]": "resolvedPosition()",
|
|
66
69
|
class: "block",
|
|
67
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"relative flex w-max flex-col items-start gap-space-0-50 rounded-radius-xlarge bg-color-background-inverse p-space-2 text-color-text-inverse\"\n [ngClass]=\"containerClasses()\"\n>\n @if (tooltipTitle(); as title) {\n <p class=\"text-font-size-2 font-font-weight-medium leading-line-height-125\">{{ title }}</p>\n }\n @if (contentAsTemplate(); as template) {\n <ng-container
|
|
70
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"relative flex w-max flex-col items-start gap-space-0-50 rounded-radius-xlarge bg-color-background-inverse p-space-2 text-color-text-inverse\"\n [ngClass]=\"containerClasses()\"\n>\n @if (tooltipTitle(); as title) {\n <p class=\"text-font-size-2 font-font-weight-medium leading-line-height-125\">{{ title }}</p>\n }\n @if (contentAsTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"context()\"\n />\n } @else {\n @if (contentAsString(); as text) {\n <p class=\"text-font-size-2 font-font-weight-regular leading-line-height-150\">{{ text }}</p>\n }\n }\n @if (showArrow()) {\n <span\n aria-hidden=\"true\"\n class=\"absolute h-0 w-0\"\n [class]=\"arrowClasses()\"\n [attr.data-offset]=\"arrowOffsetPx()\"\n [style.left.px]=\"arrowLeftPx()\"\n [style.top.px]=\"arrowTopPx()\"\n ></span>\n }\n</div>\n" }]
|
|
68
71
|
}] });
|
|
69
72
|
|
|
70
73
|
/**
|
|
@@ -109,6 +112,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
109
112
|
args: [{ providedIn: "root" }]
|
|
110
113
|
}] });
|
|
111
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Reference-counted wrapper around `FocusMonitor`. Several tooltips can watch the same focusable
|
|
117
|
+
* ancestor (e.g. a Stats Card container), and `FocusMonitor.stopMonitoring()` completes the stream
|
|
118
|
+
* for every subscriber, so only the last one to release an element may stop monitoring it.
|
|
119
|
+
*/
|
|
120
|
+
class SdsTooltipFocusOriginService {
|
|
121
|
+
focusMonitor = inject(FocusMonitor);
|
|
122
|
+
monitorCounts = new Map();
|
|
123
|
+
monitor(element) {
|
|
124
|
+
this.monitorCounts.set(element, (this.monitorCounts.get(element) ?? 0) + 1);
|
|
125
|
+
return this.focusMonitor.monitor(element);
|
|
126
|
+
}
|
|
127
|
+
release(element) {
|
|
128
|
+
const remainingCount = (this.monitorCounts.get(element) ?? 0) - 1;
|
|
129
|
+
if (remainingCount > 0) {
|
|
130
|
+
this.monitorCounts.set(element, remainingCount);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
this.monitorCounts.delete(element);
|
|
134
|
+
this.focusMonitor.stopMonitoring(element);
|
|
135
|
+
}
|
|
136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTooltipFocusOriginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
137
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTooltipFocusOriginService, providedIn: "root" });
|
|
138
|
+
}
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTooltipFocusOriginService, decorators: [{
|
|
140
|
+
type: Injectable,
|
|
141
|
+
args: [{ providedIn: "root" }]
|
|
142
|
+
}] });
|
|
143
|
+
|
|
112
144
|
/** Gap between the bubble and the trigger, per Figma. */
|
|
113
145
|
const GAP_PX = 14;
|
|
114
146
|
/** Half of the arrow's long side (12x6 / 6x12), used to center its offset. */
|
|
@@ -149,6 +181,8 @@ function isNativelyFocusable(element) {
|
|
|
149
181
|
class SdsTooltipDirective {
|
|
150
182
|
/** Tooltip content: plain text or a `TemplateRef` for custom content. */
|
|
151
183
|
content = input.required({ alias: "sdsTooltip" });
|
|
184
|
+
/** Context passed to a `TemplateRef` content (`$implicit` and named `let-` variables). */
|
|
185
|
+
context = input(null, { alias: "sdsTooltipContext" });
|
|
152
186
|
/** When set, enables the rich variant (title plus `content` as supporting text, up to 320px). */
|
|
153
187
|
title = input("", { alias: "sdsTooltipTitle" });
|
|
154
188
|
/** Bubble position relative to the trigger; `"auto"` picks the best available side. */
|
|
@@ -166,13 +200,27 @@ class SdsTooltipDirective {
|
|
|
166
200
|
* inside a focusable element, to avoid a nested Tab stop.
|
|
167
201
|
*/
|
|
168
202
|
focusable = input(true, { alias: "sdsTooltipFocusable" });
|
|
203
|
+
/**
|
|
204
|
+
* When `false`, never sets `aria-describedby` on the host. Use when the host already exposes the
|
|
205
|
+
* tooltip text to assistive technology, so it isn't read twice.
|
|
206
|
+
*/
|
|
207
|
+
describeHost = input(true, { alias: "sdsTooltipDescribeHost" });
|
|
169
208
|
elementRef = inject(ElementRef);
|
|
170
209
|
overlay = inject(Overlay);
|
|
171
210
|
destroyRef = inject(DestroyRef);
|
|
172
211
|
collisionRegistry = inject(SdsTooltipCollisionRegistryService);
|
|
173
|
-
|
|
212
|
+
focusOrigin = inject(SdsTooltipFocusOriginService);
|
|
213
|
+
/** Panel id this directive added to the host's `aria-describedby`, if any. */
|
|
214
|
+
describedById = null;
|
|
215
|
+
/** Tabindex the host declares itself; the binding below would otherwise remove it (`null`). */
|
|
216
|
+
ownTabIndex = this.elementRef.nativeElement.getAttribute("tabindex");
|
|
174
217
|
/** Makes non-focusable hosts reachable by Tab; `computed()` since inputs are unset in the constructor. */
|
|
175
|
-
hostTabIndex = computed(() =>
|
|
218
|
+
hostTabIndex = computed(() => {
|
|
219
|
+
if (this.ownTabIndex !== null) {
|
|
220
|
+
return this.ownTabIndex;
|
|
221
|
+
}
|
|
222
|
+
return !this.focusable() || isNativelyFocusable(this.elementRef.nativeElement) ? null : 0;
|
|
223
|
+
});
|
|
176
224
|
isOpen = signal(false);
|
|
177
225
|
isHoveringTrigger = false;
|
|
178
226
|
isHoveringPanel = false;
|
|
@@ -189,6 +237,7 @@ class SdsTooltipDirective {
|
|
|
189
237
|
// Keeps an open panel in sync with input changes.
|
|
190
238
|
effect(() => {
|
|
191
239
|
const content = this.content();
|
|
240
|
+
const context = this.context();
|
|
192
241
|
const title = this.title();
|
|
193
242
|
const showArrow = this.showArrow();
|
|
194
243
|
if (this.hasNoContent()) {
|
|
@@ -196,26 +245,32 @@ class SdsTooltipDirective {
|
|
|
196
245
|
return;
|
|
197
246
|
}
|
|
198
247
|
this.panelRef?.setInput("content", content);
|
|
248
|
+
this.panelRef?.setInput("context", context);
|
|
199
249
|
this.panelRef?.setInput("tooltipTitle", title);
|
|
200
250
|
this.panelRef?.setInput("showArrow", showArrow);
|
|
201
251
|
}, { allowSignalWrites: true });
|
|
202
|
-
//
|
|
203
|
-
// focus
|
|
252
|
+
// Only keyboard focus opens the tooltip: programmatic focus (e.g. a Drawer focusing its first
|
|
253
|
+
// element or restoring focus to its trigger) and mouse focus were not a request to see it.
|
|
254
|
+
// With focusable=false the Tab stop belongs to a focusable ancestor (e.g. a breadcrumb link).
|
|
204
255
|
effect((onCleanup) => {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if (!
|
|
256
|
+
const hostElement = this.elementRef.nativeElement;
|
|
257
|
+
const focusTarget = this.focusable()
|
|
258
|
+
? hostElement
|
|
259
|
+
: hostElement.parentElement?.closest(FOCUSABLE_ANCESTOR_SELECTOR);
|
|
260
|
+
if (!focusTarget) {
|
|
210
261
|
return;
|
|
211
262
|
}
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
263
|
+
const subscription = this.focusOrigin.monitor(focusTarget).subscribe((origin) => {
|
|
264
|
+
if (origin === null) {
|
|
265
|
+
this.handleBlur();
|
|
266
|
+
}
|
|
267
|
+
else if (origin === "keyboard") {
|
|
268
|
+
this.handleFocus();
|
|
269
|
+
}
|
|
270
|
+
});
|
|
216
271
|
onCleanup(() => {
|
|
217
|
-
|
|
218
|
-
|
|
272
|
+
subscription.unsubscribe();
|
|
273
|
+
this.focusOrigin.release(focusTarget);
|
|
219
274
|
});
|
|
220
275
|
});
|
|
221
276
|
this.destroyRef.onDestroy(() => this.close());
|
|
@@ -233,6 +288,13 @@ class SdsTooltipDirective {
|
|
|
233
288
|
this.clearOpenTimeout();
|
|
234
289
|
this.scheduleCloseIfIdle();
|
|
235
290
|
}
|
|
291
|
+
/** Touch is excluded: a tap's pointerdown would cancel the touch-triggered open. */
|
|
292
|
+
handlePointerDown(event) {
|
|
293
|
+
if (event.pointerType === "touch") {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
this.close();
|
|
297
|
+
}
|
|
236
298
|
handleFocus() {
|
|
237
299
|
if (this.disabled()) {
|
|
238
300
|
return;
|
|
@@ -309,6 +371,7 @@ class SdsTooltipDirective {
|
|
|
309
371
|
});
|
|
310
372
|
this.panelRef = this.overlayRef.attach(new ComponentPortal(SdsTooltipPanelComponent));
|
|
311
373
|
this.panelRef.setInput("content", this.content());
|
|
374
|
+
this.panelRef.setInput("context", this.context());
|
|
312
375
|
this.panelRef.setInput("tooltipTitle", this.title());
|
|
313
376
|
this.panelRef.setInput("showArrow", this.showArrow());
|
|
314
377
|
// `attach()` does not run change detection, so the bubble is still 0x0. Render it so the arrow
|
|
@@ -320,8 +383,8 @@ class SdsTooltipDirective {
|
|
|
320
383
|
const content = this.content();
|
|
321
384
|
const repeatsAccessibleName = typeof content === "string" &&
|
|
322
385
|
content === this.elementRef.nativeElement.getAttribute("aria-label");
|
|
323
|
-
if (!repeatsAccessibleName) {
|
|
324
|
-
this.
|
|
386
|
+
if (this.describeHost() && !repeatsAccessibleName) {
|
|
387
|
+
this.addHostDescription(this.panelRef.instance.panelId);
|
|
325
388
|
}
|
|
326
389
|
this.applyCollisionAwarePosition(candidates, positionStrategy);
|
|
327
390
|
this.collisionRegistry.register(this.overlayRef.overlayElement, () => this.applyCollisionAwarePosition(candidates, positionStrategy));
|
|
@@ -329,6 +392,30 @@ class SdsTooltipDirective {
|
|
|
329
392
|
this.attachDocumentEscapeListener();
|
|
330
393
|
this.attachOutsideTouchListener();
|
|
331
394
|
}
|
|
395
|
+
/** Appends to the host's own `aria-describedby` instead of replacing it (e.g. a field's helper text). */
|
|
396
|
+
addHostDescription(panelId) {
|
|
397
|
+
const host = this.elementRef.nativeElement;
|
|
398
|
+
const ids = (host.getAttribute("aria-describedby") ?? "").split(" ").filter(Boolean);
|
|
399
|
+
host.setAttribute("aria-describedby", [...ids, panelId].join(" "));
|
|
400
|
+
this.describedById = panelId;
|
|
401
|
+
}
|
|
402
|
+
removeHostDescription() {
|
|
403
|
+
const panelId = this.describedById;
|
|
404
|
+
if (!panelId) {
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
this.describedById = null;
|
|
408
|
+
const host = this.elementRef.nativeElement;
|
|
409
|
+
const remainingIds = (host.getAttribute("aria-describedby") ?? "")
|
|
410
|
+
.split(" ")
|
|
411
|
+
.filter((id) => id && id !== panelId);
|
|
412
|
+
if (remainingIds.length > 0) {
|
|
413
|
+
host.setAttribute("aria-describedby", remainingIds.join(" "));
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
host.removeAttribute("aria-describedby");
|
|
417
|
+
}
|
|
418
|
+
}
|
|
332
419
|
/** Blank text has nothing to show: an empty bubble (and its `aria-describedby`) would only be noise. */
|
|
333
420
|
hasNoContent() {
|
|
334
421
|
const content = this.content();
|
|
@@ -341,7 +428,7 @@ class SdsTooltipDirective {
|
|
|
341
428
|
return;
|
|
342
429
|
}
|
|
343
430
|
this.isOpen.set(false);
|
|
344
|
-
this.
|
|
431
|
+
this.removeHostDescription();
|
|
345
432
|
this.isHoveringTrigger = false;
|
|
346
433
|
this.isHoveringPanel = false;
|
|
347
434
|
this.isFocused = false;
|
|
@@ -500,7 +587,7 @@ class SdsTooltipDirective {
|
|
|
500
587
|
this.documentTouchCleanup = () => document.removeEventListener("touchstart", handleDocumentTouch);
|
|
501
588
|
}
|
|
502
589
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
503
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: SdsTooltipDirective, isStandalone: true, selector: "[sdsTooltip]", inputs: { content: { classPropertyName: "content", publicName: "sdsTooltip", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "sdsTooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "sdsTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "sdsTooltipShowArrow", isSignal: true, isRequired: false, transformFunction: null }, openDelay: { classPropertyName: "openDelay", publicName: "sdsTooltipOpenDelay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "sdsTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, checkTruncatedText: { classPropertyName: "checkTruncatedText", publicName: "sdsTooltipCheckTruncatedText", isSignal: true, isRequired: false, transformFunction: null }, focusable: { classPropertyName: "focusable", publicName: "sdsTooltipFocusable", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "handlePointerEnter()", "mouseleave": "handlePointerLeave()", "
|
|
590
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: SdsTooltipDirective, isStandalone: true, selector: "[sdsTooltip]", inputs: { content: { classPropertyName: "content", publicName: "sdsTooltip", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "sdsTooltipContext", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "sdsTooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "sdsTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "sdsTooltipShowArrow", isSignal: true, isRequired: false, transformFunction: null }, openDelay: { classPropertyName: "openDelay", publicName: "sdsTooltipOpenDelay", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "sdsTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, checkTruncatedText: { classPropertyName: "checkTruncatedText", publicName: "sdsTooltipCheckTruncatedText", isSignal: true, isRequired: false, transformFunction: null }, focusable: { classPropertyName: "focusable", publicName: "sdsTooltipFocusable", isSignal: true, isRequired: false, transformFunction: null }, describeHost: { classPropertyName: "describeHost", publicName: "sdsTooltipDescribeHost", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "handlePointerEnter()", "mouseleave": "handlePointerLeave()", "pointerdown": "handlePointerDown($event)", "touchstart": "handleTouchStart()" }, properties: { "attr.tabindex": "hostTabIndex()" } }, ngImport: i0 });
|
|
504
591
|
}
|
|
505
592
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTooltipDirective, decorators: [{
|
|
506
593
|
type: Directive,
|
|
@@ -510,10 +597,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
510
597
|
host: {
|
|
511
598
|
"(mouseenter)": "handlePointerEnter()",
|
|
512
599
|
"(mouseleave)": "handlePointerLeave()",
|
|
513
|
-
"(
|
|
514
|
-
"(blur)": "handleBlur()",
|
|
600
|
+
"(pointerdown)": "handlePointerDown($event)",
|
|
515
601
|
"(touchstart)": "handleTouchStart()",
|
|
516
|
-
"[attr.aria-describedby]": "describedById()",
|
|
517
602
|
"[attr.tabindex]": "hostTabIndex()",
|
|
518
603
|
},
|
|
519
604
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-scala-ng-tooltip.mjs","sources":["../../projects/scala-ng/tooltip/src/tooltip-panel/tooltip-panel.component.ts","../../projects/scala-ng/tooltip/src/tooltip-panel/tooltip-panel.component.html","../../projects/scala-ng/tooltip/src/tooltip/tooltip-collision-registry.service.ts","../../projects/scala-ng/tooltip/src/tooltip-trigger/tooltip-trigger.directive.ts","../../projects/scala-ng/tooltip/seniorsistemas-scala-ng-tooltip.ts"],"sourcesContent":["import { NgClass, NgTemplateOutlet } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, TemplateRef, computed, input } from \"@angular/core\";\nimport type { SdsTooltipResolvedSide } from \"../tooltip/tooltip.types\";\n\nconst ARROW_EDGE: Record<SdsTooltipResolvedSide, SdsTooltipResolvedSide> = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\",\n};\n\n// The 14x7 triangle overlaps the bubble by 1px (the negative margin keeps it centered), so a\n// fractional browser zoom cannot round a hairline gap between the arrow and the bubble.\nconst ARROW_EDGE_CLASSES: Record<SdsTooltipResolvedSide, string> = {\n top: \"-top-[6px] -ml-[1px] border-x-[7px] border-x-transparent border-b-[7px] border-b-color-background-inverse\",\n bottom:\n \"-bottom-[6px] -ml-[1px] border-x-[7px] border-x-transparent border-t-[7px] border-t-color-background-inverse\",\n left: \"-left-[6px] -mt-[1px] border-y-[7px] border-y-transparent border-r-[7px] border-r-color-background-inverse\",\n right:\n \"-right-[6px] -mt-[1px] border-y-[7px] border-y-transparent border-l-[7px] border-l-color-background-inverse\",\n};\n\nlet panelIdCounter = 0;\n\n@Component({\n selector: \"sds-tooltip-panel\",\n standalone: true,\n imports: [NgClass, NgTemplateOutlet],\n templateUrl: \"./tooltip-panel.component.html\",\n host: {\n role: \"tooltip\",\n \"[id]\": \"panelId\",\n \"[attr.data-position]\": \"resolvedPosition()\",\n class: \"block\",\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdsTooltipPanelComponent {\n /** Unique id, used by the directive for the trigger's `aria-describedby`. */\n readonly panelId = `sds-tooltip-panel-${++panelIdCounter}`;\n\n /** Plain text or a template to render. */\n readonly content = input.required<string | TemplateRef<unknown>>();\n /** Title of the rich variant; empty renders the plain variant. */\n readonly tooltipTitle = input<string>(\"\");\n /** Whether to show the arrow. */\n readonly showArrow = input(true);\n /** Side of the trigger where the CDK placed the bubble. */\n readonly resolvedPosition = input<SdsTooltipResolvedSide>(\"top\");\n /** Arrow offset in px along the bubble edge, so it points at the trigger. */\n readonly arrowOffsetPx = input(0);\n\n protected readonly contentAsString = computed(() => {\n const value = this.content();\n return typeof value === \"string\" ? value : null;\n });\n\n protected readonly contentAsTemplate = computed(() => {\n const value = this.content();\n return value instanceof TemplateRef ? value : null;\n });\n\n protected readonly contentType = computed<\"rich\" | \"plain\">(() =>\n this.tooltipTitle() ? \"rich\" : \"plain\",\n );\n\n protected readonly containerClasses = computed(() => ({\n \"max-w-[320px]\": this.contentType() === \"rich\",\n \"max-w-[288px]\": this.contentType() === \"plain\",\n }));\n\n private readonly arrowEdge = computed(() => ARROW_EDGE[this.resolvedPosition()]);\n\n protected readonly arrowClasses = computed(() => ARROW_EDGE_CLASSES[this.arrowEdge()]);\n\n /** Arrow on the top/bottom edge, so the offset runs along X. */\n private readonly arrowOnHorizontalEdge = computed(() => {\n const edge = this.arrowEdge();\n return edge === \"top\" || edge === \"bottom\";\n });\n\n protected readonly arrowLeftPx = computed(() =>\n this.arrowOnHorizontalEdge() ? this.arrowOffsetPx() : null,\n );\n\n protected readonly arrowTopPx = computed(() =>\n this.arrowOnHorizontalEdge() ? null : this.arrowOffsetPx(),\n );\n}\n","<div\n class=\"relative flex w-max flex-col items-start gap-space-0-50 rounded-radius-xlarge bg-color-background-inverse p-space-2 text-color-text-inverse\"\n [ngClass]=\"containerClasses()\"\n>\n @if (tooltipTitle(); as title) {\n <p class=\"text-font-size-2 font-font-weight-medium leading-line-height-125\">{{ title }}</p>\n }\n @if (contentAsTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template\" />\n } @else {\n @if (contentAsString(); as text) {\n <p class=\"text-font-size-2 font-font-weight-regular leading-line-height-150\">{{ text }}</p>\n }\n }\n @if (showArrow()) {\n <span\n aria-hidden=\"true\"\n class=\"absolute h-0 w-0\"\n [class]=\"arrowClasses()\"\n [attr.data-offset]=\"arrowOffsetPx()\"\n [style.left.px]=\"arrowLeftPx()\"\n [style.top.px]=\"arrowTopPx()\"\n ></span>\n }\n</div>\n","import { Injectable } from \"@angular/core\";\n\n/**\n * Tracks open tooltips so a new one can avoid overlapping them, and asks the remaining ones to\n * re-evaluate their position when one closes.\n */\n@Injectable({ providedIn: \"root\" })\nexport class SdsTooltipCollisionRegistryService {\n private readonly openPanels = new Map<HTMLElement, () => void>();\n\n register(panelElement: HTMLElement, reevaluatePosition: () => void): void {\n this.openPanels.set(panelElement, reevaluatePosition);\n }\n\n unregister(panelElement: HTMLElement): void {\n if (!this.openPanels.delete(panelElement)) {\n return;\n }\n // Iterate over a copy in case a re-evaluation mutates the map.\n for (const reevaluatePosition of Array.from(this.openPanels.values())) {\n reevaluatePosition();\n }\n }\n\n overlapsAnyOtherOpenPanel(candidateRect: DOMRect, excluding: HTMLElement): boolean {\n for (const panelElement of this.openPanels.keys()) {\n if (panelElement === excluding) {\n continue;\n }\n const rect = panelElement.getBoundingClientRect();\n const overlaps =\n candidateRect.left < rect.right &&\n candidateRect.right > rect.left &&\n candidateRect.top < rect.bottom &&\n candidateRect.bottom > rect.top;\n if (overlaps) {\n return true;\n }\n }\n return false;\n }\n}\n","import {\n ConnectedPosition,\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayRef,\n} from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n TemplateRef,\n computed,\n effect,\n inject,\n input,\n signal,\n} from \"@angular/core\";\nimport { SdsTooltipPanelComponent } from \"../tooltip-panel/tooltip-panel.component\";\nimport { SdsTooltipCollisionRegistryService } from \"../tooltip/tooltip-collision-registry.service\";\nimport type { SdsTooltipPosition, SdsTooltipResolvedSide } from \"../tooltip/tooltip.types\";\n\n/** Gap between the bubble and the trigger, per Figma. */\nconst GAP_PX = 14;\n/** Half of the arrow's long side (12x6 / 6x12), used to center its offset. */\nconst ARROW_HALF_WIDTH_PX = 6;\n/** Bubble radius (`sds-radius-xlarge`); keeps the arrow off the rounded corners. */\nconst RADIUS_PX = 12;\n\ninterface PositionCandidate {\n readonly side: SdsTooltipResolvedSide;\n readonly connectedPosition: ConnectedPosition;\n}\n\nfunction buildVerticalCandidate(side: \"top\" | \"bottom\"): ConnectedPosition {\n return side === \"top\"\n ? {\n originX: \"center\",\n originY: \"top\",\n overlayX: \"center\",\n overlayY: \"bottom\",\n offsetY: -GAP_PX,\n }\n : {\n originX: \"center\",\n originY: \"bottom\",\n overlayX: \"center\",\n overlayY: \"top\",\n offsetY: GAP_PX,\n };\n}\n\nfunction buildHorizontalCandidate(side: \"left\" | \"right\"): ConnectedPosition {\n return side === \"left\"\n ? { originX: \"start\", originY: \"center\", overlayX: \"end\", overlayY: \"center\", offsetX: -GAP_PX }\n : { originX: \"end\", originY: \"center\", overlayX: \"start\", overlayY: \"center\", offsetX: GAP_PX };\n}\n\nconst NATIVELY_FOCUSABLE_TAGS = new Set([\"button\", \"input\", \"select\", \"textarea\"]);\nconst FOCUSABLE_ANCESTOR_SELECTOR = \"a, button, input, select, textarea, [tabindex]\";\n\nfunction isNativelyFocusable(element: HTMLElement): boolean {\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"a\") {\n return element.hasAttribute(\"href\");\n }\n return NATIVELY_FOCUSABLE_TAGS.has(tagName) || element.hasAttribute(\"tabindex\");\n}\n\n@Directive({\n selector: \"[sdsTooltip]\",\n standalone: true,\n host: {\n \"(mouseenter)\": \"handlePointerEnter()\",\n \"(mouseleave)\": \"handlePointerLeave()\",\n \"(focus)\": \"handleFocus()\",\n \"(blur)\": \"handleBlur()\",\n \"(touchstart)\": \"handleTouchStart()\",\n \"[attr.aria-describedby]\": \"describedById()\",\n \"[attr.tabindex]\": \"hostTabIndex()\",\n },\n})\nexport class SdsTooltipDirective {\n /** Tooltip content: plain text or a `TemplateRef` for custom content. */\n readonly content = input.required<string | TemplateRef<unknown>>({ alias: \"sdsTooltip\" });\n /** When set, enables the rich variant (title plus `content` as supporting text, up to 320px). */\n readonly title = input<string>(\"\", { alias: \"sdsTooltipTitle\" });\n /** Bubble position relative to the trigger; `\"auto\"` picks the best available side. */\n readonly position = input<SdsTooltipPosition>(\"auto\", { alias: \"sdsTooltipPosition\" });\n /** Whether to show the arrow. */\n readonly showArrow = input(true, { alias: \"sdsTooltipShowArrow\" });\n /** Delay in ms before opening on hover/touch; keyboard focus always opens immediately. */\n readonly openDelay = input(150, { alias: \"sdsTooltipOpenDelay\" });\n /** Disables the tooltip entirely. */\n readonly disabled = input(false, { alias: \"sdsTooltipDisabled\" });\n /** When `true`, only opens if the trigger's text overflows (e.g. `text-overflow: ellipsis`). */\n readonly checkTruncatedText = input(false, { alias: \"sdsTooltipCheckTruncatedText\" });\n /**\n * When `false`, never adds `tabindex=\"0\"` to a non-focusable host. Use when the host is already\n * inside a focusable element, to avoid a nested Tab stop.\n */\n readonly focusable = input(true, { alias: \"sdsTooltipFocusable\" });\n\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(Overlay);\n private readonly destroyRef = inject(DestroyRef);\n private readonly collisionRegistry = inject(SdsTooltipCollisionRegistryService);\n\n protected readonly describedById = signal<string | null>(null);\n /** Makes non-focusable hosts reachable by Tab; `computed()` since inputs are unset in the constructor. */\n protected readonly hostTabIndex = computed<0 | null>(() =>\n !this.focusable() || isNativelyFocusable(this.elementRef.nativeElement) ? null : 0,\n );\n private readonly isOpen = signal(false);\n\n private isHoveringTrigger = false;\n private isHoveringPanel = false;\n private isFocused = false;\n\n private openTimeoutId: ReturnType<typeof setTimeout> | undefined;\n private closeTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n private overlayRef: OverlayRef | undefined;\n private panelRef: ComponentRef<SdsTooltipPanelComponent> | undefined;\n private positionChangesCleanup: (() => void) | undefined;\n private panelPointerCleanup: (() => void) | undefined;\n private documentEscapeCleanup: (() => void) | undefined;\n private documentTouchCleanup: (() => void) | undefined;\n\n constructor() {\n // Keeps an open panel in sync with input changes.\n effect(\n () => {\n const content = this.content();\n const title = this.title();\n const showArrow = this.showArrow();\n if (this.hasNoContent()) {\n this.close();\n return;\n }\n this.panelRef?.setInput(\"content\", content);\n this.panelRef?.setInput(\"tooltipTitle\", title);\n this.panelRef?.setInput(\"showArrow\", showArrow);\n },\n { allowSignalWrites: true },\n );\n\n // With focusable=false the Tab stop belongs to a focusable ancestor (e.g. a breadcrumb link), so its\n // focus must drive the tooltip, or keyboard users never see it.\n effect((onCleanup) => {\n if (this.focusable()) {\n return;\n }\n const ancestor = this.elementRef.nativeElement.parentElement?.closest<HTMLElement>(\n FOCUSABLE_ANCESTOR_SELECTOR,\n );\n if (!ancestor) {\n return;\n }\n const handleAncestorFocus = (): void => this.handleFocus();\n const handleAncestorBlur = (): void => this.handleBlur();\n ancestor.addEventListener(\"focus\", handleAncestorFocus);\n ancestor.addEventListener(\"blur\", handleAncestorBlur);\n onCleanup(() => {\n ancestor.removeEventListener(\"focus\", handleAncestorFocus);\n ancestor.removeEventListener(\"blur\", handleAncestorBlur);\n });\n });\n\n this.destroyRef.onDestroy(() => this.close());\n }\n\n protected handlePointerEnter(): void {\n if (this.disabled()) {\n return;\n }\n this.isHoveringTrigger = true;\n this.clearCloseTimeout();\n this.scheduleOpen(this.openDelay());\n }\n\n protected handlePointerLeave(): void {\n this.isHoveringTrigger = false;\n this.clearOpenTimeout();\n this.scheduleCloseIfIdle();\n }\n\n protected handleFocus(): void {\n if (this.disabled()) {\n return;\n }\n this.isFocused = true;\n this.clearCloseTimeout();\n // Keyboard focus is deliberate, so it skips openDelay.\n this.open();\n }\n\n protected handleBlur(): void {\n this.isFocused = false;\n // Close immediately: the scheduleCloseIfIdle delay only lets the pointer reach the panel, which is\n // never focusable. Waiting would overlap the old tooltip with the next one when tabbing.\n if (!this.isHoveringTrigger && !this.isHoveringPanel) {\n this.close();\n }\n }\n\n protected handleTouchStart(): void {\n if (this.disabled()) {\n return;\n }\n this.scheduleOpen(this.openDelay());\n }\n\n private scheduleOpen(delay: number): void {\n if (this.isOpen()) {\n return;\n }\n this.clearOpenTimeout();\n if (delay <= 0) {\n this.open();\n return;\n }\n this.openTimeoutId = setTimeout(() => this.open(), delay);\n }\n\n private scheduleCloseIfIdle(): void {\n this.clearCloseTimeout();\n this.closeTimeoutId = setTimeout(() => {\n if (!this.isHoveringTrigger && !this.isHoveringPanel && !this.isFocused) {\n this.close();\n }\n }, 0);\n }\n\n private clearOpenTimeout(): void {\n clearTimeout(this.openTimeoutId);\n this.openTimeoutId = undefined;\n }\n\n private clearCloseTimeout(): void {\n clearTimeout(this.closeTimeoutId);\n this.closeTimeoutId = undefined;\n }\n\n private open(): void {\n if (this.disabled() || this.isOpen() || this.hasNoContent()) {\n return;\n }\n if (this.checkTruncatedText() && !this.contentIsTruncated) {\n return;\n }\n this.isOpen.set(true);\n\n const candidates = this.buildPositionCandidates();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions(candidates.map((candidate) => candidate.connectedPosition))\n .withViewportMargin(8);\n\n // Subscribe before attach(): the CDK emits the first position synchronously during attach().\n const positionChangesSubscription = positionStrategy.positionChanges.subscribe((change) => {\n this.handlePositionChange(candidates, change.connectionPair);\n });\n this.positionChangesCleanup = () => positionChangesSubscription.unsubscribe();\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n });\n\n this.panelRef = this.overlayRef.attach(new ComponentPortal(SdsTooltipPanelComponent));\n this.panelRef.setInput(\"content\", this.content());\n this.panelRef.setInput(\"tooltipTitle\", this.title());\n this.panelRef.setInput(\"showArrow\", this.showArrow());\n\n // `attach()` does not run change detection, so the bubble is still 0x0. Render it so the arrow\n // offset and collision checks measure the real size, then re-emit positionChanges.\n this.panelRef.changeDetectorRef.detectChanges();\n this.overlayRef.updatePosition();\n\n // A tooltip that repeats the host's aria-label is only a visual label; describing the host with\n // it too would make screen readers read the same text twice.\n const content = this.content();\n const repeatsAccessibleName =\n typeof content === \"string\" &&\n content === this.elementRef.nativeElement.getAttribute(\"aria-label\");\n if (!repeatsAccessibleName) {\n this.describedById.set(this.panelRef.instance.panelId);\n }\n\n this.applyCollisionAwarePosition(candidates, positionStrategy);\n this.collisionRegistry.register(this.overlayRef.overlayElement, () =>\n this.applyCollisionAwarePosition(candidates, positionStrategy),\n );\n\n this.attachPanelPointerListeners(this.overlayRef.overlayElement);\n this.attachDocumentEscapeListener();\n this.attachOutsideTouchListener();\n }\n\n /** Blank text has nothing to show: an empty bubble (and its `aria-describedby`) would only be noise. */\n private hasNoContent(): boolean {\n const content = this.content();\n return typeof content === \"string\" && content.trim() === \"\";\n }\n\n private close(): void {\n this.clearOpenTimeout();\n this.clearCloseTimeout();\n if (!this.isOpen()) {\n return;\n }\n this.isOpen.set(false);\n this.describedById.set(null);\n this.isHoveringTrigger = false;\n this.isHoveringPanel = false;\n this.isFocused = false;\n\n this.positionChangesCleanup?.();\n this.positionChangesCleanup = undefined;\n this.panelPointerCleanup?.();\n this.panelPointerCleanup = undefined;\n this.documentEscapeCleanup?.();\n this.documentEscapeCleanup = undefined;\n this.documentTouchCleanup?.();\n this.documentTouchCleanup = undefined;\n\n const closingPanelElement = this.overlayRef?.overlayElement;\n this.overlayRef?.dispose();\n this.overlayRef = undefined;\n this.panelRef = undefined;\n\n // Unregister after dispose so others re-measure without this bubble; a reentrant call is a no-op\n // because `overlayRef` is already cleared.\n if (closingPanelElement) {\n this.collisionRegistry.unregister(closingPanelElement);\n }\n }\n\n private buildPositionCandidates(): PositionCandidate[] {\n const requestedPosition = this.position();\n\n const top: PositionCandidate = {\n side: \"top\",\n connectedPosition: buildVerticalCandidate(\"top\"),\n };\n const bottom: PositionCandidate = {\n side: \"bottom\",\n connectedPosition: buildVerticalCandidate(\"bottom\"),\n };\n const left: PositionCandidate = {\n side: \"left\",\n connectedPosition: buildHorizontalCandidate(\"left\"),\n };\n const right: PositionCandidate = {\n side: \"right\",\n connectedPosition: buildHorizontalCandidate(\"right\"),\n };\n\n switch (requestedPosition) {\n case \"top\":\n return [top, bottom];\n case \"bottom\":\n return [bottom, top];\n case \"left\":\n return [left, right];\n case \"right\":\n return [right, left];\n case \"auto\":\n default:\n // Inline triggers avoid lateral sides, which could cover neighboring words.\n return this.isInlineTrigger() ? [top, bottom] : [top, bottom, right, left];\n }\n }\n\n /**\n * Applies and measures each candidate until one does not overlap another open tooltip; the CDK only\n * avoids viewport edges. Always starts from the preferred order, since it also reruns when another\n * tooltip closes and the preferred spot may be free again.\n */\n private applyCollisionAwarePosition(\n candidates: PositionCandidate[],\n positionStrategy: FlexibleConnectedPositionStrategy,\n ): void {\n const overlayRef = this.overlayRef;\n if (!overlayRef) {\n return;\n }\n const panelElement = overlayRef.overlayElement;\n const preferredOrder = candidates.map((candidate) => candidate.connectedPosition);\n\n const collidesInCurrentPosition = (): boolean =>\n this.collisionRegistry.overlapsAnyOtherOpenPanel(\n panelElement.getBoundingClientRect(),\n panelElement,\n );\n\n positionStrategy.withPositions(preferredOrder);\n overlayRef.updatePosition();\n if (!collidesInCurrentPosition()) {\n return;\n }\n\n for (const candidate of candidates.slice(1)) {\n positionStrategy.withPositions([\n candidate.connectedPosition,\n ...preferredOrder.filter((position) => position !== candidate.connectedPosition),\n ]);\n overlayRef.updatePosition();\n\n if (!collidesInCurrentPosition()) {\n return;\n }\n }\n\n // Every candidate collides: fall back to the preferred order.\n positionStrategy.withPositions(preferredOrder);\n overlayRef.updatePosition();\n }\n\n private isInlineTrigger(): boolean {\n return getComputedStyle(this.elementRef.nativeElement).display === \"inline\";\n }\n\n private get contentIsTruncated(): boolean {\n const element = this.elementRef.nativeElement;\n return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;\n }\n\n private handlePositionChange(\n candidates: PositionCandidate[],\n pair: ConnectionPositionPair,\n ): void {\n const matched = candidates.find(\n (candidate) =>\n candidate.connectedPosition.originX === pair.originX &&\n candidate.connectedPosition.originY === pair.originY &&\n candidate.connectedPosition.overlayX === pair.overlayX &&\n candidate.connectedPosition.overlayY === pair.overlayY,\n );\n const resolvedSide = matched?.side ?? candidates[0].side;\n this.panelRef?.setInput(\"resolvedPosition\", resolvedSide);\n this.recomputeArrowOffset(resolvedSide);\n }\n\n /** Points the arrow at the trigger even when the CDK shifts the bubble to fit the viewport. */\n private recomputeArrowOffset(resolvedSide: SdsTooltipResolvedSide): void {\n if (!this.overlayRef || !this.panelRef) {\n return;\n }\n const triggerRect = this.elementRef.nativeElement.getBoundingClientRect();\n const panelRect = this.overlayRef.overlayElement.getBoundingClientRect();\n const isVertical = resolvedSide === \"top\" || resolvedSide === \"bottom\";\n\n const triggerCenter = isVertical\n ? triggerRect.left + triggerRect.width / 2\n : triggerRect.top + triggerRect.height / 2;\n const panelStart = isVertical ? panelRect.left : panelRect.top;\n const panelSize = isVertical ? panelRect.width : panelRect.height;\n\n const minCenter = RADIUS_PX + ARROW_HALF_WIDTH_PX;\n const maxCenter = Math.max(panelSize - RADIUS_PX - ARROW_HALF_WIDTH_PX, minCenter);\n const clampedCenter = Math.min(Math.max(triggerCenter - panelStart, minCenter), maxCenter);\n\n this.panelRef.setInput(\"arrowOffsetPx\", clampedCenter - ARROW_HALF_WIDTH_PX);\n }\n\n private attachPanelPointerListeners(panelElement: HTMLElement): void {\n const handleEnter = (): void => {\n this.isHoveringPanel = true;\n this.clearCloseTimeout();\n };\n const handleLeave = (): void => {\n this.isHoveringPanel = false;\n this.scheduleCloseIfIdle();\n };\n panelElement.addEventListener(\"mouseenter\", handleEnter);\n panelElement.addEventListener(\"mouseleave\", handleLeave);\n this.panelPointerCleanup = () => {\n panelElement.removeEventListener(\"mouseenter\", handleEnter);\n panelElement.removeEventListener(\"mouseleave\", handleLeave);\n };\n }\n\n private attachDocumentEscapeListener(): void {\n const handleKeydown = (event: KeyboardEvent): void => {\n if (event.key === \"Escape\") {\n this.close();\n }\n };\n document.addEventListener(\"keydown\", handleKeydown);\n this.documentEscapeCleanup = () => document.removeEventListener(\"keydown\", handleKeydown);\n }\n\n private attachOutsideTouchListener(): void {\n const handleDocumentTouch = (event: TouchEvent): void => {\n const target = event.target as Node;\n const isInsideTrigger = this.elementRef.nativeElement.contains(target);\n const isInsidePanel = this.overlayRef?.overlayElement.contains(target) ?? false;\n if (!isInsideTrigger && !isInsidePanel) {\n this.close();\n }\n };\n document.addEventListener(\"touchstart\", handleDocumentTouch);\n this.documentTouchCleanup = () =>\n document.removeEventListener(\"touchstart\", handleDocumentTouch);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA,MAAM,UAAU,GAA2D;AACzE,IAAA,GAAG,EAAE,QAAQ;AACb,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,KAAK,EAAE,MAAM;CACd,CAAC;AAEF;AACA;AACA,MAAM,kBAAkB,GAA2C;AACjE,IAAA,GAAG,EAAE,2GAA2G;AAChH,IAAA,MAAM,EACJ,8GAA8G;AAChH,IAAA,IAAI,EAAE,4GAA4G;AAClH,IAAA,KAAK,EACH,6GAA6G;CAChH,CAAC;AAEF,IAAI,cAAc,GAAG,CAAC,CAAC;MAeV,wBAAwB,CAAA;;AAE1B,IAAA,OAAO,GAAG,CAAA,kBAAA,EAAqB,EAAE,cAAc,EAAE,CAAC;;AAGlD,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAiC,CAAC;;AAE1D,IAAA,YAAY,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;;AAEjC,IAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;;AAExB,IAAA,gBAAgB,GA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A,EAAA,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,OAAA,EAAA,eAAA,EAAA,MAAA,EAAA,cAAA,EAAA,YAAA,EAAA,oBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,cAAc,EAAE,sBAAsB;AACtC,wBAAA,cAAc,EAAE,sBAAsB;AACtC,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,QAAQ,EAAE,cAAc;AACxB,wBAAA,cAAc,EAAE,oBAAoB;AACpC,wBAAA,yBAAyB,EAAE,iBAAiB;AAC5C,wBAAA,iBAAiB,EAAE,gBAAgB;AACpC,qBAAA;AACF,iBAAA,CAAA;;;ACnFD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-scala-ng-tooltip.mjs","sources":["../../projects/scala-ng/tooltip/src/tooltip-panel/tooltip-panel.component.ts","../../projects/scala-ng/tooltip/src/tooltip-panel/tooltip-panel.component.html","../../projects/scala-ng/tooltip/src/tooltip/tooltip-collision-registry.service.ts","../../projects/scala-ng/tooltip/src/tooltip/tooltip-focus-origin.service.ts","../../projects/scala-ng/tooltip/src/tooltip-trigger/tooltip-trigger.directive.ts","../../projects/scala-ng/tooltip/seniorsistemas-scala-ng-tooltip.ts"],"sourcesContent":["import { NgClass, NgTemplateOutlet } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component, TemplateRef, computed, input } from \"@angular/core\";\nimport type { SdsTooltipResolvedSide } from \"../tooltip/tooltip.types\";\n\nconst ARROW_EDGE: Record<SdsTooltipResolvedSide, SdsTooltipResolvedSide> = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\",\n};\n\n// The 14x7 triangle overlaps the bubble by 1px (the negative margin keeps it centered), so a\n// fractional browser zoom cannot round a hairline gap between the arrow and the bubble.\nconst ARROW_EDGE_CLASSES: Record<SdsTooltipResolvedSide, string> = {\n top: \"-top-[6px] -ml-[1px] border-x-[7px] border-x-transparent border-b-[7px] border-b-color-background-inverse\",\n bottom:\n \"-bottom-[6px] -ml-[1px] border-x-[7px] border-x-transparent border-t-[7px] border-t-color-background-inverse\",\n left: \"-left-[6px] -mt-[1px] border-y-[7px] border-y-transparent border-r-[7px] border-r-color-background-inverse\",\n right:\n \"-right-[6px] -mt-[1px] border-y-[7px] border-y-transparent border-l-[7px] border-l-color-background-inverse\",\n};\n\nlet panelIdCounter = 0;\n\n@Component({\n selector: \"sds-tooltip-panel\",\n standalone: true,\n imports: [NgClass, NgTemplateOutlet],\n templateUrl: \"./tooltip-panel.component.html\",\n host: {\n role: \"tooltip\",\n \"[id]\": \"panelId\",\n \"[attr.data-position]\": \"resolvedPosition()\",\n class: \"block\",\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdsTooltipPanelComponent {\n /** Unique id, used by the directive for the trigger's `aria-describedby`. */\n readonly panelId = `sds-tooltip-panel-${++panelIdCounter}`;\n\n /** Plain text or a template to render. */\n readonly content = input.required<string | TemplateRef<unknown>>();\n /** Context for a template `content`. */\n readonly context = input<object | null>(null);\n /** Title of the rich variant; empty renders the plain variant. */\n readonly tooltipTitle = input<string>(\"\");\n /** Whether to show the arrow. */\n readonly showArrow = input(true);\n /** Side of the trigger where the CDK placed the bubble. */\n readonly resolvedPosition = input<SdsTooltipResolvedSide>(\"top\");\n /** Arrow offset in px along the bubble edge, so it points at the trigger. */\n readonly arrowOffsetPx = input(0);\n\n protected readonly contentAsString = computed(() => {\n const value = this.content();\n return typeof value === \"string\" ? value : null;\n });\n\n protected readonly contentAsTemplate = computed(() => {\n const value = this.content();\n return value instanceof TemplateRef ? value : null;\n });\n\n protected readonly contentType = computed<\"rich\" | \"plain\">(() =>\n this.tooltipTitle() ? \"rich\" : \"plain\",\n );\n\n protected readonly containerClasses = computed(() => ({\n \"max-w-[320px]\": this.contentType() === \"rich\",\n \"max-w-[288px]\": this.contentType() === \"plain\",\n }));\n\n private readonly arrowEdge = computed(() => ARROW_EDGE[this.resolvedPosition()]);\n\n protected readonly arrowClasses = computed(() => ARROW_EDGE_CLASSES[this.arrowEdge()]);\n\n /** Arrow on the top/bottom edge, so the offset runs along X. */\n private readonly arrowOnHorizontalEdge = computed(() => {\n const edge = this.arrowEdge();\n return edge === \"top\" || edge === \"bottom\";\n });\n\n protected readonly arrowLeftPx = computed(() =>\n this.arrowOnHorizontalEdge() ? this.arrowOffsetPx() : null,\n );\n\n protected readonly arrowTopPx = computed(() =>\n this.arrowOnHorizontalEdge() ? null : this.arrowOffsetPx(),\n );\n}\n","<div\n class=\"relative flex w-max flex-col items-start gap-space-0-50 rounded-radius-xlarge bg-color-background-inverse p-space-2 text-color-text-inverse\"\n [ngClass]=\"containerClasses()\"\n>\n @if (tooltipTitle(); as title) {\n <p class=\"text-font-size-2 font-font-weight-medium leading-line-height-125\">{{ title }}</p>\n }\n @if (contentAsTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"context()\"\n />\n } @else {\n @if (contentAsString(); as text) {\n <p class=\"text-font-size-2 font-font-weight-regular leading-line-height-150\">{{ text }}</p>\n }\n }\n @if (showArrow()) {\n <span\n aria-hidden=\"true\"\n class=\"absolute h-0 w-0\"\n [class]=\"arrowClasses()\"\n [attr.data-offset]=\"arrowOffsetPx()\"\n [style.left.px]=\"arrowLeftPx()\"\n [style.top.px]=\"arrowTopPx()\"\n ></span>\n }\n</div>\n","import { Injectable } from \"@angular/core\";\n\n/**\n * Tracks open tooltips so a new one can avoid overlapping them, and asks the remaining ones to\n * re-evaluate their position when one closes.\n */\n@Injectable({ providedIn: \"root\" })\nexport class SdsTooltipCollisionRegistryService {\n private readonly openPanels = new Map<HTMLElement, () => void>();\n\n register(panelElement: HTMLElement, reevaluatePosition: () => void): void {\n this.openPanels.set(panelElement, reevaluatePosition);\n }\n\n unregister(panelElement: HTMLElement): void {\n if (!this.openPanels.delete(panelElement)) {\n return;\n }\n // Iterate over a copy in case a re-evaluation mutates the map.\n for (const reevaluatePosition of Array.from(this.openPanels.values())) {\n reevaluatePosition();\n }\n }\n\n overlapsAnyOtherOpenPanel(candidateRect: DOMRect, excluding: HTMLElement): boolean {\n for (const panelElement of this.openPanels.keys()) {\n if (panelElement === excluding) {\n continue;\n }\n const rect = panelElement.getBoundingClientRect();\n const overlaps =\n candidateRect.left < rect.right &&\n candidateRect.right > rect.left &&\n candidateRect.top < rect.bottom &&\n candidateRect.bottom > rect.top;\n if (overlaps) {\n return true;\n }\n }\n return false;\n }\n}\n","import { FocusMonitor, FocusOrigin } from \"@angular/cdk/a11y\";\nimport { Injectable, inject } from \"@angular/core\";\nimport type { Observable } from \"rxjs\";\n\n/**\n * Reference-counted wrapper around `FocusMonitor`. Several tooltips can watch the same focusable\n * ancestor (e.g. a Stats Card container), and `FocusMonitor.stopMonitoring()` completes the stream\n * for every subscriber, so only the last one to release an element may stop monitoring it.\n */\n@Injectable({ providedIn: \"root\" })\nexport class SdsTooltipFocusOriginService {\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly monitorCounts = new Map<HTMLElement, number>();\n\n monitor(element: HTMLElement): Observable<FocusOrigin> {\n this.monitorCounts.set(element, (this.monitorCounts.get(element) ?? 0) + 1);\n return this.focusMonitor.monitor(element);\n }\n\n release(element: HTMLElement): void {\n const remainingCount = (this.monitorCounts.get(element) ?? 0) - 1;\n if (remainingCount > 0) {\n this.monitorCounts.set(element, remainingCount);\n return;\n }\n this.monitorCounts.delete(element);\n this.focusMonitor.stopMonitoring(element);\n }\n}\n","import {\n ConnectedPosition,\n ConnectionPositionPair,\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayRef,\n} from \"@angular/cdk/overlay\";\nimport { ComponentPortal } from \"@angular/cdk/portal\";\nimport {\n ComponentRef,\n DestroyRef,\n Directive,\n ElementRef,\n TemplateRef,\n computed,\n effect,\n inject,\n input,\n signal,\n} from \"@angular/core\";\nimport { SdsTooltipPanelComponent } from \"../tooltip-panel/tooltip-panel.component\";\nimport { SdsTooltipCollisionRegistryService } from \"../tooltip/tooltip-collision-registry.service\";\nimport { SdsTooltipFocusOriginService } from \"../tooltip/tooltip-focus-origin.service\";\nimport type { SdsTooltipPosition, SdsTooltipResolvedSide } from \"../tooltip/tooltip.types\";\n\n/** Gap between the bubble and the trigger, per Figma. */\nconst GAP_PX = 14;\n/** Half of the arrow's long side (12x6 / 6x12), used to center its offset. */\nconst ARROW_HALF_WIDTH_PX = 6;\n/** Bubble radius (`sds-radius-xlarge`); keeps the arrow off the rounded corners. */\nconst RADIUS_PX = 12;\n\ninterface PositionCandidate {\n readonly side: SdsTooltipResolvedSide;\n readonly connectedPosition: ConnectedPosition;\n}\n\nfunction buildVerticalCandidate(side: \"top\" | \"bottom\"): ConnectedPosition {\n return side === \"top\"\n ? {\n originX: \"center\",\n originY: \"top\",\n overlayX: \"center\",\n overlayY: \"bottom\",\n offsetY: -GAP_PX,\n }\n : {\n originX: \"center\",\n originY: \"bottom\",\n overlayX: \"center\",\n overlayY: \"top\",\n offsetY: GAP_PX,\n };\n}\n\nfunction buildHorizontalCandidate(side: \"left\" | \"right\"): ConnectedPosition {\n return side === \"left\"\n ? { originX: \"start\", originY: \"center\", overlayX: \"end\", overlayY: \"center\", offsetX: -GAP_PX }\n : { originX: \"end\", originY: \"center\", overlayX: \"start\", overlayY: \"center\", offsetX: GAP_PX };\n}\n\nconst NATIVELY_FOCUSABLE_TAGS = new Set([\"button\", \"input\", \"select\", \"textarea\"]);\nconst FOCUSABLE_ANCESTOR_SELECTOR = \"a, button, input, select, textarea, [tabindex]\";\n\nfunction isNativelyFocusable(element: HTMLElement): boolean {\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"a\") {\n return element.hasAttribute(\"href\");\n }\n return NATIVELY_FOCUSABLE_TAGS.has(tagName) || element.hasAttribute(\"tabindex\");\n}\n\n@Directive({\n selector: \"[sdsTooltip]\",\n standalone: true,\n host: {\n \"(mouseenter)\": \"handlePointerEnter()\",\n \"(mouseleave)\": \"handlePointerLeave()\",\n \"(pointerdown)\": \"handlePointerDown($event)\",\n \"(touchstart)\": \"handleTouchStart()\",\n \"[attr.tabindex]\": \"hostTabIndex()\",\n },\n})\nexport class SdsTooltipDirective {\n /** Tooltip content: plain text or a `TemplateRef` for custom content. */\n readonly content = input.required<string | TemplateRef<unknown>>({ alias: \"sdsTooltip\" });\n /** Context passed to a `TemplateRef` content (`$implicit` and named `let-` variables). */\n readonly context = input<object | null>(null, { alias: \"sdsTooltipContext\" });\n /** When set, enables the rich variant (title plus `content` as supporting text, up to 320px). */\n readonly title = input<string>(\"\", { alias: \"sdsTooltipTitle\" });\n /** Bubble position relative to the trigger; `\"auto\"` picks the best available side. */\n readonly position = input<SdsTooltipPosition>(\"auto\", { alias: \"sdsTooltipPosition\" });\n /** Whether to show the arrow. */\n readonly showArrow = input(true, { alias: \"sdsTooltipShowArrow\" });\n /** Delay in ms before opening on hover/touch; keyboard focus always opens immediately. */\n readonly openDelay = input(150, { alias: \"sdsTooltipOpenDelay\" });\n /** Disables the tooltip entirely. */\n readonly disabled = input(false, { alias: \"sdsTooltipDisabled\" });\n /** When `true`, only opens if the trigger's text overflows (e.g. `text-overflow: ellipsis`). */\n readonly checkTruncatedText = input(false, { alias: \"sdsTooltipCheckTruncatedText\" });\n /**\n * When `false`, never adds `tabindex=\"0\"` to a non-focusable host. Use when the host is already\n * inside a focusable element, to avoid a nested Tab stop.\n */\n readonly focusable = input(true, { alias: \"sdsTooltipFocusable\" });\n /**\n * When `false`, never sets `aria-describedby` on the host. Use when the host already exposes the\n * tooltip text to assistive technology, so it isn't read twice.\n */\n readonly describeHost = input(true, { alias: \"sdsTooltipDescribeHost\" });\n\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(Overlay);\n private readonly destroyRef = inject(DestroyRef);\n private readonly collisionRegistry = inject(SdsTooltipCollisionRegistryService);\n private readonly focusOrigin = inject(SdsTooltipFocusOriginService);\n\n /** Panel id this directive added to the host's `aria-describedby`, if any. */\n private describedById: string | null = null;\n /** Tabindex the host declares itself; the binding below would otherwise remove it (`null`). */\n private readonly ownTabIndex = this.elementRef.nativeElement.getAttribute(\"tabindex\");\n /** Makes non-focusable hosts reachable by Tab; `computed()` since inputs are unset in the constructor. */\n protected readonly hostTabIndex = computed<string | 0 | null>(() => {\n if (this.ownTabIndex !== null) {\n return this.ownTabIndex;\n }\n return !this.focusable() || isNativelyFocusable(this.elementRef.nativeElement) ? null : 0;\n });\n private readonly isOpen = signal(false);\n\n private isHoveringTrigger = false;\n private isHoveringPanel = false;\n private isFocused = false;\n\n private openTimeoutId: ReturnType<typeof setTimeout> | undefined;\n private closeTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n private overlayRef: OverlayRef | undefined;\n private panelRef: ComponentRef<SdsTooltipPanelComponent> | undefined;\n private positionChangesCleanup: (() => void) | undefined;\n private panelPointerCleanup: (() => void) | undefined;\n private documentEscapeCleanup: (() => void) | undefined;\n private documentTouchCleanup: (() => void) | undefined;\n\n constructor() {\n // Keeps an open panel in sync with input changes.\n effect(\n () => {\n const content = this.content();\n const context = this.context();\n const title = this.title();\n const showArrow = this.showArrow();\n if (this.hasNoContent()) {\n this.close();\n return;\n }\n this.panelRef?.setInput(\"content\", content);\n this.panelRef?.setInput(\"context\", context);\n this.panelRef?.setInput(\"tooltipTitle\", title);\n this.panelRef?.setInput(\"showArrow\", showArrow);\n },\n { allowSignalWrites: true },\n );\n\n // Only keyboard focus opens the tooltip: programmatic focus (e.g. a Drawer focusing its first\n // element or restoring focus to its trigger) and mouse focus were not a request to see it.\n // With focusable=false the Tab stop belongs to a focusable ancestor (e.g. a breadcrumb link).\n effect((onCleanup) => {\n const hostElement = this.elementRef.nativeElement;\n const focusTarget = this.focusable()\n ? hostElement\n : hostElement.parentElement?.closest<HTMLElement>(FOCUSABLE_ANCESTOR_SELECTOR);\n if (!focusTarget) {\n return;\n }\n const subscription = this.focusOrigin.monitor(focusTarget).subscribe((origin) => {\n if (origin === null) {\n this.handleBlur();\n } else if (origin === \"keyboard\") {\n this.handleFocus();\n }\n });\n onCleanup(() => {\n subscription.unsubscribe();\n this.focusOrigin.release(focusTarget);\n });\n });\n\n this.destroyRef.onDestroy(() => this.close());\n }\n\n protected handlePointerEnter(): void {\n if (this.disabled()) {\n return;\n }\n this.isHoveringTrigger = true;\n this.clearCloseTimeout();\n this.scheduleOpen(this.openDelay());\n }\n\n protected handlePointerLeave(): void {\n this.isHoveringTrigger = false;\n this.clearOpenTimeout();\n this.scheduleCloseIfIdle();\n }\n\n /** Touch is excluded: a tap's pointerdown would cancel the touch-triggered open. */\n protected handlePointerDown(event: PointerEvent): void {\n if (event.pointerType === \"touch\") {\n return;\n }\n this.close();\n }\n\n private handleFocus(): void {\n if (this.disabled()) {\n return;\n }\n this.isFocused = true;\n this.clearCloseTimeout();\n // Keyboard focus is deliberate, so it skips openDelay.\n this.open();\n }\n\n private handleBlur(): void {\n this.isFocused = false;\n // Close immediately: the scheduleCloseIfIdle delay only lets the pointer reach the panel, which is\n // never focusable. Waiting would overlap the old tooltip with the next one when tabbing.\n if (!this.isHoveringTrigger && !this.isHoveringPanel) {\n this.close();\n }\n }\n\n protected handleTouchStart(): void {\n if (this.disabled()) {\n return;\n }\n this.scheduleOpen(this.openDelay());\n }\n\n private scheduleOpen(delay: number): void {\n if (this.isOpen()) {\n return;\n }\n this.clearOpenTimeout();\n if (delay <= 0) {\n this.open();\n return;\n }\n this.openTimeoutId = setTimeout(() => this.open(), delay);\n }\n\n private scheduleCloseIfIdle(): void {\n this.clearCloseTimeout();\n this.closeTimeoutId = setTimeout(() => {\n if (!this.isHoveringTrigger && !this.isHoveringPanel && !this.isFocused) {\n this.close();\n }\n }, 0);\n }\n\n private clearOpenTimeout(): void {\n clearTimeout(this.openTimeoutId);\n this.openTimeoutId = undefined;\n }\n\n private clearCloseTimeout(): void {\n clearTimeout(this.closeTimeoutId);\n this.closeTimeoutId = undefined;\n }\n\n private open(): void {\n if (this.disabled() || this.isOpen() || this.hasNoContent()) {\n return;\n }\n if (this.checkTruncatedText() && !this.contentIsTruncated) {\n return;\n }\n this.isOpen.set(true);\n\n const candidates = this.buildPositionCandidates();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions(candidates.map((candidate) => candidate.connectedPosition))\n .withViewportMargin(8);\n\n // Subscribe before attach(): the CDK emits the first position synchronously during attach().\n const positionChangesSubscription = positionStrategy.positionChanges.subscribe((change) => {\n this.handlePositionChange(candidates, change.connectionPair);\n });\n this.positionChangesCleanup = () => positionChangesSubscription.unsubscribe();\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n });\n\n this.panelRef = this.overlayRef.attach(new ComponentPortal(SdsTooltipPanelComponent));\n this.panelRef.setInput(\"content\", this.content());\n this.panelRef.setInput(\"context\", this.context());\n this.panelRef.setInput(\"tooltipTitle\", this.title());\n this.panelRef.setInput(\"showArrow\", this.showArrow());\n\n // `attach()` does not run change detection, so the bubble is still 0x0. Render it so the arrow\n // offset and collision checks measure the real size, then re-emit positionChanges.\n this.panelRef.changeDetectorRef.detectChanges();\n this.overlayRef.updatePosition();\n\n // A tooltip that repeats the host's aria-label is only a visual label; describing the host with\n // it too would make screen readers read the same text twice.\n const content = this.content();\n const repeatsAccessibleName =\n typeof content === \"string\" &&\n content === this.elementRef.nativeElement.getAttribute(\"aria-label\");\n if (this.describeHost() && !repeatsAccessibleName) {\n this.addHostDescription(this.panelRef.instance.panelId);\n }\n\n this.applyCollisionAwarePosition(candidates, positionStrategy);\n this.collisionRegistry.register(this.overlayRef.overlayElement, () =>\n this.applyCollisionAwarePosition(candidates, positionStrategy),\n );\n\n this.attachPanelPointerListeners(this.overlayRef.overlayElement);\n this.attachDocumentEscapeListener();\n this.attachOutsideTouchListener();\n }\n\n /** Appends to the host's own `aria-describedby` instead of replacing it (e.g. a field's helper text). */\n private addHostDescription(panelId: string): void {\n const host = this.elementRef.nativeElement;\n const ids = (host.getAttribute(\"aria-describedby\") ?? \"\").split(\" \").filter(Boolean);\n host.setAttribute(\"aria-describedby\", [...ids, panelId].join(\" \"));\n this.describedById = panelId;\n }\n\n private removeHostDescription(): void {\n const panelId = this.describedById;\n if (!panelId) {\n return;\n }\n this.describedById = null;\n const host = this.elementRef.nativeElement;\n const remainingIds = (host.getAttribute(\"aria-describedby\") ?? \"\")\n .split(\" \")\n .filter((id) => id && id !== panelId);\n if (remainingIds.length > 0) {\n host.setAttribute(\"aria-describedby\", remainingIds.join(\" \"));\n } else {\n host.removeAttribute(\"aria-describedby\");\n }\n }\n\n /** Blank text has nothing to show: an empty bubble (and its `aria-describedby`) would only be noise. */\n private hasNoContent(): boolean {\n const content = this.content();\n return typeof content === \"string\" && content.trim() === \"\";\n }\n\n private close(): void {\n this.clearOpenTimeout();\n this.clearCloseTimeout();\n if (!this.isOpen()) {\n return;\n }\n this.isOpen.set(false);\n this.removeHostDescription();\n this.isHoveringTrigger = false;\n this.isHoveringPanel = false;\n this.isFocused = false;\n\n this.positionChangesCleanup?.();\n this.positionChangesCleanup = undefined;\n this.panelPointerCleanup?.();\n this.panelPointerCleanup = undefined;\n this.documentEscapeCleanup?.();\n this.documentEscapeCleanup = undefined;\n this.documentTouchCleanup?.();\n this.documentTouchCleanup = undefined;\n\n const closingPanelElement = this.overlayRef?.overlayElement;\n this.overlayRef?.dispose();\n this.overlayRef = undefined;\n this.panelRef = undefined;\n\n // Unregister after dispose so others re-measure without this bubble; a reentrant call is a no-op\n // because `overlayRef` is already cleared.\n if (closingPanelElement) {\n this.collisionRegistry.unregister(closingPanelElement);\n }\n }\n\n private buildPositionCandidates(): PositionCandidate[] {\n const requestedPosition = this.position();\n\n const top: PositionCandidate = {\n side: \"top\",\n connectedPosition: buildVerticalCandidate(\"top\"),\n };\n const bottom: PositionCandidate = {\n side: \"bottom\",\n connectedPosition: buildVerticalCandidate(\"bottom\"),\n };\n const left: PositionCandidate = {\n side: \"left\",\n connectedPosition: buildHorizontalCandidate(\"left\"),\n };\n const right: PositionCandidate = {\n side: \"right\",\n connectedPosition: buildHorizontalCandidate(\"right\"),\n };\n\n switch (requestedPosition) {\n case \"top\":\n return [top, bottom];\n case \"bottom\":\n return [bottom, top];\n case \"left\":\n return [left, right];\n case \"right\":\n return [right, left];\n case \"auto\":\n default:\n // Inline triggers avoid lateral sides, which could cover neighboring words.\n return this.isInlineTrigger() ? [top, bottom] : [top, bottom, right, left];\n }\n }\n\n /**\n * Applies and measures each candidate until one does not overlap another open tooltip; the CDK only\n * avoids viewport edges. Always starts from the preferred order, since it also reruns when another\n * tooltip closes and the preferred spot may be free again.\n */\n private applyCollisionAwarePosition(\n candidates: PositionCandidate[],\n positionStrategy: FlexibleConnectedPositionStrategy,\n ): void {\n const overlayRef = this.overlayRef;\n if (!overlayRef) {\n return;\n }\n const panelElement = overlayRef.overlayElement;\n const preferredOrder = candidates.map((candidate) => candidate.connectedPosition);\n\n const collidesInCurrentPosition = (): boolean =>\n this.collisionRegistry.overlapsAnyOtherOpenPanel(\n panelElement.getBoundingClientRect(),\n panelElement,\n );\n\n positionStrategy.withPositions(preferredOrder);\n overlayRef.updatePosition();\n if (!collidesInCurrentPosition()) {\n return;\n }\n\n for (const candidate of candidates.slice(1)) {\n positionStrategy.withPositions([\n candidate.connectedPosition,\n ...preferredOrder.filter((position) => position !== candidate.connectedPosition),\n ]);\n overlayRef.updatePosition();\n\n if (!collidesInCurrentPosition()) {\n return;\n }\n }\n\n // Every candidate collides: fall back to the preferred order.\n positionStrategy.withPositions(preferredOrder);\n overlayRef.updatePosition();\n }\n\n private isInlineTrigger(): boolean {\n return getComputedStyle(this.elementRef.nativeElement).display === \"inline\";\n }\n\n private get contentIsTruncated(): boolean {\n const element = this.elementRef.nativeElement;\n return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;\n }\n\n private handlePositionChange(\n candidates: PositionCandidate[],\n pair: ConnectionPositionPair,\n ): void {\n const matched = candidates.find(\n (candidate) =>\n candidate.connectedPosition.originX === pair.originX &&\n candidate.connectedPosition.originY === pair.originY &&\n candidate.connectedPosition.overlayX === pair.overlayX &&\n candidate.connectedPosition.overlayY === pair.overlayY,\n );\n const resolvedSide = matched?.side ?? candidates[0].side;\n this.panelRef?.setInput(\"resolvedPosition\", resolvedSide);\n this.recomputeArrowOffset(resolvedSide);\n }\n\n /** Points the arrow at the trigger even when the CDK shifts the bubble to fit the viewport. */\n private recomputeArrowOffset(resolvedSide: SdsTooltipResolvedSide): void {\n if (!this.overlayRef || !this.panelRef) {\n return;\n }\n const triggerRect = this.elementRef.nativeElement.getBoundingClientRect();\n const panelRect = this.overlayRef.overlayElement.getBoundingClientRect();\n const isVertical = resolvedSide === \"top\" || resolvedSide === \"bottom\";\n\n const triggerCenter = isVertical\n ? triggerRect.left + triggerRect.width / 2\n : triggerRect.top + triggerRect.height / 2;\n const panelStart = isVertical ? panelRect.left : panelRect.top;\n const panelSize = isVertical ? panelRect.width : panelRect.height;\n\n const minCenter = RADIUS_PX + ARROW_HALF_WIDTH_PX;\n const maxCenter = Math.max(panelSize - RADIUS_PX - ARROW_HALF_WIDTH_PX, minCenter);\n const clampedCenter = Math.min(Math.max(triggerCenter - panelStart, minCenter), maxCenter);\n\n this.panelRef.setInput(\"arrowOffsetPx\", clampedCenter - ARROW_HALF_WIDTH_PX);\n }\n\n private attachPanelPointerListeners(panelElement: HTMLElement): void {\n const handleEnter = (): void => {\n this.isHoveringPanel = true;\n this.clearCloseTimeout();\n };\n const handleLeave = (): void => {\n this.isHoveringPanel = false;\n this.scheduleCloseIfIdle();\n };\n panelElement.addEventListener(\"mouseenter\", handleEnter);\n panelElement.addEventListener(\"mouseleave\", handleLeave);\n this.panelPointerCleanup = () => {\n panelElement.removeEventListener(\"mouseenter\", handleEnter);\n panelElement.removeEventListener(\"mouseleave\", handleLeave);\n };\n }\n\n private attachDocumentEscapeListener(): void {\n const handleKeydown = (event: KeyboardEvent): void => {\n if (event.key === \"Escape\") {\n this.close();\n }\n };\n document.addEventListener(\"keydown\", handleKeydown);\n this.documentEscapeCleanup = () => document.removeEventListener(\"keydown\", handleKeydown);\n }\n\n private attachOutsideTouchListener(): void {\n const handleDocumentTouch = (event: TouchEvent): void => {\n const target = event.target as Node;\n const isInsideTrigger = this.elementRef.nativeElement.contains(target);\n const isInsidePanel = this.overlayRef?.overlayElement.contains(target) ?? false;\n if (!isInsideTrigger && !isInsidePanel) {\n this.close();\n }\n };\n document.addEventListener(\"touchstart\", handleDocumentTouch);\n this.documentTouchCleanup = () =>\n document.removeEventListener(\"touchstart\", handleDocumentTouch);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIA,MAAM,UAAU,GAA2D;AACzE,IAAA,GAAG,EAAE,QAAQ;AACb,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,KAAK,EAAE,MAAM;CACd,CAAC;AAEF;AACA;AACA,MAAM,kBAAkB,GAA2C;AACjE,IAAA,GAAG,EAAE,2GAA2G;AAChH,IAAA,MAAM,EACJ,8GAA8G;AAChH,IAAA,IAAI,EAAE,4GAA4G;AAClH,IAAA,KAAK,EACH,6GAA6G;CAChH,CAAC;AAEF,IAAI,cAAc,GAAG,CAAC,CAAC;MAeV,wBAAwB,CAAA;;AAE1B,IAAA,OAAO,GAAG,CAAA,kBAAA,EAAqB,EAAE,cAAc,EAAE,CAAC;;AAGlD,IAAA,OAAO,GAAG,KAAK,CAAC,QAA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