Files
NapCatQQ/.pnpm-store/v3/files/33/2b3225ad8020ca5137ad5e3f3e7552cb1ba8585ed34a082d34696688d70f89d29a49d068f11800f1fc068d1600c0144678eb66b940e41a03676cf90497a334
T
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

82 lines
2.5 KiB
Plaintext

/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {AriaLabelingProps, DOMProps, StyleProps} from '@react-types/shared';
import {OverlayTriggerProps, Placement, PositionProps} from '@react-types/overlays';
import {ReactElement, ReactNode} from 'react';
export interface TooltipTriggerProps extends OverlayTriggerProps {
/**
* Whether the tooltip should be disabled, independent from the trigger.
*/
isDisabled?: boolean,
/**
* The delay time for the tooltip to show up. [See guidelines](https://spectrum.adobe.com/page/tooltip/#Immediate-or-delayed-appearance).
* @default 1500
*/
delay?: number,
/**
* The delay time for the tooltip to close. [See guidelines](https://spectrum.adobe.com/page/tooltip/#Warmup-and-cooldown).
* @default 500
*/
closeDelay?: number,
/**
* By default, opens for both focus and hover. Can be made to open only for focus.
*/
trigger?: 'focus'
}
export interface SpectrumTooltipTriggerProps extends Omit<TooltipTriggerProps, 'closeDelay'>, PositionProps {
children: [ReactElement, ReactElement],
/**
* The additional offset applied along the main axis between the element and its
* anchor element.
* @default 7
*/
offset?: number,
/**
* The placement of the tooltip with respect to the trigger.
* @default 'top'
*/
placement?: Placement
}
export interface TooltipProps {
isOpen?: boolean
}
export interface AriaTooltipProps extends TooltipProps, DOMProps, AriaLabelingProps {}
export interface SpectrumTooltipProps extends AriaTooltipProps, StyleProps {
/**
* The [visual style](https://spectrum.adobe.com/page/tooltip/#Semantic-variants) of the Tooltip.
*/
variant?: 'neutral' | 'positive' | 'negative' | 'info',
/**
* The placement of the element with respect to its anchor element.
* @default 'top'
*/
placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom',
/**
* Whether the element is rendered.
*/
showIcon?: boolean,
children: ReactNode
}