@appscode/design-system 1.0.43-alpha.140 → 1.0.43-alpha.141

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "1.0.43-alpha.140",
3
+ "version": "1.0.43-alpha.141",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -7,7 +7,7 @@
7
7
  v-if="isPreviewLoading || (!isPreviewLoading && previewYamls)"
8
8
  class="left-content"
9
9
  >
10
- <div class="ac-files">
10
+ <div class="ac-files pt-0">
11
11
  <ul v-if="!isPreviewLoading">
12
12
  <li
13
13
  v-for="(previewYaml, idx) in filteredYamls"
@@ -25,12 +25,20 @@
25
25
  </a>
26
26
  </li>
27
27
  </ul>
28
- <sidebar-loader v-else />
28
+ <sidebar-loader
29
+ v-else
30
+ :primaryLoaderColor="primaryLoaderColor"
31
+ :secondaryLoaderColor="secondaryLoaderColor"
32
+ />
29
33
  </div>
30
34
  </div>
31
35
  <div class="right-content">
32
36
  <div class="right-content">
33
- <resource-loader v-if="isPreviewLoading" />
37
+ <resource-loader
38
+ v-if="isPreviewLoading"
39
+ :primaryLoaderColor="primaryLoaderColor"
40
+ :secondaryLoaderColor="secondaryLoaderColor"
41
+ />
34
42
  <editor
35
43
  v-else-if="!isPreviewLoading && !hideValue"
36
44
  v-model="activeFile.content"
@@ -39,6 +47,8 @@
39
47
  :read-only="isEditorReadOnly"
40
48
  :editor-height="editorHeight"
41
49
  :show-minimap="showMinimap"
50
+ :editor-theme="editorTheme"
51
+ :key="editorTheme"
42
52
  />
43
53
  <span v-else> *************** </span>
44
54
  </div>
@@ -92,6 +102,16 @@ export default {
92
102
  editorHeight: {
93
103
  type: Number,
94
104
  default: 60
105
+ },
106
+ loaderColor: {
107
+ type: Object,
108
+ default: () => {
109
+ return {};
110
+ }
111
+ },
112
+ theme: {
113
+ type: String,
114
+ default: "light"
95
115
  }
96
116
  },
97
117
  data() {
@@ -107,12 +127,21 @@ export default {
107
127
  );
108
128
  return activeFile || { content: "", format: "yaml" };
109
129
  },
110
- originalValue(){
130
+ originalValue() {
111
131
  const activeFile = this.filteredYamls.find(
112
132
  element => element.uid === this.activeKey
113
133
  );
114
134
  return (activeFile && activeFile.initContent) || "";
115
135
  },
136
+ editorTheme() {
137
+ return this.theme === "dark" ? "vs-dark" : "vs";
138
+ },
139
+ primaryLoaderColor() {
140
+ return this.loaderColor.primaryLoaderColor;
141
+ },
142
+ secondaryLoaderColor() {
143
+ return this.loaderColor.secondaryLoaderColor;
144
+ },
116
145
  filteredYamls() {
117
146
  if (this.searchText) {
118
147
  return this.previewYamls.filter(
@@ -62,6 +62,9 @@
62
62
  :preview-yamls="previewYamls"
63
63
  :show-minimap="showMinimap"
64
64
  :editor-height="editorHeight"
65
+ :loader-color="loaderColor"
66
+ :theme="theme"
67
+ :key="theme"
65
68
  @setActiveKey="setActiveKey"
66
69
  />
67
70
  </template>
@@ -127,6 +130,16 @@ export default {
127
130
  hideHeader: {
128
131
  type: Boolean,
129
132
  default: false
133
+ },
134
+ loaderColor: {
135
+ type: Object,
136
+ default: () => {
137
+ return {};
138
+ }
139
+ },
140
+ theme: {
141
+ type: String,
142
+ default: "light"
130
143
  }
131
144
  },
132
145
  data() {
@@ -4,7 +4,8 @@
4
4
  :width="100"
5
5
  :height="40"
6
6
  :speed="2"
7
- :primaryColor="'#f5f7f9'"
7
+ :primaryColor="primaryLoaderColor"
8
+ :secondaryColor="secondaryLoaderColor"
8
9
  >
9
10
  <rect x="1" y="1" rx="1" ry="1" width="14" height="1" />
10
11
  <rect x="17" y="1" rx="1" ry="1" width="13" height="1" />
@@ -84,7 +85,17 @@ import { ContentLoader } from "vue-content-loader";
84
85
 
85
86
  export default {
86
87
  components: {
87
- ContentLoader,
88
+ ContentLoader
88
89
  },
90
+ props: {
91
+ primaryLoaderColor: {
92
+ type: String,
93
+ default: "#f5f7f9"
94
+ },
95
+ secondaryLoaderColor: {
96
+ type: String,
97
+ default: "#ecebeb"
98
+ }
99
+ }
89
100
  };
90
101
  </script>
@@ -4,7 +4,8 @@
4
4
  :width="100"
5
5
  :height="175"
6
6
  :speed="2"
7
- :primaryColor="'#dcdee6'"
7
+ :primaryColor="primaryLoaderColor"
8
+ :secondaryColor="secondaryLoaderColor"
8
9
  >
9
10
  <rect x="2" y="1" rx="3" ry="3" width="96" height="20" />
10
11
  <rect x="15" y="23" rx="3" ry="3" width="83" height="15" />
@@ -26,7 +27,17 @@ import { ContentLoader } from "vue-content-loader";
26
27
 
27
28
  export default {
28
29
  components: {
29
- ContentLoader,
30
+ ContentLoader
30
31
  },
32
+ props: {
33
+ primaryLoaderColor: {
34
+ type: String,
35
+ default: "#f5f7f9"
36
+ },
37
+ secondaryLoaderColor: {
38
+ type: String,
39
+ default: "#ecebeb"
40
+ }
41
+ }
31
42
  };
32
43
  </script>
@@ -7,7 +7,7 @@
7
7
  v-if="isPreviewLoading || (!isPreviewLoading && previewYamls)"
8
8
  class="left-content"
9
9
  >
10
- <div class="ac-files">
10
+ <div class="ac-files pt-0">
11
11
  <ul v-if="!isPreviewLoading">
12
12
  <li
13
13
  v-for="(previewYaml, idx) in filteredYamls"
@@ -114,7 +114,7 @@ export default defineComponent({
114
114
  );
115
115
  return activeFile || { content: "", format: "yaml" };
116
116
  },
117
- originalValue(){
117
+ originalValue() {
118
118
  const activeFile = this.filteredYamls.find(
119
119
  element => element.uid === this.activeKey
120
120
  );