classcard-ui 0.2.256 → 0.2.260
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 +120 -111
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.css +1 -1
- package/dist/classcard-ui.umd.js +120 -111
- 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/CDatepicker/CDatepicker.vue +1 -1
- package/src/components/CEditor/CEditor.vue +18 -17
- package/src/components/CGroupedSelect/CGroupedSelect.vue +8 -0
- package/src/components/CInput/CInput.vue +1 -1
- package/src/components/CInputAddon/CInputAddon.vue +4 -4
- package/src/components/CInputEmail/CInputEmail.vue +7 -7
- package/src/components/CMultiselect/CMultiselect.vue +1 -1
- package/src/components/CPhoneNumber/CPhoneNumber.vue +1 -0
- package/src/components/CTextarea/CTextarea.vue +1 -1
- package/src/stories/CEditor.stories.js +1 -0
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
:class="[
|
|
39
39
|
disabled
|
|
40
40
|
? 'border-gray-100 border-l-0 text-gray-400'
|
|
41
|
-
: 'border-gray-300 border-l-0 text-gray-
|
|
41
|
+
: 'border-gray-300 border-l-0 text-gray-900',
|
|
42
42
|
'bg-white w-full p-2 appearance-none border rounded-r-md focus:outline-none focus:border-blue-500 text-sm',
|
|
43
43
|
]"
|
|
44
44
|
:readonly="disabled"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
<quill-editor
|
|
8
8
|
class="mt-1 text-sm"
|
|
9
|
-
|
|
9
|
+
:value="content"
|
|
10
10
|
:options="editorOption"
|
|
11
11
|
@change="onChange($event)"
|
|
12
12
|
></quill-editor>
|
|
@@ -42,27 +42,25 @@ export default {
|
|
|
42
42
|
onEditorChange: {
|
|
43
43
|
type: Function,
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
editorOption: {
|
|
49
|
-
modules: {
|
|
50
|
-
toolbar: {
|
|
51
|
-
container: this.toolbarOptions,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
editorText: this.content,
|
|
56
|
-
};
|
|
45
|
+
placeholder: {
|
|
46
|
+
type: String,
|
|
47
|
+
},
|
|
57
48
|
},
|
|
58
49
|
methods: {
|
|
59
50
|
onChange(params) {
|
|
60
51
|
this.$emit("onEditorChange", params);
|
|
61
52
|
},
|
|
62
53
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
computed: {
|
|
55
|
+
editorOption() {
|
|
56
|
+
return {
|
|
57
|
+
modules: {
|
|
58
|
+
toolbar: {
|
|
59
|
+
container: this.toolbarOptions,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
placeholder: this.placeholder,
|
|
63
|
+
};
|
|
66
64
|
},
|
|
67
65
|
},
|
|
68
66
|
};
|
|
@@ -80,6 +78,9 @@ export default {
|
|
|
80
78
|
}
|
|
81
79
|
|
|
82
80
|
.ql-editor {
|
|
83
|
-
@apply text-sm;
|
|
81
|
+
@apply text-sm text-gray-900;
|
|
82
|
+
}
|
|
83
|
+
.ql-editor.ql-blank::before {
|
|
84
|
+
@apply text-gray-500 not-italic;
|
|
84
85
|
}
|
|
85
86
|
</style>
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
<!-- More items... -->
|
|
146
146
|
</ul>
|
|
147
147
|
</div>
|
|
148
|
+
<p v-if="!isValidate" class="mt-2 text-sm text-red-600">
|
|
149
|
+
{{ errorMessage }}
|
|
150
|
+
</p>
|
|
148
151
|
</div>
|
|
149
152
|
</template>
|
|
150
153
|
|
|
@@ -159,6 +162,11 @@ export default {
|
|
|
159
162
|
value: Object,
|
|
160
163
|
placeholder: String,
|
|
161
164
|
isSearching: Boolean,
|
|
165
|
+
isError: { type: Boolean, default: false },
|
|
166
|
+
errorMessage: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: "This field cannot be empty",
|
|
169
|
+
},
|
|
162
170
|
},
|
|
163
171
|
data() {
|
|
164
172
|
return {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@input="$emit('input', $event.target.value)"
|
|
20
20
|
@blur="$emit('blur', $event.target.value)"
|
|
21
21
|
:class="errorClasses"
|
|
22
|
-
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50"
|
|
22
|
+
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
|
|
23
23
|
:placeholder="placeholder"
|
|
24
24
|
:disabled="disabled"
|
|
25
25
|
/>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
@input="$emit('input', $event.target.value)"
|
|
29
29
|
@blur="$emit('blur', $event.target.value)"
|
|
30
30
|
:class="{ ...errorClasses, 'rounded-l-md': !addon }"
|
|
31
|
-
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-r-md sm:text-sm disabled:opacity-50"
|
|
31
|
+
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-r-md sm:text-sm disabled:opacity-50 text-gray-900"
|
|
32
32
|
:placeholder="placeholder"
|
|
33
33
|
:disabled="disabled"
|
|
34
34
|
/>
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
@input="$emit('input', $event.target.value)"
|
|
50
50
|
@blur="$emit('blur', $event.target.value)"
|
|
51
51
|
:class="errorClasses"
|
|
52
|
-
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-l-md sm:text-sm disabled:opacity-50"
|
|
52
|
+
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-l-md sm:text-sm disabled:opacity-50 text-gray-900"
|
|
53
53
|
:placeholder="placeholder"
|
|
54
54
|
:disabled="disabled"
|
|
55
55
|
/>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
@input="$emit('input', $event.target.value)"
|
|
77
77
|
@blur="$emit('blur', $event.target.value)"
|
|
78
78
|
:class="errorClasses"
|
|
79
|
-
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50"
|
|
79
|
+
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
|
|
80
80
|
:placeholder="placeholder"
|
|
81
81
|
:disabled="disabled"
|
|
82
82
|
/>
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
@blur="$emit('blur', $event.target.value)"
|
|
118
118
|
:class="errorClasses"
|
|
119
119
|
:style="`padding-left:${leftPaddingStyle}`"
|
|
120
|
-
class="focus:ring-indigo-500 focus:border-indigo-500 block w-full rounded-md sm:text-sm disabled:opacity-50"
|
|
120
|
+
class="focus:ring-indigo-500 focus:border-indigo-500 block w-full rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
|
|
121
121
|
:placeholder="placeholder"
|
|
122
122
|
:disabled="disabled"
|
|
123
123
|
/>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<input
|
|
11
11
|
type="text"
|
|
12
12
|
:class="errorClasses"
|
|
13
|
-
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-96 px-3 py-2 rounded-md sm:text-sm"
|
|
13
|
+
class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-96 px-3 py-2 rounded-md sm:text-sm text-gray-900"
|
|
14
14
|
:placeholder="placeholder"
|
|
15
15
|
v-model="email"
|
|
16
16
|
@blur="checkValidation"
|
|
@@ -69,12 +69,12 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
methods: {
|
|
71
71
|
checkValidation() {
|
|
72
|
-
this.isValidate =
|
|
73
|
-
this.email
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
72
|
+
this.isValidate =
|
|
73
|
+
/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(this.email) ||
|
|
74
|
+
this.email == ""
|
|
75
|
+
? false
|
|
76
|
+
: true;
|
|
77
|
+
},
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
80
|
</script>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
:rows="rows"
|
|
17
17
|
:class="errorClasses"
|
|
18
18
|
:disabled="disabled"
|
|
19
|
-
class="focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md disabled:opacity-50"
|
|
19
|
+
class="focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md disabled:opacity-50 text-gray-900"
|
|
20
20
|
></textarea>
|
|
21
21
|
<div
|
|
22
22
|
v-if="!isValidate"
|