From c9b09ae23a629bf85819e69dd694dec3012c0931 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 14 Feb 2022 10:59:31 -0500 Subject: [PATCH 01/58] CSR-269 wip --- src/layouts/vehicle-damage/vehicle-damage.vue | 27 +++- .../windshield-chip-count-question.vue | 49 ++++++++ .../windshield-damage-type-question.vue | 54 ++++++++ .../windshield-options/windshield-options.vue | 118 ++++++++++++++++++ 4 files changed, 246 insertions(+), 2 deletions(-) create mode 100644 src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.vue create mode 100644 src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue create mode 100644 src/layouts/vehicle-damage/windshield-options/windshield-options.vue diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index c5b8df783..e809e97fc 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -5,6 +5,7 @@ + @@ -15,6 +16,8 @@ import vehicleBanner from "@/common-components/vehicle-banner/vehicle-banner"; import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; import replaceOptionsQuestion from"@/layouts/vehicle-damage/replace-options-question/replace-options-question"; import damageLocationQuestion from"@/layouts/vehicle-damage/damage-location-question/damage-location-question"; +import windshieldOptions from"@/layouts/vehicle-damage/windshield-options/windshield-options"; + // Supporting files import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { settleAllPromises } from "@/helpers/layout-helper"; @@ -26,6 +29,7 @@ import baseMixin from "@/mixins/base-mixin"; export default { name: "vehicle-damage", async beforeRouteEnter(to, from, next) { + console.log("vd: beforeRoute"); // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); const damageOptionsPromise = @@ -46,10 +50,12 @@ export default { }, ]; + console.log("vd: before settle"); const resultMap = await settleAllPromises(promiseResultMap); - + console.log("vd: after settle"); // Call the "next" function to complete the transition to this page. next((vm) => { + console.log("vd: next"); vm.$refs.funnelHeader.initializeComponent( resultMap.cmsContent.FunnelHeaderWidget ); @@ -65,12 +71,19 @@ export default { vm.$refs.damageLocation.initializeComponent( resultMap.cmsContent.DamageLocationQuestion, resultMap.damageOptions ); + console.log("vd: initialize wo"); + vm.$refs.windshieldOptions.initializeComponent( + resultMap.cmsContent.WindshieldDamageTypeQuestion, resultMap.cmsContent.WindshieldChipCountQuestion, + resultMap.cmsContent.WindshieldReplaceOptionsQuestion + ); }); }, data(){ return { selectedDamageLocations: [], driverSideOptionsData: [], + selectedWindshieldOptions: [], + selectedChipCount: [] } }, methods: { @@ -80,14 +93,24 @@ export default { resetDependentState() { // Invokes store.dispatch(storeActions.RESET_PARTS_AND_DEPS); - }, + } }, + //computed: { + // selectedWindshieldDamageType(){ + // return this.modelValue.some(selectedDamages => + // { + // const categoryAndGlass = selectedDamages.split('-'); //ie: model looks like "Suv-Windshield" so this Splits the answers into [0]"Suv" [1]"Windshield" + // return Boolean(categoryAndGlass[1].toUpperCase() === "WINDSHIELD"); + // }); + // }, + //}, components: { funnelHeader, vehicleBanner, funnelSubHeader, replaceOptionsQuestion, damageLocationQuestion, + windshieldOptions, }, }; diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.vue b/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.vue new file mode 100644 index 000000000..fc3452dcb --- /dev/null +++ b/src/layouts/vehicle-damage/windshield-options/windshield-chip-count-question/windshield-chip-count-question.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue new file mode 100644 index 000000000..911d3e8ad --- /dev/null +++ b/src/layouts/vehicle-damage/windshield-options/windshield-damage-type-question/windshield-damage-type-question.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue new file mode 100644 index 000000000..1baf8dd82 --- /dev/null +++ b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue @@ -0,0 +1,118 @@ + + + From b2b874e988a8477c896190bf7f412753d0261dbe Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 15 Feb 2022 14:53:05 -0500 Subject: [PATCH 02/58] Fixing filter functionality --- .../damage-location-question/damage-location-question.vue | 1 - .../replace-options-question/replace-options-question.vue | 2 +- src/layouts/vehicle-damage/vehicle-damage.vue | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue b/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue index 36eac0831..58a74a31c 100644 --- a/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue +++ b/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue @@ -1,7 +1,6 @@ @@ -68,6 +69,9 @@ export default { vm.$refs.damageLocation.initializeComponent( resultMap.cmsContent.DamageLocationQuestion, resultMap.damageOptions ); + vm.$refs.windshieldOptions.initializeComponent( + resultMap.cmsContent.WindshieldReplaceOptionsQuestion, resultMap.damageOptions.windshieldOptions.availableReplacementOptions + ); vm.$refs.funnelFooter.initializeComponent( resultMap.cmsContent.FunnelFooterWidget ); From e2bfed2b364309bd49fad845cb8903b8db04d946 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 15 Feb 2022 16:16:06 -0500 Subject: [PATCH 03/58] csr-269 wip --- .../replace-options-question.vue | 8 +- src/layouts/vehicle-damage/vehicle-damage.vue | 40 +++---- .../windshield-options/windshield-options.vue | 106 ++++++++++++------ 3 files changed, 94 insertions(+), 60 deletions(-) diff --git a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue index 31c739b49..1a21573d1 100644 --- a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue +++ b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue @@ -30,6 +30,9 @@ defineRule("replace-options-required", (value) => { export default ({ name: "replaceOptionsQuestion", + updated() { + console.log("ro:modelValue=>" + this.modelValue); + }, data(){ return { questionText: String, @@ -48,6 +51,7 @@ export default ({ this.questionText = cmsContent.QuestionText; this.answersFromCms = cmsContent.Answers; this.replaceOptions = replaceOptions; + console.log("ro:" + this.questionText); }, }, computed: { @@ -56,6 +60,7 @@ export default ({ return this.modelValue; }, set: function(newValue) { + console.log("ro:newVal=>" + newValue); this.$emit("update:modelValue", newValue); } }, @@ -64,7 +69,8 @@ export default ({ ? this.answersFromCms.filter(ans => { const name = ans.Name.split('-'); - return this.filterByVehicleCategory ? name[0].toUpperCase() === store.getters.vehicle.category : name[0].toUpperCase() === store.getters.vehicle.category && this.replaceOptions.includes(name[1]) + return this.filterByVehicleCategory ? name[0].toUpperCase() === store.getters.vehicle.category && this.replaceOptions.includes(name[1]) : + this.replaceOptions.includes(ans.Name) }) : []; }, diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 3bc47570c..1b2ce8ce2 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -4,9 +4,12 @@ - + + - @@ -18,7 +21,7 @@ import vehicleBanner from "@/common-components/vehicle-banner/vehicle-banner"; import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-header"; import replaceOptionsQuestion from"@/layouts/vehicle-damage/replace-options-question/replace-options-question"; import damageLocationQuestion from"@/layouts/vehicle-damage/damage-location-question/damage-location-question"; -import windshieldOptions from"@/layouts/vehicle-damage/windshield-options/windshield-options"; +import windshieldOptions from "@/layouts/vehicle-damage/windshield-options/windshield-options"; // Supporting files import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; @@ -30,8 +33,12 @@ import baseMixin from "@/mixins/base-mixin"; export default { name: "vehicle-damage", + updated() { + console.log("vd:selectedWindshieldChipCount=>" + this.selectedWindshieldOptions.selectedWindshieldChipCount); + console.log("vd:selectedWindshieldDamageType=>" + this.selectedWindshieldOptions.selectedWindshieldDamageType); + console.log("vd:selectedWindshieldReplaceOptions=>" + this.selectedWindshieldOptions.selectedWindshieldReplaceOptions); + }, async beforeRouteEnter(to, from, next) { - console.log("vd: beforeRoute"); // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); const damageOptionsPromise = @@ -52,12 +59,10 @@ export default { }, ]; - console.log("vd: before settle"); const resultMap = await settleAllPromises(promiseResultMap); - console.log("vd: after settle"); + // Call the "next" function to complete the transition to this page. next((vm) => { - console.log("vd: next"); vm.$refs.funnelHeader.initializeComponent( resultMap.cmsContent.FunnelHeaderWidget ); @@ -73,13 +78,12 @@ export default { vm.$refs.damageLocation.initializeComponent( resultMap.cmsContent.DamageLocationQuestion, resultMap.damageOptions ); - vm.$refs.funnelFooter.initializeComponent( - resultMap.cmsContent.FunnelFooterWidget - ); - console.log("vd: initialize wo"); vm.$refs.windshieldOptions.initializeComponent( resultMap.cmsContent.WindshieldDamageTypeQuestion, resultMap.cmsContent.WindshieldChipCountQuestion, - resultMap.cmsContent.WindshieldReplaceOptionsQuestion + resultMap.cmsContent.WindshieldReplaceOptionsQuestion, resultMap.damageOptions.windshieldOptions.availableReplacementOptions + ); + vm.$refs.funnelFooter.initializeComponent( + resultMap.cmsContent.FunnelFooterWidget ); }); }, @@ -87,8 +91,7 @@ export default { return { selectedDamageLocations: [], driverSideOptionsData: [], - selectedWindshieldOptions: [], - selectedChipCount: [] + selectedWindshieldOptions: [] } }, methods: { @@ -107,15 +110,6 @@ export default { ); }, }, - //computed: { - // selectedWindshieldDamageType(){ - // return this.modelValue.some(selectedDamages => - // { - // const categoryAndGlass = selectedDamages.split('-'); //ie: model looks like "Suv-Windshield" so this Splits the answers into [0]"Suv" [1]"Windshield" - // return Boolean(categoryAndGlass[1].toUpperCase() === "WINDSHIELD"); - // }); - // }, - //}, components: { funnelHeader, funnelFooter, diff --git a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue index f5356b4d5..2f480f7bc 100644 --- a/src/layouts/vehicle-damage/windshield-options/windshield-options.vue +++ b/src/layouts/vehicle-damage/windshield-options/windshield-options.vue @@ -1,38 +1,42 @@ - - suppressError: Boolean, \ No newline at end of file + \ No newline at end of file From 845679df74f454c2110baa03f73210569b888463 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 16 Feb 2022 13:25:05 -0500 Subject: [PATCH 04/58] Cleanup and logic fixes --- .../button-question/button-question.spec.js | 39 +++++++++++-------- .../button-question/button-question.vue | 22 ++++++----- .../replace-options-question.spec.js | 2 +- .../replace-options-question.vue | 5 ++- src/layouts/vehicle-damage/vehicle-damage.vue | 3 +- 5 files changed, 41 insertions(+), 30 deletions(-) diff --git a/src/common-components/button-question/button-question.spec.js b/src/common-components/button-question/button-question.spec.js index d5608cd62..464fcf245 100644 --- a/src/common-components/button-question/button-question.spec.js +++ b/src/common-components/button-question/button-question.spec.js @@ -3,12 +3,14 @@ import buttonQuestion from "@/common-components/button-question/button-question" import { nextTick } from "vue"; describe("buttonQuestion.vue", () => { - it("Should show overflow classes on fieldset if isOverflowScrollable is true", async () => { + it("Should show overflow classes on fieldset if isOverflowScrollable is true", () => { // Act - const wrapper = shallowMount(buttonQuestion); - await wrapper.setProps({ - isOverflowScrollable: true, + const wrapper = shallowMount(buttonQuestion, { + propsData: { + isOverflowScrollable: true, + } }); + // Assert const fieldSet = wrapper.find('fieldset'); expect(fieldSet.classes()).toContain("overflow-scroll"); @@ -16,11 +18,12 @@ describe("buttonQuestion.vue", () => { }); describe("buttonQuestion.vue", () => { - it("Fieldset classes should contain row if button type is listCard", async () => { + it("Fieldset classes should contain row if button type is listCard", () => { // Act - const wrapper = shallowMount(buttonQuestion); - await wrapper.setProps({ - buttonType: "listCard", + const wrapper = shallowMount(buttonQuestion, { + propsData: { + buttonType: "listCard", + } }); // Assert const Div = wrapper.find('fieldset div'); @@ -29,11 +32,12 @@ describe("buttonQuestion.vue", () => { }); describe("buttonQuestion.vue", () => { - it("Fieldset classes should contain d-flex if button type is listButtonHorizontal", async () => { + it("Fieldset classes should contain d-flex if button type is listButtonHorizontal", () => { // Act - const wrapper = shallowMount(buttonQuestion); - await wrapper.setProps({ - buttonType: "listButtonHorizontal", + const wrapper = shallowMount(buttonQuestion, { + propsData: { + buttonType: "listButtonHorizontal", + } }); // Assert const Div = wrapper.find('fieldset div'); @@ -57,12 +61,13 @@ describe("buttonQuestion.vue", () => { }); describe("buttonQuestion.vue", () => { - it("Should add values to array on checkbox click", async () => { + it("Should add values to array on checkbox click", () => { // Act - const wrapper = shallowMount(buttonQuestion); - await wrapper.setProps({ - modelValue: ["2022", "2021", "2020"], - isMultiSelect: true + const wrapper = shallowMount(buttonQuestion, { + propsData: { + modelValue: ["2022", "2021", "2020"], + isMultiSelect: true, + } }); const val = {isChecked: true, buttonId: "2019", } wrapper.vm.handleCheckedChanged(val); diff --git a/src/common-components/button-question/button-question.vue b/src/common-components/button-question/button-question.vue index 5df9531df..fc9500d96 100644 --- a/src/common-components/button-question/button-question.vue +++ b/src/common-components/button-question/button-question.vue @@ -29,7 +29,7 @@ :buttonImageId="answer.ImageId" :altText="answer.Name ? answer.Name : answer" screenReaderOnlyText="(opens new window)" - :colLength="this.answers.length < 3 ? '' : '-4'" + :colLength="getColLength" :selectedButtonIDs="selectedValues" data-test="button" :validationRules="validationRules" @@ -83,8 +83,6 @@ export default { isWide: Boolean, modelValue: Array, validationRules: String, - name: String, - value: String, suppressError: Boolean, }, computed: { @@ -111,6 +109,13 @@ export default { } return classes; }, + getColLength(){ + if(this.isWide) { + return "12" + } else { + return this.answers.length < 3 ? '' : '-4'; + } + }, selectedValues: { get: function() { return this.modelValue; @@ -120,17 +125,16 @@ export default { } }, }, - mounted(){ - if(Array.isArray(this.answers) && this.answers.length === 1) { + beforeUpdate(){ + const exceptions = ["Windshield", "Crack"]; + const firstItem = typeof(this.answers[0]) === 'object' ? this.answers[0] : this.answers[0]; + if(Array.isArray(this.answers) && this.answers.length === 1 && !exceptions.includes(typeof(firstItem) === 'object' ? firstItem.Text : firstItem)) { const newSelectedValues = this.selectedValues; - newSelectedValues.push(typeof(this.answers[0]) === 'object' ? this.answers[0].Name : this.answers[0]); + newSelectedValues.push(typeof(firstItem) === 'object' ? firstItem.Name : firstItem); this.selectedValues = newSelectedValues; } }, methods: { - chooseAnswer(answer) { - this.$emit("update:modelValue", answer); - }, handleCheckedChanged(val) { if(this.isMultiSelect) { // Add or remove item to array of data to emit diff --git a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js index 103aecd4c..df8a16f90 100644 --- a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js +++ b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.spec.js @@ -24,7 +24,7 @@ describe("replace-options-question.vue", () => { test("Answers to display filtered by data from api.", async () => { //Arrange - const { wrapper, cmsContent, replaceOptions } = setupMocks({ dataFromStoreApi: ["Windshield", "FrontDoor"]}); + const { wrapper, cmsContent, replaceOptions } = setupMocks({ dataFromStoreApi: ["Windshield", "FrontDoor"], filterByVehicleCategory: true}); //Act replaceOptionsQuestion.methods.initializeComponent.call(wrapper.vm, cmsContent, replaceOptions, "car-group"); diff --git a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue index 5efdc34b6..6f2606597 100644 --- a/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue +++ b/src/layouts/vehicle-damage/replace-options-question/replace-options-question.vue @@ -1,8 +1,9 @@ @@ -81,6 +81,7 @@ export default { return { selectedDamageLocations: [], driverSideOptionsData: [], + windshieldOptionsData: [], } }, methods: { From 4cd4650fb7763346fb3cc97faf1c3f6739453b04 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 16 Feb 2022 14:43:57 -0500 Subject: [PATCH 05/58] Unit test updates --- .../vehicle-damage/vehicle-damage.spec.js | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/layouts/vehicle-damage/vehicle-damage.spec.js b/src/layouts/vehicle-damage/vehicle-damage.spec.js index 949f4811b..0e47eb37f 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.spec.js +++ b/src/layouts/vehicle-damage/vehicle-damage.spec.js @@ -175,7 +175,10 @@ function setupMocks({ return Promise.resolve({ driverSideOptions: { availableReplacementOptions: ["Front", "Back", "Side"], - } + }, + windshieldOptions: { + availableReplacementOptions: ["Front", "Back", "Side"], + }, }); }); const apiResponses = { @@ -193,6 +196,9 @@ function setupMocks({ damageOptions: { driverSideOptions: { availableReplacementOptions: ["Front", "Back", "Side"], + }, + windshieldOptions: { + availableReplacementOptions: ["Front", "Back", "Side"], } }, }; @@ -220,6 +226,11 @@ function setupMocks({ initializeComponent: jest.fn(), }; + const windshieldOptions = replaceOptionsQuestion + windshieldOptions.methods = { + initializeComponent: jest.fn(), + }; + damageLocationQuestion.methods = { initializeComponent: jest.fn(), }; @@ -245,12 +256,18 @@ function setupMocks({ funnelSubHeaderWrapper.vm.initializeComponent = funnelSubHeader.methods.initializeComponent; - const driverSideOptionsWrapper = wrapper.findComponent({ + const driverSideOptionsWrapper = wrapper.findAllComponents({ name: "replaceOptionsQuestion", - }); + }).at(0); driverSideOptionsWrapper.vm.initializeComponent = replaceOptionsQuestion.methods.initializeComponent; + const windshieldOptionsWrapper = wrapper.findAllComponents({ + name: "replaceOptionsQuestion", + }).at(1); + windshieldOptionsWrapper.vm.initializeComponent = + replaceOptionsQuestion.methods.initializeComponent; + const damageLocationQuestionWrapper = wrapper.findComponent({ name: "damageLocationQuestion", }); From f32439972dcf9a74da845e572b5ca2e37eb61381 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 16 Feb 2022 15:01:17 -0500 Subject: [PATCH 06/58] Add error states to component-test page, update disabled button styles Center footer link when stacked. --- .../funnel-footer/funnel-footer.vue | 8 + src/layouts/component-test/component-test.vue | 444 +++++++++++------- src/styles/common-error-styles.scss | 11 + src/ux-components/button-main/button-main.vue | 8 +- src/ux-components/checkbox/checkbox.vue | 3 +- .../list-button-horizontal.vue | 2 + src/ux-components/list-button/list-button.vue | 2 + src/ux-components/list-card/list-card.vue | 5 +- src/ux-components/radio/radio.vue | 3 +- 9 files changed, 304 insertions(+), 182 deletions(-) diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue index af604ed99..edb2420fa 100644 --- a/src/common-components/funnel-footer/funnel-footer.vue +++ b/src/common-components/funnel-footer/funnel-footer.vue @@ -97,6 +97,10 @@ export default { .btn-primary { width: 100%; } + a { + display: flex; + justify-content: center; + } @media only screen and (min-width: 340px) { .button-col, .link-col { @@ -105,6 +109,10 @@ export default { .btn-primary { width: auto; } + a { + display: flex; + justify-content: start; + } } } diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue index 43d67533f..8812fe58a 100644 --- a/src/layouts/component-test/component-test.vue +++ b/src/layouts/component-test/component-test.vue @@ -13,6 +13,14 @@ tabIndex="1" checkboxLabel="I'm a checkbox" /> +

With Error:

+
@@ -28,22 +36,32 @@ buttonID="radio-button-a" isRequired value="I'm a radio button!" - modelValue="Model Value 1" screenReaderOnlyText="Model Value 1" /> -
-
+
+
+

With Error:

+ +
+

Buttons

@@ -61,12 +79,39 @@
- +
- + +
+
+
+
+ +
+
+
+
+
@@ -98,44 +143,6 @@ />
-
-
-

List Card

-
Functioning as Checkbox in Column Layout
-
-
-
- Functioning as Checkbox -
- - - -
-

List Card

@@ -151,7 +158,7 @@ buttonImage="https://digitalconsumercms-dev.safelite.com/images/default-source/damage-options/car.svg?sfvrsn=1468d7f1_3" buttonLabel="Windshield" altText="" - buttonID="List Card Checkbox" + buttonID="List Card Checkbox 1" groupID="checkbox-demo-1" buttonLabelSubCopy="Description" /> @@ -168,13 +175,31 @@ buttonImage="https://digitalconsumercms-dev.safelite.com/images/default-source/damage-options/car.svg?sfvrsn=1468d7f1_3" buttonLabel="Windshield" altText="" - buttonID="List Card Checkbox b" + buttonID="List Card Checkbox 2" groupID="checkbox-demo-1a" buttonLabelSubCopy="" />
+
+
+
Checkbox with Error
+
+ Checkbox with Error + +
+
+
Functioning as Radio Button
@@ -186,7 +211,7 @@ buttonLabel="Windshield" altText="" buttonID="List Card Radio Button" - groupID="radio-demo-2" + groupID="radio-demo-2b" buttonLabelSubCopy="Description" /> @@ -209,6 +234,24 @@
+
+
+
Radio Button with Error
+
+ Radio Button with Error + +
+
+
Horizontal as Checkbox
@@ -245,6 +288,25 @@
+
+
+
Horizontal with Error
+
+ Horizontal with Error + +
+
+
Horizontal as Radio Button
@@ -279,6 +341,24 @@
+
+
+
Horizontal with Error
+
+ Horizontal with Error + +
+
+

List Button - Single-Line

@@ -333,6 +413,21 @@ sizeInRem="1" screenReaderOnlyText=" opens new window" /> +
Checkbox with Error
+
@@ -381,6 +476,20 @@ sizeInRem="1" screenReaderOnlyText=" opens new window" /> +
Radio Button with Error
+
@@ -652,6 +761,63 @@ />
+
+
Checkbox with Error
+ +
+ +

Select Vehicle Year

+ + + +
+
Functioning as Radio Buttons
@@ -706,6 +872,63 @@ />
+
+
Radio Button with Error
+ +
+ +

Select Vehicle Year

+ + + +
+

Typography

@@ -822,129 +1045,6 @@ />
-
-
-

Site Header

-
-
-
-
- -
-
-
-
-

Vehicle Banner

-
-
-
-
- -
-
-
-
-

Button Question

-
-
-
-
- - - - - - - - - - - -
-
@@ -954,8 +1054,6 @@ import buttonBack from "@/common-components/button-back/button-back"; import listCard from "@/ux-components/list-card/list-card"; import listButton from "@/ux-components/list-button/list-button"; import alert from "@/ux-components/alert/alert"; -import vehicleBanner from "@/common-components/vehicle-banner/vehicle-banner"; -import funnelHeader from "@/common-components/funnel-header/funnel-header"; import listButtonHorizontal from "@/ux-components/list-button-horizontal/list-button-horizontal"; import checkbox from "@/ux-components/checkbox/checkbox"; import radio from "@/ux-components/radio/radio"; @@ -968,11 +1066,9 @@ export default { listCard, listButton, alert, - vehicleBanner, listButtonHorizontal, checkbox, radio, - funnelHeader, textLink }, data() { diff --git a/src/styles/common-error-styles.scss b/src/styles/common-error-styles.scss index 880d54acc..2b93563cf 100644 --- a/src/styles/common-error-styles.scss +++ b/src/styles/common-error-styles.scss @@ -13,6 +13,7 @@ input[type=checkbox]:checked + label, input[type=radio]:checked + label { box-shadow: 0 0 0 2.5px transparent !important; + border: 1px solid $blue; } &.list-button-horizontal { color: $red; @@ -20,6 +21,16 @@ border: 1px solid $red; } } + &.ui-radio, + &.ui-checkbox { + input[type=radio]+label:before, + input[type=checkbox]+label:before { + border: 1px solid $red; + } + input[type=checkbox]:checked + label:before { + border: 1px solid $blue; + } + } } .form-test-error { diff --git a/src/ux-components/button-main/button-main.vue b/src/ux-components/button-main/button-main.vue index 3b8b744f5..915c675eb 100644 --- a/src/ux-components/button-main/button-main.vue +++ b/src/ux-components/button-main/button-main.vue @@ -82,7 +82,7 @@ export default { $gray-200 0%, $gray-200 100% ) !important; - color: $gray-550 !important; + color: $gray-600 !important; height: 48px; border: none; border-radius: $border-radius-lg; @@ -118,10 +118,12 @@ export default { } &:disabled { background: transparent; - color: $gray !important; + color: $gray-550 !important; height: 48px; - border: 1px solid $gray-300; + border: 1px solid $gray-550; border-radius: $border-radius-lg; + cursor: pointer; + pointer-events: all; } &.has-loader { color: $white; diff --git a/src/ux-components/checkbox/checkbox.vue b/src/ux-components/checkbox/checkbox.vue index ca30ab330..24c9e830e 100644 --- a/src/ux-components/checkbox/checkbox.vue +++ b/src/ux-components/checkbox/checkbox.vue @@ -1,6 +1,6 @@