2024-02-19 22:53:42 +00:00
|
|
|
export default {
|
2024-03-12 08:19:23 +00:00
|
|
|
css: ({ dt }) => `
|
2024-02-19 22:53:42 +00:00
|
|
|
.p-radiobutton {
|
|
|
|
position: relative;
|
|
|
|
display: inline-flex;
|
|
|
|
user-select: none;
|
|
|
|
vertical-align: bottom;
|
2024-03-13 11:59:34 +00:00
|
|
|
width: ${dt('radiobutton.width')};
|
|
|
|
height: ${dt('radiobutton.height')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton-input {
|
|
|
|
cursor: pointer;
|
|
|
|
appearance: none;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
opacity: 0;
|
|
|
|
z-index: 1;
|
|
|
|
outline: 0 none;
|
|
|
|
border: 1px solid transparent;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton-box {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
border-radius: 50%;
|
2024-03-13 11:59:34 +00:00
|
|
|
border: 1px solid ${dt('radiobutton.border.color')};
|
|
|
|
background: ${dt('radiobutton.background')};
|
|
|
|
width: ${dt('radiobutton.width')};
|
|
|
|
height: ${dt('radiobutton.height')};
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
2024-02-19 22:53:42 +00:00
|
|
|
outline-color: transparent;
|
2024-03-13 11:59:34 +00:00
|
|
|
box-shadow: ${dt('radiobutton.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton-icon {
|
2024-03-12 08:19:23 +00:00
|
|
|
transition-duration: ${dt('transition.duration')};
|
2024-02-19 22:53:42 +00:00
|
|
|
background: transparent;
|
2024-03-13 11:59:34 +00:00
|
|
|
font-size: ${dt('radiobutton.icon.size')};
|
|
|
|
width: ${dt('radiobutton.icon.size')};
|
|
|
|
height: ${dt('radiobutton.icon.size')};
|
2024-02-19 22:53:42 +00:00
|
|
|
border-radius: 50%;
|
|
|
|
backface-visibility: hidden;
|
|
|
|
transform: translateZ(0) scale(0.1);
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
border-color: ${dt('radiobutton.hover.border.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-highlight .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
border-color: ${dt('radiobutton.checked.border.color')};
|
|
|
|
background: ${dt('radiobutton.checked.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-highlight .p-radiobutton-box .p-radiobutton-icon {
|
2024-03-13 11:59:34 +00:00
|
|
|
background: ${dt('radiobutton.icon.checked.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
transform: translateZ(0) scale(1, 1);
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-highlight .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
border-color: ${dt('radiobutton.checked.hover.border.color')};
|
|
|
|
background: ${dt('radiobutton.checked.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-highlight .p-radiobutton-box .p-radiobutton-icon {
|
2024-03-13 11:59:34 +00:00
|
|
|
background: ${dt('radiobutton.icon.checked.hover.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {
|
2024-03-12 08:19:23 +00:00
|
|
|
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
|
|
|
outline-offset: ${dt('focus.ring.offset')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-invalid > .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
border-color: ${dt('radiobutton.invalid.border.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-variant-filled .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
background: ${dt('radiobutton.filled.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-variant-filled.p-highlight .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
background: ${dt('radiobutton.checked.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-highlight .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
background: ${dt('radiobutton.checked.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-disabled {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-disabled .p-radiobutton-box {
|
2024-03-13 11:59:34 +00:00
|
|
|
background: ${dt('radiobutton.disabled.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-disabled .p-radiobutton-box .p-radiobutton-icon {
|
2024-03-13 11:59:34 +00:00
|
|
|
color: ${dt('radiobutton.icon.disabled.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
`
|
|
|
|
};
|