import { type ReactNode, type CSSProperties } from 'react'; import { type SIconName } from '../SIcon'; import { type STooltipProps } from '../STooltip'; import { type SColor } from '../../lib/color'; import { type Rule } from '../../lib/form'; export type SFieldSize = 'sm' | 'md'; export type SFieldAddonAlign = 'start' | 'center' | 'end'; export type SFieldStatus = 'default' | 'pass' | 'error'; /** ref로 노출되는 UX 메서드 (sd-field @Method sdFocus 대응) */ export interface SFieldHandle { /** 내부 컨트롤에 포커스하고 필드를 화면에 스크롤합니다. */ focus: () => void; } export interface SFieldProps { /** 폼 연동용 name 속성 */ name?: string; /** 레이블 텍스트 */ label?: string; /** 레이블 영역 아이콘명 (크기는 size 토큰 16px 고정) */ icon?: SIconName; /** 레이블 영역 아이콘 색상. 미지정 시 currentColor 상속 */ iconColor?: SColor; /** 레이블 툴팁 텍스트 */ labelTooltip?: string; /** 레이블 툴팁 상세 옵션 (SdTooltipProps 대응) */ labelTooltipProps?: Partial; /** 레이블/어드온 레이블 너비 (숫자=px). label·addonLabel 폭에 공통 적용 */ labelWidth?: number | string; /** * 레이블 박스 높이 (숫자=px). 미지정 시 size별 기본값 사용. * 컨트롤 박스가 기본 필드 높이보다 큰 경우(multiline 등) 첫 행에 세로 중앙 정렬을 * 맞추기 위해 컨트롤 박스 높이를 넘겨받는다. */ labelHeight?: number | string; /** 필드 크기 */ size?: SFieldSize; /** 우측 어드온 레이블 */ addonLabel?: string; /** 어드온 정렬 */ addonAlign?: SFieldAddonAlign; /** 에러 상태 */ error?: boolean; /** 에러 메시지 */ errorMessage?: string; /** 필드 상태 — 'error' | 'pass' | 'default'. 'pass'면 초록 테두리 */ status?: SFieldStatus; /** 포커스 상태 (제어/반영) */ focused?: boolean; /** 호버 상태 (제어/반영) */ hovered?: boolean; /** 유효성 규칙 (검증은 컨트롤에서 수행, API 패리티) */ rules?: Rule[]; /** 하단 힌트 */ hint?: string; /** 비활성 */ disabled?: boolean; /** 읽기 전용 (회색 배경) */ readOnly?: boolean; /** * 컨트롤 너비 (숫자=px). 지정하면 필드가 부모 폭을 다 먹지 않고 (레이블 + width) 만큼만 차지한다. * 다른 요소와 나란히 놓으려면 부모를 flex 로 두면 된다. */ width?: number | string; /** 컨트롤 최소 너비 (숫자=px). 하한선만 지정하며 필드는 계속 부모 폭을 채운다 */ minWidth?: number | string; /** 멀티라인(textarea) — 컨트롤 높이를 고정하지 않고 min-height만 적용 */ multiline?: boolean; /** * 테두리 박스 제거 (inline 컨트롤용) — border/배경/hover·focus 강조만 사라지고 * label·hint·errorMessage 등 나머지 필드 구성은 그대로 동작한다. */ borderless?: boolean; /** 실제 컨트롤 (input/select 등) — 테두리 없이 렌더, 테두리는 SField가 제공 */ children?: ReactNode; className?: string; style?: CSSProperties; onMouseEnter?: () => void; onMouseLeave?: () => void; } /** * SField — sd-field 포팅. 폼 컨트롤 래퍼. * ★ SField 가 컨트롤 테두리 박스(border/radius/bg + hover/focus/error/disabled 상태)를 소유하고, * children(input/select 등)은 테두리 없이 그 안을 채운다. (Stencil sd-field 구조) */ export declare const SField: import("react").ForwardRefExoticComponent>;