@appscode/design-system 1.1.0-beta.3 → 1.1.0-beta.5

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 (37) hide show
  1. package/base/utilities/_global.scss +15 -10
  2. package/components/_ac-alert-box.scss +6 -6
  3. package/components/_ac-card.scss +0 -589
  4. package/components/_ac-input.scss +788 -281
  5. package/components/_ac-multi-select.scss +1 -1
  6. package/components/_ac-table.scss +3 -3
  7. package/components/_all.scss +2 -2
  8. package/components/_image-upload.scss +2 -2
  9. package/components/_wizard.scss +529 -531
  10. package/components/ac-toaster/_ac-toasted.scss +6 -11
  11. package/components/ui-builder/_vue-open-api.scss +2 -1
  12. package/main.scss +4 -4
  13. package/package.json +1 -1
  14. package/plugins/theme.js +11 -9
  15. package/plugins/vue-toaster.js +1 -1
  16. package/vue-components/v3/alert/Alert.vue +5 -5
  17. package/vue-components/v3/button/Button.vue +8 -0
  18. package/vue-components/v3/cards/Cluster.vue +1 -5
  19. package/vue-components/v3/cards/Counter.vue +12 -0
  20. package/vue-components/v3/cards/FeatureCard.vue +31 -0
  21. package/vue-components/v3/cards/InfoCard.vue +4 -9
  22. package/vue-components/v3/cards/Monitoring.vue +1 -1
  23. package/vue-components/v3/cards/Vendor.vue +67 -5
  24. package/vue-components/v3/content/ContentTable.vue +7 -2
  25. package/vue-components/v3/editor/FilteredFileEditor.vue +195 -2
  26. package/vue-components/v3/form-fields/AcSingleInput.vue +1 -500
  27. package/vue-components/v3/header/Header.vue +3 -2
  28. package/vue-components/v3/loaders/InfoCardLoader.vue +65 -0
  29. package/vue-components/v3/navbar/Navbar.vue +3 -1
  30. package/vue-components/v3/notification/AlertBox.vue +4 -4
  31. package/vue-components/v3/searchbars/SearchBar.vue +10 -2
  32. package/vue-components/v3/sidebar/ClusterSwitcher.vue +9 -14
  33. package/vue-components/v3/sidebar/Sidebar.vue +1 -6
  34. package/vue-components/v3/sidebar/SidebarFooter.vue +3 -3
  35. package/vue-components/v3/sidebar/SidebarHeader.vue +3 -3
  36. package/vue-components/v3/sidebar/Steps.vue +148 -0
  37. package/vue-components/v3/table/Table.vue +27 -20
@@ -35,7 +35,7 @@
35
35
  background-color: #27b064 !important;
36
36
  }
37
37
 
38
- &.is-error {
38
+ &.is-danger {
39
39
  background-color: #ea3d2f !important;
40
40
  }
41
41
 
@@ -64,21 +64,16 @@
64
64
  Responsive Classes
65
65
  *****************************************/
66
66
  // Extra small devices (portrait phones, less than 576px)
67
- @media (max-width: 575.98px) {
68
- }
67
+ @media (max-width: 575.98px) {}
69
68
 
70
69
  // Small devices (landscape phones, 576px and up)
71
- @media (min-width: 576px) and (max-width: 767.98px) {
72
- }
70
+ @media (min-width: 576px) and (max-width: 767.98px) {}
73
71
 
74
72
  // Medium devices (tablets, 768px and up)
75
- @media (min-width: 768px) and (max-width: 991.98px) {
76
- }
73
+ @media (min-width: 768px) and (max-width: 991.98px) {}
77
74
 
78
75
  // Large devices (desktops, 992px and up)
79
- @media (min-width: 992px) and (max-width: 1199.98px) {
80
- }
76
+ @media (min-width: 992px) and (max-width: 1199.98px) {}
81
77
 
82
78
  // Extra large devices (large desktops, 1200px and up)
83
- @media (min-width: 1200px) {
84
- }
79
+ @media (min-width: 1200px) {}
@@ -51,6 +51,7 @@
51
51
 
52
52
  .ac-single-switch {
53
53
  margin-left: -15px;
54
+ margin-bottom: 35px;
54
55
  }
55
56
 
56
57
  .ac-single-input {
@@ -591,7 +592,7 @@
591
592
  }
592
593
  }
593
594
 
594
- .is-error {
595
+ .is-danger {
595
596
  font-size: 12px;
596
597
  line-height: 22px;
597
598
  color: $danger;
package/main.scss CHANGED
@@ -4,10 +4,10 @@
4
4
 
5
5
  // Third party CSS
6
6
  @import "../node_modules/bulma/bulma.sass";
7
- // @import "bulma-checkradio";
8
- // @import "bulma-switch";
9
- // @import "bulma-tooltip";
10
- // @import "font-awesome/css/font-awesome.min.css";
7
+ @import "bulma-checkradio";
8
+ @import "bulma-switch";
9
+ @import "bulma-tooltip";
10
+ @import "font-awesome/css/font-awesome.min.css";
11
11
  @import "vue-multiselect/dist/vue-multiselect.css";
12
12
 
13
13
  // BASE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "1.1.0-beta.3",
3
+ "version": "1.1.0-beta.5",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
package/plugins/theme.js CHANGED
@@ -99,9 +99,9 @@ export function getThemeHSL() {
99
99
  const saturation = getComputedStyle(
100
100
  document.documentElement
101
101
  ).getPropertyValue("--hsl-saturation");
102
- const lightness = getComputedStyle(
103
- document.documentElement
104
- ).getPropertyValue("--hsl-lightness");
102
+ const lightness = getComputedStyle(document.documentElement).getPropertyValue(
103
+ "--hsl-lightness"
104
+ );
105
105
 
106
106
  return {
107
107
  hue,
@@ -115,9 +115,9 @@ export function setThemeHSL(h, s, l) {
115
115
  document.documentElement.style.setProperty("--hsl-lightness", l);
116
116
  }
117
117
  export function setFontHSL(h, s, l) {
118
- document.documentElement.style.setProperty("--font-hsl-hue", h);
119
- document.documentElement.style.setProperty("--font-hsl-saturation", s);
120
- document.documentElement.style.setProperty("--font-hsl-lightness", l);
118
+ document.documentElement.style.setProperty("--font-hsl-hue", h);
119
+ document.documentElement.style.setProperty("--font-hsl-saturation", s);
120
+ document.documentElement.style.setProperty("--font-hsl-lightness", l);
121
121
  }
122
122
  export function getFontHSL() {
123
123
  const hue = getComputedStyle(document.documentElement).getPropertyValue(
@@ -126,9 +126,9 @@ export function getFontHSL() {
126
126
  const saturation = getComputedStyle(
127
127
  document.documentElement
128
128
  ).getPropertyValue("--font-hsl-saturation");
129
- const lightness = getComputedStyle(
130
- document.documentElement
131
- ).getPropertyValue("--font-hsl-lightness");
129
+ const lightness = getComputedStyle(document.documentElement).getPropertyValue(
130
+ "--font-hsl-lightness"
131
+ );
132
132
 
133
133
  return {
134
134
  hue,
@@ -140,3 +140,5 @@ export const loaderLightThemePrimaryColor = "#f5f7f9";
140
140
  export const loaderDarkThemePrimaryColor = "#2e323c";
141
141
  export const loaderLightThemeSecondaryColor = "#ecebeb";
142
142
  export const loaderDarkThemeSecondaryColor = "#21272e";
143
+ export const sidebarLoaderLightThemePrimaryColor = "#0F4371";
144
+ export const sidebarLoaderLightThemeSecondaryColor = "#0C365A";
@@ -43,7 +43,7 @@ module.exports = {
43
43
  icon: "fa-warning",
44
44
  duration: 20000,
45
45
  type: "error",
46
- className: "ac-toast is-error",
46
+ className: "ac-toast is-danger",
47
47
  },
48
48
  },
49
49
  {
@@ -132,8 +132,8 @@ withDefaults(defineProps<Props>(), {
132
132
  @include acNotification($success);
133
133
  }
134
134
 
135
- // is-error
136
- .ac-notification.is-error {
135
+ // is-danger
136
+ .ac-notification.is-danger {
137
137
  @include acNotification($danger);
138
138
  }
139
139
 
@@ -219,8 +219,8 @@ AC Toast
219
219
  @include acToast($success);
220
220
  }
221
221
 
222
- // is-error
223
- .ac-toast.is-error {
222
+ // is-danger
223
+ .ac-toast.is-danger {
224
224
  @include acToast($danger);
225
225
  }
226
226
 
@@ -231,7 +231,7 @@ AC Toast
231
231
 
232
232
  // dark theme start
233
233
  // .is-dark-theme {
234
- // .ac-notification.is-error {
234
+ // .ac-notification.is-danger {
235
235
  // background-color: $dark-bg-light;
236
236
  // }
237
237
  // }
@@ -58,6 +58,14 @@ const handleClick = (e: Event) => {
58
58
  padding: 8px 18px;
59
59
  font-weight: 500;
60
60
  line-height: 1;
61
+
62
+ &.is-light {
63
+ &.is-loading {
64
+ &::after {
65
+ border-color: transparent transparent #1c1c1c #1c1c1c !important;
66
+ }
67
+ }
68
+ }
61
69
  &.is-square {
62
70
  border: 1px solid $primary-95;
63
71
  }
@@ -62,10 +62,6 @@ const OptionDots = defineAsyncComponent(
62
62
  .card-details {
63
63
  border: 1px solid $primary-90;
64
64
  padding: 30px 20px;
65
- // width: calc(33.3% - 8px);
66
- min-width: 360px;
67
- max-width: 520px;
68
- // border-radius: 4px;
69
65
  transition: 0.3s ease-in-out;
70
66
  position: relative;
71
67
  z-index: 1;
@@ -82,7 +78,7 @@ const OptionDots = defineAsyncComponent(
82
78
  display: flex;
83
79
  align-items: center;
84
80
  justify-content: center;
85
- margin-right: 24px;
81
+ // margin-right: 24px;
86
82
 
87
83
  img {
88
84
  height: 24px;
@@ -23,5 +23,17 @@
23
23
  width: calc(25% - 8px);
24
24
  max-width: 390px;
25
25
  min-width: 290px;
26
+
27
+ display: flex;
28
+ flex-direction: column;
29
+ justify-content: space-between;
30
+ height: 200px;
31
+
32
+ border: 1px solid $primary-90;
33
+
34
+ .card-header {
35
+ display: flex;
36
+ justify-content: space-between;
37
+ }
26
38
  }
27
39
  </style>
@@ -38,3 +38,34 @@ withDefaults(
38
38
  </div>
39
39
  <!-- single card wrapper end -->
40
40
  </template>
41
+
42
+ <style lang="scss" scoped>
43
+ // ac card
44
+ .card-basic {
45
+ padding: 20px;
46
+ width: calc(25% - 8px);
47
+ max-width: 390px;
48
+ min-width: 290px;
49
+ position: relative;
50
+
51
+ .required {
52
+ position: absolute;
53
+ left: 20px;
54
+ top: -9px;
55
+ }
56
+ .c-header {
57
+ .c-title {
58
+ h4 {
59
+ font-size: 18px;
60
+ color: #061b2d;
61
+ }
62
+ }
63
+ }
64
+
65
+ .c-body {
66
+ p {
67
+ color: #0c365a;
68
+ }
69
+ }
70
+ }
71
+ </style>
@@ -1,16 +1,16 @@
1
1
  <script setup lang="ts">
2
2
  import { defineAsyncComponent } from "vue";
3
- import type { AcTable } from "../../types/table";
3
+ import type { AcTableRow } from "../../types/table";
4
4
  interface Props {
5
5
  title?: string;
6
6
  modifierClasses?: string;
7
- data: AcTable;
7
+ rowData?: AcTableRow;
8
8
  }
9
9
 
10
10
  withDefaults(defineProps<Props>(), {
11
11
  title: "no-title",
12
12
  modifierClasses: "",
13
- data: () => ({ columns: [], rows: [] }),
13
+ rowData: () => ({ cells: [] }),
14
14
  });
15
15
 
16
16
  const OptionDots = defineAsyncComponent(
@@ -19,12 +19,7 @@ const OptionDots = defineAsyncComponent(
19
19
  </script>
20
20
 
21
21
  <template>
22
- <div
23
- class="info-card"
24
- :class="modifierClasses"
25
- v-for="(rowData, idx) in data.rows"
26
- :key="idx"
27
- >
22
+ <div class="info-card" :class="modifierClasses">
28
23
  <div class="header">
29
24
  <div class="logo">
30
25
  <img :src="rowData.cells[0].icon" alt="icon" />
@@ -62,7 +62,7 @@ withDefaults(defineProps<Props>(), {
62
62
  </div>
63
63
  </template>
64
64
 
65
- <style lang="scss">
65
+ <style lang="scss" scoped>
66
66
  // ac card
67
67
  .card-basic {
68
68
  padding: 20px;
@@ -1,23 +1,85 @@
1
1
  <script setup lang="ts">
2
2
  interface Props {
3
3
  title?: string;
4
+ subTitle?: string;
5
+ logo?: string;
4
6
  }
5
7
 
6
8
  withDefaults(defineProps<Props>(), {
7
9
  title: "no title",
10
+ subTitle: "",
11
+ logo: "https://bb-developer-v1.web.app/_nuxt/img/azure-logo.4fa9281.svg",
8
12
  });
9
13
  </script>
10
14
  <template>
11
- <a class="ac-single-card has-text-centered vendor-card">
15
+ <!-- use "is-selected" for select item -->
16
+ <a class="ac-single-card has-text-centered">
12
17
  <div class="ac-card-logo">
13
18
  <div class="card-status"></div>
14
- <img
15
- src="https://bb-developer-v1.web.app/_nuxt/img/azure-logo.4fa9281.svg"
16
- alt="azure-logo"
17
- />
19
+ <img :src="logo" alt="vendor logo" />
18
20
  </div>
19
21
  <div class="ac-card-name">
20
22
  <p>{{ title }}</p>
23
+ <p class="has-text-weight-normal mt-8" v-if="subTitle">{{ subTitle }}</p>
21
24
  </div>
22
25
  </a>
23
26
  </template>
27
+
28
+ <style lang="scss" scoped>
29
+ .ac-single-card {
30
+ border: 1px solid $primary-90;
31
+ transition: 0.3s ease-in-out;
32
+
33
+ display: flex;
34
+ flex-direction: column;
35
+ justify-content: space-between;
36
+ background-color: $primary-97;
37
+ min-width: 220px;
38
+ padding: 30px 20px 20px;
39
+ cursor: pointer;
40
+
41
+ .ac-card-name {
42
+ p {
43
+ font-size: 13px;
44
+ color: $primary-10;
45
+ line-height: 1;
46
+ font-weight: 500;
47
+
48
+ &.free {
49
+ color: $primary;
50
+ }
51
+ }
52
+ }
53
+ .ac-card-logo {
54
+ width: 70px;
55
+ height: 70px;
56
+ border: 1px solid $primary-90;
57
+ background-color: #fff;
58
+ border-radius: 50%;
59
+ padding: 16px;
60
+ margin-inline: auto;
61
+ margin-bottom: 20px;
62
+ display: flex;
63
+ align-items: center;
64
+
65
+ img {
66
+ width: 100%;
67
+ height: auto;
68
+ }
69
+ }
70
+ &.is-selected {
71
+ border: 1px solid $primary !important;
72
+ }
73
+ &:hover {
74
+ border: 1px solid $primary;
75
+
76
+ .ac-card-title {
77
+ h4 {
78
+ a {
79
+ color: $primary;
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ </style>
@@ -19,7 +19,7 @@ interface Props {
19
19
  removeBorderBottom?: boolean;
20
20
  }
21
21
 
22
- withDefaults(defineProps<Props>(), {
22
+ const props = withDefaults(defineProps<Props>(), {
23
23
  removeTableHeaderPadding: false,
24
24
  tableTitle: "Table",
25
25
  tableSubTitle: "",
@@ -28,6 +28,7 @@ withDefaults(defineProps<Props>(), {
28
28
  removeBorderBottom: false,
29
29
  });
30
30
 
31
+ const acInuptId = props.tableTitle.trim()?.replace(/ /g, "-")?.toLowerCase();
31
32
  const searchText = ref("");
32
33
 
33
34
  const updateSearchText = (text: string) => {
@@ -50,7 +51,11 @@ const updateSearchText = (text: string) => {
50
51
  </template>
51
52
  <slot name="content-left-controls" />
52
53
  <header-item>
53
- <search-bar v-if="searchable" @search="updateSearchText" />
54
+ <search-bar
55
+ v-if="searchable"
56
+ @search="updateSearchText"
57
+ :id="acInuptId"
58
+ />
54
59
  </header-item>
55
60
  <slot name="content-right-controls" />
56
61
  </content-header>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { defineAsyncComponent, ref, watch, computed } from "vue";
2
+ import { computed, defineAsyncComponent, ref, watch } from "vue";
3
3
  import type { PreviewYamlType } from "../../types/previewYaml";
4
4
 
5
5
  interface Props {
@@ -122,7 +122,7 @@ watch(
122
122
  </script>
123
123
 
124
124
  <template>
125
- <div class="ac-preview is-active is-not-fixed">
125
+ <div class="ac-preview">
126
126
  <div class="ac-preview-inner">
127
127
  <!-- preview body start -->
128
128
  <div
@@ -181,3 +181,196 @@ watch(
181
181
  </div>
182
182
  </div>
183
183
  </template>
184
+ <style lang="scss" scoped>
185
+ // .preview-icon {
186
+ // width: 60px;
187
+ // height: 60px;
188
+ // background-color: rgba(25, 113, 189, 0.4);
189
+ // box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.16);
190
+ // border-radius: 4px 0px 0px 4px;
191
+ // position: fixed;
192
+ // right: 0;
193
+ // top: 400px;
194
+ // border: none;
195
+ // cursor: pointer;
196
+ // color: $white-100;
197
+ // z-index: 9999;
198
+ // transition: 0.3s ease-in-out;
199
+
200
+ // img {
201
+ // margin-bottom: 4px;
202
+ // }
203
+
204
+ // &:hover {
205
+ // background-color: $primary;
206
+ // }
207
+ // }
208
+
209
+ .ac-preview {
210
+ padding-inline: 20px;
211
+ // position: fixed;
212
+ // width: calc(100% - 90px);
213
+ // height: 100%;
214
+ // top: 50px;
215
+ // right: -100%;
216
+ // z-index: 99999;
217
+ // transition: 0.3s;
218
+
219
+ // &.is-active {
220
+ // right: 0;
221
+
222
+ // &.is-not-fixed {
223
+ // width: 100%;
224
+
225
+ // .ac-preview-body {
226
+ // padding: 20px 0 0;
227
+ // }
228
+ // }
229
+ // }
230
+
231
+ .ac-preview-inner {
232
+ // background-color: $white-100;
233
+ // border-radius: 10px 0px 0px 10px;
234
+ // height: calc(100% - 90px);
235
+
236
+ &:after {
237
+ // position: absolute;
238
+ // content: "";
239
+ // left: -90px;
240
+ // top: -50px;
241
+ // width: calc(100% + 90px);
242
+ // height: 100%;
243
+ // background-color: $white-100;
244
+
245
+ // remove opacity for fix cluster ui project
246
+ // opacity: 0.8;
247
+ // z-index: -1;
248
+ }
249
+
250
+ // .ac-preview-header {
251
+ // padding: 20px;
252
+ // border-bottom: 1px solid $black-60;
253
+
254
+ // h5 {
255
+ // font-style: normal;
256
+ // font-weight: 500;
257
+ // font-size: 24px;
258
+ // line-height: 28px;
259
+
260
+ // color: $primary-10;
261
+ // }
262
+
263
+ // .ms-back-button {
264
+ // .is-transparent {
265
+ // font-style: normal;
266
+ // font-weight: normal;
267
+ // font-size: 16px;
268
+ // line-height: 100%;
269
+ // color: $black-80;
270
+ // cursor: pointer;
271
+
272
+ // i.fa {
273
+ // color: $black-80;
274
+ // padding-left: 5px;
275
+ // }
276
+ // }
277
+ // }
278
+ // }
279
+
280
+ .ac-preview-body {
281
+ display: flex;
282
+ // margin-top: 10px;
283
+ // padding: 20px;
284
+
285
+ .left-content {
286
+ width: 250px;
287
+ margin-right: 15px;
288
+
289
+ .ac-files {
290
+ ul {
291
+ li {
292
+ &.is-active {
293
+ a {
294
+ background-color: $primary;
295
+ border-radius: 5px;
296
+ color: $white-100;
297
+ padding: 10px 10px;
298
+ margin-left: -10px;
299
+ border-top: 1px solid transparent;
300
+
301
+ span {
302
+ img {
303
+ filter: brightness(100);
304
+ }
305
+ }
306
+ }
307
+
308
+ &:last-child {
309
+ &.is-active {
310
+ a {
311
+ border-top: 1px solid transparent;
312
+ }
313
+ }
314
+ }
315
+ }
316
+
317
+ a {
318
+ padding: 10px 0px;
319
+ display: flex;
320
+ font-style: normal;
321
+ font-weight: 500;
322
+ font-size: 14px;
323
+ line-height: 100%;
324
+ color: $primary-10;
325
+ border-top: 1px solid $primary-90;
326
+
327
+ span {
328
+ img {
329
+ margin-right: 5px;
330
+ height: 13px;
331
+ }
332
+ }
333
+ }
334
+
335
+ &:last-child {
336
+ a {
337
+ border-bottom: 1px solid $primary-90;
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
343
+ }
344
+
345
+ .right-content {
346
+ width: calc(100% - 265px);
347
+
348
+ .code-preview {
349
+ background-color: $primary-90;
350
+ border-radius: 4px;
351
+ display: flex;
352
+
353
+ .code-left {
354
+ width: 50%;
355
+ }
356
+
357
+ .code-right {
358
+ width: 50%;
359
+ }
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+ .left-content {
366
+ .ac-files {
367
+ max-height: 350px;
368
+ overflow-y: auto;
369
+ padding: 10px;
370
+ span {
371
+ width: 20px;
372
+ white-space: nowrap;
373
+ }
374
+ }
375
+ }
376
+ </style>