carbon-components-angular
Version:
Next generation components
73 lines (69 loc) • 2.11 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | tooltip.interface.d.ts
*
* Copyright 2014, 2025 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { TemplateRef } from "@angular/core";
export declare type TooltipAlignments = "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-bottom" | "left-top" | "right" | "right-bottom" | "right-top";
/**
* Tooltip attributes
*/
export interface TooltipConfig {
/**
* The string or template content to be exposed by the tooltip.
*/
description: string | TemplateRef<any>;
/**
* Specify the tooltip alignement
*/
align?: TooltipAlignments;
/**
* Set to `false` to hide caret
*/
caret?: boolean;
/**
* Set to `false` to hide shadow
*/
dropShadow?: boolean;
/**
* Set to `true` to enable high contrast
*/
highContrast?: boolean;
/**
* Set to `true` to have the popover open by default
* Tooltip will not remain open if user interacts with it (mouseenter & leave) or clicks anywhere in window
*/
isOpen?: boolean;
/**
* Set delay before tooltip is shown
*/
enterDelayMs?: number;
/**
* Set delay when tooltip disappears
*/
leaveDelayMs?: number;
}
/**
* Default tooltip configuration for components to populate missing interface attributes
*/
export declare const DEFAULT_TOOLTIP_CONFIG: {
align: TooltipAlignments;
caret: boolean;
dropShadow: boolean;
highContrast: boolean;
isOpen: boolean;
enterDelayMs: number;
leaveDelayMs: number;
};