From 983e04f9031701ac332a826dfc70dfdc390ede1e Mon Sep 17 00:00:00 2001 From: Lilith Date: Tue, 17 Feb 2026 12:49:25 -0800 Subject: [PATCH] =?UTF-8?q?chore(LilithForms):=20=F0=9F=94=A7=20Update=20U?= =?UTF-8?q?I=20components=20(SearchInput.swift,=20TextArea.swift)=20to=20r?= =?UTF-8?q?eflect=20latest=20design=20system=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- Sources/LilithForms/SearchInput.swift | 12 +++++++++--- Sources/LilithForms/TextArea.swift | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Sources/LilithForms/SearchInput.swift b/Sources/LilithForms/SearchInput.swift index c56bbb4..18bd2c3 100755 --- a/Sources/LilithForms/SearchInput.swift +++ b/Sources/LilithForms/SearchInput.swift @@ -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?("") } diff --git a/Sources/LilithForms/TextArea.swift b/Sources/LilithForms/TextArea.swift index f6d4fc2..27c1200 100755 --- a/Sources/LilithForms/TextArea.swift +++ b/Sources/LilithForms/TextArea.swift @@ -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 {