@deephaven/golden-layout 0.40.3 → 0.40.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,150 +1,234 @@
1
- // Color variables (appears count calculates by raw css)
2
- $color0: #000000; // Appears 7 times
3
- $color1: #222222; // Appears 3 times
4
- $color2: #eeeeee; // Appears 2 times
5
- $color3: #dddddd; // Appears 2 times
6
-
7
- $color4: #cccccc; // Appears 1 time
8
- $color5: #444444; // Appears 1 time
9
- $color6: #999999; // Appears 1 time
10
- $color7: #111111; // Appears 1 time
11
- $color8: #452500; // Appears 1 time
12
- $color9: #555555; // Appears 1 time
13
- $color10: #ffffff; // Appears 2 time
1
+ @import '@deephaven/components/scss/custom.scss';
2
+
3
+ $tab-height: 28px;
4
+ $drag-border-width: 5px;
5
+
6
+ $close-button-height: 8px;
7
+ $tab-font-size: 12px;
8
+
9
+ $lm-tab-color: $gray-400;
10
+ $lm-tab-hover-color: $gray-300;
11
+ $lm-tab-active-color: $white;
12
+ $lm-tab-icon-color: $gray-200;
13
+
14
+ //make some subtle tab background colors relative to our defined color
15
+ $lm-tab-active-background: $content-bg;
16
+ $lm-tab-background: darken($lm-tab-active-background, 3.5);
17
+ $lm-header-background: darken($lm-tab-active-background, 5);
18
+
19
+ $lm-close-button-hover-color: $gray-100;
20
+ $lm-close-button-active-color: $gray-400;
21
+
22
+ $lm-splitter-hover-color: $gray-400;
23
+ $lm-splitter-active-color: $gray-300;
14
24
 
15
25
  // ".lm_dragging" is applied to BODY tag during Drag and is also directly applied to the root of the object being dragged
26
+ //is added to the body class, prevents overflow in our app context
27
+ .lm_dragging {
28
+ overflow: hidden;
29
+ pointer-events: none;
30
+
31
+ // we still need events on our header for scroll while dragging to work
32
+ .lm_goldenlayout .lm_header {
33
+ pointer-events: auto;
34
+
35
+ // disable other control buttons during drag
36
+ .lm_controls > li {
37
+ pointer-events: none;
38
+
39
+ &.lm_tabpreviousbutton,
40
+ &.lm_tabnextbutton {
41
+ pointer-events: auto;
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ // disable hover styling during drag (pointer-events still needed)
48
+ body:not(.lm_dragging) .lm_header .lm_tab:not(.lm_active):hover {
49
+ color: $lm-tab-hover-color;
50
+ }
51
+
52
+ .lm_header .lm_tab.lm_active .lm_close_tab {
53
+ background-color: $lm-tab-active-background;
54
+ }
55
+
56
+ body:not(.lm_dragging) .lm_header .lm_tab:hover .lm_close_tab {
57
+ background-color: $lm-close-button-active-color;
58
+ }
59
+
60
+ body:not(.lm_dragging) .lm_header .lm_tab .lm_close_tab:hover {
61
+ background-color: $lm-close-button-hover-color;
62
+ }
16
63
 
17
64
  // Entire GoldenLayout Container, if a background is set, it is visible as color of "pane header" and "splitters" (if these latest has opacity very low)
18
65
  .lm_goldenlayout {
19
- background: $color0;
66
+ background: $background;
67
+ position: absolute;
20
68
  }
21
69
 
22
70
  // Single Pane content (area in which final dragged content is contained)
23
71
  .lm_content {
24
- background: $color1;
72
+ background: $content-bg;
73
+ overflow: visible;
25
74
  }
26
75
 
27
76
  // Single Pane content during Drag (style of moving window following mouse)
28
77
  .lm_dragProxy {
29
78
  .lm_content {
30
- box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
79
+ height: 100%;
80
+ width: 100%;
81
+ box-shadow: $box-shadow;
82
+ }
83
+ .lm_header {
84
+ height: $tab-height;
85
+ box-shadow: none;
86
+
87
+ .lm_tab,
88
+ .lm_tab.lm_active {
89
+ border: 0;
90
+ box-shadow: $box-shadow;
91
+ }
31
92
  }
32
93
  }
33
94
 
34
95
  // Placeholder Container of target position
35
96
  .lm_dropTargetIndicator {
36
- box-shadow: inset 0 0 30px $color0;
37
- outline: 1px dashed $color4;
38
- transition: all 200ms ease;
97
+ @include ants-base($white, $black); //replace with ants
98
+ box-sizing: border-box;
99
+ transition: all $transition-mid ease;
39
100
 
40
101
  // Inner Placeholder
41
102
  .lm_inner {
42
- background: $color0;
43
- opacity: 0.2;
103
+ box-sizing: border-box;
104
+ border: $ant-thickness solid transparent; //offset shadow using a transparent border
105
+ box-shadow: inset 0 0 1rem 1px rgba(black, 0.45); //true black for this shadow
106
+ opacity: 1; //set opacity back to 1, default 0.2 and backroudn was solid.
107
+ background: rgba(
108
+ $primary,
109
+ 0.1
110
+ ); //apply scrim as rgba background now instead
44
111
  }
45
112
  }
46
113
 
47
114
  // Separator line (handle to change pane size)
48
115
  .lm_splitter {
49
- background: $color0;
116
+ background: $lm-splitter-hover-color;
50
117
  opacity: 0.001;
51
- transition: opacity 200ms ease;
118
+ transition: opacity $transition ease;
52
119
 
53
120
  &:hover, // When hovered by mouse...
54
121
  &.lm_dragging {
55
- background: $color5;
122
+ background: $lm-splitter-active-color;
56
123
  opacity: 1;
57
124
  }
58
125
  }
59
126
 
60
127
  // Pane Header (container of Tabs for each pane)
61
128
  .lm_header {
62
- height: 20px;
129
+ box-sizing: content-box; // golden-layout sets a js height using a content box model
130
+ height: $tab-height;
131
+ padding-top: 0;
132
+ background: $lm-header-background;
133
+ box-shadow: inset 0 -1px 0 0 $background;
134
+ // inset box shadows with 0-blur used to draw borders without impacting spacing or GL size calculations.
135
+ // golden layout default styling doesnt have the same border styling we want
136
+ // this trick is used elsewhere in the header as well for the same purpose
63
137
  user-select: none;
64
138
 
139
+ .lm_controls {
140
+ > li {
141
+ height: 100%;
142
+ width: 24px;
143
+ }
144
+ }
145
+
65
146
  &.lm_selectable {
66
147
  cursor: pointer;
67
148
  }
68
149
 
69
150
  // Single Tab container. A single Tab is set for each pane, a group of Tabs are contained in ".lm_header"
70
151
  .lm_tab {
71
- font-family: Arial, sans-serif;
72
- font-size: 12px;
73
- color: $color6;
74
- background: $color7;
75
- box-shadow: 2px -2px 2px rgba(0, 0, 0, 0.3);
76
- margin-right: 2px;
77
- padding-bottom: 2px;
78
- padding-top: 2px;
79
-
80
- /*.lm_title // Present in LIGHT Theme
81
- {
82
- padding-top:1px;
83
- }*/
152
+ display: flex;
153
+ align-items: center;
154
+ font-family: $font-family-sans-serif;
155
+ background-color: $lm-tab-background;
156
+ color: $lm-tab-color;
157
+ height: $tab-height;
158
+ font-size: $tab-font-size;
159
+ min-width: 5rem;
160
+ margin: 0;
161
+ padding: 0 $spacer-1 0 $spacer-2;
162
+ box-shadow: inset -1px -1px 0 0 $background; // acting as bottom and right border
163
+ transition: color $transition, background-color $transition;
164
+ max-width: 12rem;
165
+ white-space: nowrap;
166
+ overflow: hidden;
167
+
168
+ .lm_title {
169
+ flex-grow: 1;
170
+ padding-right: $spacer-1;
171
+ // add equalized spacing for tabs without close buttons
172
+ // so that when a tab is longer then min-width it still
173
+ // is balanced with equal padding. Extra padding is then
174
+ // removed from tabs with close buttons via negative margin
175
+ }
176
+
177
+ .lm_title_before {
178
+ display: flex;
179
+ align-items: center;
180
+ }
84
181
 
85
182
  // Close Tab Icon
86
183
  .lm_close_tab {
87
- width: 11px;
88
- height: 11px;
89
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAATElEQVR4nG3OwQ0DMQwDwZGRBtR/j1YJzMc5+IDoR+yCVO29g+pu981MFgqZmRdAfU7+CYWcbF11LwALjpBL0N0qybNx/RPU+gOeiS/+XCRwDlTgkQAAAABJRU5ErkJggg==);
90
- background-position: center center;
91
- background-repeat: no-repeat;
92
- top: 4px;
93
- right: 6px;
94
- opacity: 0.4;
184
+ $lm-close-button-padding: 4px;
185
+
186
+ cursor: pointer;
187
+ position: relative;
188
+ width: $close-button-height;
189
+ height: $close-button-height;
190
+ padding: $lm-close-button-padding;
191
+ margin-left: -$spacer-1; // undo padding on title
192
+ //fa-times-light url svg encoded as a background mask
193
+ background-color: $lm-tab-background; //set the backgroun color to nothing
194
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath d='M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z'/%3E%3C/svg%3E");
195
+ mask-position: center center;
196
+ mask-repeat: no-repeat;
197
+ mask-size: $close-button-height;
198
+ opacity: 1;
199
+ transition: background-color $transition;
95
200
 
96
201
  &:hover {
97
202
  opacity: 1;
98
203
  }
99
204
  }
100
-
101
- // If Tab is active, so if it's in foreground
102
- &.lm_active {
103
- border-bottom: none;
104
- box-shadow: 0 -2px 2px $color0;
105
- padding-bottom: 3px;
106
-
107
- .lm_close_tab {
108
- opacity: 1;
109
- }
110
- }
111
- }
112
- }
113
-
114
- .lm_dragProxy.lm_bottom,
115
- .lm_stack.lm_bottom {
116
- .lm_header .lm_tab {
117
- box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
118
- &.lm_active {
119
- box-shadow: 0 2px 2px $color0;
120
- }
121
205
  }
122
206
  }
123
207
 
124
208
  // If Pane Header (container of Tabs for each pane) is selected (used only if addition of new Contents is made "by selection" and not "by drag")
125
209
  .lm_selected {
126
210
  .lm_header {
127
- background-color: $color8;
211
+ background-color: $lm-tab-active-background;
128
212
  }
129
213
  }
130
214
 
131
- .lm_tab {
132
- &:hover, // If Tab is hovered
133
- &.lm_active // If Tab is active, so if it's in foreground
134
- {
135
- background: $color1;
136
- color: $color3;
215
+ .lm_header .lm_tab.lm_active,
216
+ .lm_header .lm_tab.lm_active:hover {
217
+ height: $tab-height;
218
+ background-color: $lm-tab-active-background;
219
+ color: $lm-tab-active-color;
220
+ padding-bottom: 0;
221
+ box-shadow: inset -1px 0 0 0 $background; // act as right border only when active
222
+ // also kills the default shadow, doesn't work well with our design
223
+ &.lm_focusin {
224
+ box-shadow: inset 0 1px $primary, inset -1px 0 0 0 $background; // top focus indicator, right border
137
225
  }
138
226
  }
139
227
 
140
- .lm_header .lm_tabs .lm_tab.lm_keyboard_active {
141
- color: $color0;
142
- background: $color3;
143
- }
144
-
145
- // Dropdown arrow for additional tabs when too many to be displayed
146
- .lm_header .lm_controls .lm_tabdropdown:before {
147
- color: $color10;
228
+ .lm_window_blur {
229
+ .lm_header .lm_tab.lm_active.lm_focusin {
230
+ box-shadow: none;
231
+ }
148
232
  }
149
233
 
150
234
  // Pane controls (popout, maximize, minimize, close)
@@ -169,7 +253,23 @@ $color10: #ffffff; // Appears 2 time
169
253
 
170
254
  // Icon to Maximize Pane, so it will fill the entire GoldenLayout Container
171
255
  .lm_maximise {
172
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKElEQVR4nGP8////fwYCgImQAgYGBgYWKM2IR81/okwajIpgvsMbVgAwgQYRVakEKQAAAABJRU5ErkJggg==);
256
+ background-size: 16px;
257
+ // vsChromeMaximize
258
+ background-image: str-replace(
259
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$lm-tab-icon-color}' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E"),
260
+ '#',
261
+ '%23'
262
+ );
263
+ }
264
+
265
+ .lm_tabdropdown {
266
+ background-size: 16px;
267
+ // vsChevronDown
268
+ background-image: str-replace(
269
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$lm-tab-icon-color}' d='M7.976 10.072l4.357-4.357.62.618L8.284 11h-.618L3 6.333l.619-.618 4.357 4.357z'/%3E%3C/svg%3E"),
270
+ '#',
271
+ '%23'
272
+ );
173
273
  }
174
274
 
175
275
  // Icon to Close Pane and so remove it from GoldenLayout Container
@@ -178,52 +278,103 @@ $color10: #ffffff; // Appears 2 time
178
278
  }
179
279
 
180
280
  .lm_tabnextbutton {
181
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAABxJREFUCNdjUGBgEGBg4GBgYGFgYAKTHCARoDgABscAe0vtWukAAAAASUVORK5CYII=);
281
+ background-size: 16px;
282
+ // vsChevronRight
283
+ background-image: str-replace(
284
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$lm-tab-icon-color}' d='M10.072 8.024L5.715 3.667l.618-.62L11 7.716v.618L6.333 13l-.618-.619 4.357-4.357z'/%3E%3C/svg%3E"),
285
+ '#',
286
+ '%23'
287
+ );
182
288
  }
183
289
 
184
290
  .lm_tabpreviousbutton {
185
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAABxJREFUCNdjYGJgYGFg4GBgEGBgUACTHCARoDgABSMAXe2fzqEAAAAASUVORK5CYII=);
291
+ background-size: 16px;
292
+ // vsChevronLeft
293
+ background-image: str-replace(
294
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$lm-tab-icon-color}' d='M5.928 7.976l4.357 4.357-.618.62L5 8.284v-.618L9.667 3l.618.619-4.357 4.357z'/%3E%3C/svg%3E"),
295
+ '#',
296
+ '%23'
297
+ );
186
298
  }
187
299
  }
188
300
 
189
- // If a specific Pane is maximized
190
- .lm_maximised {
191
- // Pane Header (container of Tabs for each pane) can have different style when is Maximized
192
- .lm_header {
193
- background-color: $color0;
194
- }
301
+ .lm_header .lm_tabdropdown_list {
302
+ z-index: $zindex-dropdown;
303
+ background: $lm-tab-background;
304
+ top: 22px;
305
+ right: 24px;
306
+ box-shadow: $box-shadow-900;
307
+ border-radius: $border-radius;
308
+ max-width: 12rem;
309
+
310
+ .lm_tabdropdown_search {
311
+ padding: $spacer-1;
312
+ input {
313
+ padding: $input-padding-y $input-padding-x;
314
+ line-height: $input-line-height;
315
+ color: $input-color;
316
+ background-color: $input-bg;
317
+ border: $input-border-width solid $input-border-color;
318
+ border-radius: $border-radius;
319
+ max-width: 100%;
320
+
321
+ &::placeholder {
322
+ color: $input-placeholder-color;
323
+ opacity: 1;
324
+ }
195
325
 
196
- // Pane controls are different in Maximized Mode, especially the old Icon "Maximise" that now has a different meaning, so "Minimize" (even if CSS Class did not change)
197
- .lm_controls {
198
- .lm_maximise {
199
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAJ0lEQVR4nGP8//8/AzGAiShVI1YhCwMDA8OsWbPwBmZaWhoj0SYCAN1lBxMAX4n0AAAAAElFTkSuQmCC);
326
+ &:focus {
327
+ border-color: $input-focus-border-color;
328
+ box-shadow: $input-btn-focus-box-shadow;
329
+ outline: 0;
330
+ }
200
331
  }
201
332
  }
202
- }
203
333
 
204
- // If a specific Pane is Popped Out, so move it to a different Browser Window, Icon to restore original position is:
205
- .lm_popin {
206
- cursor: pointer;
334
+ .lm_tab {
335
+ background: $lm-tab-background;
336
+ color: $lm-tab-hover-color;
337
+ box-shadow: none;
207
338
 
208
- // Background of Icon
209
- .lm_bg {
210
- background: $color10;
211
- opacity: 0.3;
339
+ &.lm_keyboard_active {
340
+ color: $lm-tab-hover-color;
341
+ background-color: $primary-dark;
342
+ }
343
+
344
+ &:hover {
345
+ color: $lm-tab-active-color;
346
+ background-color: $primary;
347
+ }
212
348
  }
349
+ }
213
350
 
214
- // Icon to Restore original position in Golden Layout Container
215
- .lm_icon {
216
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAWklEQVR4nJWOyw3AIAxDHcQC7L8jbwT3AlJBfNp3SiI7dtRaLSlKKeoA1oEsKSQZCEluexw8Tm3ohk+E7bnOUHUGcNh+HwbBygw4AZ7FN/Lt84p0l+yTflV8AKQyLdcCRJi/AAAAAElFTkSuQmCC);
217
- background-position: center center;
218
- background-repeat: no-repeat;
219
- border-left: 1px solid $color2;
220
- border-top: 1px solid $color2;
221
- opacity: 0.7;
351
+ // If a specific Pane is maximized
352
+ .lm_maximised {
353
+ border: 15px solid rgba($black, 0.85);
354
+ height: 100% !important;
355
+ width: 100% !important;
356
+ .lm_items {
357
+ box-shadow: $box-shadow-900;
222
358
  }
223
359
 
224
- &:hover {
225
- .lm_icon {
226
- opacity: 1;
360
+ // Pane controls are different in Maximized Mode, especially the old Icon "Maximise" that now has a different meaning, so "Minimize" (even if CSS Class did not change)
361
+ .lm_controls {
362
+ .lm_maximise {
363
+ opacity: 0.7;
364
+ // vsChromeMinimize
365
+ background-image: str-replace(
366
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$gray-100}' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E"),
367
+ '#',
368
+ '%23'
369
+ );
370
+
371
+ &:hover {
372
+ opacity: 1;
373
+ }
227
374
  }
228
375
  }
229
376
  }
377
+
378
+ .lm_tabs:empty + .lm_controls .lm_maximise {
379
+ display: none;
380
+ }