@appscode/design-system 2.0.10 → 2.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/base/utilities/_extended.scss +2 -3
- package/package.json +1 -1
- package/vue-components/v3/cards/Cluster.vue +4 -3
- package/vue-components/v3/cards/Counter.vue +1 -1
- package/vue-components/v3/cards/FeatureCard.vue +1 -0
- package/vue-components/v3/cards/Monitoring.vue +1 -0
- package/vue-components/v3/cards/OrgCard.vue +134 -0
- package/vue-components/v3/cards/Vendor.vue +1 -1
- package/plugins/theme.js +0 -144
- package/vue-components/v3/cards/OrgClusterCard.vue +0 -86
package/package.json
CHANGED
|
@@ -71,21 +71,22 @@ const OptionDots = defineAsyncComponent(
|
|
|
71
71
|
<style lang="scss" scoped>
|
|
72
72
|
.card-details {
|
|
73
73
|
border: 1px solid $primary-90;
|
|
74
|
-
padding:
|
|
74
|
+
padding: 24px 20px;
|
|
75
75
|
transition: 0.3s ease-in-out;
|
|
76
76
|
position: relative;
|
|
77
77
|
z-index: 1;
|
|
78
78
|
width: 100%;
|
|
79
|
+
border-radius: 2px;
|
|
79
80
|
|
|
80
81
|
.ac-options {
|
|
81
82
|
position: absolute;
|
|
82
83
|
right: 20px;
|
|
83
|
-
top:
|
|
84
|
+
top: 24px;
|
|
84
85
|
z-index: 999;
|
|
85
86
|
}
|
|
86
87
|
.c-header {
|
|
87
88
|
display: flex;
|
|
88
|
-
margin-bottom:
|
|
89
|
+
margin-bottom: 24px;
|
|
89
90
|
|
|
90
91
|
.c-logo {
|
|
91
92
|
width: 54px;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
const AcButton = defineAsyncComponent(() => import("../button/Button.vue"));
|
|
4
|
+
const HeroiconsArrowSmallRight = defineAsyncComponent(
|
|
5
|
+
() => import("~icons/heroicons/arrow-small-right")
|
|
6
|
+
);
|
|
7
|
+
const HeroiconsPlus = defineAsyncComponent(
|
|
8
|
+
() => import("~icons/heroicons/plus")
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
title?: string;
|
|
13
|
+
type?: string;
|
|
14
|
+
modifierClasses?: string;
|
|
15
|
+
roundedThumbnail?: boolean;
|
|
16
|
+
thumbnail?: string;
|
|
17
|
+
url?: string;
|
|
18
|
+
urlLabel?: string;
|
|
19
|
+
noDataAvailable?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
withDefaults(defineProps<Props>(), {
|
|
23
|
+
title: "no-title",
|
|
24
|
+
type: "organization",
|
|
25
|
+
modifierClasses: "",
|
|
26
|
+
roundedThumbnail: true,
|
|
27
|
+
thumbnail: "//via.placeholder.com/100/dddddd/808080",
|
|
28
|
+
url: "#",
|
|
29
|
+
urlLabel: "Details",
|
|
30
|
+
noDataAvailable: false,
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
<template>
|
|
34
|
+
<div
|
|
35
|
+
class="card-details has-hover-style"
|
|
36
|
+
:class="[
|
|
37
|
+
modifierClasses,
|
|
38
|
+
{ 'no-data-available is-justify-content-center': noDataAvailable },
|
|
39
|
+
]"
|
|
40
|
+
>
|
|
41
|
+
<div
|
|
42
|
+
class="left-content"
|
|
43
|
+
:class="{ 'is-align-items-center': noDataAvailable }"
|
|
44
|
+
>
|
|
45
|
+
<figure class="image" :class="{ 'is-48x48': !noDataAvailable }">
|
|
46
|
+
<img :class="{ 'is-rounded': !noDataAvailable }" :src="thumbnail" />
|
|
47
|
+
</figure>
|
|
48
|
+
<h5>{{ title }}</h5>
|
|
49
|
+
|
|
50
|
+
<AcButton v-if="noDataAvailable" :title="urlLabel" icon-class="unplugin">
|
|
51
|
+
<template #icon><HeroiconsPlus /></template>
|
|
52
|
+
</AcButton>
|
|
53
|
+
|
|
54
|
+
<AcButton
|
|
55
|
+
v-else
|
|
56
|
+
:title="urlLabel"
|
|
57
|
+
modifier-classes="is-text px-0 is-flex-direction-row-reverse gap-8"
|
|
58
|
+
icon-class="unplugin"
|
|
59
|
+
>
|
|
60
|
+
<template #icon><HeroiconsArrowSmallRight /></template>
|
|
61
|
+
</AcButton>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="right-content" v-if="!noDataAvailable">
|
|
64
|
+
<figure class="image is-48x48">
|
|
65
|
+
<img
|
|
66
|
+
v-if="type === 'organization'"
|
|
67
|
+
src="../../images/icons/org-icon.svg"
|
|
68
|
+
/>
|
|
69
|
+
<img v-else src="../../images/icons/cluster-icon.svg" />
|
|
70
|
+
</figure>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</template>
|
|
74
|
+
<style lang="scss" scoped>
|
|
75
|
+
.card-details {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: flex-end;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
border: 1px solid $primary-90;
|
|
80
|
+
padding: 24px 20px;
|
|
81
|
+
border-radius: 2px;
|
|
82
|
+
transition: 0.3s ease-in-out;
|
|
83
|
+
position: relative;
|
|
84
|
+
|
|
85
|
+
figure {
|
|
86
|
+
margin-bottom: 8px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
button.ac-button.is-text {
|
|
90
|
+
color: $primary;
|
|
91
|
+
transition: 0.3s ease-in-out;
|
|
92
|
+
padding: 2px 0;
|
|
93
|
+
height: auto;
|
|
94
|
+
&:hover {
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:hover:not(.no-data-available) {
|
|
100
|
+
// border: 1px solid $primary;
|
|
101
|
+
button.ac-button.is-text {
|
|
102
|
+
gap: 16px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.right-content {
|
|
106
|
+
img {
|
|
107
|
+
filter: grayscale(0);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.left-content {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
align-items: flex-start;
|
|
116
|
+
gap: 8px;
|
|
117
|
+
justify-content: space-between;
|
|
118
|
+
|
|
119
|
+
.image {
|
|
120
|
+
border-radius: 50%;
|
|
121
|
+
|
|
122
|
+
&:has(.is-rounded) {
|
|
123
|
+
box-shadow: inset 0 0 0 1px hsla(0, 0%, 0%, 0.1);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.right-content {
|
|
129
|
+
img {
|
|
130
|
+
filter: grayscale(1);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
</style>
|
package/plugins/theme.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
export function HSLToHex(h, s, l) {
|
|
2
|
-
s /= 100;
|
|
3
|
-
l /= 100;
|
|
4
|
-
|
|
5
|
-
const c = (1 - Math.abs(2 * l - 1)) * s,
|
|
6
|
-
x = c * (1 - Math.abs(((h / 60) % 2) - 1)),
|
|
7
|
-
m = l - c / 2;
|
|
8
|
-
|
|
9
|
-
let r = 0,
|
|
10
|
-
g = 0,
|
|
11
|
-
b = 0;
|
|
12
|
-
|
|
13
|
-
if (0 <= h && h < 60) {
|
|
14
|
-
r = c;
|
|
15
|
-
g = x;
|
|
16
|
-
b = 0;
|
|
17
|
-
} else if (60 <= h && h < 120) {
|
|
18
|
-
r = x;
|
|
19
|
-
g = c;
|
|
20
|
-
b = 0;
|
|
21
|
-
} else if (120 <= h && h < 180) {
|
|
22
|
-
r = 0;
|
|
23
|
-
g = c;
|
|
24
|
-
b = x;
|
|
25
|
-
} else if (180 <= h && h < 240) {
|
|
26
|
-
r = 0;
|
|
27
|
-
g = x;
|
|
28
|
-
b = c;
|
|
29
|
-
} else if (240 <= h && h < 300) {
|
|
30
|
-
r = x;
|
|
31
|
-
g = 0;
|
|
32
|
-
b = c;
|
|
33
|
-
} else if (300 <= h && h < 360) {
|
|
34
|
-
r = c;
|
|
35
|
-
g = 0;
|
|
36
|
-
b = x;
|
|
37
|
-
}
|
|
38
|
-
// Having obtained RGB, convert channels to hex
|
|
39
|
-
r = Math.round((r + m) * 255).toString(16);
|
|
40
|
-
g = Math.round((g + m) * 255).toString(16);
|
|
41
|
-
b = Math.round((b + m) * 255).toString(16);
|
|
42
|
-
|
|
43
|
-
// Prepend 0s, if necessary
|
|
44
|
-
if (r.length == 1) r = "0" + r;
|
|
45
|
-
if (g.length == 1) g = "0" + g;
|
|
46
|
-
if (b.length == 1) b = "0" + b;
|
|
47
|
-
|
|
48
|
-
return "#" + r + g + b;
|
|
49
|
-
}
|
|
50
|
-
export function HexToHSL(H) {
|
|
51
|
-
// Convert hex to RGB first
|
|
52
|
-
let r = 0,
|
|
53
|
-
g = 0,
|
|
54
|
-
b = 0;
|
|
55
|
-
if (H.length == 4) {
|
|
56
|
-
r = parseInt("0x" + H[1] + H[1]);
|
|
57
|
-
g = parseInt("0x" + H[2] + H[2]);
|
|
58
|
-
b = parseInt("0x" + H[3] + H[3]);
|
|
59
|
-
} else if (H.length == 7) {
|
|
60
|
-
r = parseInt("0x" + H[1] + H[2]);
|
|
61
|
-
g = parseInt("0x" + H[3] + H[4]);
|
|
62
|
-
b = parseInt("0x" + H[5] + H[6]);
|
|
63
|
-
}
|
|
64
|
-
// Then to HSL
|
|
65
|
-
r /= 255;
|
|
66
|
-
g /= 255;
|
|
67
|
-
b /= 255;
|
|
68
|
-
const cmin = Math.min(r, g, b),
|
|
69
|
-
cmax = Math.max(r, g, b),
|
|
70
|
-
delta = cmax - cmin;
|
|
71
|
-
let h = 0,
|
|
72
|
-
s = 0,
|
|
73
|
-
l = 0;
|
|
74
|
-
|
|
75
|
-
if (delta == 0) h = 0;
|
|
76
|
-
else if (cmax == r) h = ((g - b) / delta) % 6;
|
|
77
|
-
else if (cmax == g) h = (b - r) / delta + 2;
|
|
78
|
-
else h = (r - g) / delta + 4;
|
|
79
|
-
|
|
80
|
-
h = Math.round(h * 60);
|
|
81
|
-
|
|
82
|
-
if (h < 0) h += 360;
|
|
83
|
-
|
|
84
|
-
l = (cmax + cmin) / 2;
|
|
85
|
-
s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
|
|
86
|
-
s = +(s * 100).toFixed(1);
|
|
87
|
-
l = +(l * 100).toFixed(1);
|
|
88
|
-
|
|
89
|
-
return {
|
|
90
|
-
hue: `${h}`,
|
|
91
|
-
saturation: `${s}%`,
|
|
92
|
-
lightness: `${l}%`,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
export function getThemeHSL() {
|
|
96
|
-
const hue = getComputedStyle(document.documentElement).getPropertyValue(
|
|
97
|
-
"--hsl-hue"
|
|
98
|
-
);
|
|
99
|
-
const saturation = getComputedStyle(
|
|
100
|
-
document.documentElement
|
|
101
|
-
).getPropertyValue("--hsl-saturation");
|
|
102
|
-
const lightness = getComputedStyle(document.documentElement).getPropertyValue(
|
|
103
|
-
"--hsl-lightness"
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
return {
|
|
107
|
-
hue,
|
|
108
|
-
saturation,
|
|
109
|
-
lightness,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
export function setThemeHSL(h, s, l) {
|
|
113
|
-
document.documentElement.style.setProperty("--hsl-hue", h);
|
|
114
|
-
document.documentElement.style.setProperty("--hsl-saturation", s);
|
|
115
|
-
document.documentElement.style.setProperty("--hsl-lightness", l);
|
|
116
|
-
}
|
|
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);
|
|
121
|
-
}
|
|
122
|
-
export function getFontHSL() {
|
|
123
|
-
const hue = getComputedStyle(document.documentElement).getPropertyValue(
|
|
124
|
-
"--font-hsl-hue"
|
|
125
|
-
);
|
|
126
|
-
const saturation = getComputedStyle(
|
|
127
|
-
document.documentElement
|
|
128
|
-
).getPropertyValue("--font-hsl-saturation");
|
|
129
|
-
const lightness = getComputedStyle(document.documentElement).getPropertyValue(
|
|
130
|
-
"--font-hsl-lightness"
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
return {
|
|
134
|
-
hue,
|
|
135
|
-
saturation,
|
|
136
|
-
lightness,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
export const loaderLightThemePrimaryColor = "#f5f7f9";
|
|
140
|
-
export const loaderDarkThemePrimaryColor = "#2e323c";
|
|
141
|
-
export const loaderLightThemeSecondaryColor = "#ecebeb";
|
|
142
|
-
export const loaderDarkThemeSecondaryColor = "#21272e";
|
|
143
|
-
export const sidebarLoaderLightThemePrimaryColor = "#0F4371";
|
|
144
|
-
export const sidebarLoaderLightThemeSecondaryColor = "#0C365A";
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
interface Props {
|
|
3
|
-
title?: string;
|
|
4
|
-
type?: string;
|
|
5
|
-
modifierClasses?: string;
|
|
6
|
-
roundedThumbnail?: boolean;
|
|
7
|
-
thumbnail?: string;
|
|
8
|
-
url?: string;
|
|
9
|
-
urlLabel?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
withDefaults(defineProps<Props>(), {
|
|
13
|
-
title: "no-title",
|
|
14
|
-
type: "organization",
|
|
15
|
-
modifierClasses: "",
|
|
16
|
-
roundedThumbnail: true,
|
|
17
|
-
thumbnail: "https://via.placeholder.com/80/dddddd/808080",
|
|
18
|
-
url: "#",
|
|
19
|
-
urlLabel: "Details",
|
|
20
|
-
});
|
|
21
|
-
</script>
|
|
22
|
-
<template>
|
|
23
|
-
<div class="card-details is-clickable" :class="modifierClasses">
|
|
24
|
-
<div class="left-content">
|
|
25
|
-
<figure class="image is-64x64">
|
|
26
|
-
<img :class="{ 'is-rounded': roundedThumbnail }" :src="thumbnail" />
|
|
27
|
-
</figure>
|
|
28
|
-
<h5>{{ title }}</h5>
|
|
29
|
-
<a :href="url" class="is-underlined has-text-weight-medium">
|
|
30
|
-
{{ urlLabel }}
|
|
31
|
-
</a>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="right-content">
|
|
34
|
-
<figure class="image is-64x64">
|
|
35
|
-
<img
|
|
36
|
-
v-if="type === 'organization'"
|
|
37
|
-
src="../../images/icons/org-icon.svg"
|
|
38
|
-
/>
|
|
39
|
-
<img v-else src="../../images/icons/cluster-icon.svg" />
|
|
40
|
-
</figure>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</template>
|
|
44
|
-
<style lang="scss" scoped>
|
|
45
|
-
.card-details {
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: flex-end;
|
|
48
|
-
justify-content: space-between;
|
|
49
|
-
border: 1px solid $primary-90;
|
|
50
|
-
padding: 32px 20px;
|
|
51
|
-
border-radius: 4px;
|
|
52
|
-
transition: 0.3s ease-in-out;
|
|
53
|
-
|
|
54
|
-
&:hover {
|
|
55
|
-
border: 1px solid $primary;
|
|
56
|
-
|
|
57
|
-
.right-content {
|
|
58
|
-
img {
|
|
59
|
-
filter: grayscale(0);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.left-content {
|
|
65
|
-
display: flex;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
align-items: flex-start;
|
|
68
|
-
gap: 16px;
|
|
69
|
-
justify-content: space-between;
|
|
70
|
-
|
|
71
|
-
.image {
|
|
72
|
-
border-radius: 50%;
|
|
73
|
-
|
|
74
|
-
&:has(.is-rounded) {
|
|
75
|
-
box-shadow: inset 0 0 0 1px hsla(0, 0%, 0%, 0.1);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.right-content {
|
|
81
|
-
img {
|
|
82
|
-
filter: grayscale(1);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
</style>
|