@appscode/design-system 2.0.62 → 2.0.64
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/package.json +1 -1
- package/vue-components/styles/components/_avatar.scss +37 -0
- package/vue-components/styles/components/_table.scss +2 -2
- package/vue-components/styles/components/form-fields/_check-radio-switch.scss +28 -0
- package/vue-components/v3/avatar/Avatar.vue +2 -39
- package/vue-components/v3/form-fields/CheckRadio.vue +2 -7
- package/vue-components/v3/form-fields/Switch.vue +31 -0
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.avatar {
|
|
2
|
+
position: relative;
|
|
3
|
+
z-index: 1;
|
|
4
|
+
|
|
5
|
+
.dots {
|
|
6
|
+
position: absolute;
|
|
7
|
+
right: calc(5% - 6px);
|
|
8
|
+
top: calc(30% - 6px);
|
|
9
|
+
width: 12px;
|
|
10
|
+
height: 12px;
|
|
11
|
+
background-color: $info;
|
|
12
|
+
border-radius: 50%;
|
|
13
|
+
border: 2px solid $white-100;
|
|
14
|
+
box-shadow: 2px 2px 2px rgba(5, 5, 5, 0.16);
|
|
15
|
+
z-index: 2;
|
|
16
|
+
&.is-not-active {
|
|
17
|
+
background-color: $gray-60;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.is-initial {
|
|
21
|
+
position: relative;
|
|
22
|
+
z-index: 1;
|
|
23
|
+
background-color: $gray-90;
|
|
24
|
+
height: 100%;
|
|
25
|
+
width: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
font-weight: 500;
|
|
31
|
+
color: $color-heading;
|
|
32
|
+
border: 1px solid $color-border;
|
|
33
|
+
&.is-rounded {
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
|
|
16
16
|
/* Handle */
|
|
17
17
|
&::-webkit-scrollbar-thumb {
|
|
18
|
-
background-color: $gray-
|
|
18
|
+
background-color: $gray-70;
|
|
19
19
|
border-radius: 10px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/* Handle on hover */
|
|
23
23
|
&::-webkit-scrollbar-thumb:hover {
|
|
24
|
-
background-color: $
|
|
24
|
+
background-color: $gray-60;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.is-checkradio.is-primary[type="checkbox"].is-primary:checked.has-background-color + label::before,
|
|
2
|
+
.is-checkradio.is-primary[type="checkbox"].is-primary:checked.has-background-color + label:before,
|
|
3
|
+
.is-checkradio.is-primary[type="checkbox"].is-primary:checked.has-background-color + label::after,
|
|
4
|
+
.is-checkradio.is-primary[type="checkbox"].is-primary:checked.has-background-color + label:after {
|
|
5
|
+
background-color: $ac-primary !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.is-checkradio.is-primary[type="radio"] + label::after,
|
|
9
|
+
.is-checkradio.is-primary[type="radio"] + label:after {
|
|
10
|
+
background: $ac-primary !important;
|
|
11
|
+
}
|
|
12
|
+
.is-checkradio.is-primary[type="checkbox"]:checked + label::before,
|
|
13
|
+
.is-checkradio.is-primary[type="checkbox"]:checked + label:before,
|
|
14
|
+
.is-checkradio.is-primary[type="radio"]:checked + label::before,
|
|
15
|
+
.is-checkradio.is-primary[type="radio"]:checked + label:before {
|
|
16
|
+
border-color: $ac-primary;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.is-checkradio[type="radio"].is-primary:checked + label::after,
|
|
20
|
+
.is-checkradio[type="radio"].is-primary:checked + label:after {
|
|
21
|
+
background-color: $ac-primary !important;
|
|
22
|
+
border-color: $ac-primary;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.switch[type="checkbox"].is-primary:checked + label::before,
|
|
26
|
+
.switch[type="checkbox"].is-primary:checked + label:before {
|
|
27
|
+
background-color: $ac-primary;
|
|
28
|
+
}
|
|
@@ -21,49 +21,12 @@ withDefaults(defineProps<Props>(), {
|
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
|
-
<figure class="image" :class="`is-${size}`">
|
|
24
|
+
<figure class="avatar image" :class="`is-${size}`">
|
|
25
25
|
<span v-if="dots" class="dots" :class="dotBgColor"></span>
|
|
26
26
|
<div v-if="isInitial" class="is-initial" :class="[rounded ? 'is-rounded' : '', roundedClass]">jd</div>
|
|
27
27
|
<img v-else :class="[rounded ? 'is-rounded' : '', roundedClass]" :src="imgUrl" alt="avatar-image" />
|
|
28
28
|
</figure>
|
|
29
29
|
</template>
|
|
30
|
-
|
|
31
30
|
<style lang="scss">
|
|
32
|
-
|
|
33
|
-
position: relative;
|
|
34
|
-
z-index: 1;
|
|
35
|
-
|
|
36
|
-
.dots {
|
|
37
|
-
position: absolute;
|
|
38
|
-
right: calc(5% - 6px);
|
|
39
|
-
top: calc(30% - 6px);
|
|
40
|
-
width: 12px;
|
|
41
|
-
height: 12px;
|
|
42
|
-
background-color: $info;
|
|
43
|
-
border-radius: 50%;
|
|
44
|
-
border: 2px solid $white-100;
|
|
45
|
-
box-shadow: 2px 2px 2px rgba(5, 5, 5, 0.16);
|
|
46
|
-
z-index: 2;
|
|
47
|
-
&.is-not-active {
|
|
48
|
-
background-color: $gray-60;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.is-initial {
|
|
52
|
-
position: relative;
|
|
53
|
-
z-index: 1;
|
|
54
|
-
background-color: $gray-90;
|
|
55
|
-
height: 100%;
|
|
56
|
-
width: 100%;
|
|
57
|
-
display: flex;
|
|
58
|
-
align-items: center;
|
|
59
|
-
justify-content: center;
|
|
60
|
-
font-size: 16px;
|
|
61
|
-
font-weight: 500;
|
|
62
|
-
color: $color-heading;
|
|
63
|
-
border: 1px solid $color-border;
|
|
64
|
-
&.is-rounded {
|
|
65
|
-
border-radius: 50%;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
31
|
+
@import "../../../vue-components/styles/components/_avatar.scss";
|
|
69
32
|
</style>
|
|
@@ -10,7 +10,7 @@ interface Props {
|
|
|
10
10
|
withDefaults(defineProps<Props>(), {
|
|
11
11
|
modifierClasses: "",
|
|
12
12
|
name: "checkbox",
|
|
13
|
-
label: "
|
|
13
|
+
label: "Check Radio",
|
|
14
14
|
type: "checkbox",
|
|
15
15
|
check: false,
|
|
16
16
|
});
|
|
@@ -31,10 +31,5 @@ withDefaults(defineProps<Props>(), {
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<style lang="scss">
|
|
34
|
-
|
|
35
|
-
.is-checkradio[type="checkbox"].is-primary:checked.has-background-color + label:before,
|
|
36
|
-
.is-checkradio[type="checkbox"].is-primary:checked.has-background-color + label::after,
|
|
37
|
-
.is-checkradio[type="checkbox"].is-primary:checked.has-background-color + label:after {
|
|
38
|
-
background-color: $ac-primary !important;
|
|
39
|
-
}
|
|
34
|
+
@import "../../../vue-components/styles/components/form-fields/_check-radio-switch.scss";
|
|
40
35
|
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
modifierClasses?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
check?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
withDefaults(defineProps<Props>(), {
|
|
11
|
+
modifierClasses: "",
|
|
12
|
+
name: "switch",
|
|
13
|
+
label: "Switch Label",
|
|
14
|
+
type: "checkbox",
|
|
15
|
+
check: false,
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div class="field">
|
|
21
|
+
<input
|
|
22
|
+
:id="name"
|
|
23
|
+
type="checkbox"
|
|
24
|
+
:name="name"
|
|
25
|
+
class="switch is-rounded"
|
|
26
|
+
:class="modifierClasses"
|
|
27
|
+
:checked="check"
|
|
28
|
+
/>
|
|
29
|
+
<label :for="name">{{ label }}</label>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|