@appscode/design-system 2.6.22-alpha-0.0.10 → 2.6.22-alpha-0.0.12
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/main.scss
CHANGED
|
@@ -29,5 +29,6 @@
|
|
|
29
29
|
@import "@/components/vue-components/styles/components/ui-builder/ui-builder";
|
|
30
30
|
@import "@/components/vue-components/styles/components/dropdown";
|
|
31
31
|
@import "@/components/vue-components/styles/components/badge-tags";
|
|
32
|
+
@import "@/components/vue-components/styles/components/platform-design";
|
|
32
33
|
|
|
33
34
|
// @import "@/components/vue-components/styles/theme/appscode.scss";
|
package/package.json
CHANGED
|
@@ -32,10 +32,12 @@
|
|
|
32
32
|
@import "tfa";
|
|
33
33
|
@import "transitions";
|
|
34
34
|
@import "steps";
|
|
35
|
+
@import "platform-design";
|
|
35
36
|
|
|
36
37
|
// @import "pricing-table";
|
|
37
38
|
// @import "overview-info";
|
|
38
39
|
// @import "overview-page"
|
|
39
40
|
// @import "nested-list";
|
|
41
|
+
|
|
40
42
|
@import "ui-builder/ui-builder";
|
|
41
43
|
@import "ui-builder/vue-open-api";
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
.profile-banner {
|
|
2
|
+
// background-color: #e3f0ea;
|
|
3
|
+
background-image: url("../../images/banners/banner-background.png");
|
|
4
|
+
padding-top: 16px;
|
|
5
|
+
min-height: 120px;
|
|
6
|
+
position: relative;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
border-bottom: 1px solid $color-border;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
|
|
11
|
+
&::after {
|
|
12
|
+
position: absolute;
|
|
13
|
+
content: "";
|
|
14
|
+
left: 0;
|
|
15
|
+
top: 0;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
background-color: #ddd;
|
|
19
|
+
background-image: url("../../images/banners/banner-overlay.png");
|
|
20
|
+
background-color: lightgray;
|
|
21
|
+
background-position: 0% 0%;
|
|
22
|
+
backdrop-filter: blur(142px);
|
|
23
|
+
z-index: -1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.solid-tab {
|
|
28
|
+
li {
|
|
29
|
+
a {
|
|
30
|
+
padding: 16px 0px !important;
|
|
31
|
+
margin-right: 32px;
|
|
32
|
+
transition: 0.3s ease-in-out;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.is-active,
|
|
36
|
+
&:hover {
|
|
37
|
+
a {
|
|
38
|
+
border-bottom-color: transparent !important;
|
|
39
|
+
position: relative;
|
|
40
|
+
|
|
41
|
+
&::after {
|
|
42
|
+
position: absolute;
|
|
43
|
+
content: "";
|
|
44
|
+
left: 0;
|
|
45
|
+
bottom: 5px;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 4px;
|
|
48
|
+
border-radius: 4px 4px 0 0;
|
|
49
|
+
z-index: 1;
|
|
50
|
+
background-color: $ac-primary;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.body-bottom {
|
|
58
|
+
.cluster {
|
|
59
|
+
background-color: $primary-light-gray;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.filterable-searchbar {
|
|
64
|
+
width: 100%;
|
|
65
|
+
position: relative;
|
|
66
|
+
|
|
67
|
+
.search-filter {
|
|
68
|
+
border: 1px solid $color-border;
|
|
69
|
+
background-color: #fff;
|
|
70
|
+
position: absolute;
|
|
71
|
+
z-index: 9;
|
|
72
|
+
right: 8px;
|
|
73
|
+
height: 36px;
|
|
74
|
+
top: 8px;
|
|
75
|
+
padding: 8px 16px;
|
|
76
|
+
border-radius: 4px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.searchbar {
|
|
80
|
+
width: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.ac-single-input {
|
|
84
|
+
input {
|
|
85
|
+
background-color: $primary-light-gray;
|
|
86
|
+
height: 52px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
label {
|
|
90
|
+
top: 16px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// sidebar items
|
|
96
|
+
.sidebar-style-2 {
|
|
97
|
+
border: 1px solid $color-border;
|
|
98
|
+
border-radius: 4px;
|
|
99
|
+
box-shadow: 8px 4px 14px 0px rgba(0, 0, 0, 0.05);
|
|
100
|
+
|
|
101
|
+
.left-sidebar {
|
|
102
|
+
width: 250px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.sidebar-items {
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
|
|
109
|
+
.sidebar-item {
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 8px;
|
|
113
|
+
color: $color-text;
|
|
114
|
+
padding: 8px 16px;
|
|
115
|
+
transition: 0.1s ease-in-out;
|
|
116
|
+
|
|
117
|
+
&:last-child {
|
|
118
|
+
margin-bottom: 8px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
background-color: $primary-light-gray;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&.is-active {
|
|
126
|
+
background-color: $ac-primary;
|
|
127
|
+
color: $white-100;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
label {
|
|
132
|
+
padding: 8px 16px;
|
|
133
|
+
border-bottom: 1px solid $color-border;
|
|
134
|
+
text-transform: uppercase;
|
|
135
|
+
font-weight: 400;
|
|
136
|
+
color: #616161;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.section-card {
|
|
142
|
+
border: 1px solid $color-border;
|
|
143
|
+
border-radius: 4px;
|
|
144
|
+
.section-heading {
|
|
145
|
+
border-bottom: 1px solid $color-border;
|
|
146
|
+
background-color: $secondary-light-grey;
|
|
147
|
+
padding: 8px 16px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -1,34 +1,141 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { nextTick, watch, ref, computed } from "vue";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
2
4
|
import CogIcon from "../../icons/CogIcon.vue";
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
interface SidebarEntry {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
icon?: any;
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface SidebarSection {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
icon?: any;
|
|
17
|
+
entries: SidebarEntry[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface Props {
|
|
21
|
+
items: SidebarSection[];
|
|
22
|
+
isActive: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Props
|
|
26
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
27
|
+
items: () => [],
|
|
28
|
+
isActive: false
|
|
14
29
|
});
|
|
30
|
+
|
|
31
|
+
const sidebarItem = ref<HTMLElement | null>(null);
|
|
32
|
+
|
|
33
|
+
const route = useRoute();
|
|
34
|
+
|
|
35
|
+
const updatedItems = computed(() => {
|
|
36
|
+
return props.items.map((section) => {
|
|
37
|
+
const updatedEntries = section.entries.map((entry) => ({
|
|
38
|
+
...entry,
|
|
39
|
+
isActive: route.path === entry.url,
|
|
40
|
+
}));
|
|
41
|
+
return { ...section, entries: updatedEntries };
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Scroll active item into view
|
|
46
|
+
watch(
|
|
47
|
+
() => props.isActive,
|
|
48
|
+
(n) => {
|
|
49
|
+
if (n) {
|
|
50
|
+
nextTick(() => {
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
const top = (sidebarItem.value && sidebarItem.value.getBoundingClientRect().top) || 0;
|
|
53
|
+
if (top > window.innerHeight - 200) {
|
|
54
|
+
sidebarItem.value?.scrollIntoView({
|
|
55
|
+
behavior: "smooth",
|
|
56
|
+
block: "center",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}, 300);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{ immediate: true },
|
|
64
|
+
);
|
|
15
65
|
</script>
|
|
16
66
|
|
|
17
67
|
<template>
|
|
18
68
|
<div class="sidebar-style-2">
|
|
19
69
|
<div class="left-sidebar">
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
70
|
+
<div class="sidebar-items" v-for="(section, sIdx) in updatedItems" :key="section.id">
|
|
71
|
+
<label class="label">{{ section.name }}</label>
|
|
72
|
+
|
|
73
|
+
<slot
|
|
74
|
+
name="sidebar-item"
|
|
75
|
+
v-for="(entry, iIdx) in section.entries"
|
|
76
|
+
:key="entry.id"
|
|
77
|
+
:item="entry"
|
|
78
|
+
>
|
|
79
|
+
<router-link
|
|
80
|
+
:to="entry.url"
|
|
81
|
+
class="sidebar-item"
|
|
82
|
+
:class="{ 'is-active': entry.isActive }"
|
|
83
|
+
:ref="entry.isActive ? sidebarItem : null"
|
|
84
|
+
>
|
|
85
|
+
<span class="icon">
|
|
86
|
+
<img :src="entry.icon || CogIcon" alt="icon" />
|
|
87
|
+
</span>
|
|
88
|
+
<span>{{ entry.name }}</span>
|
|
89
|
+
</router-link>
|
|
30
90
|
</slot>
|
|
31
91
|
</div>
|
|
32
92
|
</div>
|
|
33
93
|
</div>
|
|
34
94
|
</template>
|
|
95
|
+
|
|
96
|
+
<style lang="scss" scoped>
|
|
97
|
+
.sidebar-style-2 {
|
|
98
|
+
border: 1px solid $color-border;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
box-shadow: 8px 4px 14px 0px rgba(0, 0, 0, 0.05);
|
|
101
|
+
|
|
102
|
+
.left-sidebar {
|
|
103
|
+
width: 250px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.sidebar-items {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
|
|
110
|
+
.sidebar-item {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: 8px;
|
|
114
|
+
color: $color-text;
|
|
115
|
+
padding: 8px 16px;
|
|
116
|
+
transition: 0.1s ease-in-out;
|
|
117
|
+
|
|
118
|
+
&:last-child {
|
|
119
|
+
margin-bottom: 8px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
background-color: $primary-light-gray;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.is-active {
|
|
127
|
+
background-color: $ac-primary;
|
|
128
|
+
color: $white-100;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
label {
|
|
133
|
+
padding: 8px 16px;
|
|
134
|
+
border-bottom: 1px solid $color-border;
|
|
135
|
+
text-transform: uppercase;
|
|
136
|
+
font-weight: 400;
|
|
137
|
+
color: #616161;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
</style>
|