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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.405",
3
+ "version": "0.2.408",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -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
- return {
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 class="flex items-center justify-between text-sm font-normal">
4
- <p>{{ label }}</p>
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
- <div>
8
- <button
9
- type="button"
10
- 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"
11
- @click="initFilestack()"
12
- v-if="displayMode == 'overlay' && icon"
13
- >
14
- <c-icon
15
- :type="icon.type"
16
- :class="icon.class"
17
- :name="icon.name"
18
- :viewBox="icon.viewBox"
19
- ></c-icon>
20
- {{ buttonText }}
21
- </button>
22
- <button
23
- type="button"
24
- 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"
25
- @click="initFilestack()"
26
- v-if="displayMode == 'overlay' && !icon"
27
- >
28
- <c-icon
29
- name="arrow-up"
30
- type="solid"
31
- class="m-1 h-5 w-5 text-indigo-600"
32
- viewBox="0 0 20 20"
33
- ></c-icon>
34
- <span class="text-sm font-medium text-indigo-900"> Upload </span>
35
- </button>
36
- <div :class="filestackClasses" id="filestack-uploader"></div>
37
- <p v-if="!isValidate" class="mt-2 text-sm text-red-600">
38
- {{ errorMessage }}
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 {};