@spartan-ng/brain 0.0.1-alpha.719 → 1.0.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 +3 -3
- package/fesm2022/spartan-ng-brain-accordion.mjs +7 -58
- package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs +1 -2
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-autocomplete.mjs +3 -1
- package/fesm2022/spartan-ng-brain-autocomplete.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs +8 -56
- package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-combobox.mjs +22 -6
- package/fesm2022/spartan-ng-brain-combobox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-core.mjs +89 -16
- package/fesm2022/spartan-ng-brain-core.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-dialog.mjs +8 -7
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-drawer.mjs +8 -8
- package/fesm2022/spartan-ng-brain-drawer.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-field.mjs +7 -2
- package/fesm2022/spartan-ng-brain-field.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs +124 -34
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-overlay.mjs +27 -14
- package/fesm2022/spartan-ng-brain-overlay.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +3 -1
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tooltip.mjs +97 -14
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/package.json +6 -2
- package/types/spartan-ng-brain-accordion.d.ts +4 -22
- package/types/spartan-ng-brain-autocomplete.d.ts +1 -0
- package/types/spartan-ng-brain-collapsible.d.ts +5 -22
- package/types/spartan-ng-brain-combobox.d.ts +11 -2
- package/types/spartan-ng-brain-core.d.ts +40 -9
- package/types/spartan-ng-brain-dialog.d.ts +1 -3
- package/types/spartan-ng-brain-drawer.d.ts +3 -3
- package/types/spartan-ng-brain-navigation-menu.d.ts +9 -2
- package/types/spartan-ng-brain-overlay.d.ts +4 -5
- package/types/spartan-ng-brain-select.d.ts +1 -0
- package/types/spartan-ng-brain-tooltip.d.ts +38 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, ValueProvider } from '@angular/core';
|
|
2
|
+
import { TemplateRef, Provider, ValueProvider } from '@angular/core';
|
|
3
3
|
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
5
5
|
|
|
@@ -21,6 +21,7 @@ declare class BrnTooltip {
|
|
|
21
21
|
private readonly _overlayPositionBuilder;
|
|
22
22
|
private readonly _renderer;
|
|
23
23
|
private readonly _dir;
|
|
24
|
+
private readonly _group;
|
|
24
25
|
private _tooltipHovered;
|
|
25
26
|
private _listenersRefs;
|
|
26
27
|
private _delaySubject;
|
|
@@ -28,6 +29,10 @@ declare class BrnTooltip {
|
|
|
28
29
|
private _overlayRef;
|
|
29
30
|
private _ariaEffectRef;
|
|
30
31
|
private _positionChangeSub;
|
|
32
|
+
/** Bumped on every close/show so a pending exit-animation teardown can detect it was superseded. */
|
|
33
|
+
private _closeGeneration;
|
|
34
|
+
/** The position currently applied to the content - the CDK-resolved one after a flip, not the raw input. */
|
|
35
|
+
private _activePosition;
|
|
31
36
|
readonly tooltipDisabled: _angular_core.InputSignalWithTransform<boolean, boolean>;
|
|
32
37
|
readonly mutableTooltipDisabled: _angular_core.WritableSignal<boolean>;
|
|
33
38
|
readonly position: _angular_core.InputSignal<BrnTooltipPosition>;
|
|
@@ -45,12 +50,24 @@ declare class BrnTooltip {
|
|
|
45
50
|
private _getAdjustedPositionFor;
|
|
46
51
|
private _initTriggers;
|
|
47
52
|
private _initHoverListeners;
|
|
53
|
+
/** Snapshot the group skip decision once, so the delay and the instant-open state agree even if a
|
|
54
|
+
* sibling flips the window during the show delay. */
|
|
55
|
+
private _requestShow;
|
|
48
56
|
private _initScrollListener;
|
|
49
57
|
private _cleanupTriggerEvents;
|
|
50
58
|
private delay;
|
|
51
59
|
private _setupDelayMechanism;
|
|
52
60
|
private _show;
|
|
61
|
+
/** Apply text + position (and the position-derived classes) to the content, recording the position as
|
|
62
|
+
* active. Pass `text = null` for a position-only update that keeps the content's existing text. */
|
|
63
|
+
private _applyContentProps;
|
|
53
64
|
private _hide;
|
|
65
|
+
/**
|
|
66
|
+
* Keep the content mounted until its `data-[state=closed]` exit animation finishes, then tear it
|
|
67
|
+
* down. A re-show (revive) bumps `_closeGeneration`, which cancels the pending detach.
|
|
68
|
+
*/
|
|
69
|
+
private _scheduleDetach;
|
|
70
|
+
private _detach;
|
|
54
71
|
private _clearAriaDescribedBy;
|
|
55
72
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnTooltip, never>;
|
|
56
73
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BrnTooltip, "[brnTooltip]", ["brnTooltip"], { "tooltipDisabled": { "alias": "tooltipDisabled"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "brnTooltip": { "alias": "brnTooltip"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; }, { "show": "show"; "hide": "hide"; }, never, never, true, never>;
|
|
@@ -58,7 +75,7 @@ declare class BrnTooltip {
|
|
|
58
75
|
|
|
59
76
|
declare class BrnTooltipContent {
|
|
60
77
|
readonly id: _angular_core.InputSignal<string>;
|
|
61
|
-
readonly state: _angular_core.WritableSignal<"closed" | "
|
|
78
|
+
readonly state: _angular_core.WritableSignal<"closed" | "open" | "instant-open">;
|
|
62
79
|
protected readonly _tooltipClass: _angular_core.WritableSignal<ClassValue>;
|
|
63
80
|
protected readonly _arrowClass: _angular_core.WritableSignal<ClassValue>;
|
|
64
81
|
protected readonly _svgClass: _angular_core.WritableSignal<ClassValue>;
|
|
@@ -69,6 +86,23 @@ declare class BrnTooltipContent {
|
|
|
69
86
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BrnTooltipContent, "ng-component", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
70
87
|
}
|
|
71
88
|
|
|
89
|
+
interface BrnTooltipGroupOptions {
|
|
90
|
+
/** Time (ms) after the last tooltip closes during which others open instantly. `0` disables it. */
|
|
91
|
+
skipDelayDuration: number;
|
|
92
|
+
}
|
|
93
|
+
/** Skip-delay coordinator for grouped tooltips; provide via `provideBrnTooltipGroup` on the wrapper. */
|
|
94
|
+
declare class BrnTooltipGroup {
|
|
95
|
+
private readonly _options;
|
|
96
|
+
private readonly _skipDelay;
|
|
97
|
+
/** Whether the next tooltip waits for its show delay, or opens instantly within the skip window. */
|
|
98
|
+
readonly isOpenDelayed: _angular_core.Signal<boolean>;
|
|
99
|
+
onOpen(): void;
|
|
100
|
+
onClose(): void;
|
|
101
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BrnTooltipGroup, never>;
|
|
102
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BrnTooltipGroup>;
|
|
103
|
+
}
|
|
104
|
+
declare function provideBrnTooltipGroup(options?: Partial<BrnTooltipGroupOptions>): Provider[];
|
|
105
|
+
|
|
72
106
|
interface BrnTooltipOptions {
|
|
73
107
|
/** Default delay when the tooltip is shown. */
|
|
74
108
|
showDelay: number;
|
|
@@ -89,5 +123,5 @@ declare function injectBrnTooltipDefaultOptions(): BrnTooltipOptions;
|
|
|
89
123
|
|
|
90
124
|
declare const BrnTooltipImports: readonly [typeof BrnTooltip, typeof BrnTooltipContent];
|
|
91
125
|
|
|
92
|
-
export { BRN_TOOLTIP_FALLBACK_POSITIONS, BrnTooltip, BrnTooltipContent, BrnTooltipImports, defaultOptions, injectBrnTooltipDefaultOptions, provideBrnTooltipDefaultOptions, resolveTooltipPosition };
|
|
93
|
-
export type { BrnTooltipOptions, BrnTooltipPosition, BrnTooltipType };
|
|
126
|
+
export { BRN_TOOLTIP_FALLBACK_POSITIONS, BrnTooltip, BrnTooltipContent, BrnTooltipGroup, BrnTooltipImports, defaultOptions, injectBrnTooltipDefaultOptions, provideBrnTooltipDefaultOptions, provideBrnTooltipGroup, resolveTooltipPosition };
|
|
127
|
+
export type { BrnTooltipGroupOptions, BrnTooltipOptions, BrnTooltipPosition, BrnTooltipType };
|