classcard-ui 0.2.229 → 0.2.233

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.229",
3
+ "version": "0.2.233",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -45,12 +45,12 @@
45
45
  v-for="(button, index) in buttonObject"
46
46
  v-bind:key="button.label"
47
47
  type="button"
48
+ class="relative inline-flex items-center px-2 py-2 border-r border-l border-t border-b border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500"
48
49
  :class="{
49
50
  'rounded-r-md border-l-0': index == buttonObject.length - 1,
50
- 'rounded-l-md border-r-0 border-l': index == 0,
51
+ 'rounded-l-md border-r-0': index == 0,
51
52
  'px-4': button.label,
52
53
  }"
53
- class="relative inline-flex items-center px-2 py-2 border-r border-t border-b border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500"
54
54
  @click="buttonAction($event, button.value)"
55
55
  >
56
56
  <div v-if="button.icon == ''" class="h-5"></div>
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <label v-if="label" class="text-sm text-gray-900">{{ label }}</label>
4
+ <p v-if="subLabel" class="text-sm text-gray-500">{{ subLabel }}</p>
4
5
  <v-select
5
6
  class="text-sm mt-1"
6
7
  :placeholder="placeholder"
@@ -33,7 +34,9 @@
33
34
  </template>
34
35
  <!-- eslint-disable-next-line vue/no-unused-vars -->
35
36
  <template #no-options="{ search, searching, loading }">
36
- <span v-if="search.length < 1">Start typing to search for options...</span>
37
+ <span v-if="search.length < 1"
38
+ >Start typing to search for options...</span
39
+ >
37
40
  <span v-else>No options found, try searching something else.</span>
38
41
  </template>
39
42
  <template slot="option" slot-scope="option">
@@ -59,6 +62,9 @@
59
62
  </div>
60
63
  </template>
61
64
  </v-select>
65
+ <p v-if="!isValidate" class="mt-2 text-sm text-red-600">
66
+ {{ errorMessage }}
67
+ </p>
62
68
  </div>
63
69
  </template>
64
70
  <script>
@@ -75,7 +81,8 @@ export default {
75
81
  required: true,
76
82
  },
77
83
  label: String,
78
- placeholder:{
84
+ subLabel: String,
85
+ placeholder: {
79
86
  type: String,
80
87
  default: "Start typing... (min 2 characters) to search options",
81
88
  },
@@ -121,12 +128,22 @@ export default {
121
128
  type: Boolean,
122
129
  default: true,
123
130
  },
131
+ isValidate: {
132
+ type: Boolean,
133
+ default: true,
134
+ },
135
+ errorMessage: {
136
+ type: String,
137
+ },
124
138
  },
125
139
  computed: {},
126
140
  data() {
127
141
  return {
128
142
  loaderSearching: true,
129
- value: this.optionsSelected && this.optionsSelected.length ? this.optionsSelected : [],
143
+ value:
144
+ this.optionsSelected && this.optionsSelected.length
145
+ ? this.optionsSelected
146
+ : [],
130
147
  };
131
148
  },
132
149
  methods: {
@@ -178,7 +195,7 @@ export default {
178
195
  .vs__dropdown-toggle.vs__dropdown-option--highlight {
179
196
  @apply bg-indigo-700 text-white;
180
197
  }
181
- .vs__dropdown-option--highlight {
198
+ .vs__dropdown-option--highlight {
182
199
  @apply bg-indigo-700 text-white;
183
200
  }
184
201
  </style>
@@ -2,7 +2,11 @@
2
2
  <div>
3
3
  <label class="text-sm text-gray-900">{{ label }}</label>
4
4
  <div class="w-full mt-1">
5
- <vue-tel-input v-bind="bindProps" :autoFormat="false" v-model="value"></vue-tel-input>
5
+ <vue-tel-input
6
+ v-bind="bindProps"
7
+ :autoFormat="false"
8
+ v-model="value"
9
+ ></vue-tel-input>
6
10
  </div>
7
11
  </div>
8
12
  </template>
@@ -34,6 +38,11 @@ export default {
34
38
  },
35
39
  };
36
40
  },
41
+ watch: {
42
+ value(newVal) {
43
+ this.$emit("onChange", newVal);
44
+ },
45
+ },
37
46
  };
38
47
  </script>
39
48
  <style>