539 lines
12 KiB
SCSS
539 lines
12 KiB
SCSS
.dashboard-editor {
|
|
padding: 20px;
|
|
min-height: 100vh;
|
|
max-height: 100vh;
|
|
width: 100vw;
|
|
overflow: hidden;
|
|
color: #ffffff;
|
|
z-index: 2;
|
|
background: transparent;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
|
|
.control-panel {
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
justify-content: end;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
|
|
.control-button {
|
|
padding: 8px 16px;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 20px;
|
|
cursor: pointer;
|
|
backdrop-filter: blur(10px);
|
|
transition: background-color 0.2s ease;
|
|
pointer-events: auto;
|
|
|
|
&:not(.edit-mode-active) {
|
|
background-color: var(--background-color-button);
|
|
}
|
|
|
|
&.edit-mode-active {
|
|
background-color: #ff4444;
|
|
}
|
|
|
|
&.primary {
|
|
background-color: rgba(33, 150, 243, 0.8);
|
|
}
|
|
|
|
&.secondary {
|
|
background-color: var(--background-color-button);
|
|
}
|
|
|
|
&:hover {
|
|
opacity: 0.9;
|
|
}
|
|
}
|
|
}
|
|
|
|
.block-grid {
|
|
display: flex;
|
|
flex: 1;
|
|
flex-wrap: wrap;
|
|
gap: 20px;
|
|
// margin-top: 20px;
|
|
max-height: calc(100vh - 100px);
|
|
overflow: auto;
|
|
padding: 10px;
|
|
|
|
.block {
|
|
position: relative;
|
|
cursor: pointer;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
// transition: all 0.3s ease;
|
|
z-index: 1;
|
|
resize: none;
|
|
overflow: hidden;
|
|
background-color: rgba(50, 50, 50, 0.8);
|
|
backdrop-filter: blur(10px);
|
|
padding: 10px;
|
|
border-radius: 8px;
|
|
min-height: 200px;
|
|
min-width: 300px;
|
|
|
|
&.selected {
|
|
outline: 2px solid var(--border-color-accent);
|
|
}
|
|
|
|
&.edit-mode {
|
|
cursor: pointer;
|
|
}
|
|
|
|
&.draggable {
|
|
cursor: move;
|
|
|
|
&:hover .drag-handle {
|
|
background-color: rgba(33, 150, 243, 1);
|
|
}
|
|
|
|
.drag-handle {
|
|
position: absolute;
|
|
top: 5px;
|
|
left: 5px;
|
|
width: 20px;
|
|
height: 20px;
|
|
background-color: rgba(33, 150, 243, 0.8);
|
|
border-radius: 4px;
|
|
cursor: move;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
font-size: 12px;
|
|
z-index: 10;
|
|
}
|
|
}
|
|
|
|
.element-button-container {
|
|
position: relative;
|
|
|
|
}
|
|
|
|
.element-container {
|
|
display: flex;
|
|
justify-content: end;
|
|
|
|
position: absolute;
|
|
top: 10px;
|
|
right: 10px;
|
|
}
|
|
|
|
.add-element-button {
|
|
// position: absolute;
|
|
// top: 10px;
|
|
// right: 10px;
|
|
background: var(--background-color-button);
|
|
border: none;
|
|
border-radius: 20px;
|
|
color: white;
|
|
font-size: 12px;
|
|
padding: 6px 12px;
|
|
cursor: pointer;
|
|
z-index: 10;
|
|
backdrop-filter: blur(5px);
|
|
transition: background-color 0.2s ease;
|
|
|
|
// &:hover {
|
|
// background: rgba(33, 150, 243, 1);
|
|
// }
|
|
}
|
|
|
|
.resize-handle {
|
|
// width: 16px;
|
|
// height: 16px;
|
|
// background-color: rgba(76, 175, 80, 0.8);
|
|
border-radius: 3px;
|
|
position: absolute;
|
|
bottom: 2px;
|
|
right: 2px;
|
|
cursor: nwse-resize;
|
|
opacity: 0;
|
|
transition: opacity 0.2s ease;
|
|
z-index: 10;
|
|
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
&.selected .resize-handle {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
.element {
|
|
margin: 5px;
|
|
border-radius: 4px;
|
|
padding: 8px;
|
|
// transition: all 0.2s ease;
|
|
user-select: none;
|
|
border: 1px solid transparent;
|
|
|
|
&.absolute {
|
|
position: absolute;
|
|
margin: 0;
|
|
}
|
|
|
|
&.selected {
|
|
border: 2px solid #ff9800;
|
|
background-color: rgba(255, 152, 0, 0.1);
|
|
}
|
|
|
|
&.swap-source {
|
|
border: 2px solid #4caf50;
|
|
background-color: rgba(76, 175, 80, 0.1);
|
|
}
|
|
|
|
&.swap-target {
|
|
border: 2px dashed #ff9800;
|
|
}
|
|
|
|
&.graph {
|
|
min-height: 120px;
|
|
min-width: 200px;
|
|
padding: 12px;
|
|
background-color: rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
&.edit-mode.absolute {
|
|
cursor: move;
|
|
}
|
|
|
|
&.edit-mode:not(.absolute) {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.swap-button {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 2px;
|
|
background: rgba(33, 150, 243, 0.8);
|
|
border: none;
|
|
border-radius: 3px;
|
|
color: white;
|
|
font-size: 10px;
|
|
padding: 2px 4px;
|
|
cursor: pointer;
|
|
opacity: 0;
|
|
transition: opacity 0.2s ease;
|
|
z-index: 10;
|
|
}
|
|
|
|
&:hover .swap-button,
|
|
&.selected .swap-button {
|
|
opacity: 1;
|
|
}
|
|
|
|
.resize-handle {
|
|
width: 20px;
|
|
height: 20px;
|
|
position: absolute;
|
|
bottom: 2px;
|
|
right: 2px;
|
|
background-color: rgba(33, 150, 243, 0.8);
|
|
cursor: nwse-resize;
|
|
border-radius: 2px;
|
|
opacity: 0;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
&.selected .resize-handle {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.block-grid-container {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.panel {
|
|
// position: fixed;
|
|
padding: 20px;
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
background: var(--background-color);
|
|
backdrop-filter: blur(20px);
|
|
border-radius: 20px;
|
|
outline: 1px solid var(--border-color);
|
|
box-shadow: 0px 4px 8px rgba(60, 60, 67, 0.1019607843);
|
|
z-index: 3;
|
|
|
|
.header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin: 0 0 10px 0;
|
|
border-bottom: 1px solid gray;
|
|
padding-bottom: 10px;
|
|
|
|
h4 {
|
|
font-size: var(--font-size-regular);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.icon {
|
|
cursor: pointer;
|
|
|
|
svg {
|
|
path {
|
|
stroke: #ff4444;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
&.data-model-panel {
|
|
left: 20px;
|
|
top: 50px;
|
|
min-width: 300px;
|
|
max-width: 400px;
|
|
max-height: 80vh;
|
|
overflow-y: auto;
|
|
|
|
.control-button {
|
|
&.primary {
|
|
background-color: var(--background-color-button);
|
|
}
|
|
}
|
|
}
|
|
|
|
&.block-editor-panel {
|
|
min-width: 280px;
|
|
height: fit-content;
|
|
|
|
// h4 {
|
|
// color: #4caf50;
|
|
// }
|
|
}
|
|
|
|
&.element-editor-panel {
|
|
right: 20px;
|
|
top: 50px;
|
|
min-width: 300px;
|
|
max-height: 84vh;
|
|
overflow: auto;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-bottom: 15px;
|
|
|
|
.input-range-container {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 6px;
|
|
|
|
}
|
|
|
|
.form-label {
|
|
display: block;
|
|
// margin-bottom: 8px;
|
|
font-size: 14px;
|
|
text-wrap: nowrap;
|
|
}
|
|
|
|
.input-range-container {
|
|
padding: 0;
|
|
}
|
|
|
|
.form-select,
|
|
.color-input,
|
|
.range-input,
|
|
.form-input,
|
|
.input-container,
|
|
.regularDropdown-container {
|
|
max-width: 140px;
|
|
}
|
|
|
|
.form-input,
|
|
.form-select,
|
|
.form-textarea {
|
|
width: 100%;
|
|
padding: 8px;
|
|
background-color: rgba(85, 85, 85, 0.6);
|
|
color: #ffffff;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: 6px;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.form-textarea {
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
resize: vertical;
|
|
}
|
|
|
|
.form-small {
|
|
opacity: 0.7;
|
|
font-size: 12px;
|
|
margin-top: 4px;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.color-input {
|
|
width: 100%;
|
|
height: 40px;
|
|
border-radius: 6px;
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.range-input {
|
|
width: 100%;
|
|
height: 6px;
|
|
border-radius: 3px;
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
outline: none;
|
|
}
|
|
|
|
.swap-modal {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background-color: rgba(50, 50, 50, 0.95);
|
|
backdrop-filter: blur(15px);
|
|
border: 2px solid #4caf50;
|
|
padding: 20px;
|
|
border-radius: 12px;
|
|
z-index: 2000;
|
|
color: #ffffff;
|
|
text-align: center;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
|
|
|
|
h4 {
|
|
margin: 0 0 15px 0;
|
|
color: #4caf50;
|
|
}
|
|
|
|
p {
|
|
margin-bottom: 20px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.cancel-button {
|
|
padding: 8px 16px;
|
|
background-color: #ff4444;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
// Chart specific styles
|
|
.chart-container {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
padding: 6px;
|
|
|
|
.chart-title {
|
|
font-size: 14px;
|
|
font-weight: bold;
|
|
margin-bottom: 8px;
|
|
text-align: center;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.chart-content {
|
|
flex: 1;
|
|
width: 100%;
|
|
min-height: 100px;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
// Label-Value specific styles
|
|
.label-value-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
text-align: left;
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
.label-text {
|
|
font-size: 12px;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.value-text {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
// Text and Icon styles
|
|
.text-container,
|
|
.icon-container {
|
|
text-align: left;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.icon-container {
|
|
text-align: center;
|
|
font-size: 24px;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
.element-dropdown {
|
|
position: absolute;
|
|
transform: translateY(35px);
|
|
background-color: rgba(50, 50, 50, 0.95);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
padding: 10px;
|
|
z-index: 9999;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
min-width: 150px;
|
|
|
|
.dropdown-button {
|
|
padding: 8px 12px;
|
|
background-color: rgba(85, 85, 85, 0.8);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
backdrop-filter: blur(5px);
|
|
transition: all 0.2s ease;
|
|
|
|
&:hover {
|
|
background-color: rgba(85, 85, 85, 1);
|
|
}
|
|
}
|
|
} |