pocketbase/ui/src/scss/_schema_field.scss

115 lines
2.5 KiB
SCSS
Raw Normal View History

2023-03-17 01:21:16 +08:00
.schema-field-header {
2023-04-26 19:06:27 +08:00
$minHeight: 44px;
2023-03-17 01:21:16 +08:00
position: relative;
display: flex;
width: 100%;
2023-04-26 19:06:27 +08:00
min-height: $minHeight;
gap: 5px;
padding: 0 5px;
2023-03-17 01:21:16 +08:00
align-items: center;
justify-content: stretch;
2023-04-26 19:06:27 +08:00
background: var(--baseAlt1Color);
border-radius: var(--baseRadius);
transition: border-radius var(--baseAnimationSpeed);
2023-03-17 01:21:16 +08:00
.form-field {
margin: 0;
2023-04-26 19:06:27 +08:00
.form-field-addon.prefix {
left: 10px;
~ %input {
padding-left: 37px;
}
}
2023-03-17 01:21:16 +08:00
}
.options-trigger {
2023-04-26 19:06:27 +08:00
padding: 2px;
margin: 0 3px;
2023-03-17 01:21:16 +08:00
i {
transition: transform var(--baseAnimationSpeed);
}
2023-04-26 19:06:27 +08:00
}
.separator {
width: 1px;
height: $minHeight;
background: var(--baseAlt2Color);
2023-03-17 01:21:16 +08:00
}
.drag-handle-wrapper {
position: absolute;
top: 0;
left: auto;
right: 100%;
height: 100%;
display: flex;
align-items: center;
}
.drag-handle {
padding: 0 5px;
transform: translateX(5px);
@include hide();
}
.form-field-single-multiple-select {
width: 100px;
flex-shrink: 0;
.dropdown {
min-width: 0;
}
}
2023-03-27 21:07:20 +08:00
// markers
.markers {
position: absolute;
z-index: 1;
2023-04-26 19:06:27 +08:00
left: 4px;
top: 4px;
2023-03-27 21:07:20 +08:00
display: inline-flex;
align-items: center;
gap: 5px;
.marker {
$size: 4px;
display: block;
width: $size;
height: $size;
border-radius: $size;
background: var(--baseAlt4Color);
}
}
2023-03-17 01:21:16 +08:00
// states
&:hover,
&:active {
.drag-handle {
transform: translateX(0px);
@include show();
}
}
2023-04-26 19:06:27 +08:00
2023-03-17 01:21:16 +08:00
}
2023-04-26 19:06:27 +08:00
2023-03-17 01:21:16 +08:00
.schema-field-options {
2023-04-26 19:06:27 +08:00
padding: var(--xsSpacing) var(--smSpacing);
border-bottom-left-radius: var(--baseRadius);
border-bottom-right-radius: var(--baseRadius);
border: 2px solid var(--baseAlt1Color);
}
.schema-field {
@extend %block;
position: relative;
margin: 0 0 var(--xsSpacing);
transition: box-shadow var(--baseAnimationSpeed);
&.drag-over {
opacity: 0.5;
}
&.expanded {
@include shadowize();
.schema-field-header {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
.options-trigger {
i {
transform: rotate(-60deg);
}
}
}
}
2023-03-17 01:21:16 +08:00
}