mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fix visibility of navigation bar when searching the forwarding screen. (#1357)
* Fix visibility of navigation bar when searching the forwarding screen. - Update Introspect and replace deprecated calls with new ones. - Remove obsoleted colours from DesignKit.
This commit is contained in:
@@ -12,16 +12,16 @@ let package = Package(
|
||||
.library(name: "DesignKit", targets: ["DesignKit"])
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/vector-im/compound-ios.git", revision: "d1a28b8a311e33ddb517d10391037f1547a3c7b6"),
|
||||
.package(url: "https://github.com/vector-im/compound-ios.git", revision: "29233e1c95a17372d5e5afe689c31680bb07b1ea"),
|
||||
.package(url: "https://github.com/vector-im/element-design-tokens.git", exact: "0.0.3"),
|
||||
.package(url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.1.4")
|
||||
.package(url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.9.0")
|
||||
],
|
||||
targets: [
|
||||
.target(name: "DesignKit",
|
||||
dependencies: [
|
||||
.product(name: "Compound", package: "compound-ios"),
|
||||
.product(name: "DesignTokens", package: "element-design-tokens"),
|
||||
.product(name: "Introspect", package: "SwiftUI-Introspect")
|
||||
.product(name: "SwiftUIIntrospect", package: "SwiftUI-Introspect")
|
||||
],
|
||||
path: "Sources"),
|
||||
.testTarget(name: "DesignKitTests",
|
||||
|
||||
@@ -21,7 +21,6 @@ import SwiftUI
|
||||
|
||||
public extension Color {
|
||||
static let element = ElementColors()
|
||||
static let global = Color.global
|
||||
}
|
||||
|
||||
public struct ElementColors {
|
||||
@@ -29,26 +28,6 @@ public struct ElementColors {
|
||||
|
||||
private let colors = DesignTokens.CompoundColors()
|
||||
|
||||
@available(swift, obsoleted: 5.0, message: "Use textActionPrimary from Compound.")
|
||||
public var accent: Color { colors.primaryContent }
|
||||
@available(swift, obsoleted: 5.0, message: "Use textCriticalPrimary/iconCriticalPrimary from Compound.")
|
||||
public var alert: Color { colors.alert }
|
||||
@available(swift, obsoleted: 5.0, message: "Use textLinkExternal from Compound.")
|
||||
public var links: Color { colors.links }
|
||||
@available(swift, obsoleted: 5.0, message: "Use textPrimary/iconPrimary from Compound.")
|
||||
public var primaryContent: Color { colors.primaryContent }
|
||||
@available(swift, obsoleted: 5.0, message: "Use textSecondary/iconSecondary from Compound.")
|
||||
public var secondaryContent: Color { colors.secondaryContent }
|
||||
@available(swift, obsoleted: 5.0, message: "Use iconTertiary form Compound for icons. For text use textSecondary. For borders and backgrounds check with Design.")
|
||||
public var tertiaryContent: Color { colors.tertiaryContent }
|
||||
@available(swift, obsoleted: 5.0, message: "Use iconQuaternary from Compound for icons. For text, borders and backgrounds check with Design.")
|
||||
public var quaternaryContent: Color { colors.quaternaryContent }
|
||||
@available(swift, obsoleted: 5.0, message: "Check with Design for the tokens to use from Compound.")
|
||||
public var quinaryContent: Color { colors.quinaryContent }
|
||||
@available(swift, obsoleted: 5.0, message: "Use bgSubtleSecondary from Compound.")
|
||||
public var system: Color { colors.system }
|
||||
@available(swift, obsoleted: 5.0, message: "Use bgCanvasDefault from Compound for backgrounds. For text or icons use textOnSolidPrimary/iconOnSolidPrimary.")
|
||||
public var background: Color { colors.background }
|
||||
@available(swift, deprecated: 5.0, message: "Use textActionAccent/iconAccentTertiary from Compound.")
|
||||
public var brand: Color { colors.accent }
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
//
|
||||
|
||||
import DesignTokens
|
||||
import Introspect
|
||||
import SwiftUI
|
||||
import SwiftUIIntrospect
|
||||
|
||||
public extension TextFieldStyle where Self == ElementTextFieldStyle {
|
||||
static func elementInput(labelText: String? = nil,
|
||||
@@ -131,7 +131,7 @@ public struct ElementTextFieldStyle: TextFieldStyle {
|
||||
}
|
||||
.onTapGesture { isFocused = true } // Set focus with taps outside of the text field
|
||||
}
|
||||
.introspectTextField { textField in
|
||||
.introspect(.textField, on: .iOS(.v16)) { textField in
|
||||
textField.clearButtonMode = .whileEditing
|
||||
textField.attributedPlaceholder = NSAttributedString(string: textField.placeholder ?? "",
|
||||
attributes: [NSAttributedString.Key.foregroundColor: UIColor(placeholderColor)])
|
||||
|
||||
Reference in New Issue
Block a user