classcard-ui 0.2.413 → 0.2.414

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.413",
3
+ "version": "0.2.414",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -34,6 +34,29 @@
34
34
  ></c-icon>
35
35
  <span class="text-sm font-medium text-indigo-900"> Upload </span>
36
36
  </button>
37
+ <div
38
+ class="relative hidden h-full w-full overflow-hidden rounded-full lg:block"
39
+ @click="initFilestack()"
40
+ v-if="displayMode == 'overlay' && !icon && isAvatar"
41
+ >
42
+ <img
43
+ v-if="imageUrl"
44
+ class="relative h-full w-full rounded-full object-cover"
45
+ :src="imageUrl"
46
+ />
47
+ <c-avatar
48
+ v-else
49
+ size="very large"
50
+ :nameInitials="shortName"
51
+ :rounded="true"
52
+ ></c-avatar>
53
+ <label
54
+ class="absolute inset-0 flex h-full w-full cursor-pointer items-center justify-center bg-gray-900 bg-opacity-75 text-sm font-medium text-white opacity-0 focus-within:opacity-100 hover:opacity-100"
55
+ >
56
+ <span>Change</span>
57
+ <span class="sr-only"> user photo</span>
58
+ </label>
59
+ </div>
37
60
  <div :class="filestackClasses" id="filestack-uploader"></div>
38
61
  <p v-if="!isValidate" class="mt-2 text-sm text-red-600">
39
62
  {{ errorMessage }}
@@ -44,17 +67,30 @@
44
67
  <script>
45
68
  import * as filestack from "filestack-js";
46
69
  import CIcon from "../CIcon/CIcon.vue";
70
+ import CAvatar from "../CAvatar/CAvatar.vue";
47
71
 
48
72
  export default {
49
73
  name: "CUpload",
50
74
  components: {
51
75
  CIcon,
76
+ CAvatar,
52
77
  },
53
78
  props: {
54
79
  buttonText: {
55
80
  type: String,
56
81
  default: "Upload",
57
82
  },
83
+ isAvatar: {
84
+ type: Boolean,
85
+ default: false,
86
+ },
87
+ shortName: {
88
+ type: String,
89
+ },
90
+ imageUrl: {
91
+ type: String,
92
+ default: "",
93
+ },
58
94
  icon: {
59
95
  type: Object,
60
96
  },