srcdev-nuxt-forms 2.1.8 → 2.1.10
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/assets/styles/forms/themes/_error.css +11 -7
- package/assets/styles/forms/themes/_ghost.css +22 -15
- package/assets/styles/forms/themes/_primary.css +6 -0
- package/assets/styles/forms/themes/_secondary.css +11 -4
- package/assets/styles/forms/themes/_success.css +11 -4
- package/assets/styles/forms/themes/_tertiary.css +10 -3
- package/assets/styles/forms/themes/_warning.css +11 -4
- package/components/forms/input-checkbox/InputCheckboxCore.vue +17 -6
- package/components/forms/input-checkbox/variants/MultipleCheckboxes.vue +1 -1
- package/components/forms/input-number/variants/InputNumberDefault.vue +2 -2
- package/components/forms/input-radio/InputRadiobuttonCore.vue +21 -7
- package/components/forms/input-radio/variants/MultipleRadiobuttons.vue +1 -1
- package/components/forms/input-range/InputRangeCore.vue +41 -2
- package/components/forms/input-range/variants/InputRangeDefault.vue +2 -2
- package/components/forms/input-text/variants/material/InputTextAsNumberWithLabel.vue +2 -2
- package/package.json +1 -1
|
@@ -8,17 +8,24 @@
|
|
|
8
8
|
--theme-form-input-outline-active: var(--red-6);
|
|
9
9
|
--theme-form-input-outline-focus: var(--red-6);
|
|
10
10
|
--theme-form-input-text: light-dark(var(--gray-10), var(--gray-11));
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--red-12), var(--red-2));
|
|
12
13
|
|
|
13
14
|
--theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
15
|
+
--theme-form-checkbox-border: light-dark(var(--red-12), var(--red-12));
|
|
16
|
+
--theme-form-checkbox-outline: light-dark(var(--red-1), var(--red-1));
|
|
14
17
|
--theme-form-checkbox-shadow: transparent;
|
|
15
18
|
--theme-form-checkbox-shadow-focus: var(--red-6);
|
|
16
|
-
--theme-form-checkbox-symbol: var(--red-
|
|
19
|
+
--theme-form-checkbox-symbol: var(--red-12);
|
|
17
20
|
|
|
18
21
|
--theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
22
|
+
--theme-form-radio-border: light-dark(var(--red-12), var(--red-12));
|
|
23
|
+
--theme-form-radio-outline: light-dark(var(--red-1), var(--red-1));
|
|
19
24
|
--theme-form-radio-shadow: transparent;
|
|
20
25
|
--theme-form-radio-shadow-focus: var(--red-6);
|
|
21
|
-
--theme-form-radio-symbol: var(--red-
|
|
26
|
+
--theme-form-radio-symbol: var(--red-12);
|
|
27
|
+
|
|
28
|
+
--theme-form-range-accent-color: light-dark(var(--red-12), var(--red-3));
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
[data-btn-theme='error'] {
|
|
@@ -37,9 +44,6 @@
|
|
|
37
44
|
--theme-btn-outline-focus: var(--red-0);
|
|
38
45
|
--theme-btn-text-focus: var(--red-12);
|
|
39
46
|
|
|
40
|
-
--theme-form-focus-box-shadow: 1px 1px 8px 1px var(--red-12);
|
|
47
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--red-12), var(--red-2));
|
|
41
48
|
}
|
|
42
|
-
|
|
43
|
-
--theme-error-surface: var(--red-12);
|
|
44
|
-
--theme-error-text: var(--red-0);
|
|
45
49
|
}
|
|
@@ -8,35 +8,42 @@
|
|
|
8
8
|
--theme-form-input-outline-active: var(--gray-6);
|
|
9
9
|
--theme-form-input-outline-focus: var(--gray-6);
|
|
10
10
|
--theme-form-input-text: light-dark(var(--gray-10), var(--gray-11));
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--gray-12), var(--gray-2));
|
|
12
13
|
|
|
13
14
|
--theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
15
|
+
--theme-form-checkbox-border: light-dark(var(--gray-12), var(--gray-12));
|
|
16
|
+
--theme-form-checkbox-outline: light-dark(var(--gray-1), var(--gray-1));
|
|
14
17
|
--theme-form-checkbox-shadow: transparent;
|
|
15
18
|
--theme-form-checkbox-shadow-focus: var(--gray-6);
|
|
16
|
-
--theme-form-checkbox-symbol: var(--gray-
|
|
19
|
+
--theme-form-checkbox-symbol: var(--gray-12);
|
|
17
20
|
|
|
18
21
|
--theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
22
|
+
--theme-form-radio-border: light-dark(var(--gray-12), var(--gray-12));
|
|
23
|
+
--theme-form-radio-outline: light-dark(var(--gray-1), var(--gray-1));
|
|
19
24
|
--theme-form-radio-shadow: transparent;
|
|
20
25
|
--theme-form-radio-shadow-focus: var(--gray-6);
|
|
21
|
-
--theme-form-radio-symbol: var(--gray-
|
|
26
|
+
--theme-form-radio-symbol: var(--gray-12);
|
|
27
|
+
|
|
28
|
+
--theme-form-range-accent-color: light-dark(var(--gray-12), var(--gray-3));
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
[data-btn-theme='ghost'] {
|
|
25
|
-
--theme-btn-bg: var(--gray-
|
|
26
|
-
--theme-btn-border:
|
|
27
|
-
--theme-btn-outline:
|
|
28
|
-
--theme-btn-text: var(--gray-
|
|
29
|
-
|
|
30
|
-
--theme-btn-bg-hover: var(--gray-
|
|
31
|
-
--theme-btn-border-hover:
|
|
32
|
-
--theme-btn-outline-hover:
|
|
32
|
+
--theme-btn-bg: var(--gray-12);
|
|
33
|
+
--theme-btn-border: var(--gray-0);
|
|
34
|
+
--theme-btn-outline: var(--gray-12);
|
|
35
|
+
--theme-btn-text: var(--gray-0);
|
|
36
|
+
|
|
37
|
+
--theme-btn-bg-hover: var(--gray-0);
|
|
38
|
+
--theme-btn-border-hover: var(--gray-12);
|
|
39
|
+
--theme-btn-outline-hover: var(--gray-0);
|
|
33
40
|
--theme-btn-text-hover: var(--gray-12);
|
|
34
41
|
|
|
35
|
-
--theme-btn-bg-focus: var(--gray-
|
|
36
|
-
--theme-btn-border-focus:
|
|
37
|
-
--theme-btn-outline-focus:
|
|
42
|
+
--theme-btn-bg-focus: var(--gray-0);
|
|
43
|
+
--theme-btn-border-focus: var(--gray-12);
|
|
44
|
+
--theme-btn-outline-focus: var(--gray-0);
|
|
38
45
|
--theme-btn-text-focus: var(--gray-12);
|
|
39
46
|
|
|
40
|
-
--theme-form-focus-box-shadow: 1px 1px 8px 1px var(--gray-
|
|
47
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--gray-12), var(--gray-2));
|
|
41
48
|
}
|
|
42
49
|
}
|
|
@@ -12,14 +12,20 @@
|
|
|
12
12
|
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--blue-12), var(--blue-2));
|
|
13
13
|
|
|
14
14
|
--theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
15
|
+
--theme-form-checkbox-border: light-dark(var(--blue-12), var(--blue-12));
|
|
16
|
+
--theme-form-checkbox-outline: light-dark(var(--blue-1), var(--blue-1));
|
|
15
17
|
--theme-form-checkbox-shadow: transparent;
|
|
16
18
|
--theme-form-checkbox-shadow-focus: var(--blue-6);
|
|
17
19
|
--theme-form-checkbox-symbol: var(--blue-12);
|
|
18
20
|
|
|
19
21
|
--theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
22
|
+
--theme-form-radio-border: light-dark(var(--blue-12), var(--blue-12));
|
|
23
|
+
--theme-form-radio-outline: light-dark(var(--blue-1), var(--blue-1));
|
|
20
24
|
--theme-form-radio-shadow: transparent;
|
|
21
25
|
--theme-form-radio-shadow-focus: var(--blue-6);
|
|
22
26
|
--theme-form-radio-symbol: var(--blue-12);
|
|
27
|
+
|
|
28
|
+
--theme-form-range-accent-color: light-dark(var(--blue-12), var(--blue-3));
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
[data-btn-theme='primary'] {
|
|
@@ -8,17 +8,24 @@
|
|
|
8
8
|
--theme-form-input-outline-active: var(--gray-6);
|
|
9
9
|
--theme-form-input-outline-focus: var(--gray-6);
|
|
10
10
|
--theme-form-input-text: light-dark(var(--gray-10), var(--gray-11));
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--gray-12), var(--gray-2));
|
|
12
13
|
|
|
13
14
|
--theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
15
|
+
--theme-form-checkbox-border: light-dark(var(--gray-12), var(--gray-12));
|
|
16
|
+
--theme-form-checkbox-outline: light-dark(var(--gray-1), var(--gray-1));
|
|
14
17
|
--theme-form-checkbox-shadow: transparent;
|
|
15
18
|
--theme-form-checkbox-shadow-focus: var(--gray-6);
|
|
16
|
-
--theme-form-checkbox-symbol: var(--gray-
|
|
19
|
+
--theme-form-checkbox-symbol: var(--gray-12);
|
|
17
20
|
|
|
18
21
|
--theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
22
|
+
--theme-form-radio-border: light-dark(var(--gray-12), var(--gray-12));
|
|
23
|
+
--theme-form-radio-outline: light-dark(var(--gray-1), var(--gray-1));
|
|
19
24
|
--theme-form-radio-shadow: transparent;
|
|
20
25
|
--theme-form-radio-shadow-focus: var(--gray-6);
|
|
21
|
-
--theme-form-radio-symbol: var(--gray-
|
|
26
|
+
--theme-form-radio-symbol: var(--gray-12);
|
|
27
|
+
|
|
28
|
+
--theme-form-range-accent-color: light-dark(var(--gray-12), var(--gray-3));
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
[data-btn-theme='secondary'] {
|
|
@@ -37,6 +44,6 @@
|
|
|
37
44
|
--theme-btn-outline-focus: var(--gray-0);
|
|
38
45
|
--theme-btn-text-focus: var(--gray-12);
|
|
39
46
|
|
|
40
|
-
--theme-form-focus-box-shadow: 1px 1px 8px 1px var(--gray-12);
|
|
47
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--gray-12), var(--gray-2));
|
|
41
48
|
}
|
|
42
49
|
}
|
|
@@ -8,17 +8,24 @@
|
|
|
8
8
|
--theme-form-input-outline-active: var(--green-6);
|
|
9
9
|
--theme-form-input-outline-focus: var(--green-6);
|
|
10
10
|
--theme-form-input-text: light-dark(var(--gray-10), var(--gray-11));
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--green-12), var(--green-2));
|
|
12
13
|
|
|
13
14
|
--theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
15
|
+
--theme-form-checkbox-border: light-dark(var(--green-12), var(--green-12));
|
|
16
|
+
--theme-form-checkbox-outline: light-dark(var(--green-1), var(--green-1));
|
|
14
17
|
--theme-form-checkbox-shadow: transparent;
|
|
15
18
|
--theme-form-checkbox-shadow-focus: var(--green-6);
|
|
16
|
-
--theme-form-checkbox-symbol: var(--green-
|
|
19
|
+
--theme-form-checkbox-symbol: var(--green-12);
|
|
17
20
|
|
|
18
21
|
--theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
22
|
+
--theme-form-radio-border: light-dark(var(--green-12), var(--green-12));
|
|
23
|
+
--theme-form-radio-outline: light-dark(var(--green-1), var(--green-1));
|
|
19
24
|
--theme-form-radio-shadow: transparent;
|
|
20
25
|
--theme-form-radio-shadow-focus: var(--green-6);
|
|
21
|
-
--theme-form-radio-symbol: var(--green-
|
|
26
|
+
--theme-form-radio-symbol: var(--green-12);
|
|
27
|
+
|
|
28
|
+
--theme-form-range-accent-color: light-dark(var(--green-12), var(--green-3));
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
[data-btn-theme='success'] {
|
|
@@ -37,6 +44,6 @@
|
|
|
37
44
|
--theme-btn-outline-focus: var(--green-0);
|
|
38
45
|
--theme-btn-text-focus: var(--green-12);
|
|
39
46
|
|
|
40
|
-
--theme-form-focus-box-shadow: 1px 1px 8px 1px var(--green-12);
|
|
47
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--green-12), var(--green-2));
|
|
41
48
|
}
|
|
42
49
|
}
|
|
@@ -8,17 +8,24 @@
|
|
|
8
8
|
--theme-form-input-outline-active: var(--gray-6);
|
|
9
9
|
--theme-form-input-outline-focus: var(--gray-6);
|
|
10
10
|
--theme-form-input-text: light-dark(var(--gray-10), var(--gray-11));
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--gray-12), var(--gray-2));
|
|
12
13
|
|
|
13
14
|
--theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
15
|
+
--theme-form-checkbox-border: light-dark(var(--gray-12), var(--gray-12));
|
|
16
|
+
--theme-form-checkbox-outline: light-dark(var(--gray-1), var(--gray-1));
|
|
14
17
|
--theme-form-checkbox-shadow: transparent;
|
|
15
18
|
--theme-form-checkbox-shadow-focus: var(--gray-6);
|
|
16
|
-
--theme-form-checkbox-symbol: var(--gray-
|
|
19
|
+
--theme-form-checkbox-symbol: var(--gray-12);
|
|
17
20
|
|
|
18
21
|
--theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
22
|
+
--theme-form-radio-border: light-dark(var(--gray-12), var(--gray-12));
|
|
23
|
+
--theme-form-radio-outline: light-dark(var(--gray-1), var(--gray-1));
|
|
19
24
|
--theme-form-radio-shadow: transparent;
|
|
20
25
|
--theme-form-radio-shadow-focus: var(--gray-6);
|
|
21
|
-
--theme-form-radio-symbol: var(--gray-
|
|
26
|
+
--theme-form-radio-symbol: var(--gray-12);
|
|
27
|
+
|
|
28
|
+
--theme-form-range-accent-color: light-dark(var(--gray-12), var(--gray-3));
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
[data-btn-theme='tertiary'] {
|
|
@@ -8,17 +8,24 @@
|
|
|
8
8
|
--theme-form-input-outline-active: var(--orange-6);
|
|
9
9
|
--theme-form-input-outline-focus: var(--orange-6);
|
|
10
10
|
--theme-form-input-text: light-dark(var(--gray-10), var(--gray-11));
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--orange-12), var(--orange-2));
|
|
12
13
|
|
|
13
14
|
--theme-form-checkbox-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
15
|
+
--theme-form-checkbox-border: light-dark(var(--orange-12), var(--orange-12));
|
|
16
|
+
--theme-form-checkbox-outline: light-dark(var(--orange-1), var(--orange-1));
|
|
14
17
|
--theme-form-checkbox-shadow: transparent;
|
|
15
18
|
--theme-form-checkbox-shadow-focus: var(--orange-6);
|
|
16
|
-
--theme-form-checkbox-symbol: var(--orange-
|
|
19
|
+
--theme-form-checkbox-symbol: var(--orange-12);
|
|
17
20
|
|
|
18
21
|
--theme-form-radio-bg: light-dark(var(--gray-1), var(--gray-4));
|
|
22
|
+
--theme-form-radio-border: light-dark(var(--orange-12), var(--orange-12));
|
|
23
|
+
--theme-form-radio-outline: light-dark(var(--orange-1), var(--orange-1));
|
|
19
24
|
--theme-form-radio-shadow: transparent;
|
|
20
25
|
--theme-form-radio-shadow-focus: var(--orange-6);
|
|
21
|
-
--theme-form-radio-symbol: var(--orange-
|
|
26
|
+
--theme-form-radio-symbol: var(--orange-12);
|
|
27
|
+
|
|
28
|
+
--theme-form-range-accent-color: light-dark(var(--orange-12), var(--orange-3));
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
[data-btn-theme='warning'] {
|
|
@@ -37,6 +44,6 @@
|
|
|
37
44
|
--theme-btn-outline-focus: var(--orange-0);
|
|
38
45
|
--theme-btn-text-focus: var(--orange-12);
|
|
39
46
|
|
|
40
|
-
--theme-form-focus-box-shadow: 1px 1px 8px 1px var(--orange-12);
|
|
47
|
+
--theme-form-focus-box-shadow: 1px 1px 8px 1px light-dark(var(--orange-12), var(--orange-2));
|
|
41
48
|
}
|
|
42
49
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="input-checkbox-wrapper" :data-form-theme="formTheme" :class="[size, { error: fieldHasError }]">
|
|
3
|
-
<Icon
|
|
3
|
+
<Icon v-show="isChecked" name="material-symbols:check-small" class="input-checkbox-decorator" />
|
|
4
4
|
<input
|
|
5
5
|
type="checkbox"
|
|
6
6
|
:true-value="trueValue"
|
|
@@ -105,13 +105,22 @@ const icon = computed(() => {
|
|
|
105
105
|
--_checkbox-size: initial;
|
|
106
106
|
--_outline-width: var(--input-outline-width-thin);
|
|
107
107
|
--_border-width: var(--input-border-width-default);
|
|
108
|
+
--_border-color: var(--theme-form-checkbox-border);
|
|
109
|
+
--_outline-color: var(--theme-form-checkbox-outline);
|
|
108
110
|
--_box-shadow: none;
|
|
109
111
|
|
|
110
112
|
display: grid;
|
|
111
113
|
grid-template-areas: 'element-stack';
|
|
114
|
+
place-content: center;
|
|
112
115
|
|
|
113
|
-
background-color: var(--theme-form-
|
|
116
|
+
background-color: var(--theme-form-checkbox-bg);
|
|
114
117
|
border-radius: 4px;
|
|
118
|
+
border: var(--_border-width) solid var(--_border-color);
|
|
119
|
+
outline: 1px solid var(--_outline-color);
|
|
120
|
+
box-shadow: var(--_box-shadow);
|
|
121
|
+
|
|
122
|
+
height: var(--_checkbox-size);
|
|
123
|
+
width: var(--_checkbox-size);
|
|
115
124
|
|
|
116
125
|
&:has(.input-checkbox-core:focus-visible) {
|
|
117
126
|
--_box-shadow: var(--theme-form-focus-box-shadow);
|
|
@@ -136,7 +145,7 @@ const icon = computed(() => {
|
|
|
136
145
|
|
|
137
146
|
.input-checkbox-decorator {
|
|
138
147
|
grid-area: element-stack;
|
|
139
|
-
color: var(--theme-form-
|
|
148
|
+
color: var(--theme-form-checkbox-symbol);
|
|
140
149
|
height: var(--_checkbox-size);
|
|
141
150
|
width: var(--_checkbox-size);
|
|
142
151
|
box-shadow: var(--_box-shadow);
|
|
@@ -149,13 +158,15 @@ const icon = computed(() => {
|
|
|
149
158
|
overflow: hidden;
|
|
150
159
|
opacity: 0;
|
|
151
160
|
|
|
161
|
+
height: var(--_checkbox-size);
|
|
162
|
+
width: var(--_checkbox-size);
|
|
163
|
+
|
|
152
164
|
&:hover {
|
|
153
165
|
cursor: pointer;
|
|
154
166
|
}
|
|
155
167
|
|
|
156
|
-
&:focus {
|
|
157
|
-
|
|
158
|
-
outline: var(--_outline-width) solid hsl(from var(--theme-form-input-outline) h s 50%);
|
|
168
|
+
&:focus-visible {
|
|
169
|
+
--_box-shadow: var(--theme-form-focus-box-shadow);
|
|
159
170
|
}
|
|
160
171
|
}
|
|
161
172
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
<div class="multiple-checkboxes-items" :class="[optionsLayout]">
|
|
8
8
|
<template v-for="item in fieldData.data" :key="item.id">
|
|
9
|
-
<InputCheckboxWithLabel :id="item.value" :name :required :label="item.label" :fieldHasError v-model="modelValue" :true-value="item.value" :size :stateIcon :optionsLayout :theme />
|
|
9
|
+
<InputCheckboxWithLabel :id="`${name}-${item.value}`" :name :required :label="item.label" :fieldHasError v-model="modelValue" :true-value="item.value" :size :stateIcon :optionsLayout :theme />
|
|
10
10
|
</template>
|
|
11
11
|
</div>
|
|
12
12
|
<InputError :errorMessage="errorMessage" :fieldHasError :id="name" :isDetached="true" />
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:readonly="Number(modelValue) <= min"
|
|
14
14
|
:is-pending="false"
|
|
15
15
|
buttonText="Step down"
|
|
16
|
-
theme
|
|
16
|
+
:theme
|
|
17
17
|
size="x-small"
|
|
18
18
|
>
|
|
19
19
|
<template #iconOnly>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
:readonly="Number(modelValue) >= max"
|
|
29
29
|
:is-pending="false"
|
|
30
30
|
buttonText="Step up"
|
|
31
|
-
theme
|
|
31
|
+
:theme
|
|
32
32
|
size="x-small"
|
|
33
33
|
>
|
|
34
34
|
<template #iconOnly>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="input-radiobutton-wrapper" :data-form-theme="formTheme" :class="[size, { error: fieldHasError }]">
|
|
3
|
-
<Icon
|
|
3
|
+
<Icon v-show="isChecked" name="material-symbols:circle" class="input-radiobutton-decorator" />
|
|
4
4
|
<input
|
|
5
5
|
type="radio"
|
|
6
6
|
:true-value="trueValue"
|
|
@@ -120,13 +120,22 @@ const useCustomizeIcon = (content: string, name: string, prefix: string, provide
|
|
|
120
120
|
--_checkbox-size: initial;
|
|
121
121
|
--_outline-width: var(--input-outline-width-thin);
|
|
122
122
|
--_border-width: var(--input-border-width-default);
|
|
123
|
+
--_border-color: var(--theme-form-radio-border);
|
|
124
|
+
--_outline-color: var(--theme-form-radio-outline);
|
|
123
125
|
--_box-shadow: none;
|
|
124
126
|
|
|
125
127
|
display: grid;
|
|
126
128
|
grid-template-areas: 'element-stack';
|
|
129
|
+
/* place-content: center; */
|
|
127
130
|
|
|
128
131
|
background-color: var(--theme-form-radio-bg);
|
|
129
132
|
border-radius: 50%;
|
|
133
|
+
border: var(--_border-width) solid var(--_border-color);
|
|
134
|
+
outline: 1px solid var(--_outline-color);
|
|
135
|
+
box-shadow: var(--_box-shadow);
|
|
136
|
+
|
|
137
|
+
height: var(--_checkbox-size);
|
|
138
|
+
width: var(--_checkbox-size);
|
|
130
139
|
|
|
131
140
|
&:has(.input-radiobutton-core:focus-visible) {
|
|
132
141
|
--_box-shadow: var(--theme-form-focus-box-shadow);
|
|
@@ -150,11 +159,14 @@ const useCustomizeIcon = (content: string, name: string, prefix: string, provide
|
|
|
150
159
|
}
|
|
151
160
|
|
|
152
161
|
.input-radiobutton-decorator {
|
|
162
|
+
--_checked-size: calc(var(--_checkbox-size) * 0.65);
|
|
153
163
|
grid-area: element-stack;
|
|
164
|
+
align-self: center;
|
|
165
|
+
justify-self: center;
|
|
154
166
|
color: var(--theme-form-radio-symbol);
|
|
155
|
-
height: var(--
|
|
156
|
-
width: var(--
|
|
157
|
-
|
|
167
|
+
height: var(--_checked-size);
|
|
168
|
+
width: var(--_checked-size);
|
|
169
|
+
translate: -2px -2px;
|
|
158
170
|
}
|
|
159
171
|
|
|
160
172
|
.input-radiobutton-core {
|
|
@@ -164,13 +176,15 @@ const useCustomizeIcon = (content: string, name: string, prefix: string, provide
|
|
|
164
176
|
overflow: hidden;
|
|
165
177
|
opacity: 0;
|
|
166
178
|
|
|
179
|
+
height: var(--_checkbox-size);
|
|
180
|
+
width: var(--_checkbox-size);
|
|
181
|
+
|
|
167
182
|
&:hover {
|
|
168
183
|
cursor: pointer;
|
|
169
184
|
}
|
|
170
185
|
|
|
171
|
-
&:focus {
|
|
172
|
-
|
|
173
|
-
outline: var(--_outline-width) solid hsl(from var(--theme-form-input-outline) h s 50%);
|
|
186
|
+
&:focus-visible {
|
|
187
|
+
--_box-shadow: var(--theme-form-focus-box-shadow);
|
|
174
188
|
}
|
|
175
189
|
}
|
|
176
190
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
<div class="multiple-radiobuttons-items" :class="[optionsLayout]">
|
|
8
8
|
<template v-for="item in fieldData.data" :key="item.id">
|
|
9
|
-
<InputRadiobuttonWithLabel :id="item.value" :name="item.name" :required :label="item.label" :fieldHasError v-model="modelValue" :true-value="item.value" :size :stateIcon :theme />
|
|
9
|
+
<InputRadiobuttonWithLabel :id="`${name}-${item.value}`" :name="item.name" :required :label="item.label" :fieldHasError v-model="modelValue" :true-value="item.value" :size :stateIcon :theme />
|
|
10
10
|
</template>
|
|
11
11
|
</div>
|
|
12
12
|
<InputError :errorMessage="errorMessage" :fieldHasError :id="name" :isDetached="true" />
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
:list="hasDataList ? name + '-datalist' : ''"
|
|
17
17
|
:class="['input-range-core', `input-range--${size}`, `input-range--${weight}`, styleClassPassthrough]"
|
|
18
18
|
v-model="modelValue"
|
|
19
|
-
ref="
|
|
19
|
+
ref="inputRange"
|
|
20
20
|
/>
|
|
21
21
|
|
|
22
22
|
<template v-if="hasDataList">
|
|
@@ -102,6 +102,15 @@ const formTheme = computed(() => {
|
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
const modelValue = defineModel<number | readonly number[]>();
|
|
105
|
+
|
|
106
|
+
// @input="changeBackgroundColor"
|
|
107
|
+
const changeBackgroundColor = () => {
|
|
108
|
+
console.log('changeBackgroundColor()');
|
|
109
|
+
const inputRange = ref<HTMLInputElement | null>(null);
|
|
110
|
+
if (inputRange.value !== null) {
|
|
111
|
+
inputRange.value.style.accentColor = 'hsl(' + modelValue.value + ', 100%, 50%)';
|
|
112
|
+
}
|
|
113
|
+
};
|
|
105
114
|
</script>
|
|
106
115
|
|
|
107
116
|
<style lang="css">
|
|
@@ -126,11 +135,41 @@ const modelValue = defineModel<number | readonly number[]>();
|
|
|
126
135
|
.input-range-container {
|
|
127
136
|
flex-grow: 1;
|
|
128
137
|
.input-range-core {
|
|
129
|
-
color: var(--theme-form-
|
|
138
|
+
accent-color: var(--theme-form-range-accent-color);
|
|
130
139
|
height: var(--_input-range-height);
|
|
131
140
|
margin: 0;
|
|
132
141
|
width: 100%;
|
|
133
142
|
|
|
143
|
+
/* For Chrome, Safari, Opera, and Edge */
|
|
144
|
+
/* &::-webkit-slider-runnable-track {
|
|
145
|
+
background: var(--theme-form-range-accent-color);
|
|
146
|
+
height: var(--_input-range-height);
|
|
147
|
+
} */
|
|
148
|
+
|
|
149
|
+
/* For Firefox */
|
|
150
|
+
/* &::-moz-range-track {
|
|
151
|
+
background: var(--theme-form-range-accent-color);
|
|
152
|
+
height: var(--_input-range-height);
|
|
153
|
+
} */
|
|
154
|
+
|
|
155
|
+
/* Stling the thumb */
|
|
156
|
+
/* &::-webkit-slider-thumb {
|
|
157
|
+
-webkit-appearance: none;
|
|
158
|
+
background: #5cd5eb;
|
|
159
|
+
height: 2rem;
|
|
160
|
+
width: 1rem;
|
|
161
|
+
border-radius: 10px;
|
|
162
|
+
} */
|
|
163
|
+
|
|
164
|
+
/* For Firefox */
|
|
165
|
+
/* &::-moz-range-thumb {
|
|
166
|
+
background: #5cd5eb;
|
|
167
|
+
height: 2rem;
|
|
168
|
+
width: 1rem;
|
|
169
|
+
border-radius: 10px;
|
|
170
|
+
border: none;
|
|
171
|
+
} */
|
|
172
|
+
|
|
134
173
|
&:focus-visible {
|
|
135
174
|
box-shadow: var(--theme-form-focus-box-shadow);
|
|
136
175
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
:readonly="Number(modelValue) === min"
|
|
17
17
|
:is-pending="false"
|
|
18
18
|
buttonText="Step down"
|
|
19
|
-
theme
|
|
19
|
+
:theme
|
|
20
20
|
size="x-small"
|
|
21
21
|
>
|
|
22
22
|
<template #iconOnly>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
:readonly="Number(modelValue) === max"
|
|
32
32
|
:is-pending="false"
|
|
33
33
|
buttonText="Step up"
|
|
34
|
-
theme
|
|
34
|
+
:theme
|
|
35
35
|
size="x-small"
|
|
36
36
|
>
|
|
37
37
|
<template #iconOnly>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
:readonly="Number(modelValue) <= min"
|
|
30
30
|
:is-pending="false"
|
|
31
31
|
buttonText="Step down"
|
|
32
|
-
theme
|
|
32
|
+
:theme
|
|
33
33
|
size="x-small"
|
|
34
34
|
>
|
|
35
35
|
<template #iconOnly>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
:readonly="Number(modelValue) >= max"
|
|
45
45
|
:is-pending="false"
|
|
46
46
|
buttonText="Step up"
|
|
47
|
-
theme
|
|
47
|
+
:theme
|
|
48
48
|
size="x-small"
|
|
49
49
|
>
|
|
50
50
|
<template #iconOnly>
|
package/package.json
CHANGED