import React from 'react'; import { FontStyleTypeModel } from '../../Themes/theme_types'; import { Size } from '../../types'; type labelPosition = 'internal' | 'external'; type availableSize = Size.s | Size.m | Size.l; interface StateContextTypes { dayTime: 'light' | 'dark'; isInverse: boolean; isDisabled: boolean; isError: boolean; isRequired: boolean; size: availableSize; } interface TextAreaTypes { value?: string; label?: string; ariaLabel?: string; labelPosition?: labelPosition; description?: string; size?: availableSize; placeholder?: string; minHeight?: number; maxLength?: number; isLengthLimited?: boolean; maxLengthPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'; isDisabled?: boolean; readOnly?: boolean; isInverse?: boolean; isRequired?: boolean; className?: string; isError?: boolean; errorMessage?: string; errorState?: 'default' | 'focus out'; onValueChange?: (val: string) => void; onBlur?: (e: React.FocusEvent) => void; } interface ContainerProps { state: StateContextTypes; } interface WrapperProps { styles: ModelView; state: StateContextTypes; } interface LabelProps { labelPosition: labelPosition; styles: ModelView; state: StateContextTypes; } interface DescriptionProps { styles: ModelView; state: StateContextTypes; } interface CounterProps { alert: boolean; counterPosition: string; styles: ModelView; state: StateContextTypes; } interface TextareaProps { labelPosition: labelPosition; minHeight?: number; focused: boolean; styles: ModelView; state: StateContextTypes; } interface styleParams { placeholderColor?: string; fontColor?: string; errorColor?: string; borderColor?: string; backgroundColor?: string; } interface textareaParams { default: styleParams; hover: styleParams; active: styleParams; readOnly: styleParams; error: styleParams; errorHover: styleParams; } interface sizeParams { paddingTop: number; paddingLeft: number; paddingRight: number; paddingBottom: number; } interface sizeTypes { info?: sizeParams; textarea: sizeParams; font: FontStyleTypeModel; } interface dayTheme { description: styleParams; label: styleParams; limitSize: styleParams; errorMessage: styleParams; textarea: textareaParams; } interface ModelView { style: { light: dayTheme; dark: dayTheme; }; size: { label: { font: FontStyleTypeModel; }; description: { font: FontStyleTypeModel; }; errorMessage: { marginRight: number; }; internal: sizeTypes; s: sizeTypes; m: sizeTypes; l: sizeTypes; }; } export type { StateContextTypes, TextAreaTypes, ContainerProps, WrapperProps, LabelProps, DescriptionProps, CounterProps, TextareaProps, ModelView, };