From 9a9504e7377ecaaedf491efef4479bd338d4e24b Mon Sep 17 00:00:00 2001 From: Joshua Graber <68428039+joshuagraber@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:16:27 -0500 Subject: [PATCH] refactor(components): use dark mode styles for input components (#125) --- src/components/FormV2/PdapFormV2.vue | 2 +- .../FormV2/__snapshots__/formv2.spec.ts.snap | 18 +-- src/components/Header/PdapHeader.vue | 6 +- .../Header/__snapshots__/header.spec.ts.snap | 9 +- src/components/Input/PdapInput.vue | 142 +++++++++--------- .../InputDatePicker/PdapInputDatePicker.vue | 18 ++- .../InputPassword/PdapInputPassword.vue | 3 +- .../InputSelect/PdapInputSelect.vue | 14 +- src/components/Nav/PdapNav.vue | 21 ++- .../Nav/__snapshots__/nav.spec.ts.snap | 9 +- src/styles/base.css | 14 +- src/styles/components.css | 22 ++- stylelint.config.mjs | 2 +- 13 files changed, 147 insertions(+), 133 deletions(-) diff --git a/src/components/FormV2/PdapFormV2.vue b/src/components/FormV2/PdapFormV2.vue index c26ab16..3244ce5 100644 --- a/src/components/FormV2/PdapFormV2.vue +++ b/src/components/FormV2/PdapFormV2.vue @@ -101,7 +101,7 @@ watchEffect(() => { @layer components { .pdap-form-error-message { - @apply items-center justify-start basis-full flex-shrink flex bg-red-300 text-red-800 mb-3 p-2 text-sm; + @apply items-center justify-start basis-full flex-shrink flex bg-red-300 text-red-800 mb-3 p-2 text-sm rounded-sm; } } diff --git a/src/components/FormV2/__snapshots__/formv2.spec.ts.snap b/src/components/FormV2/__snapshots__/formv2.spec.ts.snap index 511338a..2336e13 100644 --- a/src/components/FormV2/__snapshots__/formv2.spec.ts.snap +++ b/src/components/FormV2/__snapshots__/formv2.spec.ts.snap @@ -56,11 +56,7 @@ exports[`PdapFormV2 > renders default error message when form has errors 1`] = `
- +
@@ -100,11 +96,7 @@ exports[`PdapFormV2 > renders error message when errorMessage prop is provided 1
- +
@@ -138,11 +130,7 @@ exports[`PdapFormV2 > renders the form element 1`] = `
- +
diff --git a/src/components/Header/PdapHeader.vue b/src/components/Header/PdapHeader.vue index 9d5fc47..82b1c5b 100644 --- a/src/components/Header/PdapHeader.vue +++ b/src/components/Header/PdapHeader.vue @@ -79,7 +79,11 @@ export default { } .logo { - @apply decoration-0 relative max-w-[80%] dark:invert; + @apply decoration-0 relative max-w-[80%] px-4; @apply xs:max-w-none; } + +.logo img { + @apply dark:invert; +} diff --git a/src/components/Header/__snapshots__/header.spec.ts.snap b/src/components/Header/__snapshots__/header.spec.ts.snap index abcac5b..67f436e 100644 --- a/src/components/Header/__snapshots__/header.spec.ts.snap +++ b/src/components/Header/__snapshots__/header.spec.ts.snap @@ -4,10 +4,11 @@ exports[`Header component > Renders a header 1`] = `
@@ -52,8 +48,9 @@ class="pdap-nav-link" :to="link.path" @click="toggleIsExpanded" - >{{ link.text }} + {{ link.text }} + @@ -61,6 +58,8 @@