@appscode/design-system 1.0.43-alpha.20 → 1.0.43-alpha.201

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 (127) hide show
  1. package/base/utilities/_all.scss +6 -0
  2. package/base/utilities/_default.scss +298 -57
  3. package/base/utilities/_derived-variables.scss +0 -1
  4. package/base/utilities/_initial-variables.scss +16 -10
  5. package/base/utilities/_mixin.scss +1 -17
  6. package/base/utilities/_typography.scss +12 -2
  7. package/base/utilities/dark-theme.scss +9 -147
  8. package/components/_ac-accordion.scss +8 -4
  9. package/components/_ac-alert-box.scss +13 -5
  10. package/components/_ac-card.scss +33 -6
  11. package/components/_ac-code-highlight.scss +5 -1
  12. package/components/_ac-content-layout.scss +2 -2
  13. package/components/_ac-input.scss +63 -23
  14. package/components/_ac-modal.scss +1 -1
  15. package/components/_ac-multi-select.scss +187 -5
  16. package/components/_ac-options.scss +24 -9
  17. package/components/_ac-select-box.scss +13 -3
  18. package/components/_ac-table.scss +7 -5
  19. package/components/_ac-tabs.scss +33 -5
  20. package/components/_ac-terminal.scss +270 -0
  21. package/components/_all.scss +35 -0
  22. package/components/_app-drawer.scss +2 -2
  23. package/components/_breadcumb.scss +2 -0
  24. package/components/_buttons.scss +46 -37
  25. package/components/_card-body-wrapper.scss +2 -2
  26. package/components/_dashboard-header.scss +32 -0
  27. package/components/_direct-deploy.scss +69 -0
  28. package/components/_go-to-top.scss +1 -1
  29. package/components/_graph.scss +45 -0
  30. package/components/_image-upload.scss +5 -3
  31. package/components/_left-sidebar-menu.scss +115 -64
  32. package/components/_monaco-editor.scss +1 -1
  33. package/components/_navbar.scss +125 -7
  34. package/components/_overview-info.scss +3 -3
  35. package/components/_pagination.scss +8 -0
  36. package/components/_payment-card.scss +10 -1
  37. package/components/_preview-modal.scss +18 -5
  38. package/components/_pricing-table.scss +1 -1
  39. package/components/_progress-bar.scss +4 -4
  40. package/components/_subscription-card.scss +11 -4
  41. package/components/_table-of-content.scss +1 -1
  42. package/components/_tfa.scss +69 -0
  43. package/components/_transitions.scss +261 -0
  44. package/components/_wizard.scss +16 -3
  45. package/components/bbum/_card-team.scss +1 -1
  46. package/components/bbum/_information-center.scss +15 -1
  47. package/components/bbum/_sign-up-notification.scss +1 -1
  48. package/components/bbum/_single-post-preview.scss +1 -1
  49. package/components/bbum/_user-profile.scss +2 -3
  50. package/components/ui-builder/_ui-builder.scss +43 -3
  51. package/components/ui-builder/_vue-open-api.scss +104 -0
  52. package/layouts/_all.scss +2 -0
  53. package/layouts/_code-preview.scss +5 -2
  54. package/main.scss +4 -54
  55. package/package.json +2 -7
  56. package/plugins/theme.js +4 -0
  57. package/plugins/time-convert.js +49 -0
  58. package/plugins/vue-toaster.js +3 -0
  59. package/vue-components/v2/banner/Banner.vue +2 -2
  60. package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
  61. package/vue-components/v2/button/Button.vue +5 -0
  62. package/vue-components/v2/button/DownloadBtn.vue +45 -0
  63. package/vue-components/v2/card/Card.vue +1 -0
  64. package/vue-components/v2/card/PaymentCards.vue +11 -2
  65. package/vue-components/v2/content/ContentTable.vue +12 -7
  66. package/vue-components/v2/editor/Editor.vue +38 -5
  67. package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
  68. package/vue-components/v2/editor/MonacoEditor.vue +125 -0
  69. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
  70. package/vue-components/v2/form-fields/Input.vue +1 -1
  71. package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
  72. package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
  73. package/vue-components/v2/modal/Modal.vue +38 -4
  74. package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -0
  75. package/vue-components/v2/modals/JsonShowModal.vue +12 -2
  76. package/vue-components/v2/navbar/Appdrawer.vue +10 -9
  77. package/vue-components/v2/navbar/ThemeMode.vue +50 -44
  78. package/vue-components/v2/navbar/User.vue +229 -17
  79. package/vue-components/v2/notification/Notification.vue +101 -0
  80. package/vue-components/v2/notification/NotificationItem.vue +44 -0
  81. package/vue-components/v2/pagination/Pagination.vue +16 -3
  82. package/vue-components/v2/preloader/Preloader.vue +5 -5
  83. package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
  84. package/vue-components/v2/sidebar/SidebarItem.vue +23 -1
  85. package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
  86. package/vue-components/v2/tab/TabItem.vue +1 -1
  87. package/vue-components/v2/table/Table.vue +44 -8
  88. package/vue-components/v2/table/TableRow.vue +12 -2
  89. package/vue-components/v2/table/table-cell/CellValue.vue +33 -4
  90. package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
  91. package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
  92. package/vue-components/v2/tabs/EditorTabs.vue +1 -1
  93. package/vue-components/v3/button/Button.vue +5 -0
  94. package/vue-components/v3/content/ContentTable.vue +5 -0
  95. package/vue-components/v3/editor/Editor.vue +36 -13
  96. package/vue-components/v3/editor/FilteredFileEditor.vue +186 -0
  97. package/vue-components/v3/editor/MonacoEditor.vue +131 -0
  98. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
  99. package/vue-components/v3/form/Form.vue +63 -0
  100. package/vue-components/v3/form-fields/Input.vue +11 -10
  101. package/vue-components/v3/header/HeaderItem.vue +5 -0
  102. package/vue-components/v3/header/HeaderItems.vue +5 -0
  103. package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
  104. package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
  105. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
  106. package/vue-components/v3/modal/Modal.vue +35 -3
  107. package/vue-components/v3/modals/DeleteConfirmationModal.vue +85 -0
  108. package/vue-components/v3/modals/JsonShowModal.vue +25 -16
  109. package/vue-components/v3/modals/LongRunningTasksModal.vue +337 -0
  110. package/vue-components/v3/navbar/Appdrawer.vue +12 -7
  111. package/vue-components/v3/navbar/ThemeMode.vue +49 -47
  112. package/vue-components/v3/navbar/User.vue +242 -18
  113. package/vue-components/v3/notification/Notification.vue +98 -0
  114. package/vue-components/v3/notification/NotificationItem.vue +52 -0
  115. package/vue-components/v3/pagination/Pagination.vue +16 -3
  116. package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
  117. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
  118. package/vue-components/v3/tab/TabItem.vue +1 -1
  119. package/vue-components/v3/table/MultiInfoTable.vue +143 -0
  120. package/vue-components/v3/table/Table.vue +35 -12
  121. package/vue-components/v3/table/TableContainer.vue +34 -0
  122. package/vue-components/v3/table/TableRow.vue +16 -2
  123. package/vue-components/v3/table/table-cell/CellValue.vue +28 -3
  124. package/vue-components/v3/table/table-cell/GenericCell.vue +62 -0
  125. package/vue-components/v3/table/table-cell/ObjectCell.vue +5 -1
  126. package/vue-components/v3/tabs/EditorTabs.vue +1 -1
  127. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
@@ -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>