@appscode/design-system 2.17.27 → 2.17.28

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.17.27",
3
+ "version": "2.17.28",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -1,7 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { defineProps, defineEmits, type Component } from "vue";
2
+ import { defineProps, defineEmits, type Component, defineAsyncComponent } from "vue";
3
3
  import AcButton from "../../v3/button/Button.vue";
4
-
4
+ const Skeletons = defineAsyncComponent(() => import("../skeleton/Skeletons.vue"));
5
+ const Skeleton = defineAsyncComponent(() => import("../skeleton/Skeleton.vue"));
5
6
  interface UsageRow {
6
7
  icon?: Component;
7
8
  label: string;
@@ -15,11 +16,13 @@ const props = withDefaults(
15
16
  title?: string;
16
17
  thead?: Header[];
17
18
  tbody?: UsageRow[];
19
+ isLoaderActive?: boolean;
18
20
  }>(),
19
21
  {
20
22
  title: "Total Usage Data",
21
23
  thead: () => [],
22
24
  tbody: () => [],
25
+ isLoaderActive: false,
23
26
  },
24
27
  );
25
28
 
@@ -38,7 +41,7 @@ const handleHeaderButtonClick = (header: Header, index: number) => {
38
41
  <h5 class="mb-8">{{ title }}</h5>
39
42
  <div class="usage-table-card">
40
43
  <div class="table-row thead">
41
- <div v-for="(header, index) in thead" :key="index" class="table-cell">
44
+ <div v-for="(header, index) in thead" :key="index" class="table-cell has-text-weight-normal">
42
45
  <template v-if="typeof header === 'string'">
43
46
  {{ header }}
44
47
  </template>
@@ -65,8 +68,17 @@ const handleHeaderButtonClick = (header: Header, index: number) => {
65
68
  <span>{{ row.label }}</span>
66
69
  </div>
67
70
  </div>
68
- <div v-for="(val, valIndex) in row.values" :key="valIndex" class="table-cell">
69
- {{ val }}
71
+ <div v-for="(val, valIndex) in row.values" :key="valIndex" class="table-cell has-text-weight-normal">
72
+ <div v-if="isLoaderActive">
73
+ <skeletons>
74
+ <template #default>
75
+ <Skeleton />
76
+ </template>
77
+ </skeletons>
78
+ </div>
79
+ <div v-else>
80
+ {{ val }}
81
+ </div>
70
82
  </div>
71
83
  </div>
72
84
  </div>