nfg_ui 0.11.5 → 0.11.10
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/app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_custom-forms.scss +4 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_reboot.scss +1 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_custom.scss +4 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_bee.scss +15 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_builder_layout.scss +2 -2
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_interaction.scss +1 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_readmore.scss +24 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_sortable.scss +29 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_sys_only_functionality.scss +51 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_buttons.scss +1 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_card.scss +5 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_custom-forms.scss +12 -2
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_dropdown.scss +9 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_reboot.scss +4 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_slat.scss +3 -18
- data/lib/nfg_ui/components/elements/slat_item.rb +32 -8
- data/lib/nfg_ui/components/traits/typeface.rb +0 -1
- data/lib/nfg_ui/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e34dd1689fbc138c1f6f147056cf00a639784191b11c9589e1e29b0a17a2f404
|
4
|
+
data.tar.gz: 6c926d086c1cc2e0e28f9430af109880b501fd9f3f796f23419a9a765d458126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d88d70a213d8b19fa0638ac70fb93d286cced3bcf1215003bcd313754ba7f6053eba20fa474ccc86fc96d7db4561ec25ea89b266c94f550305df3aa4d85c5d7b
|
7
|
+
data.tar.gz: d31c17da3d988e609660b3490a5950d56e511d569e755ef47c748ef5479ca8b954b96040ec27a608ebd20ae4a4148f0d0e4c41b80c328f22924e97422ed2baa1
|
@@ -1,5 +1,6 @@
|
|
1
1
|
// Our custom styles
|
2
2
|
@import 'custom/activity_feed';
|
3
|
+
@import 'custom/bee';
|
3
4
|
@import 'custom/builder_layout';
|
4
5
|
@import 'custom/campaign_card';
|
5
6
|
@import 'custom/campaign_preview';
|
@@ -13,7 +14,10 @@
|
|
13
14
|
@import 'custom/interaction';
|
14
15
|
@import 'custom/overlay_blocker';
|
15
16
|
@import 'custom/page_header';
|
17
|
+
@import 'custom/readmore';
|
16
18
|
@import 'custom/share_dropdown';
|
19
|
+
@import 'custom/sortable';
|
17
20
|
@import 'custom/status_indicator';
|
21
|
+
@import 'custom/sys_only_functionality';
|
18
22
|
@import 'custom/tile';
|
19
23
|
@import 'custom/video_countdown';
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#bee_plugin_container {
|
2
|
+
height: 600px; // fallback value if calc() isn't supported
|
3
|
+
border-top: 1px solid $border-color;
|
4
|
+
border-bottom: 1px solid $border-color;
|
5
|
+
}
|
6
|
+
|
7
|
+
// Height if just the builder-header is present
|
8
|
+
.builder-header + .builder-container {
|
9
|
+
#bee_plugin_container { height: calc(100vh - 72px); }
|
10
|
+
}
|
11
|
+
|
12
|
+
// Height if both builder-header and builder-nav are present (typical in onboarder)
|
13
|
+
.builder-header + .builder-nav + .builder-container {
|
14
|
+
#bee_plugin_container { height: calc(100vh - 180px); }
|
15
|
+
}
|
data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_builder_layout.scss
CHANGED
@@ -84,7 +84,7 @@ $builder-preview-padding: ($spacer * 2);
|
|
84
84
|
padding: $builder-preview-padding ($builder-preview-padding / 2);
|
85
85
|
@include media-breakpoint-up(lg) {
|
86
86
|
float: left;
|
87
|
-
width:
|
87
|
+
width: 67%;
|
88
88
|
height: 100%;
|
89
89
|
overflow-y: auto;
|
90
90
|
> :last-child { margin-bottom: $builder-preview-padding; }
|
@@ -96,7 +96,7 @@ $builder-preview-padding: ($spacer * 2);
|
|
96
96
|
@include media-breakpoint-down(md) { border-bottom: $border-width solid $border-color; }
|
97
97
|
@include media-breakpoint-up(lg) {
|
98
98
|
float: right;
|
99
|
-
width:
|
99
|
+
width: 33%;
|
100
100
|
height: 100%;
|
101
101
|
border-left: $border-width solid $border-color;
|
102
102
|
overflow-y: auto;
|
data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_interaction.scss
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Sort
|
2
|
-
[
|
2
|
+
.ui-sortable-handle, [data-sortable="handle"] { cursor: move; }
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// Powers the readmore.js plugin
|
2
|
+
.expandable,
|
3
|
+
.readmore-js-section {
|
4
|
+
position: relative;
|
5
|
+
z-index: 10;
|
6
|
+
transition: $transition-collapse;
|
7
|
+
&.readmore-js-collapsed { overflow: hidden; }
|
8
|
+
&.readmore-js-expanded { overflow: visible; }
|
9
|
+
}
|
10
|
+
.readmore-js-collapsed:after {
|
11
|
+
position: absolute;
|
12
|
+
bottom: 0;
|
13
|
+
left: 0;
|
14
|
+
width: 100%;
|
15
|
+
height: ($spacer * 1.5);
|
16
|
+
@include gradient-y(transparentize($white, 1), transparentize($white, 0));
|
17
|
+
content: '';
|
18
|
+
z-index: 20;
|
19
|
+
}
|
20
|
+
.readmore-js-toggle {
|
21
|
+
padding-top: ($spacer * .5);
|
22
|
+
padding-bottom: ($spacer * .5);
|
23
|
+
z-index: 30;
|
24
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// Shared sorting styles
|
2
|
+
.slat, .option {
|
3
|
+
&.ui-sortable-placeholder {
|
4
|
+
visibility: visible !important;
|
5
|
+
background: theme-color("light");
|
6
|
+
border: $border-width dashed $border-color;
|
7
|
+
}
|
8
|
+
&.ui-sortable-helper { opacity: .5; }
|
9
|
+
}
|
10
|
+
// Slat
|
11
|
+
.slat {
|
12
|
+
&.ui-sortable-placeholder {
|
13
|
+
+ .slat { border-top: none; }
|
14
|
+
+ &.ui-sortable-helper {
|
15
|
+
border-top-style: dashed;
|
16
|
+
+ &.slat { border-top: none; }
|
17
|
+
}
|
18
|
+
}
|
19
|
+
&.ui-sortable-helper {
|
20
|
+
border-top: none;
|
21
|
+
border-top: none;
|
22
|
+
+ &.ui-sortable-placeholder { border-top: $border-width dashed $border-color; }
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
// Sortable options (used on form fields for checkboxes/radios/select options)
|
27
|
+
.option {
|
28
|
+
&.ui-sortable-placeholder { margin-bottom: ($spacer * .25); }
|
29
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
// Heartbeat "beacon" styles for sysuser functionality
|
2
|
+
.notify {
|
3
|
+
position: absolute;
|
4
|
+
top: 0;
|
5
|
+
right: 0;
|
6
|
+
z-index: 50;
|
7
|
+
.heartbit {
|
8
|
+
position: absolute;
|
9
|
+
top: -($spacer * .75);
|
10
|
+
right: -($spacer * .75);
|
11
|
+
height: ($spacer * 1.5);
|
12
|
+
width: ($spacer * 1.5);
|
13
|
+
z-index: 10;
|
14
|
+
border: 6px solid $warning;
|
15
|
+
border-radius: ($spacer * .75);
|
16
|
+
animation: heartbit 1s ease-out infinite;
|
17
|
+
}
|
18
|
+
.point {
|
19
|
+
position: absolute;
|
20
|
+
right: -($spacer * .25);
|
21
|
+
top: -($spacer * .25);
|
22
|
+
width: ($spacer * .5);
|
23
|
+
height: ($spacer * .5);
|
24
|
+
border-radius: $spacer;
|
25
|
+
background-color: $warning;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
// Heartbeat animation used on beacon for sysusers
|
30
|
+
@keyframes heartbit {
|
31
|
+
0% {
|
32
|
+
transform: scale(0);
|
33
|
+
opacity: 0;
|
34
|
+
}
|
35
|
+
25% {
|
36
|
+
transform: scale(0.1);
|
37
|
+
opacity: .1;
|
38
|
+
}
|
39
|
+
50% {
|
40
|
+
transform: scale(0.5);
|
41
|
+
opacity: .3;
|
42
|
+
}
|
43
|
+
75% {
|
44
|
+
transform: scale(0.8);
|
45
|
+
opacity: .5;
|
46
|
+
}
|
47
|
+
100% {
|
48
|
+
transform: scale(1);
|
49
|
+
opacity: 0;
|
50
|
+
}
|
51
|
+
}
|
@@ -13,6 +13,10 @@
|
|
13
13
|
.card-footer { border-top: none; }
|
14
14
|
|
15
15
|
// Card image
|
16
|
-
.card-img-overlay {
|
16
|
+
.card-img-overlay {
|
17
|
+
top: auto; // makes the overlay gradient and container "stick" to bottom of parent container
|
18
|
+
min-height: ($spacer * 2);
|
19
|
+
@include gradient-y(transparentize($black, 1), transparentize($black, .5));
|
20
|
+
}
|
17
21
|
|
18
22
|
.card-img { @include border-radius(0); }
|
@@ -3,6 +3,7 @@
|
|
3
3
|
// Base class takes care of all the key behavioral aspects.
|
4
4
|
|
5
5
|
.custom-control {
|
6
|
+
padding-left: 0;
|
6
7
|
.custom-control-input {
|
7
8
|
&:checked {
|
8
9
|
~ .custom-control-label,
|
@@ -12,17 +13,24 @@
|
|
12
13
|
}
|
13
14
|
+ .custom-control:not(.custom-control-inline) { margin-top: ($spacer * .25); }
|
14
15
|
}
|
16
|
+
.custom-checkbox, .custom-radio { min-width: $custom-control-gutter + $custom-control-indicator-size; } // sets minimum width to have space even if custom-control-label isn't there
|
15
17
|
|
16
18
|
// Custom control indicators
|
17
19
|
//
|
18
20
|
// Build the custom controls out of pseudo-elements.
|
19
21
|
|
20
22
|
.custom-control-label {
|
23
|
+
padding-left: $custom-control-gutter + $custom-control-indicator-size;
|
24
|
+
min-width: $custom-control-gutter + $custom-control-indicator-size;
|
25
|
+
min-height: $custom-control-indicator-size;
|
21
26
|
font-weight: $font-weight-normal;
|
22
27
|
cursor: pointer;
|
23
28
|
|
24
29
|
// Background-color and icon
|
25
|
-
&::before, &::after {
|
30
|
+
&::before, &::after {
|
31
|
+
top: .3rem;
|
32
|
+
left: 0;
|
33
|
+
}
|
26
34
|
&::before { border: $border-width solid $border-color; }
|
27
35
|
&::after { cursor: pointer; }
|
28
36
|
}
|
@@ -101,7 +109,10 @@
|
|
101
109
|
// Tweak a few things for switches
|
102
110
|
|
103
111
|
.custom-switch {
|
112
|
+
padding-left: 0;
|
104
113
|
.custom-control-label {
|
114
|
+
padding-left: $custom-switch-width + $custom-control-gutter;
|
115
|
+
&::before, &::after { left: 0; }
|
105
116
|
&::before {
|
106
117
|
padding-left: 28px;
|
107
118
|
font-size: 12px;
|
@@ -113,7 +124,6 @@
|
|
113
124
|
}
|
114
125
|
&::after {
|
115
126
|
top: 0;
|
116
|
-
left: -($custom-switch-width + $custom-control-gutter);
|
117
127
|
background-color: $white;
|
118
128
|
border: $border-width solid $border-color;
|
119
129
|
border-radius: 50%;
|
@@ -9,6 +9,7 @@
|
|
9
9
|
cursor: default;
|
10
10
|
pointer-events: none;
|
11
11
|
}
|
12
|
+
&:not(.text-danger) { color: inherit !important; }
|
12
13
|
}
|
13
14
|
|
14
15
|
|
@@ -21,7 +22,14 @@
|
|
21
22
|
|
22
23
|
|
23
24
|
// Sizing
|
24
|
-
.dropdown-menu-md { min-width: ($spacer *
|
25
|
+
.dropdown-menu-md, .dropdown-menu-lg { min-width: ($spacer * 10); }
|
26
|
+
.dropdown-menu-md {
|
27
|
+
@include media-breakpoint-up(sm) { min-width: ($spacer * 12); }
|
28
|
+
}
|
29
|
+
.dropdown-menu-lg {
|
30
|
+
@include media-breakpoint-up(sm) { min-width: ($spacer * 24); }
|
31
|
+
}
|
32
|
+
|
25
33
|
|
26
34
|
|
27
35
|
// Styles for wider "My Tools" dropdown in top nav
|
@@ -8,7 +8,7 @@ $slat-actions-lg-width: 108px;
|
|
8
8
|
flex-flow: column nowrap;
|
9
9
|
|
10
10
|
// Nowrap version -- used when the goal is to have all slat-item columns on the same line in smaller screens
|
11
|
-
|
11
|
+
&:not(.slats-nowrap) { // noting the :not() psuedo-class meaning all slats that don't have this class get these styles
|
12
12
|
.slat-body {
|
13
13
|
@include media-breakpoint-down(sm) { flex-direction: column; }
|
14
14
|
}
|
@@ -37,23 +37,8 @@ $slat-actions-lg-width: 108px;
|
|
37
37
|
padding-bottom: ($spacer * 1.5);
|
38
38
|
}
|
39
39
|
|
40
|
-
//
|
41
|
-
&.
|
42
|
-
visibility: visible !important;
|
43
|
-
background: theme-color("light");
|
44
|
-
border: $border-width dashed $border-color;
|
45
|
-
+ .slat { border-top: none; }
|
46
|
-
+ &.ui-sortable-helper {
|
47
|
-
border-top-style: dashed;
|
48
|
-
+ &.slat { border-top: none; }
|
49
|
-
}
|
50
|
-
}
|
51
|
-
&.ui-sortable-helper {
|
52
|
-
border-top: none;
|
53
|
-
opacity: .5;
|
54
|
-
border-top: none;
|
55
|
-
+ &.ui-sortable-placeholder { border-top: $border-width dashed $border-color; }
|
56
|
-
}
|
40
|
+
// Status
|
41
|
+
&.pending { background-color: #fff5e0; }
|
57
42
|
}
|
58
43
|
|
59
44
|
|
@@ -11,6 +11,10 @@ module NfgUi
|
|
11
11
|
include NfgUi::Components::Traits::Size
|
12
12
|
include NfgUi::Components::Traits::SlatItem
|
13
13
|
|
14
|
+
def caption
|
15
|
+
options.fetch(:caption, nil)
|
16
|
+
end
|
17
|
+
|
14
18
|
def component_family
|
15
19
|
:slats
|
16
20
|
end
|
@@ -19,36 +23,56 @@ module NfgUi
|
|
19
23
|
options.fetch(:slat_header, nil)
|
20
24
|
end
|
21
25
|
|
22
|
-
|
23
|
-
|
26
|
+
# Leverage custom tooltip implementation
|
27
|
+
# so that tooltips are connected to slat item text
|
28
|
+
# and not the slat item containing div (resulting in better UI)
|
29
|
+
def tooltip
|
30
|
+
options.fetch(:tooltip, nil)
|
24
31
|
end
|
25
32
|
|
26
33
|
def render
|
27
34
|
content_tag(base_element, slat_item_html_options) do
|
28
35
|
if slat_header
|
29
|
-
concat(content_tag(:h6, slat_header, class: 'display-4 slat-column-header'))
|
36
|
+
concat(content_tag(:h6, slat_header, class: 'display-4 slat-column-header', **tooltip_html_options))
|
30
37
|
end
|
31
38
|
if heading
|
32
39
|
if href
|
33
40
|
concat(content_tag(:a, href: view_context.url_for(href)) {
|
34
|
-
NfgUi::Components::Foundations::Typeface.new({ subheading: heading }, view_context).render
|
41
|
+
NfgUi::Components::Foundations::Typeface.new({ subheading: heading, tooltip: tooltip }, view_context).render
|
35
42
|
})
|
36
43
|
else
|
37
|
-
concat(NfgUi::Components::Foundations::Typeface.new({ subheading: heading }, view_context).render)
|
44
|
+
concat(NfgUi::Components::Foundations::Typeface.new({ subheading: heading, tooltip: tooltip }, view_context).render)
|
38
45
|
end
|
39
46
|
end
|
40
47
|
concat(block_given? ? yield : body)
|
41
48
|
if caption
|
42
|
-
concat(NfgUi::Components::Foundations::Typeface.new({ caption: caption, class: 'mb-0' }, view_context).render)
|
49
|
+
concat(NfgUi::Components::Foundations::Typeface.new({ caption: caption, class: 'mb-0', tooltip: (tooltip unless heading) }, view_context).render)
|
43
50
|
end
|
44
51
|
end
|
45
52
|
end
|
46
53
|
|
47
54
|
private
|
48
55
|
|
56
|
+
def tooltip_html_options
|
57
|
+
return {} unless tooltip
|
58
|
+
{ title: tooltip, data: options[:data].merge(tooltip_data_attributes) }
|
59
|
+
end
|
60
|
+
|
61
|
+
def tooltip_data_attributes
|
62
|
+
{ toggle: 'tooltip',
|
63
|
+
placement: :top,
|
64
|
+
html: 'true' }
|
65
|
+
end
|
66
|
+
|
49
67
|
# Strip the href from html_options and pass it to the header
|
50
68
|
def slat_item_html_options
|
51
|
-
html_options.except(:href)
|
69
|
+
options = html_options.except(:href)
|
70
|
+
|
71
|
+
# merge in tooltip only if leveraging block body content
|
72
|
+
# tooltip_html_options will return {} if no tooltip so this is a safe merge
|
73
|
+
options.merge!(tooltip_html_options) unless (heading || caption || slat_header)
|
74
|
+
|
75
|
+
options
|
52
76
|
end
|
53
77
|
|
54
78
|
# :sm is the default size, and is not given
|
@@ -59,7 +83,7 @@ module NfgUi
|
|
59
83
|
end
|
60
84
|
|
61
85
|
def non_html_attribute_options
|
62
|
-
super.push(:slat_header, :caption)
|
86
|
+
super.push(:slat_header, :caption, :tooltip)
|
63
87
|
end
|
64
88
|
end
|
65
89
|
end
|
data/lib/nfg_ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nfg_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Roehm
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bootstrap
|
@@ -421,6 +421,7 @@ files:
|
|
421
421
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_navbar.scss
|
422
422
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_tables.scss
|
423
423
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_activity_feed.scss
|
424
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_bee.scss
|
424
425
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_builder_layout.scss
|
425
426
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_card.scss
|
426
427
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_preview.scss
|
@@ -434,8 +435,11 @@ files:
|
|
434
435
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_interaction.scss
|
435
436
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_overlay_blocker.scss
|
436
437
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_page_header.scss
|
438
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_readmore.scss
|
437
439
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_share_dropdown.scss
|
440
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_sortable.scss
|
438
441
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_status_indicator.scss
|
442
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_sys_only_functionality.scss
|
439
443
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_tile.scss
|
440
444
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_video_countdown.scss
|
441
445
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/_variables.scss
|