From 14f9d86a3dc71a000682f95b87efd317cb287feb Mon Sep 17 00:00:00 2001 From: bmauger Date: Thu, 18 Nov 2021 15:32:21 -0500 Subject: [PATCH 01/10] WIP CSR-119 spinner updates and overlay. --- src/assets/img/icons/spinner.svg | 3 + src/layouts/componentTest/componentTest.vue | 9 ++- src/styles/commonRadioStyles.scss | 18 +----- src/styles/commonStyles.scss | 7 --- src/styles/mixins/customMixins.scss | 68 +++++++++++++++++++++ src/uxComponents/radioList/radioList.vue | 6 +- vue.config.js | 1 + vue.release.config.js | 1 + 8 files changed, 84 insertions(+), 29 deletions(-) create mode 100644 src/assets/img/icons/spinner.svg create mode 100644 src/styles/mixins/customMixins.scss diff --git a/src/assets/img/icons/spinner.svg b/src/assets/img/icons/spinner.svg new file mode 100644 index 000000000..1c94e5de6 --- /dev/null +++ b/src/assets/img/icons/spinner.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue index e577eed59..205778e54 100644 --- a/src/layouts/componentTest/componentTest.vue +++ b/src/layouts/componentTest/componentTest.vue @@ -74,19 +74,22 @@ groupName="demo" ariaLabelBy="vehicle-year" radioID="2021" - errorMessage="Test error message" + spinnerColor="blue" + spinnerPosition="right" /> diff --git a/src/styles/commonRadioStyles.scss b/src/styles/commonRadioStyles.scss index 953a75985..bc74ab260 100644 --- a/src/styles/commonRadioStyles.scss +++ b/src/styles/commonRadioStyles.scss @@ -37,23 +37,7 @@ color: $danger; } } - &.button-loader { - padding: 0 40px 0 12px; - &:after { - content: url(../../assets/img/icons/button-spinner-blue.svg); - position: absolute; - right: 14px; - width: 16px; - height: 16px; - margin-left: 12px; - animation: rotation 1s infinite linear; - @keyframes rotation { - 100% { - transform:rotate(360deg); - } - } - } - } + @include spinner; } } } diff --git a/src/styles/commonStyles.scss b/src/styles/commonStyles.scss index d47d79fa4..ab36e35c5 100644 --- a/src/styles/commonStyles.scss +++ b/src/styles/commonStyles.scss @@ -22,10 +22,3 @@ body { cursor: pointer; } } - -//Custom Mixins - -//Blue gradient background mixin -@mixin blue-gradient { - background: linear-gradient(270deg, $blue-500 0%, $blue-700 100%); -} diff --git a/src/styles/mixins/customMixins.scss b/src/styles/mixins/customMixins.scss new file mode 100644 index 000000000..fafd5894e --- /dev/null +++ b/src/styles/mixins/customMixins.scss @@ -0,0 +1,68 @@ +//Custom Mixins + +//Blue gradient background mixin +@mixin blue-gradient { + background: linear-gradient(270deg, $blue-500 0%, $blue-700 100%); +} + +//Spinner +//Choose color and position +@mixin spinner { + &.spinner { + //Open an overlay to prevent page interaction + &:before { + content: ''; + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: transparent; + z-index: 9999; + cursor: default; + } + //Spinner basics + &:after { + content: ''; + mask: url(../../assets/img/icons/spinner.svg); + mask-size: cover; + position: absolute; + width: 1rem; + height: 1rem; + animation: rotation 1s infinite linear; + @keyframes rotation { + 100% { + transform:rotate(360deg); + } + } + } + //Spinner position + &.center:after { + left: 0; + right: 0; + margin: 0 auto; + } + &.right:after { + right: 1rem; + } + &.left:after { + left: 1rem; + } + //Spinner color + &:after { //Default spinner color (blue) if no other color is specified from the options below + background-color: $blue; + } + &.red:after { + background-color: $red; + } + &.green:after { + background-color: $green; + } + &.white:after { + background-color: $white; + } + &.black:after { + background-color: $black; + } + } +} diff --git a/src/uxComponents/radioList/radioList.vue b/src/uxComponents/radioList/radioList.vue index 6b59e6f57..24b23effa 100644 --- a/src/uxComponents/radioList/radioList.vue +++ b/src/uxComponents/radioList/radioList.vue @@ -3,7 +3,7 @@

{{errorMessage}}

@@ -16,7 +16,9 @@ export default { "groupName", "ariaLabelBy", "radioID", - "errorMessage" + "errorMessage", + "spinnerColor", + "spinnerPosition" ], data() { diff --git a/vue.config.js b/vue.config.js index bda41b2dd..2838ed844 100644 --- a/vue.config.js +++ b/vue.config.js @@ -21,6 +21,7 @@ module.exports = { @import "@/styles/uxVariables.scss"; @import "./node_modules/bootstrap/scss/variables"; @import "./node_modules/bootstrap/scss/mixins"; + @import "@/styles/mixins/customMixins"; @import "./node_modules/bootstrap/scss/bootstrap"; @import "@/styles/commonStyles.scss"; @import "@/styles/commonButtonStyles.scss"; diff --git a/vue.release.config.js b/vue.release.config.js index 5bc60309f..4a0145d30 100644 --- a/vue.release.config.js +++ b/vue.release.config.js @@ -11,6 +11,7 @@ module.exports = { @import "@/styles/uxVariables.scss"; @import "./node_modules/bootstrap/scss/variables"; @import "./node_modules/bootstrap/scss/mixins"; + @import "@/styles/mixins/customMixins"; @import "./node_modules/bootstrap/scss/bootstrap"; @import "@/styles/commonStyles.scss"; @import "@/styles/commonButtonStyles.scss"; From a1ba5911a24b13e407a6f6005ce2f444f61ac49b Mon Sep 17 00:00:00 2001 From: bmauger Date: Fri, 19 Nov 2021 08:53:24 -0500 Subject: [PATCH 02/10] WIP update mixin. Update Alert svg width/height. --- src/styles/commonRadioStyles.scss | 5 +++-- src/styles/mixins/customMixins.scss | 6 +++--- src/uxComponents/alert/alert.vue | 8 ++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/styles/commonRadioStyles.scss b/src/styles/commonRadioStyles.scss index bc74ab260..5d4c4afc0 100644 --- a/src/styles/commonRadioStyles.scss +++ b/src/styles/commonRadioStyles.scss @@ -18,7 +18,7 @@ label { position: relative; background: $white; - height: 3rem; + min-height: 3rem; transition: all 150ms linear; border-radius: $border-radius-lg; border: 1px solid $gray-500; @@ -37,7 +37,8 @@ color: $danger; } } - @include spinner; + //Add spinner. Specify width and height + @include spinner(1rem,1rem); } } } diff --git a/src/styles/mixins/customMixins.scss b/src/styles/mixins/customMixins.scss index fafd5894e..77b4be470 100644 --- a/src/styles/mixins/customMixins.scss +++ b/src/styles/mixins/customMixins.scss @@ -7,7 +7,7 @@ //Spinner //Choose color and position -@mixin spinner { +@mixin spinner($width, $height) { &.spinner { //Open an overlay to prevent page interaction &:before { @@ -27,8 +27,8 @@ mask: url(../../assets/img/icons/spinner.svg); mask-size: cover; position: absolute; - width: 1rem; - height: 1rem; + width: $width; + height: $height; animation: rotation 1s infinite linear; @keyframes rotation { 100% { diff --git a/src/uxComponents/alert/alert.vue b/src/uxComponents/alert/alert.vue index b47d75f3c..811dcb133 100644 --- a/src/uxComponents/alert/alert.vue +++ b/src/uxComponents/alert/alert.vue @@ -51,6 +51,8 @@ export default { } svg { fill: $blue-700; + width: 1rem; + height: 1rem; } } &.alert-danger { @@ -59,6 +61,8 @@ export default { } svg { fill: $red-700; + width: 1rem; + height: 1rem; } } &.alert-warning { @@ -67,6 +71,8 @@ export default { } svg { fill: $yellow-700; + width: 1rem; + height: 1rem; } } &.alert-success { @@ -75,6 +81,8 @@ export default { } svg { fill: $green-700; + width: 1rem; + height: 1rem; } } } From 863d60ee8912713b9f008f6c887a625ab2b81c1c Mon Sep 17 00:00:00 2001 From: bmauger Date: Fri, 19 Nov 2021 09:06:22 -0500 Subject: [PATCH 03/10] Updated files and folders. --- src/layouts/component-test/component-test.vue | 284 +++++++++++++----- src/layouts/componentTest/componentTest.vue | 244 --------------- src/ux-components/radio-list/radio-list.vue | 48 +-- src/uxComponents/radioList/radioList.vue | 36 --- 4 files changed, 236 insertions(+), 376 deletions(-) delete mode 100644 src/layouts/componentTest/componentTest.vue delete mode 100644 src/uxComponents/radioList/radioList.vue diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue index 7351b2bff..205778e54 100644 --- a/src/layouts/component-test/component-test.vue +++ b/src/layouts/component-test/component-test.vue @@ -1,112 +1,244 @@ diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue deleted file mode 100644 index 205778e54..000000000 --- a/src/layouts/componentTest/componentTest.vue +++ /dev/null @@ -1,244 +0,0 @@ - - - diff --git a/src/ux-components/radio-list/radio-list.vue b/src/ux-components/radio-list/radio-list.vue index b6a02eca2..24b23effa 100644 --- a/src/ux-components/radio-list/radio-list.vue +++ b/src/ux-components/radio-list/radio-list.vue @@ -1,28 +1,36 @@ diff --git a/src/uxComponents/radioList/radioList.vue b/src/uxComponents/radioList/radioList.vue deleted file mode 100644 index 24b23effa..000000000 --- a/src/uxComponents/radioList/radioList.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - From ed818f178db0e93a6e1f82c7e9c0b30ef0e1e2fd Mon Sep 17 00:00:00 2001 From: bmauger Date: Mon, 22 Nov 2021 16:21:07 -0500 Subject: [PATCH 04/10] WIP loader component. --- package-lock.json | 29 ++++++++----- src/assets/img/icons/spinner.svg | 4 +- src/layouts/component-test/component-test.vue | 41 +++++++++++++------ src/styles/common-radio-styles.scss | 2 +- src/styles/mixins/customMixins.scss | 11 ++--- src/ux-components/loader/loader.spec.js | 1 + src/ux-components/loader/loader.vue | 31 ++++++++++++++ src/ux-components/radio-list/radio-list.vue | 8 ++-- 8 files changed, 91 insertions(+), 36 deletions(-) create mode 100644 src/ux-components/loader/loader.spec.js create mode 100644 src/ux-components/loader/loader.vue diff --git a/package-lock.json b/package-lock.json index 0ea2e31ca..88a73ac4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "canvas-confetti": "^1.4.0", "core-js": "^3.6.5", "http-status-codes": "^2.1.4", - "jest-junit": "^13.0.0", "vue": "^3.0.0", "vue-router": "^4.0.11", "vuex": "^4.0.2", @@ -32,6 +31,7 @@ "eslint": "^6.7.2", "eslint-plugin-prettier": "^3.3.1", "eslint-plugin-vue": "^7.0.0", + "jest-junit": "^13.0.0", "prettier": "^2.2.1", "sass": "^1.26.5", "sass-loader": "^8.0.2", @@ -10962,6 +10962,7 @@ "version": "13.0.0", "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-13.0.0.tgz", "integrity": "sha512-JSHR+Dhb32FGJaiKkqsB7AR3OqWKtldLd6ZH2+FJ8D4tsweb8Id8zEVReU4+OlrRO1ZluqJLQEETm+Q6/KilBg==", + "dev": true, "dependencies": { "mkdirp": "^1.0.4", "strip-ansi": "^6.0.1", @@ -10976,6 +10977,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -10984,6 +10986,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -10995,6 +10998,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -11006,6 +11010,7 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, "bin": { "uuid": "dist/bin/uuid" } @@ -11743,9 +11748,6 @@ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, - "dependencies": { - "graceful-fs": "^4.1.6" - }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -18003,7 +18005,6 @@ "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", "dev": true, "dependencies": { - "chokidar": "^3.4.1", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0" }, @@ -18067,7 +18068,6 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "fsevents": "^1.2.7", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -18982,7 +18982,8 @@ "node_modules/xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=" + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", + "dev": true }, "node_modules/xml-name-validator": { "version": "3.0.0", @@ -27872,6 +27873,7 @@ "version": "13.0.0", "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-13.0.0.tgz", "integrity": "sha512-JSHR+Dhb32FGJaiKkqsB7AR3OqWKtldLd6ZH2+FJ8D4tsweb8Id8zEVReU4+OlrRO1ZluqJLQEETm+Q6/KilBg==", + "dev": true, "requires": { "mkdirp": "^1.0.4", "strip-ansi": "^6.0.1", @@ -27882,17 +27884,20 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -27900,7 +27905,8 @@ "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true } } }, @@ -34454,7 +34460,8 @@ "xml": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=" + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", + "dev": true }, "xml-name-validator": { "version": "3.0.0", diff --git a/src/assets/img/icons/spinner.svg b/src/assets/img/icons/spinner.svg index 1c94e5de6..d5b7fe4c0 100644 --- a/src/assets/img/icons/spinner.svg +++ b/src/assets/img/icons/spinner.svg @@ -1,3 +1,3 @@ - - + + diff --git a/src/layouts/component-test/component-test.vue b/src/layouts/component-test/component-test.vue index 205778e54..15b42874c 100644 --- a/src/layouts/component-test/component-test.vue +++ b/src/layouts/component-test/component-test.vue @@ -28,6 +28,19 @@ radioID="backglass" /> +
+
+

Loader

+
+
+
+
+ +
+

Buttons

@@ -74,22 +87,22 @@ groupName="demo" ariaLabelBy="vehicle-year" radioID="2021" - spinnerColor="blue" - spinnerPosition="right" + loaderColor="blue" + loaderPosition="right" />
@@ -219,12 +232,13 @@ + + diff --git a/src/ux-components/radio-list/radio-list.vue b/src/ux-components/radio-list/radio-list.vue index 24b23effa..13ca433b3 100644 --- a/src/ux-components/radio-list/radio-list.vue +++ b/src/ux-components/radio-list/radio-list.vue @@ -2,14 +2,14 @@

{{errorMessage}}

From a03e24526ab4574dd8b63fad3229033d4961ce9c Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 23 Nov 2021 11:46:25 -0500 Subject: [PATCH 06/10] Styling and structure updates --- .../radio-question/radio-question.vue | 4 +- src/layouts/vehicle-year/vehicle-year.vue | 12 ++++++ src/store/store.spec.js | 2 +- .../ymms-common-styles.scss | 41 ------------------- src/styles/common-typography-styles.scss | 12 ++++++ vue.config.js | 1 - vue.release.config.js | 1 - 7 files changed, 27 insertions(+), 46 deletions(-) delete mode 100644 src/styles/common-component-styles/ymms-common-styles.scss diff --git a/src/common-components/radio-question/radio-question.vue b/src/common-components/radio-question/radio-question.vue index 2fb50f018..d17020dfc 100644 --- a/src/common-components/radio-question/radio-question.vue +++ b/src/common-components/radio-question/radio-question.vue @@ -1,6 +1,6 @@