Skip to content

Commit

Permalink
feat: [JIRA: HCPSDKFIORIUIKIT-2542] Semibold System Update (#686)
Browse files Browse the repository at this point in the history
* card update

* button update

* slider update

* signature cell update

* switch item update

* onboarding screens update

---------

Co-authored-by: Bill Zhou <bill.zhou01@sap.com>
  • Loading branch information
angiexyang and billzhou0223 authored May 3, 2024
1 parent 0d1ba5b commit fde3dd8
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ struct FioriButtonConfiguration {
let padding: EdgeInsets
let maxWidth: CGFloat?

init(foregroundColor: Color, backgroundColor: Color, font: Font = .fiori(forTextStyle: .body).weight(.bold), padding: EdgeInsets = EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16), maxWidth: CGFloat? = nil) {
init(foregroundColor: Color, backgroundColor: Color, font: Font = .fiori(forTextStyle: .body, weight: .semibold), padding: EdgeInsets = EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16), maxWidth: CGFloat? = nil) {
self.foregroundColor = foregroundColor
self.backgroundColor = backgroundColor
self.font = font
Expand Down
2 changes: 1 addition & 1 deletion Sources/FioriSwiftUICore/Views/ActivationScreen+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extension Fiori {
struct Title: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .title1).weight(.black))
.font(.fiori(forTextStyle: .title1).weight(.bold))
.foregroundColor(.preferredColor(.primaryLabel))
.multilineTextAlignment(.center)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/FioriSwiftUICore/Views/EULAView+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extension Fiori {
struct Title: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .title1).weight(.black))
.font(.fiori(forTextStyle: .title1).weight(.bold))
.foregroundColor(.preferredColor(.primaryLabel))
.multilineTextAlignment(.center)
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/FioriSwiftUICore/Views/InfoView+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extension Fiori {
struct Title: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .title1).weight(.black))
.font(.fiori(forTextStyle: .title1).weight(.bold))
.foregroundColor(.preferredColor(.primaryLabel))
.multilineTextAlignment(.center)
}
Expand All @@ -37,14 +37,14 @@ extension Fiori {
struct Action: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body).weight(.bold))
.font(.fiori(forTextStyle: .body).weight(.semibold))
}
}

struct SecondaryAction: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body).weight(.bold))
.font(.fiori(forTextStyle: .body).weight(.semibold))
.foregroundColor(.preferredColor(.tintColor))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extension Fiori {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body))
.fontWeight(.semibold)
.accentColor(.preferredColor(.tintColor))
}
}
Expand All @@ -18,6 +19,7 @@ extension Fiori {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body))
.fontWeight(.semibold)
.accentColor(.preferredColor(.tintColor))
}
}
Expand All @@ -28,6 +30,7 @@ extension Fiori {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body))
.fontWeight(.semibold)
.accentColor(.preferredColor(.tintColor))
}
}
Expand All @@ -38,6 +41,7 @@ extension Fiori {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body))
.fontWeight(.semibold)
.accentColor(.preferredColor(.tintColor))
}
}
Expand All @@ -48,6 +52,7 @@ extension Fiori {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body))
.fontWeight(.semibold)
.accentColor(.preferredColor(.tintColor))
}
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/FioriSwiftUICore/Views/SliderPickerItem+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extension SliderPickerItem: View {
VStack {
HStack {
Text(String(format: self._formatter ?? NSLocalizedString("Value: %d", tableName: "FioriSwiftUICore", bundle: Bundle.accessor, comment: ""), _value.wrappedValue ?? _minimumValue))
.font(.fiori(forTextStyle: .subheadline, weight: .bold, isItalic: false, isCondensed: false))
.font(.fiori(forTextStyle: .subheadline, weight: .semibold, isItalic: false, isCondensed: false))
.foregroundColor(Color.preferredColor(.primaryLabel))
Spacer()
}
Expand All @@ -31,7 +31,7 @@ extension SliderPickerItem: View {
if let hint = _hint {
HStack {
Text(hint)
.font(.fiori(forTextStyle: .subheadline, weight: .bold, isItalic: false, isCondensed: false))
.font(.fiori(forTextStyle: .subheadline, weight: .semibold, isItalic: false, isCondensed: false))
.foregroundColor(Color.preferredColor(.primaryLabel))
Spacer()
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/FioriSwiftUICore/Views/SwitchPickerItem+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public struct FioriToggleStyle: ToggleStyle {
public func makeBody(configuration: Self.Configuration) -> some View {
HStack {
configuration.label
.font(.fiori(forTextStyle: .subheadline, weight: .bold, isItalic: false, isCondensed: false))
.font(.fiori(forTextStyle: .subheadline, weight: .semibold, isItalic: false, isCondensed: false))
.foregroundColor(self.labelColor)

Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extension Fiori {
struct Title: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .title1).weight(.black))
.font(.fiori(forTextStyle: .title1).weight(.bold))
.foregroundColor(.preferredColor(.primaryLabel))
.multilineTextAlignment(.center)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/FioriSwiftUICore/Views/WelcomeScreen+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extension Fiori {
struct Title: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .title1).weight(.black))
.font(.fiori(forTextStyle: .title1).weight(.bold))
.foregroundColor(.preferredColor(.primaryLabel))
.multilineTextAlignment(.center)
}
Expand Down Expand Up @@ -65,7 +65,7 @@ extension Fiori {
struct SecondaryAction: ViewModifier {
func body(content: Content) -> some View {
content
.font(.fiori(forTextStyle: .body).weight(.bold))
.font(.fiori(forTextStyle: .body).weight(.semibold))
.foregroundColor(.preferredColor(.tintColor))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extension CardMainHeaderFioriStyle {
Title(configuration)
// Add default style for Title
.foregroundStyle(Color.preferredColor(.primaryLabel))
.font(.fiori(forTextStyle: .title3, weight: .bold))
.font(.fiori(forTextStyle: .title3, weight: .semibold))
.environment(\.numberOfLines, 3)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extension CardMediaFioriStyle {
func makeBody(_ configuration: DescriptionConfiguration) -> some View {
Description(configuration)
// Add default style for Description
.font(.fiori(forTextStyle: .title1, weight: .bold))
.font(.fiori(forTextStyle: .title1, weight: .semibold))
.foregroundColor(.preferredColor(.primaryLabel, background: .darkConstant))
.lineLimit(3)
}
Expand All @@ -67,7 +67,7 @@ extension CardMediaFioriStyle {
.clipped()

Text("Title")
.font(.fiori(forTextStyle: .title1, weight: .bold))
.font(.fiori(forTextStyle: .title1, weight: .semibold))
.foregroundColor(.preferredColor(.primaryLabel))
.lineLimit(3)
.padding(EdgeInsets(top: 16, leading: 16, bottom: 16, trailing: 16))
Expand All @@ -84,7 +84,7 @@ extension CardMediaFioriStyle {
.clipped()

Text("Title")
.font(.fiori(forTextStyle: .title1, weight: .bold))
.font(.fiori(forTextStyle: .title1, weight: .semibold))
.foregroundColor(.preferredColor(.primaryLabel))
.lineLimit(3)
.padding(EdgeInsets(top: 16, leading: 16, bottom: 16, trailing: 16))
Expand Down
16 changes: 8 additions & 8 deletions Sources/FioriSwiftUICore/_FioriStyles/CardStyle.fiori.swift
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ public enum CardTests {
}

static let sampleCard4 = Card {
Text("Alex Kilgo").font(.fiori(forTextStyle: .title2, weight: .bold)).lineSpacing(25)
Text("Alex Kilgo").font(.fiori(forTextStyle: .title2, weight: .semibold)).lineSpacing(25)
} subtitle: {
Text("UX Designer")
} detailImage: {
Expand All @@ -544,7 +544,7 @@ public enum CardTests {
print("Tapped")
} label: {
Text("Approve")
.font(Font.fiori(forTextStyle: .body).weight(.bold))
.font(Font.fiori(forTextStyle: .body).weight(.semibold))
.foregroundColor(Color.preferredColor(.tintColor2))
.padding(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16))
.frame(minWidth: 44, maxWidth: .infinity, minHeight: 44)
Expand All @@ -553,7 +553,7 @@ public enum CardTests {
}
} secondaryAction: {
Text("Decline")
.font(Font.fiori(forTextStyle: .body).weight(.bold))
.font(Font.fiori(forTextStyle: .body).weight(.semibold))
.foregroundColor(Color.preferredColor(.negativeLabel))
.padding(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16))
.frame(minWidth: 44, maxWidth: .infinity, minHeight: 44)
Expand All @@ -573,7 +573,7 @@ public enum CardTests {
static let sampleCard6 = Card(title: "Title", subtitle: "Subtitle that goes to multiple lines before truncating just like that", headerAction: FioriButton(title: "..."), counter: "1 of 3", action: FioriButton(title: "Primary"))

static let sampleCard7 = Card {
Text("Bad Schoenborn, Sued").font(.fiori(forTextStyle: .title2, weight: .bold)).lineSpacing(25)
Text("Bad Schoenborn, Sued").font(.fiori(forTextStyle: .title2, weight: .semibold)).lineSpacing(25)
} subtitle: {
Text("Local Public Transport")
} detailImage: {
Expand All @@ -587,7 +587,7 @@ public enum CardTests {
}
} cardBody: {
VStack(alignment: .leading) {
Text("Mannheim Hauptbahnbof").font(.fiori(forTextStyle: .headline, weight: .bold))
Text("Mannheim Hauptbahnbof").font(.fiori(forTextStyle: .headline, weight: .semibold))
HStack(spacing: 4) {
Text("04:19").foregroundColor(.preferredColor(.secondaryLabel))
Circle().foregroundColor(.gray).frame(width: 4)
Expand All @@ -602,7 +602,7 @@ public enum CardTests {

Divider()

Text("Heidelberg Hauptbahnbof").font(.fiori(forTextStyle: .headline, weight: .bold))
Text("Heidelberg Hauptbahnbof").font(.fiori(forTextStyle: .headline, weight: .semibold))
HStack(spacing: 4) {
Text("04:37").foregroundColor(.preferredColor(.secondaryLabel))
Circle().foregroundColor(.gray).frame(width: 4)
Expand All @@ -617,7 +617,7 @@ public enum CardTests {

Divider()

Text("Wiesloch - Walldorf").font(.fiori(forTextStyle: .headline, weight: .bold))
Text("Wiesloch - Walldorf").font(.fiori(forTextStyle: .headline, weight: .semibold))
HStack(spacing: 4) {
Text("04:37").foregroundColor(.preferredColor(.secondaryLabel))
Circle().foregroundColor(.gray).frame(width: 4)
Expand Down Expand Up @@ -659,7 +659,7 @@ public enum CardTests {
}

static let sampleCard9 = Card {
Text("Coyote Hill Rd").font(.fiori(forTextStyle: .title1, weight: .black))
Text("Coyote Hill Rd").font(.fiori(forTextStyle: .title1, weight: .bold))
} headerAction: {
Button {
print("tapped")
Expand Down

0 comments on commit fde3dd8

Please sign in to comment.