@appscode/design-system 1.0.43-alpha.21 → 1.0.43-alpha.211

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 (132) hide show
  1. package/base/utilities/_all.scss +7 -0
  2. package/base/utilities/_customize-bulma.scss +191 -0
  3. package/base/utilities/_default.scss +313 -67
  4. package/base/utilities/_derived-variables.scss +6 -1
  5. package/base/utilities/_grid.scss +29 -0
  6. package/base/utilities/_initial-variables.scss +27 -17
  7. package/base/utilities/_mixin.scss +1 -17
  8. package/base/utilities/_typography.scss +18 -14
  9. package/base/utilities/dark-theme.scss +9 -145
  10. package/components/_ac-accordion.scss +14 -5
  11. package/components/_ac-alert-box.scss +41 -7
  12. package/components/_ac-card.scss +48 -10
  13. package/components/_ac-code-highlight.scss +5 -1
  14. package/components/_ac-content-layout.scss +2 -2
  15. package/components/_ac-drag.scss +2 -0
  16. package/components/_ac-input.scss +64 -23
  17. package/components/_ac-modal.scss +1 -1
  18. package/components/_ac-multi-select.scss +247 -9
  19. package/components/_ac-options.scss +24 -9
  20. package/components/_ac-select-box.scss +13 -3
  21. package/components/_ac-table.scss +7 -5
  22. package/components/_ac-tabs.scss +46 -5
  23. package/components/_ac-terminal.scss +270 -0
  24. package/components/_all.scss +27 -0
  25. package/components/_app-drawer.scss +2 -2
  26. package/components/_breadcumb.scss +2 -0
  27. package/components/_buttons.scss +50 -37
  28. package/components/_card-body-wrapper.scss +2 -2
  29. package/components/_dashboard-header.scss +32 -0
  30. package/components/_direct-deploy.scss +69 -0
  31. package/components/_go-to-top.scss +1 -1
  32. package/components/_graph.scss +45 -0
  33. package/components/_image-upload.scss +5 -3
  34. package/components/_left-sidebar-menu.scss +124 -73
  35. package/components/_monaco-editor.scss +1 -1
  36. package/components/_navbar.scss +170 -10
  37. package/components/_overview-info.scss +3 -3
  38. package/components/_pagination.scss +8 -0
  39. package/components/_payment-card.scss +10 -1
  40. package/components/_preview-modal.scss +18 -5
  41. package/components/_pricing-table.scss +1 -1
  42. package/components/_progress-bar.scss +4 -4
  43. package/components/_subscription-card.scss +11 -4
  44. package/components/_table-of-content.scss +1 -1
  45. package/components/_tfa.scss +69 -0
  46. package/components/_transitions.scss +261 -0
  47. package/components/_wizard.scss +16 -3
  48. package/components/bbum/_all.scss +9 -0
  49. package/components/bbum/_card-team.scss +1 -1
  50. package/components/bbum/_information-center.scss +15 -1
  51. package/components/bbum/_sign-up-notification.scss +1 -1
  52. package/components/bbum/_single-post-preview.scss +2 -2
  53. package/components/bbum/_user-profile.scss +2 -3
  54. package/components/ui-builder/_ui-builder.scss +76 -1
  55. package/components/ui-builder/_vue-open-api.scss +104 -0
  56. package/layouts/_all.scss +2 -0
  57. package/layouts/_code-preview.scss +5 -2
  58. package/main.scss +6 -54
  59. package/package.json +2 -7
  60. package/plugins/theme.js +4 -0
  61. package/plugins/time-convert.js +49 -0
  62. package/plugins/vue-toaster.js +3 -0
  63. package/vue-components/v2/banner/Banner.vue +2 -2
  64. package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
  65. package/vue-components/v2/button/Button.vue +5 -0
  66. package/vue-components/v2/button/DownloadBtn.vue +45 -0
  67. package/vue-components/v2/card/Card.vue +1 -0
  68. package/vue-components/v2/card/PaymentCards.vue +11 -2
  69. package/vue-components/v2/content/ContentTable.vue +12 -7
  70. package/vue-components/v2/editor/Editor.vue +43 -24
  71. package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
  72. package/vue-components/v2/editor/MonacoEditor.vue +125 -0
  73. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
  74. package/vue-components/v2/form-fields/Input.vue +1 -1
  75. package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
  76. package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
  77. package/vue-components/v2/modal/Modal.vue +38 -4
  78. package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -0
  79. package/vue-components/v2/modals/JsonShowModal.vue +12 -2
  80. package/vue-components/v2/navbar/Appdrawer.vue +10 -9
  81. package/vue-components/v2/navbar/ThemeMode.vue +50 -44
  82. package/vue-components/v2/navbar/User.vue +229 -17
  83. package/vue-components/v2/notification/Notification.vue +101 -0
  84. package/vue-components/v2/notification/NotificationItem.vue +44 -0
  85. package/vue-components/v2/pagination/Pagination.vue +16 -3
  86. package/vue-components/v2/preloader/Preloader.vue +5 -5
  87. package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
  88. package/vue-components/v2/sidebar/SidebarItem.vue +23 -1
  89. package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
  90. package/vue-components/v2/tab/TabItem.vue +1 -1
  91. package/vue-components/v2/table/Table.vue +44 -8
  92. package/vue-components/v2/table/TableRow.vue +12 -2
  93. package/vue-components/v2/table/table-cell/CellValue.vue +33 -4
  94. package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
  95. package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
  96. package/vue-components/v2/tabs/EditorTabs.vue +1 -1
  97. package/vue-components/v3/button/Button.vue +6 -1
  98. package/vue-components/v3/content/ContentTable.vue +17 -2
  99. package/vue-components/v3/editor/Editor.vue +42 -33
  100. package/vue-components/v3/editor/FilteredFileEditor.vue +186 -0
  101. package/vue-components/v3/editor/MonacoEditor.vue +131 -0
  102. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
  103. package/vue-components/v3/form/Form.vue +63 -0
  104. package/vue-components/v3/form-fields/Input.vue +11 -10
  105. package/vue-components/v3/header/HeaderItem.vue +5 -0
  106. package/vue-components/v3/header/HeaderItems.vue +5 -0
  107. package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
  108. package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
  109. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
  110. package/vue-components/v3/modal/Modal.vue +38 -6
  111. package/vue-components/v3/modals/DeleteConfirmationModal.vue +85 -0
  112. package/vue-components/v3/modals/JsonShowModal.vue +25 -16
  113. package/vue-components/v3/modals/LongRunningTasksModal.vue +337 -0
  114. package/vue-components/v3/navbar/Appdrawer.vue +12 -7
  115. package/vue-components/v3/navbar/ThemeMode.vue +49 -47
  116. package/vue-components/v3/navbar/User.vue +242 -18
  117. package/vue-components/v3/notification/Notification.vue +98 -0
  118. package/vue-components/v3/notification/NotificationItem.vue +52 -0
  119. package/vue-components/v3/pagination/Pagination.vue +16 -3
  120. package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
  121. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
  122. package/vue-components/v3/tab/TabItem.vue +1 -1
  123. package/vue-components/v3/table/MultiInfoTable.vue +143 -0
  124. package/vue-components/v3/table/Table.vue +40 -12
  125. package/vue-components/v3/table/TableContainer.vue +34 -0
  126. package/vue-components/v3/table/TableRow.vue +62 -3
  127. package/vue-components/v3/table/table-cell/CellValue.vue +28 -3
  128. package/vue-components/v3/table/table-cell/GenericCell.vue +75 -0
  129. package/vue-components/v3/table/table-cell/ObjectCell.vue +5 -1
  130. package/vue-components/v3/tabs/EditorTabs.vue +1 -1
  131. package/vue-components/v3/tag/Tag.vue +1 -1
  132. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
@@ -79,7 +79,10 @@ export default defineComponent({
79
79
  },
80
80
  printableStringObjs() {
81
81
  return this.objKeys.map((key) => {
82
- const value = this.obj[key];
82
+ let value = this.obj[key];
83
+ if (typeof value === "object" && value !== null) {
84
+ value = JSON.stringify(value);
85
+ }
83
86
  const keyValue = `${key}: ${value}`;
84
87
  const exceededLength = keyValue.length > 30;
85
88
  const print = exceededLength ? key : keyValue;
@@ -103,3 +106,4 @@ export default defineComponent({
103
106
  },
104
107
  });
105
108
  </script>
109
+
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <tabs-body class="mt-20">
2
+ <tabs-body class="mt-10">
3
3
  <tabs class="is-line">
4
4
  <tab-item :is-active="activeTab === 'edit'">
5
5
  <a @click.prevent="$emit('tabchange', 'edit')">Edit</a>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="tag" :class="modifierClasses">
2
+ <div class="tag is-rounded" :class="modifierClasses">
3
3
  <slot />
4
4
  </div>
5
5
  </template>
@@ -0,0 +1,148 @@
1
+ <template>
2
+ <div ref="terminalRef" class="terminal-body"></div>
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ import { computed, nextTick, ref, toRefs, watch, watchPostEffect } from "vue";
7
+ import { Terminal } from "xterm";
8
+ import { FitAddon } from "xterm-addon-fit";
9
+ import { WebglAddon } from "xterm-addon-webgl";
10
+ import { Material, MaterialDark } from "xterm-theme"; //https://github.com/ysk2014/xterm-theme/tree/master/src/iterm
11
+
12
+ const props = withDefaults(
13
+ defineProps<{
14
+ theme: string;
15
+ logs: string[];
16
+ }>(),
17
+ { theme: "light", logs: () => [] }
18
+ );
19
+ // terminal print logic
20
+ const { logs, theme } = toRefs(props);
21
+ const lastPrintIdx = ref(0);
22
+ watch(
23
+ logs,
24
+ (n) => {
25
+ if (n.length > lastPrintIdx.value) {
26
+ nextTick(() => {
27
+ writeOnTerminal(n.slice(lastPrintIdx.value).join("\n"));
28
+ lastPrintIdx.value = n.length;
29
+ });
30
+ }
31
+ },
32
+ { immediate: true, deep: true }
33
+ );
34
+
35
+ //theme
36
+ const bodyBgc = computed(() =>
37
+ theme.value === "light" ? "#eaeaea" : "#232322"
38
+ );
39
+
40
+ // xterm component logic
41
+ const terminalRef = ref<HTMLElement>();
42
+ const terminal = new Terminal({
43
+ windowsMode: false,
44
+ theme: theme.value === "light" ? Material : MaterialDark,
45
+ });
46
+ const fitAddon = new FitAddon();
47
+ terminal.loadAddon(fitAddon);
48
+ const webGlAddon = new WebglAddon();
49
+ webGlAddon.onContextLoss(() => {
50
+ webGlAddon.dispose();
51
+ });
52
+ watchPostEffect(() => {
53
+ if (terminalRef.value) {
54
+ terminal.open(terminalRef.value);
55
+ fitAddon.fit();
56
+ terminal.focus();
57
+ terminal.loadAddon(webGlAddon);
58
+ }
59
+ });
60
+ function writeOnTerminal(msg: string) {
61
+ const lines = msg.split("\n");
62
+ lines.forEach((line, index) => {
63
+ if (lines.length === 1 || index < lines.length - 1) terminal.writeln(line);
64
+ else terminal.write(line);
65
+ });
66
+ }
67
+ </script>
68
+
69
+ <style lang="scss">
70
+ .terminal-body {
71
+ width: 100%;
72
+ height: 100%;
73
+ background-color: v-bind(bodyBgc);
74
+ padding: 5px 0px 0px 10px;
75
+
76
+ // for terminal scroll bar style
77
+ .xterm .xterm-viewport {
78
+ &::-webkit-scrollbar {
79
+ border-radius: 50px;
80
+ width: 3px;
81
+ }
82
+
83
+ &::-moz-scrollbar {
84
+ border-radius: 50px;
85
+ width: 3px;
86
+ }
87
+
88
+ &::-ms-scrollbar {
89
+ border-radius: 50px;
90
+ width: 3px;
91
+ }
92
+
93
+ &::-webkit-scrollbar:hover {
94
+ width: 7px;
95
+ }
96
+
97
+ &::-moz-scrollbar:hover {
98
+ width: 7px;
99
+ }
100
+
101
+ &::-ms-scrollbar:hover {
102
+ width: 7px;
103
+ }
104
+
105
+ &::-webkit-scrollbar-thumb {
106
+ background-color: #929292;
107
+ border-radius: 50px;
108
+ height: 2px !important;
109
+ }
110
+
111
+ &::-moz-scrollbar-thumb {
112
+ background-color: #929292;
113
+ border-radius: 50px;
114
+ height: 2px !important;
115
+ }
116
+
117
+ &::-ms-scrollbar-thumb {
118
+ background-color: #929292;
119
+ border-radius: 50px;
120
+ height: 2px !important;
121
+ }
122
+
123
+ &::-webkit-scrollbar-thumb:hover {
124
+ background-color: #929292;
125
+ }
126
+
127
+ &::-moz-scrollbar-thumb:hover {
128
+ background-color: #929292;
129
+ }
130
+
131
+ &::-ms-scrollbar-thumb:hover {
132
+ background-color: #929292;
133
+ }
134
+
135
+ &:hover::-webkit-scrollbar-corner {
136
+ height: 40px;
137
+ }
138
+
139
+ &:hover::-moz-scrollbar-corner {
140
+ height: 40px;
141
+ }
142
+
143
+ &:hover::-ms-scrollbar-corner {
144
+ height: 40px;
145
+ }
146
+ }
147
+ }
148
+ </style>