classcard-ui 0.2.196 → 0.2.200

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.196",
3
+ "version": "0.2.200",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -82,7 +82,7 @@ export default {
82
82
  console.log("show name", name);
83
83
  this.activeTab = name;
84
84
  var el = document.getElementById(name);
85
- el.scrollIntoView();
85
+ el.scrollIntoView({ behavior: "smooth" });
86
86
  },
87
87
  switchTabForMobile(index) {
88
88
  var selectedOption = this.tabs[index];
@@ -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
  class="inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm"
@@ -25,6 +22,7 @@
25
22
  :type="inputType"
26
23
  :value="inputValue"
27
24
  @input="$emit('input', $event.target.value)"
25
+ @blur="$emit('blur', $event.target.value)"
28
26
  :class="errorClasses"
29
27
  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"
30
28
  :placeholder="placeholder"
@@ -37,14 +35,12 @@
37
35
  <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
38
36
  </div>
39
37
  </div>
40
- <div
41
- v-if="!inlineAddon && addonType == 'trailing'"
42
- class="relative mt-1 flex rounded-md"
43
- >
38
+ <div v-if="!inlineAddon && addonType == 'trailing'" class="relative mt-1 flex rounded-md">
44
39
  <input
45
40
  :type="inputType"
46
41
  :value="inputValue"
47
42
  @input="$emit('input', $event.target.value)"
43
+ @blur="$emit('blur', $event.target.value)"
48
44
  :class="errorClasses"
49
45
  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"
50
46
  :placeholder="placeholder"
@@ -63,22 +59,18 @@
63
59
  {{ addon }}
64
60
  </span>
65
61
  </div>
66
- <div
67
- v-if="inlineAddon && addonType == 'trailing'"
68
- class="relative mt-1 flex rounded-md"
69
- >
62
+ <div v-if="inlineAddon && addonType == 'trailing'" class="relative mt-1 flex rounded-md">
70
63
  <input
71
64
  :type="inputType"
72
65
  :value="inputValue"
73
66
  @input="$emit('input', $event.target.value)"
67
+ @blur="$emit('blur', $event.target.value)"
74
68
  :class="errorClasses"
75
69
  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"
76
70
  :placeholder="placeholder"
77
71
  :disabled="disabled"
78
72
  />
79
- <div
80
- class="absolute inset-y-0 right-3 flex items-center pointer-events-none"
81
- >
73
+ <div class="absolute inset-y-0 right-3 flex items-center pointer-events-none">
82
74
  <span
83
75
  v-if="isValidate"
84
76
  class="text-gray-500 sm:text-sm"
@@ -94,19 +86,15 @@
94
86
  <c-icon name="exclamation-circle" type="solid" class="h-5 w-5"></c-icon>
95
87
  </div>
96
88
  </div>
97
- <div
98
- v-if="inlineAddon && addonType == 'leading'"
99
- class="relative mt-1 flex rounded-md"
100
- >
101
- <div
102
- class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"
103
- >
89
+ <div v-if="inlineAddon && addonType == 'leading'" class="relative mt-1 flex rounded-md">
90
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
104
91
  <span class="text-gray-500 sm:text-sm">{{ addon }}</span>
105
92
  </div>
106
93
  <input
107
94
  :type="inputType"
108
95
  :value="inputValue"
109
96
  @input="$emit('input', $event.target.value)"
97
+ @blur="$emit('blur', $event.target.value)"
110
98
  :class="errorClasses"
111
99
  :style="`padding-left:${leftPaddingStyle}`"
112
100
  class="focus:ring-indigo-500 focus:border-indigo-500 block w-full rounded-md sm:text-sm disabled:opacity-50"
@@ -123,10 +111,7 @@
123
111
  <p v-if="!isValidate" class="mt-2 text-sm text-red-600">
124
112
  {{ errorMessage }}
125
113
  </p>
126
- <p
127
- v-if="helpText && isValidate == true"
128
- :class="`mt-2 text-sm ${helpTextColorStyles}`"
129
- >
114
+ <p v-if="helpText && isValidate == true" :class="`mt-2 text-sm ${helpTextColorStyles}`">
130
115
  {{ helpText }}
131
116
  </p>
132
117
  </div>
@@ -209,6 +194,7 @@ export default {
209
194
  inputValue: this.value,
210
195
  };
211
196
  },
197
+ methods: {},
212
198
  watch: {
213
199
  value() {
214
200
  this.inputValue = this.value;
@@ -20,7 +20,11 @@
20
20
  type="solid"
21
21
  class="h-5 w-5 mr-3 text-gray-500"
22
22
  ></c-icon>
23
- <c-avatar :size="items.size" :rounded="items.rounded" :image="items.image"></c-avatar>
23
+ <c-avatar
24
+ :size="items.size"
25
+ :rounded="items.rounded"
26
+ :image="items.image"
27
+ ></c-avatar>
24
28
  <div class="flex flex-grow items-center justify-between flex-wrap">
25
29
  <div class="ml-3">
26
30
  <div class="flex pb-1">
@@ -42,9 +46,14 @@
42
46
  <button
43
47
  type="button"
44
48
  v-if="items.listIcon"
49
+ @click="$emit('remove')"
45
50
  class="rounded-full h-8 w-8 flex items-center justify-center text-gray-500 hover:bg-red-100 hover:text-red-800 focus:outline-none focus:ring-2 focus:ring-red-500"
46
51
  >
47
- <c-icon name="trash" type="solid" class="h-5 w-5 hover:text-red-800"></c-icon>
52
+ <c-icon
53
+ name="trash"
54
+ type="solid"
55
+ class="h-5 w-5 hover:text-red-800"
56
+ ></c-icon>
48
57
  </button>
49
58
  </div>
50
59
  </li>
@@ -14,7 +14,8 @@
14
14
  :placeholder="placeholder"
15
15
  :rows="rows"
16
16
  :class="errorClasses"
17
- class="focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md"
17
+ :disabled="disabled"
18
+ class="focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md disabled:opacity-50"
18
19
  ></textarea>
19
20
  <div
20
21
  v-if="!isValidate"
@@ -55,6 +56,10 @@ export default {
55
56
  errorMessage: {
56
57
  type: String,
57
58
  },
59
+ disabled: {
60
+ type: Boolean,
61
+ default: false,
62
+ },
58
63
  },
59
64
  computed: {
60
65
  errorClasses() {
@@ -1,16 +1,16 @@
1
- import CTextarea from '../components/CTextarea/CTextarea.vue';
2
- import './utils.css'
1
+ import CTextarea from "../components/CTextarea/CTextarea.vue";
2
+ import "./utils.css";
3
3
 
4
4
  export default {
5
- title: 'CTextarea',
5
+ title: "CTextarea",
6
6
  component: CTextarea,
7
7
  argTypes: {
8
8
  label: String,
9
9
  placeholder: String,
10
10
  rows: String,
11
11
  helpText: String,
12
- hint:String,
13
- isValidate: Boolean
12
+ hint: String,
13
+ isValidate: Boolean,
14
14
  },
15
15
  };
16
16
 
@@ -22,10 +22,11 @@ const Template = (args, { argTypes }) => ({
22
22
 
23
23
  export const Default = Template.bind({});
24
24
  Default.args = {
25
- label: 'Name',
26
- placeholder: 'Enter your name',
27
- rows: '3',
28
- helpText: 'This information is displayed on booking page',
29
- hint: 'Optional',
30
- isValidate: true
25
+ label: "Name",
26
+ placeholder: "Enter your name",
27
+ rows: "3",
28
+ helpText: "This information is displayed on booking page",
29
+ hint: "Optional",
30
+ isValidate: true,
31
+ disabled: false,
31
32
  };