@appscode/design-system 2.17.26-alpha → 2.17.27
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 -4
- package/package.json +1 -1
- package/vue-components/styles/base/utilities/_global.scss +0 -8
- package/vue-components/styles/base/utilities/_typography.scss +0 -5
- package/vue-components/styles/components/cards/_all.scss +1 -1
- package/vue-components/styles/components/form-fields/_input-card.scss +1 -3
- package/vue-components/styles/components/form-fields/_input.scss +1 -63
- package/vue-components/v3/cards/UsageTableCard.vue +14 -3
- package/vue-components/v3/form-fields/AcSingleInput.vue +0 -20
- package/vue-components/v3/form-fields/CheckRadio.vue +1 -3
- package/vue-components/v3/section/SectionContent.vue +1 -1
- package/vue-components/styles/components/_ac-duration.scss +0 -50
- package/vue-components/styles/components/_file-explore.scss +0 -31
- package/vue-components/styles/components/cards/_cards-group.scss +0 -26
- package/vue-components/v3/alert/AlertLinked.vue +0 -32
- package/vue-components/v3/config-secret/ConfigSecret.vue +0 -61
- package/vue-components/v3/icons/ArrowDownLongIcon.vue +0 -8
- package/vue-components/v3/icons/ArrowRightIcon.vue +0 -14
- package/vue-components/v3/icons/InfoLightIcon.vue +0 -15
- package/vue-components/v3/icons/MachineCpuIcon.vue +0 -8
- package/vue-components/v3/icons/MachineMemoryIcon.vue +0 -8
- package/vue-components/v3/icons/StorageIcon-2.vue +0 -14
- package/vue-components/v3/node-selection/NodeSelection.vue +0 -82
- package/vue-components/v3/postgres/Postgres.vue +0 -33
- package/vue-components/v3/replica-set/MachineProfile.vue +0 -119
- package/vue-components/v3/replica-set/MultiMachineProfile.vue +0 -100
- package/vue-components/v3/replica-set/UpgradeSet.vue +0 -40
- package/vue-components/v3/scaling-rules/ScalingRules.vue +0 -93
- package/vue-components/v3/threshold/UsageThreshold.vue +0 -24
- package/vue-components/v3/time/AcDuration.vue +0 -167
- package/vue-components/v3/time/AcDurationNew.vue +0 -235
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { onMounted, onBeforeUnmount } from "vue";
|
|
3
|
-
|
|
4
|
-
function useDraggable(selector) {
|
|
5
|
-
let isDragging = false;
|
|
6
|
-
let startY = 0;
|
|
7
|
-
let scrollTop = 0;
|
|
8
|
-
|
|
9
|
-
const onMouseMove = (e) => {
|
|
10
|
-
if (!isDragging) return;
|
|
11
|
-
const y = e.pageY;
|
|
12
|
-
const walk = y - startY;
|
|
13
|
-
el.scrollTop = scrollTop - walk;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const onTouchMove = (e) => {
|
|
17
|
-
if (!isDragging) return;
|
|
18
|
-
const y = e.touches[0].pageY;
|
|
19
|
-
const walk = y - startY;
|
|
20
|
-
el.scrollTop = scrollTop - walk;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const stopDrag = () => (isDragging = false);
|
|
24
|
-
|
|
25
|
-
let el;
|
|
26
|
-
|
|
27
|
-
onMounted(() => {
|
|
28
|
-
el = document.querySelector(selector);
|
|
29
|
-
if (!el) return;
|
|
30
|
-
|
|
31
|
-
const startDragMouse = (e) => {
|
|
32
|
-
isDragging = true;
|
|
33
|
-
startY = e.pageY;
|
|
34
|
-
scrollTop = el.scrollTop;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const startDragTouch = (e) => {
|
|
38
|
-
isDragging = true;
|
|
39
|
-
startY = e.touches[0].pageY;
|
|
40
|
-
scrollTop = el.scrollTop;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
el.addEventListener("mousedown", startDragMouse);
|
|
44
|
-
el.addEventListener("touchstart", startDragTouch);
|
|
45
|
-
window.addEventListener("mousemove", onMouseMove);
|
|
46
|
-
window.addEventListener("mouseup", stopDrag);
|
|
47
|
-
window.addEventListener("touchmove", onTouchMove, { passive: false });
|
|
48
|
-
window.addEventListener("touchend", stopDrag);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
onBeforeUnmount(() => {
|
|
52
|
-
window.removeEventListener("mousemove", onMouseMove);
|
|
53
|
-
window.removeEventListener("mouseup", stopDrag);
|
|
54
|
-
window.removeEventListener("touchmove", onTouchMove);
|
|
55
|
-
window.removeEventListener("touchend", stopDrag);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
useDraggable(".picker-day");
|
|
60
|
-
useDraggable(".picker-hour");
|
|
61
|
-
useDraggable(".picker-minute");
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<template>
|
|
65
|
-
<div class="picker-wrapper">
|
|
66
|
-
<div class="duration-header"><h6>Duration ( 1day 06h 9min )</h6></div>
|
|
67
|
-
<div class="d-title">
|
|
68
|
-
<span>DAY</span>
|
|
69
|
-
<span>HOUR</span>
|
|
70
|
-
<span>MINUTE</span>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="picker">
|
|
73
|
-
<div class="picker-window"></div>
|
|
74
|
-
<!-- <div class="triangle"></div> -->
|
|
75
|
-
|
|
76
|
-
<ul class="picker-day">
|
|
77
|
-
<li v-for="i in 30" :key="i">{{ i }}</li>
|
|
78
|
-
</ul>
|
|
79
|
-
<ul class="picker-hour">
|
|
80
|
-
<li v-for="i in 24" :key="i">{{ i }}</li>
|
|
81
|
-
</ul>
|
|
82
|
-
<ul class="picker-minute">
|
|
83
|
-
<li v-for="i in 60" :key="i">{{ i }}</li>
|
|
84
|
-
</ul>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="duration-footer is-flex is-justify-content-flex-end pr-8 pb-8">
|
|
87
|
-
<div class="buttons">
|
|
88
|
-
<button class="button ac-button is-small is-outlined" @click="showDuration = false">Cancel</button>
|
|
89
|
-
<button class="button ac-button is-small is-outlined">Ok</button>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
94
|
-
<style lang="scss" scoped>
|
|
95
|
-
/* ========== Variables ========== */
|
|
96
|
-
$cool-gray: #eff1f1;
|
|
97
|
-
$secondary-light-gray: #f7f9fa;
|
|
98
|
-
$scroll-highlight: darken($cool-gray, 10);
|
|
99
|
-
|
|
100
|
-
/* ========== Mixins ========== */
|
|
101
|
-
@mixin hide-scrollbars {
|
|
102
|
-
-ms-overflow-style: none; // IE 10+
|
|
103
|
-
scrollbar-width: none; // Firefox
|
|
104
|
-
&::-webkit-scrollbar {
|
|
105
|
-
display: none;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* ========== Container ========== */
|
|
110
|
-
.picker-wrapper {
|
|
111
|
-
background: white;
|
|
112
|
-
box-shadow: 0 0.5vw 2vw -5px rgba(0, 0, 0, 0.2);
|
|
113
|
-
display: inline-flex;
|
|
114
|
-
flex-direction: column;
|
|
115
|
-
border-radius: 8px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* ========== Header ========== */
|
|
119
|
-
.duration-header {
|
|
120
|
-
background-color: $secondary-light-gray;
|
|
121
|
-
text-align: center;
|
|
122
|
-
height: 36px;
|
|
123
|
-
display: flex;
|
|
124
|
-
align-items: center;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
|
|
127
|
-
h6 {
|
|
128
|
-
font-size: 13px;
|
|
129
|
-
margin: 0;
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* ========== Title Labels ========== */
|
|
135
|
-
.d-title {
|
|
136
|
-
display: inline-grid;
|
|
137
|
-
grid-template-columns: repeat(3, fit-content(100px));
|
|
138
|
-
justify-content: end;
|
|
139
|
-
gap: 0.5em;
|
|
140
|
-
font-weight: bold;
|
|
141
|
-
font-size: 11px;
|
|
142
|
-
padding: 8px 1rem 0;
|
|
143
|
-
|
|
144
|
-
span {
|
|
145
|
-
width: 40px;
|
|
146
|
-
text-align: center;
|
|
147
|
-
margin-right: 1em;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/* ========== Picker Section ========== */
|
|
152
|
-
.picker {
|
|
153
|
-
position: relative;
|
|
154
|
-
display: inline-grid;
|
|
155
|
-
grid-template-columns: repeat(3, fit-content(80px));
|
|
156
|
-
justify-content: end;
|
|
157
|
-
padding: 0 1rem;
|
|
158
|
-
font-size: 13px;
|
|
159
|
-
font-weight: 500;
|
|
160
|
-
font-feature-settings: "tnum";
|
|
161
|
-
|
|
162
|
-
&::before,
|
|
163
|
-
&::after {
|
|
164
|
-
content: "";
|
|
165
|
-
position: absolute;
|
|
166
|
-
width: 100%;
|
|
167
|
-
pointer-events: none;
|
|
168
|
-
z-index: 1;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&::before {
|
|
172
|
-
top: 0;
|
|
173
|
-
height: 50%;
|
|
174
|
-
background: linear-gradient(white, rgba(255, 255, 255, 0));
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&::after {
|
|
178
|
-
bottom: 0;
|
|
179
|
-
height: 50%;
|
|
180
|
-
background: linear-gradient(rgba(255, 255, 255, 0), white);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
ul {
|
|
184
|
-
@include hide-scrollbars();
|
|
185
|
-
max-height: 190px;
|
|
186
|
-
overflow-y: scroll;
|
|
187
|
-
padding: 1.5em 0;
|
|
188
|
-
margin-right: 1em;
|
|
189
|
-
scroll-snap-type: y mandatory;
|
|
190
|
-
scroll-behavior: smooth;
|
|
191
|
-
|
|
192
|
-
li {
|
|
193
|
-
scroll-snap-align: center;
|
|
194
|
-
height: 2.35em;
|
|
195
|
-
width: 40px;
|
|
196
|
-
text-align: center;
|
|
197
|
-
user-select: none;
|
|
198
|
-
cursor: pointer;
|
|
199
|
-
line-height: 2.35em;
|
|
200
|
-
border-radius: 4px;
|
|
201
|
-
|
|
202
|
-
&:hover {
|
|
203
|
-
background: #f0f0f0;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/* ========== Highlight Window ========== */
|
|
210
|
-
.picker-window {
|
|
211
|
-
position: absolute;
|
|
212
|
-
top: 50%;
|
|
213
|
-
left: 0;
|
|
214
|
-
width: 100%;
|
|
215
|
-
height: 2.4em;
|
|
216
|
-
transform: translateY(-52%);
|
|
217
|
-
border-top: 1px solid $scroll-highlight;
|
|
218
|
-
border-bottom: 1px solid $scroll-highlight;
|
|
219
|
-
pointer-events: none;
|
|
220
|
-
z-index: 2;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/* ========== Footer Buttons ========== */
|
|
224
|
-
.duration-footer {
|
|
225
|
-
padding: 0 1rem 1rem;
|
|
226
|
-
display: flex;
|
|
227
|
-
justify-content: flex-end;
|
|
228
|
-
gap: 0.5rem;
|
|
229
|
-
|
|
230
|
-
.buttons {
|
|
231
|
-
display: flex;
|
|
232
|
-
gap: 0.5rem;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
</style>
|