classcard-ui 0.2.325 → 0.2.328

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.325",
3
+ "version": "0.2.328",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/core": "^7.15.5",
40
- "@storybook/addon-actions": "^6.4.13",
41
- "@storybook/addon-essentials": "^6.4.13",
42
- "@storybook/addon-links": "^6.4.13",
43
- "@storybook/vue": "^6.4.13",
40
+ "@storybook/addon-actions": "^6.4.19",
41
+ "@storybook/addon-essentials": "^6.4.19",
42
+ "@storybook/addon-links": "^6.4.19",
43
+ "@storybook/vue": "^6.4.19",
44
44
  "@tailwindcss/postcss7-compat": "^2.2.14",
45
45
  "@types/lodash-es": "^4.17.5",
46
46
  "@vue/cli-plugin-babel": "^4.5.13",
@@ -47,7 +47,7 @@
47
47
  type="button"
48
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"
49
49
  :class="{
50
- 'rounded-r-md border-l-0': index == buttonObject.length - 1,
50
+ 'rounded-r-md border-l-0 border-r rounded-l-none': index == buttonObject.length - 1,
51
51
  'rounded-l-md': index == 0,
52
52
  'border-r-0': index == 0 && buttonObject.length != 2,
53
53
  'px-4': button.label,
@@ -24,9 +24,8 @@
24
24
  >
25
25
  <ul class="py-1" tabindex="-1" role="listbox" aria-labelledby="listbox-label">
26
26
  <li
27
- v-for="(item, index) in items"
27
+ v-for="(item) in items"
28
28
  :key="item.text"
29
- :class="index !== Object.keys(items).length - 1 ? 'border-b border-gray-200' : ''"
30
29
  class="flex px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 hover:text-gray-900 cursor-pointer"
31
30
  @mousedown="emitOptionAction(item.action)"
32
31
  >
@@ -10,7 +10,10 @@
10
10
  <p v-if="isRequired" class="ml-1 text-red-600">*</p>
11
11
  </div>
12
12
  <v-date-picker
13
- :class="{ 'inline-block h-full': true, 'w-full': isExpanded }"
13
+ :class="{
14
+ 'inline-block h-full': true,
15
+ 'w-full': isExpanded,
16
+ }"
14
17
  :masks="masks"
15
18
  @input="onDayClick"
16
19
  :value="value"
@@ -38,7 +41,7 @@
38
41
  :value="inputValue"
39
42
  :class="[
40
43
  disabled
41
- ? 'border-l-0 border-gray-100 text-gray-400'
44
+ ? 'pointer-events-none border-l-0 border-gray-100 text-gray-400'
42
45
  : 'border-l-0 border-gray-300 text-gray-900',
43
46
  'focus:outline-none focus:border-blue-500 w-full appearance-none rounded-r-md border bg-white p-2 text-sm shadow-sm',
44
47
  ]"
@@ -9,11 +9,11 @@
9
9
  <label v-if="label" class="block text-sm font-medium text-gray-700">
10
10
  {{ label }}
11
11
  </label>
12
- <div class="mt-1 relative">
12
+ <div class="relative mt-1">
13
13
  <div class="relative">
14
14
  <input
15
15
  type="text"
16
- class="bg-white relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm"
16
+ class="focus:outline-none relative w-full cursor-default rounded-md border border-gray-300 bg-white py-2 pl-3 pr-10 text-left shadow-sm focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 disabled:pointer-events-none disabled:opacity-50 sm:text-sm"
17
17
  aria-haspopup="listbox"
18
18
  aria-expanded="true"
19
19
  aria-labelledby="listbox-label"
@@ -21,12 +21,11 @@
21
21
  :placeholder="placeholder"
22
22
  @focus="openDropDown()"
23
23
  @input="onInput"
24
+ :disabled="disabled"
24
25
  />
25
- <span
26
- class="absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"
27
- >
26
+ <span class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
28
27
  <svg
29
- class="animate-spin h-5 w-5 text-gray-400"
28
+ class="h-5 w-5 animate-spin text-gray-400"
30
29
  xmlns="http://www.w3.org/2000/svg"
31
30
  fill="none"
32
31
  viewBox="0 0 24 24"
@@ -74,7 +73,7 @@
74
73
  To: "opacity-0"
75
74
  -->
76
75
  <ul
77
- class="absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm"
76
+ class="ring-black focus:outline-none absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-opacity-5 sm:text-sm"
78
77
  tabindex="-1"
79
78
  role="listbox"
80
79
  aria-labelledby="listbox-label"
@@ -89,15 +88,15 @@
89
88
 
90
89
  <span v-for="option in options" :key="option.id">
91
90
  <li
92
- class="text-gray-900 text-left cursor-default select-none relative py-2 pl-3 pr-9"
91
+ class="relative cursor-default select-none py-2 pl-3 pr-9 text-left text-gray-900"
93
92
  role="option"
94
93
  >
95
- <span class="font-bold italic block truncate">
94
+ <span class="block truncate font-bold italic">
96
95
  {{ option.label }}
97
96
  </span>
98
97
  </li>
99
98
  <li
100
- class="text-gray-900 text-left cursor-default select-none relative py-2 pl-3 pr-9 group hover:text-white hover:bg-indigo-600"
99
+ class="group relative cursor-default select-none py-2 pl-3 pr-9 text-left text-gray-900 hover:bg-indigo-600 hover:text-white"
101
100
  v-for="subOption in option.options"
102
101
  :key="subOption.id"
103
102
  role="option"
@@ -106,9 +105,7 @@
106
105
  <!-- Selected: "font-semibold", Not Selected: "font-normal" -->
107
106
  <span
108
107
  :class="[
109
- subOption.label === value.label
110
- ? 'font-semibold'
111
- : 'font-normal',
108
+ subOption.label === value.label ? 'font-semibold' : 'font-normal',
112
109
  ' block break-words',
113
110
  ]"
114
111
  >
@@ -121,7 +118,7 @@
121
118
  Highlighted: "text-white", Not Highlighted: "text-indigo-600"
122
119
  -->
123
120
  <span
124
- class="text-indigo-600 absolute inset-y-0 right-0 flex items-center pr-4 group-hover:text-white"
121
+ class="absolute inset-y-0 right-0 flex items-center pr-4 text-indigo-600 group-hover:text-white"
125
122
  v-if="subOption.label === value.label"
126
123
  >
127
124
  <!-- Heroicon name: solid/check -->
@@ -145,7 +142,7 @@
145
142
  <!-- More items... -->
146
143
  </ul>
147
144
  </div>
148
- <p v-if="isError" class="mt-2 text-sm text-left text-red-600">
145
+ <p v-if="isError" class="mt-2 text-left text-sm text-red-600">
149
146
  {{ errorMessage }}
150
147
  </p>
151
148
  </div>
@@ -162,6 +159,7 @@ export default {
162
159
  value: Object,
163
160
  placeholder: String,
164
161
  isSearching: Boolean,
162
+ disabled: { type: Boolean, default: false },
165
163
  isError: { type: Boolean, default: false },
166
164
  errorMessage: {
167
165
  type: String,
@@ -23,8 +23,8 @@ const Template = (args, { argTypes }) => ({
23
23
  export const Default = Template.bind({});
24
24
  Default.args = {
25
25
  items: [
26
- { icon: "check", text: "one", action: "first" },
27
- { icon: "check", text: "two", action: "second" },
26
+ { icon: "check", text: "one", action: "first", iconType: "solid" },
27
+ { icon: "check", text: "two", action: "second", iconType: "solid" },
28
28
  ],
29
29
  type: "primary",
30
30
  label: "Button",