Skip to content

Commit 78df295

Browse files
fix: 🐛 [JIRA:0] Update the disable color based on UX feedback (SAP#1026)
Co-authored-by: I824136 <[email protected]>
1 parent 1d5af5b commit 78df295

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

Apps/Examples/Examples/FioriSwiftUICore/FormViews/FilterFormViewExamples.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ struct FilterFormViewExamples: View {
9595
.foregroundStyle(self.isEnabled ? Color.red : .yellow)
9696
}, mandatoryFieldIndicator: {
9797
TextOrIconView(self.mandatoryField())
98-
.foregroundStyle(self.isEnabled ? Color.green : .preferredColor(.separator))
98+
.foregroundStyle(self.isEnabled ? Color.green : .preferredColor(.quaternaryLabel))
9999
}, isRequired: self.showMandatoryField, options: self.valueOptions, errorMessage: nil, isEnabled: self.isEnabled, allowsMultipleSelection: false, allowsEmptySelection: false, value: self.$singleSelectionNonEmptySelectionCustomizedColorValue, buttonSize: .fixed)
100100
.mandatoryFieldIndicatorStyle { conf in
101101
conf.mandatoryFieldIndicator
@@ -224,7 +224,7 @@ struct FilterFormViewExamples: View {
224224

225225
func mandatoryFieldIndicatorColor() -> Color {
226226
if !self.isEnabled {
227-
return .preferredColor(.separator)
227+
return .preferredColor(.quaternaryLabel)
228228
} else {
229229
return self.customizedMandatoryIndicator ? Color.red : Color.preferredColor(.primaryLabel)
230230
}

Sources/FioriSwiftUICore/_FioriStyles/AINoticeStyle.fiori.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public struct AINoticeBaseStyle: AINoticeStyle {
1212
}
1313
if configuration.icon.isEmpty {
1414
Image(fioriName: "fiori.ai")
15-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .separator))
15+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .quaternaryLabel))
1616
.font(.fiori(forTextStyle: .footnote))
1717
} else {
1818
configuration.icon
@@ -33,14 +33,14 @@ public struct AINoticeBaseStyle: AINoticeStyle {
3333
if configuration.actionLabel != nil, self.isEnabled {
3434
return Text(message)
3535
.font(.fiori(forTextStyle: .footnote))
36-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .separator))
36+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .quaternaryLabel))
3737
+ Text(configuration.actionLabel ?? "")
3838
.font(.fiori(forTextStyle: .footnote))
39-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tintColor : .separator))
39+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tintColor : .quaternaryLabel))
4040
} else {
4141
return Text(message)
4242
.font(.fiori(forTextStyle: .footnote))
43-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .separator))
43+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .quaternaryLabel))
4444
}
4545
}
4646
}
@@ -59,7 +59,7 @@ extension AINoticeFioriStyle {
5959

6060
func makeBody(_ configuration: IconConfiguration) -> some View {
6161
Icon(configuration)
62-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .separator))
62+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .quaternaryLabel))
6363
.font(.fiori(forTextStyle: .footnote))
6464
}
6565
}

Sources/FioriSwiftUICore/_FioriStyles/DateTimePickerStyle.fiori.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ extension DateTimePickerFioriStyle {
104104

105105
func makeBody(_ configuration: TitleConfiguration) -> some View {
106106
Title(configuration)
107-
.foregroundStyle(Color.preferredColor(self.dateTimePickerConfiguration.controlState == .disabled ? .separator : .primaryLabel))
107+
.foregroundStyle(Color.preferredColor(self.dateTimePickerConfiguration.controlState == .disabled ? .quaternaryLabel : .primaryLabel))
108108
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
109109
}
110110
}
@@ -122,7 +122,7 @@ extension DateTimePickerFioriStyle {
122122

123123
func makeBody(_ configuration: MandatoryFieldIndicatorConfiguration) -> some View {
124124
MandatoryFieldIndicator(configuration)
125-
.foregroundStyle(Color.preferredColor(self.dateTimePickerConfiguration.controlState == .disabled ? .separator : .primaryLabel))
125+
.foregroundStyle(Color.preferredColor(self.dateTimePickerConfiguration.controlState == .disabled ? .quaternaryLabel : .primaryLabel))
126126
}
127127
}
128128

Sources/FioriSwiftUICore/_FioriStyles/FilterFormViewStyle.fiori.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ extension FilterFormViewFioriStyle {
244244
func makeBody(_ configuration: TitleConfiguration) -> some View {
245245
Title(configuration)
246246
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
247-
.foregroundStyle(Color.preferredColor(self.filterFormViewConfiguration.isEnabled ? .primaryLabel : .separator))
247+
.foregroundStyle(Color.preferredColor(self.filterFormViewConfiguration.isEnabled ? .primaryLabel : .quaternaryLabel))
248248
}
249249
}
250250

@@ -254,7 +254,7 @@ extension FilterFormViewFioriStyle {
254254
func makeBody(_ configuration: MandatoryFieldIndicatorConfiguration) -> some View {
255255
MandatoryFieldIndicator(configuration)
256256
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
257-
.foregroundStyle(Color.preferredColor(self.filterFormViewConfiguration.isEnabled ? .primaryLabel : .separator))
257+
.foregroundStyle(Color.preferredColor(self.filterFormViewConfiguration.isEnabled ? .primaryLabel : .quaternaryLabel))
258258
}
259259
}
260260

Sources/FioriSwiftUICore/_FioriStyles/InformationViewStyle.fiori.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extension InformationViewFioriStyle {
2121
@Environment(\.isEnabled) var isEnabled
2222
func makeBody(_ configuration: InformationViewConfiguration) -> some View {
2323
InformationView(configuration)
24-
.foregroundColor(.preferredColor(self.isEnabled ? .tertiaryLabel : .separator))
24+
.foregroundColor(.preferredColor(self.isEnabled ? .tertiaryLabel : .quaternaryLabel))
2525
.padding(.top, 4)
2626
}
2727
}
@@ -32,7 +32,7 @@ extension InformationViewFioriStyle {
3232

3333
func makeBody(_ configuration: IconConfiguration) -> some View {
3434
Icon(configuration)
35-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .separator))
35+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .tertiaryLabel : .quaternaryLabel))
3636
.font(.fiori(forTextStyle: .footnote))
3737
}
3838
}
@@ -43,7 +43,7 @@ extension InformationViewFioriStyle {
4343

4444
func makeBody(_ configuration: DescriptionConfiguration) -> some View {
4545
Description(configuration)
46-
.foregroundColor(.preferredColor(self.isEnabled ? .tertiaryLabel : .separator))
46+
.foregroundColor(.preferredColor(self.isEnabled ? .tertiaryLabel : .quaternaryLabel))
4747
.font(.fiori(forTextStyle: .footnote))
4848
}
4949
}
@@ -79,15 +79,15 @@ public struct InformationViewErrorStyle: InformationViewStyle {
7979
.iconStyle(content: { IconConfiguration in
8080
if IconConfiguration.icon.isEmpty {
8181
Image(systemName: "exclamationmark.circle")
82-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .negativeLabel : .separator))
82+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .negativeLabel : .quaternaryLabel))
8383
} else {
8484
IconConfiguration.icon
85-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .negativeLabel : .separator))
85+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .negativeLabel : .quaternaryLabel))
8686
}
8787
})
8888
.descriptionStyle(content: { descriptionConfiguration in
8989
descriptionConfiguration.description
90-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .negativeLabel : .separator))
90+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .negativeLabel : .quaternaryLabel))
9191
})
9292
}
9393
}
@@ -99,15 +99,15 @@ public struct InformationViewWarningStyle: InformationViewStyle {
9999
.iconStyle(content: { IconConfiguration in
100100
if IconConfiguration.icon.isEmpty {
101101
Image(systemName: "exclamationmark.triangle")
102-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .criticalLabel : .separator))
102+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .criticalLabel : .quaternaryLabel))
103103
} else {
104104
IconConfiguration.icon
105-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .criticalLabel : .separator))
105+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .criticalLabel : .quaternaryLabel))
106106
}
107107
})
108108
.descriptionStyle(content: { descriptionConfiguration in
109109
descriptionConfiguration.description
110-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .criticalLabel : .separator))
110+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .criticalLabel : .quaternaryLabel))
111111
})
112112
}
113113
}
@@ -119,15 +119,15 @@ public struct InformationViewInformationalStyle: InformationViewStyle {
119119
.iconStyle(content: { IconConfiguration in
120120
if IconConfiguration.icon.isEmpty {
121121
Image(systemName: "info.circle")
122-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .primaryLabel : .separator))
122+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .primaryLabel : .quaternaryLabel))
123123
} else {
124124
IconConfiguration.icon
125-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .primaryLabel : .separator))
125+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .primaryLabel : .quaternaryLabel))
126126
}
127127
})
128128
.descriptionStyle(content: { descriptionConfiguration in
129129
descriptionConfiguration.description
130-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .primaryLabel : .separator))
130+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .primaryLabel : .quaternaryLabel))
131131
})
132132
}
133133
}
@@ -139,15 +139,15 @@ public struct InformationViewSuccessStyle: InformationViewStyle {
139139
.iconStyle(content: { IconConfiguration in
140140
if IconConfiguration.icon.isEmpty {
141141
Image(systemName: "checkmark.circle")
142-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .positiveLabel : .separator))
142+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .positiveLabel : .quaternaryLabel))
143143
} else {
144144
IconConfiguration.icon
145-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .positiveLabel : .separator))
145+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .positiveLabel : .quaternaryLabel))
146146
}
147147
})
148148
.descriptionStyle(content: { descriptionConfiguration in
149149
descriptionConfiguration.description
150-
.foregroundStyle(Color.preferredColor(self.isEnabled ? .positiveLabel : .separator))
150+
.foregroundStyle(Color.preferredColor(self.isEnabled ? .positiveLabel : .quaternaryLabel))
151151
})
152152
}
153153
}

Sources/FioriSwiftUICore/_FioriStyles/KeyValueFormViewStyle.fiori.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ extension KeyValueFormViewFioriStyle {
100100

101101
func makeBody(_ configuration: MandatoryFieldIndicatorConfiguration) -> some View {
102102
MandatoryFieldIndicator(configuration)
103-
.foregroundStyle(Color.preferredColor(self.keyValueFormViewConfiguration.controlState == .disabled ? .separator : .primaryLabel))
103+
.foregroundStyle(Color.preferredColor(self.keyValueFormViewConfiguration.controlState == .disabled ? .quaternaryLabel : .primaryLabel))
104104
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
105105
.padding(.bottom, -4)
106106
.padding(.top, 11)

Sources/FioriSwiftUICore/_FioriStyles/ListPickerItemStyle.fiori.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extension ListPickerItemFioriStyle {
4949
func makeBody(_ configuration: TitleConfiguration) -> some View {
5050
Title(configuration)
5151
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
52-
.foregroundStyle(Color.preferredColor(self.listPickerItemConfiguration.controlState == .disabled ? .separator : .primaryLabel))
52+
.foregroundStyle(Color.preferredColor(self.listPickerItemConfiguration.controlState == .disabled ? .quaternaryLabel : .primaryLabel))
5353
}
5454
}
5555

@@ -58,7 +58,7 @@ extension ListPickerItemFioriStyle {
5858
func makeBody(_ configuration: MandatoryFieldIndicatorConfiguration) -> some View {
5959
MandatoryFieldIndicator(configuration)
6060
.font(.fiori(forTextStyle: .subheadline, weight: .semibold))
61-
.foregroundStyle(Color.preferredColor(self.listPickerItemConfiguration.controlState == .disabled ? .separator : .primaryLabel))
61+
.foregroundStyle(Color.preferredColor(self.listPickerItemConfiguration.controlState == .disabled ? .quaternaryLabel : .primaryLabel))
6262
}
6363
}
6464

@@ -81,7 +81,7 @@ extension ListPickerItemFioriStyle {
8181
}
8282
}
8383
.font(.fiori(forTextStyle: .body, weight: .regular))
84-
.foregroundStyle(Color.preferredColor(self.listPickerItemConfiguration.controlState == .disabled ? .separator : .primaryLabel))
84+
.foregroundStyle(Color.preferredColor(self.listPickerItemConfiguration.controlState == .disabled ? .quaternaryLabel : .primaryLabel))
8585
}
8686
}
8787

Sources/FioriSwiftUICore/_FioriStyles/TextFieldFormViewStyle.fiori.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ extension TextFieldFormViewFioriStyle {
201201

202202
func makeBody(_ configuration: MandatoryFieldIndicatorConfiguration) -> some View {
203203
MandatoryFieldIndicator(configuration)
204-
.foregroundStyle(Color.preferredColor(self.textFieldFormViewConfiguration.controlState == .disabled ? .separator : .primaryLabel))
204+
.foregroundStyle(Color.preferredColor(self.textFieldFormViewConfiguration.controlState == .disabled ? .quaternaryLabel : .primaryLabel))
205205
}
206206
}
207207
}

0 commit comments

Comments
 (0)