import { type VariantProps } from 'class-variance-authority'; import React from 'react'; import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'; declare const headingVariants: (props?: ({ size?: 1 | "none" | 2 | 3 | 4 | 5 | null | undefined; weight?: "bold" | "medium" | "semibold" | "extraBold" | "black" | null | undefined; align?: "left" | "right" | "center" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; interface HeadingProps extends React.ComponentPropsWithoutRef<'h1'>, VariantProps { as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; asChild?: boolean; color?: string; html?: string | SerializedEditorState; } /** * Heading - 标题组件 * * @description 用于显示各级标题的组件,支持响应式尺寸、字重、对齐方式和自定义颜色 * * @param {object} props - 组件属性 * @param {1|2|3|4|5|"none"} props.size - 标题尺寸(响应式) * - `1`: 14px → 16px (四级标题,适用于卡片标题、辅助标题) * - `2`: 20px → 24px (三级标题,适用于章节标题) * - `3`: 24px → 32px (二级标题,适用于页面子标题) * - `4`: 32px → 40px → 48px (一级标题,适用于页面主标题) * - `5`: 40px → 56px → 64px (特大标题,适用于首屏标题、横幅标题) * - `none`: 无预设大小,继承父级样式 * @param {"medium"|"semibold"|"bold"|"extraBold"|"black"} props.weight - 字重,默认 bold * @param {"left"|"center"|"right"} props.align - 文字对齐方式 * @param {"h1"|"h2"|"h3"|"h4"|"h5"|"h6"} props.as - 渲染的标题标签,默认 h2 * @param {boolean} props.asChild - 是否作为子组件渲染 * @param {string} props.color - 自定义文字颜色 * @param {string|SerializedEditorState} props.html - HTML 内容或富文本编辑器状态 * * @example * ```tsx * // 基础用法 - 页面主标题 * 欢迎使用我们的产品 * * // 章节标题 * 功能特性 * * // 卡片标题 * 产品介绍 * * // 居中对齐的大标题 * 品牌故事 * * // 自定义颜色和字重 * * 特别公告 * * * // 使用 HTML 内容 * * ``` * * @note 尺寸会根据屏幕断点自动调整: * - 移动端:基础尺寸 * - 桌面端 (≥1440px):较大尺寸 * - 大屏端 (≥1920px):最大尺寸 */ declare const Heading: React.ForwardRefExoticComponent>; export { Heading }; export type { HeadingProps };