From 21d8aae91041a40c6f2d0e1e1eb5d252b48f1607 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Sun, 7 Apr 2024 13:52:43 +0300 Subject: [PATCH] Refactored RadioButton --- components/lib/radiobutton/style/RadioButtonStyle.js | 2 +- .../lib/themes/primeone/base/radiobutton/index.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/lib/radiobutton/style/RadioButtonStyle.js b/components/lib/radiobutton/style/RadioButtonStyle.js index 40a39d257..7150218a1 100644 --- a/components/lib/radiobutton/style/RadioButtonStyle.js +++ b/components/lib/radiobutton/style/RadioButtonStyle.js @@ -4,7 +4,7 @@ const classes = { root: ({ instance, props }) => [ 'p-radiobutton p-component', { - 'p-highlight': instance.checked, + 'p-radiobutton-checked': instance.checked, 'p-disabled': props.disabled, 'p-invalid': props.invalid, 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled' diff --git a/components/lib/themes/primeone/base/radiobutton/index.js b/components/lib/themes/primeone/base/radiobutton/index.js index de166f646..b02a2e80a 100644 --- a/components/lib/themes/primeone/base/radiobutton/index.js +++ b/components/lib/themes/primeone/base/radiobutton/index.js @@ -55,23 +55,23 @@ export default { border-color: ${dt('radiobutton.hover.border.color')}; } -.p-radiobutton.p-highlight .p-radiobutton-box { +.p-radiobutton.p-radiobutton-checked .p-radiobutton-box { border-color: ${dt('radiobutton.checked.border.color')}; background: ${dt('radiobutton.checked.background')}; } -.p-radiobutton.p-highlight .p-radiobutton-box .p-radiobutton-icon { +.p-radiobutton.p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon { background: ${dt('radiobutton.icon.checked.color')}; transform: translateZ(0) scale(1, 1); visibility: visible; } -.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-highlight .p-radiobutton-box { +.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box { border-color: ${dt('radiobutton.checked.hover.border.color')}; background: ${dt('radiobutton.checked.hover.background')}; } -.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-highlight .p-radiobutton-box .p-radiobutton-icon { +.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon { background: ${dt('radiobutton.icon.checked.hover.color')}; } @@ -88,11 +88,11 @@ export default { background: ${dt('radiobutton.filled.background')}; } -.p-radiobutton.p-variant-filled.p-highlight .p-radiobutton-box { +.p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box { background: ${dt('radiobutton.checked.background')}; } -.p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-highlight .p-radiobutton-box { +.p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box { background: ${dt('radiobutton.checked.hover.background')}; }