2021-08-10 18:25:34 +00:00
|
|
|
.fleet-checkbox {
|
2016-12-16 15:54:49 +00:00
|
|
|
@include clearfix;
|
|
|
|
|
position: relative;
|
2025-04-16 17:29:08 +00:00
|
|
|
// inline-flex would prevents clickable white space right of the checkbox,
|
|
|
|
|
// but we need that clickable in some "rows" using checkbox
|
2023-10-13 23:07:53 +00:00
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2016-12-16 15:54:49 +00:00
|
|
|
|
2025-04-16 17:29:08 +00:00
|
|
|
&:hover {
|
|
|
|
|
// Using selectors to avoid pointer cursor on clickable white space right of checkbox
|
|
|
|
|
.fleet-checkbox__label,
|
|
|
|
|
.fleet-checkbox__icon,
|
|
|
|
|
.fleet-checkbox__label-tooltip {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-17 14:01:23 +00:00
|
|
|
&:hover:not(.fleet-checkbox__label--disabled) {
|
|
|
|
|
svg {
|
|
|
|
|
.checkbox-state {
|
2025-09-29 17:10:41 +00:00
|
|
|
stroke: $core-fleet-green-over;
|
|
|
|
|
fill: $core-fleet-green-over;
|
2016-12-01 18:57:19 +00:00
|
|
|
}
|
2024-10-17 14:01:23 +00:00
|
|
|
.checkbox-unchecked-state {
|
2025-09-29 17:10:41 +00:00
|
|
|
stroke: $core-fleet-green-over;
|
2024-03-22 19:26:09 +00:00
|
|
|
}
|
2024-10-17 14:01:23 +00:00
|
|
|
}
|
|
|
|
|
}
|
2024-03-22 19:26:09 +00:00
|
|
|
|
2024-10-17 14:01:23 +00:00
|
|
|
// During click only
|
|
|
|
|
&:active:not(.fleet-checkbox__label--disabled) {
|
|
|
|
|
svg {
|
|
|
|
|
.checkbox-state {
|
2025-09-29 17:10:41 +00:00
|
|
|
stroke: $core-fleet-green-down;
|
|
|
|
|
fill: $core-fleet-green-down;
|
2024-03-26 13:55:49 +00:00
|
|
|
}
|
2024-10-17 14:01:23 +00:00
|
|
|
.checkbox-unchecked-state {
|
2025-09-29 17:10:41 +00:00
|
|
|
stroke: $core-fleet-green-down;
|
2016-12-01 18:57:19 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-17 14:01:23 +00:00
|
|
|
// When tabbing
|
|
|
|
|
&:focus-visible:not(.fleet-checkbox__label--disabled) {
|
|
|
|
|
outline: none;
|
2016-12-21 17:25:54 +00:00
|
|
|
|
2024-10-17 14:01:23 +00:00
|
|
|
svg {
|
2025-09-29 17:10:41 +00:00
|
|
|
outline: 2px solid $ui-fleet-black-75;
|
2024-10-17 14:01:23 +00:00
|
|
|
outline-offset: 1px;
|
2025-01-22 15:22:59 +00:00
|
|
|
border-radius: $border-radius;
|
2016-12-21 17:25:54 +00:00
|
|
|
}
|
2024-10-17 14:01:23 +00:00
|
|
|
}
|
2021-06-03 17:46:35 +00:00
|
|
|
|
2024-10-17 14:01:23 +00:00
|
|
|
&--disabled {
|
|
|
|
|
svg {
|
|
|
|
|
.checkbox-state {
|
|
|
|
|
stroke: $ui-fleet-black-25;
|
|
|
|
|
fill: $ui-fleet-black-25;
|
2021-06-03 17:46:35 +00:00
|
|
|
}
|
2024-10-17 14:01:23 +00:00
|
|
|
.checkbox-unchecked-state {
|
|
|
|
|
stroke: $ui-fleet-black-25;
|
2021-06-03 17:46:35 +00:00
|
|
|
}
|
|
|
|
|
}
|
2016-12-01 18:57:19 +00:00
|
|
|
}
|
2016-12-16 15:54:49 +00:00
|
|
|
|
|
|
|
|
&__label {
|
2022-04-21 18:12:42 +00:00
|
|
|
font-size: $x-small;
|
|
|
|
|
padding-left: $pad-small;
|
2022-09-30 19:53:33 +00:00
|
|
|
display: inline-block;
|
2022-07-26 12:15:57 +00:00
|
|
|
vertical-align: top;
|
2024-03-26 13:55:49 +00:00
|
|
|
|
|
|
|
|
&--disabled {
|
|
|
|
|
color: $ui-fleet-black-50;
|
2024-10-17 14:01:23 +00:00
|
|
|
|
|
|
|
|
svg {
|
|
|
|
|
.checkbox-state {
|
|
|
|
|
stroke: $ui-fleet-black-25;
|
|
|
|
|
fill: $ui-fleet-black-25;
|
|
|
|
|
}
|
|
|
|
|
.checkbox-unchecked-state {
|
|
|
|
|
stroke: $ui-fleet-black-25;
|
2024-11-22 16:52:03 +00:00
|
|
|
fill: $ui-fleet-black-25;
|
2024-10-17 14:01:23 +00:00
|
|
|
}
|
|
|
|
|
}
|
2025-04-16 17:29:08 +00:00
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
// Using selectors to avoid not allowed cursor on clickable white space right of checkbox
|
|
|
|
|
.fleet-checkbox__label,
|
|
|
|
|
.fleet-checkbox__icon,
|
|
|
|
|
.fleet-checkbox__label-tooltip {
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-03-26 13:55:49 +00:00
|
|
|
}
|
2022-04-21 18:12:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&__label-tooltip {
|
2021-05-24 17:46:13 +00:00
|
|
|
font-size: $x-small;
|
2021-12-28 18:07:18 +00:00
|
|
|
padding-left: $pad-small;
|
2022-02-28 21:25:06 +00:00
|
|
|
display: inherit;
|
2022-07-26 12:15:57 +00:00
|
|
|
vertical-align: top;
|
2016-12-16 15:54:49 +00:00
|
|
|
}
|
2023-11-21 18:16:33 +00:00
|
|
|
|
|
|
|
|
&__help-text {
|
|
|
|
|
@include help-text;
|
|
|
|
|
}
|
2016-12-01 18:57:19 +00:00
|
|
|
}
|
2022-12-14 18:57:57 +00:00
|
|
|
|
|
|
|
|
.inverse {
|
2023-10-18 21:04:08 +00:00
|
|
|
flex-direction: row-reverse; // Switches the text to the left side of checkbox as all checkboxes are now display flex
|
|
|
|
|
|
2022-12-14 18:57:57 +00:00
|
|
|
.fleet-checkbox {
|
2024-10-17 14:01:23 +00:00
|
|
|
&__icon {
|
|
|
|
|
padding-left: $pad-small;
|
2022-12-14 18:57:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&__label {
|
|
|
|
|
float: left;
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
font-weight: $bold;
|
|
|
|
|
font-size: $x-small;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|