classcard-ui 0.2.388 → 0.2.391

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.388",
3
+ "version": "0.2.391",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -20,8 +20,7 @@
20
20
  </svg>
21
21
  <svg
22
22
  v-if="name !== 'loader' && type == 'solid'"
23
- :class="classes"
24
- class="cursor-pointer"
23
+ :class="(classes ? classes : '') + (cursorType ? cursorType : ' cursor-pointer')"
25
24
  :viewBox="viewBox"
26
25
  fill="currentColor"
27
26
  fill-rule="evenodd"
@@ -30,11 +29,10 @@
30
29
  </svg>
31
30
  <svg
32
31
  v-if="name !== 'loader' && type == 'outline'"
33
- fill="none"
32
+ :class="(classes ? classes : '') + (cursorType ? cursorType : ' cursor-pointer')"
34
33
  viewBox="0 0 24 24"
34
+ fill="none"
35
35
  stroke="currentColor"
36
- :class="classes"
37
- class="cursor-pointer"
38
36
  >
39
37
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" :d="path" />
40
38
  </svg>
@@ -60,6 +58,10 @@ export default {
60
58
  type: String,
61
59
  default: "0 0 20 20",
62
60
  },
61
+ cursorType: {
62
+ type: String,
63
+ default: "cursor-pointer",
64
+ },
63
65
  },
64
66
  computed: {
65
67
  path() {
@@ -1,7 +1,9 @@
1
1
  <template>
2
2
  <div>
3
3
  <div class="flex items-center">
4
- <label v-if="label" class="text-sm font-medium text-gray-900">{{ label }}</label>
4
+ <label v-if="label" class="text-sm font-medium text-gray-900">{{
5
+ label
6
+ }}</label>
5
7
  <!-- asterisk sign to render if field is required -->
6
8
  <p v-if="isRequired" class="ml-1 text-red-600">*</p>
7
9
  </div>
@@ -42,7 +44,9 @@
42
44
  </template>
43
45
  <!-- eslint-disable-next-line vue/no-unused-vars -->
44
46
  <template #no-options="{ search, searching, loading }">
45
- <span v-if="search.length < 1">Start typing to search for options...</span>
47
+ <span v-if="search.length < 1"
48
+ >Start typing to search for options...</span
49
+ >
46
50
  <span v-else>No options found, try searching something else.</span>
47
51
  </template>
48
52
  <template #spinner="{ loading }">
@@ -91,7 +95,34 @@
91
95
  </div>
92
96
  </template>
93
97
  <template #list-footer>
94
- <li ref="load" class="loader" v-show="hasNextPage">Loading more options...</li>
98
+ <li ref="load" class="loader" v-show="hasNextPage">
99
+ Loading more options...
100
+ </li>
101
+ <li
102
+ v-if="showFooterButton"
103
+ class="group sticky bottom-0 mt-1 cursor-pointer select-none bg-gray-50 py-2 pl-3 pr-9 text-gray-700 hover:bg-gray-100 hover:text-gray-900"
104
+ id="listbox-option-0"
105
+ role="option"
106
+ @click="$emit('footerButtonClick')"
107
+ >
108
+ <div class="flex items-center">
109
+ <svg
110
+ xmlns="http://www.w3.org/2000/svg"
111
+ class="h-6 w-6 flex-shrink-0 text-gray-400"
112
+ viewBox="0 0 20 20"
113
+ fill="currentColor"
114
+ >
115
+ <path
116
+ fill-rule="evenodd"
117
+ d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v2H7a1 1 0 100 2h2v2a1 1 0 102 0v-2h2a1 1 0 100-2h-2V7z"
118
+ clip-rule="evenodd"
119
+ />
120
+ </svg>
121
+ <span class="ml-3 block truncate font-semibold">
122
+ {{ footerButtonText }}
123
+ </span>
124
+ </div>
125
+ </li>
95
126
  </template>
96
127
  </v-select>
97
128
  <p v-if="!isValidate" class="mt-2 text-sm text-red-600">
@@ -113,6 +144,14 @@ export default {
113
144
  type: Array,
114
145
  required: true,
115
146
  },
147
+ showFooterButton: {
148
+ type: Boolean,
149
+ default: false,
150
+ },
151
+ footerButtonText: {
152
+ type: String,
153
+ default: "",
154
+ },
116
155
  label: String,
117
156
  isRequired: {
118
157
  type: Boolean,
@@ -184,7 +223,10 @@ export default {
184
223
  data() {
185
224
  return {
186
225
  loaderSearching: true,
187
- value: this.optionsSelected && this.optionsSelected.length ? this.optionsSelected : [],
226
+ value:
227
+ this.optionsSelected && this.optionsSelected.length
228
+ ? this.optionsSelected
229
+ : [],
188
230
  observer: null,
189
231
  };
190
232
  },
@@ -249,7 +291,7 @@ export default {
249
291
  @apply rounded-b-md;
250
292
  }
251
293
  .vs__selected {
252
- @apply m-0 mr-1 border-none py-0 pl-1.5 pr-1.5;
294
+ @apply m-0 mr-1 border-none py-0 pl-0 pr-1.5;
253
295
  }
254
296
  .vs__selected-options {
255
297
  @apply pl-0;
@@ -262,7 +304,7 @@ export default {
262
304
  @apply pt-0 pr-3;
263
305
  }
264
306
  .vs__dropdown-menu {
265
- @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;
307
+ @apply focus:outline-none mt-2 max-h-60 overflow-auto rounded-md bg-white py-0 text-base shadow-lg ring-1 ring-opacity-5 sm:text-sm;
266
308
  }
267
309
  .vs__dropdown-option {
268
310
  @apply py-2;
@@ -148,7 +148,7 @@
148
148
  <template slot="table-row" slot-scope="props">
149
149
  <!-- renders if drag and drop is present in table -->
150
150
  <span v-if="props.column.field == 'drag'">
151
- <c-icon name="menu-solid" type="solid" class="handle h-5 w-5 text-gray-500"></c-icon>
151
+ <c-icon name="menu-solid" type="solid" class="handle h-5 w-5 text-gray-500" :cursorType="'cursor-move'"></c-icon>
152
152
  </span>
153
153
  <!-- if customization or adding another form element is required -->
154
154
  <span v-else-if="props.column.customizeColumn">