import React, { CSSProperties } from "react"; //#region src/plus/contactInfo/types.d.ts /** * 联系信息数据 */ interface ContactInfoData { first_name?: string; last_name?: string; phone?: { phone: string; country_calling_code: string; country_code?: string; }; email?: string; avatar?: string; } /** * 卡片布局类型 */ type Direction = 'horizontal' | 'vertical'; /** * 头像尺寸类型 */ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; /** * 头像形状类型 */ type AvatarShape = 'circle' | 'square'; /** * 头像配置 */ interface AvatarConfig { shape?: AvatarShape; borderRadius?: number; size?: AvatarSize; useTextAvatar?: boolean; children?: string; } /** * 姓名样式配置 */ interface NameStyle { fontSize?: number | string; fontWeight?: number | string; color?: string; textDecoration?: string; } interface StyleConfig { width?: number | string; border?: 'solid' | 'unset'; borderWidth?: number | string; borderColor?: string; borderRadius?: number | string; padding?: number | string; [key: string]: any; } /** * 文本样式配置 */ interface TextStyle { fontSize?: number | string; fontWeight?: number | string; color?: string; } /** * ContactInfo 组件属性接口 */ 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; } //#endregion export { ContactInfoProps };