Merge branch 'develop' into feature/CSR-270

This commit is contained in:
Max 2022-02-18 11:24:39 -05:00
commit 6534c5da19
15 changed files with 1011 additions and 1077 deletions

View file

@ -16,6 +16,7 @@ module.exports = {
"!src/layouts/vehicle-damage/windshield-damage-type-question/windshield-damage-type-question.vue", "!src/layouts/vehicle-damage/windshield-damage-type-question/windshield-damage-type-question.vue",
"!src/layouts/vehicle-damage/windshield-options/windshield-options.vue", "!src/layouts/vehicle-damage/windshield-options/windshield-options.vue",
"!src/layouts/address-poc/address-poc.vue", "!src/layouts/address-poc/address-poc.vue",
"!src/layouts/nested-radio-poc/nested-radio.vue",
], //! means exclude from coverage. ], //! means exclude from coverage.
testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"], testMatch: ["**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],
coverageThreshold: { coverageThreshold: {

View file

@ -22,7 +22,6 @@
:selectingInitiatesLoad="selectingInitiatesLoad" :selectingInitiatesLoad="selectingInitiatesLoad"
:loaderColor="loaderColor" :loaderColor="loaderColor"
:loaderPosition="loaderPosition" :loaderPosition="loaderPosition"
:sizeInRem="sizeInRem"
:isWide="isWide" :isWide="isWide"
:isRequired="isRequired" :isRequired="isRequired"
:buttonImage="answer.AnswerImageUrl" :buttonImage="answer.AnswerImageUrl"
@ -74,10 +73,6 @@ export default {
type: String, type: String,
default: "right", default: "right",
}, },
sizeInRem: {
type: [String, Number],
default: 1.5,
},
isRequired: Boolean, isRequired: Boolean,
isOverflowScrollable: Boolean, isOverflowScrollable: Boolean,
isWide: Boolean, isWide: Boolean,

View file

@ -21,7 +21,6 @@
isPrimary isPrimary
:buttonText="buttonText" :buttonText="buttonText"
loaderColor="white" loaderColor="white"
sizeInRem="1"
:class="isDisabled && 'form-test-invalid'" :class="isDisabled && 'form-test-invalid'"
:aria-disabled="isDisabled" :aria-disabled="isDisabled"
:isDisabled="isDisabled" :isDisabled="isDisabled"

View file

@ -1,4 +1,4 @@
<template> <template>
<div class="container-fluid container-shadow p-2 rounded-3"> <div class="container-fluid container-shadow p-2 rounded-3">
<div class="row my-4"> <div class="row my-4">
<div class="col"> <div class="col">
@ -13,7 +13,8 @@
tabIndex="1" tabIndex="1"
checkboxLabel="I'm a checkbox" checkboxLabel="I'm a checkbox"
/> />
<p class="my-3">With Error:</p> <p class="mt-3 mb-0">With Error:</p>
<small>(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<checkbox <checkbox
checkboxName="demo checkbox" checkboxName="demo checkbox"
buttonID="checkbox-2" buttonID="checkbox-2"
@ -50,7 +51,8 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<p class="my-3">With Error:</p> <p class="mt-3 mb-0">With Error:</p>
<small>(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<radio <radio
groupName="radio-demo-3" groupName="radio-demo-3"
buttonLabel="Error!" buttonLabel="Error!"
@ -73,7 +75,7 @@
isPrimary isPrimary
buttonText="Primary" buttonText="Primary"
loaderColor="white" loaderColor="white"
sizeInRem="1"
/> />
</div> </div>
</div> </div>
@ -83,7 +85,7 @@
isPrimary isPrimary
buttonText="Primary Disabled" buttonText="Primary Disabled"
loaderColor="white" loaderColor="white"
sizeInRem="1"
disabled disabled
/> />
</div> </div>
@ -93,7 +95,7 @@
<buttonMain <buttonMain
buttonText="Secondary" buttonText="Secondary"
loaderColor="white" loaderColor="white"
sizeInRem="1"
/> />
</div> </div>
</div> </div>
@ -102,7 +104,7 @@
<buttonMain <buttonMain
buttonText="Secondary Disabled" buttonText="Secondary Disabled"
loaderColor="white" loaderColor="white"
sizeInRem="1"
disabled disabled
/> />
</div> </div>
@ -146,7 +148,7 @@
<div class="row my-4"> <div class="row my-4">
<div class="col"> <div class="col">
<h4 class="m-0 p-2 bg-light rounded">List Card</h4> <h4 class="m-0 p-2 bg-light rounded">List Card</h4>
<h6 class="mx-2 my-0">Functioning as Checkbox</h6> <h6 class="mx-0 px-0 my-0">Functioning as Checkbox</h6>
</div> </div>
</div> </div>
<div class="row g-2"> <div class="row g-2">
@ -167,7 +169,7 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Checkbox No Description</h6> <h6 class="mx-0 px-0 my-4">Checkbox No Description</h6>
<fieldset> <fieldset>
<legend class="sr-only">Checkbox no Description</legend> <legend class="sr-only">Checkbox no Description</legend>
<listCard <listCard
@ -184,7 +186,8 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Checkbox with Error</h6> <h6 class="mx-0 px-0 mt-4 mb-0">Checkbox with Error</h6>
<small>(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<fieldset> <fieldset>
<legend class="sr-only">Checkbox with Error</legend> <legend class="sr-only">Checkbox with Error</legend>
<listCard <listCard
@ -202,7 +205,7 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Functioning as Radio Button</h6> <h6 class="mx-0 px-0 my-4">Functioning as Radio Button</h6>
<fieldset> <fieldset>
<legend class="sr-only">Functioning as Radio Button</legend> <legend class="sr-only">Functioning as Radio Button</legend>
<listCard <listCard
@ -219,7 +222,7 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Radio Button no Description</h6> <h6 class="mx-0 px-0 my-4">Radio Button no Description</h6>
<fieldset> <fieldset>
<legend class="sr-only">Radio Button no Description</legend> <legend class="sr-only">Radio Button no Description</legend>
<listCard <listCard
@ -236,7 +239,8 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Radio Button with Error</h6> <h6 class="mx-0 px-0 mt-4 mb-0">Radio Button with Error</h6>
<small>(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<fieldset> <fieldset>
<legend class="sr-only">Radio Button with Error</legend> <legend class="sr-only">Radio Button with Error</legend>
<listCard <listCard
@ -254,7 +258,7 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Horizontal as Checkbox</h6> <h6 class="mx-0 px-0 my-4">Horizontal as Checkbox</h6>
<fieldset> <fieldset>
<legend class="sr-only">Horizontal Checkbox</legend> <legend class="sr-only">Horizontal Checkbox</legend>
<listCard <listCard
@ -272,7 +276,7 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Checkbox no Description</h6> <h6 class="mx-0 px-0 my-4">Checkbox no Description</h6>
<fieldset> <fieldset>
<legend class="sr-only">Checkbox no Description</legend> <legend class="sr-only">Checkbox no Description</legend>
<listCard <listCard
@ -290,7 +294,8 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Horizontal with Error</h6> <h6 class="mx-0 px-0 mt-4 mb-0">Horizontal with Error</h6>
<small>(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<fieldset> <fieldset>
<legend class="sr-only">Horizontal with Error</legend> <legend class="sr-only">Horizontal with Error</legend>
<listCard <listCard
@ -309,7 +314,7 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Horizontal as Radio Button</h6> <h6 class="mx-0 px-0 my-4">Horizontal as Radio Button</h6>
<fieldset> <fieldset>
<legend class="sr-only">Horizontal Radio Button</legend> <legend class="sr-only">Horizontal Radio Button</legend>
<listCard <listCard
@ -326,7 +331,7 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Radio Button no Description</h6> <h6 class="mx-0 px-0 my-4">Radio Button no Description</h6>
<fieldset> <fieldset>
<legend class="sr-only">Radio Button no Description</legend> <legend class="sr-only">Radio Button no Description</legend>
<listCard <listCard
@ -343,7 +348,8 @@
</div> </div>
<div class="row g-2"> <div class="row g-2">
<div class="col"> <div class="col">
<h6 class="mx-2 my-4">Horizontal with Error</h6> <h6 class="mx-0 px-0 mt-4 mb-0">Horizontal with Error</h6>
<small>(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<fieldset> <fieldset>
<legend class="sr-only">Horizontal with Error</legend> <legend class="sr-only">Horizontal with Error</legend>
<listCard <listCard
@ -362,7 +368,7 @@
<div class="row my-4"> <div class="row my-4">
<div class="col"> <div class="col">
<h4 class="m-0 p-2 bg-light rounded">List Button - Single-Line</h4> <h4 class="m-0 p-2 bg-light rounded">List Button - Single-Line</h4>
<h6 class="mx-2 my-0">Functioning as Checkboxes</h6> <h6 class="mx-0 px-0 my-0">Functioning as Checkboxes</h6>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -384,7 +390,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -397,7 +402,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -410,10 +414,10 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<h6 class="mx-2 my-4 d-flex align-self-start">Checkbox with Error</h6> <h6 class="mx-0 px-0 mt-4 mb-0 d-flex align-self-start">Checkbox with Error</h6>
<small class="d-flex align-self-start">(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<listButton <listButton
isMultiSelect isMultiSelect
groupName="demo-2" groupName="demo-2"
@ -424,7 +428,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
hasError hasError
/> />
@ -437,7 +440,7 @@
aria-labelledby="demo-1-checkbox-group" aria-labelledby="demo-1-checkbox-group"
class="col my-3 d-flex flex-column" class="col my-3 d-flex flex-column"
> >
<h6 class="mx-2 my-0">Functioning as Radio Buttons</h6> <h6 class="mx-0 px-0 my-0">Functioning as Radio Buttons</h6>
<!-- The h3 and id must be included. The id must match the aria-labelledby of the parent div. --> <!-- The h3 and id must be included. The id must match the aria-labelledby of the parent div. -->
<h3 class="sr-only" id="demo-1-checkbox-group">Select Vehicle Year</h3> <h3 class="sr-only" id="demo-1-checkbox-group">Select Vehicle Year</h3>
<listButton <listButton
@ -449,7 +452,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -461,7 +463,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -473,10 +474,10 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<h6 class="mx-2 my-4">Radio Button with Error</h6> <h6 class="mx-0 px-0 mt-4 mb-0">Radio Button with Error</h6>
<small>(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<listButton <listButton
groupName="demo-1-checkbox" groupName="demo-1-checkbox"
ariaLabelBy="vehicle-year" ariaLabelBy="vehicle-year"
@ -486,7 +487,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
hasError hasError
/> />
@ -495,7 +495,7 @@
<div class="row my-4"> <div class="row my-4">
<div class="col"> <div class="col">
<h4 class="m-0 p-2 bg-light rounded">List Button - Multi-Line</h4> <h4 class="m-0 p-2 bg-light rounded">List Button - Multi-Line</h4>
<h6 class="mx-2 my-0">Functioning as Checkboxes</h6> <h6 class="mx-0 px-0 my-0">Functioning as Checkboxes</h6>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -517,7 +517,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -530,7 +529,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -543,14 +541,14 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col">
<!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group --> <!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group -->
<h6 class="mx-2 my-0">Functioning as Radio Buttons</h6> <h6 class="mx-0 px-0 my-0">Functioning as Radio Buttons</h6>
<div <div
role="radiogroup" role="radiogroup"
aria-labelledby="demo-2-checkbox-group" aria-labelledby="demo-2-checkbox-group"
@ -567,7 +565,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -579,7 +576,6 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -591,17 +587,17 @@
textPosition="text-start" textPosition="text-start"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
</div> </div>
</div> </div>
</div>
<div class="row my-4"> <div class="row my-4">
<div class="col"> <div class="col">
<h4 class="m-0 p-2 bg-light rounded"> <h4 class="m-0 p-2 bg-light rounded">
List Button - Multi-Line Centered List Button - Multi-Line Centered
</h4> </h4>
<h6 class="mx-2 my-0">Functioning as Checkboxes</h6> <h6 class="mx-0 px-0 my-0">Functioning as Checkboxes</h6>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -623,7 +619,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -636,7 +631,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -649,14 +643,14 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col">
<!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group --> <!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group -->
<h6 class="mx-2 my-0">Functioning as Radio Buttons</h6> <h6 class="mx-0 my-0 p-0">Functioning as Radio Buttons</h6>
<div <div
role="radiogroup" role="radiogroup"
aria-labelledby="demo-3-checkbox-group" aria-labelledby="demo-3-checkbox-group"
@ -673,7 +667,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -685,7 +678,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
<listButton <listButton
@ -697,15 +689,15 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
/> />
</div> </div>
</div> </div>
</div>
<div class="row my-4"> <div class="row my-4">
<div class="col"> <div class="col">
<h4 class="m-0 p-2 bg-light rounded">List Button Horizontal</h4> <h4 class="m-0 p-2 bg-light rounded">List Button Horizontal</h4>
<h6 class="mx-2 my-0">Functioning as Checkboxes</h6> <h6 class="mx-0 px-0 my-0">Functioning as Checkboxes</h6>
</div> </div>
</div> </div>
<div class="row px-3"> <div class="row px-3">
@ -726,7 +718,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="1" v-bind:positionInGroup="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -740,7 +731,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="2" v-bind:positionInGroup="2"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -754,7 +744,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="3" v-bind:positionInGroup="3"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -762,7 +751,8 @@
</div> </div>
</div> </div>
<div class="row px-3"> <div class="row px-3">
<h6 class="mx-2 my-4 d-flex align-self-start">Checkbox with Error</h6> <h6 class="mx-0 px-0 mt-4 mb-0 d-flex align-self-start">Checkbox with Error</h6>
<small class="p-0">(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group --> <!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group -->
<div <div
role="radiogroup" role="radiogroup"
@ -780,7 +770,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="1" v-bind:positionInGroup="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -795,7 +784,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="2" v-bind:positionInGroup="2"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -810,7 +798,6 @@
textPosition="text-center" textPosition="text-center"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="3" v-bind:positionInGroup="3"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -820,7 +807,7 @@
</div> </div>
<div class="row px-3"> <div class="row px-3">
<!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group --> <!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group -->
<h6 class="mx-2 my-0">Functioning as Radio Buttons</h6> <h6 class="mx-0 my-0 p-0">Functioning as Radio Buttons</h6>
<div <div
role="radiogroup" role="radiogroup"
aria-labelledby="demo-4-checkbox-group" aria-labelledby="demo-4-checkbox-group"
@ -837,7 +824,6 @@
loaderEnabled="true" loaderEnabled="true"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="1" v-bind:positionInGroup="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -851,7 +837,6 @@
loaderEnabled="true" loaderEnabled="true"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="2" v-bind:positionInGroup="2"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -865,7 +850,6 @@
loaderEnabled="true" loaderEnabled="true"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="3" v-bind:positionInGroup="3"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -873,7 +857,8 @@
</div> </div>
</div> </div>
<div class="row px-3"> <div class="row px-3">
<h6 class="mx-2 my-4 d-flex align-self-start">Radio Button with Error</h6> <h6 class="mx-0 mt-4 mb-0 p-0 d-flex align-self-start">Radio Button with Error</h6>
<small class="m-0 p-0">(NOTE: Error states are styled only and not a demo of the full functionality.)</small>
<!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group --> <!-- The role="radiogroup" and aria-labelledby must be included in the parent component for the group -->
<div <div
role="radiogroup" role="radiogroup"
@ -891,7 +876,6 @@
loaderEnabled="true" loaderEnabled="true"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="1" v-bind:positionInGroup="1"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -906,7 +890,6 @@
loaderEnabled="true" loaderEnabled="true"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="2" v-bind:positionInGroup="2"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -921,7 +904,6 @@
loaderEnabled="true" loaderEnabled="true"
loaderColor="blue" loaderColor="blue"
loaderPosition="right" loaderPosition="right"
sizeInRem="1"
v-bind:totalInGroup="3" v-bind:totalInGroup="3"
v-bind:positionInGroup="3" v-bind:positionInGroup="3"
screenReaderOnlyText=" opens new window" screenReaderOnlyText=" opens new window"
@ -1046,19 +1028,19 @@
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import buttonMain from "@/ux-components/button-main/button-main"; import buttonMain from "@/ux-components/button-main/button-main";
import buttonBack from "@/common-components/button-back/button-back"; import buttonBack from "@/common-components/button-back/button-back";
import listCard from "@/ux-components/list-card/list-card"; import listCard from "@/ux-components/list-card/list-card";
import listButton from "@/ux-components/list-button/list-button"; import listButton from "@/ux-components/list-button/list-button";
import alert from "@/ux-components/alert/alert"; import alert from "@/ux-components/alert/alert";
import listButtonHorizontal from "@/ux-components/list-button-horizontal/list-button-horizontal"; import listButtonHorizontal from "@/ux-components/list-button-horizontal/list-button-horizontal";
import checkbox from "@/ux-components/checkbox/checkbox"; import checkbox from "@/ux-components/checkbox/checkbox";
import radio from "@/ux-components/radio/radio"; import radio from "@/ux-components/radio/radio";
import textLink from "@/ux-components/text-link/text-link"; import textLink from "@/ux-components/text-link/text-link";
export default { export default {
name: "App", name: "App",
components: { components: {
buttonMain, buttonMain,
@ -1162,5 +1144,5 @@ export default {
], ],
}; };
}, },
}; };
</script> </script>

View file

@ -0,0 +1,27 @@
<template>
<h5>POC</h5>
</template>
<script>
import listCard from "@/ux-components/list-card/list-card";
import radio from "@/ux-components/radio/radio";
export default {
name: "nestedRadio",
props: {
groupName: String,
buttonLabel: String,
buttonID: String,
isRequired: Boolean,
value: {
type: [String, Number],
default: "",
},
screenReaderOnlyText: String,
hasError: Boolean,
},
};
</script>

View file

@ -11,6 +11,7 @@ import store from "@/store";
import ComponentTest from "@/layouts/component-test/component-test.vue"; import ComponentTest from "@/layouts/component-test/component-test.vue";
import AddressPOC from "@/layouts/address-poc/address-poc.vue"; import AddressPOC from "@/layouts/address-poc/address-poc.vue";
import FormTest from "@/layouts/form-test/form-test.vue"; import FormTest from "@/layouts/form-test/form-test.vue";
import NestedRadio from "@/layouts/nested-radio-poc/nested-radio.vue";
const routes = [ const routes = [
{ {
@ -33,6 +34,11 @@ const routes = [
name: "FormTest", name: "FormTest",
component: FormTest, component: FormTest,
}, },
{
path: "/nested-radio", // This is a temporary route for testing.
name: "NestedRadio",
component: NestedRadio,
},
{ {
path: "/", path: "/",
name: "root", name: "root",

View file

@ -76,26 +76,4 @@ describe("buttonMain.vue", () => {
expect(loader.attributes("class")).toContain("right"); expect(loader.attributes("class")).toContain("right");
}); });
it("Should return loader size in rem", async () => {
// Act
const wrapper = shallowMount(buttonMain, {
propsData: {
sizeInRem: 1,
loaderEnabled: true,
},
});
// Assert
const label = wrapper.find("label");
wrapper.vm.clicked();
await nextTick();
const loader = wrapper.find("loader-stub");
expect(loader.attributes("style")).toContain("1rem");
});
}); });

View file

@ -9,7 +9,6 @@
<loader <loader
class="ms-2" class="ms-2"
v-if="isLoaderDisplayed" v-if="isLoaderDisplayed"
v-bind:style="{ width: `${sizeInRem}rem`, height: `${sizeInRem}rem` }"
v-bind:class="[this.loaderColor, this.loaderPosition]" v-bind:class="[this.loaderColor, this.loaderPosition]"
/> />
</button> </button>
@ -25,7 +24,6 @@ export default {
isDisabled: Boolean, isDisabled: Boolean,
loaderColor: String, loaderColor: String,
loaderPosition: String, loaderPosition: String,
sizeInRem: [Number, String],
isFloat: Boolean, isFloat: Boolean,
}, },
data() { data() {

View file

@ -155,29 +155,6 @@ describe("list-button-horizontal.vue", () => {
expect(loader.attributes("class")).toContain("right"); expect(loader.attributes("class")).toContain("right");
}); });
it("Should return loader size in rem", async () => {
// Act
const wrapper = shallowMount(listButtonHorizontal, {
propsData: {
sizeInRem: 1,
selectingInitiatesLoad: true,
},
});
// Assert
const label = wrapper.find("label");
wrapper.vm.handleCheckChange = jest.fn();
wrapper.vm.handleClick();
await nextTick();
const loader = wrapper.find("loader-stub");
expect(loader.attributes("style")).toContain("1rem");
});
it("Should emit button value on click", async () => { it("Should emit button value on click", async () => {
// Act // Act
const wrapper = shallowMount(listButtonHorizontal, { const wrapper = shallowMount(listButtonHorizontal, {

View file

@ -13,7 +13,7 @@
:aria-required="isRequired" :aria-required="isRequired"
:data-focus-target="groupName" :data-focus-target="groupName"
v-model="checkValue" v-model="checkValue"
@change="!selectingInitiatesLoad ? handleCheckChange : ''" @change="!selectingInitiatesLoad ? handleCheckChange() : ''"
/> />
<label <label
tabindex="-1" tabindex="-1"
@ -39,7 +39,6 @@
</span> </span>
<loader <loader
v-if="isLoaderDisplayed && !isMultiSelect" v-if="isLoaderDisplayed && !isMultiSelect"
:style="{width: `${sizeInRem}rem`, height: `${sizeInRem}rem`}"
:class="[loaderColor, loaderPosition]" :class="[loaderColor, loaderPosition]"
/> />
</label> </label>
@ -64,7 +63,6 @@ export default {
selectingInitiatesLoad: Boolean, selectingInitiatesLoad: Boolean,
loaderColor: String, loaderColor: String,
loaderPosition: String, loaderPosition: String,
sizeInRem: [Number, String],
isRequired: Boolean, isRequired: Boolean,
value: { value: {
// Field initial value // Field initial value
@ -135,13 +133,16 @@ export default {
height: 0; height: 0;
&:focus-visible + label { &:focus-visible + label {
box-shadow: 0 0 0 2px $blue; box-shadow: 0 0 0 2px $blue;
z-index: 3;
} }
&:focus + label { &:focus + label {
box-shadow: 0 0 0 2px $blue; box-shadow: 0 0 0 2px $blue;
z-index: 3;
} }
&:checked + label { &:checked + label {
background: $blue-100; background: $blue-100;
box-shadow: 0 0 0 1px $blue; box-shadow: 0 0 0 1px $blue;
z-index: 2;
} }
&:checked + label p:first-child { &:checked + label p:first-child {
font-weight: 500; font-weight: 500;
@ -158,7 +159,7 @@ export default {
&:hover { &:hover {
box-shadow: 0 0 0 4px $blue-300; box-shadow: 0 0 0 4px $blue-300;
cursor: pointer; cursor: pointer;
z-index: 2; z-index: 3 !important;
} }
+ p { + p {
display: none; display: none;

View file

@ -153,29 +153,6 @@ describe("list-button.vue", () => {
expect(loader.attributes("class")).toContain("right"); expect(loader.attributes("class")).toContain("right");
}); });
it("Should return loader size in rem", async () => {
// Act
const wrapper = shallowMount(listButton, {
propsData: {
sizeInRem: 1,
selectingInitiatesLoad: true,
},
});
// Assert
const label = wrapper.find("label");
wrapper.vm.handleCheckChange = jest.fn();
wrapper.vm.handleClick();
await nextTick();
const loader = wrapper.find("loader-stub");
expect(loader.attributes("style")).toContain("1rem");
});
it("Should emit button value on click", async () => { it("Should emit button value on click", async () => {
// Act // Act
const wrapper = shallowMount(listButton, { const wrapper = shallowMount(listButton, {

View file

@ -13,7 +13,7 @@
:aria-required="isRequired" :aria-required="isRequired"
:data-focus-target="groupName" :data-focus-target="groupName"
v-model="checkValue" v-model="checkValue"
@change="!selectingInitiatesLoad ? handleCheckChange : ''" @change="!selectingInitiatesLoad ? handleCheckChange() : ''"
> >
<label <label
tabindex="-1" tabindex="-1"
@ -42,7 +42,6 @@
</span> </span>
<loader <loader
v-if="isLoaderDisplayed && !isMultiSelect" v-if="isLoaderDisplayed && !isMultiSelect"
:style="{ width: `${sizeInRem}rem`, height: `${sizeInRem}rem` }"
:class="[this.loaderColor, this.loaderPosition]" :class="[this.loaderColor, this.loaderPosition]"
/> />
</label> </label>
@ -67,7 +66,6 @@ export default {
selectingInitiatesLoad: Boolean, selectingInitiatesLoad: Boolean,
loaderColor: String, loaderColor: String,
loaderPosition: String, loaderPosition: String,
sizeInRem: [Number,String],
value: { value: {
// Field initial value // Field initial value
type: [String, Number], type: [String, Number],

View file

@ -13,7 +13,7 @@
:data-focus-target="groupName" :data-focus-target="groupName"
@click="handleChange(value)" @click="handleChange(value)"
v-model="checkValue" v-model="checkValue"
@change="handleCheckChange" @change="handleCheckChange()"
/> />
<label <label
:for="buttonID" :for="buttonID"

View file

@ -3,7 +3,6 @@
class="loader" class="loader"
role="alert" role="alert"
aria-label="Loading new page" aria-label="Loading new page"
v-bind:style="{ width: `${sizeInRem}rem`, height: `${sizeInRem}rem` }"
v-bind:class="[this.loaderColor, this.loaderPosition]" v-bind:class="[this.loaderColor, this.loaderPosition]"
></div> ></div>
</template> </template>
@ -13,10 +12,6 @@ export default {
name: "loader", name: "loader",
/* Specify size in number value which translates to rem value. For example, 1.5 = 1.5rem = 24px */ /* Specify size in number value which translates to rem value. For example, 1.5 = 1.5rem = 24px */
props: { props: {
sizeInRem: {
type: Number,
default: 1,
},
/* Color options: red, green, blue, white, black */ /* Color options: red, green, blue, white, black */
loaderColor: { loaderColor: {
type: String, type: String,
@ -50,8 +45,8 @@ export default {
mask: url(../../assets/img/icons/spinner.svg); mask: url(../../assets/img/icons/spinner.svg);
mask-size: cover; mask-size: cover;
position: relative; position: relative;
width: 100%; width: 1rem;
height: 100%; height: 1rem;
animation: rotation 1s infinite linear; animation: rotation 1s infinite linear;
@keyframes rotation { @keyframes rotation {
100% { 100% {

View file

@ -9,7 +9,7 @@
:aria-required="isRequired" :aria-required="isRequired"
:value="value" :value="value"
:v-model="checkValue" :v-model="checkValue"
@change="handleCheckChanged" @change="handleCheckChanged()"
/> />
<label class="d-flex align-items-center" :for="buttonID"> <label class="d-flex align-items-center" :for="buttonID">
<p v-if="buttonLabel" class="m-0">{{ buttonLabel }}</p> <p v-if="buttonLabel" class="m-0">{{ buttonLabel }}</p>