@ -11,9 +11,10 @@
name = "user-status-online"
@ change = "onChange" >
< label :for ="id" class = "user-status-online-select__label" >
{ { label } }
< NcUserStatusIcon :status ="type"
class = "user-status-online-select__icon"
aria - hidden = "true" / >
{ { label } }
< em class = "user-status-online-select__subline" > { { subline } } < / em >
< / label >
< / div >
@ -63,45 +64,42 @@ export default {
< / script >
< style lang = "scss" scoped >
@ use 'sass:math' ;
$icon - size : 24 px ;
$label - padding : 8 px ;
. user - status - online - select {
& _ _label {
position : relative ;
display : block ;
margin : $label - padding ;
padding : $label - padding ;
padding - inline - start : $icon - size + $label - padding * 2 ;
border : 2 px solid var ( -- color - main - background ) ;
box - sizing : inherit ;
display : grid ;
grid - template - columns : var ( -- default - clickable - area ) 1 fr 2 fr ;
align - items : center ;
gap : var ( -- default - grid - baseline ) ;
min - height : var ( -- default - clickable - area ) ;
padding : var ( -- default - grid - baseline ) ;
border - radius : var ( -- border - radius - large ) ;
background - color : var ( -- color - background - hover ) ;
background - position : $label - padding center ;
background - size : $icon - size ;
span ,
& {
& , & * {
cursor : pointer ;
}
span {
position : absolute ;
top : calc ( 50 % - 10 px ) ;
inset - inline - start : 10 px ;
display : block ;
width : $icon - size ;
height : $icon - size ;
& : hover {
background - color : var ( -- color - background - dark ) ;
}
}
& _ _icon {
flex - shrink : 0 ;
max - width : 34 px ;
max - height : 100 % ;
}
& _ _input : checked + & _ _label {
outline : 2 px solid var ( -- color - main - text ) ;
background - color : var ( -- color - background - dark ) ;
box - shadow : 0 0 0 4 px var ( -- color - main - background ) ;
}
& _ _input : focus - visible + & _ _label {
outline : 2 px solid var ( -- color - primary - element ) ! important ;
background - color : var ( -- color - background - dark ) ;
}
& _ _subline {