power-compass 0.4.1 → 0.5.1
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 +4 -4
- data/Rakefile +1 -1
- data/{vendor/assets/stylesheets → app/assets/builds}/compass/layout.css +35 -30
- data/app/assets/stylesheets/compass/navigation/_header.scss +4 -0
- data/app/components/compass/layout/header/dropdown_menu.html.erb +3 -3
- data/app/components/compass/layout/header/dropdown_menu.rb +19 -11
- data/app/components/compass/layout/header/tasks_menu.html.erb +1 -3
- data/lib/compass/engine.rb +0 -9
- data/lib/compass/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 719e6a292a665ca861af7bc67fc0e60d9b0bbcc5303b358988450178744568c1
|
|
4
|
+
data.tar.gz: 0fdb94018c58431b1bd131fd5c0bc063ab38bcf25d2243fd2408bcc54c2ecbd4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac3054cdee5acf69b7f2f4ed71a528940b13728a44568dd800221cb1a11d9028573edf5a491b50fc55b2b59eeed8b01a8ad8320bfec4700fdeea773ea7b5483e
|
|
7
|
+
data.tar.gz: 4d9d5785bf1f07fd37dda55fd9e2348735dc7243756d088b43fe13f70f299337c5f0f0302ea4d511c2e36e9f1a6a175939a18cf129a234f406a9eeab24d7f0d8
|
data/Rakefile
CHANGED
|
@@ -24,7 +24,7 @@ namespace :compass do
|
|
|
24
24
|
asset = env["compass/layout.css"]
|
|
25
25
|
raise "Could not compile compass/layout.css" unless asset
|
|
26
26
|
|
|
27
|
-
out = File.join(gem_root, "
|
|
27
|
+
out = File.join(gem_root, "app", "assets", "builds", "compass", "layout.css")
|
|
28
28
|
FileUtils.mkdir_p(File.dirname(out))
|
|
29
29
|
File.write(out, asset.source)
|
|
30
30
|
puts "Wrote #{out}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
/* Default Equations */
|
|
3
3
|
/* Penner Equations (approximated) originally created by @robpenner */
|
|
4
4
|
/* Accessible color tokens (WCAG-compliant) — defined in _colors_accessible.scss */
|
|
@@ -597,6 +597,11 @@ Background colors ------------------*/
|
|
|
597
597
|
display: block;
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
+
/* line 19, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
601
|
+
.nitro-navigation .compass-logo img {
|
|
602
|
+
max-height: 32px;
|
|
603
|
+
}
|
|
604
|
+
|
|
600
605
|
@media screen and (max-width: 574px) {
|
|
601
606
|
/* line 16, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
602
607
|
.nitro-navigation .compass-logo {
|
|
@@ -604,19 +609,19 @@ Background colors ------------------*/
|
|
|
604
609
|
}
|
|
605
610
|
}
|
|
606
611
|
|
|
607
|
-
/* line
|
|
612
|
+
/* line 28, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
608
613
|
.nitro-navigation .compass-logo-mobile {
|
|
609
614
|
display: none;
|
|
610
615
|
}
|
|
611
616
|
|
|
612
617
|
@media screen and (max-width: 574px) {
|
|
613
|
-
/* line
|
|
618
|
+
/* line 28, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
614
619
|
.nitro-navigation .compass-logo-mobile {
|
|
615
620
|
display: block;
|
|
616
621
|
}
|
|
617
622
|
}
|
|
618
623
|
|
|
619
|
-
/* line
|
|
624
|
+
/* line 36, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
620
625
|
.nitro-navigation .navigation-topbar {
|
|
621
626
|
margin: 0;
|
|
622
627
|
border-bottom: 0;
|
|
@@ -628,7 +633,7 @@ Background colors ------------------*/
|
|
|
628
633
|
justify-content: space-between;
|
|
629
634
|
}
|
|
630
635
|
|
|
631
|
-
/* line
|
|
636
|
+
/* line 46, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
632
637
|
.nitro-navigation .navigation-topbar-left, .nitro-navigation .navigation-topbar-center, .nitro-navigation .navigation-topbar-right {
|
|
633
638
|
position: static;
|
|
634
639
|
padding: 0 32px;
|
|
@@ -638,145 +643,145 @@ Background colors ------------------*/
|
|
|
638
643
|
}
|
|
639
644
|
|
|
640
645
|
@media screen and (max-width: 767px) {
|
|
641
|
-
/* line
|
|
646
|
+
/* line 46, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
642
647
|
.nitro-navigation .navigation-topbar-left, .nitro-navigation .navigation-topbar-center, .nitro-navigation .navigation-topbar-right {
|
|
643
648
|
padding: 0 8px;
|
|
644
649
|
}
|
|
645
650
|
}
|
|
646
651
|
|
|
647
652
|
@media screen and (max-width: 767px) {
|
|
648
|
-
/* line
|
|
653
|
+
/* line 59, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
649
654
|
.nitro-navigation .navigation-topbar-center {
|
|
650
655
|
flex: 1;
|
|
651
656
|
}
|
|
652
657
|
}
|
|
653
658
|
|
|
654
|
-
/* line
|
|
659
|
+
/* line 64, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
655
660
|
.nitro-navigation .navigation-topbar-right {
|
|
656
661
|
color: #FFFFFF;
|
|
657
662
|
margin: 2px;
|
|
658
663
|
}
|
|
659
664
|
|
|
660
665
|
@media screen and (max-width: 767px) {
|
|
661
|
-
/* line
|
|
666
|
+
/* line 64, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
662
667
|
.nitro-navigation .navigation-topbar-right {
|
|
663
668
|
flex: 0;
|
|
664
669
|
padding-right: 0px;
|
|
665
670
|
}
|
|
666
671
|
}
|
|
667
672
|
|
|
668
|
-
/* line
|
|
673
|
+
/* line 73, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
669
674
|
.nitro-navigation .navigation-topbar-right .impersonating {
|
|
670
675
|
border: 2px solid #ff7034;
|
|
671
676
|
}
|
|
672
677
|
|
|
673
|
-
/* line
|
|
678
|
+
/* line 78, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
674
679
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper .pb_dropdown_container {
|
|
675
680
|
min-width: 280px;
|
|
676
681
|
max-height: calc(100vh - 90px);
|
|
677
682
|
}
|
|
678
683
|
|
|
679
|
-
/* line
|
|
684
|
+
/* line 82, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
680
685
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper .pb_dropdown_container > [class*="pb_dropdown_option"][class*="selected"] [class^="pb_body"] {
|
|
681
686
|
color: #687887 !important;
|
|
682
687
|
}
|
|
683
688
|
|
|
684
|
-
/* line
|
|
689
|
+
/* line 87, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
685
690
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper div[data-dropdown-custom-trigger] {
|
|
686
691
|
display: block !important;
|
|
687
692
|
}
|
|
688
693
|
|
|
689
|
-
/* line
|
|
694
|
+
/* line 92, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
690
695
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper:has(svg.svg_3x) .pb_dropdown_trigger {
|
|
691
696
|
width: 65px !important;
|
|
692
697
|
}
|
|
693
698
|
|
|
694
|
-
/* line
|
|
699
|
+
/* line 96, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
695
700
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper:has(svg.svg_3x) .icon-caret svg.svg_xs {
|
|
696
701
|
position: relative !important;
|
|
697
702
|
right: 10px !important;
|
|
698
703
|
}
|
|
699
704
|
|
|
700
|
-
/* line
|
|
705
|
+
/* line 103, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
701
706
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper:has(svg.svg_2x) .pb_dropdown_trigger {
|
|
702
707
|
width: 45px !important;
|
|
703
708
|
}
|
|
704
709
|
|
|
705
|
-
/* line
|
|
710
|
+
/* line 107, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
706
711
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper:has(svg.svg_2x) .icon-caret svg.svg_xs {
|
|
707
712
|
position: relative !important;
|
|
708
713
|
right: 5px !important;
|
|
709
714
|
}
|
|
710
715
|
|
|
711
|
-
/* line
|
|
716
|
+
/* line 113, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
712
717
|
.nitro-navigation .navigation-topbar-right .dropdown_wrapper .pb_dropdown_trigger img {
|
|
713
718
|
width: 38px;
|
|
714
719
|
border-radius: 1000px;
|
|
715
720
|
}
|
|
716
721
|
|
|
717
|
-
/* line
|
|
722
|
+
/* line 120, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
718
723
|
.nitro-navigation .navigation-topbar-right .menu-section-options li {
|
|
719
724
|
padding: 0px;
|
|
720
725
|
}
|
|
721
726
|
|
|
722
|
-
/* line
|
|
727
|
+
/* line 122, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
723
728
|
.nitro-navigation .navigation-topbar-right .menu-section-options li svg {
|
|
724
729
|
margin-right: 8px;
|
|
725
730
|
}
|
|
726
731
|
|
|
727
|
-
/* line
|
|
732
|
+
/* line 126, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
728
733
|
.nitro-navigation .navigation-topbar-right .menu-section-options a {
|
|
729
734
|
color: #687887;
|
|
730
735
|
}
|
|
731
736
|
|
|
732
|
-
/* line
|
|
737
|
+
/* line 129, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
733
738
|
.nitro-navigation .navigation-topbar-right .menu-section-options:hover {
|
|
734
739
|
background-color: #F3F7FB;
|
|
735
740
|
}
|
|
736
741
|
|
|
737
|
-
/* line
|
|
742
|
+
/* line 133, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
738
743
|
.nitro-navigation .navigation-topbar-right .pb_dropdown_option_selected_focused,
|
|
739
744
|
.nitro-navigation .navigation-topbar-right .pb_dropdown_option_selected {
|
|
740
745
|
background-color: unset !important;
|
|
741
746
|
}
|
|
742
747
|
|
|
743
|
-
/* line
|
|
748
|
+
/* line 138, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
744
749
|
.nitro-navigation .navigation-topbar-right [class^="pb_dropdown"] [class*="pb_list_kit"] li {
|
|
745
750
|
padding: 0px !important;
|
|
746
751
|
}
|
|
747
752
|
|
|
748
753
|
@media screen and (max-width: 767px) {
|
|
749
|
-
/* line
|
|
754
|
+
/* line 143, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
750
755
|
.nitro-navigation .navigation-topbar-left {
|
|
751
756
|
flex: 0;
|
|
752
757
|
padding-left: 0px;
|
|
753
758
|
}
|
|
754
759
|
}
|
|
755
760
|
|
|
756
|
-
/* line
|
|
761
|
+
/* line 150, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
757
762
|
.nitro-navigation .nitro-header-breadcrumbs-menu .breadcrumbs-separator {
|
|
758
763
|
width: 1px;
|
|
759
764
|
padding-top: 2px;
|
|
760
765
|
padding-bottom: 2px;
|
|
761
766
|
}
|
|
762
767
|
|
|
763
|
-
/* line
|
|
768
|
+
/* line 154, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
764
769
|
.nitro-navigation .nitro-header-breadcrumbs-menu .breadcrumbs-separator::before, .nitro-navigation .nitro-header-breadcrumbs-menu .breadcrumbs-separator::after {
|
|
765
770
|
background: rgba(255, 255, 255, 0.1);
|
|
766
771
|
}
|
|
767
772
|
|
|
768
|
-
/* line
|
|
773
|
+
/* line 159, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
769
774
|
.nitro-navigation .nitro-header-breadcrumbs-menu .breadcrumb-item {
|
|
770
775
|
white-space: nowrap;
|
|
771
776
|
}
|
|
772
777
|
|
|
773
|
-
/* line
|
|
778
|
+
/* line 162, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
774
779
|
.nitro-navigation .nitro-header-breadcrumbs-menu .breadcrumb-item:hover svg,
|
|
775
780
|
.nitro-navigation .nitro-header-breadcrumbs-menu .breadcrumb-item:hover .pb_detail_kit_color_light.dark {
|
|
776
781
|
color: #FFFFFF !important;
|
|
777
782
|
}
|
|
778
783
|
|
|
779
|
-
/* line
|
|
784
|
+
/* line 168, ../../app/assets/stylesheets/compass/navigation/_header.scss */
|
|
780
785
|
.nitro-navigation .nitro-header-breadcrumbs-menu .breadcrumb-item:first-child {
|
|
781
786
|
min-width: 59px;
|
|
782
787
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<% if
|
|
1
|
+
<% if content.present? %>
|
|
2
2
|
<%= pb_rails("dropdown", props: options) do %>
|
|
3
3
|
<%= pb_rails("dropdown/dropdown_trigger") do %>
|
|
4
4
|
<%= pb_rails("flex", props: { align_items: "center", cursor: "pointer", classname: icon_wrapper_classname }) do %>
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
<% end %>
|
|
8
8
|
<% end %>
|
|
9
9
|
<%= pb_rails("dropdown/dropdown_container", props: { right: { inset: true, value: "xxs" }, padding_y: "sm" }) do %>
|
|
10
|
-
<%=
|
|
10
|
+
<%= content %>
|
|
11
11
|
<% end %>
|
|
12
12
|
<% end %>
|
|
13
13
|
<% else %>
|
|
14
|
-
|
|
14
|
+
<div data-compass-component="DropdownMenu" data-compass-component-props="<%= react_props.to_json %>"></div>
|
|
15
15
|
<% end %>
|
|
@@ -4,32 +4,40 @@ module Compass
|
|
|
4
4
|
class Layout
|
|
5
5
|
class Header
|
|
6
6
|
class DropdownMenu < ApplicationComponent
|
|
7
|
+
include Compass::ConfigProps
|
|
8
|
+
|
|
7
9
|
prop :icon
|
|
8
|
-
prop :
|
|
10
|
+
prop :image_url
|
|
11
|
+
prop :classname
|
|
12
|
+
prop :filters, default: {}
|
|
9
13
|
prop :options, default: {}
|
|
10
14
|
|
|
11
15
|
private
|
|
12
16
|
|
|
13
|
-
def image?
|
|
14
|
-
icon&.try(:key?, :url)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
17
|
def pb_component
|
|
18
|
-
|
|
18
|
+
image_url.present? ? "image" : "icon"
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def icon_wrapper_classname
|
|
22
|
-
|
|
22
|
+
image_url.present? ? "image-trigger" : "icon-caret"
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def icon_props
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{ icon:, size: "2x", fixed_width: true }
|
|
26
|
+
if image_url.present?
|
|
27
|
+
{ url: image_url }
|
|
29
28
|
else
|
|
30
|
-
icon
|
|
29
|
+
{ icon:, size: "2x", fixed_width: true }
|
|
31
30
|
end
|
|
32
31
|
end
|
|
32
|
+
|
|
33
|
+
def react_props
|
|
34
|
+
{
|
|
35
|
+
**compass_props,
|
|
36
|
+
**(image_url.present? ? { imageUrl: image_url } : { icon: icon }),
|
|
37
|
+
classname: classname,
|
|
38
|
+
filters: filters
|
|
39
|
+
}
|
|
40
|
+
end
|
|
33
41
|
end
|
|
34
42
|
end
|
|
35
43
|
end
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
<div data-compass-component="TaskMenu" data-compass-component-props="<%= { **compass_props, tasksUrl: tasks_url }.to_json %>"></div>
|
|
3
|
-
<% end %>
|
|
1
|
+
<div data-compass-component="TaskMenu" data-compass-component-props="<%= { **compass_props, tasksUrl: tasks_url }.to_json %>"></div>
|
data/lib/compass/engine.rb
CHANGED
|
@@ -32,15 +32,6 @@ module Compass
|
|
|
32
32
|
|
|
33
33
|
initializer "compass.assets" do |app|
|
|
34
34
|
if app.config.respond_to?(:assets)
|
|
35
|
-
if root.join("vendor", "assets", "stylesheets", "compass", "layout.css").exist?
|
|
36
|
-
Compass.logger.info "Using precompiled compass/layout.css"
|
|
37
|
-
app.config.assets.paths << root.join("vendor", "assets", "stylesheets")
|
|
38
|
-
else
|
|
39
|
-
Compass.logger.info "Compiling compass/layout.css from source"
|
|
40
|
-
app.config.assets.paths << root.join("app", "assets", "stylesheets")
|
|
41
|
-
app.config.sass.load_paths << root.join("app", "assets", "stylesheets")
|
|
42
|
-
end
|
|
43
|
-
|
|
44
35
|
app.config.assets.precompile += %w[compass/layout.css]
|
|
45
36
|
end
|
|
46
37
|
end
|
data/lib/compass/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: power-compass
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carlos Palhares
|
|
@@ -58,6 +58,7 @@ extra_rdoc_files: []
|
|
|
58
58
|
files:
|
|
59
59
|
- MIT-LICENSE
|
|
60
60
|
- Rakefile
|
|
61
|
+
- app/assets/builds/compass/layout.css
|
|
61
62
|
- app/assets/stylesheets/compass/layout.scss
|
|
62
63
|
- app/assets/stylesheets/compass/navigation/_all.scss
|
|
63
64
|
- app/assets/stylesheets/compass/navigation/_header.scss
|
|
@@ -123,7 +124,6 @@ files:
|
|
|
123
124
|
- lib/compass/search/view_context.rb
|
|
124
125
|
- lib/compass/version.rb
|
|
125
126
|
- lib/tasks/compass_tasks.rake
|
|
126
|
-
- vendor/assets/stylesheets/compass/layout.css
|
|
127
127
|
homepage: https://powerhrg.com
|
|
128
128
|
licenses:
|
|
129
129
|
- MIT
|