Merge branch 'develop' into feature/CSR-268_fix
This commit is contained in:
commit
51407aaef7
7 changed files with 66 additions and 23 deletions
|
|
@ -37,7 +37,7 @@
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="row px-3 my-6 form-test-error" v-if="!suppressError">
|
<div class="row mt-2 form-test-error" v-if="!suppressError">
|
||||||
<error-message :name="groupName"></error-message>
|
<error-message :name="groupName"></error-message>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
<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">Radio Button</h4>
|
<h4 class="m-0 p-2 bg-light rounded">Radio Button</h4>
|
||||||
<p class="m-0">Sample radio button group</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -62,7 +61,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col my-3 d-flex align-items-center">
|
<div class="col my-3 d-flex align-items-center">
|
||||||
<buttonMain buttonText="secondary" loaderColor="white" sizeInRem="1" />
|
<buttonMain buttonText="Secondary" loaderColor="white" sizeInRem="1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
@invalid-submit="onInvalidSubmit"
|
@invalid-submit="onInvalidSubmit"
|
||||||
ref="theForm"
|
ref="theForm"
|
||||||
v-slot="{ values, meta, errors }"
|
v-slot="{ values, meta, errors }"
|
||||||
>
|
>
|
||||||
<damageLocationQuestion
|
<damageLocationQuestion
|
||||||
ref="damageLocation"
|
ref="damageLocation"
|
||||||
v-model="selectedDamageLocations"
|
v-model="selectedDamageLocations"
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
:suppressError="errors.windshieldDamageTypeQuestion && errors.windshieldDamageTypeQuestion.startsWith('checkForRepairAndReplace')"
|
:suppressError="errors.windshieldDamageTypeQuestion && errors.windshieldDamageTypeQuestion.startsWith('checkForRepairAndReplace')"
|
||||||
/>
|
/>
|
||||||
<alert
|
<alert
|
||||||
|
class="my-3"
|
||||||
v-if="errors.windshieldDamageTypeQuestion && errors.windshieldDamageTypeQuestion.startsWith('checkForRepairAndReplace')"
|
v-if="errors.windshieldDamageTypeQuestion && errors.windshieldDamageTypeQuestion.startsWith('checkForRepairAndReplace')"
|
||||||
alertClass="alert-danger"
|
alertClass="alert-danger"
|
||||||
alertHeadline="You'll need to schedule separate appointments"
|
alertHeadline="You'll need to schedule separate appointments"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,19 @@
|
||||||
.has-error {
|
.has-error {
|
||||||
&.list-button,
|
&.list-button,
|
||||||
&.list-card,
|
&.list-card {
|
||||||
|
border: 1px solid transparent;
|
||||||
|
color: $red;
|
||||||
|
label {
|
||||||
|
border: 1px solid $red;
|
||||||
|
border-radius: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input[type=checkbox]:focus + label,
|
||||||
|
input[type=radio]:focus + label,
|
||||||
|
input[type=checkbox]:checked + label,
|
||||||
|
input[type=radio]:checked + label {
|
||||||
|
box-shadow: 0 0 0 2.5px transparent !important;
|
||||||
|
}
|
||||||
&.list-button-horizontal {
|
&.list-button-horizontal {
|
||||||
color: $red;
|
color: $red;
|
||||||
label {
|
label {
|
||||||
|
|
@ -11,14 +24,16 @@
|
||||||
|
|
||||||
.form-test-error {
|
.form-test-error {
|
||||||
color: $red;
|
color: $red;
|
||||||
font-weight: bold;
|
font-size: .875rem;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-test-invalid {
|
.form-test-invalid {
|
||||||
&.btn.btn-primary {
|
&.btn.btn-primary {
|
||||||
color: $gray;
|
color: $gray;
|
||||||
background: $gray-200;
|
background: $gray-200;
|
||||||
cursor: default;
|
cursor: pointer;
|
||||||
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
&.btn.btn-primary:hover,
|
&.btn.btn-primary:hover,
|
||||||
&.btn.btn-primary:focus,
|
&.btn.btn-primary:focus,
|
||||||
|
|
@ -28,4 +43,4 @@
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
:aria-disabled="isDisabled"
|
:aria-disabled="isDisabled"
|
||||||
class="btn d-flex align-items-center py-3 px-2"
|
class="btn d-flex align-items-center py-3 px-4 delay"
|
||||||
:class="[isPrimary ? 'btn-primary' : 'btn-secondary',isFloat ? 'float-end' : '']"
|
:class="[isPrimary ? 'btn-primary' : 'btn-secondary',isFloat ? 'float-end' : '', isLoaderDisplayed ? 'has-loader' : '']"
|
||||||
@click="clicked()"
|
@click="clicked()"
|
||||||
>
|
>
|
||||||
<span class="m-0">{{ this.buttonText }}</span>
|
<span class="m-0">{{ this.buttonText }}</span>
|
||||||
|
|
@ -51,12 +51,10 @@ export default {
|
||||||
.btn {
|
.btn {
|
||||||
&.btn-primary {
|
&.btn-primary {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: $blue-700;
|
background: linear-gradient(270deg, $blue-500 0%, $blue-700 100%);
|
||||||
@include blue-gradient;
|
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: $border-radius-lg;
|
border-radius: $border-radius-lg;
|
||||||
color: $white;
|
color: $white;
|
||||||
transition: all 150ms linear;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
&:hover {
|
&:hover {
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
|
|
@ -71,19 +69,32 @@ export default {
|
||||||
outline: none;
|
outline: none;
|
||||||
box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700;
|
box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700;
|
||||||
color: $white;
|
color: $white;
|
||||||
@include blue-gradient;
|
|
||||||
}
|
|
||||||
&:disabled {
|
|
||||||
background: $gray-100 !important;
|
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
270deg,
|
270deg,
|
||||||
$gray-100 0%,
|
rgba(6, 87, 124, 1) 0%,
|
||||||
$gray-100 100%
|
rgba(6, 87, 124, 1) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
&:disabled {
|
||||||
|
background: $gray-200 !important;
|
||||||
|
background: linear-gradient(
|
||||||
|
270deg,
|
||||||
|
$gray-200 0%,
|
||||||
|
$gray-200 100%
|
||||||
) !important;
|
) !important;
|
||||||
color: $gray !important;
|
color: $gray-550 !important;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: $border-radius-lg;
|
border-radius: $border-radius-lg;
|
||||||
|
cursor: pointer;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
&.has-loader {
|
||||||
|
color: $white;
|
||||||
|
background: $blue-700;
|
||||||
|
}
|
||||||
|
&.delay {// fixes flicker while transitioning between states
|
||||||
|
transition: background 0s 0s ease-in-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.btn-secondary {
|
&.btn-secondary {
|
||||||
|
|
@ -112,6 +123,13 @@ export default {
|
||||||
border: 1px solid $gray-300;
|
border: 1px solid $gray-300;
|
||||||
border-radius: $border-radius-lg;
|
border-radius: $border-radius-lg;
|
||||||
}
|
}
|
||||||
|
&.has-loader {
|
||||||
|
color: $white;
|
||||||
|
@include blue-gradient;
|
||||||
|
}
|
||||||
|
&.delay {// fixes flicker while transitioning between states
|
||||||
|
transition: background 0s 0s ease-in-out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,7 @@ export default {
|
||||||
label {
|
label {
|
||||||
border-bottom-left-radius: 0.5rem;
|
border-bottom-left-radius: 0.5rem;
|
||||||
border-top-left-radius: 0.5rem;
|
border-top-left-radius: 0.5rem;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&:last-of-type {
|
&:last-of-type {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="'col' + colLength">
|
<div :class="'col' + colLength">
|
||||||
<div
|
<div
|
||||||
class="list-card w-100 rounded-3 d-flex align-items-center h-100"
|
class="list-card w-100 rounded-3 d-flex align-items-center h-100"
|
||||||
:class="[isWide ? 'horizontal' : '', errors.length > 0 ? 'has-error' : '']"
|
:class="[isWide ? 'horizontal' : '', errors.length > 0 ? 'has-error' : '']"
|
||||||
>
|
>
|
||||||
|
|
@ -108,11 +108,11 @@ export default {
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const inputType = props.isMultiSelect ? "checkbox" : "radio";
|
const inputType = props.isMultiSelect ? "checkbox" : "radio";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
value: inputValue,
|
value: inputValue,
|
||||||
handleChange,
|
handleChange,
|
||||||
errors,
|
errors,
|
||||||
} = useField(props.groupName, props.validationRules,
|
} = useField(props.groupName, props.validationRules,
|
||||||
{
|
{
|
||||||
type: inputType,
|
type: inputType,
|
||||||
checkedValue: props.value,
|
checkedValue: props.value,
|
||||||
|
|
@ -155,6 +155,7 @@ export default {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
|
color: $gray-600;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
&.sub-copy {
|
&.sub-copy {
|
||||||
color: $gray-550;
|
color: $gray-550;
|
||||||
|
|
@ -170,6 +171,14 @@ export default {
|
||||||
box-shadow: 0 0 0 1px $blue;
|
box-shadow: 0 0 0 1px $blue;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
}
|
}
|
||||||
|
&:checked + label {
|
||||||
|
p {
|
||||||
|
color: $black;
|
||||||
|
}
|
||||||
|
.sub-copy {
|
||||||
|
color: $gray-600;
|
||||||
|
}
|
||||||
|
}
|
||||||
+ label::before {
|
+ label::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue