foundation-rails 6.1.1.3 → 6.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 +4 -4
- data/LICENSE.txt +1 -1
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/templates/_settings.scss +4 -2
- data/vendor/assets/js/foundation.abide.js +2 -2
- data/vendor/assets/js/foundation.accordion.js +16 -14
- data/vendor/assets/js/foundation.accordionMenu.js +20 -23
- data/vendor/assets/js/foundation.core.js +6 -8
- data/vendor/assets/js/foundation.drilldown.js +4 -4
- data/vendor/assets/js/foundation.dropdown.js +5 -3
- data/vendor/assets/js/foundation.dropdownMenu.js +8 -9
- data/vendor/assets/js/foundation.equalizer.js +6 -6
- data/vendor/assets/js/foundation.interchange.js +14 -5
- data/vendor/assets/js/foundation.magellan.js +25 -11
- data/vendor/assets/js/foundation.offcanvas.js +9 -4
- data/vendor/assets/js/foundation.orbit.js +306 -304
- data/vendor/assets/js/foundation.responsiveMenu.js +0 -6
- data/vendor/assets/js/foundation.reveal.js +63 -27
- data/vendor/assets/js/foundation.slider.js +65 -39
- data/vendor/assets/js/foundation.tabs.js +6 -7
- data/vendor/assets/js/foundation.tooltip.js +3 -3
- data/vendor/assets/js/foundation.util.nest.js +2 -3
- data/vendor/assets/js/foundation.util.timerAndImageLoader.js +4 -0
- data/vendor/assets/js/foundation.util.touch.js +17 -4
- data/vendor/assets/js/foundation.util.triggers.js +5 -3
- data/vendor/assets/scss/_global.scss +12 -2
- data/vendor/assets/scss/components/_accordion.scss +1 -5
- data/vendor/assets/scss/components/_button-group.scss +17 -2
- data/vendor/assets/scss/components/_button.scss +1 -8
- data/vendor/assets/scss/components/_drilldown.scss +4 -4
- data/vendor/assets/scss/components/_dropdown-menu.scss +88 -75
- data/vendor/assets/scss/components/_dropdown.scss +3 -2
- data/vendor/assets/scss/components/_media-object.scss +1 -1
- data/vendor/assets/scss/components/_menu.scss +7 -2
- data/vendor/assets/scss/components/_off-canvas.scss +0 -4
- data/vendor/assets/scss/components/_orbit.scss +1 -1
- data/vendor/assets/scss/components/_pagination.scss +6 -2
- data/vendor/assets/scss/components/_progress-bar.scss +14 -9
- data/vendor/assets/scss/components/_reveal.scss +8 -6
- data/vendor/assets/scss/components/_slider.scss +7 -0
- data/vendor/assets/scss/components/_table.scss +77 -64
- data/vendor/assets/scss/components/_title-bar.scss +4 -0
- data/vendor/assets/scss/components/_tooltip.scss +10 -2
- data/vendor/assets/scss/components/_top-bar.scss +13 -8
- data/vendor/assets/scss/forms/_error.scss +1 -1
- data/vendor/assets/scss/forms/_fieldset.scss +1 -0
- data/vendor/assets/scss/forms/_forms.scss +8 -9
- data/vendor/assets/scss/forms/_input-group.scss +1 -0
- data/vendor/assets/scss/forms/_select.scss +3 -1
- data/vendor/assets/scss/forms/_text.scss +1 -1
- data/vendor/assets/scss/foundation.scss +1 -1
- data/vendor/assets/scss/grid/_classes.scss +12 -2
- data/vendor/assets/scss/grid/_column.scss +1 -1
- data/vendor/assets/scss/grid/_flex-grid.scss +20 -3
- data/vendor/assets/scss/grid/_gutter.scss +1 -1
- data/vendor/assets/scss/grid/_position.scss +1 -0
- data/vendor/assets/scss/grid/_row.scss +1 -0
- data/vendor/assets/scss/settings/_settings.scss +4 -2
- data/vendor/assets/scss/util/_breakpoint.scss +10 -10
- data/vendor/assets/scss/util/_mixins.scss +6 -2
- data/vendor/assets/scss/util/_unit.scss +1 -1
- metadata +2 -2
@@ -13,10 +13,9 @@
|
|
13
13
|
var $item = $(this),
|
14
14
|
$sub = $item.children('ul');
|
15
15
|
if($sub.length){
|
16
|
-
$item.addClass(
|
16
|
+
$item.addClass(hasSubClass)
|
17
17
|
.attr({
|
18
18
|
'aria-haspopup': true,
|
19
|
-
'aria-selected': false,
|
20
19
|
'aria-expanded': false,
|
21
20
|
'aria-label': $item.children('a:first').text()
|
22
21
|
});
|
@@ -42,7 +41,7 @@
|
|
42
41
|
// menu.find('.is-active').removeClass('is-active');
|
43
42
|
menu.find('*')
|
44
43
|
// menu.find('.' + subMenuClass + ', .' + subItemClass + ', .is-active, .has-submenu, .is-submenu-item, .submenu, [data-submenu]')
|
45
|
-
.removeClass(subMenuClass + ' ' + subItemClass + ' ' + hasSubClass + '
|
44
|
+
.removeClass(subMenuClass + ' ' + subItemClass + ' ' + hasSubClass + ' is-submenu-item submenu is-active')
|
46
45
|
.removeAttr('data-submenu').css('display', '');
|
47
46
|
|
48
47
|
// console.log( menu.find('.' + subMenuClass + ', .' + subItemClass + ', .has-submenu, .is-submenu-item, .submenu, [data-submenu]')
|
@@ -8,6 +8,8 @@
|
|
8
8
|
start,
|
9
9
|
timer;
|
10
10
|
|
11
|
+
this.isPaused = false;
|
12
|
+
|
11
13
|
this.restart = function(){
|
12
14
|
remain = -1;
|
13
15
|
clearTimeout(timer);
|
@@ -15,6 +17,7 @@
|
|
15
17
|
};
|
16
18
|
|
17
19
|
this.start = function(){
|
20
|
+
this.isPaused = false
|
18
21
|
// if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.
|
19
22
|
clearTimeout(timer);
|
20
23
|
remain = remain <= 0 ? duration : remain;
|
@@ -30,6 +33,7 @@
|
|
30
33
|
};
|
31
34
|
|
32
35
|
this.pause = function(){
|
36
|
+
this.isPaused = true;
|
33
37
|
//if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.
|
34
38
|
clearTimeout(timer);
|
35
39
|
elem.data('paused', true);
|
@@ -96,10 +96,23 @@
|
|
96
96
|
touchmove: 'mousemove',
|
97
97
|
touchend: 'mouseup'
|
98
98
|
},
|
99
|
-
type = eventTypes[event.type]
|
100
|
-
|
101
|
-
|
102
|
-
|
99
|
+
type = eventTypes[event.type],
|
100
|
+
simulatedEvent
|
101
|
+
;
|
102
|
+
|
103
|
+
if('MouseEvent' in window && typeof window.MouseEvent === 'function') {
|
104
|
+
simulatedEvent = window.MouseEvent(type, {
|
105
|
+
'bubbles': true,
|
106
|
+
'cancelable': true,
|
107
|
+
'screenX': first.screenX,
|
108
|
+
'screenY': first.screenY,
|
109
|
+
'clientX': first.clientX,
|
110
|
+
'clientY': first.clientY
|
111
|
+
});
|
112
|
+
} else {
|
113
|
+
simulatedEvent = document.createEvent('MouseEvent');
|
114
|
+
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);
|
115
|
+
}
|
103
116
|
first.target.dispatchEvent(simulatedEvent);
|
104
117
|
};
|
105
118
|
};
|
@@ -25,9 +25,11 @@
|
|
25
25
|
});
|
26
26
|
|
27
27
|
// Elements with [data-closable] will respond to close.zf.trigger events.
|
28
|
-
$(document).on('close.zf.trigger', '[data-closable]', function()
|
29
|
-
|
30
|
-
|
28
|
+
$(document).on('close.zf.trigger', '[data-closable]', function(e){
|
29
|
+
e.stopPropagation();
|
30
|
+
var animation = $(this).data('closable');
|
31
|
+
|
32
|
+
if(animation !== ''){
|
31
33
|
Foundation.Motion.animateOut($(this), animation, function() {
|
32
34
|
$(this).trigger('closed.zf');
|
33
35
|
});
|
@@ -194,6 +194,15 @@ $foundation-colors: (
|
|
194
194
|
border-radius: $global-radius;
|
195
195
|
line-height: 1;
|
196
196
|
}
|
197
|
+
|
198
|
+
// Internal classes to show/hide elements in JavaScript
|
199
|
+
.is-visible {
|
200
|
+
display: block !important;
|
201
|
+
}
|
202
|
+
|
203
|
+
.is-hidden {
|
204
|
+
display: none !important;
|
205
|
+
}
|
197
206
|
}
|
198
207
|
|
199
208
|
/// Loads normalize.css.
|
@@ -572,13 +581,14 @@ $foundation-colors: (
|
|
572
581
|
|
573
582
|
/**
|
574
583
|
* Define consistent border, margin, and padding.
|
584
|
+
* [NOTE] We don't enable this ruleset in Foundation, because we want the <fieldset> element to have plain styling.
|
575
585
|
*/
|
576
586
|
|
577
|
-
fieldset {
|
587
|
+
/* fieldset {
|
578
588
|
border: 1px solid #c0c0c0;
|
579
589
|
margin: 0 2px;
|
580
590
|
padding: 0.35em 0.625em 0.75em;
|
581
|
-
}
|
591
|
+
} */
|
582
592
|
|
583
593
|
/**
|
584
594
|
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
@@ -47,6 +47,7 @@ $accordion-content-padding: 1rem !default;
|
|
47
47
|
list-style-type: none;
|
48
48
|
background: $accordion-background;
|
49
49
|
border: $accordion-content-border;
|
50
|
+
border-bottom: 0;
|
50
51
|
border-radius: $global-radius;
|
51
52
|
margin-#{$global-left}: 0;
|
52
53
|
}
|
@@ -66,11 +67,6 @@ $accordion-content-padding: 1rem !default;
|
|
66
67
|
background-color: $accordion-item-background-hover;
|
67
68
|
}
|
68
69
|
|
69
|
-
// Remove the border on the last title
|
70
|
-
:last-child > & {
|
71
|
-
border-bottom-width: 0;
|
72
|
-
}
|
73
|
-
|
74
70
|
@if $accordion-plusminus {
|
75
71
|
&::before {
|
76
72
|
content: '+';
|
@@ -43,11 +43,15 @@ $buttongroup-expand-max: 6 !default;
|
|
43
43
|
}
|
44
44
|
|
45
45
|
/// Creates a full-width button group, making each button equal width.
|
46
|
-
/// @param {Keyword|Number} $count [auto] - Number of buttons inside the button group. Set to `auto` to generate CSS that will account for a variable number of buttons.
|
47
46
|
/// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside a button group.
|
48
47
|
@mixin button-group-expand(
|
49
|
-
$selector: $buttongroup-child-selector
|
48
|
+
$selector: $buttongroup-child-selector,
|
49
|
+
$count: null
|
50
50
|
) {
|
51
|
+
@if $count != null {
|
52
|
+
@warn 'button-group-expand(): the $count property is no longer needed. This parameter will be removed in Foundation 6.2.';
|
53
|
+
}
|
54
|
+
|
51
55
|
display: table;
|
52
56
|
table-layout: fixed;
|
53
57
|
width: 100%;
|
@@ -126,5 +130,16 @@ $buttongroup-expand-max: 6 !default;
|
|
126
130
|
@include button-group-unstack;
|
127
131
|
}
|
128
132
|
}
|
133
|
+
|
134
|
+
&.stacked-for-small.expanded {
|
135
|
+
@include breakpoint(small only) {
|
136
|
+
display: block;
|
137
|
+
|
138
|
+
#{$buttongroup-child-selector} {
|
139
|
+
display: block;
|
140
|
+
border-right: 0;
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}
|
129
144
|
}
|
130
145
|
}
|
@@ -99,20 +99,13 @@ $button-opacity-disabled: 0.25 !default;
|
|
99
99
|
$color: $button-color
|
100
100
|
) {
|
101
101
|
@if $color == auto {
|
102
|
-
$color:
|
102
|
+
$color: foreground($background);
|
103
103
|
}
|
104
104
|
|
105
105
|
@if $background-hover == auto {
|
106
106
|
$background-hover: scale-color($background, $lightness: -20%);
|
107
107
|
}
|
108
108
|
|
109
|
-
@if lightness($background) >= 70% {
|
110
|
-
$color: $button-color-alt;
|
111
|
-
}
|
112
|
-
@else {
|
113
|
-
$color: $button-color;
|
114
|
-
}
|
115
|
-
|
116
109
|
background-color: $background;
|
117
110
|
color: $color;
|
118
111
|
|
@@ -64,12 +64,12 @@ $drilldown-background: $white !default;
|
|
64
64
|
}
|
65
65
|
}
|
66
66
|
|
67
|
-
.js-drilldown-back::before {
|
67
|
+
.js-drilldown-back > a::before {
|
68
68
|
@include css-triangle(6px, $drilldown-arrow-color, $global-left);
|
69
|
-
|
69
|
+
border-#{$global-left}-width: 0;
|
70
|
+
display: inline-block;
|
71
|
+
vertical-align: middle;
|
70
72
|
margin-#{$global-right}: 0.75rem; // Creates space between the arrow and the text
|
71
|
-
margin-#{$global-left}: 0.6rem; // Lines the tip of the arrow with the items below
|
72
|
-
margin-top: 14px; // Aligns the arrow with the text
|
73
73
|
}
|
74
74
|
}
|
75
75
|
}
|
@@ -36,113 +36,126 @@ $dropdownmenu-border-width: nth($dropdownmenu-border, 1);
|
|
36
36
|
a {
|
37
37
|
@include disable-mouse-outline;
|
38
38
|
}
|
39
|
-
.
|
40
|
-
position: relative;
|
39
|
+
&:not(.vertical) {
|
41
40
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
}
|
47
|
-
|
48
|
-
@if $dropdownmenu-arrows {
|
49
|
-
&.is-down-arrow a {
|
50
|
-
padding-#{$global-right}: 1.5rem;
|
51
|
-
position: relative;
|
52
|
-
}
|
53
|
-
|
54
|
-
&.is-down-arrow > a::after {
|
55
|
-
@include css-triangle(5px, $dropdownmenu-arrow-color, down);
|
56
|
-
position: absolute;
|
57
|
-
top: rem-calc(2px) + rem-calc(get-side($menu-item-padding, top));
|
58
|
-
#{$global-right}: 5px;
|
59
|
-
}
|
60
|
-
|
61
|
-
&.is-left-arrow > a::after {
|
62
|
-
@include css-triangle(5px, $dropdownmenu-arrow-color, left);
|
63
|
-
float: left;
|
64
|
-
margin-left: 0;
|
65
|
-
margin-right: 10px;
|
66
|
-
}
|
41
|
+
}
|
42
|
+
.no-js & ul {
|
43
|
+
display: none;
|
44
|
+
}
|
67
45
|
|
68
|
-
|
69
|
-
|
46
|
+
&:not(.vertical) {
|
47
|
+
.is-dropdown-submenu {
|
48
|
+
&.first-sub {
|
49
|
+
top: 100%;
|
50
|
+
#{$global-left}: 0;
|
51
|
+
#{$global-right}: auto;
|
70
52
|
}
|
71
53
|
}
|
54
|
+
}
|
72
55
|
|
73
|
-
|
74
|
-
|
75
|
-
left: auto;
|
76
|
-
}
|
77
|
-
|
78
|
-
&.is-right-arrow.opens-inner .submenu {
|
79
|
-
left: 0;
|
80
|
-
right: auto;
|
81
|
-
}
|
82
|
-
|
83
|
-
&.opens-inner .submenu {
|
56
|
+
&.align-right {
|
57
|
+
.is-dropdown-submenu.first-sub {
|
84
58
|
top: 100%;
|
59
|
+
left: auto;
|
60
|
+
right: 0;
|
85
61
|
}
|
86
62
|
}
|
63
|
+
}
|
87
64
|
|
88
|
-
|
89
|
-
|
65
|
+
.is-dropdown-menu.vertical {
|
66
|
+
width: 100px;
|
67
|
+
|
68
|
+
&.align-right {
|
69
|
+
float: right;
|
90
70
|
}
|
91
71
|
|
92
|
-
.submenu {
|
93
|
-
display: none;
|
94
|
-
position: absolute;
|
72
|
+
> li .is-dropdown-submenu {
|
95
73
|
top: 0;
|
96
74
|
left: 100%;
|
97
|
-
|
98
|
-
|
99
|
-
background: $dropdownmenu-background;
|
100
|
-
border: $dropdownmenu-border;
|
75
|
+
}
|
76
|
+
}
|
101
77
|
|
102
|
-
|
103
|
-
|
78
|
+
.is-dropdown-submenu-parent {
|
79
|
+
position: relative;
|
80
|
+
|
81
|
+
a::after {
|
82
|
+
float: $global-right;
|
83
|
+
margin-top: 3px;
|
84
|
+
margin-#{$global-left}: 10px;
|
85
|
+
}
|
86
|
+
|
87
|
+
@if $dropdownmenu-arrows {
|
88
|
+
&.is-down-arrow a {
|
89
|
+
padding-#{$global-right}: 1.5rem;
|
90
|
+
position: relative;
|
104
91
|
}
|
105
92
|
|
106
|
-
>
|
107
|
-
|
93
|
+
&.is-down-arrow > a::after {
|
94
|
+
@include css-triangle(5px, $dropdownmenu-arrow-color, down);
|
95
|
+
position: absolute;
|
96
|
+
top: rem-calc(2px) + rem-calc(get-side($menu-item-padding, top));
|
97
|
+
#{$global-right}: 5px;
|
108
98
|
}
|
109
99
|
|
110
|
-
&.
|
111
|
-
|
112
|
-
|
113
|
-
|
100
|
+
&.is-left-arrow > a::after {
|
101
|
+
@include css-triangle(5px, $dropdownmenu-arrow-color, left);
|
102
|
+
float: left;
|
103
|
+
margin-left: 0;
|
104
|
+
margin-right: 10px;
|
114
105
|
}
|
115
106
|
|
116
|
-
|
117
|
-
|
118
|
-
display: block;
|
107
|
+
&.is-right-arrow > a::after {
|
108
|
+
@include css-triangle(5px, $dropdownmenu-arrow-color, right);
|
119
109
|
}
|
120
110
|
}
|
121
111
|
|
122
|
-
|
112
|
+
&.is-left-arrow.opens-inner .is-dropdown-submenu {
|
113
|
+
right: 0;
|
123
114
|
left: auto;
|
124
|
-
right: 100%;
|
125
115
|
}
|
126
116
|
|
127
|
-
&.
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
117
|
+
&.is-right-arrow.opens-inner .is-dropdown-submenu {
|
118
|
+
left: 0;
|
119
|
+
right: auto;
|
120
|
+
}
|
121
|
+
|
122
|
+
&.opens-inner .is-dropdown-submenu {
|
123
|
+
top: 100%;
|
124
|
+
}
|
125
|
+
|
126
|
+
&.opens-left .is-dropdown-submenu {
|
127
|
+
left: auto;
|
128
|
+
right: 100%;
|
133
129
|
}
|
134
130
|
}
|
135
131
|
|
136
|
-
.is-dropdown-menu.vertical {
|
137
|
-
width: 100px;
|
138
132
|
|
139
|
-
|
140
|
-
|
133
|
+
.is-dropdown-submenu {
|
134
|
+
display: none;
|
135
|
+
position: absolute;
|
136
|
+
top: 0;
|
137
|
+
#{$global-left}: 100%;
|
138
|
+
min-width: $dropdownmenu-min-width;
|
139
|
+
z-index: 1;
|
140
|
+
background: $dropdownmenu-background;
|
141
|
+
border: $dropdownmenu-border;
|
142
|
+
|
143
|
+
@if (type-of($dropdownmenu-border-width) == 'number') {
|
144
|
+
.is-dropdown-submenu {
|
145
|
+
margin-top: (-$dropdownmenu-border-width);
|
146
|
+
}
|
141
147
|
}
|
142
148
|
|
143
|
-
> li
|
144
|
-
|
145
|
-
|
149
|
+
> li {
|
150
|
+
width: 100%;
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
// [TODO] Cut back specificity
|
155
|
+
// scss-lint:disable SelectorDepth
|
156
|
+
&:not(.js-dropdown-nohover) > .is-dropdown-submenu-parent:hover > &,
|
157
|
+
&.js-dropdown-active {
|
158
|
+
display: block;
|
146
159
|
}
|
147
160
|
}
|
148
161
|
}
|
@@ -16,7 +16,7 @@ $dropdown-border: 1px solid $medium-gray !default;
|
|
16
16
|
|
17
17
|
/// Font size for dropdown panes.
|
18
18
|
/// @type List
|
19
|
-
$dropdown-font-size:
|
19
|
+
$dropdown-font-size: 1rem !default;
|
20
20
|
|
21
21
|
/// Width for dropdown panes.
|
22
22
|
/// @type Number
|
@@ -38,13 +38,14 @@ $dropdown-sizes: (
|
|
38
38
|
@mixin dropdown-container {
|
39
39
|
background-color: $body-background;
|
40
40
|
border: $dropdown-border;
|
41
|
+
border-radius: $dropdown-radius;
|
41
42
|
display: block;
|
43
|
+
font-size: $dropdown-font-size;
|
42
44
|
padding: $dropdown-padding;
|
43
45
|
position: absolute;
|
44
46
|
visibility: hidden;
|
45
47
|
width: $dropdown-width;
|
46
48
|
z-index: 10;
|
47
|
-
border-radius: $dropdown-radius;
|
48
49
|
|
49
50
|
&.is-open {
|
50
51
|
visibility: visible;
|