2024-01-18 20:49:29 +00:00
|
|
|
@use 'sass:color';
|
2024-02-25 18:21:18 +00:00
|
|
|
@use 'sass:math';
|
2024-01-18 20:49:29 +00:00
|
|
|
|
|
|
|
.control-option {
|
|
|
|
@include set-color($color-text-dim);
|
2024-02-24 18:51:58 +00:00
|
|
|
@include trans-colors-svg;
|
2024-01-18 20:49:29 +00:00
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
2024-01-22 16:43:21 +00:00
|
|
|
padding: space(4) space(16) space(4) space(20);
|
2024-01-18 20:49:29 +00:00
|
|
|
border-radius: $border-radius-sm;
|
|
|
|
background-color: rgba(0, 0, 0, 0);
|
|
|
|
|
|
|
|
&:focus-visible:not(:disabled, [disabled]),
|
|
|
|
&:hover:not(:disabled, [disabled]) {
|
|
|
|
@include set-color($color-text);
|
|
|
|
background-color: $color-bg-overlay;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled, &[disabled] {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
2024-02-25 18:21:18 +00:00
|
|
|
&--active {
|
|
|
|
// while actively looking for inputs, set styles to the correct slots
|
|
|
|
$valid-binding-slots: 0, 1;
|
|
|
|
@each $slot in $valid-binding-slots {
|
|
|
|
// global attr -> this active row -> binding slot
|
|
|
|
[cur-binding-slot="#{$slot}"] & .control-option__binding[bind-slot="#{$slot}"] {
|
|
|
|
border-color: $color-error;
|
|
|
|
|
|
|
|
.control-option__binding-icon {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-option__binding-recording {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-18 20:49:29 +00:00
|
|
|
.icon-button {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-option__label {
|
|
|
|
@extend %label-md;
|
|
|
|
flex: 2 1 space(300);
|
|
|
|
height: auto;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-option__bindings {
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
2024-04-21 15:54:48 +00:00
|
|
|
flex: 2 1 space(400);
|
2024-01-18 20:49:29 +00:00
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: 100%;
|
2024-01-22 16:43:21 +00:00
|
|
|
height: space(56);
|
2024-01-18 20:49:29 +00:00
|
|
|
padding: 0 space(12) 0 space(4);
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-option__binding {
|
|
|
|
@include set-color($color-text-dim);
|
2024-02-24 18:51:58 +00:00
|
|
|
@include trans-colors-border;
|
2024-01-18 20:49:29 +00:00
|
|
|
display: flex;
|
2024-02-25 18:21:18 +00:00
|
|
|
position: relative;
|
2024-01-18 20:49:29 +00:00
|
|
|
|
|
|
|
flex: 1 1 100%;
|
2024-04-21 15:54:48 +00:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2024-01-18 20:49:29 +00:00
|
|
|
width: 100%;
|
2024-01-22 16:43:21 +00:00
|
|
|
height: space(56);
|
2024-04-21 15:54:48 +00:00
|
|
|
margin: 0 space(4);
|
2024-01-18 20:49:29 +00:00
|
|
|
padding: space(8);
|
2024-01-19 19:06:06 +00:00
|
|
|
border-width: $border-width-thickness;
|
2024-01-18 20:49:29 +00:00
|
|
|
border-radius: $border-radius-sm;
|
2024-04-21 15:54:48 +00:00
|
|
|
border-color: $color-bg-overlay;
|
|
|
|
background-color: $color-bg-overlay;
|
2024-01-18 20:49:29 +00:00
|
|
|
|
|
|
|
&:focus, &:hover {
|
|
|
|
@include set-color($color-text);
|
|
|
|
border-color: $color-text;
|
2024-04-21 15:54:48 +00:00
|
|
|
background-color: $color-border-soft;
|
2024-01-18 20:49:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
@include set-color(color.scale($color-text, $lightness: 20%));
|
|
|
|
}
|
|
|
|
|
|
|
|
&:disabled, &[disabled] {
|
|
|
|
@include set-color($color-text-dim);
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not([disabled]) {
|
|
|
|
@extend %nav-all;
|
2024-01-22 16:43:21 +00:00
|
|
|
cursor: pointer;
|
2024-01-18 20:49:29 +00:00
|
|
|
}
|
|
|
|
}
|
2024-02-25 18:21:18 +00:00
|
|
|
|
|
|
|
.control-option__binding-icon {
|
|
|
|
@include trans-colors-opa;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes control-option__binding-recording-scale {
|
|
|
|
0% {
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
2024-04-21 15:54:48 +00:00
|
|
|
|
2024-02-25 18:21:18 +00:00
|
|
|
50% {
|
|
|
|
transform: scale(0.85);
|
|
|
|
}
|
2024-04-21 15:54:48 +00:00
|
|
|
|
|
|
|
100% {
|
2024-02-25 18:21:18 +00:00
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-option__binding-recording {
|
|
|
|
@include trans-colors-opa;
|
|
|
|
display: flex;
|
2024-04-21 15:54:48 +00:00
|
|
|
position: absolute;
|
2024-02-25 18:21:18 +00:00
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
2024-04-21 15:54:48 +00:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2024-02-25 18:21:18 +00:00
|
|
|
opacity: 0;
|
|
|
|
|
|
|
|
.control-option__binding-circle {
|
|
|
|
$rec-size: 24;
|
|
|
|
|
|
|
|
width: space($rec-size);
|
|
|
|
height: space($rec-size);
|
|
|
|
animation: 1.5s sine-in-out infinite control-option__binding-recording-scale;
|
2024-04-21 15:54:48 +00:00
|
|
|
border-radius: space($rec-size);
|
|
|
|
background-color: $color-error;
|
2024-02-25 18:21:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.control-option__binding-edge {
|
|
|
|
$edge-size: 36;
|
|
|
|
$h-edge-size: math.div($edge-size, 2);
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
width: space($edge-size);
|
|
|
|
height: space($edge-size);
|
2024-04-21 15:54:48 +00:00
|
|
|
|
|
|
|
transform: translate(-50%, -50%);
|
2024-02-25 18:21:18 +00:00
|
|
|
|
|
|
|
> svg.control-option__binding-edge-svg {
|
|
|
|
width: space($edge-size);
|
|
|
|
height: space($edge-size);
|
|
|
|
image-color: $color-error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|