@appscode/design-system 2.4.28 → 2.4.30

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.4.28",
3
+ "version": "2.4.30",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -50,7 +50,7 @@ h5 {
50
50
  h6 {
51
51
  font-size: 1rem;
52
52
  letter-spacing: 0;
53
- font-weight: normal;
53
+ font-weight: 500;
54
54
  } // 13px
55
55
 
56
56
  h6 {
@@ -160,6 +160,12 @@ const onSelect = (selectedOption: unknown, id: string) => emit("select", selecte
160
160
  <template #noResult>
161
161
  <span> {{ noResultText }} </span>
162
162
  </template>
163
+ <template #singleLabel="props">
164
+ <slot name="singleLabel" v-bind="props" />
165
+ </template>
166
+ <template #option="props">
167
+ <slot name="option" v-bind="props" />
168
+ </template>
163
169
  </multiselect>
164
170
  <p v-show="errorMsg" class="is-danger">
165
171
  {{ errorMsg }}
@@ -9,8 +9,6 @@ import HeroiconsTrash from "~icons/heroicons/trash";
9
9
  import HeroiconsChevronDownSolid from "~icons/heroicons/chevron-down-solid";
10
10
  import HeroiconsChevronUpSolid from "~icons/heroicons/chevron-up-solid";
11
11
 
12
- const JsonModal = defineAsyncComponent(() => import("../modals/JsonShowModal.vue"));
13
-
14
12
  interface Props {
15
13
  disabled?: boolean;
16
14
  isCreateDisabled?: boolean;
@@ -51,8 +49,6 @@ const editFieldIndex = ref(-1);
51
49
  const isFormHidden = ref(true);
52
50
  const isSavingNewElement = ref(false);
53
51
  const dataForTable = defineModel<Array<AcTableRow>>({ required: true });
54
- const isOpen = ref(false);
55
- const fullNamespaceList = ref<string[]>([]);
56
52
 
57
53
  function onAddClick() {
58
54
  isSavingNewElement.value = true;
@@ -93,29 +89,9 @@ function readableTime(utcTime: unknown) {
93
89
  if (typeof utcTime === "string") return new Date(utcTime).toLocaleString();
94
90
  else return utcTime;
95
91
  }
96
- function truncatedNamespaces(namespaces: string[]): string {
97
- if (namespaces.length <= 1) {
98
- return namespaces[0];
99
- }
100
- return namespaces.slice(0, 1).join(", ") + ` (+${namespaces.length - 1})`;
101
- }
102
-
103
- function showFullNamespaceList(namespaces: string[]): void {
104
- isOpen.value = true;
105
-
106
- fullNamespaceList.value = namespaces;
107
- }
108
92
  </script>
109
93
 
110
94
  <template>
111
- <json-modal
112
- v-if="isOpen"
113
- :open="isOpen"
114
- :title="'Namespace List'"
115
- :editor-content="fullNamespaceList"
116
- @closemodal="isOpen = false"
117
- ></json-modal>
118
-
119
95
  <div :class="{ 'ac-nested-elements': label }">
120
96
  <!-- Add New Form Start -->
121
97
  <template v-if="isSavingNewElement">
@@ -208,21 +184,7 @@ function showFullNamespaceList(namespaces: string[]): void {
208
184
  <tr data-testid="ac-table-row">
209
185
  <td v-for="(itemColumn, idx) in itemRow.cells" :key="tableHeaders[idx].name + idx">
210
186
  <template v-if="tableHeaders[idx].type === 'date'">
211
- {{ readableTime(itemColumn.data) }}
212
- </template>
213
- <template
214
- v-else-if="tableHeaders[idx].name.toLowerCase() === 'namespace' && Array.isArray(itemColumn.data)"
215
- >
216
- <span
217
- >{{ truncatedNamespaces(itemColumn.data) }}
218
- <div
219
- v-if="itemColumn.data.length > 1"
220
- class="tag is-secondary is-light"
221
- @click="showFullNamespaceList(itemColumn.data)"
222
- >
223
- <a>More </a>
224
- </div></span
225
- >
187
+ {{ readableTime(itemColumn.data as string) }}
226
188
  </template>
227
189
  <template v-else>
228
190
  {{ itemColumn.data }}