foundation-rails 5.2.2.0 → 5.2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/bower.json +2 -2
  3. data/lib/foundation/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/foundation/foundation.abide.js +5 -5
  5. data/vendor/assets/javascripts/foundation/foundation.accordion.js +13 -8
  6. data/vendor/assets/javascripts/foundation/foundation.alert.js +2 -2
  7. data/vendor/assets/javascripts/foundation/foundation.clearing.js +36 -33
  8. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +15 -10
  9. data/vendor/assets/javascripts/foundation/foundation.equalizer.js +12 -6
  10. data/vendor/assets/javascripts/foundation/foundation.interchange.js +3 -3
  11. data/vendor/assets/javascripts/foundation/foundation.joyride.js +9 -15
  12. data/vendor/assets/javascripts/foundation/foundation.js +30 -28
  13. data/vendor/assets/javascripts/foundation/foundation.magellan.js +36 -31
  14. data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +72 -14
  15. data/vendor/assets/javascripts/foundation/foundation.orbit.js +19 -15
  16. data/vendor/assets/javascripts/foundation/foundation.reveal.js +26 -16
  17. data/vendor/assets/javascripts/foundation/foundation.slider.js +2 -3
  18. data/vendor/assets/javascripts/foundation/foundation.tab.js +8 -9
  19. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +30 -4
  20. data/vendor/assets/javascripts/foundation/foundation.topbar.js +22 -19
  21. data/vendor/assets/stylesheets/foundation/_settings.scss +50 -40
  22. data/vendor/assets/stylesheets/foundation/components/_accordion.scss +8 -7
  23. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +2 -2
  24. data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +1 -1
  25. data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +1 -1
  26. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +8 -8
  27. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +6 -6
  28. data/vendor/assets/stylesheets/foundation/components/_forms.scss +7 -5
  29. data/vendor/assets/stylesheets/foundation/components/_global.scss +67 -3
  30. data/vendor/assets/stylesheets/foundation/components/_grid.scss +1 -2
  31. data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +2 -1
  32. data/vendor/assets/stylesheets/foundation/components/_joyride.scss +3 -3
  33. data/vendor/assets/stylesheets/foundation/components/_labels.scss +1 -1
  34. data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +32 -58
  35. data/vendor/assets/stylesheets/foundation/components/_orbit.scss +39 -31
  36. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +5 -5
  37. data/vendor/assets/stylesheets/foundation/components/_panels.scss +4 -5
  38. data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +5 -5
  39. data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +2 -2
  40. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +2 -2
  41. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +26 -4
  42. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +7 -7
  43. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +2 -2
  44. data/vendor/assets/stylesheets/foundation/components/_switch.scss +2 -2
  45. data/vendor/assets/stylesheets/foundation/components/_tables.scss +44 -12
  46. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +9 -5
  47. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +4 -4
  48. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +30 -26
  49. data/vendor/assets/stylesheets/foundation/components/_type.scss +39 -21
  50. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +64 -1
  51. data/vendor/assets/stylesheets/normalize.scss +20 -18
  52. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40cac7da73492001caf73d9daac51ce331bcf82d
4
- data.tar.gz: 054b8d3503933b9a59a40f71d2f4ceed50e3da1c
3
+ metadata.gz: 21205ff6d9c78a75a7eccec7f9664b640367a44f
4
+ data.tar.gz: 7fa95a5029bad3266b262bea92c6f7d20da93cc0
5
5
  SHA512:
6
- metadata.gz: a858d9ec7fa4e39eb917c0d1dd14ed524f434b0b46478a9082ef5b7b3964b9c5d93ef333373551bd2a4e054116a3ccd7e94642ccdb22e12402b937f58b983799
7
- data.tar.gz: 8cb3506868bdb589eb1f5228f23190e43cb12cc62786abafec975e6a7a33f823f5ea13f6bcdf37a1619d7821c54889f9dca060449be7bca761f487aac40e42ed
6
+ metadata.gz: bd3d54a098dc76151106e30a7914c5d015b59bf2b9bc775701a8f36790d65ddee31c7bc2c51dc4e37120110f6b7b3d01cba591fcafc797d05c0aee5d5dd48fb0
7
+ data.tar.gz: d19ddac915e4dd12d90f4b7154d763ecf3c1dd0e48dd068404227061f91f8d5e18698faf33007997c91027ea2f7e31bfec006f9f8894854150ad987e203793f0
data/bower.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "foundation-rails",
3
- "version": "5.2.2.0",
3
+ "version": "5.2.3.0",
4
4
  "dependencies": {
5
- "foundation": "5.2.2"
5
+ "foundation": "5.2.3"
6
6
  }
7
7
  }
@@ -1,5 +1,5 @@
1
1
  module Foundation
2
2
  module Rails
3
- VERSION = "5.2.2.0"
3
+ VERSION = "5.2.3.0"
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.abide = {
5
5
  name : 'abide',
6
6
 
7
- version : '5.2.2',
7
+ version : '5.2.3',
8
8
 
9
9
  settings : {
10
10
  live_validate : true,
@@ -35,7 +35,7 @@
35
35
  time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
36
36
  dateISO: /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
37
37
  // MM/DD/YYYY
38
- month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d$/,
38
+ month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
39
39
 
40
40
  // #FFF or #FFFFFF
41
41
  color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
@@ -164,7 +164,7 @@
164
164
  while (i--) {
165
165
  var el = el_patterns[i][0],
166
166
  required = el_patterns[i][2],
167
- value = el.value,
167
+ value = el.value.trim(),
168
168
  direct_parent = this.S(el).parent(),
169
169
  validator = el.getAttribute(this.add_namespace('data-abide-validator')),
170
170
  is_radio = el.type === "radio",
@@ -238,7 +238,7 @@
238
238
 
239
239
  valid_radio : function (el, required) {
240
240
  var name = el.getAttribute('name'),
241
- group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name="+name+"]"),
241
+ group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='"+name+"']"),
242
242
  count = group.length,
243
243
  valid = false;
244
244
 
@@ -296,4 +296,4 @@
296
296
  return valid;
297
297
  }
298
298
  };
299
- }(jQuery, this, this.document));
299
+ }(jQuery, window, window.document));
@@ -4,12 +4,13 @@
4
4
  Foundation.libs.accordion = {
5
5
  name : 'accordion',
6
6
 
7
- version : '5.2.2',
7
+ version : '5.2.3',
8
8
 
9
9
  settings : {
10
10
  active_class: 'active',
11
11
  multi_expand: false,
12
- toggleable: true
12
+ toggleable: true,
13
+ callback : function () {}
13
14
  },
14
15
 
15
16
  init : function (scope, method, options) {
@@ -21,20 +22,23 @@
21
22
  var S = this.S;
22
23
  S(this.scope)
23
24
  .off('.fndtn.accordion')
24
- .on('click.fndtn.accordion', '[' + this.attr_name() + '] dd > a', function (e) {
25
+ .on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a', function (e) {
25
26
  var accordion = S(this).closest('[' + self.attr_name() + ']'),
26
27
  target = S('#' + this.href.split('#')[1]),
27
28
  siblings = S('dd > .content', accordion),
28
29
  aunts = $('dd', accordion),
30
+ groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
29
31
  settings = accordion.data(self.attr_name(true) + '-init'),
30
- active_content = S('dd > .content.' + settings.active_class, accordion),
31
- active_parent = S('dd.' + settings.active_class, accordion);
32
+ active_content = S('dd > .content.' + settings.active_class, accordion);
32
33
  e.preventDefault();
33
34
 
34
- if (! S(this).closest('dl').is(accordion)) { return; }
35
+ if (accordion.attr(self.attr_name())) {
36
+ siblings = siblings.add('[' + groupSelector + '] dd > .content');
37
+ aunts = aunts.add('[' + groupSelector + '] dd');
38
+ }
35
39
 
36
40
  if (settings.toggleable && target.is(active_content)) {
37
- active_parent.toggleClass(settings.active_class, false);
41
+ target.parent('dd').toggleClass(settings.active_class, false);
38
42
  return target.toggleClass(settings.active_class, false);
39
43
  }
40
44
 
@@ -44,6 +48,7 @@
44
48
  }
45
49
 
46
50
  target.addClass(settings.active_class).parent().addClass(settings.active_class);
51
+ settings.callback(target);
47
52
  });
48
53
  },
49
54
 
@@ -51,4 +56,4 @@
51
56
 
52
57
  reflow : function () {}
53
58
  };
54
- }(jQuery, this, this.document));
59
+ }(jQuery, window, window.document));
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.alert = {
5
5
  name : 'alert',
6
6
 
7
- version : '5.2.2',
7
+ version : '5.2.3',
8
8
 
9
9
  settings : {
10
10
  callback: function (){}
@@ -40,4 +40,4 @@
40
40
 
41
41
  reflow : function () {}
42
42
  };
43
- }(jQuery, this, this.document));
43
+ }(jQuery, window, window.document));
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.clearing = {
5
5
  name : 'clearing',
6
6
 
7
- version: '5.2.2',
7
+ version: '5.2.3',
8
8
 
9
9
  settings : {
10
10
  templates : {
@@ -42,10 +42,11 @@
42
42
 
43
43
  events : function (scope) {
44
44
  var self = this,
45
- S = self.S;
45
+ S = self.S,
46
+ $scroll_container = $('.scroll-container');
46
47
 
47
- if ($('.scroll-container').length > 0) {
48
- this.scope = $('.scroll-container');
48
+ if ($scroll_container.length > 0) {
49
+ this.scope = $scroll_container;
49
50
  }
50
51
 
51
52
  S(this.scope)
@@ -151,8 +152,10 @@
151
152
  }
152
153
 
153
154
  $el.after('<div id="foundationClearingHolder"></div>');
154
- var grid = $el.detach();
155
- var grid_outerHTML = '';
155
+
156
+ var grid = $el.detach(),
157
+ grid_outerHTML = '';
158
+
156
159
  if (grid[0] == null) {
157
160
  return;
158
161
  } else {
@@ -161,7 +164,6 @@
161
164
 
162
165
  var holder = this.S('#foundationClearingHolder'),
163
166
  settings = $el.data(this.attr_name(true) + '-init'),
164
- grid = $el.detach(),
165
167
  data = {
166
168
  grid: '<div class="carousel">' + grid_outerHTML + '</div>',
167
169
  viewing: settings.templates.viewing
@@ -205,7 +207,7 @@
205
207
 
206
208
  function cb (image) {
207
209
  var $image = $(image);
208
- image.css('visibility', 'visible');
210
+ $image.css('visibility', 'visible');
209
211
  // toggle the gallery
210
212
  body.css('overflow', 'hidden');
211
213
  root.addClass('clearing-blackout');
@@ -218,16 +220,17 @@
218
220
  target.siblings().removeClass('visible');
219
221
  target.addClass('visible');
220
222
  });
223
+ visible_image.trigger('opened.fndtn.clearing')
221
224
  }
222
225
 
223
226
  if (!this.locked()) {
227
+ visible_image.trigger('open.fndtn.clearing');
224
228
  // set the image to the selected thumbnail
225
229
  image
226
230
  .attr('src', this.load($image))
227
231
  .css('visibility', 'hidden');
228
232
 
229
233
  startLoad.call(this);
230
-
231
234
  }
232
235
  },
233
236
 
@@ -247,12 +250,14 @@
247
250
  body.css('overflow', '');
248
251
  container = $('div', root).first();
249
252
  visible_image = $('.visible-img', container);
253
+ visible_image.trigger('close.fndtn.clearing');
250
254
  this.settings.prev_index = 0;
251
255
  $('ul[' + this.attr_name() + ']', root)
252
256
  .attr('style', '').closest('.clearing-blackout')
253
257
  .removeClass('clearing-blackout');
254
258
  container.removeClass('clearing-container');
255
259
  visible_image.hide();
260
+ visible_image.trigger('closed.fndtn.clearing');
256
261
  }
257
262
 
258
263
  return false;
@@ -286,6 +291,7 @@
286
291
 
287
292
  if (image.length) {
288
293
  this.center_and_label(image, label);
294
+ image.trigger('resized.fndtn.clearing')
289
295
  }
290
296
  },
291
297
 
@@ -295,15 +301,15 @@
295
301
  self = this;
296
302
 
297
303
  lis.each(function () {
298
- var li = self.S(this),
299
- image = li.find('img');
304
+ var li = self.S(this),
305
+ image = li.find('img');
300
306
 
301
- if (li.height() > image.outerHeight()) {
302
- li.addClass('fix-height');
303
- }
304
- })
305
- .closest('ul')
306
- .width(lis.length * 100 + '%');
307
+ if (li.height() > image.outerHeight()) {
308
+ li.addClass('fix-height');
309
+ }
310
+ })
311
+ .closest('ul')
312
+ .width(lis.length * 100 + '%');
307
313
 
308
314
  return this;
309
315
  },
@@ -314,19 +320,15 @@
314
320
  .siblings('.visible-img');
315
321
 
316
322
  if (target.next().length > 0) {
317
- this.S('.clearing-main-next', visible_image)
318
- .removeClass('disabled');
323
+ this.S('.clearing-main-next', visible_image).removeClass('disabled');
319
324
  } else {
320
- this.S('.clearing-main-next', visible_image)
321
- .addClass('disabled');
325
+ this.S('.clearing-main-next', visible_image).addClass('disabled');
322
326
  }
323
327
 
324
328
  if (target.prev().length > 0) {
325
- this.S('.clearing-main-prev', visible_image)
326
- .removeClass('disabled');
329
+ this.S('.clearing-main-prev', visible_image).removeClass('disabled');
327
330
  } else {
328
- this.S('.clearing-main-prev', visible_image)
329
- .addClass('disabled');
331
+ this.S('.clearing-main-prev', visible_image).addClass('disabled');
330
332
  }
331
333
  },
332
334
 
@@ -366,10 +368,12 @@
366
368
  // image loading and preloading
367
369
 
368
370
  load : function ($image) {
371
+ var href;
372
+
369
373
  if ($image[0].nodeName === "A") {
370
- var href = $image.attr('href');
374
+ href = $image.attr('href');
371
375
  } else {
372
- var href = $image.parent().attr('href');
376
+ href = $image.parent().attr('href');
373
377
  }
374
378
 
375
379
  this.preload($image);
@@ -423,7 +427,8 @@
423
427
 
424
428
  if (target.length) {
425
429
  this.S('img', target)
426
- .trigger('click', [current, target]);
430
+ .trigger('click', [current, target])
431
+ .trigger('change.fndtn.clearing');
427
432
  }
428
433
  },
429
434
 
@@ -479,11 +484,9 @@
479
484
  this.settings.up_count = up_count;
480
485
 
481
486
  if (this.adjacent(this.settings.prev_index, target_index)) {
482
- if ((target_index > up_count)
483
- && target_index > this.settings.prev_index) {
487
+ if ((target_index > up_count) && target_index > this.settings.prev_index) {
484
488
  response = 'right';
485
- } else if ((target_index > up_count - 1)
486
- && target_index <= this.settings.prev_index) {
489
+ } else if ((target_index > up_count - 1) && target_index <= this.settings.prev_index) {
487
490
  response = 'left';
488
491
  } else {
489
492
  response = false;
@@ -528,4 +531,4 @@
528
531
  }
529
532
  };
530
533
 
531
- }(jQuery, this, this.document));
534
+ }(jQuery, window, window.document));
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.dropdown = {
5
5
  name : 'dropdown',
6
6
 
7
- version : '5.2.2',
7
+ version : '5.2.3',
8
8
 
9
9
  settings : {
10
10
  active_class: 'open',
@@ -34,15 +34,18 @@
34
34
  }
35
35
  })
36
36
  .on('mouseenter.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
37
- var $this = S(this);
37
+ var $this = S(this),
38
+ dropdown,
39
+ target;
40
+
38
41
  clearTimeout(self.timeout);
39
42
 
40
43
  if ($this.data(self.data_attr())) {
41
- var dropdown = S('#' + $this.data(self.data_attr())),
42
- target = $this;
44
+ dropdown = S('#' + $this.data(self.data_attr()));
45
+ target = $this;
43
46
  } else {
44
- var dropdown = $this;
45
- target = S("[" + self.attr_name() + "='" + dropdown.attr('id') + "']");
47
+ dropdown = $this;
48
+ target = S("[" + self.attr_name() + "='" + dropdown.attr('id') + "']");
46
49
  }
47
50
 
48
51
  var settings = target.data(self.attr_name(true) + '-init') || self.settings;
@@ -105,7 +108,8 @@
105
108
  .css(Foundation.rtl ? 'right':'left', '-99999px')
106
109
  .removeClass(self.settings.active_class)
107
110
  .prev('[' + self.attr_name() + ']')
108
- .removeClass(self.settings.active_class);
111
+ .removeClass(self.settings.active_class)
112
+ .removeData('target');
109
113
 
110
114
  self.S(this).trigger('closed', [dropdown]);
111
115
  }
@@ -124,7 +128,7 @@
124
128
  .css(dropdown
125
129
  .addClass(this.settings.active_class), target);
126
130
  dropdown.prev('[' + this.attr_name() + ']').addClass(this.settings.active_class);
127
- dropdown.trigger('opened', [dropdown, target]);
131
+ dropdown.data('target', target.get(0)).trigger('opened', [dropdown, target]);
128
132
  },
129
133
 
130
134
  data_attr: function () {
@@ -146,8 +150,9 @@
146
150
 
147
151
  if (dropdown.hasClass(this.settings.active_class)) {
148
152
  this.close.call(this, dropdown);
153
+ if (dropdown.data('target') !== target.get(0))
154
+ this.open.call(this, dropdown, target);
149
155
  } else {
150
- this.close.call(this, this.S('[' + this.attr_name() + '-content]'))
151
156
  this.open.call(this, dropdown, target);
152
157
  }
153
158
  },
@@ -303,4 +308,4 @@
303
308
 
304
309
  reflow : function () {}
305
310
  };
306
- }(jQuery, this, this.document));
311
+ }(jQuery, window, window.document));
@@ -4,12 +4,13 @@
4
4
  Foundation.libs.equalizer = {
5
5
  name : 'equalizer',
6
6
 
7
- version : '5.2.2',
7
+ version : '5.2.3',
8
8
 
9
9
  settings : {
10
10
  use_tallest: true,
11
11
  before_height_change: $.noop,
12
- after_height_change: $.noop
12
+ after_height_change: $.noop,
13
+ equalize_on_stack: false
13
14
  },
14
15
 
15
16
  init : function (scope, method, options) {
@@ -27,10 +28,10 @@
27
28
  equalize: function(equalizer) {
28
29
  var isStacked = false,
29
30
  vals = equalizer.find('[' + this.attr_name() + '-watch]:visible'),
30
- firstTopOffset = vals.first().offset().top,
31
31
  settings = equalizer.data(this.attr_name(true)+'-init');
32
32
 
33
33
  if (vals.length === 0) return;
34
+ var firstTopOffset = vals.first().offset().top;
34
35
  settings.before_height_change();
35
36
  equalizer.trigger('before-height-change');
36
37
  vals.height('inherit');
@@ -40,9 +41,13 @@
40
41
  isStacked = true;
41
42
  }
42
43
  });
43
- if (isStacked) return;
44
44
 
45
- var heights = vals.map(function(){ return $(this).outerHeight() }).get();
45
+ if (settings.equalize_on_stack === false) {
46
+ if (isStacked) return;
47
+ };
48
+
49
+ var heights = vals.map(function(){ return $(this).outerHeight(false) }).get();
50
+
46
51
  if (settings.use_tallest) {
47
52
  var max = Math.max.apply(null, heights);
48
53
  vals.css('height', max);
@@ -65,4 +70,5 @@
65
70
  });
66
71
  }
67
72
  };
68
- }(jQuery, this, this.document));
73
+ })(jQuery, window, window.document);
74
+
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.interchange = {
5
5
  name : 'interchange',
6
6
 
7
- version : '5.2.2',
7
+ version : '5.2.3',
8
8
 
9
9
  cache : {},
10
10
 
@@ -259,7 +259,7 @@
259
259
  var split = raw_arr[i].split(/\((.*?)(\))$/);
260
260
 
261
261
  if (split.length > 1) {
262
- var cached_split = split[0].split(','),
262
+ var cached_split = split[0].split(/\, /),
263
263
  params = this.parse_params(cached_split[0],
264
264
  cached_split[1], split[1]);
265
265
 
@@ -328,4 +328,4 @@
328
328
 
329
329
  };
330
330
 
331
- }(jQuery, this, this.document));
331
+ }(jQuery, window, window.document));