import type { Theme } from '../../types/props.js'; export interface Feature { /** * 特性标题 */ title: string; } /** * 倒计时配置 */ export interface CountdownConfig { /** * 新 CMS 字段,ISO 8601 带时区(如 '2026-03-28T16:00:00.000Z')。优先于 targetDate 使用。 */ targetDateTime?: string; /** * 时区标识符(如 'Asia/Shanghai'),与 targetDateTime 配合使用 */ targetDateTime_tz?: string; /** * 倒计时目标时间(ISO 8601 格式或任何 dayjs 支持的格式) * @deprecated 请使用 targetDateTime 替代。仅用于兼容旧 CMS 数据。 */ targetDate?: string; /** * 是否显示天数 * @default true */ showDays?: boolean; /** * 是否显示小时 * @default true */ showHours?: boolean; /** * 是否显示分钟 * @default true */ showMinutes?: boolean; /** * 是否显示秒数 * @default true */ showSeconds?: boolean; /** * 自定义标签文本 */ labels?: { days?: string; hours?: string; minutes?: string; seconds?: string; }; } export interface TitlePropsBase { data: { /** * 主标题 */ title?: string; caption?: string; /** * 副标题 */ subtitle?: string; /** * 倒计时配置 */ countdown?: CountdownConfig; /** * 是否显示倒计时 * @default false */ showCountdown?: boolean; /** * 特性列表,最多支持3个 */ features?: Feature[]; /** * 主题色 */ theme?: Theme; /** * 扩展数据 */ extensions?: any; /** * 对齐方式 * @default 'left' */ align?: 'left' | 'center' | 'right'; }; weight?: 'medium' | 'semibold' | 'bold' | 'extraBold' | 'black'; /** * 自定义类名 */ className?: string; as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; } /** @deprecated Use TitlePropsBase and extend with React.HTMLAttributes */ export type TitleProps = TitlePropsBase;