@appscode/design-system 2.4.2 → 2.4.4-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 +2 -2
- package/package.json +1 -1
- package/vue-components/styles/components/form-fields/_check-radio-switch.scss +62 -46
- package/vue-components/styles/components/form-fields/_custom-selectbox.scss +1 -27
- package/vue-components/styles/components/form-fields/_input.scss +1 -1
- package/vue-components/v3/form-fields/CheckBox.vue +7 -11
- package/vue-components/v3/form-fields/CheckRadio.vue +2 -3
- package/vue-components/v3/form-fields/CustomSelect.vue +1 -7
- package/vue-components/v3/form-fields/Switch.vue +14 -10
package/main.scss
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
// Third party CSS
|
|
6
6
|
@import "../node_modules/bulma/bulma.sass";
|
|
7
|
-
@import "bulma-checkradio";
|
|
8
|
-
@import "bulma-switch";
|
|
7
|
+
// @import "bulma-checkradio";
|
|
8
|
+
// @import "bulma-switch";
|
|
9
9
|
@import "bulma-tooltip";
|
|
10
10
|
@import "font-awesome/css/font-awesome.min.css";
|
|
11
11
|
@import "vue-multiselect/dist/vue-multiselect.css";
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
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
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.is-checkradio[type="checkbox"] + label::after,
|
|
9
|
-
.is-checkradio[type="checkbox"] + label:after {
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.is-checkradio[type="checkbox"]:checked + label::before,
|
|
14
|
-
.is-checkradio[type="checkbox"]:checked + label:before {
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.is-checkradio.is-primary[type="radio"] + label::after,
|
|
19
|
-
.is-checkradio.is-primary[type="radio"] + label:after {
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.is-checkradio.is-primary[type="checkbox"]:checked + label::before,
|
|
24
|
-
.is-checkradio.is-primary[type="checkbox"]:checked + label:before,
|
|
25
|
-
.is-checkradio.is-primary[type="radio"]:checked + label::before,
|
|
26
|
-
.is-checkradio.is-primary[type="radio"]:checked + label:before {
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.is-checkradio[type="radio"].is-primary:checked + label::after,
|
|
31
|
-
.is-checkradio[type="radio"].is-primary:checked + label:after {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.switch[type="checkbox"].is-primary:checked + label::before,
|
|
37
|
-
.switch[type="checkbox"].is-primary:checked + label:before {
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.is-checkradio[type="radio"] + label::after,
|
|
42
|
-
.is-checkradio[type="radio"] + label:after {
|
|
43
|
-
|
|
44
|
-
}
|
|
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[type="checkbox"] + label::after,
|
|
9
|
+
// .is-checkradio[type="checkbox"] + label:after {
|
|
10
|
+
// border-color: $ac-primary;
|
|
11
|
+
// }
|
|
12
|
+
|
|
13
|
+
// .is-checkradio[type="checkbox"]:checked + label::before,
|
|
14
|
+
// .is-checkradio[type="checkbox"]:checked + label:before {
|
|
15
|
+
// border: 1px solid $ac-primary;
|
|
16
|
+
// }
|
|
17
|
+
|
|
18
|
+
// .is-checkradio.is-primary[type="radio"] + label::after,
|
|
19
|
+
// .is-checkradio.is-primary[type="radio"] + label:after {
|
|
20
|
+
// background: $ac-primary !important;
|
|
21
|
+
// }
|
|
22
|
+
|
|
23
|
+
// .is-checkradio.is-primary[type="checkbox"]:checked + label::before,
|
|
24
|
+
// .is-checkradio.is-primary[type="checkbox"]:checked + label:before,
|
|
25
|
+
// .is-checkradio.is-primary[type="radio"]:checked + label::before,
|
|
26
|
+
// .is-checkradio.is-primary[type="radio"]:checked + label:before {
|
|
27
|
+
// border-color: $ac-primary;
|
|
28
|
+
// }
|
|
29
|
+
|
|
30
|
+
// .is-checkradio[type="radio"].is-primary:checked + label::after,
|
|
31
|
+
// .is-checkradio[type="radio"].is-primary:checked + label:after {
|
|
32
|
+
// background-color: $ac-primary !important;
|
|
33
|
+
// border-color: $ac-primary;
|
|
34
|
+
// }
|
|
35
|
+
|
|
36
|
+
// .switch[type="checkbox"].is-primary:checked + label::before,
|
|
37
|
+
// .switch[type="checkbox"].is-primary:checked + label:before {
|
|
38
|
+
// background-color: $ac-primary;
|
|
39
|
+
// }
|
|
40
|
+
|
|
41
|
+
// .is-checkradio[type="radio"] + label::after,
|
|
42
|
+
// .is-checkradio[type="radio"] + label:after {
|
|
43
|
+
// background-color: $ac-primary;
|
|
44
|
+
// }
|
|
45
45
|
|
|
46
46
|
// 2024 AppsCode Custom Checkbox, Radio, Switch style
|
|
47
47
|
// checkbox
|
|
@@ -98,6 +98,11 @@
|
|
|
98
98
|
transition: all 0.2s ease;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
&:hover {
|
|
102
|
+
.checkmark {
|
|
103
|
+
border: 1px solid $ac-primary;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
// radio button
|
|
@@ -131,6 +136,7 @@
|
|
|
131
136
|
border: 1px solid $color-border-dark;
|
|
132
137
|
border-radius: 50%; // Full circle
|
|
133
138
|
background: #fff;
|
|
139
|
+
transition: 0.2s ease-in-out;
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
// Inner dot for selected radio button
|
|
@@ -156,6 +162,16 @@
|
|
|
156
162
|
opacity: 1;
|
|
157
163
|
transform: scale(1);
|
|
158
164
|
}
|
|
165
|
+
[type="radio"]:checked + label::before {
|
|
166
|
+
border: 1px solid $ac-primary;
|
|
167
|
+
}
|
|
168
|
+
&:hover {
|
|
169
|
+
[type="radio"] + label {
|
|
170
|
+
&::before {
|
|
171
|
+
border: 1px solid $ac-primary;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
159
175
|
}
|
|
160
176
|
|
|
161
177
|
.ac-switch {
|
|
@@ -208,7 +224,7 @@
|
|
|
208
224
|
}
|
|
209
225
|
|
|
210
226
|
input:checked + .slider {
|
|
211
|
-
background-color:
|
|
227
|
+
background-color: $ac-primary;
|
|
212
228
|
}
|
|
213
229
|
|
|
214
230
|
input:checked + .slider:before {
|
|
@@ -216,7 +232,7 @@
|
|
|
216
232
|
}
|
|
217
233
|
|
|
218
234
|
input:focus-visible + .slider {
|
|
219
|
-
box-shadow: 0 0 3px
|
|
235
|
+
box-shadow: 0 0 3px $ac-primary;
|
|
220
236
|
}
|
|
221
237
|
}
|
|
222
238
|
}
|
|
@@ -6,32 +6,7 @@
|
|
|
6
6
|
padding-right: 32px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.custom-select-placeholder {
|
|
10
|
-
border: 1px solid $color-border-dark;
|
|
11
|
-
padding: 8px 15px;
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
line-height: 1;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
height: 36px;
|
|
18
|
-
|
|
19
|
-
&:hover {
|
|
20
|
-
border: 1px solid $ac-primary;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
9
|
&.is-extra-small {
|
|
25
|
-
height: 32px;
|
|
26
|
-
|
|
27
|
-
.custom-select-placeholder {
|
|
28
|
-
height: 32px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.ac-field {
|
|
32
|
-
top: 5px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
10
|
.buttons {
|
|
36
11
|
.button {
|
|
37
12
|
height: 28px;
|
|
@@ -59,7 +34,6 @@
|
|
|
59
34
|
right: 2px;
|
|
60
35
|
top: 2px;
|
|
61
36
|
margin: 0;
|
|
62
|
-
z-index: 9;
|
|
63
37
|
|
|
64
38
|
.button {
|
|
65
39
|
margin: 0 !important;
|
|
@@ -80,7 +54,7 @@
|
|
|
80
54
|
width: 100%;
|
|
81
55
|
max-height: 500px;
|
|
82
56
|
overflow-y: auto;
|
|
83
|
-
transition: 0.
|
|
57
|
+
transition: 0.3s ease-in-out;
|
|
84
58
|
opacity: 0;
|
|
85
59
|
visibility: hidden;
|
|
86
60
|
|
|
@@ -19,18 +19,14 @@ const model = defineModel({ type: Array });
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<template>
|
|
22
|
-
<div v-for="option in options" :key="name + option.label" class="
|
|
23
|
-
<
|
|
24
|
-
class="
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
type="checkbox"
|
|
29
|
-
v-model="model"
|
|
30
|
-
/>
|
|
31
|
-
<label :for="name + option.label">{{ option.label }}</label>
|
|
22
|
+
<div v-for="option in options" :key="name + option.label" class="mb-8">
|
|
23
|
+
<label class="ac-checkbox" :for="name + option.label">
|
|
24
|
+
<input :class="modifierClasses" :id="name + option.label" :value="option.value" type="checkbox" v-model="model" />
|
|
25
|
+
<span class="checkmark"></span>
|
|
26
|
+
<span>{{ option.label }}</span>
|
|
27
|
+
</label>
|
|
32
28
|
</div>
|
|
33
|
-
<p v-show="errorMsg" class="is-danger">
|
|
29
|
+
<p v-show="errorMsg" class="is-danger mb-16">
|
|
34
30
|
{{ errorMsg }}
|
|
35
31
|
</p>
|
|
36
32
|
</template>
|
|
@@ -18,10 +18,9 @@ const model = defineModel();
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<div v-for="option in options" :key="name + option.label"
|
|
21
|
+
<div class="ac-radio" v-for="option in options" :key="name + option.label">
|
|
22
22
|
<input
|
|
23
23
|
v-model="model"
|
|
24
|
-
class="is-checkradio"
|
|
25
24
|
:class="modifierClasses"
|
|
26
25
|
:id="name + option.label"
|
|
27
26
|
type="radio"
|
|
@@ -34,7 +33,7 @@ const model = defineModel();
|
|
|
34
33
|
<slot name="message" />
|
|
35
34
|
</p>
|
|
36
35
|
</div>
|
|
37
|
-
<p v-show="errorMsg" class="is-danger">
|
|
36
|
+
<p v-show="errorMsg" class="is-danger mb-16">
|
|
38
37
|
{{ errorMsg }}
|
|
39
38
|
</p>
|
|
40
39
|
</template>
|
|
@@ -27,13 +27,7 @@ const CloseIcon = defineAsyncComponent(() => import("../icons/CloseIcon.vue"));
|
|
|
27
27
|
<div class="ac-single-input is-small is-selectbox" :class="[isOpen ? 'is-open' : '']" style="z-index: 2">
|
|
28
28
|
<!-- add 'show-label' class for move top -->
|
|
29
29
|
<label for="custom-select" class="ac-label show-label">Select Option</label>
|
|
30
|
-
|
|
31
|
-
<!-- <input type="text" value="Select" /> -->
|
|
32
|
-
<p class="custom-select-placeholder">
|
|
33
|
-
<span class="is-ellipsis-1">
|
|
34
|
-
Select Value Select ValueSelect ValueSelect ValueSelect ValueSelect ValueSelect Value
|
|
35
|
-
</span>
|
|
36
|
-
</p>
|
|
30
|
+
<input type="text" value="Select" />
|
|
37
31
|
|
|
38
32
|
<div v-if="multiselect" class="ac-field field is-grouped is-clipped">
|
|
39
33
|
<div class="control">
|
|
@@ -18,17 +18,21 @@ const model = defineModel({ type: Boolean });
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<div class="
|
|
22
|
-
<input
|
|
23
|
-
v-model="model"
|
|
24
|
-
:id="name"
|
|
25
|
-
type="checkbox"
|
|
26
|
-
:name="name"
|
|
27
|
-
class="switch is-rounded is-primary"
|
|
28
|
-
:class="modifierClasses"
|
|
29
|
-
:data-testid="dataTestId"
|
|
30
|
-
/>
|
|
21
|
+
<div class="ac-switch is-flex is-align-items-center gap-8">
|
|
31
22
|
<label :for="name">{{ label }}</label>
|
|
23
|
+
<label class="switch">
|
|
24
|
+
<input
|
|
25
|
+
v-model="model"
|
|
26
|
+
:id="name"
|
|
27
|
+
type="checkbox"
|
|
28
|
+
:name="name"
|
|
29
|
+
class="switch is-rounded is-primary"
|
|
30
|
+
:class="modifierClasses"
|
|
31
|
+
:data-testid="dataTestId"
|
|
32
|
+
/>
|
|
33
|
+
<span class="slider round"></span>
|
|
34
|
+
</label>
|
|
35
|
+
|
|
32
36
|
<p v-show="errorMsg" class="is-danger">
|
|
33
37
|
{{ errorMsg }}
|
|
34
38
|
</p>
|