@appscode/design-system 1.1.0-beta.8 → 1.1.0-beta.80

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 (113) 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/bbum/_information-center.scss +8 -10
  34. package/components/bbum/_mobile-desktop.scss +9 -14
  35. package/components/bbum/_single-post-preview.scss +9 -9
  36. package/components/ui-builder/_ui-builder.scss +194 -10
  37. package/components/ui-builder/_vue-open-api.scss +58 -13
  38. package/icons/close-icon.svg +3 -0
  39. package/layouts/_code-preview.scss +6 -7
  40. package/package.json +1 -1
  41. package/vue-components/types/importFlow.ts +16 -0
  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 +41 -786
  51. package/vue-components/v3/cards/Cluster.vue +37 -26
  52. package/vue-components/v3/cards/FeatureCard.vue +7 -11
  53. package/vue-components/v3/cards/FeatureCards.vue +1 -1
  54. package/vue-components/v3/cards/InfoCard.vue +1 -2
  55. package/vue-components/v3/cards/Monitoring.vue +6 -10
  56. package/vue-components/v3/cards/OverviewCard.vue +4 -0
  57. package/vue-components/v3/cards/OverviewCards.vue +10 -2
  58. package/vue-components/v3/cards/Vendor.vue +8 -5
  59. package/vue-components/v3/content/ContentHeader.vue +1 -1
  60. package/vue-components/v3/content/ContentTable.vue +1 -1
  61. package/vue-components/v3/dropdown/DropdownAction.vue +92 -0
  62. package/vue-components/v3/editor/Editor.vue +1 -1
  63. package/vue-components/v3/editor/FilteredFileEditor.vue +7 -0
  64. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +3 -0
  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-fields/AcSingleInput.vue +3 -8
  71. package/vue-components/v3/form-fields/Input.vue +2 -3
  72. package/vue-components/v3/header/Header.vue +1 -1
  73. package/vue-components/v3/loaders/InfoCardLoader.vue +18 -60
  74. package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
  75. package/vue-components/v3/modal/Modal.vue +7 -12
  76. package/vue-components/v3/modals/JsonShowModal.vue +1 -0
  77. package/vue-components/v3/navbar/Navbar.vue +0 -159
  78. package/vue-components/v3/navbar/NavbarItem.vue +37 -15
  79. package/vue-components/v3/navbar/NavbarItemContent.vue +6 -3
  80. package/vue-components/v3/navbar/Notification.vue +35 -9
  81. package/vue-components/v3/navbar/User.vue +35 -31
  82. package/vue-components/v3/notification/AlertBox.vue +233 -3
  83. package/vue-components/v3/notification/Notification.vue +2 -2
  84. package/vue-components/v3/option-dots/Options.vue +17 -8
  85. package/vue-components/v3/pagination/Pagination.vue +27 -17
  86. package/vue-components/v3/preloader/Preloader.vue +1 -1
  87. package/vue-components/v3/searchbars/SearchBar.vue +1 -1
  88. package/vue-components/v3/sidebar/ClusterSwitcher.vue +1 -765
  89. package/vue-components/v3/sidebar/Sidebar.vue +3 -30
  90. package/vue-components/v3/sidebar/SidebarBody.vue +9 -2
  91. package/vue-components/v3/sidebar/SidebarFooter.vue +6 -3
  92. package/vue-components/v3/sidebar/SidebarHeader.vue +6 -2
  93. package/vue-components/v3/sidebar/Steps.vue +55 -51
  94. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +78 -2
  95. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +12 -3
  96. package/vue-components/v3/table/Table.vue +14 -16
  97. package/vue-components/v3/table/TableCell.vue +1 -9
  98. package/vue-components/v3/table/TableRow.vue +2 -2
  99. package/vue-components/v3/table/table-cell/ArrayCell.vue +35 -32
  100. package/vue-components/v3/table/table-cell/CellValue.vue +14 -40
  101. package/vue-components/v3/table/table-cell/ObjectCell.vue +40 -38
  102. package/vue-components/v3/tag/Tag.vue +1 -0
  103. package/base/utilities/dark-theme.scss +0 -26
  104. package/components/_ac-card.scss +0 -0
  105. package/components/_ac-input.scss +0 -901
  106. package/components/_ac-multi-select.scss +0 -780
  107. package/vue-components/text.vue +0 -1
  108. package/vue-components/types/longRunningTasks.ts +0 -20
  109. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -94
  110. package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -402
  111. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -151
  112. /package/components/{_ac-accordion.scss → _accordion.scss} +0 -0
  113. /package/components/{_ac-report.scss → _report.scss} +0 -0
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  interface Props {
3
3
  type?: string;
4
+ isCollapsible?: boolean;
4
5
  }
5
6
 
6
7
  withDefaults(defineProps<Props>(), {
@@ -49,7 +50,7 @@ withDefaults(defineProps<Props>(), {
49
50
  height: calc(100vh - 80px);
50
51
  overflow-y: auto;
51
52
  padding-top: 4px;
52
- scrollbar-color: $white-100-light transparent;
53
+ scrollbar-color: $white-100 transparent;
53
54
 
54
55
  /* width */
55
56
  &::-webkit-scrollbar {
@@ -196,37 +197,9 @@ withDefaults(defineProps<Props>(), {
196
197
  }
197
198
  }
198
199
  }
199
-
200
- // .ac-options.is-right {
201
- // .option-dots {
202
- // transition: 0.3s;
203
-
204
- // i.fa {
205
- // &.fa-angle-left {
206
- // font-size: 18px;
207
- // }
208
- // }
209
-
210
- // &:active {
211
- // i.fa {
212
- // background-color: $white-100-lighter;
213
- // width: 25px;
214
- // height: 25px;
215
- // text-align: center;
216
- // line-height: 25px;
217
- // border-radius: 50%;
218
- // }
219
- // }
220
-
221
- // &:hover {
222
- // color: $primary !important;
223
- // transform: scale(1.2);
224
- // }
225
- // }
226
- // }
227
200
  }
228
201
 
229
- .sidebar-collapsed {
202
+ .sidebar-collapsed:not(.is-hoverable) {
230
203
  .ac-left-sidebar-wrapper {
231
204
  width: 60px;
232
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
  }
@@ -1,65 +1,69 @@
1
1
  <script lang="ts" setup>
2
2
  import FeCheck from "~icons/fe/check";
3
+ import type { Step } from "../../types/importFlow";
4
+
5
+ interface Props {
6
+ steps?: Step[];
7
+ activeStepIdentifier?: number;
8
+ activeSubStepIdentifier?: number;
9
+ }
10
+
11
+ withDefaults(defineProps<Props>(), {
12
+ steps: () => [],
13
+ activeStepIdentifier: 1,
14
+ activeSubStepIdentifier: 1,
15
+ });
3
16
  </script>
4
17
 
5
18
  <template>
6
- <!-- steps 01-->
7
- <li>
19
+ <li
20
+ v-for="step in steps"
21
+ :key="step.identifier"
22
+ :class="{
23
+ 'is-hidden': !step.isVisible,
24
+ }"
25
+ >
8
26
  <strong
9
- ><span class="step-count is-active">1</span>
10
- <span class="label-text">CLUSTER SELECTION</span></strong
27
+ :class="{
28
+ 'is-active': step.identifier <= activeStepIdentifier,
29
+ }"
11
30
  >
12
- <ul>
13
- <li class="is-active">
14
- <strong
15
- ><span class="step-count"><FeCheck /></span>
16
- <span class="label-text">Select Provider</span></strong
17
- >
18
- </li>
19
- <li>
20
- <strong
21
- ><span class="step-count"><FeCheck /></span>
22
- <span class="label-text">Select Credential</span></strong
23
- >
24
- </li>
25
- <li>
26
- <strong
27
- ><span class="step-count"> <FeCheck /> </span>
28
- <span class="label-text">Select Cluster</span></strong
29
- >
30
- </li>
31
- </ul>
32
- </li>
33
- <!-- steps 01-->
34
-
35
- <!-- steps 02-->
36
- <li>
37
- <strong
38
- ><span class="step-count">2</span>
39
- <span class="label-text">IMPORT</span></strong
31
+ <span
32
+ :class="{
33
+ 'step-count': true,
34
+ 'is-active': step.identifier <= activeStepIdentifier,
35
+ }"
36
+ >{{ step.identifier }}</span
37
+ >
38
+ <span class="label-text">{{ step.title }}</span>
39
+ </strong>
40
+ <ul
41
+ :class="{
42
+ 'is-hidden': step.identifier !== activeStepIdentifier,
43
+ }"
40
44
  >
41
- <ul>
42
- <li>
43
- <strong
44
- ><span class="step-count"><FeCheck /></span>
45
- <span class="label-text">Select Provider</span></strong
46
- >
47
- </li>
48
- <li>
49
- <strong
50
- ><span class="step-count"><FeCheck /></span>
51
- <span class="label-text">Select Credential</span></strong
52
- >
53
- </li>
54
- <li>
55
- <strong
56
- ><span class="step-count"> <FeCheck /> </span>
57
- <span class="label-text">Select Cluster</span></strong
58
- >
45
+ <li
46
+ v-for="substep in step.substeps"
47
+ :key="substep?.identifier"
48
+ :class="{
49
+ 'is-hidden': !substep.isVisible,
50
+ 'is-active': substep.identifier < activeSubStepIdentifier,
51
+ }"
52
+ >
53
+ <strong>
54
+ <span class="step-count"><FeCheck /></span>
55
+ <span
56
+ :class="{
57
+ 'label-text': true,
58
+ 'has-text-weight-semibold':
59
+ substep.identifier <= activeSubStepIdentifier,
60
+ }"
61
+ >{{ substep.title }}</span
62
+ >
63
+ </strong>
59
64
  </li>
60
65
  </ul>
61
66
  </li>
62
- <!-- steps 02-->
63
67
  </template>
64
68
 
65
69
  <style lang="scss" scoped>
@@ -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,7 @@
8
15
  </div>
9
16
  <!-- sidebar tabs -->
10
17
 
11
- <div class="content-wrapper">
18
+ <div class="content-wrapper" :class="isSidebarVisible ? 'pl-220' : 'pl-0'">
12
19
  <!-- sidebar content -->
13
20
  <slot name="tabs-content" />
14
21
  <!-- sidebar content -->
@@ -21,8 +28,10 @@
21
28
  position: fixed;
22
29
  background-color: $white-100;
23
30
  }
24
- .content-wrapper {
31
+ .pl-220 {
25
32
  padding-left: 220px;
33
+ }
34
+ .content-wrapper {
26
35
  padding-bottom: 40px;
27
36
  width: 100%;
28
37
  }
@@ -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>