Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

structure color file #873

Merged
merged 7 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct SlideTrack: View {
VStack(alignment: .center) {
if hUseNewStyle {
L10n.claimsPledgeSlideLabel.hTextNew(.body)
.foregroundColor(hLabelColorNew.secondary)
.foregroundColor(hTextColorNew.secondary)
} else {
L10n.claimsPledgeSlideLabel.hText(.body)
}
Expand Down Expand Up @@ -75,7 +75,7 @@ struct SlideDragger: View {
ZStack {
if hUseNewStyle {
Image(uiImage: hCoreUIAssets.chevronRightRevamp.image)
.foregroundColor(hLabelColorNew.primary.inverted)
.foregroundColor(hTextColorNew.negative)
} else {
Image(uiImage: Asset.continue.image)
}
Expand All @@ -99,7 +99,7 @@ struct SlideDragger: View {
@hColorBuilder
private var background: some hColor {
if hUseNewStyle {
hLabelColorNew.primary
hTextColorNew.primary
} else {
hTintColor.lavenderOne
}
Expand Down Expand Up @@ -198,7 +198,7 @@ struct HonestyPledge: View {
VStack(alignment: .leading, spacing: 0) {
if hUseNewStyle {
L10n.honestyPledgeTitle.hTextNew(.body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
.padding(.bottom, 8)
}
HStack {
Expand All @@ -219,7 +219,7 @@ struct HonestyPledge: View {
store.send(.dissmissNewClaimFlow)
} content: {
L10n.generalCancelButton.hTextNew(.body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Projects/Claims/Sources/AudioTrack/OverlayView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct OverlayView: View {
@hColorBuilder
var getStaplesMaskColor: some hColor {
if hUseNewStyle {
hLabelColorNew.tertiary
hTextColorNew.tertiary
} else {
staplesMaskColorOld
}
Expand Down
6 changes: 3 additions & 3 deletions Projects/Claims/Sources/AudioTrack/TrackPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct TrackPlayer: View {
if !hWithoutFootnote {
if hUseNewStyle {
hTextNew(L10n.ClaimStatus.Files.claimAudioFooter, style: .footnote)
.foregroundColor(hLabelColorNew.secondary)
.foregroundColor(hTextColorNew.secondary)
} else {
hText(L10n.ClaimStatus.Files.claimAudioFooter, style: .footnote)
.foregroundColor(hLabelColor.secondary)
Expand All @@ -82,7 +82,7 @@ struct TrackPlayer: View {
@hColorBuilder
var getWaveColor: some hColor {
if hUseNewStyle {
hLabelColorNew.primary
hTextColorNew.primary
} else {
playbackTint
}
Expand All @@ -91,7 +91,7 @@ struct TrackPlayer: View {
@hColorBuilder
var getBackgroundColor: some hColor {
if hUseNewStyle {
hBackgroundColorNew.opaqueOne
hFillColorNew.opaqueOne
} else {
backgroundColorOld
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct RecordButtonStyle: SwiftUI.ButtonStyle {
if isRecording {
hLabelColor.primary
} else {
hBackgroundColorNew.signalBackground
hSignalColorNew.redElement
}
} else {
innerCircleColorOld
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public struct SubmitClaimAudioRecordingScreen: View {
ForEach(audioRecordingStep?.questions ?? [], id: \.self) { question in
HStack {
hTextNew(L10nDerivation(table: "Localizable", key: question, args: []).render())
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
}
.padding(16)
.background(
Squircle.default()
.fill(hBackgroundColorNew.opaqueOne)
.fill(hFillColorNew.opaqueOne)
)
.padding(.leading, 16)
.padding(.trailing, 88)
Expand Down Expand Up @@ -100,12 +100,12 @@ public struct SubmitClaimAudioRecordingScreen: View {
)
if !audioRecorder.isRecording {
hTextNew(L10n.claimsStartRecordingLabel, style: .body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
} else {
let minutesToString = String(format: "%02d", minutes)
let secondsToString = String(format: "%02d", seconds)
hTextNew("\(minutesToString):\(secondsToString)", style: .body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
.onReceive(timer) { time in
if ((seconds % 59) == 0) && seconds != 0 {
minutes += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ public struct ClaimFailureScreen: View {
public var body: some View {
hForm {
Image(uiImage: hCoreUIAssets.warningFilledTriangle.image)
.foregroundColor(hLabelColorNew.warning)
.foregroundColor(hSignalColorNew.amberElement)
.padding(.top, 254)
.padding(.bottom, 8)

Group {
hTextNew(L10n.HomeTab.errorTitle, style: .body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)

hTextNew(L10n.HomeTab.errorBody, style: .body)
.multilineTextAlignment(.center)
.foregroundColor(hLabelColorNew.secondary)
.foregroundColor(hTextColorNew.secondary)
}
.padding(.horizontal, 32)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct ShowTagList: View {
if showTags {
HStack(spacing: 0) {
hTextNew(tag, style: .body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
.lineLimit(1)
.scaleEffect(animate && selection == tag ? 1 / scaleSize : 1)
}
Expand Down Expand Up @@ -298,12 +298,12 @@ struct ShowTagList: View {
func getColorAndShadow(claimId: String) -> some View {
if selection == claimId {
RoundedRectangle(cornerRadius: 12)
.foregroundColor(hBackgroundColorNew.semanticButton)
.foregroundColor(hButtonColorNew.primaryAltDefault)
.hShadow()

} else {
RoundedRectangle(cornerRadius: 12)
.foregroundColor(hGrayscaleTranslucentColorNew.greyScaleTranslucentBlack100)
.foregroundColor(hGrayscaleTranslucentLightColorNew.greyScaleTranslucent100)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct SubmitClaimOccurrencePlusLocationScreen: View {
)
}
.sectionContainerStyle(.transparent)
InfoCard(text: L10n.claimsDateNotSureNoticeLabel)
InfoCard(text: L10n.claimsDateNotSureNoticeLabel, type: .info)
.padding(.vertical, 16)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct CheckboxPickerScreen<T>: View {
let isSelected = selectedItems.first(where: { $0.displayName == displayName }) != nil
HStack(spacing: 0) {
hTextNew(displayName, style: .title3)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
Spacer()
Circle()
.strokeBorder(
Expand Down Expand Up @@ -126,18 +126,18 @@ struct CheckboxPickerScreen<T>: View {
@hColorBuilder
func retColor(isSelected: Bool) -> some hColor {
if isSelected {
hLabelColorNew.primary
hTextColorNew.primary
} else {
hBackgroundColorNew.opaqueOne
hFillColorNew.opaqueOne
}
}

@hColorBuilder
func getBorderColor(isSelected: Bool) -> some hColor {
if isSelected {
hLabelColorNew.primary
hTextColorNew.primary
} else {
hBackgroundColorNew.semanticBorderTwo
hBorderColorNew.opaqueTwo
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public struct ItemPickerScreen<T>: View {
hSection {
hRow {
hTextNew(item.displayName, style: .title3)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
}
.withChevronAccessory
.verticalPadding(9)
.onTap {
onSelected(item.object)
}
.foregroundColor(hLabelColorNew.tertiary)
.foregroundColor(hTextColorNew.tertiary)
}
.withoutBottomPadding
.padding(.vertical, 7)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public struct SubmitClaimSingleItem: View {
displayDateField(claim: singleItemStep)
displayPurchasePriceField(claim: singleItemStep)
displayDamageField(claim: singleItemStep)
InfoCard(text: L10n.claimsSingleItemNoticeLabel)
InfoCard(text: L10n.claimsSingleItemNoticeLabel, type: .info)
.padding(.vertical, 12)
LoadingButtonWithContent(.postSingleItem) {
store.send(.singleItemRequest(purchasePrice: singleItemStep?.purchasePrice))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public struct SubmitClaimSuccessScreen: View {
hForm {
VStack(spacing: 16) {
hTextNew(L10n.claimsSuccessTitle, style: .customTitle)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
hTextNew(L10n.claimsSuccessLabel, style: .body)
.foregroundColor(hLabelColorNew.secondary)
.foregroundColor(hTextColorNew.secondary)
.multilineTextAlignment(.center)
}
.padding(.top, UIScreen.main.bounds.size.height / 3.5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public struct SubmitClaimSummaryScreen: View {
}
.withHeader {
HStack {
L10n.changeAddressDetails.hTextNew(.body).foregroundColor(hLabelColorNew.primary)
L10n.changeAddressDetails.hTextNew(.body).foregroundColor(hTextColorNew.primary)
.padding(.top, 16)
}
}
.sectionContainerStyle(.transparent)
}
.hFormAttachToBottom {
VStack(spacing: 8) {
InfoCard(text: L10n.claimsComplementClaim)
InfoCard(text: L10n.claimsComplementClaim, type: .info)
.padding(.bottom, 8)
Group {
LoadingButtonWithContent(.postSummary) {
Expand Down Expand Up @@ -149,9 +149,9 @@ public struct SubmitClaimSummaryScreen: View {
func createRow(with title: String?, and value: String?) -> some View {
if let title, let value {
HStack {
title.hTextNew(.body).foregroundColor(hLabelColorNew.secondary)
title.hTextNew(.body).foregroundColor(hTextColorNew.secondary)
Spacer()
value.hTextNew(.body).foregroundColor(hLabelColorNew.secondary)
value.hTextNew(.body).foregroundColor(hTextColorNew.secondary)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public struct SubmitClaimCheckoutNoRepairScreen: View {
.hUseNewStyle
.hFormAttachToBottom {
VStack(spacing: 8) {
InfoCard(text: L10n.claimsCheckoutNotice)
InfoCard(text: L10n.claimsCheckoutNotice, type: .info)
.padding(.bottom, 8)

hButton.LargeButtonFilled {
Expand Down Expand Up @@ -57,7 +57,7 @@ public struct SubmitClaimCheckoutNoRepairScreen: View {
hSection {
VStack(alignment: .center) {
hTextNew(singleItemCheckoutStep?.payoutAmount.formattedAmount ?? "", style: .title1)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
}
.background(
Squircle.default()
Expand All @@ -67,7 +67,7 @@ public struct SubmitClaimCheckoutNoRepairScreen: View {
}
.withHeader {
hTextNew(L10n.Claims.Payout.Summary.subtitle, style: .body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
.padding(.top, 16)
}
.padding(.bottom, 8)
Expand All @@ -89,7 +89,7 @@ public struct SubmitClaimCheckoutNoRepairScreen: View {
.withHeader {
HStack {
hTextNew(L10n.claimsCheckoutCountTitle, style: .body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
}
}
.sectionContainerStyle(.transparent)
Expand All @@ -104,7 +104,7 @@ public struct SubmitClaimCheckoutNoRepairScreen: View {
ForEach(payoutMethods, id: \.id) { element in
hRow {
hTextNew(element.getDisplayName(), style: .title3)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
.frame(maxWidth: .infinity, alignment: .leading)
}
.withSelectedAccessory(
Expand All @@ -124,7 +124,7 @@ public struct SubmitClaimCheckoutNoRepairScreen: View {
.withHeader {
HStack {
hTextNew(L10n.Claims.Payout.Summary.method, style: .body)
.foregroundColor(hLabelColorNew.primary)
.foregroundColor(hTextColorNew.primary)
}
}
}
Expand All @@ -135,14 +135,14 @@ public struct SubmitClaimCheckoutNoRepairScreen: View {
hRow {
HStack {
hTextNew(title, style: .body)
.foregroundColor(hLabelColorNew.secondary)
.foregroundColor(hTextColorNew.secondary)
Spacer()

hTextNew(
model?.formattedAmount ?? "",
style: .body
)
.foregroundColor(hLabelColorNew.secondary)
.foregroundColor(hTextColorNew.secondary)
}
}
.noSpacing()
Expand Down
Loading