) => {\n const newValue = e.target.value;\n if (isControlled) {\n controlledOnChange?.(newValue);\n } else {\n setInternalValue(newValue);\n }\n };\n\n const handleSubmit = () => {\n onSubmit?.(value);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter') {\n handleSubmit();\n }\n };\n\n const containerStyles: CSSProperties = {\n boxShadow: isFocused ? 'var(--focus-glow)' : 'none',\n };\n\n const inputStyles: CSSProperties = {\n background: 'var(--search-bg)',\n color: 'var(--text-primary)',\n border: '1px solid var(--search-border)',\n borderRight: 'none',\n borderTopLeftRadius: '0.75rem',\n borderBottomLeftRadius: '0.75rem',\n };\n\n const buttonStyles: CSSProperties = {\n background: 'var(--search-btn-bg)',\n color: 'var(--search-btn-text)',\n borderTopRightRadius: '0.75rem',\n borderBottomRightRadius: '0.75rem',\n };\n\n return (\n \n setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n aria-label={placeholder}\n className={cn('px-4 py-2 text-sm outline-none transition-all', inputWidth)}\n style={inputStyles}\n {...props}\n />\n \n
\n );\n }\n);\n\nSearchBoxGlass.displayName = 'SearchBoxGlass';\n"
}
],
"categories": [
"atomic"
]
}