diff --git a/components/brave_account/resources/BUILD.gn b/components/brave_account/resources/BUILD.gn index 067b1f0eaa7..f6fdf0f743a 100644 --- a/components/brave_account/resources/BUILD.gn +++ b/components/brave_account/resources/BUILD.gn @@ -47,12 +47,10 @@ build_webui("build") { css_files = [ "brave_account_common.css", "brave_account_dialog.css", - "brave_account_email_input.css", "brave_account_entry_dialog.css", "brave_account_forgot_password_dialog.css", "brave_account_otp_input.css", "brave_account_password_icons.css", - "brave_account_password_input.css", "brave_account_password_strength_meter.css", "brave_account_sign_in_dialog.css", ] diff --git a/components/brave_account/resources/brave_account_common.css b/components/brave_account/resources/brave_account_common.css index a12573a5405..9ba7be6d787 100644 --- a/components/brave_account/resources/brave_account_common.css +++ b/components/brave_account/resources/brave_account_common.css @@ -7,6 +7,21 @@ * #type=style-lit * #css_wrapper_metadata_end */ +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +.label-container { + display: flex; + justify-content: space-between; + width: 100%; +} + .label { color: var(--leo-color-text-primary); font: var(--leo-font-small-semibold); @@ -43,9 +58,22 @@ leo-input:focus:has(.error) { } .dropdown-content { + --leo-icon-size: var(--leo-icon-xs); align-self: end; + animation: fadeIn 300ms ease-in-out; + display: flex; + font: var(--leo-font-small-regular); + gap: var(--leo-spacing-s); min-height: 0; + leo-icon { + /* Slight vertical tweak to align icon with first text line. + align-items: center on .dropdown-content works for single-line text, + but misaligns when wrapping. Offset is based on the difference between + the line-height and icon size. */ + margin-top: calc((1lh - var(--leo-icon-size)) / 2); + } + leo-icon[name='check-circle-filled'] { --leo-icon-color: var(--leo-color-systemfeedback-success-icon); diff --git a/components/brave_account/resources/brave_account_create_dialog.html.ts b/components/brave_account/resources/brave_account_create_dialog.html.ts index 331a281189c..bd3ac5c554a 100644 --- a/components/brave_account/resources/brave_account_create_dialog.html.ts +++ b/components/brave_account/resources/brave_account_create_dialog.html.ts @@ -42,6 +42,7 @@ export function getHtml(this: BraveAccountCreateDialogElement) { placeholder="$i18n{BRAVE_ACCOUNT_PASSWORD_INPUT_PLACEHOLDER}" @password-input=${(e: CustomEvent) => { this.password = e.detail.password + this.isPasswordValid = e.detail.isValid }} > @@ -59,6 +60,7 @@ export function getHtml(this: BraveAccountCreateDialogElement) { -