node-red-dashboard
Version:
A set of dashboard nodes for Node-RED
673 lines (626 loc) • 20.4 kB
text/less
/* */
/* Copyright 2016,2018 JS Foundation and other contributors, https://js.foundation/ */
/* Copyright 2016 IBM Corp. */
/* Copyright 2015 Andrei Tatar */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* */
@media(max-width: 660px) {
md-sidenav,
md-sidenav.md-locked-open,
md-sidenav.md-closed.md-locked-open-add-active {
min-width: 160px ;
width: auto;
max-width: 200px ;
}
}
@media(min-width: 661px) {
md-sidenav,
md-sidenav.md-locked-open,
md-sidenav.md-closed.md-locked-open-add-active {
min-width: 200px ;
width: auto;
max-width: 320px ;
}
}
md-sidenav ng-md-icon {
padding-right: 4px;
}
md-sidenav i {
padding-right: 4px;
}
md-sidenav md-list-item .md-list-item-inner>p {
line-height: 20px;
}
@media(max-width: 959px) {
.md-sidenav-left, md-sidenav {
top: 56px ;
}
}
@media(min-width: 960px) {
.md-sidenav-left, md-sidenav {
top: 64px;
}
}
md-toast .md-toast-content {
height: auto;
}
md-toast .md-toast-error {
color: rgba(255, 64, 41, 0.84);
font-weight: 500;
font-size: large;
}
md-card {
box-shadow: none;
}
.node-red-ui--notabs {
color: #888;
font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;
display: flex;
height: 100%;
align-items: center;
justify-content: center;
opacity: 1;
animation-name: fadeInOpacity;
animation-iteration-count: 1;
animation-timing-function: ease-in;
animation-duration: 2.5s;
}
@keyframes fadeInOpacity {
0% {
opacity: 0;
}
30% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.node-red-ui--inline-link {
width: 100%;
height: 100%;
position: absolute;
}
.node-red-ui--inline-link iframe {
width: 100%;
height: 100%;
}
.ie9 img[src$=".svg"] {
width: 100%;
}
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
img[src$=".svg"] {
width: 100%;
}
}
@supports (-ms-overflow-style: none) {
overflow: auto ;
}
/*
ALL COMPONENTS/CONTENT
*/
@baseFont: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
@baseColor: #fff;
@pageBackgroundColor: #eee;
@pageTitlebarBackgroundColor: #0094CE;
@pageSidebarBackgroundColor: #fff;
@groupBackgroundColor: #fff;
@groupTextColor: #00A4DE;
@groupBorderColor: #fff;
@widgetTextColor: #000;
@widgetBackgroundColor: #4FBAE4;
@widgetBorderColor: #fff;
@nrTheme: true;
@nrTemplateTheme: true;
@nrUnitHeight: 24px;
& when (@nrTheme = true) {
.nr-dashboard-disabled {
opacity: 0.4 ;
pointer-events: none ;
}
body.nr-dashboard-theme {
background-color: @pageBackgroundColor;
font-family: @baseFont;
}
body.nr-dashboard-theme md-content {
background: transparent;
height: 100%;
& when (@nrTemplateTheme = true) {
color: @groupTextColor;
}
}
body.nr-dashboard-theme md-select-menu md-content {
height: initial;
}
body.nr-dashboard-theme md-content md-card {
background-color: @widgetBorderColor;
color: @widgetTextColor;
}
/* Some colour classes */
body.nr-dashboard-theme .nr-dashboard-color { color: @groupTextColor; }
body.nr-dashboard-theme .nr-dashboard-error { color: #ff2929; }
body.nr-dashboard-theme .nr-dashboard-warning { color: #eaf42f; }
body.nr-dashboard-theme .nr-dashboard-ok { color: #49db3c; }
body.nr-dashboard-theme .nr-dashboard-dim { opacity: 0.5 ; }
/*
DASHBOARD HEADER
*/
body.nr-dashboard-theme md-toolbar {
background-color: @pageTitlebarBackgroundColor;
}
/*
DASHBOARD SIDEBAR
*/
body.nr-dashboard-theme md-sidenav {
color: @groupTextColor;
// background-color: @pageSidebarBackgroundColor;
background-color: @groupBackgroundColor;
}
a.md-no-style, button.md-no-style {
background-color: transparent;
}
/*
GROUP SPECIFIC
*/
.nr-dashboard-theme ui-card-panel {
background-color: @groupBackgroundColor;
border: 1px solid @groupBorderColor;
& p.nr-dashboard-cardtitle {
color: @groupTextColor;
}
}
/*
COMPONENT-SPECIFIC
*/
.nr-dashboard-theme .md-button.md-primary {
// color: lighten(@widgetBackgroundColor, 8);
}
.nr-dashboard-theme .md-button[disabled] {
color: rgba(0,0,0,0.38);
cursor: default;
}
/* Button */
.nr-dashboard-theme .nr-dashboard-button .md-button {
background-color: @widgetBackgroundColor;
color: white;
}
.nr-dashboard-theme .nr-dashboard-button .md-button:hover {
background-color: lighten(@widgetBackgroundColor, 6);
}
.nr-dashboard-theme .nr-dashboard-template .md-button[disabled] {
color: #888;
}
.nr-dashboard-theme .nr-dashboard-button .md-button.md-primary {
color: white;
background-color: lighten(@widgetBackgroundColor, 4);
}
/* Date picker */
.nr-dashboard-theme .nr-dashboard-date-picker md-input-container .md-input {
color: @widgetTextColor;
border-bottom-color: @widgetBackgroundColor;
font-family: inherit;
}
.nr-dashboard-theme .nr-dashboard-date-picker md-input-container .md-input::-webkit-input-placeholder {
color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-date-picker .md-button.md-icon-button {
/* background-color: @widgetBackgroundColor; */
}
.nr-dashboard-theme .nr-dashboard-date-picker .md-button.md-icon-button md-icon {
color: @widgetBackgroundColor;
}
.nr-dashboard-theme .nr-dashboard-date-picker .md-datepicker-triangle-button .md-datepicker-expand-triangle {
border-top-color: @widgetTextColor;
}
.md-default-theme .md-calendar-day-header, .md-calendar-day-header {
color: contrast(@pageTitlebarBackgroundColor);
background-color: @pageTitlebarBackgroundColor;
}
.md-default-theme .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator, .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator, .md-default-theme .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator, .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator {
background: @widgetBackgroundColor;
color: contrast(@widgetBackgroundColor);
border-color: transparent;
}
.md-default-theme .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator, .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator {
border: 1px solid @widgetBackgroundColor;
}
.md-datepicker-calendar-pane.md-pane-open {
width: 345px;
}
/* Chart */
.nr-dashboard-theme .nr-dashboard-chart-title {
}
.nr-dashboard-theme .nr-dashboard-chart-titlel {
font-size: larger;
font-weight: 500 ;
}
/* Colour Picker */
.nr-dashboard-theme .color-picker-panel {
background-color: @groupBackgroundColor;
border-color: @groupBorderColor;
box-shadow: 0 0 1px rgba(255,255,255,.5);
}
.nr-dashboard-theme .color-picker-input-wrapper > input {
color: @widgetTextColor;
background-color: @widgetBorderColor;
font-family: inherit;
}
.nr-dashboard-theme .color-picker-wrapper .color-picker-panel.color-picker-panel-round .color-picker-grid-wrapper .color-picker-row .color-picker-grid .color-picker-grid-inner {
background-color: @widgetBorderColor;
}
.nr-dashboard-theme .color-picker-wrapper.color-picker-open {
border-width:0;
}
/* Dropdown */
.nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value,
.nr-dashboard-theme .nr-dashboard-dropdown md-select .md-select-value.md-select-placeholder {
color: @widgetTextColor;
border-color: @widgetTextColor;
border-bottom-width: 2px;
padding: 0px 2px;
}
.nr-dashboard-theme .nr-dashboard-dropdown .md-select-icon {
color: @widgetTextColor;
}
.nr-dashboard-theme md-select-menu {
margin-left: -2px;
}
.nr-dashboard-theme md-select-menu md-content {
border: 1px solid #4F4F4F;
padding: 0px;
}
.nr-dashboard-theme md-select-menu, .nr-dashboard-theme md-select-menu md-option {
background-color: @groupBackgroundColor;
color: @widgetTextColor;
}
.nr-dashboard-theme md-select-menu md-option[selected] {
color: @groupTextColor ;
background-color: @groupBackgroundColor ;
}
.nr-dashboard-theme md-select-menu.md-default-theme md-option:focus:not([disabled]):not([selected]),
md-select-menu md-option:focus:not([disabled]):not([selected]) {
background-color: @groupBackgroundColor;
}
.nr-dashboard-theme md-select-menu md-option:hover {
background-color: lighten(@widgetBackgroundColor, 5) ;
}
/* Gauge */
.nr-dashboard-theme .nr-dashboard-gauge {}
.nr-dashboard-theme .nr-dashboard-gauge text {
fill: @widgetTextColor;
margin: 8px;
}
.nr-dashboard-theme .nr-dashboard-gauge-title {
margin: 8px 0px 16px 0px;
z-index: 1;
}
.nr-dashboard-theme .nr-dashboard-gauge-titlel {
font-size: larger;
font-weight: 500 ;
}
.nr-dashboard-theme .nr-dashboard-gauge-titles {
font-size: x-small;
padding-bottom: 16px;
}
/* Numeric */
.nr-dashboard-theme .nr-dashboard-numeric .value {
background-color: @widgetBorderColor;
color: @widgetTextColor;
}
/* Slider */
.nr-dashboard-theme .nr-dashboard-slider {}
.nr-dashboard-theme .nr-dashboard-slider .md-track {
background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme .nr-dashboard-slider .md-track-fill {
background-color: @widgetBackgroundColor;
}
.nr-dashboard-theme .nr-dashboard-slider .md-thumb:after {
background-color: @widgetBackgroundColor;
border-color: @widgetBackgroundColor;
}
.nr-dashboard-theme .nr-dashboard-slider .md-focus-ring {
background-color: @widgetBackgroundColor;
transform: scale(.4);
opacity: 1;
}
.nr-dashboard-theme .nr-dashboard-slider .md-sign {
background-color: @widgetBackgroundColor;
}
.md-sign:after {
border-top-color: @widgetBackgroundColor ;
}
.nr-dashboard-theme .nr-dashboard-slider .md-track-ticks {
color: rgba(0,0,0,0);
}
/* Switch */
.nr-dashboard-theme .nr-dashboard-switch {}
.nr-dashboard-theme .nr-dashboard-switch md-switch .md-bar {
background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-bar {
background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 0.5);
}
.nr-dashboard-theme .nr-dashboard-switch md-switch .md-thumb {
background-color: rgb(148, 148, 148);
}
.nr-dashboard-theme .nr-dashboard-switch md-switch.md-checked .md-thumb {
background-color: rgba(red(@widgetBackgroundColor), green(@widgetBackgroundColor), blue(@widgetBackgroundColor), 1);
}
/* Template */
& when (@nrTemplateTheme = true) {
md-list {
padding: unset;
}
md-list-item {
min-height: @nrUnitHeight * 2;
height: @nrUnitHeight * 2;
}
md-list-item._md-button-wrap>div.md-button:first-child {
background-color: @widgetBorderColor;
height: inherit;
padding: 0 6px;
}
md-list-item.md-2-line {
height: @nrUnitHeight * 2;
min-height: @nrUnitHeight * 2;
}
md-list-item.md-3-line {
height: @nrUnitHeight * 3;
min-height: @nrUnitHeight * 3;
}
md-list-item .md-list-item-inner {
background: @widgetBorderColor;
//color: @widgetTextColor;
padding-left: 8px;
width: 100%;
height: 100%;
}
md-progress-linear {
padding-top: 4px ;
}
md-progress-linear .md-container {
margin-top: @nrUnitHeight / 2;
background-color: @pageBackgroundColor;
}
md-progress-linear .md-container .md-bar {
background-color: lighten(@widgetBackgroundColor, 5);
}
md-checkbox {
min-height: @nrUnitHeight * 2;
margin-left: 6px;
margin-bottom: 0px;
}
md-checkbox .md-icon {
border-color: @widgetBackgroundColor ;
}
md-checkbox[disabled] .md-icon {
border-color: #888 ;
}
md-checkbox.md-checked .md-icon {
background-color: lighten(@widgetBackgroundColor, 5);
border-color: transparent ;
}
md-checkbox .md-label {
position: absolute;
top: 32%;
}
md-checkbox[disabled] .md-label {
color: #888;
}
md-checkbox:last-of-type {
margin-left: 6px;
}
md-radio-button {
min-height: @nrUnitHeight * 2;
margin-left: 6px;
margin-bottom: 0px;
}
md-radio-button .md-off, md-radio-button .md-on {
border-color: @widgetBackgroundColor ;
}
md-radio-button[disabled] .md-off, md-radio-button[disabled] .md-on {
border-color: #888 ;
}
md-radio-button.md-checked .md-on {
background-color: @widgetBackgroundColor ;
}
md-radio-button .md-label {
position: absolute;
top: 32%;
}
md-radio-button[disabled] .md-label {
color: #888;
}
md-divider {
border-color: @widgetBackgroundColor ;
}
.nr-dashboard-theme .nr-dashboard-template path {
fill: @widgetBackgroundColor;
}
.nr-dashboard-template {
padding: (@nrUnitHeight / 8) 6px;
p, h1, h2, h3, h4 {
color: @widgetTextColor ;
background-color : @widgetBorderColor ;
}
}
.nr-dashboard-theme .nr-dashboard-template .md-button .md-no-style {
background: initial ;
color: initial ;
}
.nr-dashboard-theme .nr-dashboard-template .md-button[disabled] {
color: #ccc;
}
.nr-dashboard-theme .nr-dashboard-template .md-button.md-primary:not([disabled]) {
color: @widgetTextColor;
background-color: lighten(@widgetBackgroundColor, 5);
}
.nr-dashboard-theme .nr-dashboard-template .md-button .ng-scope {
color: unset;
}
.nr-dashboard-template .md-button {
color: white;
}
.nr-dashboard-theme .nr-dashboard-template .md-button:not(:first-of-type) {
margin-top: @nrUnitHeight * 3 / 4;
}
.nr-dashboard-theme .nr-dashboard-template .md-button {
margin: 0;
//padding: 0px 12px;
min-height: @nrUnitHeight * 3 / 2;
min-width: unset;
line-height: unset;
background-color: @widgetBackgroundColor;
&.md-fab.md-mini {
padding: unset;
}
}
.nr-dashboard-theme .nr-dashboard-template .md-button:not([disabled]):hover {
background-color: lighten(@widgetBackgroundColor, 8);
}
.nr-dashboard-theme .nr-dashboard-template .md-button.md-primary:not([disabled]):hover {
background-color: lighten(@widgetBackgroundColor, 8);
}
.nr-dashboard-theme .nr-dashboard-template .md-button.md-primary.md-raised:not([disabled]) {
background-color: lighten(@widgetBackgroundColor, 5);
}
.nr-dashboard-theme .nr-dashboard-template .md-button.md-primary.md-raised:not([disabled]):hover {
background-color: lighten(@widgetBackgroundColor, 8);
}
// .md-button:disabled {
// background-color: @widgetBackgroundColor;
// }
.nr-dashboard-theme .nr-dashboard-template {
::-webkit-scrollbar {
height: 12px;
width: 12px;
background: @widgetBackgroundColor;
}
::-webkit-scrollbar-thumb {
background: @baseColor;
-webkit-border-radius: 1ex;
-webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75);
}
}
}
/* Text-Input */
.nr-dashboard-theme .nr-dashboard-textinput {}
.nr-dashboard-theme .nr-dashboard-textinput label {
color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-has-value label {
color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused label {
color: @groupTextColor;
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container.md-input-focused input {
border-color: @groupTextColor;
font-family: inherit;
}
.nr-dashboard-theme .nr-dashboard-textinput md-input-container .md-input:invalid {
color: #DA5252;
}
.nr-dashboard-theme .nr-dashboard-textinput input {
border-color: @widgetTextColor;
color: @widgetTextColor;
border-bottom-width: 2px;
font-family: inherit;
}
/* Text */
.nr-dashboard-theme .nr-dashboard-text {}
/* Dialog */
.nr-dashboard-theme md-dialog {
color: @widgetTextColor;
background-color: @groupBackgroundColor;
border: 1px solid @groupBorderColor;
}
.nr-dashboard-theme .md-dialog-content {
padding: 24px;
}
/* Form */
.nr-dashboard-theme .nr-dashboard-form-button {
background-color: @widgetBackgroundColor;
color: white;
}
.nr-dashboard-theme .nr-dashboard-form-button:hover {
background-color: lighten(@widgetBackgroundColor, 10) ;
}
.nr-dashboard-theme .nr-dashboard-form-button:focus {
background-color: lighten(@widgetBackgroundColor, 10) ;
}
.nr-dashboard-theme .nr-dashboard-form {
color: @widgetTextColor;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container input {
border-color: @widgetTextColor;
color: @widgetTextColor;
font-family: inherit;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container label {
color: @widgetTextColor;;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container.md-input-has-value:not(.md-input-invalid) label {
color: @widgetTextColor;;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container:not(.md-input-invalid).md-input-focused input {
border-color: @groupTextColor ;
}
.nr-dashboard-theme .nr-dashboard-form form md-input-container:not(.md-input-invalid).md-input-focused label {
color: @groupTextColor ;
}
.nr-dashboard-theme .nr-dashboard-form form .md-input-invalid input {
border-color: #d00 ;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-input-invalid label {
color: #d00 ;
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-checkbox.md-checked .md-icon {
background-color: lighten(@widgetBackgroundColor, 10);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-checkbox .md-icon{
border-color: @widgetTextColor;;
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch .md-bar{
background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch .md-thumb {
background-color: rgb(148, 148, 148);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch.md-checked .md-bar{
background-color: lighten(@widgetBackgroundColor, 10);
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-input-container md-switch.md-checked .md-thumb {
background-color: @widgetBackgroundColor;
}
.nr-dashboard-theme md-content .nr-dashboard-form form md-datepicker {
background-color: inherit;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-calendar-icon {
fill: @groupTextColor;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-open .md-datepicker-calendar-icon {
fill: @widgetBackgroundColor ;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-input {
color: @widgetTextColor;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-input-container {
border-color: @widgetTextColor;;
}
.nr-dashboard-theme md-content .nr-dashboard-form form .md-datepicker-expand-triangle{
border-top-color: @widgetBackgroundColor ;
}
}