classcard-ui 0.2.301 → 0.2.302
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 +31 -21
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +31 -21
- 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 +17 -10
- package/src/components/CMultiselect/CMultiselect.vue +18 -18
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<div class="flex items-center">
|
|
4
|
+
<div v-if="label">
|
|
5
|
+
<label class="block text-sm font-medium text-gray-900">
|
|
6
|
+
{{ label }}
|
|
7
|
+
</label>
|
|
8
|
+
</div>
|
|
9
|
+
<!-- asterisk sign to render if field is required -->
|
|
10
|
+
<p v-if="isRequired" class="ml-1 text-red-600">*</p>
|
|
7
11
|
</div>
|
|
8
12
|
<v-date-picker
|
|
9
13
|
:class="{ 'inline-block h-full': true, 'w-full': isExpanded }"
|
|
@@ -14,12 +18,12 @@
|
|
|
14
18
|
firstDayOfWeek="2"
|
|
15
19
|
>
|
|
16
20
|
<template v-slot="{ inputValue, togglePopover }">
|
|
17
|
-
<div class="flex items-center
|
|
21
|
+
<div class="mt-1 flex items-center">
|
|
18
22
|
<button
|
|
19
23
|
type="button"
|
|
20
24
|
:class="[
|
|
21
|
-
disabled ? 'border-gray-100
|
|
22
|
-
'
|
|
25
|
+
disabled ? 'pointer-events-none border-gray-100' : 'border-gray-300',
|
|
26
|
+
'bg-blue-100 hover:bg-blue-200 text-blue-600 focus:bg-blue-500 focus:border-blue-500 focus:outline-none rounded-l-md border p-2 shadow-sm focus:text-white',
|
|
23
27
|
]"
|
|
24
28
|
@click="togglePopover()"
|
|
25
29
|
>
|
|
@@ -33,9 +37,9 @@
|
|
|
33
37
|
:value="inputValue"
|
|
34
38
|
:class="[
|
|
35
39
|
disabled
|
|
36
|
-
? 'border-
|
|
37
|
-
: 'border-
|
|
38
|
-
'
|
|
40
|
+
? 'border-l-0 border-gray-100 text-gray-400'
|
|
41
|
+
: 'border-l-0 border-gray-300 text-gray-900',
|
|
42
|
+
'focus:outline-none focus:border-blue-500 w-full appearance-none rounded-r-md border bg-white p-2 text-sm shadow-sm',
|
|
39
43
|
]"
|
|
40
44
|
:readonly="disabled"
|
|
41
45
|
@click="togglePopover()"
|
|
@@ -63,6 +67,9 @@ export default {
|
|
|
63
67
|
classes: {
|
|
64
68
|
type: String,
|
|
65
69
|
},
|
|
70
|
+
isRequired: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
},
|
|
66
73
|
label: {
|
|
67
74
|
type: String,
|
|
68
75
|
},
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
4
|
-
label
|
|
5
|
-
|
|
3
|
+
<div class="flex items-center">
|
|
4
|
+
<label v-if="label" class="text-sm font-medium text-gray-900">{{ label }}</label>
|
|
5
|
+
<!-- asterisk sign to render if field is required -->
|
|
6
|
+
<p v-if="isRequired" class="ml-1 text-red-600">*</p>
|
|
7
|
+
</div>
|
|
6
8
|
<p v-if="subLabel" class="text-sm text-gray-500">{{ subLabel }}</p>
|
|
7
9
|
<v-select
|
|
8
|
-
class="text-sm
|
|
10
|
+
class="mt-1 text-sm"
|
|
9
11
|
:placeholder="placeholder"
|
|
10
12
|
:multiple="isMultiple"
|
|
11
13
|
:taggable="isTaggable"
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
<span v-bind="attributes">
|
|
25
27
|
<svg
|
|
26
28
|
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
-
class="h-5 w-5 text-gray-400
|
|
29
|
+
class="h-5 w-5 cursor-pointer text-gray-400"
|
|
28
30
|
viewBox="0 0 20 20"
|
|
29
31
|
fill="currentColor"
|
|
30
32
|
>
|
|
@@ -38,14 +40,12 @@
|
|
|
38
40
|
</template>
|
|
39
41
|
<!-- eslint-disable-next-line vue/no-unused-vars -->
|
|
40
42
|
<template #no-options="{ search, searching, loading }">
|
|
41
|
-
<span v-if="search.length < 1"
|
|
42
|
-
>Start typing to search for options...</span
|
|
43
|
-
>
|
|
43
|
+
<span v-if="search.length < 1">Start typing to search for options...</span>
|
|
44
44
|
<span v-else>No options found, try searching something else.</span>
|
|
45
45
|
</template>
|
|
46
46
|
<template #spinner="{ loading }">
|
|
47
47
|
<svg
|
|
48
|
-
class="
|
|
48
|
+
class="h-5 w-5 animate-spin text-gray-400"
|
|
49
49
|
xmlns="http://www.w3.org/2000/svg"
|
|
50
50
|
fill="none"
|
|
51
51
|
viewBox="0 0 24 24"
|
|
@@ -108,6 +108,9 @@ export default {
|
|
|
108
108
|
required: true,
|
|
109
109
|
},
|
|
110
110
|
label: String,
|
|
111
|
+
isRequired: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
},
|
|
111
114
|
subLabel: String,
|
|
112
115
|
placeholder: {
|
|
113
116
|
type: String,
|
|
@@ -145,7 +148,7 @@ export default {
|
|
|
145
148
|
type: Function,
|
|
146
149
|
},
|
|
147
150
|
optionsSelected: {
|
|
148
|
-
type: Array,
|
|
151
|
+
type: [Array, Object],
|
|
149
152
|
},
|
|
150
153
|
filterable: {
|
|
151
154
|
type: Boolean,
|
|
@@ -171,10 +174,7 @@ export default {
|
|
|
171
174
|
data() {
|
|
172
175
|
return {
|
|
173
176
|
loaderSearching: true,
|
|
174
|
-
value:
|
|
175
|
-
this.optionsSelected && this.optionsSelected.length
|
|
176
|
-
? this.optionsSelected
|
|
177
|
-
: [],
|
|
177
|
+
value: this.optionsSelected && this.optionsSelected.length ? this.optionsSelected : [],
|
|
178
178
|
};
|
|
179
179
|
},
|
|
180
180
|
methods: {
|
|
@@ -198,17 +198,17 @@ export default {
|
|
|
198
198
|
@apply cursor-pointer;
|
|
199
199
|
}
|
|
200
200
|
.vs__dropdown-toggle {
|
|
201
|
-
@apply
|
|
201
|
+
@apply focus:outline-none w-full rounded-md border border-gray-300 bg-white py-2 pl-3 text-left shadow-sm focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 sm:text-sm;
|
|
202
202
|
}
|
|
203
203
|
.vs__selected-options {
|
|
204
|
-
@apply overflow-hidden
|
|
204
|
+
@apply flex-nowrap overflow-hidden;
|
|
205
205
|
}
|
|
206
206
|
.vs--open .vs__dropdown-toggle {
|
|
207
207
|
border-bottom-color: rgba(212, 212, 216, var(--tw-border-opacity));
|
|
208
208
|
@apply rounded-b-md;
|
|
209
209
|
}
|
|
210
210
|
.vs__selected {
|
|
211
|
-
@apply border-none
|
|
211
|
+
@apply m-0 mr-1 border-none py-0 pl-0 pr-1.5;
|
|
212
212
|
}
|
|
213
213
|
.vs__selected-options {
|
|
214
214
|
@apply pl-0;
|
|
@@ -221,7 +221,7 @@ export default {
|
|
|
221
221
|
@apply pt-0 pr-3;
|
|
222
222
|
}
|
|
223
223
|
.vs__dropdown-menu {
|
|
224
|
-
@apply mt-2
|
|
224
|
+
@apply focus:outline-none mt-2 max-h-60 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-opacity-5 sm:text-sm;
|
|
225
225
|
}
|
|
226
226
|
.vs__dropdown-option {
|
|
227
227
|
@apply py-2;
|