@appscode/design-system 2.2.5 → 2.2.7

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": "@appscode/design-system",
3
- "version": "2.2.5",
3
+ "version": "2.2.7",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- withDefaults(defineProps<{ bannerClass: string }>(), { bannerClass: "has-text-danger" });
2
+ withDefaults(defineProps<{ bannerClass?: string }>(), { bannerClass: "has-text-danger" });
3
3
  </script>
4
4
 
5
5
  <template>
@@ -6,7 +6,6 @@ interface Props {
6
6
  title?: string;
7
7
  message?: string;
8
8
  itemName?: string;
9
- isLoading?: boolean;
10
9
  isDeleteActive?: boolean;
11
10
  }
12
11
 
@@ -15,7 +14,6 @@ withDefaults(defineProps<Props>(), {
15
14
  title: "",
16
15
  message: "",
17
16
  itemName: "",
18
- isLoading: false,
19
17
  isDeleteActive: false,
20
18
  });
21
19
 
@@ -13,6 +13,7 @@ interface Props {
13
13
  fullWidth?: number;
14
14
  columnStriped?: boolean;
15
15
  modifierClass?: string;
16
+ hasCheckbox?: boolean;
16
17
  }
17
18
 
18
19
  const props = withDefaults(defineProps<Props>(), {
@@ -26,6 +27,7 @@ const props = withDefaults(defineProps<Props>(), {
26
27
  fullWidth: 1920,
27
28
  columnStriped: false,
28
29
  modifierClass: "",
30
+ hasCheckbox: false,
29
31
  });
30
32
 
31
33
  const emit = defineEmits(["sort", "scroller"]);
@@ -41,7 +43,6 @@ const fakeCellWidth = ref(0);
41
43
  const headerSortables = ref<Array<{ enabled: boolean; mode: string }>>([]);
42
44
  const ac_table = ref(null as HTMLElement | null);
43
45
  const ac_table_container = ref(null as HTMLElement | null);
44
-
45
46
  const headerLabels = computed(() => {
46
47
  return props.tableHeaders.map((th) => (typeof th === "string" ? th : th?.name || "Label"));
47
48
  });
@@ -161,7 +162,13 @@ onUpdated(() => {
161
162
  }"
162
163
  @click.prevent="headerSortables[idx].enabled && emitSortEvent(idx)"
163
164
  >
164
- {{ headerLabels[idx] }}
165
+ <span v-if="hasCheckbox && headerLabels[idx] === 'checkbox'">
166
+ <slot name="checkbox" />
167
+ </span>
168
+ <span v-else>
169
+ {{ headerLabels[idx] }}
170
+ </span>
171
+
165
172
  <span
166
173
  v-if="
167
174
  tableHeader.dashboard && tableHeader.dashboard.status && tableHeader.dashboard.status !== 'Success'