import React, { CSSProperties } from 'react'; /** * 联系信息数据 */ export interface ContactInfoData { first_name?: string; last_name?: string; phone?: { phone: string; country_calling_code: string; country_code?: string; }; email?: string; avatar?: string; } /** * 卡片布局类型 */ export declare type Direction = 'horizontal' | 'vertical'; /** * 头像尺寸类型 */ export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; /** * 头像形状类型 */ export declare type AvatarShape = 'circle' | 'square'; /** * 头像配置 */ export interface AvatarConfig { shape?: AvatarShape; borderRadius?: number; size?: AvatarSize; useTextAvatar?: boolean; children?: string; } /** * 姓名样式配置 */ export interface NameStyle { fontSize?: number | string; fontWeight?: number | string; color?: string; textDecoration?: string; } export interface StyleConfig { width?: number | string; border?: 'solid' | 'unset'; borderWidth?: number | string; borderColor?: string; borderRadius?: number | string; padding?: number | string; [key: string]: any; } /** * 文本样式配置 */ export interface TextStyle { fontSize?: number | string; fontWeight?: number | string; color?: string; } /** * ContactInfo 组件属性接口 */ export interface ContactInfoProps { dataSource?: ContactInfoData; defaultName?: string; placeholder?: string | React.ReactNode; isShowDelete?: boolean; children?: React.ReactNode; direction?: Direction; horizontalGap?: number | string; verticalGap?: number | string; isShowAvatar?: boolean; isShowPhone?: boolean; isShowEmail?: boolean; avatar?: AvatarConfig; style?: StyleConfig; nameStyle?: NameStyle; textStyle?: TextStyle; placeholderStyle?: CSSProperties; button?: { addButtonIcon?: string; editButtonIcon?: string; }; onSave?: (value: any) => void; onDelete?: () => void; onCancel?: () => void; }