classcard-ui 0.2.405 → 0.2.408
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 +74 -61
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +74 -61
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +6 -6
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CButton/CButton.vue +8 -2
- package/src/components/CUpload/CUpload.vue +43 -36
package/package.json
CHANGED
|
@@ -88,6 +88,10 @@ export default {
|
|
|
88
88
|
type: String,
|
|
89
89
|
default: "",
|
|
90
90
|
},
|
|
91
|
+
iconCustomClasses: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: "",
|
|
94
|
+
},
|
|
91
95
|
},
|
|
92
96
|
|
|
93
97
|
computed: {
|
|
@@ -117,8 +121,8 @@ export default {
|
|
|
117
121
|
return classes;
|
|
118
122
|
},
|
|
119
123
|
iconClasses() {
|
|
120
|
-
|
|
121
|
-
"h-5 w-5 mr-1": true,
|
|
124
|
+
let iconClasses = {
|
|
125
|
+
"h-5 w-5 mr-1": this.iconCustomClasses ? false : true,
|
|
122
126
|
"text-indigo-400": this.type == "secondary",
|
|
123
127
|
"text-white":
|
|
124
128
|
this.type == "success" ||
|
|
@@ -128,6 +132,8 @@ export default {
|
|
|
128
132
|
"text-gray-400": this.type == "secondary-gray" || this.type == "white",
|
|
129
133
|
"text-red-400": this.type == "light-red",
|
|
130
134
|
};
|
|
135
|
+
iconClasses[this.iconCustomClasses] = true;
|
|
136
|
+
return iconClasses;
|
|
131
137
|
},
|
|
132
138
|
},
|
|
133
139
|
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flex flex-col">
|
|
3
|
-
<div
|
|
4
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="isUploaded"
|
|
5
|
+
class="flex items-center justify-between text-sm font-light"
|
|
6
|
+
>
|
|
7
|
+
<p class="text-gray-600">{{ label }}</p>
|
|
5
8
|
<p class="text-gray-400">{{ hint }}</p>
|
|
6
9
|
</div>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</p>
|
|
40
|
-
</div>
|
|
10
|
+
<button
|
|
11
|
+
type="button"
|
|
12
|
+
class="inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
|
|
13
|
+
@click="initFilestack()"
|
|
14
|
+
v-if="displayMode == 'overlay' && icon"
|
|
15
|
+
>
|
|
16
|
+
<c-icon
|
|
17
|
+
:type="icon.type"
|
|
18
|
+
:class="icon.class"
|
|
19
|
+
:name="icon.name"
|
|
20
|
+
:viewBox="icon.viewBox"
|
|
21
|
+
></c-icon>
|
|
22
|
+
{{ buttonText }}
|
|
23
|
+
</button>
|
|
24
|
+
<button
|
|
25
|
+
type="button"
|
|
26
|
+
class="flex w-auto items-center justify-center rounded-lg border-2 border-dashed border-gray-300 px-9 py-14 text-center hover:border-gray-400 focus:outline-none"
|
|
27
|
+
@click="initFilestack()"
|
|
28
|
+
v-if="displayMode == 'overlay' && !icon"
|
|
29
|
+
>
|
|
30
|
+
<c-icon
|
|
31
|
+
name="arrow-up"
|
|
32
|
+
type="solid"
|
|
33
|
+
class="m-1 h-5 w-5 text-indigo-600"
|
|
34
|
+
viewBox="0 0 20 20"
|
|
35
|
+
></c-icon>
|
|
36
|
+
<span class="text-sm font-medium text-indigo-900"> Upload </span>
|
|
37
|
+
</button>
|
|
38
|
+
<div :class="filestackClasses" id="filestack-uploader"></div>
|
|
39
|
+
<p v-if="!isValidate" class="mt-2 text-sm text-red-600">
|
|
40
|
+
{{ errorMessage }}
|
|
41
|
+
</p>
|
|
41
42
|
</div>
|
|
42
43
|
</template>
|
|
43
44
|
|
|
@@ -63,9 +64,11 @@ export default {
|
|
|
63
64
|
},
|
|
64
65
|
hint: {
|
|
65
66
|
type: String,
|
|
67
|
+
default: "",
|
|
66
68
|
},
|
|
67
69
|
label: {
|
|
68
70
|
type: String,
|
|
71
|
+
default: "",
|
|
69
72
|
},
|
|
70
73
|
isValidate: { type: Boolean },
|
|
71
74
|
errorMessage: {
|
|
@@ -100,6 +103,10 @@ export default {
|
|
|
100
103
|
type: String,
|
|
101
104
|
default: "inline",
|
|
102
105
|
},
|
|
106
|
+
isUploaded: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: false,
|
|
109
|
+
},
|
|
103
110
|
},
|
|
104
111
|
data() {
|
|
105
112
|
return {};
|