classcard-ui 0.2.216 → 0.2.222

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.216",
3
+ "version": "0.2.222",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -83,6 +83,8 @@ export default {
83
83
  this.type == "danger",
84
84
  "text-white hover:bg-green-800 bg-green-700 focus:ring-green-600":
85
85
  this.type == "success",
86
+ "text-green-800 border border-solid border-gray-300 bg-white hover:bg-gray-50 focus:ring-indigo-600":
87
+ this.type == "secondary-success",
86
88
  "text-gray-700 hover:bg-gray-200 bg-gray-100":
87
89
  this.type == "secondary-gray",
88
90
  "bg-red-100 text-red-800 hover:bg-red-200 focus:ring-red-200":
@@ -25,7 +25,7 @@ export default {
25
25
  props: {
26
26
  label: { type: String },
27
27
  description: { type: String },
28
- value: { type: Number },
28
+ value: [Boolean, Number],
29
29
  isDisabled: {
30
30
  type: Boolean,
31
31
  },
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div>
3
3
  <div
4
- :class="divider || showSection ? 'border-b border-gray-200 pb-2' : ''"
5
4
  class="flex flex-row items-center justify-between cursor-pointer"
6
5
  @click="collapse"
7
6
  >
@@ -35,7 +34,9 @@
35
34
  ></c-anchor-tag>
36
35
  </div>
37
36
  <!-- content to render in collapsible section -->
38
- <div class="text-sm text-gray-500 mt-5" v-if="showSection">
37
+ <div class="text-sm text-gray-500 mt-5"
38
+ :class="divider || showSection ? 'border-b border-gray-200 pb-8' : ''"
39
+ v-if="showSection">
39
40
  <slot></slot>
40
41
  </div>
41
42
  </div>
@@ -13,6 +13,7 @@
13
13
  @input="setSelectedOptions"
14
14
  @search="fetchOptions"
15
15
  :label="optionLabel"
16
+ :clearable="clearable"
16
17
  >
17
18
  <template #open-indicator="{ attributes }">
18
19
  <span v-bind="attributes">
@@ -116,6 +117,10 @@ export default {
116
117
  type: Boolean,
117
118
  default: false,
118
119
  },
120
+ clearable: {
121
+ type: Boolean,
122
+ default: true,
123
+ },
119
124
  },
120
125
  computed: {},
121
126
  data() {
@@ -12,11 +12,10 @@
12
12
  <!-- button to show list of columns to show hide in table -->
13
13
  <div>
14
14
  <button
15
- @click="toggleDropdown = !toggleDropdown"
15
+ @click="handleToggle"
16
16
  class="inline-flex justify-center w-full rounded-md border border-gray-200 shadow-sm px-2 py-2 bg-white text-sm font-medium hover:bg-gray-50 focus:outline-none focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600"
17
17
  aria-haspopup="true"
18
18
  aria-expanded="true"
19
- @blur="toggleDropdown = false"
20
19
  >
21
20
  <c-icon name="view-board" type="solid" class="text-gray-400 h-5 w-5"></c-icon>
22
21
  <c-icon
@@ -28,9 +27,11 @@
28
27
  </div>
29
28
  <!-- dropdown having list of all columns to show hide -->
30
29
  <div
31
- v-show="toggleDropdown"
30
+ v-if="toggleDropdown"
32
31
  class="origin-top-right absolute right-0 mt-2 -mr-1 w-56 rounded-md shadow-lg bg-white ring-1 ring-gray-900 ring-opacity-5 z-100 overflow-y-auto max-h-96"
33
- >
32
+ tabindex="0"
33
+ @blur="handleToggle"
34
+ >
34
35
  <div
35
36
  class="py-1"
36
37
  role="menu"
@@ -303,6 +304,9 @@ export default {
303
304
  };
304
305
  },
305
306
  methods: {
307
+ handleToggle() {
308
+ this.toggleDropdown = !this.toggleDropdown;
309
+ },
306
310
  showHideColumn(value, name) {
307
311
  this.$emit("hideCols", value, name);
308
312
  },
@@ -18,6 +18,7 @@ export default {
18
18
  "secondary-gray",
19
19
  "light-red",
20
20
  "dark-blue",
21
+ "secondary-success"
21
22
  ],
22
23
  },
23
24
  },