ng-primitives 0.69.0 → 0.70.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/fesm2022/ng-primitives-date-picker.mjs +13 -3
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +2 -2
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +2 -2
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +3 -4
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +109 -51
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +53 -1
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/package.json +5 -5
- package/tooltip/config/tooltip-config.d.ts +5 -0
- package/tooltip/tooltip-text-content/tooltip-text-content.component.d.ts +14 -0
- package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +11 -3
- package/utils/helpers/validators.d.ts +39 -0
- package/utils/index.d.ts +1 -0
|
@@ -3,6 +3,7 @@ import { OnDestroy, Signal } from '@angular/core';
|
|
|
3
3
|
import { Placement } from '@floating-ui/dom';
|
|
4
4
|
import { NgpOverlay, NgpOverlayContent } from 'ng-primitives/portal';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
type TooltipInput<T> = NgpOverlayContent<T> | string | null | undefined;
|
|
6
7
|
/**
|
|
7
8
|
* Apply the `ngpTooltipTrigger` directive to an element that triggers the tooltip to show.
|
|
8
9
|
*/
|
|
@@ -26,7 +27,7 @@ export declare class NgpTooltipTrigger<T = null> implements OnDestroy {
|
|
|
26
27
|
/**
|
|
27
28
|
* Access the tooltip template ref.
|
|
28
29
|
*/
|
|
29
|
-
readonly tooltip: import("@angular/core").
|
|
30
|
+
readonly tooltip: import("@angular/core").InputSignalWithTransform<string | NgpOverlayContent<T> | null, TooltipInput<T>>;
|
|
30
31
|
/**
|
|
31
32
|
* Define if the trigger should be disabled.
|
|
32
33
|
* @default false
|
|
@@ -71,11 +72,17 @@ export declare class NgpTooltipTrigger<T = null> implements OnDestroy {
|
|
|
71
72
|
* Provide context to the tooltip. This can be used to pass data to the tooltip content.
|
|
72
73
|
*/
|
|
73
74
|
readonly context: import("@angular/core").InputSignal<T | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* Define whether to use the text content of the trigger element as the tooltip content.
|
|
77
|
+
* When enabled, the tooltip will display the text content of the trigger element.
|
|
78
|
+
* @default true
|
|
79
|
+
*/
|
|
80
|
+
readonly useTextContent: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
|
74
81
|
/**
|
|
75
82
|
* The overlay that manages the tooltip
|
|
76
83
|
* @internal
|
|
77
84
|
*/
|
|
78
|
-
readonly overlay: import("@angular/core").WritableSignal<NgpOverlay<T> | null>;
|
|
85
|
+
readonly overlay: import("@angular/core").WritableSignal<NgpOverlay<string | T> | null>;
|
|
79
86
|
/**
|
|
80
87
|
* The unique id of the tooltip.
|
|
81
88
|
*/
|
|
@@ -113,5 +120,6 @@ export declare class NgpTooltipTrigger<T = null> implements OnDestroy {
|
|
|
113
120
|
*/
|
|
114
121
|
setTooltipId(id: string): void;
|
|
115
122
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgpTooltipTrigger<any>, never>;
|
|
116
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpTooltipTrigger<any>, "[ngpTooltipTrigger]", ["ngpTooltipTrigger"], { "tooltip": { "alias": "ngpTooltipTrigger"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpTooltipTriggerDisabled"; "required": false; "isSignal": true; }; "placement": { "alias": "ngpTooltipTriggerPlacement"; "required": false; "isSignal": true; }; "offset": { "alias": "ngpTooltipTriggerOffset"; "required": false; "isSignal": true; }; "showDelay": { "alias": "ngpTooltipTriggerShowDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "ngpTooltipTriggerHideDelay"; "required": false; "isSignal": true; }; "flip": { "alias": "ngpTooltipTriggerFlip"; "required": false; "isSignal": true; }; "container": { "alias": "ngpTooltipTriggerContainer"; "required": false; "isSignal": true; }; "showOnOverflow": { "alias": "ngpTooltipTriggerShowOnOverflow"; "required": false; "isSignal": true; }; "context": { "alias": "ngpTooltipTriggerContext"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
123
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpTooltipTrigger<any>, "[ngpTooltipTrigger]", ["ngpTooltipTrigger"], { "tooltip": { "alias": "ngpTooltipTrigger"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpTooltipTriggerDisabled"; "required": false; "isSignal": true; }; "placement": { "alias": "ngpTooltipTriggerPlacement"; "required": false; "isSignal": true; }; "offset": { "alias": "ngpTooltipTriggerOffset"; "required": false; "isSignal": true; }; "showDelay": { "alias": "ngpTooltipTriggerShowDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "ngpTooltipTriggerHideDelay"; "required": false; "isSignal": true; }; "flip": { "alias": "ngpTooltipTriggerFlip"; "required": false; "isSignal": true; }; "container": { "alias": "ngpTooltipTriggerContainer"; "required": false; "isSignal": true; }; "showOnOverflow": { "alias": "ngpTooltipTriggerShowOnOverflow"; "required": false; "isSignal": true; }; "context": { "alias": "ngpTooltipTriggerContext"; "required": false; "isSignal": true; }; "useTextContent": { "alias": "ngpTooltipTriggerUseTextContent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
117
124
|
}
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type validation utilities
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Checks if a value is a string
|
|
6
|
+
* @param value - The value to check
|
|
7
|
+
* @returns true if the value is a string, false otherwise
|
|
8
|
+
*/
|
|
9
|
+
export declare function isString(value: unknown): value is string;
|
|
10
|
+
/**
|
|
11
|
+
* Checks if a value is a number
|
|
12
|
+
* @param value - The value to check
|
|
13
|
+
* @returns true if the value is a number, false otherwise
|
|
14
|
+
*/
|
|
15
|
+
export declare function isNumber(value: unknown): value is number;
|
|
16
|
+
/**
|
|
17
|
+
* Checks if a value is a boolean
|
|
18
|
+
* @param value - The value to check
|
|
19
|
+
* @returns true if the value is a boolean, false otherwise
|
|
20
|
+
*/
|
|
21
|
+
export declare function isBoolean(value: unknown): value is boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Checks if a value is a function
|
|
24
|
+
* @param value - The value to check
|
|
25
|
+
* @returns true if the value is a function, false otherwise
|
|
26
|
+
*/
|
|
27
|
+
export declare function isFunction(value: unknown): value is CallableFunction;
|
|
28
|
+
/**
|
|
29
|
+
* Checks if a value is a plain object (but not null or array)
|
|
30
|
+
* @param value - The value to check
|
|
31
|
+
* @returns true if the value is a plain object, false otherwise
|
|
32
|
+
*/
|
|
33
|
+
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* Checks if a value is undefined
|
|
36
|
+
* @param value - The value to check
|
|
37
|
+
* @returns true if the value is undefined, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
export declare function isUndefined(value: unknown): value is undefined;
|
package/utils/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { ChangeFn, TouchedFn } from './forms/types';
|
|
|
4
4
|
export { booleanAttributeBinding } from './helpers/attributes';
|
|
5
5
|
export { injectDisposables } from './helpers/disposables';
|
|
6
6
|
export { uniqueId } from './helpers/unique-id';
|
|
7
|
+
export { isString, isNumber, isBoolean, isFunction, isObject, isUndefined, } from './helpers/validators';
|
|
7
8
|
export { safeTakeUntilDestroyed } from './observables/take-until-destroyed';
|
|
8
9
|
export { onBooleanChange, onChange } from './signals';
|
|
9
10
|
export { injectDimensions } from './ui/dimensions';
|