zurb-foundation 4.1.2 → 4.1.5
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.
- data/CONTRIBUTING.md +2 -2
- data/Gemfile.lock +1 -1
- data/README.md +11 -7
- data/docs/CHANGELOG.md +22 -3
- data/docs/_sidebar-components.html.erb +3 -1
- data/docs/_sidebar.html.erb +3 -1
- data/docs/components/breadcrumbs.html.erb +9 -1
- data/docs/components/forms.html.erb +12 -6
- data/docs/components/grid.html.erb +3 -3
- data/docs/components/kitchen-sink.html.erb +7 -1
- data/docs/components/labels.html.erb +3 -1
- data/docs/components/section.html.erb +99 -10
- data/docs/components/top-bar.html.erb +2 -2
- data/docs/components/type.html.erb +31 -2
- data/docs/css/docs.scss +0 -5
- data/docs/index.html.erb +2 -0
- data/docs/javascript.html.erb +8 -5
- data/docs/sass.html.erb +1005 -127
- data/js/foundation/foundation.clearing.js +8 -4
- data/js/foundation/foundation.dropdown.js +43 -23
- data/js/foundation/foundation.forms.js +5 -3
- data/js/foundation/foundation.joyride.js +2 -6
- data/js/foundation/foundation.js +70 -47
- data/js/foundation/foundation.orbit.js +10 -4
- data/js/foundation/foundation.reveal.js +8 -3
- data/js/foundation/foundation.section.js +188 -72
- data/js/foundation/foundation.tooltips.js +4 -3
- data/js/foundation/foundation.topbar.js +4 -1
- data/lib/foundation/generators/install_generator.rb +2 -2
- data/lib/foundation/version.rb +1 -1
- data/scss/foundation.scss +1 -1
- data/{templates/project/scss/_settings.scss → scss/foundation/_variables.scss} +347 -173
- data/scss/foundation/components/_alert-boxes.scss +1 -1
- data/scss/foundation/components/_block-grid.scss +6 -2
- data/scss/foundation/components/_breadcrumbs.scss +20 -13
- data/scss/foundation/components/_button-groups.scss +18 -6
- data/scss/foundation/components/_buttons.scss +18 -11
- data/scss/foundation/components/_clearing.scss +6 -0
- data/scss/foundation/components/_custom-forms.scss +29 -23
- data/scss/foundation/components/_dropdown-buttons.scss +1 -1
- data/scss/foundation/components/_dropdown.scss +7 -3
- data/scss/foundation/components/_flex-video.scss +1 -1
- data/scss/foundation/components/_forms.scss +49 -25
- data/scss/foundation/components/_global.scss +222 -3
- data/scss/foundation/components/_grid.scss +40 -24
- data/scss/foundation/components/_inline-lists.scss +1 -1
- data/scss/foundation/components/_joyride.scss +4 -6
- data/scss/foundation/components/_keystrokes.scss +1 -1
- data/scss/foundation/components/_labels.scss +5 -3
- data/scss/foundation/components/_magellan.scss +1 -1
- data/scss/foundation/components/_orbit.scss +13 -8
- data/scss/foundation/components/_pagination.scss +1 -1
- data/scss/foundation/components/_panels.scss +1 -1
- data/scss/foundation/components/_pricing-tables.scss +1 -1
- data/scss/foundation/components/_progress-bars.scss +1 -1
- data/scss/foundation/components/_reveal.scss +7 -7
- data/scss/foundation/components/_section.scss +75 -21
- data/scss/foundation/components/_side-nav.scss +1 -1
- data/scss/foundation/components/_split-buttons.scss +10 -3
- data/scss/foundation/components/_sub-nav.scss +1 -1
- data/scss/foundation/components/_switch.scss +1 -1
- data/scss/foundation/components/_thumbs.scss +3 -1
- data/scss/foundation/components/_top-bar.scss +8 -6
- data/scss/foundation/components/_visibility.scss +1 -1
- data/scss/normalize.scss +13 -7
- data/templates/project/manifest.rb +2 -11
- data/templates/project/scss/app.scss +0 -1
- metadata +5 -7
- data/scss/foundation/_foundation-global.scss +0 -198
- data/templates/project/scss/normalize.scss +0 -396
@@ -6,7 +6,7 @@
|
|
6
6
|
Foundation.libs.clearing = {
|
7
7
|
name : 'clearing',
|
8
8
|
|
9
|
-
version : '4.1.
|
9
|
+
version : '4.1.3',
|
10
10
|
|
11
11
|
settings : {
|
12
12
|
templates : {
|
@@ -101,7 +101,7 @@
|
|
101
101
|
function (e) { this.keydown(e) }.bind(this));
|
102
102
|
|
103
103
|
$(window).on('resize.fndtn.clearing',
|
104
|
-
function (
|
104
|
+
function () { this.resize() }.bind(this));
|
105
105
|
|
106
106
|
this.settings.init = true;
|
107
107
|
return this;
|
@@ -214,7 +214,7 @@
|
|
214
214
|
}($(el))), container, visible_image;
|
215
215
|
|
216
216
|
if (el === e.target && root) {
|
217
|
-
container = root.find('div').first()
|
217
|
+
container = root.find('div').first();
|
218
218
|
visible_image = container.find('.visible-img');
|
219
219
|
this.settings.prev_index = 0;
|
220
220
|
root.find('ul[data-clearing]')
|
@@ -317,7 +317,11 @@
|
|
317
317
|
// image loading and preloading
|
318
318
|
|
319
319
|
load : function ($image) {
|
320
|
-
|
320
|
+
if ($image[0].nodeName === "A") {
|
321
|
+
var href = $image.attr('href');
|
322
|
+
} else {
|
323
|
+
var href = $image.parent().attr('href');
|
324
|
+
}
|
321
325
|
|
322
326
|
this.preload($image);
|
323
327
|
|
@@ -6,10 +6,12 @@
|
|
6
6
|
Foundation.libs.dropdown = {
|
7
7
|
name : 'dropdown',
|
8
8
|
|
9
|
-
version : '4.1.
|
9
|
+
version : '4.1.3',
|
10
10
|
|
11
11
|
settings : {
|
12
|
-
activeClass: 'open'
|
12
|
+
activeClass: 'open',
|
13
|
+
opened: function(){},
|
14
|
+
closed: function(){}
|
13
15
|
},
|
14
16
|
|
15
17
|
init : function (scope, method, options) {
|
@@ -35,10 +37,13 @@
|
|
35
37
|
events : function () {
|
36
38
|
var self = this;
|
37
39
|
|
38
|
-
$(this.scope)
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
$(this.scope)
|
41
|
+
.on('click.fndtn.dropdown', '[data-dropdown]', function (e) {
|
42
|
+
e.preventDefault();
|
43
|
+
self.toggle($(this));
|
44
|
+
})
|
45
|
+
.on('opened.fndtn.dropdown', '[data-dropdown-content]', this.settings.opened)
|
46
|
+
.on('closed.fndtn.dropdown', '[data-dropdown-content]', this.settings.closed);
|
42
47
|
|
43
48
|
$('body').on('click.fndtn.dropdown', function (e) {
|
44
49
|
var parent = $(e.target).closest('[data-dropdown-content]');
|
@@ -51,9 +56,7 @@
|
|
51
56
|
return;
|
52
57
|
}
|
53
58
|
|
54
|
-
$('[data-dropdown-content]')
|
55
|
-
.css(Foundation.rtl ? 'right':'left', '-99999px')
|
56
|
-
.removeClass(self.settings.activeClass);
|
59
|
+
self.close.call(self, $('[data-dropdown-content]'));
|
57
60
|
});
|
58
61
|
|
59
62
|
$(window).on('resize.fndtn.dropdown', self.throttle(function () {
|
@@ -63,22 +66,34 @@
|
|
63
66
|
this.settings.init = true;
|
64
67
|
},
|
65
68
|
|
66
|
-
|
69
|
+
close: function (dropdown) {
|
70
|
+
var self = this;
|
71
|
+
dropdown.each(function () {
|
72
|
+
if ($(this).hasClass(self.settings.activeClass)) {
|
73
|
+
$(this)
|
74
|
+
.css(Foundation.rtl ? 'right':'left', '-99999px')
|
75
|
+
.removeClass(self.settings.activeClass);
|
76
|
+
$(this).trigger('closed');
|
77
|
+
}
|
78
|
+
});
|
79
|
+
},
|
80
|
+
|
81
|
+
open: function (dropdown, target) {
|
82
|
+
this
|
83
|
+
.css(dropdown
|
84
|
+
.addClass(this.settings.activeClass), target);
|
85
|
+
dropdown.trigger('opened');
|
86
|
+
},
|
87
|
+
|
88
|
+
toggle : function (target) {
|
67
89
|
var dropdown = $('#' + target.data('dropdown'));
|
68
90
|
|
69
|
-
$('[data-dropdown-content]')
|
70
|
-
.not(dropdown)
|
71
|
-
.css(Foundation.rtl ? 'right':'left', '-99999px')
|
72
|
-
.removeClass(this.settings.activeClass);
|
91
|
+
this.close.call(this, $('[data-dropdown-content]').not(dropdown));
|
73
92
|
|
74
93
|
if (dropdown.hasClass(this.settings.activeClass)) {
|
75
|
-
dropdown
|
76
|
-
.css(Foundation.rtl ? 'right':'left', '-99999px')
|
77
|
-
.removeClass(this.settings.activeClass);
|
94
|
+
this.close.call(this, dropdown);
|
78
95
|
} else {
|
79
|
-
this
|
80
|
-
.css(dropdown
|
81
|
-
.addClass(this.settings.activeClass), target);
|
96
|
+
this.open.call(this, dropdown, target);
|
82
97
|
}
|
83
98
|
},
|
84
99
|
|
@@ -92,9 +107,14 @@
|
|
92
107
|
},
|
93
108
|
|
94
109
|
css : function (dropdown, target) {
|
95
|
-
|
96
|
-
|
97
|
-
|
110
|
+
// temporary workaround until 4.2
|
111
|
+
if (/body/i.test(dropdown.offsetParent()[0].nodeName)) {
|
112
|
+
var position = target.offset();
|
113
|
+
position.top -= dropdown.offsetParent().offset().top;
|
114
|
+
position.left -= dropdown.offsetParent().offset().left;
|
115
|
+
} else {
|
116
|
+
var position = target.position();
|
117
|
+
}
|
98
118
|
|
99
119
|
if (this.small()) {
|
100
120
|
dropdown.css({
|
@@ -37,7 +37,9 @@
|
|
37
37
|
.each(this.append_custom_markup);
|
38
38
|
$('form.custom input[type="checkbox"]', $(this.scope)).not('[data-customforms="disabled"]')
|
39
39
|
.each(this.append_custom_markup);
|
40
|
-
$('form.custom select', $(this.scope))
|
40
|
+
$('form.custom select', $(this.scope))
|
41
|
+
.not('[data-customforms="disabled"]')
|
42
|
+
.not('[multiple=multiple]')
|
41
43
|
.each(this.append_custom_select);
|
42
44
|
},
|
43
45
|
|
@@ -179,7 +181,7 @@
|
|
179
181
|
},
|
180
182
|
|
181
183
|
append_custom_markup : function (idx, sel) {
|
182
|
-
var $this = $(sel).
|
184
|
+
var $this = $(sel).addClass('hidden-field'),
|
183
185
|
type = $this.attr('type'),
|
184
186
|
$span = $this.next('span.custom.' + type);
|
185
187
|
|
@@ -222,7 +224,7 @@
|
|
222
224
|
$currentSelect = $customSelect.prepend('<a href="#" class="current">' + $selectedOption.html() + '</a>' ).find( ".current" );
|
223
225
|
$this
|
224
226
|
.after( $customSelect )
|
225
|
-
.
|
227
|
+
.addClass('hidden-field');
|
226
228
|
|
227
229
|
} else {
|
228
230
|
liHtml = $options.map(function() {
|
@@ -338,7 +338,7 @@
|
|
338
338
|
return Modernizr.mq('only screen and (max-width: 767px)') || $('.lt-ie9').length > 0;
|
339
339
|
}
|
340
340
|
|
341
|
-
return (this.settings.$window.width() < 767)
|
341
|
+
return (this.settings.$window.width() < 767);
|
342
342
|
},
|
343
343
|
|
344
344
|
hide : function () {
|
@@ -399,11 +399,7 @@
|
|
399
399
|
},
|
400
400
|
|
401
401
|
paused : function () {
|
402
|
-
|
403
|
-
return true;
|
404
|
-
}
|
405
|
-
|
406
|
-
return false;
|
402
|
+
return ($.inArray((this.settings.$li.index() + 1), this.settings.pauseAfter) === -1);
|
407
403
|
},
|
408
404
|
|
409
405
|
restart : function () {
|
data/js/foundation/foundation.js
CHANGED
@@ -13,21 +13,22 @@
|
|
13
13
|
// See http://docs.jquery.com/Using_jQuery_with_Other_Libraries
|
14
14
|
// and http://zeptojs.com/
|
15
15
|
var libFuncName = null;
|
16
|
+
|
16
17
|
if (typeof jQuery === "undefined" &&
|
17
18
|
typeof Zepto === "undefined" &&
|
18
19
|
typeof $ === "function") {
|
19
|
-
|
20
|
+
libFuncName = $;
|
20
21
|
} else if (typeof jQuery === "function") {
|
21
|
-
|
22
|
+
libFuncName = jQuery;
|
22
23
|
} else if (typeof Zepto === "function") {
|
23
|
-
|
24
|
+
libFuncName = Zepto;
|
24
25
|
} else {
|
25
|
-
|
26
|
+
throw new TypeError();
|
26
27
|
}
|
27
28
|
|
28
|
-
(function (
|
29
|
+
(function ($, window, document, undefined) {
|
30
|
+
'use strict';
|
29
31
|
|
30
|
-
(function () {
|
31
32
|
// add dusty browser stuff
|
32
33
|
if (!Array.prototype.filter) {
|
33
34
|
Array.prototype.filter = function(fun /*, thisp */) {
|
@@ -36,17 +37,13 @@ if (typeof jQuery === "undefined" &&
|
|
36
37
|
if (this == null) {
|
37
38
|
throw new TypeError();
|
38
39
|
}
|
39
|
-
|
40
|
+
|
40
41
|
var t = Object(this),
|
41
42
|
len = t.length >>> 0;
|
42
43
|
if (typeof fun != "function") {
|
43
|
-
try {
|
44
|
-
throw new TypeError();
|
45
|
-
} catch (e) {
|
46
44
|
return;
|
47
|
-
}
|
48
45
|
}
|
49
|
-
|
46
|
+
|
50
47
|
var res = [],
|
51
48
|
thisp = arguments[1];
|
52
49
|
for (var i = 0; i < len; i++) {
|
@@ -57,32 +54,65 @@ if (typeof jQuery === "undefined" &&
|
|
57
54
|
}
|
58
55
|
}
|
59
56
|
}
|
60
|
-
|
57
|
+
|
61
58
|
return res;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
if (!Function.prototype.bind) {
|
63
|
+
Function.prototype.bind = function (oThis) {
|
64
|
+
if (typeof this !== "function") {
|
65
|
+
// closest thing possible to the ECMAScript 5 internal IsCallable function
|
66
|
+
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
67
|
+
}
|
68
|
+
|
69
|
+
var aArgs = Array.prototype.slice.call(arguments, 1),
|
70
|
+
fToBind = this,
|
71
|
+
fNOP = function () {},
|
72
|
+
fBound = function () {
|
73
|
+
return fToBind.apply(this instanceof fNOP && oThis
|
74
|
+
? this
|
75
|
+
: oThis,
|
76
|
+
aArgs.concat(Array.prototype.slice.call(arguments)));
|
77
|
+
};
|
78
|
+
|
79
|
+
fNOP.prototype = this.prototype;
|
80
|
+
fBound.prototype = new fNOP();
|
81
|
+
|
82
|
+
return fBound;
|
62
83
|
};
|
84
|
+
}
|
63
85
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
86
|
+
if (!Array.prototype.indexOf) {
|
87
|
+
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
|
88
|
+
"use strict";
|
89
|
+
if (this == null) {
|
90
|
+
throw new TypeError();
|
91
|
+
}
|
92
|
+
var t = Object(this);
|
93
|
+
var len = t.length >>> 0;
|
94
|
+
if (len === 0) {
|
95
|
+
return -1;
|
96
|
+
}
|
97
|
+
var n = 0;
|
98
|
+
if (arguments.length > 1) {
|
99
|
+
n = Number(arguments[1]);
|
100
|
+
if (n != n) { // shortcut for verifying if it's NaN
|
101
|
+
n = 0;
|
102
|
+
} else if (n != 0 && n != Infinity && n != -Infinity) {
|
103
|
+
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
69
104
|
}
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
fNOP.prototype = this.prototype;
|
82
|
-
fBound.prototype = new fNOP();
|
83
|
-
|
84
|
-
return fBound;
|
85
|
-
};
|
105
|
+
}
|
106
|
+
if (n >= len) {
|
107
|
+
return -1;
|
108
|
+
}
|
109
|
+
var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
|
110
|
+
for (; k < len; k++) {
|
111
|
+
if (k in t && t[k] === searchElement) {
|
112
|
+
return k;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
return -1;
|
86
116
|
}
|
87
117
|
}
|
88
118
|
|
@@ -90,15 +120,11 @@ if (typeof jQuery === "undefined" &&
|
|
90
120
|
$.fn.stop = $.fn.stop || function() {
|
91
121
|
return this;
|
92
122
|
};
|
93
|
-
}());
|
94
|
-
|
95
|
-
;(function (window, document, undefined) {
|
96
|
-
'use strict';
|
97
123
|
|
98
124
|
window.Foundation = {
|
99
125
|
name : 'Foundation',
|
100
126
|
|
101
|
-
version : '4.1.
|
127
|
+
version : '4.1.5',
|
102
128
|
|
103
129
|
// global Foundation cache object
|
104
130
|
cache : {},
|
@@ -108,12 +134,11 @@ if (typeof jQuery === "undefined" &&
|
|
108
134
|
args = [scope, method, options, response],
|
109
135
|
responses = [],
|
110
136
|
nc = nc || false;
|
111
|
-
|
137
|
+
|
112
138
|
// disable library error catching,
|
113
139
|
// used for development only
|
114
140
|
if (nc) this.nc = nc;
|
115
141
|
|
116
|
-
|
117
142
|
// check RTL
|
118
143
|
this.rtl = /rtl/i.test($('html').attr('dir'));
|
119
144
|
|
@@ -197,11 +222,11 @@ if (typeof jQuery === "undefined" &&
|
|
197
222
|
|
198
223
|
random_str : function (length) {
|
199
224
|
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split('');
|
200
|
-
|
225
|
+
|
201
226
|
if (!length) {
|
202
227
|
length = Math.floor(Math.random() * chars.length);
|
203
228
|
}
|
204
|
-
|
229
|
+
|
205
230
|
var str = '';
|
206
231
|
for (var i = 0; i < length; i++) {
|
207
232
|
str += chars[Math.floor(Math.random() * chars.length)];
|
@@ -362,7 +387,7 @@ if (typeof jQuery === "undefined" &&
|
|
362
387
|
return jQuery;
|
363
388
|
}
|
364
389
|
}()
|
365
|
-
}
|
390
|
+
};
|
366
391
|
|
367
392
|
$.fn.foundation = function () {
|
368
393
|
var args = Array.prototype.slice.call(arguments, 0);
|
@@ -373,6 +398,4 @@ if (typeof jQuery === "undefined" &&
|
|
373
398
|
});
|
374
399
|
};
|
375
400
|
|
376
|
-
}(this, this.document));
|
377
|
-
|
378
|
-
})(libFuncName);
|
401
|
+
}(libFuncName, this, this.document));
|
@@ -13,6 +13,8 @@
|
|
13
13
|
animation_speed: 500,
|
14
14
|
bullets: true,
|
15
15
|
stack_on_small: true,
|
16
|
+
navigation_arrows: true,
|
17
|
+
slide_number: true,
|
16
18
|
container_class: 'orbit-container',
|
17
19
|
stack_on_small_class: 'orbit-stack-on-small',
|
18
20
|
next_class: 'orbit-next',
|
@@ -97,13 +99,17 @@
|
|
97
99
|
|
98
100
|
$.extend(true, self.settings, self.data_options($slides_container));
|
99
101
|
|
100
|
-
|
101
|
-
|
102
|
+
if (self.settings.navigation_arrows) {
|
103
|
+
$container.append(self._prev_html());
|
104
|
+
$container.append(self._next_html());
|
105
|
+
}
|
102
106
|
$slides_container.addClass(self.settings.slides_container_class);
|
103
107
|
if (self.settings.stack_on_small) {
|
104
108
|
$container.addClass(self.settings.stack_on_small_class);
|
105
109
|
}
|
106
|
-
|
110
|
+
if (self.settings.slide_number) {
|
111
|
+
$container.append(self._slide_number_html(1, $slides.length));
|
112
|
+
}
|
107
113
|
$container.append(self._timer_html());
|
108
114
|
if (self.settings.bullets) {
|
109
115
|
$container.after(self._bullets_container_html($slides));
|
@@ -261,7 +267,7 @@
|
|
261
267
|
$container = $slides_container.parent(),
|
262
268
|
$timer = $container.find('.' + self.settings.timer_container_class),
|
263
269
|
$progress = $timer.find('.' + self.settings.timer_progress_class),
|
264
|
-
progress_pct = $progress.width() / $timer.width()
|
270
|
+
progress_pct = $progress.width() / $timer.width();
|
265
271
|
self._rebuild_timer($container, progress_pct * 100 + '%');
|
266
272
|
// $progress.stop();
|
267
273
|
$slides_container.trigger('orbit:timer-stopped');
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Foundation.libs.reveal = {
|
7
7
|
name: 'reveal',
|
8
8
|
|
9
|
-
version : '4.1.
|
9
|
+
version : '4.1.3',
|
10
10
|
|
11
11
|
locked : false,
|
12
12
|
|
@@ -69,6 +69,11 @@
|
|
69
69
|
.on('click.fndtn.reveal touchend.click.fndtn.reveal', this.close_targets(), function (e) {
|
70
70
|
e.preventDefault();
|
71
71
|
if (!self.locked) {
|
72
|
+
var settings = $.extend({}, self.settings, self.data_options($('.reveal-modal.open')));
|
73
|
+
if ($(e.target)[0] === $('.' + settings.bgClass)[0] && !settings.closeOnBackgroundClick) {
|
74
|
+
return;
|
75
|
+
}
|
76
|
+
|
72
77
|
self.locked = true;
|
73
78
|
self.close.call(self, $(this).closest('.reveal-modal'));
|
74
79
|
}
|
@@ -103,7 +108,7 @@
|
|
103
108
|
if (open_modal.length < 1) {
|
104
109
|
this.toggle_bg(modal);
|
105
110
|
}
|
106
|
-
this.hide(open_modal, this.settings.css.
|
111
|
+
this.hide(open_modal, this.settings.css.close);
|
107
112
|
this.show(modal, this.settings.css.open);
|
108
113
|
}
|
109
114
|
},
|
@@ -152,7 +157,7 @@
|
|
152
157
|
var end_css = {
|
153
158
|
top: $(window).scrollTop() + el.data('css-top') + 'px',
|
154
159
|
opacity: 1
|
155
|
-
}
|
160
|
+
};
|
156
161
|
|
157
162
|
return this.delay(function () {
|
158
163
|
return el
|