nfg_ui 0.11.4 → 0.11.9
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/_badge.scss +4 -5
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_buttons.scss +4 -5
- 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/_custom.scss +1 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/custom/_activity_feed.scss +7 -0
- 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/_activity_feed.scss +34 -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/_overlay_blocker.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/core/legacy_browser_support/nfg_theme/_custom.scss +1 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/custom/_icon.scss +5 -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 +16 -2
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_custom.scss +2 -0
- 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/_avatar.scss +1 -1
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_icon.scss +34 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_skeleton.scss +50 -0
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_slat.scss +3 -18
- data/app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_tile.scss +4 -4
- 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 +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: feeec19c011b520fc542365a94ae4c0def08850b8f3bb394376ea44cff7ef174
|
4
|
+
data.tar.gz: a7b77844b75d25c800c05707a4d21db8814a4cdcc82244f5eebce03a815f3908
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07e73749f7feab579f0a8e9cc617850ce53f4311be7d7c08e7f30a6e9d32be4a5cf44d3797c71b69d78c018d41a400d77d9e36d32bb557810c2e6b69c1ae4c80
|
7
|
+
data.tar.gz: 8d8783f40d9454d708dd3923d66fad396f35d2fa7f5f3460bcc42e7c69c3cb55eadc90e6cc66ab0b10019225544bd32181bc45508f7cfc2e03ca54fac018085f
|
data/app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_badge.scss
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
@each $color, $value in $colors {
|
2
2
|
.#{$color} {
|
3
|
-
.badge-primary {
|
3
|
+
.badge-primary {
|
4
|
+
@include badge-variant($value);
|
5
|
+
color: $white !important;
|
6
|
+
}
|
4
7
|
}
|
5
8
|
}
|
6
|
-
|
7
|
-
// temporary color fix for consistency on a white text on orange bg
|
8
|
-
// overrides color contrast settings
|
9
|
-
.orange .badge-primary { color: $white !important; }
|
data/app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_buttons.scss
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
@each $color, $value in $colors {
|
2
2
|
.#{$color} {
|
3
|
-
.btn-primary {
|
3
|
+
.btn-primary {
|
4
|
+
@include button-variant($value, $value);
|
5
|
+
color: $white !important;
|
6
|
+
}
|
4
7
|
.show > .btn-primary.dropdown-toggle {
|
5
8
|
background-color: darken($value, 10%);
|
6
9
|
border-color: darken($value, 10%);
|
@@ -8,7 +11,3 @@
|
|
8
11
|
.btn-outline-secondary, .btn-link { color: $value; }
|
9
12
|
}
|
10
13
|
}
|
11
|
-
|
12
|
-
// temporary color fix for consistency on a white text on orange bg
|
13
|
-
// overrides color contrast settings
|
14
|
-
.orange .btn-primary { color: $white !important; }
|
@@ -1,4 +1,6 @@
|
|
1
1
|
// Our custom styles
|
2
|
+
@import 'custom/activity_feed';
|
3
|
+
@import 'custom/bee';
|
2
4
|
@import 'custom/builder_layout';
|
3
5
|
@import 'custom/campaign_card';
|
4
6
|
@import 'custom/campaign_preview';
|
@@ -12,7 +14,9 @@
|
|
12
14
|
@import 'custom/interaction';
|
13
15
|
@import 'custom/overlay_blocker';
|
14
16
|
@import 'custom/page_header';
|
17
|
+
@import 'custom/readmore';
|
15
18
|
@import 'custom/share_dropdown';
|
19
|
+
@import 'custom/sortable';
|
16
20
|
@import 'custom/status_indicator';
|
17
21
|
@import 'custom/tile';
|
18
22
|
@import 'custom/video_countdown';
|
data/app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_activity_feed.scss
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
// Activity feed list items
|
2
|
+
.activity-feed-item {
|
3
|
+
position: relative;
|
4
|
+
padding: 0 0 $spacer ($spacer * 1.5);
|
5
|
+
border: none;
|
6
|
+
z-index: 0;
|
7
|
+
&::after {
|
8
|
+
position: absolute;
|
9
|
+
top: 0;
|
10
|
+
left: 12px;
|
11
|
+
bottom: 0;
|
12
|
+
z-index: 0;
|
13
|
+
border-left: $border-width solid $border-color;
|
14
|
+
content: "";
|
15
|
+
}
|
16
|
+
&:last-child {
|
17
|
+
padding-bottom: 0;
|
18
|
+
&::after { display: none; }
|
19
|
+
}
|
20
|
+
.activity-icon {
|
21
|
+
position: absolute;
|
22
|
+
top: 2px;
|
23
|
+
left: 0;
|
24
|
+
display: block;
|
25
|
+
width: $spacer;
|
26
|
+
height: $spacer;
|
27
|
+
font-size: $font-size-sm;
|
28
|
+
line-height: $spacer;
|
29
|
+
z-index: 1;
|
30
|
+
text-align: center;
|
31
|
+
@include border-radius(50%);
|
32
|
+
box-shadow: 0 0 0 2px rgba(255,255,255,1);
|
33
|
+
}
|
34
|
+
}
|
@@ -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
|
+
}
|
@@ -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,
|
@@ -10,18 +11,26 @@
|
|
10
11
|
}
|
11
12
|
&:focus:not(:checked) ~ .custom-control-label::before { border-color: $input-border-color; }
|
12
13
|
}
|
14
|
+
+ .custom-control:not(.custom-control-inline) { margin-top: ($spacer * .25); }
|
13
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
|
14
17
|
|
15
18
|
// Custom control indicators
|
16
19
|
//
|
17
20
|
// Build the custom controls out of pseudo-elements.
|
18
21
|
|
19
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;
|
20
26
|
font-weight: $font-weight-normal;
|
21
27
|
cursor: pointer;
|
22
28
|
|
23
29
|
// Background-color and icon
|
24
|
-
&::before, &::after {
|
30
|
+
&::before, &::after {
|
31
|
+
top: .3rem;
|
32
|
+
left: 0;
|
33
|
+
}
|
25
34
|
&::before { border: $border-width solid $border-color; }
|
26
35
|
&::after { cursor: pointer; }
|
27
36
|
}
|
@@ -41,6 +50,9 @@
|
|
41
50
|
//
|
42
51
|
|
43
52
|
.custom-select {
|
53
|
+
display: block;
|
54
|
+
width: auto;
|
55
|
+
max-width: 100%;
|
44
56
|
font-weight: $btn-font-weight;
|
45
57
|
cursor: pointer;
|
46
58
|
box-shadow: none;
|
@@ -97,7 +109,10 @@
|
|
97
109
|
// Tweak a few things for switches
|
98
110
|
|
99
111
|
.custom-switch {
|
112
|
+
padding-left: 0;
|
100
113
|
.custom-control-label {
|
114
|
+
padding-left: $custom-switch-width + $custom-control-gutter;
|
115
|
+
&::before, &::after { left: 0; }
|
101
116
|
&::before {
|
102
117
|
padding-left: 28px;
|
103
118
|
font-size: 12px;
|
@@ -109,7 +124,6 @@
|
|
109
124
|
}
|
110
125
|
&::after {
|
111
126
|
top: 0;
|
112
|
-
left: -($custom-switch-width + $custom-control-gutter);
|
113
127
|
background-color: $white;
|
114
128
|
border: $border-width solid $border-color;
|
115
129
|
border-radius: 50%;
|
@@ -1,11 +1,13 @@
|
|
1
1
|
// Our custom styles
|
2
2
|
@import 'custom/avatar';
|
3
3
|
@import 'custom/device_preview';
|
4
|
+
@import 'custom/icon';
|
4
5
|
@import 'custom/illustration';
|
5
6
|
@import 'custom/mobile';
|
6
7
|
@import 'custom/nav_step';
|
7
8
|
@import 'custom/redactor';
|
8
9
|
@import 'custom/social_share';
|
10
|
+
@import 'custom/skeleton';
|
9
11
|
@import 'custom/slat';
|
10
12
|
@import 'custom/ticket';
|
11
13
|
@import 'custom/tile';
|
@@ -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
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Custom icon styles
|
2
|
+
// icons shouldn't be larger than the h1 font-size. use illustrations for larger visuals.
|
3
|
+
// don't use icon circles for icons smaller than icon-circle-sm size. use just an icon.
|
4
|
+
.icon-circle {
|
5
|
+
position: relative;
|
6
|
+
display: inline-flex;
|
7
|
+
align-items: center;
|
8
|
+
justify-content: center;
|
9
|
+
vertical-align: middle;
|
10
|
+
width: ($spacer * 1.5);
|
11
|
+
height: ($spacer * 1.5);
|
12
|
+
font-size: $font-size-base;
|
13
|
+
background-color: $border-color;
|
14
|
+
border-radius: 50%;
|
15
|
+
&.icon-circle-outline {
|
16
|
+
background-color: $white;
|
17
|
+
border: $border-width solid $border-color;
|
18
|
+
}
|
19
|
+
&.icon-circle-sm {
|
20
|
+
width: $spacer;
|
21
|
+
height: $spacer;
|
22
|
+
font-size: $font-size-sm;
|
23
|
+
}
|
24
|
+
&.icon-circle-lg {
|
25
|
+
width: ($spacer * 2);
|
26
|
+
height: ($spacer * 2);
|
27
|
+
font-size: $font-size-lg;
|
28
|
+
}
|
29
|
+
&.icon-circle-xl {
|
30
|
+
width: ($spacer * 3);
|
31
|
+
height: ($spacer * 3);
|
32
|
+
font-size: $h1-font-size;
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// Skeleton styles for placheholder content
|
2
|
+
.skeleton-avatar, .skeleton-heading, .skeleton-paragraph {
|
3
|
+
display: inline-block;
|
4
|
+
margin-bottom: ($spacer * .5);
|
5
|
+
background-color: $border-color;
|
6
|
+
overflow: hidden;
|
7
|
+
&::after {
|
8
|
+
position: absolute;
|
9
|
+
top: 0;
|
10
|
+
right: 0;
|
11
|
+
bottom: 0;
|
12
|
+
left: 0;
|
13
|
+
width: 100%;
|
14
|
+
height: 100%;
|
15
|
+
background-color: $body-bg;
|
16
|
+
animation: skeleton-sheen 1s linear infinite alternate;
|
17
|
+
content: '';
|
18
|
+
|
19
|
+
// any skeleton element inside a container with the the .loaded class removes the sheen animation.
|
20
|
+
.loaded & {
|
21
|
+
background-color: transparent;
|
22
|
+
animation: none;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
.skeleton-avatar {
|
27
|
+
width: ($spacer * 1.5);
|
28
|
+
height: ($spacer * 1.5);
|
29
|
+
border-radius: 50%;
|
30
|
+
}
|
31
|
+
.skeleton-heading {
|
32
|
+
width: 70%;
|
33
|
+
height: $spacer;
|
34
|
+
border-radius: ($spacer * .5);
|
35
|
+
&:nth-child(even) { width: 45%; }
|
36
|
+
}
|
37
|
+
.skeleton-paragraph {
|
38
|
+
width: 100%;
|
39
|
+
height: ($spacer * .5);
|
40
|
+
border-radius: ($spacer * .25);
|
41
|
+
&:nth-child(2n+1) { width: 90%; }
|
42
|
+
&:nth-child(3n+1) { width: 75%; }
|
43
|
+
&:nth-child(4n+1) { width: 80%; }
|
44
|
+
}
|
45
|
+
|
46
|
+
// Sheen animation used on skeleton elements
|
47
|
+
@keyframes skeleton-sheen {
|
48
|
+
0% { opacity: .45; }
|
49
|
+
to { opacity: .9; }
|
50
|
+
}
|
@@ -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
|
|
@@ -22,13 +22,13 @@
|
|
22
22
|
display: block;
|
23
23
|
margin-right: auto;
|
24
24
|
margin-left: auto;
|
25
|
-
@include media-breakpoint-down(sm) { padding-bottom: $grid-gutter-width; }
|
26
|
-
@include media-breakpoint-up(sm) { padding-bottom: ($grid-gutter-width *
|
25
|
+
@include media-breakpoint-down(sm) { padding-bottom: ($grid-gutter-width * 1.5); }
|
26
|
+
@include media-breakpoint-up(sm) { padding-bottom: ($grid-gutter-width * 2); }
|
27
27
|
&:last-child { padding-bottom: 0; }
|
28
28
|
+ .tile-section {
|
29
29
|
border-top: $border-width solid $border-color;
|
30
|
-
@include media-breakpoint-down(sm) { padding-top: $grid-gutter-width; }
|
31
|
-
@include media-breakpoint-up(sm) { padding-top: ($grid-gutter-width *
|
30
|
+
@include media-breakpoint-down(sm) { padding-top: ($grid-gutter-width * 1.5); }
|
31
|
+
@include media-breakpoint-up(sm) { padding-top: ($grid-gutter-width * 2); }
|
32
32
|
}
|
33
33
|
}
|
34
34
|
|
@@ -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.9
|
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: 2020-
|
12
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bootstrap
|
@@ -407,6 +407,7 @@ files:
|
|
407
407
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_reboot.scss
|
408
408
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_type.scss
|
409
409
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/_utilities.scss
|
410
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/custom/_activity_feed.scss
|
410
411
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/custom/_icons.scss
|
411
412
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/nfg_theme/custom/_nav_step.scss
|
412
413
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/color_variations/plugins/_datetimepicker.scss
|
@@ -419,6 +420,8 @@ files:
|
|
419
420
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_nav.scss
|
420
421
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_navbar.scss
|
421
422
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/_tables.scss
|
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
|
422
425
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_builder_layout.scss
|
423
426
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_card.scss
|
424
427
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_campaign_preview.scss
|
@@ -432,7 +435,9 @@ files:
|
|
432
435
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_interaction.scss
|
433
436
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_overlay_blocker.scss
|
434
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
|
435
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
|
436
441
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_status_indicator.scss
|
437
442
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_tile.scss
|
438
443
|
- app/assets/stylesheets/nfg_ui/network_for_good/admin/nfg_theme/custom/_video_countdown.scss
|
@@ -476,6 +481,7 @@ files:
|
|
476
481
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/_utilities.scss
|
477
482
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/custom/_avatar.scss
|
478
483
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/custom/_everyday_giving.scss
|
484
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/custom/_icon.scss
|
479
485
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/custom/_nav_step.scss
|
480
486
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/custom/_slat.scss
|
481
487
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/legacy_browser_support/nfg_theme/custom/_video_countdown.scss
|
@@ -502,10 +508,12 @@ files:
|
|
502
508
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/_type.scss
|
503
509
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_avatar.scss
|
504
510
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_device_preview.scss
|
511
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_icon.scss
|
505
512
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_illustration.scss
|
506
513
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_mobile.scss
|
507
514
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_nav_step.scss
|
508
515
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_redactor.scss
|
516
|
+
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_skeleton.scss
|
509
517
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_slat.scss
|
510
518
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_social_share.scss
|
511
519
|
- app/assets/stylesheets/nfg_ui/network_for_good/core/nfg_theme/custom/_ticket.scss
|