import { Icon as SurfaceIcon, TextInput as SurfaceTextInput } from '@ankhorage/surface'; import React from 'react'; import type { TextInputProps } from '../../../../../types/text-input'; import { IconButton } from '../../../../button/public'; import { resolveIconSize } from '../../../../icon/utils/resolveIconSize'; import { withZoraThemeScope } from '../../../../theme/adapters/inbound/withZoraThemeScope'; import { useZoraTheme } from '../../../../theme/composition/useZoraTheme'; function TextInputInner({ themeId: _themeId, mode: _mode, size = 'l', leadingIcon, trailingIcon, trailingAction, disabled, readOnly, interactionPolicy, ...props }: TextInputProps) { const { theme } = useZoraTheme(); const iconSize = resolveIconSize(size); const iconColor = theme.semantics.content.muted; return ( : undefined } readOnly={readOnly} size={size} trailingAccessory={ trailingAction ? ( ) : trailingIcon ? ( ) : undefined } /> ); } /*** * Theme-aware text input with semantic sizing and optional leading/trailing icon slots. * * Use `TextInput` for single-line, multiline, and password form controls with ZORA styling. * * @example Search input * ```tsx * * ``` */ export const TextInput = withZoraThemeScope(TextInputInner);