classcard-ui 0.2.651 → 0.2.652
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 +111 -72
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +111 -72
- 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 +12 -3
- package/src/components/CTextarea/CTextarea.vue +15 -5
- package/src/components/CUpload/CUpload.vue +9 -1
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div class="flex justify-between">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
<div class="flex items-center">
|
|
5
|
+
<!-- label of input field -->
|
|
6
|
+
<label v-if="label" class="block text-sm font-medium text-gray-900">
|
|
7
|
+
{{ label }}
|
|
8
|
+
</label>
|
|
9
|
+
<!-- asterisk sign to render if field is required -->
|
|
10
|
+
<p v-if="isRequired" class="ml-1 text-red-600">*</p>
|
|
11
|
+
</div>
|
|
7
12
|
<span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
|
|
8
13
|
</div>
|
|
9
14
|
<div class="relative mt-1 rounded-md">
|
|
@@ -51,6 +56,10 @@ export default {
|
|
|
51
56
|
value: {
|
|
52
57
|
type: String,
|
|
53
58
|
},
|
|
59
|
+
// whether the email field is mandatory or not
|
|
60
|
+
isRequired: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
},
|
|
54
63
|
},
|
|
55
64
|
data() {
|
|
56
65
|
return {
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div class="flex justify-between">
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
<div class="flex items-center">
|
|
5
|
+
<!-- label of input field -->
|
|
6
|
+
<label v-if="label" class="block text-sm font-medium text-gray-900">
|
|
7
|
+
{{ label }}
|
|
8
|
+
</label>
|
|
9
|
+
<!-- asterisk sign to render if field is required -->
|
|
10
|
+
<p v-if="isRequired" class="ml-1 text-red-600">*</p>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
7
13
|
<span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
|
|
8
14
|
</div>
|
|
9
15
|
|
|
@@ -16,11 +22,11 @@
|
|
|
16
22
|
:rows="rows"
|
|
17
23
|
:class="errorClasses"
|
|
18
24
|
:disabled="disabled"
|
|
19
|
-
class="shadow-sm focus:
|
|
25
|
+
class="block w-full rounded-md text-gray-900 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 disabled:opacity-50 sm:text-sm"
|
|
20
26
|
></textarea>
|
|
21
27
|
<div
|
|
22
28
|
v-if="!isValidate"
|
|
23
|
-
class="absolute inset-y-0 right-0
|
|
29
|
+
class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-red-600"
|
|
24
30
|
>
|
|
25
31
|
<c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
|
|
26
32
|
</div>
|
|
@@ -57,6 +63,10 @@ export default {
|
|
|
57
63
|
errorMessage: {
|
|
58
64
|
type: String,
|
|
59
65
|
},
|
|
66
|
+
// whether the textarea field is mandatory or not
|
|
67
|
+
isRequired: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
},
|
|
60
70
|
disabled: {
|
|
61
71
|
type: Boolean,
|
|
62
72
|
default: false,
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex h-full flex-col">
|
|
3
3
|
<div class="flex items-center justify-between">
|
|
4
|
-
<
|
|
4
|
+
<div class="flex items-center">
|
|
5
|
+
<!-- label of input field -->
|
|
6
|
+
<label class="block text-sm font-medium text-gray-900">{{ label }}</label>
|
|
7
|
+
<!-- asterisk sign to render if field is required -->
|
|
8
|
+
<p v-if="isRequired" class="ml-1 text-red-600">*</p>
|
|
9
|
+
</div>
|
|
5
10
|
<label v-if="!isUploaded" class="block text-sm font-medium text-gray-400">
|
|
6
11
|
{{ hint }}
|
|
7
12
|
</label>
|
|
@@ -175,6 +180,9 @@ export default {
|
|
|
175
180
|
type: Array,
|
|
176
181
|
default: () => ["local_file_system", "unsplash"],
|
|
177
182
|
},
|
|
183
|
+
isRequired:{
|
|
184
|
+
type:Boolean
|
|
185
|
+
}
|
|
178
186
|
},
|
|
179
187
|
data() {
|
|
180
188
|
return {};
|