@nuralyui/textarea 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.types.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.types.ts"],"names":[],"mappings":"AAmGA,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,IAAI;IAChB,MAAM,2CAA0B;IAChC,IAAI,qCAAsB;IAC1B,KAAK,wCAAwB;IAC7B,OAAO,gDAA6B;CAC5B,CAAC","sourcesContent":["export const enum TEXTAREA_STATE {\n Default = 'default',\n Error = 'error',\n Warning = 'warning',\n Success = 'success',\n}\n\nexport const enum TEXTAREA_SIZE {\n Large = 'large',\n Medium = 'medium',\n Small = 'small',\n}\n\nexport const enum TEXTAREA_VARIANT {\n Default = '',\n Outlined = 'outlined',\n Filled = 'filled',\n Borderless = 'borderless',\n Underlined = 'underlined',\n}\n\nexport const enum TEXTAREA_RESIZE {\n None = 'none',\n Vertical = 'vertical',\n Horizontal = 'horizontal',\n Both = 'both',\n}\n\nexport interface FocusOptions {\n preventScroll?: boolean;\n cursor?: 'start' | 'end' | 'all' | number;\n select?: boolean;\n}\n\nexport interface BlurOptions {\n preventScroll?: boolean;\n restoreCursor?: boolean;\n}\n\nexport interface FocusChangeEvent {\n focused: boolean;\n cursorPosition?: number;\n selectedText?: string;\n}\n\n/**\n * Validation rule interface\n */\nexport interface ValidationRule {\n /** Validation function that returns true if valid */\n validator: (value: string) => boolean | Promise<boolean>;\n /** Error message to display if validation fails */\n message: string;\n /** Rule severity level */\n level?: 'error' | 'warning';\n /** Whether this rule should block form submission */\n blocking?: boolean;\n}\n\n/**\n * Validation result interface\n */\nexport interface TextareaValidationResult {\n /** Whether the current value is valid */\n isValid: boolean;\n /** Array of validation messages (errors/warnings) */\n messages: string[];\n /** Validation level (error or warning) */\n level: 'error' | 'warning' | 'success';\n /** Whether validation is blocking */\n blocking: boolean;\n}\n\n/**\n * Textarea change event detail interface\n */\nexport interface TextareaChangeEvent {\n /** Current textarea value */\n value: string;\n /** Character count */\n length: number;\n /** Whether max length is exceeded */\n exceedsMaxLength: boolean;\n /** Validation result */\n validation?: TextareaValidationResult;\n}\n\n/**\n * Textarea resize event detail interface\n */\nexport interface TextareaResizeEvent {\n /** New width in pixels */\n width: number;\n /** New height in pixels */\n height: number;\n /** Resize direction */\n direction: 'horizontal' | 'vertical' | 'both';\n}\n\nexport const EMPTY_STRING = '';\n\n/**\n * Common textarea configuration constants\n */\nexport const TEXTAREA_DEFAULTS = {\n ROWS: 3,\n COLS: 50,\n MAX_LENGTH: 1000,\n RESIZE: TEXTAREA_RESIZE.Vertical,\n SIZE: TEXTAREA_SIZE.Medium,\n STATE: TEXTAREA_STATE.Default,\n VARIANT: TEXTAREA_VARIANT.Underlined,\n} as const;"]}