@appscode/design-system 1.0.43-alpha.6 → 1.0.43-alpha.63
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/base/utilities/_default.scss +136 -20
- package/base/utilities/_derived-variables.scss +2 -15
- package/base/utilities/_initial-variables.scss +99 -64
- package/base/utilities/_mixin.scss +90 -10
- package/base/utilities/_typography.scss +20 -7
- package/base/utilities/dark-theme.scss +25 -0
- package/components/_ac-accordion.scss +1 -0
- package/components/_ac-alert-box.scss +45 -10
- package/components/_ac-card.scss +54 -19
- package/components/_ac-code-highlight.scss +6 -0
- package/components/_ac-content-layout.scss +4 -4
- package/components/_ac-drag.scss +6 -6
- package/components/_ac-input.scss +72 -38
- package/components/_ac-modal.scss +5 -4
- package/components/_ac-multi-select.scss +220 -18
- package/components/_ac-options.scss +18 -8
- package/components/_ac-select-box.scss +5 -5
- package/components/_ac-table.scss +40 -33
- package/components/_ac-tabs.scss +64 -23
- package/components/_ac-tags.scss +2 -2
- package/components/_ac-terminal.scss +248 -0
- package/components/_app-drawer.scss +6 -6
- package/components/_breadcumb.scss +7 -2
- package/components/_buttons.scss +78 -32
- package/components/_card-body-wrapper.scss +3 -3
- package/components/_dashboard-header.scss +3 -3
- package/components/_direct-deploy.scss +69 -0
- package/components/_go-to-top.scss +1 -1
- package/components/_image-upload.scss +6 -4
- package/components/_left-sidebar-menu.scss +196 -46
- package/components/_monaco-editor.scss +1 -1
- package/components/_navbar.scss +103 -26
- package/components/_overview-info.scss +4 -4
- package/components/_overview-page.scss +1 -2
- package/components/_pagination.scss +45 -7
- package/components/_payment-card.scss +28 -12
- package/components/_preview-modal.scss +8 -8
- package/components/_pricing-table.scss +1 -1
- package/components/_progress-bar.scss +5 -5
- package/components/_subscription-card.scss +15 -8
- package/components/_table-of-content.scss +1 -1
- package/components/_tfa.scss +69 -0
- package/components/_widget-menu.scss +9 -9
- package/components/_wizard.scss +32 -20
- package/components/ac-toaster/_ac-toasted.scss +40 -8
- package/components/bbum/_card-team.scss +17 -9
- package/components/bbum/_information-center.scss +19 -5
- package/components/bbum/_mobile-desktop.scss +6 -6
- package/components/bbum/_post.scss +5 -4
- package/components/bbum/_sign-up-notification.scss +6 -6
- package/components/bbum/_single-post-preview.scss +9 -9
- package/components/bbum/_user-profile.scss +98 -90
- package/components/ui-builder/_ui-builder.scss +19 -8
- package/layouts/_404.scss +2 -1
- package/layouts/_code-preview.scss +14 -7
- package/main.scss +2 -0
- package/package.json +1 -1
- package/plugins/theme.js +142 -0
- package/plugins/vue-toaster.js +6 -6
- package/vue-components/v2/card/PaymentCards.vue +11 -2
- package/vue-components/v2/editor/Editor.vue +31 -17
- package/vue-components/v2/navbar/Appdrawer.vue +10 -9
- package/vue-components/v2/navbar/ThemeMode.vue +124 -0
- package/vue-components/v2/preloader/Preloader.vue +5 -5
- package/vue-components/v2/table/table-cell/CellValue.vue +10 -1
- package/vue-components/v3/dropdown/DropdownMenu.vue +1 -1
- package/vue-components/v3/editor/Editor.vue +33 -19
- package/vue-components/v3/navbar/Appdrawer.vue +12 -7
- package/vue-components/v3/navbar/ThemeMode.vue +118 -0
- package/vue-components/v3/table/table-cell/CellValue.vue +9 -0
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
:language="language"
|
|
17
17
|
:options="{
|
|
18
18
|
minimap: {
|
|
19
|
-
enabled: calcShowMinimap
|
|
19
|
+
enabled: calcShowMinimap
|
|
20
20
|
},
|
|
21
|
+
theme: theme,
|
|
21
22
|
readOnly: readOnly,
|
|
22
|
-
scrollBeyondLastLine: false
|
|
23
|
+
scrollBeyondLastLine: false
|
|
23
24
|
}"
|
|
24
25
|
/>
|
|
25
26
|
<monaco-editor
|
|
@@ -30,10 +31,11 @@
|
|
|
30
31
|
:language="language"
|
|
31
32
|
:options="{
|
|
32
33
|
minimap: {
|
|
33
|
-
enabled: calcShowMinimap
|
|
34
|
+
enabled: calcShowMinimap
|
|
34
35
|
},
|
|
36
|
+
theme: theme,
|
|
35
37
|
readOnly: true,
|
|
36
|
-
scrollBeyondLastLine: false
|
|
38
|
+
scrollBeyondLastLine: false
|
|
37
39
|
}"
|
|
38
40
|
:original="originalEditorContent"
|
|
39
41
|
:diff-editor="true"
|
|
@@ -47,51 +49,55 @@ export default defineComponent({
|
|
|
47
49
|
props: {
|
|
48
50
|
value: {
|
|
49
51
|
type: String,
|
|
50
|
-
default: ""
|
|
52
|
+
default: ""
|
|
51
53
|
},
|
|
52
54
|
originalValue: {
|
|
53
55
|
type: String,
|
|
54
|
-
default: ""
|
|
56
|
+
default: ""
|
|
55
57
|
},
|
|
56
58
|
readOnly: {
|
|
57
59
|
type: Boolean,
|
|
58
|
-
default: false
|
|
60
|
+
default: false
|
|
59
61
|
},
|
|
60
62
|
language: {
|
|
61
63
|
type: String,
|
|
62
|
-
default: "yaml"
|
|
64
|
+
default: "yaml"
|
|
63
65
|
},
|
|
64
66
|
showMinimap: {
|
|
65
67
|
type: Boolean,
|
|
66
|
-
default: true
|
|
68
|
+
default: true
|
|
67
69
|
},
|
|
68
70
|
editorHeight: {
|
|
69
71
|
type: Number,
|
|
70
|
-
default: 40
|
|
72
|
+
default: 40
|
|
71
73
|
},
|
|
74
|
+
editorTheme: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ""
|
|
77
|
+
}
|
|
72
78
|
},
|
|
73
79
|
|
|
74
80
|
emits: ["update:modelValue"],
|
|
75
81
|
|
|
76
82
|
components: {
|
|
77
83
|
EditorTabs: defineAsyncComponent(() =>
|
|
78
|
-
import("../tabs/EditorTabs.vue").then(
|
|
84
|
+
import("../tabs/EditorTabs.vue").then(module => module.default)
|
|
79
85
|
),
|
|
80
86
|
MonacoEditor: defineAsyncComponent(() =>
|
|
81
87
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
82
88
|
// @ts-ignore
|
|
83
|
-
import("vue-monaco").then(
|
|
89
|
+
import("vue-monaco").then(module => {
|
|
84
90
|
module.default.render = () => h("div");
|
|
85
91
|
return module.default;
|
|
86
92
|
})
|
|
87
|
-
)
|
|
93
|
+
)
|
|
88
94
|
},
|
|
89
95
|
|
|
90
96
|
data() {
|
|
91
97
|
return {
|
|
92
98
|
activeTab: "edit",
|
|
93
99
|
editorContent: "",
|
|
94
|
-
originalEditorContent: ""
|
|
100
|
+
originalEditorContent: ""
|
|
95
101
|
};
|
|
96
102
|
},
|
|
97
103
|
|
|
@@ -100,6 +106,14 @@ export default defineComponent({
|
|
|
100
106
|
const noOfLines = this.editorContent.split("\n").length;
|
|
101
107
|
return this.showMinimap && noOfLines * 2 > this.editorHeight;
|
|
102
108
|
},
|
|
109
|
+
theme() {
|
|
110
|
+
return (
|
|
111
|
+
this.editorTheme ||
|
|
112
|
+
(document.documentElement.classList.contains("is-dark-theme")
|
|
113
|
+
? "vs-dark"
|
|
114
|
+
: "vs")
|
|
115
|
+
);
|
|
116
|
+
}
|
|
103
117
|
},
|
|
104
118
|
|
|
105
119
|
watch: {
|
|
@@ -109,7 +123,7 @@ export default defineComponent({
|
|
|
109
123
|
if (this.editorContent !== n) {
|
|
110
124
|
this.editorContent = n;
|
|
111
125
|
}
|
|
112
|
-
}
|
|
126
|
+
}
|
|
113
127
|
},
|
|
114
128
|
originalValue: {
|
|
115
129
|
immediate: true,
|
|
@@ -117,8 +131,8 @@ export default defineComponent({
|
|
|
117
131
|
if (this.originalEditorContent !== n) {
|
|
118
132
|
this.originalEditorContent = n;
|
|
119
133
|
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
122
136
|
},
|
|
123
137
|
|
|
124
138
|
methods: {
|
|
@@ -131,7 +145,7 @@ export default defineComponent({
|
|
|
131
145
|
editor.onDidBlurEditorText(() => {
|
|
132
146
|
this.$emit("update:modelValue", this.editorContent);
|
|
133
147
|
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
136
150
|
});
|
|
137
151
|
</script>
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="app-drawer-wrapper">
|
|
3
|
-
<div
|
|
2
|
+
<div class="app-drawer-wrapper is-flex">
|
|
3
|
+
<div
|
|
4
|
+
class="drawer-icon is-flex is-justify-content-center is-align-items-center"
|
|
5
|
+
>
|
|
4
6
|
<svg
|
|
5
7
|
class="gb_We"
|
|
6
8
|
focusable="false"
|
|
7
9
|
viewBox="0 0 24 24"
|
|
10
|
+
style="width: 22px;margin-top: 2px;"
|
|
8
11
|
:style="{ fill: 'white' }"
|
|
9
12
|
>
|
|
10
13
|
<path
|
|
@@ -46,13 +49,15 @@ export default defineComponent({
|
|
|
46
49
|
props: {
|
|
47
50
|
apps: {
|
|
48
51
|
type: Array,
|
|
49
|
-
default: () => []
|
|
50
|
-
}
|
|
52
|
+
default: () => []
|
|
53
|
+
}
|
|
51
54
|
},
|
|
52
55
|
components: {
|
|
53
56
|
NavbarItemContent: defineAsyncComponent(() =>
|
|
54
|
-
import("../../v2/navbar/NavbarItemContent.vue").then(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
import("../../v2/navbar/NavbarItemContent.vue").then(
|
|
58
|
+
module => module.default
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
}
|
|
57
62
|
});
|
|
58
63
|
</script>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button v-if="themeMode" class="button ac-nav-button" @click="toggleTheme" :title="themeModeIconTooltip" >
|
|
3
|
+
<i :class="`fa ${themeModeIconClass} width-15`" />
|
|
4
|
+
</button>
|
|
5
|
+
</template>
|
|
6
|
+
<script>
|
|
7
|
+
import { defineComponent } from "vue";
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
themeMode: "",
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
emits: ['set:theme'],
|
|
17
|
+
|
|
18
|
+
computed: {
|
|
19
|
+
// to set icon class for theme mode
|
|
20
|
+
themeModeIconClass() {
|
|
21
|
+
if(this.themeMode === "system") {
|
|
22
|
+
return "fa-desktop";
|
|
23
|
+
} else if(this.themeMode === "light") {
|
|
24
|
+
return "fa-sun-o";
|
|
25
|
+
} else if(this.themeMode === "dark") {
|
|
26
|
+
return "fa-moon-o";
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// to set icon tooltip for theme mode
|
|
31
|
+
themeModeIconTooltip() {
|
|
32
|
+
if(this.themeMode === "system") {
|
|
33
|
+
return "System theme";
|
|
34
|
+
} else if(this.themeMode === "light") {
|
|
35
|
+
return "Light theme";
|
|
36
|
+
} else if(this.themeMode === "dark") {
|
|
37
|
+
return "Dark theme";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
mounted() {
|
|
43
|
+
// get theme mode from localStorage or set default one
|
|
44
|
+
this.themeMode = localStorage.getItem("themeMode") || "light";
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
destroyed() {
|
|
48
|
+
this.removeColorSchemeEventListener();
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
watch: {
|
|
52
|
+
themeMode: {
|
|
53
|
+
handler(n) {
|
|
54
|
+
this.onThemeModeChange(n);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
methods: {
|
|
60
|
+
// handle theme mode button click
|
|
61
|
+
toggleTheme() {
|
|
62
|
+
if(this.themeMode === "light")
|
|
63
|
+
this.themeMode = "dark";
|
|
64
|
+
else if(this.themeMode === "dark")
|
|
65
|
+
this.themeMode = "system";
|
|
66
|
+
else if(this.themeMode === "system")
|
|
67
|
+
this.themeMode = "light";
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
// triggered when theme mode is updated
|
|
71
|
+
onThemeModeChange(n) {
|
|
72
|
+
localStorage.setItem("themeMode", n);
|
|
73
|
+
|
|
74
|
+
let theme = n;
|
|
75
|
+
if(n === "system") {
|
|
76
|
+
const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
77
|
+
this.addColorSchemeEventListener();
|
|
78
|
+
theme = isDarkMode ? "dark" : "light";
|
|
79
|
+
} else {
|
|
80
|
+
this.removeColorSchemeEventListener();
|
|
81
|
+
}
|
|
82
|
+
this.$emit("set:theme", theme);
|
|
83
|
+
this.handleDarkThemeClass(theme);
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
// add proper css class to update the ui theme
|
|
87
|
+
handleDarkThemeClass(currentTheme) {
|
|
88
|
+
if(currentTheme === "light") {
|
|
89
|
+
document.documentElement.classList.remove("is-dark-theme");
|
|
90
|
+
} else {
|
|
91
|
+
document.documentElement.classList.add("is-dark-theme");
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
// add system theme listener event
|
|
96
|
+
addColorSchemeEventListener() {
|
|
97
|
+
window
|
|
98
|
+
.matchMedia("(prefers-color-scheme: dark)")
|
|
99
|
+
.addEventListener(
|
|
100
|
+
"change", this.handleSystemThemeChange
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
// remove system theme listener event
|
|
105
|
+
removeColorSchemeEventListener() {
|
|
106
|
+
window
|
|
107
|
+
.matchMedia("(prefers-color-scheme: dark)")
|
|
108
|
+
.removeEventListener(
|
|
109
|
+
"change", this.handleSystemThemeChange
|
|
110
|
+
);
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
handleSystemThemeChange() {
|
|
114
|
+
this.onThemeModeChange(this.themeMode);
|
|
115
|
+
},
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
</script>
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
:view-box="`0 0 ${computedCellWidth || 300} 10`"
|
|
5
5
|
:speed="2"
|
|
6
6
|
:key="computedCellWidth"
|
|
7
|
+
:primaryColor="primaryColor"
|
|
8
|
+
:secondaryColor="secondaryColor"
|
|
7
9
|
/>
|
|
8
10
|
</div>
|
|
9
11
|
<div v-else class="haha" ref="cellDiv">
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
|
|
30
32
|
<script>
|
|
31
33
|
import { defineComponent, defineAsyncComponent } from "vue";
|
|
34
|
+
import { loaderLightThemePrimaryColor, loaderDarkThemePrimaryColor, loaderLightThemeSecondaryColor, loaderDarkThemeSecondaryColor } from "@appscode/design-system/plugins/theme";
|
|
32
35
|
|
|
33
36
|
export default defineComponent({
|
|
34
37
|
props: {
|
|
@@ -67,6 +70,12 @@ export default defineComponent({
|
|
|
67
70
|
maxCharacterLength() {
|
|
68
71
|
return Math.ceil(this.computedCellWidth / 8);
|
|
69
72
|
},
|
|
73
|
+
primaryColor() {
|
|
74
|
+
return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemePrimaryColor : loaderLightThemePrimaryColor;
|
|
75
|
+
},
|
|
76
|
+
secondaryColor() {
|
|
77
|
+
return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemeSecondaryColor : loaderLightThemeSecondaryColor;
|
|
78
|
+
}
|
|
70
79
|
},
|
|
71
80
|
|
|
72
81
|
data() {
|