/** * Copyright 2024, SumUp Ltd. * 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 { type ComponentType, type FocusEventHandler, type HTMLAttributes, type MouseEventHandler } from 'react'; import { type Placement } from '@floating-ui/react-dom'; export interface TooltipReferenceProps { 'aria-describedby'?: string; 'aria-labelledby'?: string; 'className': string; 'onFocus': FocusEventHandler; 'onBlur': FocusEventHandler; 'onMouseEnter': MouseEventHandler; 'onMouseLeave': MouseEventHandler; } export interface TooltipProps extends HTMLAttributes { /** * A clear and concise label for the reference component. * Interactive content such as buttons or links and rich content such as * bold text or headings are not supported. */ label: string; /** * The focusable element that acts as the reference for the tooltip. */ component: ComponentType; /** * Whether the tooltip is the [main label](https://w3c.github.io/accname/#dfn-accessible-name) * or a [supplemental description](https://w3c.github.io/accname/#dfn-accessible-description) * of the reference component. */ type: 'label' | 'description'; /** * Where to display the tooltip relative to the reference component. The * tooltip will automatically move if there isn't enough space available. * Default: 'top'. */ placement?: Placement; } export declare const Tooltip: import("react").ForwardRefExoticComponent>;