0.1.32
TextInput.Text에 variant를 지정할 수 있고, 보조 라벨의 색과 폰트를 CoreTextInput secondaryLabel에 맞춥니다.
TextInput.Text variant 지정
TextInput.Text에 variant를 직접 지정할 수 있습니다. 지정하지 않으면 TextInput.Root의 size에서 파생되며, 지정하면 context보다 우선합니다. Tag.Text, Button.Text, Chip.Label이 이미 제공하던 override를 TextInput.Text도 동일하게 지원합니다.
<TextInput.Root size="lg">
<TextInput.Input />
<TextInput.Text variant="$body-1">일</TextInput.Text>
</TextInput.Root>보조 라벨 기본 스타일 정렬
TextInput.Text는 단위나 카운터를 표시하는 보조 라벨입니다. legacy CoreTextInput의 secondaryLabel과 색을 맞추고, 입력 텍스트보다 작거나 같은 폰트를 쓰도록 매핑을 분리했습니다.
| 이전 | 이후 | |
|---|---|---|
| 색상 | text-3 | text-2 |
폰트 (sm) | $body-1 | $body-1 |
폰트 (md) | $body-2 | $body-1 |
폰트 (lg) | $body-2 | $body-2 |
TextInput.Input의 폰트 매핑은 바뀌지 않았습니다.
시각 변경 — TextInput.Text를 쓰는 화면에서 보조 라벨의 색이 한 단계 진해지고, md에서는 폰트가 14px에서 12px로 줄어듭니다. 기존 크기를 유지하려면 variant="$body-2"를 명시하세요.
Breaking — TextInputTextProps가 Omit<TypoProps, 'variant'> 기반으로 바뀌면서 className / style 콜백이 받는 state 타입이 TextInputState에서 빈 객체로 좁혀집니다. 런타임 동작은 이전과 같습니다. TextInput.Text는 원래 state를 전달하지 않아 콜백이 항상 빈 객체를 받고 있었고, 타입 선언만 실제와 어긋나 있었습니다. disabled / readOnly에 따라 보조 라벨을 다르게 그려야 한다면 TextInput.Root의 콜백에서 처리하세요.
TextArea 커서
TextArea.Input에 cursor: text를 명시합니다. TextInput.Input에는 있고 TextArea.Input에는 없어, 조상 요소가 cursor를 지정한 경우 두 컴포넌트가 다르게 동작할 수 있었습니다.