chore(LilithForms): 🔧 Update UI components (SearchInput.swift, TextArea.swift) to reflect latest design system updates

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-02-17 12:49:25 -08:00
parent b1a3889917
commit 983e04f903
2 changed files with 10 additions and 3 deletions

View file

@ -4,6 +4,9 @@
// Search input field with magnifying glass icon and clear button
import SwiftUI
#if canImport(UIKit)
import UIKit
#endif
import LilithDesignTokens
/// Search input field
@ -74,8 +77,10 @@ public struct SearchInput: View {
TextField(placeholder, text: $text)
.font(AppTypography.body())
.foregroundColor(AppColors.textPrimary)
.autocapitalization(.none)
.disableAutocorrection(true)
#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
.textInputAutocapitalization(.never)
#endif
.autocorrectionDisabled()
.disabled(isDisabled)
.focused($isFocused)
.onChange(of: text) { _, newValue in
@ -151,9 +156,10 @@ public struct SearchInput: View {
private func clearSearch() {
text = ""
// Light haptic feedback
#if canImport(UIKit)
let generator = UIImpactFeedbackGenerator(style: .light)
generator.impactOccurred()
#endif
onSearch?("")
}

View file

@ -194,6 +194,7 @@ public struct TextArea: View {
// MARK: - Preview Provider
#if DEBUG
@available(macOS 14.0, iOS 17.0, *)
struct TextArea_Previews: PreviewProvider {
static var previews: some View {
ScrollView {