@appscode/design-system 1.1.0-beta.9 → 1.1.0-beta.91

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.
Files changed (117) hide show
  1. package/base/utilities/_all.scss +2 -2
  2. package/base/utilities/_colors.scss +105 -136
  3. package/base/utilities/_global.scss +25 -20
  4. package/base/utilities/_layouts.scss +0 -138
  5. package/base/utilities/_typography.scss +2 -2
  6. package/components/_ac-alert-box.scss +2 -2
  7. package/components/_ac-code-highlight.scss +9 -12
  8. package/components/_ac-drag.scss +4 -4
  9. package/components/_ac-modal.scss +2 -2
  10. package/components/_ac-select-box.scss +5 -5
  11. package/components/_ac-table.scss +7 -7
  12. package/components/_ac-tabs.scss +29 -26
  13. package/components/_all.scss +8 -5
  14. package/components/_buttons.scss +10 -10
  15. package/components/_getkeeper.scss +110 -0
  16. package/components/_graph.scss +10 -10
  17. package/components/_image-upload.scss +4 -4
  18. package/components/_input-card.scss +232 -0
  19. package/components/_input.scss +573 -0
  20. package/components/_left-sidebar-menu.scss +9 -13
  21. package/components/_monaco-editor.scss +2 -2
  22. package/components/_multi-select.scss +589 -0
  23. package/components/_navbar.scss +7 -7
  24. package/components/_nested-list.scss +2 -2
  25. package/components/_overview-info.scss +3 -3
  26. package/components/_pricing-table.scss +5 -5
  27. package/components/_progress-bar.scss +61 -74
  28. package/components/_subscription-card.scss +8 -10
  29. package/components/_table-of-content.scss +4 -4
  30. package/components/{_ac-terminal.scss → _terminal.scss} +63 -74
  31. package/components/_widget-menu.scss +7 -12
  32. package/components/_wizard.scss +13 -286
  33. package/components/ac-toaster/_ac-toasted.scss +4 -4
  34. package/components/bbum/_information-center.scss +8 -10
  35. package/components/bbum/_mobile-desktop.scss +9 -14
  36. package/components/bbum/_single-post-preview.scss +9 -9
  37. package/components/ui-builder/_ui-builder.scss +202 -18
  38. package/components/ui-builder/_vue-open-api.scss +63 -18
  39. package/icons/close-icon.svg +3 -0
  40. package/layouts/_code-preview.scss +6 -7
  41. package/package.json +1 -1
  42. package/vue-components/types/notification.ts +3 -3
  43. package/vue-components/types/table.ts +1 -0
  44. package/vue-components/v2/banner/Banner.vue +1 -1
  45. package/vue-components/v2/button/Buttons.vue +1 -1
  46. package/vue-components/v2/modal/Modal.vue +1 -1
  47. package/vue-components/v3/alert/Alert.vue +2 -2
  48. package/vue-components/v3/banner/Banner.vue +2 -2
  49. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +66 -4
  50. package/vue-components/v3/button/Button.vue +49 -786
  51. package/vue-components/v3/button/Buttons.vue +18 -2
  52. package/vue-components/v3/cards/Cluster.vue +37 -26
  53. package/vue-components/v3/cards/FeatureCard.vue +7 -11
  54. package/vue-components/v3/cards/FeatureCards.vue +1 -1
  55. package/vue-components/v3/cards/InfoCard.vue +1 -2
  56. package/vue-components/v3/cards/Monitoring.vue +6 -10
  57. package/vue-components/v3/cards/OverviewCard.vue +4 -0
  58. package/vue-components/v3/cards/OverviewCards.vue +10 -2
  59. package/vue-components/v3/cards/Vendor.vue +10 -6
  60. package/vue-components/v3/content/ContentHeader.vue +1 -1
  61. package/vue-components/v3/dropdown/DropdownAction.vue +95 -0
  62. package/vue-components/v3/editor/Editor.vue +20 -5
  63. package/vue-components/v3/editor/FilteredFileEditor.vue +9 -2
  64. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +4 -1
  65. package/vue-components/v3/footer/FooterArea.vue +8 -2
  66. package/vue-components/v3/footer/Info.vue +10 -8
  67. package/vue-components/v3/footer/Status.vue +24 -23
  68. package/vue-components/v3/footer/Usage.vue +20 -30
  69. package/vue-components/v3/form/Form.vue +0 -3
  70. package/vue-components/v3/form/FormFooter.vue +24 -0
  71. package/vue-components/v3/form-fields/AcSingleInput.vue +1 -508
  72. package/vue-components/v3/form-fields/FileUpload.vue +89 -0
  73. package/vue-components/v3/form-fields/Input.vue +2 -3
  74. package/vue-components/v3/header/Header.vue +1 -1
  75. package/vue-components/v3/loaders/InfoCardLoader.vue +18 -60
  76. package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
  77. package/vue-components/v3/modal/Modal.vue +12 -14
  78. package/vue-components/v3/modals/JsonShowModal.vue +1 -0
  79. package/vue-components/v3/navbar/Appdrawer.vue +3 -1
  80. package/vue-components/v3/navbar/Navbar.vue +0 -159
  81. package/vue-components/v3/navbar/NavbarItem.vue +37 -15
  82. package/vue-components/v3/navbar/NavbarItemContent.vue +6 -8
  83. package/vue-components/v3/navbar/Notification.vue +38 -10
  84. package/vue-components/v3/navbar/User.vue +43 -31
  85. package/vue-components/v3/notification/AlertBox.vue +233 -3
  86. package/vue-components/v3/notification/Notification.vue +2 -2
  87. package/vue-components/v3/option-dots/Options.vue +17 -8
  88. package/vue-components/v3/pagination/Pagination.vue +27 -17
  89. package/vue-components/v3/preloader/Preloader.vue +1 -1
  90. package/vue-components/v3/searchbars/SearchBar.vue +1 -10
  91. package/vue-components/v3/sidebar/ClusterSwitcher.vue +1 -765
  92. package/vue-components/v3/sidebar/Sidebar.vue +2 -30
  93. package/vue-components/v3/sidebar/SidebarBody.vue +9 -2
  94. package/vue-components/v3/sidebar/SidebarFooter.vue +6 -3
  95. package/vue-components/v3/sidebar/SidebarHeader.vue +6 -2
  96. package/vue-components/v3/sidebar/Steps.vue +2 -2
  97. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +78 -2
  98. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +15 -3
  99. package/vue-components/v3/tab/Tabs.vue +27 -0
  100. package/vue-components/v3/table/Table.vue +14 -16
  101. package/vue-components/v3/table/TableCell.vue +1 -9
  102. package/vue-components/v3/table/TableRow.vue +2 -2
  103. package/vue-components/v3/table/table-cell/ArrayCell.vue +35 -32
  104. package/vue-components/v3/table/table-cell/CellValue.vue +14 -40
  105. package/vue-components/v3/table/table-cell/ObjectCell.vue +40 -38
  106. package/vue-components/v3/tag/Tag.vue +1 -0
  107. package/base/utilities/dark-theme.scss +0 -26
  108. package/components/_ac-card.scss +0 -0
  109. package/components/_ac-input.scss +0 -901
  110. package/components/_ac-multi-select.scss +0 -780
  111. package/vue-components/text.vue +0 -1
  112. package/vue-components/types/longRunningTasks.ts +0 -20
  113. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -94
  114. package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -402
  115. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -151
  116. /package/components/{_ac-accordion.scss → _accordion.scss} +0 -0
  117. /package/components/{_ac-report.scss → _report.scss} +0 -0
@@ -50,7 +50,7 @@ withDefaults(defineProps<Props>(), {
50
50
  height: calc(100vh - 80px);
51
51
  overflow-y: auto;
52
52
  padding-top: 4px;
53
- scrollbar-color: $white-100-light transparent;
53
+ scrollbar-color: $white-100 transparent;
54
54
 
55
55
  /* width */
56
56
  &::-webkit-scrollbar {
@@ -197,37 +197,9 @@ withDefaults(defineProps<Props>(), {
197
197
  }
198
198
  }
199
199
  }
200
-
201
- // .ac-options.is-right {
202
- // .option-dots {
203
- // transition: 0.3s;
204
-
205
- // i.fa {
206
- // &.fa-angle-left {
207
- // font-size: 18px;
208
- // }
209
- // }
210
-
211
- // &:active {
212
- // i.fa {
213
- // background-color: $white-100-lighter;
214
- // width: 25px;
215
- // height: 25px;
216
- // text-align: center;
217
- // line-height: 25px;
218
- // border-radius: 50%;
219
- // }
220
- // }
221
-
222
- // &:hover {
223
- // color: $primary !important;
224
- // transform: scale(1.2);
225
- // }
226
- // }
227
- // }
228
200
  }
229
201
 
230
- .sidebar-collapsed {
202
+ .sidebar-collapsed:not(.is-hoverable) {
231
203
  .ac-left-sidebar-wrapper {
232
204
  width: 60px;
233
205
  .ac-left-sidebar {
@@ -1,7 +1,14 @@
1
- <script setup lang="ts"></script>
1
+ <script setup lang="ts">
2
+ defineEmits(["hover"]);
3
+ </script>
2
4
 
3
5
  <template>
4
- <ul class="menu-list ac-menu-list">
6
+ <ul
7
+ class="menu-list ac-menu-list"
8
+ data-testid="cluster-sidebar-menu-list"
9
+ @mouseenter="$emit('hover', true)"
10
+ @mouseleave="$emit('hover', false)"
11
+ >
5
12
  <slot />
6
13
  </ul>
7
14
  </template>
@@ -16,7 +16,7 @@ const AccentColorPicker = defineAsyncComponent(
16
16
  <template>
17
17
  <div class="sidebar-footer">
18
18
  <!-- back button -->
19
- <button class="back-button is-transparent" @click="$emit('toggleSidebar')">
19
+ <button class="back-button is-transparent" data-testid = "sidebar-footer-back-button" @click="$emit('toggleSidebar')">
20
20
  <svg
21
21
  width="18"
22
22
  height="18"
@@ -73,8 +73,11 @@ const AccentColorPicker = defineAsyncComponent(
73
73
  .accent-color-picker {
74
74
  display: none;
75
75
  }
76
- .sidebar-footer .back-button {
77
- width: 100%;
76
+ .sidebar-footer {
77
+ .back-button {
78
+ width: 100%;
79
+ transform: rotate(180deg);
80
+ }
78
81
  }
79
82
  }
80
83
  </style>
@@ -18,7 +18,11 @@ withDefaults(defineProps<Props>(), {
18
18
  <template>
19
19
  <div class="sidebar-header">
20
20
  <!-- hamburger icon -->
21
- <div class="icon hamburger-icon mr-16" @click="$emit('toggleSidebar')">
21
+ <div
22
+ class="icon hamburger-icon mr-16"
23
+ data-testid="sidebar-menu-button"
24
+ @click="$emit('toggleSidebar')"
25
+ >
22
26
  <svg
23
27
  width="18"
24
28
  height="18"
@@ -60,7 +64,7 @@ withDefaults(defineProps<Props>(), {
60
64
  </template>
61
65
 
62
66
  <style lang="scss" scoped>
63
- .sidebar-collapsed .ac-left-sidebar-wrapper {
67
+ .sidebar-collapsed:not(.is-hoverable) .ac-left-sidebar-wrapper {
64
68
  .brand-logo {
65
69
  display: none !important;
66
70
  }
@@ -25,13 +25,13 @@ withDefaults(defineProps<Props>(), {
25
25
  >
26
26
  <strong
27
27
  :class="{
28
- 'is-active': step.identifier < activeStepIdentifier,
28
+ 'is-active': step.identifier <= activeStepIdentifier,
29
29
  }"
30
30
  >
31
31
  <span
32
32
  :class="{
33
33
  'step-count': true,
34
- 'is-active': step.identifier < activeStepIdentifier,
34
+ 'is-active': step.identifier <= activeStepIdentifier,
35
35
  }"
36
36
  >{{ step.identifier }}</span
37
37
  >
@@ -16,7 +16,7 @@
16
16
  a {
17
17
  display: flex;
18
18
  align-items: center;
19
- color: $black-40;
19
+ color: $primary-10;
20
20
  position: relative;
21
21
  z-index: 1;
22
22
  padding: 8px 16px;
@@ -59,8 +59,84 @@
59
59
  opacity: 1;
60
60
  visibility: visible;
61
61
  }
62
+ &.is-danger {
63
+ color: $danger;
64
+ &:hover {
65
+ &::after {
66
+ background-color: $red-90;
67
+ }
68
+ }
69
+ &:after {
70
+ opacity: 1;
71
+ visibility: visible;
72
+ background-color: $red-95;
73
+ }
74
+ }
75
+ &.is-success {
76
+ color: $success;
77
+ &:hover {
78
+ &::after {
79
+ background-color: $green-90;
80
+ }
81
+ }
82
+ &:after {
83
+ opacity: 1;
84
+ visibility: visible;
85
+ background-color: $green-95;
86
+ }
87
+ }
88
+ &.is-warning {
89
+ color: $warning;
90
+ &:hover {
91
+ &::after {
92
+ background-color: $yellow-90;
93
+ }
94
+ }
95
+ &:after {
96
+ opacity: 1;
97
+ visibility: visible;
98
+ background-color: $yellow-95;
99
+ }
100
+ }
62
101
  }
63
- span {
102
+ &.is-danger {
103
+ color: $danger;
104
+ &:hover {
105
+ &::after {
106
+ background-color: $red-90;
107
+ }
108
+ }
109
+ &:after {
110
+ opacity: 1;
111
+ visibility: visible;
112
+ background-color: transparent;
113
+ }
114
+ }
115
+ &.is-success {
116
+ color: $success;
117
+ &:hover {
118
+ &::after {
119
+ background-color: $green-90;
120
+ }
121
+ }
122
+ &:after {
123
+ opacity: 1;
124
+ visibility: visible;
125
+ background-color: transparent;
126
+ }
127
+ }
128
+ &.is-warning {
129
+ color: $warning;
130
+ &:hover {
131
+ &::after {
132
+ background-color: $yellow-90;
133
+ }
134
+ }
135
+ &:after {
136
+ opacity: 1;
137
+ visibility: visible;
138
+ background-color: transparent;
139
+ }
64
140
  }
65
141
  }
66
142
  &.is-open {
@@ -1,4 +1,11 @@
1
- <script lang="ts" setup></script>
1
+ <script lang="ts" setup>
2
+ interface Props {
3
+ isSidebarVisible?: boolean;
4
+ }
5
+ withDefaults(defineProps<Props>(), {
6
+ isSidebarVisible: true,
7
+ });
8
+ </script>
2
9
 
3
10
  <template>
4
11
  <div class="sidebar-tabs-layout is-flex">
@@ -8,7 +15,10 @@
8
15
  </div>
9
16
  <!-- sidebar tabs -->
10
17
 
11
- <div class="content-wrapper">
18
+ <div
19
+ class="content-wrapper"
20
+ :class="isSidebarVisible ? 'pl-220' : 'pl-0 pb-0'"
21
+ >
12
22
  <!-- sidebar content -->
13
23
  <slot name="tabs-content" />
14
24
  <!-- sidebar content -->
@@ -21,8 +31,10 @@
21
31
  position: fixed;
22
32
  background-color: $white-100;
23
33
  }
24
- .content-wrapper {
34
+ .pl-220 {
25
35
  padding-left: 220px;
36
+ }
37
+ .content-wrapper {
26
38
  padding-bottom: 40px;
27
39
  width: 100%;
28
40
  }
@@ -7,3 +7,30 @@
7
7
  </ul>
8
8
  </div>
9
9
  </template>
10
+
11
+ <style lang="scss">
12
+ .tabs {
13
+ &.ac-tabs {
14
+ ul {
15
+ border-color: $primary-90;
16
+ }
17
+ a {
18
+ padding: 8px 20px;
19
+ color: $primary-10;
20
+ font-weight: 500;
21
+ color: $black-40;
22
+ &:hover {
23
+ border-bottom-color: $black-40;
24
+ }
25
+ }
26
+ li {
27
+ &.is-active {
28
+ a {
29
+ border-bottom-color: $primary;
30
+ color: $primary;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ </style>
@@ -199,11 +199,7 @@ onUpdated(() => {
199
199
  <i class="fa fa-exclamation-triangle" />
200
200
  </span>
201
201
  </th>
202
- <th
203
- ref="action-section"
204
- v-if="actionable"
205
- style="min-width: 100px"
206
- ></th>
202
+ <th ref="action-section" v-if="actionable"></th>
207
203
  <fake-table-cell
208
204
  v-if="fakeCellWidth > 0"
209
205
  :is-header-cell="true"
@@ -272,7 +268,7 @@ onUpdated(() => {
272
268
  margin-bottom: 0;
273
269
 
274
270
  thead {
275
- background-color: $white-100-lighter;
271
+ background-color: $primary-95;
276
272
  font-size: 13px;
277
273
  line-height: initial;
278
274
 
@@ -334,11 +330,11 @@ onUpdated(() => {
334
330
  box-shadow: inset 0 0 0 1px $primary;
335
331
  border-radius: 4px;
336
332
  border-bottom: none;
337
- color: $ac-black;
333
+ color: $black-5;
338
334
  }
339
335
 
340
336
  tr {
341
- border-bottom: 1px solid var(--ac-white-light);
337
+ border-bottom: 1px solid $primary-90;
342
338
  &.is-link {
343
339
  cursor: pointer;
344
340
  }
@@ -348,10 +344,10 @@ onUpdated(() => {
348
344
  box-shadow: inset 0 0 0 1.2px $primary;
349
345
  border-radius: 4px;
350
346
  border-bottom: none;
351
- color: $ac-black;
347
+ color: $black-5;
352
348
  transition: 0.3s ease-in-out;
353
349
  .tag {
354
- background-color: $primary-90;
350
+ background-color: $primary-80;
355
351
  }
356
352
  &:hover {
357
353
  background-color: $primary-95 !important;
@@ -447,6 +443,8 @@ onUpdated(() => {
447
443
  animation: collapse 0.5s ease-in-out;
448
444
  }
449
445
  }
446
+
447
+ white-space: nowrap;
450
448
  }
451
449
 
452
450
  .options-items {
@@ -466,15 +464,15 @@ onUpdated(() => {
466
464
  width: 36px;
467
465
 
468
466
  .increase-innner {
469
- border-bottom: 1px solid var(--ac-white-light);
470
- border-top: 1px solid var(--ac-white-light);
467
+ border-bottom: 1px solid $primary-90;
468
+ border-top: 1px solid $primary-90;
471
469
  bottom: -1px;
472
470
  left: 0;
473
471
  position: absolute;
474
472
  right: -451px;
475
473
  top: -1px;
476
474
  visibility: visible;
477
- background-color: $white-100-lighter;
475
+ background-color: $primary-90;
478
476
  }
479
477
  }
480
478
 
@@ -536,7 +534,7 @@ onUpdated(() => {
536
534
  .ac-single-checkbox {
537
535
  .is-checkradio[type="checkbox"] {
538
536
  &.ac-checkbox + label {
539
- color: $ac-link-black;
537
+ color: $primary-20;
540
538
 
541
539
  &::before {
542
540
  height: 16px;
@@ -559,7 +557,7 @@ onUpdated(() => {
559
557
  }
560
558
 
561
559
  &:checked + label::after {
562
- border-color: $white-100-lighter;
560
+ border-color: $primary-90;
563
561
  }
564
562
  }
565
563
  }
@@ -652,7 +650,7 @@ onUpdated(() => {
652
650
  // table inner shadow
653
651
  .table-inner-shadow {
654
652
  border-radius: 0px;
655
- background: $white-100-lighter;
653
+ background: $primary-90;
656
654
  box-shadow: inset 5px 5px 10px #e3e6e9, inset -5px -5px 10px #ffffff;
657
655
  }
658
656
 
@@ -8,18 +8,10 @@ interface Props {
8
8
  const props = withDefaults(defineProps<Props>(), {
9
9
  cellWidth: null,
10
10
  });
11
-
12
- const styleOb = computed(() => {
13
- const ob: { width?: string } = {};
14
- if (props.cellWidth) {
15
- ob.width = `${props.cellWidth}px`;
16
- }
17
- return ob || {};
18
- });
19
11
  </script>
20
12
 
21
13
  <template>
22
- <td :style="styleOb">
14
+ <td>
23
15
  <slot />
24
16
  </td>
25
17
  </template>
@@ -77,7 +77,7 @@ const toggleCollapse = () => {
77
77
  >
78
78
  <table-cell v-if="collapsible">
79
79
  <collapsible-button
80
- modifier-classes="is-square is-light height-20 width-20 is-rounded is-size-7"
80
+ modifier-classes="is-square is-light height-20 width-20 is-rounded is-size-7 p-0"
81
81
  :icon-class="isCollapsed ? 'chevron-right' : 'chevron-down'"
82
82
  @click.stop="toggleCollapse"
83
83
  />
@@ -102,7 +102,7 @@ const toggleCollapse = () => {
102
102
  >
103
103
  <table-cell v-if="collapsible">
104
104
  <collapsible-button
105
- modifier-classes="is-square is-light height-20 width-20 is-rounded is-size-7"
105
+ modifier-classes="is-square is-light height-20 width-20 is-rounded is-size-7 p-0"
106
106
  :icon-class="isCollapsed ? 'chevron-right' : 'chevron-down'"
107
107
  @click.stop="toggleCollapse"
108
108
  />
@@ -51,10 +51,10 @@ const printableStringObjs = computed(() => {
51
51
 
52
52
  const indexOfCharacterLengthExceed = computed(() => {
53
53
  let idx = -1;
54
- let cumulativeLen = 0;
54
+ let cumulativeLen = 2;
55
55
  for (const [index, po] of printableStringObjs.value.entries()) {
56
- const newLen = cumulativeLen + po.print.length;
57
- if (newLen > props.maxCharacterLength) {
56
+ const newLen = cumulativeLen + po.print.length + 2;
57
+ if (newLen + 4 > props.maxCharacterLength) {
58
58
  idx = index;
59
59
  break;
60
60
  }
@@ -66,34 +66,37 @@ const indexOfCharacterLengthExceed = computed(() => {
66
66
  </script>
67
67
 
68
68
  <template>
69
- <tags v-if="printableStringObjs.length">
70
- <tag
71
- v-for="(printableStringOb, idx) in printableStringObjs.slice(
72
- 0,
73
- indexOfCharacterLengthExceed
74
- )"
75
- :key="`${printableStringOb.print}-${idx}`"
76
- >
77
- <value-with-modal
78
- v-if="printableStringOb.exceededLength"
79
- :title="`${cellTitle}: ${idx}`"
80
- :value="printableStringOb.value"
81
- :print="printableStringOb.print"
82
- />
83
- <template v-else> {{ printableStringOb.print }} </template>
84
- </tag>
85
-
86
- <tag v-if="indexOfCharacterLengthExceed !== printableStringObjs.length">
87
- <a @click.prevent.stop="showFullData = true">
88
- <ellipsis-icon />
89
- <json-show-modal
90
- :open="showFullData"
91
- @closemodal="showFullData = false"
92
- :editor-title="cellTitle"
93
- :editor-content="items"
69
+ <span>
70
+ <tags v-if="printableStringObjs.length">
71
+ <tag
72
+ v-for="(printableStringOb, idx) in printableStringObjs.slice(
73
+ 0,
74
+ indexOfCharacterLengthExceed
75
+ )"
76
+ :key="`${printableStringOb.print}-${idx}`"
77
+ modifierClasses="is-primary is-light"
78
+ >
79
+ <value-with-modal
80
+ v-if="printableStringOb.exceededLength"
81
+ :title="`${cellTitle}: ${idx}`"
82
+ :value="printableStringOb.value"
83
+ :print="printableStringOb.print"
94
84
  />
95
- </a>
96
- </tag>
97
- </tags>
98
- <p v-else>-</p>
85
+ <template v-else> {{ printableStringOb.print }} </template>
86
+ </tag>
87
+
88
+ <tag v-if="indexOfCharacterLengthExceed !== printableStringObjs.length">
89
+ <a @click.prevent.stop="showFullData = true">
90
+ <ellipsis-icon />
91
+ <json-show-modal
92
+ :open="showFullData"
93
+ @closemodal="showFullData = false"
94
+ :editor-title="cellTitle"
95
+ :editor-content="items"
96
+ />
97
+ </a>
98
+ </tag>
99
+ </tags>
100
+ <p v-else>{{ printableStringObjs }}</p>
101
+ </span>
99
102
  </template>
@@ -1,12 +1,6 @@
1
1
  <script setup lang="ts">
2
- import {
3
- computed,
4
- defineAsyncComponent,
5
- nextTick,
6
- onMounted,
7
- ref,
8
- watch,
9
- } from "vue";
2
+ import { computed, defineAsyncComponent, ref } from "vue";
3
+ import { useElementSize } from "@vueuse/core";
10
4
 
11
5
  interface Props {
12
6
  isLoaderActive?: boolean;
@@ -37,7 +31,6 @@ const loaderDarkThemePrimaryColor = "#2e323c";
37
31
  const loaderLightThemeSecondaryColor = "#ecebeb";
38
32
  const loaderDarkThemeSecondaryColor = "#21272e";
39
33
 
40
- const computedCellWidth = ref(50);
41
34
  const cellLoaderDiv = ref<HTMLElement | null>(null);
42
35
  const cellDiv = ref<HTMLElement | null>(null);
43
36
 
@@ -49,8 +42,16 @@ const valueType = computed(() => {
49
42
  } else return typeof props.value;
50
43
  });
51
44
 
45
+ const { width: cellLoaderDivWidth } = useElementSize(cellLoaderDiv, {
46
+ width: 150,
47
+ height: 30,
48
+ });
49
+ const { width: cellDivWidth } = useElementSize(cellDiv, {
50
+ width: 150,
51
+ height: 30,
52
+ });
52
53
  const maxCharacterLength = computed(() => {
53
- return Math.ceil(computedCellWidth.value / 8);
54
+ return Math.ceil(cellDivWidth.value / 6);
54
55
  });
55
56
 
56
57
  const primaryColor = computed(() => {
@@ -64,41 +65,14 @@ const secondaryColor = computed(() => {
64
65
  ? loaderDarkThemeSecondaryColor
65
66
  : loaderLightThemeSecondaryColor;
66
67
  });
67
-
68
- const calcCellWidth = () => {
69
- if (props.isLoaderActive) {
70
- nextTick(() => {
71
- if (cellLoaderDiv.value) {
72
- computedCellWidth.value = cellLoaderDiv.value.offsetWidth;
73
- }
74
- });
75
- } else {
76
- nextTick(() => {
77
- if (cellDiv.value) {
78
- computedCellWidth.value = cellDiv.value.offsetWidth;
79
- }
80
- });
81
- }
82
- };
83
-
84
- onMounted(() => {
85
- calcCellWidth();
86
- });
87
-
88
- watch(
89
- () => props.isLoaderActive,
90
- () => {
91
- calcCellWidth();
92
- }
93
- );
94
68
  </script>
95
69
 
96
70
  <template>
97
71
  <div v-if="isLoaderActive" ref="cellLoaderDiv" :style="{ maxWidth: '300px' }">
98
72
  <content-loader
99
- :view-box="`0 0 ${computedCellWidth || 300} 10`"
73
+ :view-box="`0 0 ${cellLoaderDivWidth || 300} 10`"
100
74
  :speed="2"
101
- :key="computedCellWidth"
75
+ :key="cellLoaderDivWidth"
102
76
  :primaryColor="primaryColor"
103
77
  :secondaryColor="secondaryColor"
104
78
  />
@@ -119,7 +93,7 @@ watch(
119
93
  data-testid="array-cell-value"
120
94
  />
121
95
  <template v-else>
122
- <span class="is-ellipsis-1" :title="tooltip" data-testid="cell-value">{{
96
+ <span :title="tooltip" data-testid="cell-value">{{
123
97
  value || (value === 0 ? 0 : "-")
124
98
  }}</span>
125
99
  </template>