vira 31.11.0 → 31.12.0
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.
|
@@ -45,12 +45,12 @@ export const ViraCheckbox = defineViraElement()({
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
label {
|
|
48
|
-
&:hover .custom-checkbox.checked {
|
|
48
|
+
&:not(.disabled):hover .custom-checkbox.checked {
|
|
49
49
|
background-color: ${viraFormCssVars['vira-form-accent-primary-hover-color']
|
|
50
50
|
.value};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
&:active .custom-checkbox.checked {
|
|
53
|
+
&:not(.disabled):active .custom-checkbox.checked {
|
|
54
54
|
background-color: ${viraFormCssVars['vira-form-accent-primary-active-color']
|
|
55
55
|
.value};
|
|
56
56
|
}
|
|
@@ -63,11 +63,11 @@ export const ViraCheckbox = defineViraElement()({
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
label {
|
|
66
|
-
&:hover .custom-checkbox:not(.checked) {
|
|
66
|
+
&:not(.disabled):hover .custom-checkbox:not(.checked) {
|
|
67
67
|
background-color: ${viraFormCssVars['vira-form-error-hover-color'].value};
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
&:active .custom-checkbox:not(.checked) {
|
|
70
|
+
&:not(.disabled):active .custom-checkbox:not(.checked) {
|
|
71
71
|
background-color: ${viraFormCssVars['vira-form-error-active-color'].value};
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -88,10 +88,10 @@ export const ViraCheckbox = defineViraElement()({
|
|
|
88
88
|
font-weight: ${viraFormCssVars['vira-form-label-font-weight'].value};
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
&:hover .custom-checkbox {
|
|
91
|
+
&:not(.disabled):hover .custom-checkbox {
|
|
92
92
|
background-color: ${viraFormCssVars['vira-form-selection-hover-color'].value};
|
|
93
93
|
}
|
|
94
|
-
&:active .custom-checkbox {
|
|
94
|
+
&:not(.disabled):active .custom-checkbox {
|
|
95
95
|
background-color: ${viraFormCssVars['vira-form-selection-active-color'].value};
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -127,8 +127,12 @@ export const ViraCheckbox = defineViraElement()({
|
|
|
127
127
|
|
|
128
128
|
${hostClasses['vira-checkbox-horizontal'].selector} label {
|
|
129
129
|
flex-direction: row-reverse;
|
|
130
|
-
align-items:
|
|
130
|
+
align-items: flex-start;
|
|
131
131
|
gap: 8px;
|
|
132
|
+
|
|
133
|
+
& .label-text {
|
|
134
|
+
padding-block: calc((24px - 1em) / 2);
|
|
135
|
+
}
|
|
132
136
|
}
|
|
133
137
|
`,
|
|
134
138
|
events: {
|
|
@@ -23,6 +23,12 @@ export declare const ViraForm: import("element-vir").DeclarativeElementDefinitio
|
|
|
23
23
|
* @default false
|
|
24
24
|
*/
|
|
25
25
|
hideRequiredMarkers: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* When `true`, all checkboxes in this form render horizontally.
|
|
28
|
+
*
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
horizontalCheckboxes: boolean;
|
|
26
32
|
}>, {
|
|
27
33
|
lastIsValid: boolean;
|
|
28
34
|
}, {
|
|
@@ -59,6 +59,7 @@ export const ViraForm = defineViraElement()({
|
|
|
59
59
|
value: field.value || false,
|
|
60
60
|
disabled: inputs.isDisabled || field.isDisabled,
|
|
61
61
|
hasError: field.hasError,
|
|
62
|
+
horizontal: inputs.horizontalCheckboxes,
|
|
62
63
|
label: applyRequiredLabel(field.label, !!field.isRequired && !inputs.hideRequiredMarkers),
|
|
63
64
|
})}
|
|
64
65
|
${field.testId ? testId(field.testId) : nothing}
|