From 7d100b652b24c935dbff651952d4d52124886fb7 Mon Sep 17 00:00:00 2001 From: bmauger Date: Mon, 15 Nov 2021 16:53:23 -0500 Subject: [PATCH 1/7] WIP - alerts component --- src/layouts/componentTest/componentTest.vue | 20 +++++++++++++- src/styles/uxVariables.scss | 5 ++++ src/uxComponents/alert/alert.spec.js | 1 + src/uxComponents/alert/alert.vue | 29 +++++++++++++++++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 src/uxComponents/alert/alert.spec.js create mode 100644 src/uxComponents/alert/alert.vue diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue index 905a1b1b7..c1b669b59 100644 --- a/src/layouts/componentTest/componentTest.vue +++ b/src/layouts/componentTest/componentTest.vue @@ -112,6 +112,22 @@
h6 Heading
+
+
+ + +
+
@@ -121,6 +137,7 @@ import buttonSecondary from "@/uxComponents/buttonSecondary/buttonSecondary"; import radioCard from "@/uxComponents/radioCard/radioCard"; import listButton from "@/uxComponents/listButton/listButton"; import radioList from "@/uxComponents/radioList/radioList"; +import alert from "@/uxComponents/alert/alert"; export default { name: "App", components: { @@ -128,7 +145,8 @@ export default { buttonSecondary, radioCard, listButton, - radioList + radioList, + alert }, }; diff --git a/src/styles/uxVariables.scss b/src/styles/uxVariables.scss index 31ad10d5d..c4f874598 100644 --- a/src/styles/uxVariables.scss +++ b/src/styles/uxVariables.scss @@ -163,3 +163,8 @@ $box-shadow: 0 .5rem 1rem rgba($black, .15); $box-shadow-sm: 0 .125rem .25rem rgba($black, .075); $box-shadow-lg: 0 1rem 3rem rgba($black, .25);//Safelite default $box-shadow-inset: inset 0 1px 2px rgba($black, .075); + + +$alert-bg-scale: -90%; +$alert-border-scale: -100%; +$alert-color-scale: 40%; diff --git a/src/uxComponents/alert/alert.spec.js b/src/uxComponents/alert/alert.spec.js new file mode 100644 index 000000000..882a68129 --- /dev/null +++ b/src/uxComponents/alert/alert.spec.js @@ -0,0 +1 @@ +test.todo('some test to be written in the future'); \ No newline at end of file diff --git a/src/uxComponents/alert/alert.vue b/src/uxComponents/alert/alert.vue new file mode 100644 index 000000000..c9d22f9e2 --- /dev/null +++ b/src/uxComponents/alert/alert.vue @@ -0,0 +1,29 @@ + + + From 6974a6236832f82855e13c14324f3e58a910bfe2 Mon Sep 17 00:00:00 2001 From: bmauger Date: Tue, 16 Nov 2021 18:29:06 -0500 Subject: [PATCH 2/7] CSR-185 Create alert/notification component. Four colors, dismissable/close button. --- src/assets/img/icons/close.svg | 3 ++ src/layouts/componentTest/componentTest.vue | 4 +- src/styles/commonAlertStyles.scss | 47 +++++++++++++++++++++ src/styles/uxVariables.scss | 2 +- src/uxComponents/alert/alert.vue | 15 ++++--- vue.config.js | 1 + vue.release.config.js | 1 + 7 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 src/assets/img/icons/close.svg create mode 100644 src/styles/commonAlertStyles.scss diff --git a/src/assets/img/icons/close.svg b/src/assets/img/icons/close.svg new file mode 100644 index 000000000..e660dc6b8 --- /dev/null +++ b/src/assets/img/icons/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue index c1b669b59..332560b73 100644 --- a/src/layouts/componentTest/componentTest.vue +++ b/src/layouts/componentTest/componentTest.vue @@ -117,12 +117,12 @@ diff --git a/src/styles/commonAlertStyles.scss b/src/styles/commonAlertStyles.scss new file mode 100644 index 000000000..28e924d93 --- /dev/null +++ b/src/styles/commonAlertStyles.scss @@ -0,0 +1,47 @@ + +.alert { + button { + display: none; + } + .btn-close { + background: none; + opacity: 1; + } + &.alert-dismissible { + button { + display: flex; + } + } + &.alert-info { + .alert-heading { + color: $blue-700; + } + svg { + fill: $blue-700; + } + } + &.alert-danger { + .alert-heading { + color: $red-700; + } + svg { + fill: $red-700; + } + } + &.alert-warning { + .alert-heading { + color: $yellow-700; + } + svg { + fill: $yellow-700; + } + } + &.alert-success { + .alert-heading { + color: $green-700; + } + svg { + fill: $green-700; + } + } +} diff --git a/src/styles/uxVariables.scss b/src/styles/uxVariables.scss index c4f874598..7998b7a87 100644 --- a/src/styles/uxVariables.scss +++ b/src/styles/uxVariables.scss @@ -164,7 +164,7 @@ $box-shadow-sm: 0 .125rem .25rem rgba($black, .075); $box-shadow-lg: 0 1rem 3rem rgba($black, .25);//Safelite default $box-shadow-inset: inset 0 1px 2px rgba($black, .075); - +//Alerts $alert-bg-scale: -90%; $alert-border-scale: -100%; $alert-color-scale: 40%; diff --git a/src/uxComponents/alert/alert.vue b/src/uxComponents/alert/alert.vue index c9d22f9e2..8e50fd5ca 100644 --- a/src/uxComponents/alert/alert.vue +++ b/src/uxComponents/alert/alert.vue @@ -1,13 +1,15 @@ @@ -21,8 +23,7 @@ export default { }, data() { return { - isDismissable: true, - isClose: true + isDismissable: true }; } }; diff --git a/vue.config.js b/vue.config.js index bda41b2dd..ba8d382a1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -27,6 +27,7 @@ module.exports = { @import "@/styles/commonRadioStyles.scss"; @import "@/styles/commonTypographyStyles.scss"; @import "@/styles/commonComponentStyles/ymmsCommonStyles.scss"; + @import "@/styles/commonAlertStyles.scss"; ` } } diff --git a/vue.release.config.js b/vue.release.config.js index 5bc60309f..296d833c5 100644 --- a/vue.release.config.js +++ b/vue.release.config.js @@ -17,6 +17,7 @@ module.exports = { @import "@/styles/commonRadioStyles.scss"; @import "@/styles/commonTypographyStyles.scss"; @import "@/styles/commonComponentStyles/ymmsCommonStyles.scss"; + @import "@/styles/commonAlertStyles.scss"; ` } } From 9a82787ae3bdee11e7a24732966192474893a507 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 17 Nov 2021 09:13:32 -0500 Subject: [PATCH 3/7] CSR-116 Resolve merge conflict. --- src/layouts/componentTest/componentTest.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue index 332560b73..376ccc851 100644 --- a/src/layouts/componentTest/componentTest.vue +++ b/src/layouts/componentTest/componentTest.vue @@ -128,6 +128,16 @@ /> +
+
+
+ +
+
+
From b1db0606eebb5f553cf746008e65a391cbb3d900 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 17 Nov 2021 09:35:01 -0500 Subject: [PATCH 4/7] Remove unneeded row. Discussed with Max, neither of us is sure why this was here. --- src/layouts/componentTest/componentTest.vue | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue index 01f15ff55..1eafa1e14 100644 --- a/src/layouts/componentTest/componentTest.vue +++ b/src/layouts/componentTest/componentTest.vue @@ -128,16 +128,6 @@ /> -
-
-
- -
-
-
From b477a6f5f0136761206626f64957d790ed426f85 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 17 Nov 2021 19:13:25 -0500 Subject: [PATCH 5/7] CSR-185 update Alert component. --- src/layouts/componentTest/componentTest.vue | 174 ++++++++++++-------- src/styles/commonAlertStyles.scss | 47 ------ src/uxComponents/alert/alert.vue | 73 ++++++-- vue.config.js | 1 - vue.release.config.js | 1 - 5 files changed, 171 insertions(+), 125 deletions(-) delete mode 100644 src/styles/commonAlertStyles.scss diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue index 1eafa1e14..8f5316d14 100644 --- a/src/layouts/componentTest/componentTest.vue +++ b/src/layouts/componentTest/componentTest.vue @@ -1,47 +1,47 @@ -