classcard-ui 0.2.314 → 0.2.315
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.
- package/dist/classcard-ui.common.js +52 -56
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +52 -56
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CInputEmail/CInputEmail.vue +9 -14
package/package.json
CHANGED
|
@@ -1,34 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div class="flex justify-between
|
|
3
|
+
<div class="flex justify-between">
|
|
4
4
|
<label class="block text-sm font-medium text-gray-900">
|
|
5
5
|
{{ label }}
|
|
6
6
|
</label>
|
|
7
|
-
<span v-if="hint
|
|
7
|
+
<span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="relative mt-1
|
|
9
|
+
<div class="relative mt-1 rounded-md">
|
|
10
10
|
<input
|
|
11
11
|
type="text"
|
|
12
12
|
:class="errorClasses"
|
|
13
|
-
class="
|
|
13
|
+
class="block flex-1 rounded-md px-3 py-2 text-gray-900 focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
|
14
14
|
:placeholder="placeholder"
|
|
15
15
|
v-model="email"
|
|
16
16
|
@blur="checkValidation"
|
|
17
|
+
@input="$emit('input', $event.target.value)"
|
|
17
18
|
/>
|
|
18
19
|
<div
|
|
19
20
|
v-if="isValidate"
|
|
20
|
-
class="absolute inset-y-0 right-0
|
|
21
|
+
class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-red-600"
|
|
21
22
|
>
|
|
22
23
|
<c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
|
|
23
24
|
</div>
|
|
24
25
|
</div>
|
|
25
|
-
<p v-if="isValidate" class="mt-2 text-sm text-red-600">
|
|
26
|
-
|
|
27
|
-
</p>
|
|
28
|
-
<p
|
|
29
|
-
v-if="helpText.length && isValidate == false"
|
|
30
|
-
class="mt-2 text-sm text-gray-500"
|
|
31
|
-
>
|
|
26
|
+
<p v-if="isValidate" class="mt-2 text-sm text-red-600">Please enter valid email address</p>
|
|
27
|
+
<p v-if="helpText.length && isValidate == false" class="mt-2 text-sm text-gray-500">
|
|
32
28
|
{{ helpText }}
|
|
33
29
|
</p>
|
|
34
30
|
</div>
|
|
@@ -70,8 +66,7 @@ export default {
|
|
|
70
66
|
methods: {
|
|
71
67
|
checkValidation() {
|
|
72
68
|
this.isValidate =
|
|
73
|
-
/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(this.email) ||
|
|
74
|
-
this.email == ""
|
|
69
|
+
/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(this.email) || this.email == ""
|
|
75
70
|
? false
|
|
76
71
|
: true;
|
|
77
72
|
},
|