UNPKG

@cn-ui/core

Version:

The @cn-ui/core is a collection of UI components and utilities for building modern web applications with SolidJS.

33 lines (32 loc) 1.12 kB
import { type Atom, type JSXSlot } from "@cn-ui/reactive"; import type { Placement } from "@popperjs/core"; import { usePopper } from "./Popper/usePopper"; import "./index.css"; export interface FloatingComponentProp { zIndex?: number; lazy?: boolean; onMounted?: () => void; } export interface PopoverExpose extends ReturnType<typeof usePopper> { } export interface PopoverProps extends FloatingComponentProp { content: JSXSlot<{ model: Atom<boolean>; }>; /** * - click: 点击触发 * - hover: 鼠标移入触发 * - focus: 聚焦触发 * - none: 完全受控模式 */ trigger?: "click" | "hover" | "focus" | "none" | "contextmenu"; expose?: (expose: PopoverExpose) => void; placement?: Placement; disabled?: boolean; sameWidth?: boolean; clickOutsideClose?: boolean; /** 支持通过 CSS 选择器直接虚拟链接对象, */ popoverTarget?: string | Element; fixed?: boolean; } export declare const Popover: import("solid-js").Component<import("@cn-ui/reactive").OriginComponentOutputType<PopoverProps, HTMLElement, boolean>>;