UNPKG

react-saas-tooltips

Version:

A comprehensive React tooltip library for SaaS applications with intelligent, animated UI guidance

64 lines (59 loc) 2.33 kB
import React$1 from 'react'; declare enum TooltipType { Custom = "custom-tooltip", EditSignature = "edit-signature", AddAttachment = "add-attachment", AddButton = "add-button", Notes = "notes", Tickets = "tickets", CustomFieldsV2 = "custom-fields-v2", AddTag = "add-tag", PollButton = "poll-button-messages", HideScheduledMessages = "hide-scheduled-messages", ShowFullDate = "show-full-date", ShowChannelName = "show-channel-name", UnarchiveChat = "unarchive-chat", RemoveData = "remove-data", GeoLocation = "geo-location", AutoTranscribe = "auto-transcribe", ChatActionSync = "chat-action-sync", ChatHistorySync = "chat-history-sync", SearchFunction = "search-function", Incognito = "incognito-mode" } type TooltipPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end"; type TooltipPosition = TooltipPlacement | "center"; interface EnhancedTooltipManagerProps { tooltipType?: TooltipType; open: boolean; onClose: () => void; mode?: "modal" | "popover"; anchorRef?: React.RefObject<HTMLElement>; placement?: TooltipPosition; tooltipProps?: Record<string, any>; } interface TooltipIconButtonProps { tooltipType: TooltipType; mode?: "modal" | "popover"; placement?: TooltipPosition; className?: string; size?: "small" | "medium" | "large"; variant?: "default" | "solid" | "outline"; iconOnly?: boolean; label?: string; tooltipProps?: Record<string, any>; } /** * An all-in-one component that renders both a tooltip trigger button and manages the tooltip display */ declare const TooltipIconButton: React$1.FC<TooltipIconButtonProps>; /** * EnhancedTooltipManager - A component that manages and displays tooltips using enum-based tooltipType * * This component handles two modes: * 1. Modal: Centered, full-screen overlay with the tooltip in the middle * 2. Popover: Positioned relative to an anchor element */ declare const EnhancedTooltipManager: React$1.FC<EnhancedTooltipManagerProps>; export { EnhancedTooltipManager, TooltipIconButton, TooltipType, EnhancedTooltipManager as default }; export type { EnhancedTooltipManagerProps, TooltipPlacement, TooltipPosition };