classcard-ui 0.2.265 → 0.2.270

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.265",
3
+ "version": "0.2.270",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -5,7 +5,19 @@
5
5
  :class="classes"
6
6
  :type="type"
7
7
  @click="handleButtonClick"
8
- class="relative inline-flex items-center px-4 py-2 rounded-l-md text-sm font-medium focus:z-10 focus:outline-none focus:ring-1"
8
+ class="
9
+ relative
10
+ inline-flex
11
+ items-center
12
+ px-4
13
+ py-2
14
+ rounded-l-md
15
+ text-sm
16
+ font-medium
17
+ focus:z-10
18
+ focus:outline-none
19
+ focus:ring-1
20
+ "
9
21
  >
10
22
  {{ selectedValue ? selectedValue : label }}
11
23
  </button>
@@ -15,7 +27,20 @@
15
27
  @blur="close()"
16
28
  :type="type"
17
29
  :class="classes"
18
- class="relative inline-flex items-center px-2 py-2 rounded-r-md text-sm font-medium t focus:z-10 focus:outline-none focus:ring-1"
30
+ class="
31
+ relative
32
+ inline-flex
33
+ items-center
34
+ px-2
35
+ py-2
36
+ rounded-r-md
37
+ text-sm
38
+ font-medium
39
+ t
40
+ focus:z-10
41
+ focus:outline-none
42
+ focus:ring-1
43
+ "
19
44
  >
20
45
  <span class="sr-only">Open options</span>
21
46
  <c-icon name="chevron-down" type="solid" class="h-5 w-5"></c-icon>
@@ -23,7 +48,18 @@
23
48
  <div
24
49
  v-if="toggleDropdown"
25
50
  :class="dropdownPositionClass"
26
- class="origin-top-right absolute right-0 z-10 mt-2 -mr-1 w-56 rounded-md shadow-lg bg-white ring-1 ring-gray-900 ring-opacity-5"
51
+ class="
52
+ origin-top-right
53
+ absolute
54
+ right-0
55
+ z-10
56
+ mt-2
57
+ w-56
58
+ rounded-md
59
+ shadow-lg
60
+ bg-white
61
+ ring-1 ring-gray-900 ring-opacity-5
62
+ "
27
63
  >
28
64
  <div
29
65
  class="py-1"
@@ -35,7 +71,15 @@
35
71
  v-for="item in items"
36
72
  v-bind:key="item.items"
37
73
  @mousedown="selectOption($event, item.value)"
38
- class="block px-4 py-2 text-sm text-left text-gray-700 hover:bg-gray-100 hover:text-gray-900 cursor-pointer"
74
+ class="
75
+ block
76
+ px-4
77
+ py-2
78
+ text-sm text-left text-gray-700
79
+ hover:bg-gray-100
80
+ hover:text-gray-900
81
+ cursor-pointer
82
+ "
39
83
  role="menuitem"
40
84
  >
41
85
  {{ item.text }}
@@ -17,19 +17,14 @@
17
17
  <button
18
18
  type="button"
19
19
  :class="[
20
- disabled
21
- ? 'border-gray-100 pointer-events-none'
22
- : 'border-gray-300',
23
- 'p-2 bg-blue-100 border hover:bg-blue-200 text-blue-600 rounded-l-md focus:bg-blue-500 focus:text-white focus:border-blue-500 focus:outline-none',
20
+ disabled ? 'border-gray-100 pointer-events-none' : 'border-gray-300',
21
+ 'shadow-sm p-2 bg-blue-100 border hover:bg-blue-200 text-blue-600 rounded-l-md focus:bg-blue-500 focus:text-white focus:border-blue-500 focus:outline-none',
24
22
  ]"
25
23
  @click="togglePopover()"
26
24
  >
27
25
  <c-icon
28
26
  name="calendar-solid"
29
- :class="[
30
- disabled ? 'text-gray-200' : 'text-gray-400',
31
- 'h-5 w-5 ',
32
- ]"
27
+ :class="[disabled ? 'text-gray-200' : 'text-gray-400', 'h-5 w-5 ']"
33
28
  type="solid"
34
29
  ></c-icon>
35
30
  </button>
@@ -39,7 +34,7 @@
39
34
  disabled
40
35
  ? 'border-gray-100 border-l-0 text-gray-400'
41
36
  : 'border-gray-300 border-l-0 text-gray-900',
42
- 'bg-white w-full p-2 appearance-none border rounded-r-md focus:outline-none focus:border-blue-500 text-sm',
37
+ 'shadow-sm bg-white w-full p-2 appearance-none border rounded-r-md focus:outline-none focus:border-blue-500 text-sm',
43
38
  ]"
44
39
  :readonly="disabled"
45
40
  @click="togglePopover()"
@@ -91,14 +86,7 @@ export default {
91
86
  },
92
87
  data() {
93
88
  const masks = {
94
- input: [
95
- "MMM DD, YYYY",
96
- "YYYY/MM/DD",
97
- "DD-MM-YYYY",
98
- "DD/MM/YYYY",
99
- "YYYY-MM-DD",
100
- "L",
101
- ],
89
+ input: ["MMM DD, YYYY", "YYYY/MM/DD", "DD-MM-YYYY", "DD/MM/YYYY", "YYYY-MM-DD", "L"],
102
90
  };
103
91
  return {
104
92
  masks,
@@ -5,7 +5,7 @@
5
5
  <p class="text-sm text-gray-500" v-if="hint">{{ hint }}</p>
6
6
  </div>
7
7
  <quill-editor
8
- class="mt-1 text-sm"
8
+ class="mt-1 text-sm shadow-sm"
9
9
  :value="content"
10
10
  :options="editorOption"
11
11
  @change="onChange($event)"
@@ -19,7 +19,7 @@
19
19
  @input="$emit('input', $event.target.value)"
20
20
  @blur="$emit('blur', $event.target.value)"
21
21
  :class="errorClasses"
22
- class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
22
+ class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
23
23
  :placeholder="placeholder"
24
24
  :disabled="disabled"
25
25
  />
@@ -11,10 +11,7 @@
11
11
  </div>
12
12
  <span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
13
13
  </div>
14
- <div
15
- v-if="!inlineAddon && addonType == 'leading'"
16
- class="relative mt-1 flex rounded-md"
17
- >
14
+ <div v-if="!inlineAddon && addonType == 'leading'" class="relative mt-1 flex rounded-md">
18
15
  <span
19
16
  :class="disabled ? 'opacity-50' : ''"
20
17
  v-if="addon"
@@ -28,7 +25,7 @@
28
25
  @input="$emit('input', $event.target.value)"
29
26
  @blur="$emit('blur', $event.target.value)"
30
27
  :class="{ ...errorClasses, 'rounded-l-md': !addon }"
31
- class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-r-md sm:text-sm disabled:opacity-50 text-gray-900"
28
+ class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-r-md sm:text-sm disabled:opacity-50 text-gray-900"
32
29
  :placeholder="placeholder"
33
30
  :disabled="disabled"
34
31
  />
@@ -39,17 +36,14 @@
39
36
  <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
40
37
  </div>
41
38
  </div>
42
- <div
43
- v-if="!inlineAddon && addonType == 'trailing'"
44
- class="relative mt-1 flex rounded-md"
45
- >
39
+ <div v-if="!inlineAddon && addonType == 'trailing'" class="relative mt-1 flex rounded-md">
46
40
  <input
47
41
  :type="inputType"
48
42
  :value="inputValue"
49
43
  @input="$emit('input', $event.target.value)"
50
44
  @blur="$emit('blur', $event.target.value)"
51
45
  :class="errorClasses"
52
- class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-l-md sm:text-sm disabled:opacity-50 text-gray-900"
46
+ class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-l-md sm:text-sm disabled:opacity-50 text-gray-900"
53
47
  :placeholder="placeholder"
54
48
  :disabled="disabled"
55
49
  />
@@ -66,48 +60,31 @@
66
60
  {{ addon }}
67
61
  </span>
68
62
  </div>
69
- <div
70
- v-if="inlineAddon && addonType == 'trailing'"
71
- class="relative mt-1 flex rounded-md"
72
- >
63
+ <div v-if="inlineAddon && addonType == 'trailing'" class="relative mt-1 flex rounded-md">
73
64
  <input
74
65
  :type="inputType"
75
66
  :value="inputValue"
76
67
  @input="$emit('input', $event.target.value)"
77
68
  @blur="$emit('blur', $event.target.value)"
78
69
  :class="errorClasses"
79
- class="focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
70
+ class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 flex-1 block w-full px-3 py-2 rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
80
71
  :placeholder="placeholder"
81
72
  :disabled="disabled"
82
73
  />
83
- <div
84
- class="absolute inset-y-0 right-3 flex items-center pointer-events-none"
85
- >
74
+ <div class="absolute inset-y-0 right-3 flex items-center pointer-events-none">
86
75
  <div
87
76
  v-if="!isValidate"
88
77
  class="right-0 pr-2 flex items-center pointer-events-none text-red-600"
89
78
  >
90
- <c-icon
91
- name="exclamation-circle"
92
- type="solid"
93
- class="h-5 w-5"
94
- ></c-icon>
79
+ <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
95
80
  </div>
96
- <span
97
- class="text-gray-500 sm:text-sm"
98
- :class="disabled ? 'opacity-50' : ''"
99
- >
81
+ <span class="text-gray-500 sm:text-sm" :class="disabled ? 'opacity-50' : ''">
100
82
  {{ addon }}
101
83
  </span>
102
84
  </div>
103
85
  </div>
104
- <div
105
- v-if="inlineAddon && addonType == 'leading'"
106
- class="relative mt-1 flex rounded-md"
107
- >
108
- <div
109
- class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"
110
- >
86
+ <div v-if="inlineAddon && addonType == 'leading'" class="relative mt-1 flex rounded-md">
87
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
111
88
  <span class="text-gray-500 sm:text-sm">{{ addon }}</span>
112
89
  </div>
113
90
  <input
@@ -117,7 +94,7 @@
117
94
  @blur="$emit('blur', $event.target.value)"
118
95
  :class="errorClasses"
119
96
  :style="`padding-left:${leftPaddingStyle}`"
120
- class="focus:ring-indigo-500 focus:border-indigo-500 block w-full rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
97
+ class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full rounded-md sm:text-sm disabled:opacity-50 text-gray-900"
121
98
  :placeholder="placeholder"
122
99
  :disabled="disabled"
123
100
  />
@@ -131,10 +108,7 @@
131
108
  <p v-if="!isValidate" class="mt-2 text-sm text-red-600 text-left">
132
109
  {{ errorMessage }}
133
110
  </p>
134
- <p
135
- v-if="helpText && isValidate == true"
136
- :class="`mt-2 text-sm ${helpTextColorStyles}`"
137
- >
111
+ <p v-if="helpText && isValidate == true" :class="`mt-2 text-sm ${helpTextColorStyles}`">
138
112
  {{ helpText }}
139
113
  </p>
140
114
  </div>
@@ -210,6 +210,9 @@ export default {
210
210
  .vs__selected {
211
211
  @apply border-none m-0 py-0 pl-0 pr-1.5 mr-1;
212
212
  }
213
+ .vs__selected-options {
214
+ @apply pl-0;
215
+ }
213
216
  .vs__search,
214
217
  .vs__search:focus {
215
218
  @apply m-0 p-0;
@@ -1,12 +1,8 @@
1
1
  <template>
2
2
  <div>
3
3
  <label class="text-sm text-gray-900">{{ label }}</label>
4
- <div class="w-full mt-1">
5
- <vue-tel-input
6
- v-bind="bindProps"
7
- :autoFormat="false"
8
- v-model="value"
9
- ></vue-tel-input>
4
+ <div class="w-full mt-1 shadow-sm">
5
+ <vue-tel-input v-bind="bindProps" :autoFormat="false" v-model="value"></vue-tel-input>
10
6
  </div>
11
7
  </div>
12
8
  </template>
@@ -114,9 +114,7 @@
114
114
  </span>
115
115
  </span>
116
116
 
117
- <span
118
- class="text-indigo-600 absolute inset-y-0 right-0 flex items-center pr-4"
119
- >
117
+ <span class="text-indigo-600 absolute inset-y-0 right-0 flex items-center pr-4">
120
118
  <c-icon
121
119
  id="list-icon"
122
120
  v-show="showSelectedValue"
@@ -183,7 +181,7 @@ export default {
183
181
  // icons in dropdown list
184
182
  icon: { type: Object },
185
183
  // value to set as default option in dropdown
186
- value: { type: [Object, String] },
184
+ value: { type: [Object, String], default: null },
187
185
  // type of dropdown - gray,tertiary or default
188
186
  type: {
189
187
  type: String,
@@ -202,10 +200,7 @@ export default {
202
200
  data() {
203
201
  return {
204
202
  toggleDropdown: false,
205
- selectedValue:
206
- this.value !== null && this.value.option
207
- ? this.value.option
208
- : this.value,
203
+ selectedValue: this.value !== null && this.value.option ? this.value.option : this.value,
209
204
  showSelectedValue: false,
210
205
  showFocus: false,
211
206
  selectSearch: null,
@@ -217,7 +212,7 @@ export default {
217
212
  return {
218
213
  "text-gray-900 hover:bg-gray-200 bg-gray-100 focus:ring-2 focus:border-gray-200 focus:ring-gray-200 focus:ring-offset-2 shadow-sm":
219
214
  this.type == "gray",
220
- "bg-white hover:bg-indigo-100 text-indigo-600 hover:text-indigo-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-200":
215
+ "bg-white border border-gray-200 hover:bg-indigo-100 text-indigo-600 hover:text-indigo-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-200":
221
216
  this.type == "tertiary",
222
217
  "border border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 bg-white shadow-sm focus:ring-1":
223
218
  this.type == null,
@@ -248,8 +243,7 @@ export default {
248
243
  let options = [...this.options];
249
244
  this.renderOptions = options.filter((option) => {
250
245
  isNumber(option[this.renderOptionName])
251
- ? (option[this.renderOptionName] =
252
- option[this.renderOptionName].toString())
246
+ ? (option[this.renderOptionName] = option[this.renderOptionName].toString())
253
247
  : "";
254
248
  return option[this.renderOptionName]
255
249
  .toLowerCase()
@@ -260,9 +254,7 @@ export default {
260
254
  watch: {
261
255
  value() {
262
256
  this.selectedValue =
263
- this.value !== null && this.value.option
264
- ? this.value.option
265
- : this.value;
257
+ this.value !== null && this.value.option ? this.value.option : this.value;
266
258
  },
267
259
  options() {
268
260
  this.renderOptions = this.options;
@@ -16,7 +16,7 @@
16
16
  :rows="rows"
17
17
  :class="errorClasses"
18
18
  :disabled="disabled"
19
- class="focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md disabled:opacity-50 text-gray-900"
19
+ class="shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md disabled:opacity-50 text-gray-900"
20
20
  ></textarea>
21
21
  <div
22
22
  v-if="!isValidate"
package/src/icons.js CHANGED
@@ -52,8 +52,7 @@ export default {
52
52
  "M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3",
53
53
  "clipboard-check":
54
54
  "M9 2a1 1 0 000 2h2a1 1 0 100-2H9z M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
55
- cloud:
56
- "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",
55
+ cloud: "M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z",
57
56
  search: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",
58
57
  "menu-alt-2": "M4 6h16M4 12h16M4 18h7",
59
58
  close: "M6 18L18 6M6 6l12 12",
@@ -101,8 +100,7 @@ export default {
101
100
  "M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z",
102
101
  "check-circle-solid":
103
102
  "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
104
- "folder-solid":
105
- "M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z",
103
+ "folder-solid": "M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z",
106
104
  "shopping-cart-outline":
107
105
  "M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z",
108
106
  "external-link-outline":
@@ -187,8 +185,7 @@ export default {
187
185
  "M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z",
188
186
  "x-circle-solid":
189
187
  "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",
190
- "x-circle-outline":
191
- "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
188
+ "x-circle-outline": "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",
192
189
  "x-outline": "M6 18L18 6M6 6l12 12",
193
190
  "check-circle-outline": "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
194
191
  "play-solid":
@@ -196,4 +193,6 @@ export default {
196
193
  "phone-outgoing-solid":
197
194
  "M17.924 2.617a.997.997 0 00-.215-.322l-.004-.004A.997.997 0 0017 2h-4a1 1 0 100 2h1.586l-3.293 3.293a1 1 0 001.414 1.414L16 5.414V7a1 1 0 102 0V3a.997.997 0 00-.076-.383z M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z",
198
195
  save: "M7.707 10.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V6h5a2 2 0 012 2v7a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2h5v5.586l-1.293-1.293zM9 4a1 1 0 012 0v2H9V4z",
196
+ "clipboard-list-solid":
197
+ "M9 2a1 1 0 000 2h2a1 1 0 100-2H9z M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z",
199
198
  };