classcard-ui 0.2.253 → 0.2.258
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 +121 -90
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.css +1 -1
- package/dist/classcard-ui.umd.js +121 -90
- 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 +1 -1
- 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 +30 -1
- package/src/components/CPhoneNumber/CPhoneNumber.vue +1 -0
- package/src/components/CTextarea/CTextarea.vue +1 -1
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"
|
|
@@ -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>
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
:options="options"
|
|
16
16
|
@input="setSelectedOptions"
|
|
17
17
|
@search="fetchOptions"
|
|
18
|
+
@search:focus="$emit('search:focus')"
|
|
18
19
|
:label="optionLabel"
|
|
19
20
|
:clearable="clearable"
|
|
21
|
+
:loading="loading"
|
|
20
22
|
>
|
|
21
23
|
<template #open-indicator="{ attributes }">
|
|
22
24
|
<span v-bind="attributes">
|
|
@@ -41,6 +43,29 @@
|
|
|
41
43
|
>
|
|
42
44
|
<span v-else>No options found, try searching something else.</span>
|
|
43
45
|
</template>
|
|
46
|
+
<template #spinner="{ loading }">
|
|
47
|
+
<svg
|
|
48
|
+
class="animate-spin h-5 w-5 text-gray-400"
|
|
49
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
50
|
+
fill="none"
|
|
51
|
+
viewBox="0 0 24 24"
|
|
52
|
+
v-if="loading"
|
|
53
|
+
>
|
|
54
|
+
<circle
|
|
55
|
+
class="opacity-25"
|
|
56
|
+
cx="12"
|
|
57
|
+
cy="12"
|
|
58
|
+
r="10"
|
|
59
|
+
stroke="currentColor"
|
|
60
|
+
stroke-width="4"
|
|
61
|
+
></circle>
|
|
62
|
+
<path
|
|
63
|
+
class="opacity-75"
|
|
64
|
+
fill="currentColor"
|
|
65
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
66
|
+
></path>
|
|
67
|
+
</svg>
|
|
68
|
+
</template>
|
|
44
69
|
<template slot="option" slot-scope="option">
|
|
45
70
|
<slot name="custom-option" v-bind:option="option"></slot>
|
|
46
71
|
</template>
|
|
@@ -137,6 +162,10 @@ export default {
|
|
|
137
162
|
errorMessage: {
|
|
138
163
|
type: String,
|
|
139
164
|
},
|
|
165
|
+
loading: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
default: false,
|
|
168
|
+
},
|
|
140
169
|
},
|
|
141
170
|
computed: {},
|
|
142
171
|
data() {
|
|
@@ -179,7 +208,7 @@ export default {
|
|
|
179
208
|
@apply rounded-b-md;
|
|
180
209
|
}
|
|
181
210
|
.vs__selected {
|
|
182
|
-
@apply border-none m-0 py-0
|
|
211
|
+
@apply border-none m-0 py-0 pl-0 pr-1.5 mr-1;
|
|
183
212
|
}
|
|
184
213
|
.vs__search,
|
|
185
214
|
.vs__search:focus {
|
|
@@ -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"
|