@appscode/design-system 2.4.15 → 2.4.17-alpha
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 +1 -0
- package/package.json +1 -1
- package/vue-components/styles/components/_all.scss +1 -0
- package/vue-components/styles/components/_options.scss +3 -0
- package/vue-components/styles/components/_steps.scss +108 -0
- package/vue-components/styles/components/_table.scss +16 -5
- package/vue-components/v3/alert/AlertMessage.vue +23 -9
- package/vue-components/v3/editor/FilteredFileEditor.vue +8 -5
- package/vue-components/v3/icons/CheckIcon.vue +10 -0
- package/vue-components/v3/icons/ClockIcon.vue +8 -0
- package/vue-components/v3/icons/CpuIcon.vue +8 -0
- package/vue-components/v3/icons/FinanceIcon.vue +8 -0
- package/vue-components/v3/icons/MemoryIcon.vue +8 -0
- package/vue-components/v3/steps/Steps.vue +39 -0
- package/vue-components/v3/table/Table.vue +7 -1
- package/vue-components/v3/steps/ColoredSteps.vue +0 -85
package/main.scss
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// @import "@/components/vue-components/styles/components/all";
|
|
18
18
|
@import "@/components/vue-components/styles/components/button";
|
|
19
19
|
@import "@/components/vue-components/styles/components/terminal";
|
|
20
|
+
@import "@/components/vue-components/styles/components/steps";
|
|
20
21
|
@import "@/components/vue-components/styles/components/code-preview/all";
|
|
21
22
|
@import "@/components/vue-components/styles/components/form-fields/input";
|
|
22
23
|
@import "@/components/vue-components/styles/components/form-fields/custom-selectbox";
|
package/package.json
CHANGED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.steps-wrapper {
|
|
2
|
+
--size: 32px;
|
|
3
|
+
--line: 4px;
|
|
4
|
+
ol {
|
|
5
|
+
display: flex;
|
|
6
|
+
// gap: 48px;
|
|
7
|
+
&.is-column {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: self-start;
|
|
10
|
+
li {
|
|
11
|
+
--line: 2px;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
text-align: left;
|
|
15
|
+
align-items: baseline;
|
|
16
|
+
padding-bottom: 24px;
|
|
17
|
+
.step-header {
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:not(&:last-child) {
|
|
22
|
+
&::before {
|
|
23
|
+
position: absolute;
|
|
24
|
+
content: "";
|
|
25
|
+
height: var(--line);
|
|
26
|
+
top: 0;
|
|
27
|
+
left: calc(var(--size) / 2 - var(--line) / 2);
|
|
28
|
+
order: -1;
|
|
29
|
+
background-color: #e2e8f0;
|
|
30
|
+
height: 100%;
|
|
31
|
+
width: 2px;
|
|
32
|
+
z-index: -1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
&:last-child {
|
|
36
|
+
&::before {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
&.is-complete {
|
|
41
|
+
&::before {
|
|
42
|
+
background-color: $ac-primary !important;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
li {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex: 1 1 0%;
|
|
50
|
+
align-items: center;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
position: relative;
|
|
53
|
+
text-align: center;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
z-index: 1;
|
|
56
|
+
opacity: 0.7;
|
|
57
|
+
&.is-active {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
.step-header {
|
|
60
|
+
background-color: $ac-primary;
|
|
61
|
+
color: #fff;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
&.is-complete {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
&:not(&:first-child) {
|
|
67
|
+
&::before {
|
|
68
|
+
background-color: $ac-primary;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
p {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
&:not(&:first-child) {
|
|
76
|
+
&::before {
|
|
77
|
+
position: absolute;
|
|
78
|
+
content: "";
|
|
79
|
+
height: var(--line);
|
|
80
|
+
left: calc(-50% + 16px);
|
|
81
|
+
top: calc(var(--size) / 2 - var(--line) / 2);
|
|
82
|
+
order: -1;
|
|
83
|
+
background-color: #e2e8f0;
|
|
84
|
+
width: calc(100% - var(--size));
|
|
85
|
+
z-index: -1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.step-header {
|
|
90
|
+
background-color: #e2e8f0;
|
|
91
|
+
align-items: center;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
height: var(--size);
|
|
95
|
+
justify-content: center;
|
|
96
|
+
// margin: auto auto 8px;
|
|
97
|
+
margin-bottom: 8px;
|
|
98
|
+
position: relative;
|
|
99
|
+
width: var(--size);
|
|
100
|
+
border-radius: 50%;
|
|
101
|
+
}
|
|
102
|
+
p {
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
color: $color-heading;
|
|
46
46
|
border: none;
|
|
47
47
|
font-weight: 500;
|
|
48
|
+
background-color: $secondary-light-gray;
|
|
48
49
|
// background-color: $primary-97;
|
|
49
50
|
// text-transform: uppercase;
|
|
50
51
|
font-weight: 500;
|
|
@@ -353,19 +354,29 @@
|
|
|
353
354
|
}
|
|
354
355
|
}
|
|
355
356
|
|
|
356
|
-
&.is-middle
|
|
357
|
-
|
|
357
|
+
&.is-middle {
|
|
358
|
+
tbody {
|
|
358
359
|
tr {
|
|
359
|
-
|
|
360
|
+
td {
|
|
360
361
|
vertical-align: middle;
|
|
361
362
|
}
|
|
362
363
|
}
|
|
363
364
|
}
|
|
364
|
-
|
|
365
|
+
}
|
|
366
|
+
&.is-baseline {
|
|
365
367
|
tbody {
|
|
366
368
|
tr {
|
|
367
369
|
td {
|
|
368
|
-
vertical-align:
|
|
370
|
+
vertical-align: baseline;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
&.is-bottom {
|
|
376
|
+
tbody {
|
|
377
|
+
tr {
|
|
378
|
+
td {
|
|
379
|
+
vertical-align: bottom;
|
|
369
380
|
}
|
|
370
381
|
}
|
|
371
382
|
}
|
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
|
|
2
4
|
interface Props {
|
|
3
5
|
modifierClasses?: string;
|
|
4
6
|
message?: string;
|
|
7
|
+
hasCrossIcon?: boolean;
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
withDefaults(defineProps<Props>(), {
|
|
8
11
|
modifierClasses: "",
|
|
9
|
-
message:
|
|
10
|
-
|
|
12
|
+
message: "",
|
|
13
|
+
hasCrossIcon: false,
|
|
11
14
|
});
|
|
15
|
+
|
|
16
|
+
const showAlert = ref(true);
|
|
17
|
+
function hideAlert() {
|
|
18
|
+
showAlert.value = false;
|
|
19
|
+
}
|
|
12
20
|
</script>
|
|
13
21
|
|
|
14
22
|
<template>
|
|
15
|
-
<div :class="modifierClasses" class="message
|
|
16
|
-
<div class="message-body">
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
<div v-if="showAlert" :class="modifierClasses" class="message">
|
|
24
|
+
<div class="message-body is-justify-content-space-between">
|
|
25
|
+
<div class="is-flex is-flex-direction-column gap-4 is-fullwidth">
|
|
26
|
+
<div class="is-flex is-align-items-center gap-8">
|
|
27
|
+
<span class="status-icon">
|
|
28
|
+
<slot name="icon"></slot>
|
|
29
|
+
</span>
|
|
30
|
+
<p v-if="message">{{ message }}</p>
|
|
31
|
+
<slot name="custom-text"></slot>
|
|
32
|
+
</div>
|
|
33
|
+
<slot name="buttons"></slot>
|
|
34
|
+
</div>
|
|
21
35
|
|
|
22
|
-
<button class="button is-text">
|
|
36
|
+
<button v-if="hasCrossIcon" class="button is-text" @click="hideAlert">
|
|
23
37
|
<span class="icon"
|
|
24
38
|
><svg
|
|
25
39
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -112,7 +112,7 @@ watch(
|
|
|
112
112
|
</script>
|
|
113
113
|
|
|
114
114
|
<template>
|
|
115
|
-
<div class="ac-preview is-not-fixed">
|
|
115
|
+
<div class="ac-preview is-not-fixed b-t-1">
|
|
116
116
|
<div class="ac-preview-inner">
|
|
117
117
|
<!-- preview body start -->
|
|
118
118
|
<div
|
|
@@ -127,17 +127,20 @@ watch(
|
|
|
127
127
|
</strong>
|
|
128
128
|
<template v-else>
|
|
129
129
|
<div v-if="!isPreviewLoading && previewYamls" class="left-content">
|
|
130
|
-
<div class="
|
|
130
|
+
<div class="sidebar-tabs p-0 pt-16 pr-20">
|
|
131
131
|
<ul v-if="!isPreviewLoading">
|
|
132
132
|
<li
|
|
133
133
|
v-for="(previewYaml, idx) in filteredYamls"
|
|
134
134
|
:key="previewYaml.name + idx"
|
|
135
|
-
:class="{ 'is-active': activeKey === previewYaml.uid }"
|
|
136
135
|
:title="previewYaml.name"
|
|
137
136
|
data-testid="filtered-file-editor-file-name"
|
|
138
137
|
>
|
|
139
|
-
<a
|
|
140
|
-
|
|
138
|
+
<a
|
|
139
|
+
@click.prevent="setActivePreview(previewYaml.uid)"
|
|
140
|
+
class="is-justify-content-flex-start gap-8 is-align-items-center"
|
|
141
|
+
:class="{ 'is-active': activeKey === previewYaml.uid }"
|
|
142
|
+
>
|
|
143
|
+
<span class="is-flex is-align-items-center">
|
|
141
144
|
<img src="~@appscode/design-system-images/icons/file-icon.svg" alt="" />
|
|
142
145
|
</span>
|
|
143
146
|
<span>{{ previewYaml.name }}</span>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 16 16">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
fill-rule="evenodd"
|
|
6
|
+
d="M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353l4.493-6.74a.75.75 0 0 1 1.04-.207"
|
|
7
|
+
clip-rule="evenodd"
|
|
8
|
+
/>
|
|
9
|
+
</svg>
|
|
10
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8m-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24a.71.71 0 0 0-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M152 96h-48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8m-8 48h-32v-32h32Zm88 0h-16v-32h16a8 8 0 0 0 0-16h-16V56a16 16 0 0 0-16-16h-40V24a8 8 0 0 0-16 0v16h-32V24a8 8 0 0 0-16 0v16H56a16 16 0 0 0-16 16v40H24a8 8 0 0 0 0 16h16v32H24a8 8 0 0 0 0 16h16v40a16 16 0 0 0 16 16h40v16a8 8 0 0 0 16 0v-16h32v16a8 8 0 0 0 16 0v-16h40a16 16 0 0 0 16-16v-40h16a8 8 0 0 0 0-16m-32 56H56V56h144z"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 14 14">
|
|
3
|
+
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
|
|
4
|
+
<path d="M7 4.5V3M5.5 8.5c0 .75.67 1 1.5 1s1.5 0 1.5-1c0-1.5-3-1.5-3-3c0-1 .67-1 1.5-1s1.5.38 1.5 1M7 9.5V11" />
|
|
5
|
+
<circle cx="7" cy="7" r="6.5" />
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M232 56H24A16 16 0 0 0 8 72v128a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0v-16h16v16a8 8 0 0 0 16 0V72a16 16 0 0 0-16-16M24 72h208v96H24Zm88 80a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8H48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8Zm-56-48h48v32H56Zm88 48h64a8 8 0 0 0 8-8V96a8 8 0 0 0-8-8h-64a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8m8-48h48v32h-48Z"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
const CheckIcon = defineAsyncComponent(() => import("../icons/CheckIcon.vue"));
|
|
4
|
+
interface Props {
|
|
5
|
+
direction?: string;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
complete?: boolean;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
count?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
withDefaults(defineProps<Props>(), {
|
|
14
|
+
direction: "is-row",
|
|
15
|
+
active: false,
|
|
16
|
+
complete: false,
|
|
17
|
+
title: "Title",
|
|
18
|
+
description: "Description",
|
|
19
|
+
count: "1",
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div class="steps-wrapper">
|
|
25
|
+
<ol class="steps" :class="direction">
|
|
26
|
+
<!-- 'is-active': if active, 'is-complete': if complete -->
|
|
27
|
+
<li class="step" :class="{ 'is-active': active, 'is-complete': complete }" v-for="i in 4" :key="i">
|
|
28
|
+
<div class="step-header">
|
|
29
|
+
<span class="icon" v-if="complete"><CheckIcon /></span>
|
|
30
|
+
<span v-else>{{ count }}</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="is-flex is-flex-direction-column">
|
|
33
|
+
<h5>{{ title }}</h5>
|
|
34
|
+
<p>{{ description }}</p>
|
|
35
|
+
</div>
|
|
36
|
+
</li>
|
|
37
|
+
</ol>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
@@ -15,6 +15,8 @@ interface Props {
|
|
|
15
15
|
modifierClass?: string;
|
|
16
16
|
isCustom?: boolean;
|
|
17
17
|
tableClass?: string;
|
|
18
|
+
tableStyle?: string;
|
|
19
|
+
dataAlign?: string;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -30,6 +32,8 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
30
32
|
modifierClass: "",
|
|
31
33
|
isCustom: false,
|
|
32
34
|
tableClass: "",
|
|
35
|
+
tableStyle: "is-bordered",
|
|
36
|
+
dataAlign: "is-middle",
|
|
33
37
|
});
|
|
34
38
|
|
|
35
39
|
const emit = defineEmits(["sort", "scroller"]);
|
|
@@ -136,10 +140,12 @@ onUpdated(() => {
|
|
|
136
140
|
<table-container ref="ac_table_container" @scroller="handleScroller">
|
|
137
141
|
<table
|
|
138
142
|
ref="ac_table"
|
|
139
|
-
class="table ac-table
|
|
143
|
+
class="table ac-table"
|
|
140
144
|
:class="[
|
|
141
145
|
!isDynamicWidthTable || isFullTableLoaderActive || isTableEmpty || isLoaderActive ? 'is-fullwidth' : '',
|
|
142
146
|
tableClass,
|
|
147
|
+
tableStyle,
|
|
148
|
+
dataAlign,
|
|
143
149
|
// 'ac-striped': !columnStriped,
|
|
144
150
|
// 'is-bordered': columnStriped,
|
|
145
151
|
]"
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
interface Props {
|
|
3
|
-
modifierClasses?: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
withDefaults(defineProps<Props>(), {
|
|
7
|
-
modifierClasses: "",
|
|
8
|
-
});
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<div class="colored-steps" :class="modifierClasses">
|
|
13
|
-
<ol class="steps">
|
|
14
|
-
<li class="step">
|
|
15
|
-
<div class="step-header bg-primary"></div>
|
|
16
|
-
<p>Step 1</p>
|
|
17
|
-
</li>
|
|
18
|
-
<li class="step">
|
|
19
|
-
<div class="step-header bg-info"></div>
|
|
20
|
-
<p>Step 2</p>
|
|
21
|
-
</li>
|
|
22
|
-
<li class="step">
|
|
23
|
-
<div class="step-header bg-info"></div>
|
|
24
|
-
<p>Step 2</p>
|
|
25
|
-
</li>
|
|
26
|
-
<li class="step">
|
|
27
|
-
<div class="step-header bg-error"></div>
|
|
28
|
-
<p>Step 2</p>
|
|
29
|
-
</li>
|
|
30
|
-
<li class="step">
|
|
31
|
-
<div class="step-header bg-warning"></div>
|
|
32
|
-
<p>Step 2</p>
|
|
33
|
-
</li>
|
|
34
|
-
</ol>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<style lang="scss">
|
|
39
|
-
.colored-steps {
|
|
40
|
-
--size: 8px;
|
|
41
|
-
--line: 1px;
|
|
42
|
-
ol {
|
|
43
|
-
display: flex;
|
|
44
|
-
// gap: 48px;
|
|
45
|
-
|
|
46
|
-
li {
|
|
47
|
-
display: flex;
|
|
48
|
-
align-items: center;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
position: relative;
|
|
51
|
-
width: 100px;
|
|
52
|
-
&:not(&:last-child) {
|
|
53
|
-
&::before {
|
|
54
|
-
position: absolute;
|
|
55
|
-
content: "";
|
|
56
|
-
height: var(--line);
|
|
57
|
-
left: 50%;
|
|
58
|
-
top: calc(var(--size) / 2 - var(--line) / 2);
|
|
59
|
-
order: -1;
|
|
60
|
-
background-color: #333;
|
|
61
|
-
width: calc(100% - var(--size));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.step-header {
|
|
66
|
-
background-color: $ac-primary;
|
|
67
|
-
align-items: center;
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-shrink: 0;
|
|
70
|
-
height: var(--size);
|
|
71
|
-
justify-content: center;
|
|
72
|
-
margin: auto auto var(--size);
|
|
73
|
-
position: relative;
|
|
74
|
-
width: var(--size);
|
|
75
|
-
border-radius: 50%;
|
|
76
|
-
}
|
|
77
|
-
p {
|
|
78
|
-
font-size: 12px;
|
|
79
|
-
margin: 0;
|
|
80
|
-
padding: 0;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
</style>
|