* Saving work * Fix conflict * Position the panels by setting the style * Put the div back with height set to 100% in ObjectView. Add markup for drag handles. * Use default position and dimensions if the layout panel is missing those values. Set s-status-editing on the main div to get the drag handles appear for now. * Display Layout and frames major improvements - Moved Toolbar out of Layout.vue and into DisplayLayout.vue; - Styles for object view, Layout, Frame, etc. - Major refactor of markup for frame; - Added abs() mixin; - Styles for is-editing done; - Styles for - TODO: styles for selectable, moveable, etc. * Implement drill in gesture. * Hide the background grid when a frame is drilled in * Edit styling and toolbar WIP - c-search styles moved mostly into mixin; - New .c-labeled-input class; - Browser overrides for number-type input spinners in webkit; * Toolbar WIP - Custom wrapped number input added; - Toolbar buttons WIP; * New toolbar buttons WIP * Define a computed property for the css class object. * Frame edit handles markup and styling * Toolbar, editing and selection style refinements - Moved toolbar back into Layout.vue; - Hard-coded 'is-editing' onto __pane-main for now, removed from DisplayLayout.vue; - Styles for frame in LayoutFrame.vue: -- editing default (dotted border) -- editing .s-selected -- .s-drilled-in (renamed .is-drilled-in) * Refactoring button classes - Lots of stuff broken right now; - TODO: lots of renaming (c-menu-button, c-icon-button, etc.); - Removed import of _controls in search.vue; * Fixes for selection on nested selected elements * Fix conflict * Significant refactoring of button and click-icon classes - Markup and CSS updated; - Toolbar in good shape, prior to merge of vue-layout; * Fix issues with relative font-sizing * Add color palette markup and CSS - Also added Layers menu example; * Font, font-size glyphs and size menu, and more - Added art for font glyph and renamed from .icon-T; - Added new glyph for font-size; - Fixed font-sizing in controls; - Added font-size menu; - Re-org'd toolbar items; * Styling tweak for c-labeled-input - Code cleanup as well; * Fixes for toolbar toggleMenus and labeledNumberInput * Implement resize and move for frames. Added stub for drag 'n drop. * Add custom checkbox control. - Also, code cleanup. * Add toggleButton component - Code and examples * Custom checkbox code cleanups, sanding * - Persist new position/dimensions on the domain object when frames are moved/resized. - Bypass the selection of the layout when dragging a frame is finished to keep the frame selected. - Set the grid size to layoutGrid from domain object or use default if it's not specified. * Fix conflict * Implement resize and move for frames. Added stub for drag 'n drop. * Remove old layout view, was triggering View Switcher and massive confusion when viewing Layouts - TODO: add view provider for new Layout * Enable drag and drop * Changed example toggle-button - Now uses show/hide frame as toggle-button example; * Added pseudocode for handling drag/drop composition change * Add copyright notice * Layout frame and contained components styling - Hyperlinks, Hyperlink buttons, Summary Widgets now use `.u-links` which disables their pointer-events when editing; - Hyperlink buttons, Summary Widgets now expand to fill their containers in a Layout; - Markup and JS for Hyperlinks, Hyperlink buttons, Summary Widgets somewhat modded to use new classing, applied in legacy scss files; * Fix icon sizing error in BrowseBar * Edit and selecting styling for Layouts - WIP! * Edit and selecting styling for Layout frames - Color vars more standardized; - Hover and *-selected styles; * Getting vue-toolbar reverted back to latest - Merging this branch with vue-layout may cause conflicts; * - Implement drag ’n drop. - Set hasFrame to a default value if it’s not set on the configuration. - Emit an event to the parent wrapper component to update the ‘newDomainObject’ prop whenever the domain object is mutated in the display layout child component. * Revert emitting 'update:object' event to the parent. * New branch from topic-core-refactor to use as central point for common CSS work - Manually migrated changes from vue-toolbar, expect conflicts there and in vue-layout; * Manually update constants-snow from vue-toolbar branch * Update markup to use latest button classnames - c-menu-button > c-button--menu; - c-icon-button > c-click-icon; * Various from vue-conductor-style - Mods to input styling; - Input[] styles moved to _controls; - New/revised constants vals; * Resolve bizarre merge conflict when applying stash * Code cleanup * Alias and type-icon fixes - More robust approach to alias indicators; - Added alias indication to tree-item.vue; - TODO: wire up alias indication tree-item.vue; * Accessibility mods, convert elements to <button> - Better reset styles for htmlInputReset mixin to allow use of <button> without browser default styling; - Create button; - BrowseBar action buttons; - c-click-icons; - Removed Preview button from BrowseBar.vue; * Fix styles that were affected during resolving conflicts * Moved draggable into __label element rather than whole <li> * Change the priority to 100 to get the view working properly * Code cleanup * Remove angular layout * Display the object name in the frame header * Tweaks to __header in LayoutFrame - Name now does not overflow frame edge; - Layout strategy now in parity with similar elements in main view; * Remove test() * Add a type for display layout to make it appear in the Create menu. * Change the key type to 'layout' * Clean up code and hide toolbar * Enable toolbar, and revert changes in webpack config * Remove commented code * revert to the original code
309 lines
7.7 KiB
SCSS
309 lines
7.7 KiB
SCSS
/*****************************************************************************
|
|
* Open MCT, Copyright (c) 2014-2018, 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.
|
|
*****************************************************************************/
|
|
|
|
/************************** VISUALS */
|
|
@mixin ancillaryIcon($d, $c) {
|
|
// Used for small icons used in combination with larger icons,
|
|
// like the link and alert icons in tree items.
|
|
color: $c;
|
|
font-size: $d;
|
|
line-height: $d;
|
|
height: $d;
|
|
width: $d;
|
|
}
|
|
|
|
@mixin isAlias() {
|
|
&:after {
|
|
color:$colorIconAlias;
|
|
content: $glyph-icon-link;
|
|
display: block;
|
|
font-family: symbolsfont;
|
|
position: absolute;
|
|
text-shadow: rgba(black, 0.5) 0 1px 4px;
|
|
top: auto; left: 0; bottom: 10%; right: auto;
|
|
transform-origin: left bottom;
|
|
transform: scale(0.5);
|
|
}
|
|
}
|
|
|
|
@mixin bgDiagonalStripes($c: yellow, $a: 0.1, $d: 40px) {
|
|
background-image: linear-gradient(-45deg,
|
|
rgba($c, $a) 25%, transparent 25%,
|
|
transparent 50%, rgba($c, $a) 50%,
|
|
rgba($c, $a) 75%, transparent 75%,
|
|
transparent 100%
|
|
);
|
|
background-repeat: repeat;
|
|
background-size: $d $d;
|
|
}
|
|
|
|
@mixin bgStripes($c: yellow, $a: 0.1, $bgsize: 5px, $angle: 90deg) {
|
|
background-image: linear-gradient($angle,
|
|
rgba($c, $a) 25%, transparent 25%,
|
|
transparent 50%, rgba($c, $a) 50%,
|
|
rgba($c, $a) 75%, transparent 75%,
|
|
transparent 100%
|
|
);
|
|
background-repeat: repeat;
|
|
background-size: $bgsize $bgsize;
|
|
}
|
|
|
|
@mixin noColor() {
|
|
// A "no fill/stroke" selection option. Used in palettes.
|
|
$c: red;
|
|
$s: 48%;
|
|
$e: 52%;
|
|
background-image: linear-gradient(-45deg,
|
|
transparent $s - 5%,
|
|
$c $s,
|
|
$c $e,
|
|
transparent $e + 5%
|
|
);
|
|
background-repeat: no-repeat;
|
|
background-size: contain;
|
|
}
|
|
|
|
@mixin bgTicks($c: $colorBodyFg, $repeatDir: 'x') {
|
|
$deg: 90deg;
|
|
@if ($repeatDir != 'x') {
|
|
$deg: 0deg;
|
|
$repeatDir: repeat-y;
|
|
} @else {
|
|
$repeatDir: repeat-x;
|
|
}
|
|
|
|
background-image: linear-gradient($deg,
|
|
$c 1px, transparent 1px,
|
|
transparent 100%
|
|
);
|
|
background-repeat: $repeatDir;
|
|
}
|
|
|
|
@mixin bgVertStripes($c: yellow, $a: 0.1, $d: 40px) {
|
|
@include background-image(linear-gradient(-90deg,
|
|
rgba($c, $a) 0%, rgba($c, $a) 50%,
|
|
transparent 50%, transparent 100%
|
|
));
|
|
background-repeat: repeat;
|
|
background-size: $d $d;
|
|
}
|
|
|
|
/************************** LAYOUT */
|
|
@mixin abs($m: 0) {
|
|
position: absolute;
|
|
top: $m; right: $m; bottom: $m; left: $m;
|
|
}
|
|
|
|
@mixin gridTwoColumn() {
|
|
display: grid;
|
|
grid-row-gap: 0;
|
|
grid-template-columns: 1fr 2fr;
|
|
align-items: start;
|
|
|
|
[class*="header"] {
|
|
border-radius: $smallCr;
|
|
background-color: $colorInspectorSectionHeaderBg;
|
|
color: $colorInspectorSectionHeaderFg;
|
|
margin: 0 0 $interiorMarginSm 0;
|
|
padding: $interiorMarginSm $interiorMargin;
|
|
|
|
&:not(:first-child) {
|
|
// Allow multiple headers within a component
|
|
margin-top: $interiorMarginLg;
|
|
}
|
|
}
|
|
|
|
[class*="span-all"],
|
|
[class*="header"] {
|
|
@include gridTwoColumnSpanCols();
|
|
}
|
|
}
|
|
|
|
@mixin gridTwoColumnSpanCols() {
|
|
grid-column: 1 / 3;
|
|
}
|
|
|
|
@mixin modalFullScreen() {
|
|
// Optional modifier that makes a c-menu more mobile-friendly
|
|
position: fixed;
|
|
border-radius: 0;
|
|
top: 0; right: 0; bottom: 0; left: 0;
|
|
}
|
|
|
|
/************************** TEXT */
|
|
@mixin ellipsize() {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
@mixin reverseEllipsis() {
|
|
@include ellipsize();
|
|
direction: rtl;
|
|
unicode-bidi:bidi-override;
|
|
}
|
|
|
|
/************************** CONTROLS, BUTTONS */
|
|
@mixin htmlInputReset() {
|
|
appearance: none;
|
|
background: none;
|
|
background-color: transparent;
|
|
border: none;
|
|
border-radius: 0;
|
|
outline: none;
|
|
text-align: inherit;
|
|
|
|
&:focus {
|
|
outline: 0;
|
|
}
|
|
}
|
|
|
|
@mixin input-base() {
|
|
@include htmlInputReset();
|
|
border-radius: $controlCr;
|
|
|
|
&.error {
|
|
background-color: $colorFormFieldErrorBg;
|
|
color: $colorFormFieldErrorFg;
|
|
}
|
|
}
|
|
|
|
@mixin nice-input($bg: $colorInputBg, $fg: $colorInputFg, $shdw: rgba(black, 0.5) 0 0 2px) {
|
|
@include input-base();
|
|
background: $bg;
|
|
color: $fg;
|
|
box-shadow: inset $shdw;
|
|
}
|
|
|
|
@mixin reactive-input($bg: $colorInputBg, $fg: $colorInputFg) {
|
|
@include input-base();
|
|
background: $bg;
|
|
box-shadow: $shdwInput;
|
|
color: $fg;
|
|
|
|
&:hover {
|
|
box-shadow: $shdwInputHov;
|
|
}
|
|
|
|
&:focus {
|
|
box-shadow: $shdwInputFoc;
|
|
}
|
|
}
|
|
|
|
@mixin button($bg: $colorBtnBg, $fg: $colorBtnFg, $radius: $controlCr, $shdw: none) {
|
|
background: $bg;
|
|
color: $fg;
|
|
border-radius: $radius;
|
|
box-shadow: $shdw;
|
|
}
|
|
|
|
@mixin wrappedInput() {
|
|
// An input that is wrapped. Optionally includes a __label or icon element.
|
|
// Based on .c-search.
|
|
@include nice-input();
|
|
display: flex;
|
|
align-items: center;
|
|
padding-left: 4px;
|
|
padding-right: 4px;
|
|
|
|
&:before,
|
|
[class*='__label'] {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
&:before {
|
|
// Adds an icon. Content defined in class.
|
|
direction: rtl; // Aligns glyph to right-hand side of container, for transition
|
|
display: block;
|
|
font-family: symbolsfont;
|
|
flex: 0 0 auto;
|
|
overflow: hidden;
|
|
padding: 2px 0; // Prevents clipping
|
|
transition: width 250ms ease;
|
|
width: 1em;
|
|
}
|
|
|
|
&:hover {
|
|
box-shadow: inset rgba(black, 0.8) 0 0px 2px;
|
|
&:before {
|
|
opacity: 0.9;
|
|
}
|
|
}
|
|
|
|
&--major {
|
|
padding: 4px;
|
|
}
|
|
|
|
&__input,
|
|
input[type='text'],
|
|
input[type='search'],
|
|
input[type='number'] {
|
|
background: none !important;
|
|
box-shadow: none !important; // !important needed to override default for [input]
|
|
flex: 1 1 auto;
|
|
padding-left: 2px !important;
|
|
padding-right: 2px !important;
|
|
min-width: 10px; // Must be set to allow input to collapse below browser min
|
|
}
|
|
|
|
&.is-active {
|
|
&:before {
|
|
padding: 2px 0px;
|
|
width: 0px;
|
|
}
|
|
}
|
|
}
|
|
|
|
/************************** MATH */
|
|
@function percentToDecimal($p) {
|
|
@return $p / 100%;
|
|
}
|
|
|
|
@function decimalToPercent($d) {
|
|
@return percentage($d);
|
|
}
|
|
|
|
/************************** UTILITIES */
|
|
@mixin browserPrefix($prop, $val) {
|
|
#{$prop}: $val;
|
|
-ms-#{$prop}: $val;
|
|
-moz-#{$prop}: $val;
|
|
-webkit-#{$prop}: $val;
|
|
}
|
|
|
|
@mixin userSelectNone() {
|
|
@include browserPrefix(user-select, none);
|
|
}
|
|
|
|
@mixin cursorGrab() {
|
|
cursor: grab;
|
|
cursor: -webkit-grab;
|
|
&:active {
|
|
cursor: grabbing;
|
|
cursor: -webkit-grabbing;
|
|
}
|
|
}
|
|
|
|
@mixin test($c: deeppink, $a: 0.3) {
|
|
background-color: rgba($c, $a) !important;
|
|
}
|