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 d82cb0cefb
commit c5db3d5910
60 changed files with 186 additions and 667 deletions

View File

@@ -76,7 +76,7 @@ struct LoginScreen: View {
Text(L10n.commonUsername).foregroundColor(.compound.textPlaceholder)
}
.focused($isUsernameFocused)
.textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.emailUsername))
.textFieldStyle(.authentication(accessibilityIdentifier: A11yIdentifiers.loginScreen.emailUsername))
.disableAutocorrection(true)
.textContentType(.username)
.autocapitalization(.none)
@@ -89,7 +89,7 @@ struct LoginScreen: View {
Text(L10n.commonPassword).foregroundColor(.compound.textPlaceholder)
}
.focused($isPasswordFocused)
.textFieldStyle(.elementInput(accessibilityIdentifier: A11yIdentifiers.loginScreen.password))
.textFieldStyle(.authentication(accessibilityIdentifier: A11yIdentifiers.loginScreen.password))
.textContentType(.password)
.submitLabel(.done)
.onSubmit(submit)
@@ -99,7 +99,7 @@ struct LoginScreen: View {
Button(action: submit) {
Text(L10n.actionContinue)
}
.buttonStyle(.elementAction(.xLarge))
.buttonStyle(.compound(.primary))
.disabled(!context.viewState.canSubmit)
.accessibilityIdentifier(A11yIdentifiers.loginScreen.continue)
}