@fishawack/lab-velocity 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <h1 class="h2">Register</h1>
3
- <p class="mb-2">Please enter your personal details to complete your registration.</p>
2
+ <h1 class="h2 h2--small">Register</h1>
3
+ <p class="AM-mb-3 AM-mt-2">Please enter your personal details to complete your registration.</p>
4
4
 
5
5
  <form @submit.prevent="submit" :class="form.errors && form.errors.any() ? 'form error' : 'form'" id="memberLoginForm">
6
6
  <el-input
7
- class="mb-2.5"
7
+ class="AM-mb-2"
8
8
  label="Full name"
9
9
  placeholder="Enter your full name"
10
10
  name="name"
@@ -14,7 +14,7 @@
14
14
  />
15
15
 
16
16
  <el-input
17
- class="mb-2.5"
17
+ class="AM-mb-2"
18
18
  label="Email"
19
19
  placeholder="Enter your email address"
20
20
  name="email"
@@ -25,7 +25,7 @@
25
25
  />
26
26
 
27
27
  <el-input
28
- class="mb-2.5"
28
+ class="AM-mb-2"
29
29
  label="Password"
30
30
  name="password"
31
31
  placeholder="Create a unique password"
@@ -49,15 +49,15 @@
49
49
  />
50
50
  </div>
51
51
 
52
- <button
53
- type="submit"
52
+ <elButton
53
+ type="primary"
54
54
  :disabled="loading || (form.name?.length < 1 || form.email?.length < 5 || !isPasswordValid)"
55
- class="button button--primary"
55
+ @click="onSubmit"
56
56
  >
57
57
  Register
58
- </button>
58
+ </elButton>
59
59
 
60
- <p class="disclaimer mt-2">
60
+ <p class="disclaimer AM-mt-3">
61
61
  Having trouble registering?
62
62
  <a :href="contact" class="underline">Contact us</a>
63
63
  </p>
@@ -66,7 +66,6 @@
66
66
 
67
67
  <script>
68
68
  import Form from "form-backend-validation";
69
- import { default as elInput} from "../../form/basic.vue";
70
69
 
71
70
  export default {
72
71
  data() {
@@ -86,7 +85,7 @@ export default {
86
85
  },
87
86
 
88
87
  methods: {
89
- async submit() {
88
+ async onSubmit() {
90
89
  if (this.loading) return;
91
90
 
92
91
  this.loading = true;
@@ -107,7 +106,7 @@ export default {
107
106
  console.log(res);
108
107
  if(res['redirect']) {
109
108
  // Redirect here
110
- this.$router.push({ name: `${this.$store.state.authBase}.account-exists`, query: {company:res['company']} });
109
+ this.$router.push({ name: `${this.$store.state.auth.authBase}.account-exists`, query: {company:res['company']} });
111
110
  } else {
112
111
  await this.postLogin();
113
112
  }
@@ -133,7 +132,7 @@ export default {
133
132
  if (this.$store.state.intended) {
134
133
  this.$router.push(this.$store.state.intended);
135
134
  } else {
136
- this.$router.push({ name: `${this.$store.state.authBase}.verify` });
135
+ this.$router.push({ name: `${this.$store.state.auth.authBase}.verify` });
137
136
  // Problem Here
138
137
  }
139
138
 
@@ -146,7 +145,8 @@ export default {
146
145
 
147
146
  components: {
148
147
  VPasswordValidation: require("./../components/VPasswordValidation.vue").default,
149
- elInput: elInput
148
+ elInput: require('../../form/basic.vue').default,
149
+ elButton: require('../../basic/Button.vue').default,
150
150
  },
151
151
  };
152
152
  </script>
@@ -1,18 +1,18 @@
1
1
  <template>
2
2
  <div class="relative">
3
3
  <section id="resetPasswordForm">
4
- <h1 class="h2">Reset password</h1>
4
+ <h1 class="h2 h2--small">Reset password</h1>
5
5
  <form class="form" @submit.prevent="submit">
6
6
  <div v-if="!form.successful">
7
- <p class="mt mb-0 color-21">
7
+ <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
8
8
  <strong class="">Email: {{ form?.email }}</strong>
9
9
  </p>
10
- <p class="mt-0.5">
10
+ <p class="AM-mt-0.5">
11
11
  Please create a new password. Passwords you have used previously aren’t permitted.
12
12
  </p>
13
13
  <el-input
14
14
  v-model="form.password"
15
- class="mt-2"
15
+ class="AM-mt-3"
16
16
  label="New Password"
17
17
  placeholder="Enter new password"
18
18
  name="password"
@@ -25,6 +25,7 @@
25
25
  <VPasswordValidation :password="form.password" @passwordValid="updatePasswordValidity" />
26
26
 
27
27
  <el-input
28
+ class="hidden"
28
29
  v-model="form.token"
29
30
  name="token"
30
31
  :error="form.errors"
@@ -32,27 +33,28 @@
32
33
  required
33
34
  />
34
35
 
35
- <button
36
- type="submit"
36
+ <elButton
37
+ type="primary"
37
38
  :disabled="form.processing || !isPasswordValid"
38
39
  :loading="form.processing"
39
- class="button button--primary mt-1.5"
40
+ @click="onSubmit"
41
+
40
42
  >
41
43
  <span v-text="'Reset password'" />
42
- </button>
44
+ </elButton>
43
45
  </div>
44
46
  <div v-else>
45
47
  <h4 class="mt" v-text="`Success!`" />
46
48
  <p v-text="`Your password has been reset.`" />
47
- <p class="disclaimer mb-2.5">
48
- <router-link
49
- class="color-1 underline"
50
- :to="{ name: `${$store.state.authBase}.login` }"
51
- >
52
- Back to Sign in
53
- </router-link>
54
- </p>
55
49
  </div>
50
+ <p class="disclaimer AM-mt-3">
51
+ <router-link
52
+ class="color-1 underline"
53
+ :to="{ name: `${$store.state.auth.authBase}.login` }"
54
+ >
55
+ Back to Sign in
56
+ </router-link>
57
+ </p>
56
58
  </form>
57
59
  </section>
58
60
  </div>
@@ -60,10 +62,8 @@
60
62
 
61
63
  <script>
62
64
  import Form from "form-backend-validation";
63
- import { default as elInput} from "../../form/basic.vue";
64
65
 
65
66
  export default {
66
- components: {},
67
67
  data() {
68
68
  return {
69
69
  form: new Form(
@@ -84,18 +84,18 @@ export default {
84
84
  },
85
85
 
86
86
  methods: {
87
- async submit() {
87
+ async onSubmit() {
88
88
  try {
89
89
  const res = await this.form.post("/reset-password");
90
90
 
91
91
  this.$router.push({
92
- name: `${this.$store.state.authBase}.success-reset`,
92
+ name: `${this.$store.state.auth.authBase}.success-reset`,
93
93
  query: { email: this.form.email },
94
94
  });
95
95
  } catch (e) {
96
96
  if (e.response && e.response.status === 422 && e.response.data.message === "This password reset token is invalid.") {
97
97
  this.$router.push({
98
- name: `${this.$store.state.authBase}.expired-reset`,
98
+ name: `${this.$store.state.auth.authBase}.expired-reset`,
99
99
  query: { email: this.form.email },
100
100
  });
101
101
  }
@@ -116,7 +116,8 @@ export default {
116
116
 
117
117
  components: {
118
118
  VPasswordValidation: require("./../components/VPasswordValidation.vue").default,
119
- elInput: elInput
119
+ elInput: require('../../form/basic.vue').default,
120
+ elButton: require('../../basic/Button.vue').default,
120
121
  },
121
122
  };
122
123
  </script>
@@ -1,21 +1,21 @@
1
1
  <template>
2
2
  <div class="relative">
3
3
  <section id="forgotPasswordForm">
4
- <h1 class="h2">Reset password</h1>
4
+ <h1 class="h2 h2--small">Reset password</h1>
5
5
 
6
6
  <form class="form" @submit.prevent="submit">
7
- <p class="mt mb-0 color-21">
7
+ <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
8
8
  <strong class="">Email: {{ form?.email }}</strong>
9
9
  </p>
10
- <p class="mt-0.5">
10
+ <p class="AM-mt">
11
11
  If this account exists we have sent an email containing instructions for resetting the password. <strong>Please check your inbox.</strong>
12
12
  </p>
13
- <p class="mt-0.5">
13
+ <p class="AM-mt-3 AM-mb">
14
14
  Haven’t received the email after 10 minutes?
15
15
  </p>
16
-
16
+
17
17
  <el-input
18
- class="mt-2 mb-2.5 hidden"
18
+ class="hidden"
19
19
  v-model="form.email"
20
20
  label="Email address"
21
21
  name="email"
@@ -25,19 +25,19 @@
25
25
  required
26
26
  />
27
27
 
28
- <button
29
- type="submit"
28
+ <elButton
29
+ type="primary"
30
30
  :disabled="form.processing"
31
31
  :loading="form.processing"
32
- class="button button--primary"
32
+ @click="onSubmit"
33
33
  >
34
34
  Re-send instructions
35
- </button>
35
+ </elButton>
36
36
 
37
- <p class="disclaimer mt-2">
37
+ <p class="disclaimer AM-mt-3">
38
38
  <router-link
39
39
  class="color-1 underline"
40
- :to="{ name: `${$store.state.authBase}.login` }"
40
+ :to="{ name: `${$store.state.auth.authBase}.login` }"
41
41
  >
42
42
  Back to Sign in
43
43
  </router-link>
@@ -49,11 +49,11 @@
49
49
 
50
50
  <script>
51
51
  import Form from "form-backend-validation";
52
- import { default as elInput} from "../../form/basic.vue";
53
52
 
54
53
  export default {
55
54
  components: {
56
- elInput: elInput
55
+ elInput: require('../../form/basic.vue').default,
56
+ elButton: require('../../basic/Button.vue').default,
57
57
  },
58
58
  data: () => ({
59
59
  form: new Form(
@@ -66,7 +66,7 @@ export default {
66
66
  }),
67
67
 
68
68
  methods: {
69
- async submit() {
69
+ async onSubmit() {
70
70
  try {
71
71
  if (this.notification) {
72
72
  this.notification.close();
@@ -103,7 +103,7 @@ export default {
103
103
  // If a user has come here directly then send them off to the original forgot screen to enter an email
104
104
  if (!this.form.email) {
105
105
  this.$router.push({
106
- name: `${this.$store.state.authBase}.forgot`,
106
+ name: `${this.$store.state.auth.authBase}.forgot`,
107
107
  });
108
108
  }
109
109
  },
@@ -1,21 +1,22 @@
1
1
  <template>
2
2
  <div class="relative">
3
3
  <section id="resetPasswordForm">
4
- <h1 class="h2">Success</h1>
4
+ <h1 class="h2 h2--small">Success</h1>
5
5
 
6
- <p class="mt mb-0 color-21">
6
+ <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
7
7
  <strong class="">Email: {{ $route.query.email }}</strong>
8
8
  </p>
9
- <p class="mt-0.5">
9
+ <p class="AM-mt">
10
10
  Your password has been reset. Please sign in to continue.
11
11
  </p>
12
12
 
13
- <router-link
14
- :to="{name: `${$store.state.authBase}.login`}"
15
- class="button button--primary px-2"
13
+ <elButton
14
+ tag="router-link"
15
+ type="primary"
16
+ :to="{name: `${$store.state.auth.authBase}.login`}"
16
17
  >
17
18
  <span v-text="'Sign in'" />
18
- </router-link>
19
+ </elButton>
19
20
  </section>
20
21
  </div>
21
22
  </template>
@@ -27,5 +28,8 @@ export default {
27
28
  title: "Reset Password | Success",
28
29
  };
29
30
  },
31
+ components: {
32
+ elButton: require('../../basic/Button.vue').default,
33
+ }
30
34
  };
31
35
  </script>
@@ -1,14 +1,15 @@
1
1
  <template>
2
- <h1 class="h2">Verification complete</h1>
3
- <p><strong>Welcome to Expert Partnership, {{ $store.state.user?.name }}!</strong></p>
2
+ <h1 class="h2 h2--small">Verification complete</h1>
3
+ <p class="mb-0"><strong>Welcome to Expert Partnership, {{ $store.state?.auth?.user?.name }}!</strong></p>
4
4
  <p>Your account has been verified successfully.</p>
5
5
 
6
- <router-link
7
- :to="{name: 'members'}"
8
- class="button button--primary px-2"
6
+ <elButton
7
+ tag="router-link"
8
+ type="primary"
9
+ :to="{name: $store.state.auth.redirect}"
9
10
  >
10
11
  <span v-text="'Continue'" />
11
- </router-link>
12
+ </elButton>
12
13
  </template>
13
14
 
14
15
  <script>
@@ -19,6 +20,9 @@ export default {
19
20
  this.$store.dispatch("getUser", {
20
21
  errors: this.$root.errors,
21
22
  });
23
+ },
24
+ components: {
25
+ elButton: require('../../basic/Button.vue').default,
22
26
  }
23
27
  // Problem in this file
24
28
  };
@@ -1,19 +1,19 @@
1
1
  <template>
2
- <h1 class="h2">Verify your email address</h1>
2
+ <h1 class="h2 h2--small">Verify your email address</h1>
3
3
 
4
4
  <form class="form" @submit.prevent="submit">
5
- <p class="mt mb-0 color-21">
5
+ <p class="AM-mt-2 AM-mb-0 AM-color-highlight">
6
6
  <strong class="">Email: {{ user?.email }}</strong>
7
7
  </p>
8
- <p class="mt-0.5">
8
+ <p class="AM-mt-0.5">
9
9
  <strong>Please check your inbox</strong> for a Verification email from Expert Partnership. Click the link in that email to verify your email address and complete your registration.
10
10
  </p>
11
- <p class="mt-0.5">
11
+ <p class="AM-mt-0.5 AM-mb-0">
12
12
  Haven’t received the email after 10 minutes?
13
13
  </p>
14
14
 
15
15
  <el-input
16
- class="mt-2 mb-2.5 hidden"
16
+ class="hidden"
17
17
  v-model="form.email"
18
18
  label="Email address"
19
19
  name="email"
@@ -23,16 +23,17 @@
23
23
  required
24
24
  />
25
25
 
26
- <button
27
- type="submit"
26
+ <elButton
27
+ class="AM-mt AM-mb-3"
28
+ type="primary"
28
29
  :disabled="form.processing"
29
30
  :loading="form.processing"
30
- class="button button--primary"
31
+ @click="onSubmit"
31
32
  >
32
33
  Re-send verification link
33
- </button>
34
+ </elButton>
34
35
 
35
- <p class="disclaimer mt-1.5">
36
+ <p class="disclaimer AM-mt-1.5">
36
37
  Having trouble singing in?
37
38
  <a :href="contact" class="underline">Contact us</a>
38
39
  </p>
@@ -41,11 +42,11 @@
41
42
 
42
43
  <script>
43
44
  import Form from "form-backend-validation";
44
- import { default as elInput} from "../../form/basic.vue";
45
45
 
46
46
  export default {
47
47
  components: {
48
- elInput: elInput
48
+ elInput: require('../../form/basic.vue').default,
49
+ elButton: require('../../basic/Button.vue').default,
49
50
  },
50
51
  data: () => ({
51
52
  user: null,
@@ -60,7 +61,7 @@ export default {
60
61
  }),
61
62
 
62
63
  methods: {
63
- async submit() {
64
+ async onSubmit() {
64
65
  try {
65
66
  if (this.notification) {
66
67
  this.notification.close();
package/_variables.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  @import "@fishawack/lab-ui/_variables.scss";
2
-
3
2
  // Set global variables here, e.g $color6: red;
3
+ @import "./modules/AuthVariables";
4
4
 
5
5
 
6
6
  $primaryFont: 'Inter';
@@ -29,4 +29,5 @@ $color9: #ff0000;
29
29
  $color10: #dcdbdb;
30
30
  $color11: #8C8C8C; //Used
31
31
  $color12: #5C5C5C;
32
- $colorAlert: #D53A3A;
32
+ $colorAlert: #D53A3A;
33
+ $color13: #3C976E;
package/general.scss CHANGED
@@ -28,6 +28,8 @@
28
28
  @import "./components/_alert.scss";
29
29
  @import "./components/_collapse.scss";
30
30
  @import "./components/_tooltip.scss";
31
+ @import "./components/_loader.scss";
32
+ @import "./modules/_AuthModule.scss";
31
33
 
32
34
 
33
35
  @import "./_base.scss";
@@ -1,3 +1,5 @@
1
+ @import "../components/button";
2
+
1
3
  // AuthModule
2
4
  .AuthModule {
3
5
  position: fixed;
@@ -7,19 +9,6 @@
7
9
  background: url('../media/content/images/hero-login-large.jpg') center top no-repeat;
8
10
  background-size: cover;
9
11
  z-index: 10;
10
- &:after {
11
- position: absolute;
12
- content: '';
13
- top: 0;
14
- left: 0;
15
- width: 100%;
16
- height: 100%;
17
- background-image: radial-gradient(circle at 15% 105%, #00e677de, rgba(0, 230, 118, 0) 35%);
18
- z-index: 0;
19
- @include breakpoint (max-width $mobileMax) {
20
- background-image: radial-gradient(circle at 15% 90%, #00e677de, rgba(0, 230, 118, 0) 50%);
21
- }
22
- }
23
12
 
24
13
  .logo {
25
14
  width: 13.3rem;
@@ -43,23 +32,28 @@
43
32
  transform: translate(-50%, 0);
44
33
  padding: 24px;
45
34
  width: calc(100% - 80px);
46
- .h2 {
47
- font-size: 2.4rem;
48
- line-height: 3.2rem;
35
+ h2 .h2 {
36
+ font-size: get-ratio(24px);
37
+ line-height: get-ratio(32px);
49
38
  }
50
39
  }
51
40
 
52
41
  h2, .h2 {
53
- line-height: 4.4rem;
42
+ line-height: get-ratio(50px);
43
+ font-size: get-ratio(48px);
44
+ }
45
+ .h2--small {
46
+ font-size: get-ratio(36px);
47
+ line-height: get-ratio(44px);
54
48
  }
55
49
 
56
50
  p {
57
- font-size: 1.4rem;
58
- line-height: 2rem;
59
- margin-bottom: 2rem;
51
+ font-size: get-ratio(14px);
52
+ line-height: get-ratio(20px);
53
+ margin-bottom: get-ratio(24px);
60
54
  letter-spacing: -0.1px;
61
55
  &.disclaimer {
62
- font-size: 1.2rem;
56
+ font-size: get-ratio(12px);
63
57
  color: rgba($color1, 0.5);
64
58
  margin: 0;
65
59
  }
@@ -72,9 +66,11 @@
72
66
  }
73
67
  }
74
68
 
75
- .button {
69
+ .vel-button {
76
70
  max-width: 200px;
77
71
  width: 200px;
72
+ padding: 9px 23.5px;
73
+ font-size: 14px;
78
74
  @include breakpoint (max-width $mobileMax) {
79
75
  max-width: unset;
80
76
  width: 100%;
@@ -85,28 +81,41 @@
85
81
  &.error {
86
82
  .form__input {
87
83
  .el-input__wrapper {
88
- border: 0.2rem solid $color20;
84
+ border: 0.2rem solid red;
89
85
  }
90
86
  }
91
87
  .form__input.error {
92
88
  border:none;
93
89
  .el-input__wrapper {
94
- border: 0.2rem solid $color10;
90
+ border: 0.2rem solid red;
95
91
  }
96
92
  }
97
93
  }
98
94
  &__icon-container{
99
95
  position: absolute;
100
96
  top: 50%;
101
- right: get-ratio($spacing * 1.5);
97
+ right: $spacing * 1.5;
102
98
  transform: translateY(-50%);
103
99
  display: flex;
104
100
  }
105
101
  &__action-icon {
106
- margin-left: get-ratio($spacing * 0.5);
102
+ margin-left: $spacing * 0.5;
107
103
  cursor: pointer;
108
104
  }
109
105
  }
106
+ .vel-basic__label {
107
+ font-size: get-ratio(12px);
108
+ color: rgba($color1, 0.5);
109
+ }
110
+ .vel-basic__textbox {
111
+ --el-border-color:#CFD8DD;
112
+ font-size: get-ratio(14px);
113
+ padding-bottom: $am-spacing * 2.5;
114
+
115
+ .el-input__inner {
116
+ --el-input-inner-height:38px;
117
+ }
118
+ }
110
119
  }
111
120
 
112
121
  .AuthModule__logo__container {
@@ -126,4 +135,56 @@
126
135
  max-width: 1024px;
127
136
  width: 100%;
128
137
  height: 100%;
138
+ }
139
+
140
+
141
+ .AM-mb{
142
+ margin-bottom: $am-spacing !important;
143
+ }
144
+ .AM-mt{
145
+ margin-top: $am-spacing !important;
146
+ }
147
+ .AM-pb{
148
+ padding-bottom: $am-spacing !important;
149
+ }
150
+ .AM-pt{
151
+ padding-top: $am-spacing !important;
152
+ }
153
+ @for $i from 1 through 5 {
154
+
155
+ .AM-mb-#{$i - 1} {
156
+ margin-bottom: ($i - 1) * $am-spacing !important;
157
+ }
158
+
159
+ .AM-mb-#{$i - 1}\.5 {
160
+ margin-bottom: ($i - .5) * $am-spacing !important;
161
+ }
162
+
163
+ .AM-mt-#{$i - 1} {
164
+ margin-top: ($i - 1) * $am-spacing !important;
165
+ }
166
+
167
+ .AM-mt-#{$i - 1}\.5 {
168
+ margin-top: ($i - .5) * $am-spacing !important;
169
+ }
170
+
171
+ .AM-pt-#{$i - 1} {
172
+ padding-top: ($i - 1) * $am-spacing !important;
173
+ }
174
+
175
+ .AM-pt-#{$i - 1}\.5 {
176
+ padding-top: ($i - .5) * $am-spacing !important;
177
+ }
178
+
179
+ .AM-pb-#{$i - 1} {
180
+ padding-bottom: ($i - 1) * $am-spacing !important;
181
+ }
182
+
183
+ .AM-pb-#{$i - 1}\.5 {
184
+ padding-bottom: ($i - .5) * $am-spacing !important;
185
+ }
186
+ }
187
+
188
+ .AM-color-highlight {
189
+ color: $am-highlight;
129
190
  }
@@ -0,0 +1,2 @@
1
+ $am-spacing: 8px;
2
+ $am-highlight: #3C976E;
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@fishawack/lab-velocity",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "Avalere Health branded style system",
5
5
  "scripts": {
6
6
  "setup": "npm ci || npm i && npm run content",
7
7
  "content": "npm run content --prefix node_modules/@fishawack/core/",
8
8
  "start": "npm run production && npm run story:dev",
9
+ "start-modules": "npm start --prefix node_modules/@fishawack/core/",
9
10
  "production": "npm run production --prefix node_modules/@fishawack/core/ && npm run story:build",
10
11
  "test": "npm test --prefix node_modules/@fishawack/core/",
11
12
  "package": "npm run package --prefix node_modules/@fishawack/core/",
@@ -13,7 +14,7 @@
13
14
  "mail": "npm run mail --prefix node_modules/@fishawack/core/",
14
15
  "story:dev": "histoire dev",
15
16
  "story:build": "histoire build",
16
- "preversion": "cp -r _Build/sass/** ./ && cp -r _Build/vue/components/** ./ && cp -r _Build/vue/modules/** ./"
17
+ "preversion": "cp -r _Build/sass/** ./ && cp -r _Build/vue/components/** ./ && cp -r _Build/vue/modules/AuthModule ./"
17
18
  },
18
19
  "license": "BSD-3-Clause",
19
20
  "author": {
@@ -52,6 +53,7 @@
52
53
  "@tiptap/starter-kit": "^2.11.2",
53
54
  "@tiptap/vue-3": "^2.11.2",
54
55
  "element-plus": "^2.7.8",
56
+ "form-backend-validation": "github:mikemellor11/form-backend-validation#master",
55
57
  "quill": "^1.3.7",
56
58
  "sanitize-html": "^2.13.1"
57
59
  },