From fb027c281e92b03bcb731918ffb436d8f6e66f25 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 1 Dec 2021 17:34:51 -0500 Subject: [PATCH 1/2] WIP CSR-186 radio button updates. --- src/layouts/component-test/component-test.vue | 21 ++++++--- src/styles/common-radio-styles.scss | 3 ++ src/styles/common-typography-styles.scss | 4 +- .../button-primary/button-primary.vue | 2 +- .../button-secondary/button-secondary.vue | 2 +- src/ux-components/list-button/list-button.vue | 2 +- src/ux-components/radio/radio.spec.js | 2 +- src/ux-components/radio/radio.vue | 47 ++++++++----------- 8 files changed, 44 insertions(+), 39 deletions(-) diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue index df7578bf0..f4b4047fc 100644 --- a/src/layouts/component-test/component-test.vue +++ b/src/layouts/component-test/component-test.vue @@ -81,6 +81,7 @@ groupName="demo-1" ariaLabelBy="vehicle-year" radioID="2021" + radioLabelValue="2021" textPosition="text-start" loaderColor="blue" loaderPosition="right" @@ -90,6 +91,7 @@ groupName="demo-1" ariaLabelBy="vehicle-year" radioID="2020" + radioLabelValue="2020" textPosition="text-start" loaderColor="blue" loaderPosition="right" @@ -99,6 +101,7 @@ groupName="demo-1" ariaLabelBy="vehicle-year" radioID="2019" + radioLabelValue="2019" textPosition="text-start" loaderColor="blue" loaderPosition="right" @@ -120,7 +123,8 @@ groupName="demo-2" ariaLabelBy="vehicle-make" radioID="Chevrolet" - radioSubID="Test sub-headline" + radioLabelValue="Chevrolet" + radioLabelSubCopy="Test sub-headline" textPosition="text-start" loaderColor="blue" loaderPosition="right" @@ -130,7 +134,8 @@ groupName="demo-2" ariaLabelBy="vehicle-make" radioID="Dodge" - radioSubID="Test sub-headline" + radioLabelValue="Dodge" + radioLabelSubCopy="Test sub-headline" textPosition="text-start" loaderColor="blue" loaderPosition="right" @@ -140,7 +145,8 @@ groupName="demo-2" ariaLabelBy="vehicle-make" radioID="Ford" - radioSubID="Test sub-headline" + radioLabelValue="Ford" + radioLabelSubCopy="Test sub-headline" textPosition="text-start" loaderColor="blue" loaderPosition="right" @@ -157,7 +163,8 @@ groupName="demo-3" ariaLabelBy="vehicle-model" radioID="Corvette" - radioSubID="Test sub-headline" + radioLabelValue="Corvette" + radioLabelSubCopy="Test sub-headline" textPosition="text-center" loaderColor="blue" loaderPosition="right" @@ -167,7 +174,8 @@ groupName="demo-3" ariaLabelBy="vehicle-model" radioID="Testarosa" - radioSubID="Test sub-headline" + radioLabelValue="Testarosa" + radioLabelSubCopy="Test sub-headline" textPosition="text-center" loaderColor="blue" loaderPosition="right" @@ -177,7 +185,8 @@ groupName="demo-3" ariaLabelBy="vehicle-model" radioID="S600" - radioSubID="Test sub-headline" + radioLabelValue="S600" + radioLabelSubCopy="Test sub-headline" textPosition="text-center" loaderColor="blue" loaderPosition="right" diff --git a/src/styles/common-radio-styles.scss b/src/styles/common-radio-styles.scss index 5457db992..2bee198bf 100644 --- a/src/styles/common-radio-styles.scss +++ b/src/styles/common-radio-styles.scss @@ -14,6 +14,9 @@ background: $blue-100; box-shadow: 0 0 0 1px $blue; } + &:checked + label p:first-child { + font-weight: 500; + } } label { position: relative; diff --git a/src/styles/common-typography-styles.scss b/src/styles/common-typography-styles.scss index 05af0defc..7f6163193 100644 --- a/src/styles/common-typography-styles.scss +++ b/src/styles/common-typography-styles.scss @@ -34,7 +34,7 @@ h6,.h6 { } label { - line-height: 1.625; + line-height: 1.5; font-weight: 400; } @@ -54,4 +54,4 @@ caption { font-size: 1rem !important; line-height: 1.4; font-weight: 500; -} \ No newline at end of file +} diff --git a/src/ux-components/button-primary/button-primary.vue b/src/ux-components/button-primary/button-primary.vue index c129115c4..7da10a107 100644 --- a/src/ux-components/button-primary/button-primary.vue +++ b/src/ux-components/button-primary/button-primary.vue @@ -5,7 +5,7 @@ class="btn btn-primary d-flex align-items-center py-3 px-4" @click='displayComponent' > -

{{ this.buttonText }}

+ {{ this.buttonText }} -

{{ this.buttonText }}

+ {{ this.buttonText }} -

{{ this.buttonText }}

+ {{ this.buttonText }} { // Assert const input = wrapper.find("input"); const label = wrapper.find("label"); - const paragraph = wrapper.find("p"); + const paragraph = wrapper.find("span"); await label.trigger('click'); diff --git a/src/ux-components/radio/radio.vue b/src/ux-components/radio/radio.vue index 78d6e4144..48d70821d 100644 --- a/src/ux-components/radio/radio.vue +++ b/src/ux-components/radio/radio.vue @@ -1,24 +1,17 @@