classcard-ui 0.2.809 → 0.2.810

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.809",
3
+ "version": "0.2.810",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -11,9 +11,19 @@
11
11
  </div>
12
12
  <span v-if="hint" class="text-sm text-gray-500">{{ hint }}</span>
13
13
  </div>
14
-
15
14
  <div class="relative">
16
- <div class="relative" :class="label ? 'mt-1' : ''">
15
+ <div
16
+ class="relative flex items-center rounded-md"
17
+ :class="{ ...classes, [inputClasses]: true }"
18
+ >
19
+ <c-icon
20
+ class="ml-3"
21
+ v-if="icon && !showImage"
22
+ :class="icon.class"
23
+ :name="icon.name"
24
+ :type="icon.type"
25
+ >
26
+ </c-icon>
17
27
  <input
18
28
  type="text"
19
29
  v-model="selectSearch"
@@ -23,8 +33,13 @@
23
33
  aria-haspopup="listbox"
24
34
  aria-expanded="true"
25
35
  aria-labelledby="listbox-label"
26
- :class="{ ...classes, [inputClasses]: true }"
27
- class="relative w-full cursor-pointer rounded-md py-2 pl-3 pr-10 text-left text-sm focus:outline-none disabled:opacity-50 sm:text-sm"
36
+ :class="`w-full cursor-pointer rounded-md border-0 border-transparent py-2 pl-2 pr-10 text-left text-sm focus:border-transparent ${
37
+ type === 'tertiary'
38
+ ? 'hover:bg-indigo-100'
39
+ : type === 'gray'
40
+ ? 'bg-gray-100 hover:bg-gray-200'
41
+ : ''
42
+ } focus:ring-0 disabled:opacity-50 sm:text-sm`"
28
43
  :disabled="isDisabled"
29
44
  autocomplete="off"
30
45
  />
@@ -48,14 +63,10 @@
48
63
  :isDynamicallyColored="coloredAvatars"
49
64
  ></c-avatar>
50
65
  </div>
51
- <c-icon
52
- v-if="icon && !showImage"
53
- :class="icon.class"
54
- :name="icon.name"
55
- :type="icon.type"
66
+ <p
67
+ :class="showImage || icon ? 'ml-7' : ''"
68
+ class="block truncate text-sm"
56
69
  >
57
- </c-icon>
58
- <p :class="showImage ? 'ml-3' : ''" class="block truncate text-sm">
59
70
  {{
60
71
  selectedValue
61
72
  ? selectedValue
@@ -269,11 +280,11 @@ export default {
269
280
  computed: {
270
281
  classes() {
271
282
  return {
272
- "text-gray-900 border border-gray-200 hover:bg-gray-200 bg-gray-100 focus:ring-2 focus:border-gray-200 focus:ring-gray-200 focus:ring-offset-2 shadow-sm":
283
+ "text-gray-900 border border-gray-200 hover:bg-gray-200 bg-gray-100 focus-within:bg-gray-100 focus-within:ring-2 focus-within:border-gray-200 focus-within:ring-gray-200 focus:ring-offset-2 shadow-sm":
273
284
  this.type == "gray",
274
- "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":
285
+ "bg-white border border-gray-200 hover:bg-indigo-100 text-indigo-600 hover:text-indigo-800 focus-within:border-indigo-200 focus-within:ring-2 focus-within:ring-indigo-200":
275
286
  this.type == "tertiary",
276
- "border border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 bg-white shadow-sm focus:ring-1":
287
+ "border border-gray-300 bg-white shadow-sm focus-within:border-indigo-500 focus-within:bg-white focus-within:ring-1 focus-within:ring-indigo-500":
277
288
  this.type == null,
278
289
  };
279
290
  },
@@ -35,7 +35,10 @@ Default.args = {
35
35
  value: null,
36
36
  renderOptionName: "code",
37
37
  options: [
38
- { code: "one", value: "onee2" },
38
+ {
39
+ code: "one",
40
+ value: "onee2",
41
+ },
39
42
  { code: "one1", value: "onee4" },
40
43
  { code: "one2", value: "onee1" },
41
44
  { code: "one3", value: "onee5" },