import { ReactNode, SVGProps } from 'react'; import { ButtonProps, CheckboxProps, FormItemProps, InputProps, DropDownProps, InputRef } from 'antd'; import { Rule } from 'antd/es/form'; export type WeightType = 'regular' | 'medium' | 'semibold' | 'bold'; export type SizeType = 'extra_small' | 'small' | 'medium' | 'large' | 'extra_large'; export type ButtonVariantType = 'solid' | 'outlined' | 'ghost' | 'dashed'; export type TextPropType = { category?: 'display' | 'heading' | 'title' | 'label' | 'button' | 'body'; size?: SizeType; weight?: WeightType; color?: string; value?: string | number | ReactNode; style?: React.CSSProperties; link?: string; isLink?: boolean; index?: number; className?: string; }; export type InputPropType = { name?: string | number | (string | number)[]; title?: string | ReactNode; optionalTitle?: string; disabled?: boolean; readOnly?: boolean; placeHolder?: string | undefined; antdInputProps?: InputProps; andtFormItemProps?: FormItemProps; required?: boolean; requiredErrorMessage?: string | undefined; rules?: Rule[]; onKeyDown?: (e: any) => void; onInput?: (e: any) => void; maxLength?: number | undefined; inputType?: string; value?: string | number | readonly []; inputRef?: React.Ref; suffixDetails?: { label: ReactNode | string | number; onSuffixClick?: React.MouseEventHandler; }; allowMinus?: boolean; showNumberArrow?: boolean; showErrorMessage?: boolean; tooltipContent?: string; alignLabel?: 'left' | 'right'; decimalLength?: number; }; export type CheckboxPropType = { antdCheckboxProps?: CheckboxProps; label?: string | number | ReactNode; isChecked: boolean; setIsChecked?: React.Dispatch>; handleCheckboxChange: (checked: boolean) => void; disabled?: boolean; }; export type ButtonPropType = { label?: string; icon?: React.FC; type?: ButtonVariantType; iconPosition?: 'left' | 'right'; size?: SizeType; block?: boolean; antdButtonProps?: ButtonProps; backgroundColor?: string | undefined; color?: string | undefined; style?: React.CSSProperties | undefined; borderColor?: string | undefined; iconColor?: string | undefined; variant?: 'button' | 'dropdown'; children?: React.ReactNode; dropDownProps?: DropDownProps; }; export type ISelectedNode = Record; export interface INodeData { id?: string | number; parentId?: string | number | null; hasParent?: boolean | null; name?: string; } export interface INodeDataList { level: 1; nodesList: { parentId: number | null; data: { id: number; name: string; children: number; parentId: number | null; }[]; }[]; } export interface SVGPropType extends SVGProps { size?: 'small' | 'medium' | 'large'; weight?: 'thin' | 'slim' | 'thick'; color?: string; }