@c8y/style
Version:
Styles for Cumulocity IoT applications
201 lines (188 loc) • 4.22 kB
text/less
c8y-drop-area{
display: block;
}
.drop-zone {
position: relative;
display: block;
padding-bottom: 100%;
height: 0;
.alert {
position: absolute;
bottom: 0;
margin: 0;
width: 100%;
}
.upload-status,
.upload-placeholder {
padding: 0 @margin-16;
width: 100%;
}
.file-placeholder {
position: absolute;
display: flex;
align-items: center;
flex-flow: column nowrap;
justify-content: center;
width: 100%;
height: 100%;
border: 2px dashed @component-border-color;
color: @component-color-default;
text-align: center;
transition: border 0.25s ease;
.hint-placeholder {
[class^='dlt-c8y-icon-'],
[class*=' dlt-c8y-icon-'] {
color: @component-brand-primary;
font-size: 36px;
.transition(all 0.35s ease);
}
}
&.drag-over,
&:hover {
border-color: @component-brand-primary;
.hint-placeholder {
[class^='dlt-c8y-icon-'],
[class*=' dlt-c8y-icon-'] {
.scale(1.1);
}
}
}
}
&.has-errors .file-placeholder {
border-bottom-style: solid;
border-bottom-color: @form-control-validation-error;
}
&.drop-zone-sm,
.drop-area-sm & {
padding: 0;
min-height: unset ;
height: auto;
.alert {
position: relative;
}
.file-placeholder {
position: static;
display: block;
.hint-placeholder {
position: relative;
padding: 10px 10px 10px 50px;
text-align: left;
[class^='dlt-c8y-icon-'],
[class*=' dlt-c8y-icon-'] {
position: absolute;
top: 50%;
left: 3px;
.translate(0, -50%);
}
p {
margin-bottom: 0;
}
}
&:hover,
&.drag-over {
.hint-placeholder [class^='dlt-c8y-icon-'],
.hint-placeholder [class*=' dlt-c8y-icon-'] {
transform: translate(0, -50%) scale(1.1);
}
}
}
}
.drop-area-sm & {
.file-placeholder {
.hint-placeholder {
[class^='dlt-c8y-icon-'],
[class*=' dlt-c8y-icon-'] {
left: 8px;
font-size: 28px;
}
p {
br {
display: contents;
+ span {
margin-left: 6px;
}
}
}
}
}
}
&.disabled {
&,
&:hover,
&:focus {
pointer-events: none ;
cursor: @cursor-disabled ;
color: @component-color-default;
.opacity(0.65);
.box-shadow(none);
}
}
}
c8y-file-picker-form-control {
.file-picker-drop-zone {
display: flex;
flex-direction: column;
min-height: 150px;
height: fit-content;
transition: min-height 0.25s ease;
padding: 10px;
&.unsupported-format {
background-size: 100px 100px;
#gradient > .striped(rgba(0, 0, 0, 0.10));;
}
&.dragging {
min-height: 300px;
}
.alert {
position: absolute;
bottom: 0;
margin: 0;
width: 100%;
}
.upload-status,
.upload-placeholder {
padding: 0 @margin-16;
width: 100%;
}
.file-placeholder {
flex: 1;
display: flex;
align-items: center;
flex-flow: column nowrap;
justify-content: center;
height: 100%;
border: 2px dashed @component-border-color;
color: @component-color-default;
text-align: center;
transition: border 0.25s ease;
.hint-placeholder {
[class^='dlt-c8y-icon-'],
[class*=' dlt-c8y-icon-'] {
&.warning {
color: @status-warning;
}
color: @component-brand-primary;
font-size: 36px;
.transition(all 0.35s ease);
}
}
> * {
pointer-events: none;
}
&.drag-over,
&:hover {
border-color: @component-brand-primary;
.hint-placeholder {
[class^='dlt-c8y-icon-'],
[class*=' dlt-c8y-icon-'] {
.scale(1.1);
}
}
}
}
&.has-errors .file-placeholder {
border-bottom-style: solid;
border-bottom-color: @form-control-validation-error;
}
}
}