/***************************************************************************** * Open MCT, Copyright (c) 2014-2020, United States Government * as represented by the Administrator of the National Aeronautics and Space * Administration. All rights reserved. * * Open MCT is 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. * * Open MCT includes source code licensed under additional open source * licenses. See the Open Source Licenses file (LICENSES.md) included with * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ /*********************************************************************** CLOCKS AND TIMERS */ .c-clock, .c-timer { display: flex; align-items: center; font-size: 1.25em; overflow: hidden; > * { flex: 0 0 auto; display: flex; align-items: center; } &__value { color: $colorBodyFgEm; } .c-frame & { // When in a Display or Flexible Layout @include abs(); padding: $interiorMargin; } } .c-clock { > * + * { margin-left: $interiorMargin; } } .c-timer { $ctrlW: 22px; &__controls { font-size: 1rem !important; margin-right: 0; min-width: 0; overflow: hidden; transition: $transOut; width: 0; .c-icon-button:before { font-size: 1em; } } &__direction { font-size: 0.9rem !important; margin-right: $interiorMargin; } &__ng-controller { font-size: 0; width: 0; } &:hover { .c-timer__controls { transition: $transOut; // On purpose: want this to take a bit longer margin-right: $interiorMargin; width: $ctrlW * 2; } &.is-stopped .c-timer__controls { width: $ctrlW; } } &__direction, &__value { opacity: 0.5; } &.is-started { .c-timer { &__direction, &__value { opacity: 1; } } } } /*********************************************************************** SUMMARY WIDGETS */ /************************* WIDGET OBJECT */ @mixin cSummaryWidget() { box-shadow: $shdwBtns; border-radius: $basicCr; border-style: solid; border-width: 1px; cursor: default; display: inline-flex; align-items: center; justify-content: center; &[href] { cursor: pointer; } &__icon { // Hide the icon holder element. Selector below shows this once 'icon-*' is added. display: none; font-size: 0.9em; } &__label { @include ellipsize(); } [class*='icon-'] { // When 'icon-*' is added, show this element and add margin display: block; margin-right: $interiorMarginSm; } } .c-summary-widget, .c-sw { @include cSummaryWidget(); padding: $interiorMarginLg $interiorMarginLg * 2; &--thumb { max-width: 30%; padding: $interiorMarginSm $interiorMargin; } } .widget-edit-holder { // Hide edit area when in browse mode display: none; } .widget-rule-header { display: flex; align-items: center; > * + * { margin-left: $interiorMargin; } } [class*='action-buttons-wrapper'] { white-space: nowrap; line-height: $btnStdH; } .widget-rules-wrapper, .widget-rule-content, .w-widget-test-data-content { transition: $transIn; min-height: 0; height: 0; opacity: 0; overflow: hidden; pointer-events: none; } .widget-rules-wrapper { flex: 1 1 auto !important; } .widget-rule-content.expanded { overflow: visible !important; min-height: 50px; height: auto; margin-top: $interiorMargin; opacity: 1; pointer-events: inherit; } .w-widget-test-data-content { .l-enable { padding: $interiorMargin 0; } .w-widget-test-data-items { max-height: 20vh; overflow-y: scroll !important; padding-right: $interiorMargin; } } .l-widget-thumb-wrapper, .l-compact-form label { $ruleLabelW: 40%; $ruleLabelMaxW: 150px; display: flex; max-width: $ruleLabelMaxW; width: $ruleLabelW; } .js-summary-widget__message { display: none; } /**************\ EDITING A WIDGET */ .w-summary-widget { // Classes for editor layout while editing a widget // This selector is ugly and brittle, but needed to prevent interface from showing when widget is in a layout // being edited. @include abs(); display: flex; flex-direction: column; > .l-summary-widget { // Main view of the summary widget // Give some airspace and center the widget in the area margin: 30px auto; } .widget-edit-holder { display: flex; // Overrides `display: none` during Browse mode flex: 1 1 auto; overflow: hidden; .flex-accordion-holder { // Needed because otherwise accordion elements "creep" when contents expand and contract display: block !important; } &.expanded-widget-test-data { .w-widget-test-data-content { min-height: 50px; height: auto; opacity: 1; pointer-events: inherit; } &:not(.expanded-widget-rules) { // Test data is expanded and rules are collapsed // Make text data take up all the vertical space .flex-accordion-holder { display: flex; } } } &.expanded-widget-rules { .widget-rules-wrapper { min-height: 50px; height: 100%; // Fix for Chrome 73 scrolling bug opacity: 1; pointer-events: inherit; } } } &.s-status-no-data { .widget-edit-holder { opacity: 0.3; pointer-events: none; } .js-summary-widget__message { display: flex; } } .l-compact-form { // Overrides on .l-compact-form ul { &:last-child { margin: 0; } li { &:not(.widget-rule-header) { &:not(.connects-to-previous) { border-top: 1px solid $colorFormLines; } } &.connects-to-previous { padding: $interiorMargin 0; } > label { display: block; // Needed to align text to right text-align: right; width: 90px; flex: 0 0 auto; } .controls { display: flex; flex-wrap: wrap; align-items: center; align-content: stretch; > * + * { margin-left: $interiorMarginSm; } } } } &.s-widget-test-data-item { // Single line of ul li label span, etc. ul { li { border: none !important; > label { display: inline-block; width: auto; text-align: left; } } } } } .t-condition .controls { > * { margin-bottom: $interiorMargin; } } } .widget-edit-holder { font-size: 0.8rem; } .widget-rules-wrapper { // Wrapper area that holds n rules box-sizing: border-box; overflow-y: scroll; padding-right: $interiorMargin; } .l-widget-rule, .l-widget-test-data-item { box-sizing: border-box; margin-bottom: $interiorMarginSm; padding: $interiorMargin $interiorMarginLg; } .rule-title { flex: 0 1 auto; color: pullForward($colorBodyFg, 50%); } .rule-description { flex: 1 1 auto; @include ellipsize(); color: pushBack($colorBodyFg, 20%); } .s-widget-rule, .s-widget-test-data-item { background-color: rgba($colorBodyFg, 0.1); border-radius: $basicCr; } .c-sw-edit { padding: $interiorMargin; &__ui { display: flex; flex-direction: column; &__header { border-top: 1px solid $colorInteriorBorder; display: flex; align-items: center; margin: $interiorMargin 0; padding: $interiorMargin 0; text-transform: uppercase; > * + * { margin-left: $interiorMarginSm; } } } } .c-sw-rule { &__grippy-wrapper { $d: 8px; flex: 0 0 auto; cursor: move; width: $d; height: $d; transform: translateY(-1px); } &__grippy { @include grippy($c: $colorItemTreeVC, $dir: 'y'); @include abs(); } } /******************************************************************* CHANNEL SELECTOR */ .channel-selector { .line { margin-bottom: $interiorMargin; min-height: $formInputH; } .treeview { $myBg: darken($colorBodyBg, 2%); @include reactive-input(); min-height: 300px; max-height: 400px; overflow: auto; padding: $interiorMargin; } .btns-add-remove { margin-top: 150px; .s-button { display: block; margin-bottom: $interiorMargin; text-align: center; } } } /******************************************************************* AUTOFLOW TABULAR */ // NOT UNIT TESTED AS OF 3/12/19 .autoflow { $headerH: $formInputH; $colMargin: $interiorMargin; $colW: 225px; $valW: 70px; $valPad: 5px; $rowH: 15px; font-size: 0.75rem; &:hover { .l-autoflow-header .s-button.change-column-width { transition: $transIn; opacity: 1; } } .l-autoflow-header { bottom: auto; height: $headerH; line-height: $headerH; min-width: $colW; .t-last-update { overflow: hidden; } .s-button.change-column-width { transition: $transOut; opacity: 0; } .l-filter { display: block; margin-right: $interiorMargin; input.t-filter-input { width: 150px; } } } .l-autoflow-items { overflow-x: scroll; overflow-y: hidden; top: $headerH + $interiorMargin * 2; white-space: nowrap; .l-autoflow-col { box-sizing: border-box; border-left: 1px solid $colorInteriorBorder; display: inline-block; padding-left: $colMargin; padding-right: $colMargin; vertical-align: top; width: $colW; .l-autoflow-row { box-sizing: border-box; border-bottom: 1px solid rgba(#fff,0.05); display: block; height: $rowH; line-height: $rowH; margin-bottom: 1px; margin-top: 1px; position: relative; &:first-child { border-top: none; } &:hover { background: rgba(#fff, 0.1); } .l-autoflow-item.r { color: lighten($colorBodyFg, 10%); } &.first-in-group { border-top: 1px solid lighten($colorInteriorBorder, 20%); } .l-autoflow-item { display: block; &.l { float: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: auto; } &.r { border-radius: $smallCr; float: right; margin-left: $interiorMargin; padding-left: $valPad; padding-right: $valPad; text-align: right; } } } &:first-child { border-left: none; padding-left: 0; } } } } .frame { &.child-frame.panel { .autoflow .l-autoflow-header .l-filter { display: none; } } } /******************************************************************* INDICATORS */ /* Indicators are generally only displayed in the ue-bottom-bar element of the main interface */ .h-indicator, mct-indicators mct-include { display: inline; // Fallback for display: contents display: contents; } /************************************************* DATETIME UI */ @mixin complexFieldHolder($myW) { width: $myW + $interiorMargin; input[type="text"] { width: $myW; } } .complex.datetime { span { display: inline-block; margin-right: $interiorMargin; } .fields { margin-top: $interiorMarginSm 0; padding: $interiorMarginSm 0; } .date { @include complexFieldHolder(80px); } .time.md { @include complexFieldHolder(60px); } .time.sm { @include complexFieldHolder(40px); } } /************************************************* INFO BUBBLES */ .l-infobubble-wrapper { $arwSize: 5px; box-shadow: rgba(black, 0.4) 0 1px 5px; position: relative; z-index: 50; .l-infobubble { display: inline-block; min-width: $bubbleMinW; max-width: $bubbleMaxW; padding: 5px 10px; &:before { content:""; position: absolute; width: 0; height: 0; } table { width: 100%; tr { td { padding: 2px 0; vertical-align: top; &.label { padding-right: $interiorMargin * 2; white-space: nowrap; } &.value { //word-wrap: break-word; // Doesn't work in