Skip to content

Commit

Permalink
Delete deprecated HUD and Row
Browse files Browse the repository at this point in the history
  • Loading branch information
aromanov91 committed Nov 9, 2024
1 parent a334c18 commit d14b9e9
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 1,113 deletions.
4 changes: 2 additions & 2 deletions Sources/OversizeUI/Controls/DateField/DateField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public struct DateField: View {
HStack {
Text(label)
.subheadline(.medium)
.foregroundColor(.onSurfaceHighEmphasis)
.foregroundColor(.onSurfacePrimary)
Spacer()
}
}
Expand All @@ -58,7 +58,7 @@ public struct DateField: View {
Text(label)
.font(.subheadline)
.fontWeight(.semibold)
.onSurfaceDisabledForegroundColor()
.onSurfaceTertiaryForeground()
}

HStack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeUI/Controls/HUD/HUD.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public struct HUD<Title, Icon>: View where Title: View, Icon: View {
#if os(macOS)
.foregroundColor(Color.onPrimary)
#else
.foregroundColor(Color.onSurfaceHighEmphasis)
.foregroundColor(Color.onSurfacePrimary)

#endif

Expand Down
4 changes: 2 additions & 2 deletions Sources/OversizeUI/Controls/IconPicker/IconPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ public struct IconPicker: View {
} label: {
HStack(spacing: .xxSmall) {
Text(label)
.onSurfaceHighEmphasisForegroundColor()
.onSurfacePrimaryForeground()

Spacer()
if let image = selection {
image
}
IconDeprecated(.chevronDown, color: .onSurfaceHighEmphasis)
IconDeprecated(.chevronDown, color: .onSurfacePrimary)
}
}
.buttonStyle(.field)
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeUI/Controls/Notice/NoticeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public struct NoticeView<A>: View where A: View {
Button {
closeAction?()
} label: {
IconDeprecated(.xMini, color: .onSurfaceHighEmphasis)
IconDeprecated(.xMini, color: .onSurfacePrimary)
}
.buttonStyle(subtitle != nil ? .tertiary(infinityWidth: false) : .quaternary(infinityWidth: false))
.controlBorderShape(.capsule)
Expand Down
40 changes: 20 additions & 20 deletions Sources/OversizeUI/Controls/Row/Row.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public struct Row<LeadingLabel, TrailingLabel>: View where LeadingLabel: View, T
private let leadingLabel: LeadingLabel?
private let trailingLabel: TrailingLabel?

private var leadingType: RowLeadingType?
private var trallingType: RowTrailingType?
// private var leadingType: RowLeadingType?
// private var trallingType: RowTrailingType?

private let action: (() -> Void)?

Expand Down Expand Up @@ -66,16 +66,16 @@ public struct Row<LeadingLabel, TrailingLabel>: View where LeadingLabel: View, T
@available(*, deprecated, message: "Use leading: {} and tralling: {}")
public init(_ title: String,
subtitle: String? = nil,
leadingType: RowLeadingType? = nil,
trallingType: RowTrailingType? = nil,
// leadingType: RowLeadingType? = nil,
// trallingType: RowTrailingType? = nil,
paddingHorizontal _: Space = .medium,
paddingVertical _: Space = .small,
action: (() -> Void)? = nil)
{
self.title = title
self.subtitle = subtitle
self.leadingType = leadingType
self.trallingType = trallingType
// self.leadingType = leadingType
// self.trallingType = trallingType
self.action = action
leadingLabel = nil
trailingLabel = nil
Expand Down Expand Up @@ -246,20 +246,20 @@ public extension Row {
control.textColor = color
return control
}

@available(*, deprecated, message: "Use leading: {} and tralling: {}")
func rowLeading(_ leading: RowLeadingType?) -> Row {
var control = self
control.leadingType = leading
return control
}

@available(*, deprecated, message: "Use leading: {} and tralling: {}")
func rowTrailing(_ trailing: RowTrailingType?) -> Row {
var control = self
control.trallingType = trailing
return control
}
//
// @available(*, deprecated, message: "Use leading: {} and tralling: {}")
// func rowLeading(_ leading: RowLeadingType?) -> Row {
// var control = self
// control.leadingType = leading
// return control
// }
//
// @available(*, deprecated, message: "Use leading: {} and tralling: {}")
// func rowTrailing(_ trailing: RowTrailingType?) -> Row {
// var control = self
// control.trallingType = trailing
// return control
// }
}

public extension View {
Expand Down
2 changes: 1 addition & 1 deletion Sources/OversizeUI/Controls/Surface/Surface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ struct Surface_Previews: PreviewProvider {
static var previews: some View {
VStack {
Surface {
RowDeprecated("Title") {}
Row("Title") {}
}
.surfaceStyle(.primary)
.previewLayout(.fixed(width: 414, height: 300))
Expand Down
35 changes: 0 additions & 35 deletions Sources/OversizeUI/Deprecated/BlurView.swift

This file was deleted.

Loading

0 comments on commit d14b9e9

Please sign in to comment.