power-compass 1.1.0 → 1.2.0
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26bc2ae1f34241bacc436f286af5d06b129f5fbe733372488dc8f15fbfb55619
|
|
4
|
+
data.tar.gz: 74408ead98e87ec3c7cce7e509452deed80da7b3a75d34551faf245b643b1e87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69aecbee8979254438ee469bbc86def7fc4f840792028142327d11b769271cbc73e07e5b4874b9b340cd4e38ecbdecd1e6cc6a831020a1ecb420e160a97c7d78
|
|
7
|
+
data.tar.gz: 39666d6787f0149b3aad9334bb83dd6c387af27f067d82cb5bc1564d08719ffc8b345783b7bb099d4d7cd5c47f220d701f7997f0592df471453b45abaaea6900
|
|
@@ -390,7 +390,7 @@ Background colors ------------------*/
|
|
|
390
390
|
/* Standard Font Weights */
|
|
391
391
|
/* Non_Standard Font Weights */
|
|
392
392
|
/* Link Colors */
|
|
393
|
-
/* line
|
|
393
|
+
/* line 10, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
394
394
|
.main-page-sidebar {
|
|
395
395
|
transition: width 0.2s ease;
|
|
396
396
|
flex-grow: 0;
|
|
@@ -406,7 +406,7 @@ Background colors ------------------*/
|
|
|
406
406
|
transition: all 0.2s ease-out;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
/* line
|
|
409
|
+
/* line 24, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
410
410
|
.main-page-sidebar .nitro_sidebar {
|
|
411
411
|
height: 100%;
|
|
412
412
|
width: 100%;
|
|
@@ -415,28 +415,28 @@ Background colors ------------------*/
|
|
|
415
415
|
scrollbar-width: none;
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
-
/* line
|
|
418
|
+
/* line 31, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
419
419
|
.main-page-sidebar .nitro_sidebar > div:first-child {
|
|
420
420
|
height: 100%;
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
/* line
|
|
423
|
+
/* line 36, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
424
424
|
.main-page-sidebar .nitro_sidebar [class^="pb_nav_list"][class*="_vertical"][class*="_normal"]
|
|
425
425
|
[class*="pb_nav_list_kit_item"][class*="pb_nav_list_item"][class*="_active"][class*="_highlighted_border_none"] {
|
|
426
426
|
box-shadow: inset 3px 0 0 #0056cf !important;
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
/* line
|
|
429
|
+
/* line 42, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
430
430
|
.main-page-sidebar .nitro_sidebar .pb_collapsible_content_kit .pb_nav_list_item_link {
|
|
431
431
|
padding-left: 47px !important;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
/* line
|
|
434
|
+
/* line 47, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
435
435
|
.main-page-sidebar .nitro_sidebar .collapsed_nav_icon_container {
|
|
436
436
|
font-size: 17.5px;
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
/* line
|
|
439
|
+
/* line 51, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
440
440
|
.main-page-sidebar .nitro_sidebar .pb_nav_list_item_text_collapsible {
|
|
441
441
|
overflow: hidden;
|
|
442
442
|
display: -webkit-box;
|
|
@@ -444,33 +444,44 @@ Background colors ------------------*/
|
|
|
444
444
|
-webkit-box-orient: vertical;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
/* line
|
|
447
|
+
/* line 59, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
448
448
|
.main-page-sidebar .nitro_sidebar .collapsible_nav_wrapper_active .pb_collapsible_content_kit {
|
|
449
449
|
box-shadow: inset 3px 0 0 #0056CF !important;
|
|
450
450
|
background-color: #f7fbff;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
/* line
|
|
453
|
+
/* line 64, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
454
454
|
.main-page-sidebar .nitro_sidebar .pb_collapsible_content_kit {
|
|
455
455
|
margin-left: unset !important;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
/* line
|
|
458
|
+
/* line 67, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
459
459
|
.main-page-sidebar .nitro_sidebar .pb_nav_list_item_icon_left,
|
|
460
460
|
.main-page-sidebar .nitro_sidebar .pb_nav_list_item_icon_left_collapsible {
|
|
461
461
|
color: #687887 !important;
|
|
462
462
|
font-size: 17.5px !important;
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
-
/* line
|
|
465
|
+
/* line 72, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
466
466
|
.main-page-sidebar .nitro_sidebar [class^="pb_nav_list"][class*="_vertical"][class*="_normal"]
|
|
467
467
|
[class*="pb_nav_list_kit_item"][class*="pb_nav_list_item"][class*="_link"]:hover
|
|
468
468
|
[class*="_icon"] {
|
|
469
469
|
color: #0056CF !important;
|
|
470
470
|
}
|
|
471
471
|
|
|
472
|
+
@media only screen and (min-width: 575px) {
|
|
473
|
+
/* line 84, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
474
|
+
[data-compass-component="SideMenu"]:empty {
|
|
475
|
+
width: 220px;
|
|
476
|
+
}
|
|
477
|
+
/* line 87, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
478
|
+
.main-page-sidebar--collapsed [data-compass-component="SideMenu"]:empty {
|
|
479
|
+
width: 60px;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
472
483
|
@media only screen and (max-width: 574px) {
|
|
473
|
-
/* line
|
|
484
|
+
/* line 94, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
474
485
|
.main-page-sidebar {
|
|
475
486
|
position: fixed;
|
|
476
487
|
top: 0;
|
|
@@ -480,7 +491,7 @@ Background colors ------------------*/
|
|
|
480
491
|
z-index: 5000;
|
|
481
492
|
padding-top: 92px;
|
|
482
493
|
}
|
|
483
|
-
/* line
|
|
494
|
+
/* line 103, ../../app/assets/stylesheets/compass/navigation/_sidebar.scss */
|
|
484
495
|
.main-page-sidebar.mobile-open {
|
|
485
496
|
left: 0;
|
|
486
497
|
width: 100%;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
@import "tokens/spacing";
|
|
5
5
|
|
|
6
6
|
$full-nav-height: 92px;
|
|
7
|
+
$sidebar-expanded: 220px;
|
|
8
|
+
$sidebar-collapsed: 60px;
|
|
7
9
|
|
|
8
10
|
.main-page-sidebar {
|
|
9
11
|
transition: width 0.2s ease;
|
|
@@ -75,6 +77,19 @@ $full-nav-height: 92px;
|
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
|
|
80
|
+
// The side menu sizes the sidebar once it mounts. Until then its mount node is
|
|
81
|
+
// empty, so it holds the width the menu will have, from the collapsed-state
|
|
82
|
+
// cookie, and the sidebar doesn't jump when the menu mounts.
|
|
83
|
+
@media only screen and (min-width: #{$screen-xs-min}) {
|
|
84
|
+
[data-compass-component="SideMenu"]:empty {
|
|
85
|
+
width: $sidebar-expanded;
|
|
86
|
+
|
|
87
|
+
.main-page-sidebar--collapsed & {
|
|
88
|
+
width: $sidebar-collapsed;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
78
93
|
@media only screen and (max-width: #{$screen-xs-max}) {
|
|
79
94
|
.main-page-sidebar {
|
|
80
95
|
position: fixed;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="
|
|
1
|
+
<div class="<%= menu_classes %>" id="main-side-menu" data-turbo-permanent>
|
|
2
2
|
<div class="nitro_sidebar">
|
|
3
3
|
<div data-compass-component="SideMenu" data-compass-component-props="<%= compass_props.to_json %>"></div>
|
|
4
4
|
</div>
|
|
@@ -5,10 +5,21 @@ module Compass
|
|
|
5
5
|
class Sidebar < ApplicationComponent
|
|
6
6
|
include ConfigProps
|
|
7
7
|
|
|
8
|
+
# Written by the npm package's side menu when the user collapses or expands it.
|
|
9
|
+
COLLAPSED_COOKIE = "compass_sidebar_collapsed"
|
|
10
|
+
|
|
8
11
|
prop :filters, default: {}
|
|
9
12
|
|
|
10
13
|
private
|
|
11
14
|
|
|
15
|
+
def menu_classes
|
|
16
|
+
class_names("main-page-sidebar", "main-page-sidebar--collapsed" => collapsed?)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def collapsed?
|
|
20
|
+
request.cookies[COLLAPSED_COOKIE] == "1"
|
|
21
|
+
end
|
|
22
|
+
|
|
12
23
|
def compass_props
|
|
13
24
|
{ **super, filters: filters }
|
|
14
25
|
end
|
data/lib/compass/version.rb
CHANGED