Remove DesignKit package (#1886)

- Move button styles to Compound
- Rename text style to AuthenticationTextStyle as its only in the auth flow.
- Add the brand colour locally for now until its included in Compound.

* Update snapshots.

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
Doug
2023-10-12 15:45:27 +01:00
committed by GitHub
parent 3838ca1064
commit 2c5662a278
60 changed files with 186 additions and 667 deletions
@@ -83,7 +83,7 @@ struct SoftLogoutScreen: View {
VStack(spacing: 14) {
SecureField(L10n.commonPassword, text: $context.password)
.focused($isPasswordFocused)
.textFieldStyle(.elementInput())
.textFieldStyle(.authentication())
.textContentType(.password)
.submitLabel(.done)
.onSubmit(submit)
@@ -100,7 +100,7 @@ struct SoftLogoutScreen: View {
Button(action: submit) {
Text(L10n.actionNext)
}
.buttonStyle(.elementAction(.xLarge))
.buttonStyle(.compound(.primary))
.disabled(!context.viewState.canSubmit)
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.next)
}
@@ -111,7 +111,7 @@ struct SoftLogoutScreen: View {
Button { context.send(viewAction: .continueWithOIDC) } label: {
Text(L10n.actionContinue)
}
.buttonStyle(.elementAction(.xLarge))
.buttonStyle(.compound(.primary))
}
/// Text shown if neither password or OIDC login is supported.
@@ -139,10 +139,10 @@ struct SoftLogoutScreen: View {
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.clearDataMessage)
.padding(.bottom, 12)
Button(action: clearData) {
Button(role: .destructive, action: clearData) {
Text(UntranslatedL10n.softLogoutClearDataSubmit)
}
.buttonStyle(.elementAction(.xLarge, color: .compound.textCriticalPrimary))
.buttonStyle(.compound(.primary))
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.clearData)
.alert(UntranslatedL10n.softLogoutClearDataDialogTitle,
isPresented: $showingClearDataConfirmation) {