Socket
Socket
Sign inDemoInstall

foundation-sites

Package Overview
Dependencies
2
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.2.1 to 6.2.2-rc1

vendor/fastclick/.bower.json

15

dist/plugins/foundation.abide.js

@@ -45,3 +45,3 @@ 'use strict';

value: function _init() {
this.$inputs = this.$element.find('input, textarea, select').not('[data-abide-ignore]');
this.$inputs = this.$element.find('input, textarea, select');

@@ -105,2 +105,6 @@ this._events();

switch ($el[0].type) {
case 'checkbox':
isGood = $el[0].checked;
break;
case 'select':

@@ -282,2 +286,7 @@ case 'select-one':

// don't validate ignored inputs or hidden inputs
if ($el.is('[data-abide-ignore]') || $el.is('[type="hidden"]')) {
return true;
}
switch ($el[0].type) {

@@ -458,3 +467,5 @@ case 'radio':

$form.find('[data-abide-error]').css('display', 'none');
$(':input', $form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr('data-invalid');
$(':input', $form).not(':button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]').val('').removeAttr('data-invalid');
$(':input:radio', $form).not('[data-abide-ignore]').prop('checked', false).removeAttr('data-invalid');
$(':input:checkbox', $form).not('[data-abide-ignore]').prop('checked', false).removeAttr('data-invalid');
/**

@@ -461,0 +472,0 @@ * Fires when the form has been reset.

2

dist/plugins/foundation.accordion.js

@@ -229,3 +229,3 @@ 'use strict';

value: function destroy() {
this.$element.find('[data-tab-content]').slideUp(0).css('display', '');
this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');
this.$element.find('a').off('.zf.accordion');

@@ -232,0 +232,0 @@

@@ -165,7 +165,7 @@ 'use strict';

$prevElement.attr('tabindex', -1).focus();
e.preventDefault();
return true;
},
down: function () {
$nextElement.attr('tabindex', -1).focus();
e.preventDefault();
return true;
},

@@ -180,3 +180,6 @@ toggle: function () {

},
handled: function () {
handled: function (preventDefault) {
if (preventDefault) {
e.preventDefault();
}
e.stopImmediatePropagation();

@@ -234,11 +237,11 @@ }

Foundation.Move(this.options.slideSpeed, $target, function () {
$target.slideDown(_this.options.slideSpeed, function () {
/**
* Fires when the menu is done opening.
* @event AccordionMenu#down
*/
_this.$element.trigger('down.zf.accordionMenu', [$target]);
});
//Foundation.Move(this.options.slideSpeed, $target, function() {
$target.slideDown(_this.options.slideSpeed, function () {
/**
* Fires when the menu is done opening.
* @event AccordionMenu#down
*/
_this.$element.trigger('down.zf.accordionMenu', [$target]);
});
//});
}

@@ -256,11 +259,11 @@

var _this = this;
Foundation.Move(this.options.slideSpeed, $target, function () {
$target.slideUp(_this.options.slideSpeed, function () {
/**
* Fires when the menu is done collapsing up.
* @event AccordionMenu#up
*/
_this.$element.trigger('up.zf.accordionMenu', [$target]);
});
//Foundation.Move(this.options.slideSpeed, $target, function(){
$target.slideUp(_this.options.slideSpeed, function () {
/**
* Fires when the menu is done collapsing up.
* @event AccordionMenu#up
*/
_this.$element.trigger('up.zf.accordionMenu', [$target]);
});
//});

@@ -267,0 +270,0 @@ var $menus = $target.find('[data-submenu]').slideUp(0).addBack().attr('aria-hidden', true);

@@ -5,3 +5,3 @@ !function ($) {

var FOUNDATION_VERSION = '6.2.1';
var FOUNDATION_VERSION = '6.2.2-rc1';

@@ -48,3 +48,3 @@ // Global Foundation object

* Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls.
* Also fires the initialization event for each plugin, consolidating repeditive code.
* Also fires the initialization event for each plugin, consolidating repetitive code.
* @param {Object} plugin - an instance of a plugin, usually `this` in context.

@@ -78,3 +78,3 @@ * @param {String} name - the name of the plugin, passed as a camelCased string.

* Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.
* Also fires the destroyed event for the plugin, consolidating repeditive code.
* Also fires the destroyed event for the plugin, consolidating repetitive code.
* @param {Object} plugin - an instance of a plugin, usually `this` in context.

@@ -81,0 +81,0 @@ * @fires Plugin#destroyed

@@ -83,4 +83,4 @@ 'use strict';

this.$submenuAnchors.each(function () {
var $sub = $(this);
var $link = $sub.find('a:first');
var $link = $(this);
var $sub = $link.parent();
if (_this.options.parentLink) {

@@ -90,3 +90,3 @@ $link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="menu-item"></li>');

$link.data('savedHref', $link.attr('href')).removeAttr('href');
$sub.children('[data-submenu]').attr({
$link.children('[data-submenu]').attr({
'aria-hidden': true,

@@ -96,3 +96,3 @@ 'tabindex': 0,

});
_this._events($sub);
_this._events($link);
});

@@ -108,4 +108,4 @@ this.$submenus.each(function () {

if (!this.$element.parent().hasClass('is-drilldown')) {
this.$wrapper = $(this.options.wrapper).addClass('is-drilldown').css(this._getMaxDims());
this.$element.wrap(this.$wrapper);
this.$wrapper = $(this.options.wrapper).addClass('is-drilldown');
this.$wrapper = this.$element.wrap(this.$wrapper).parent().css(this._getMaxDims());
}

@@ -138,4 +138,7 @@ }

if (_this.options.closeOnClick) {
var $body = $('body').not(_this.$wrapper);
var $body = $('body');
$body.off('.zf.drilldown').on('click.zf.drilldown', function (e) {
if (e.target === _this.$element[0] || $.contains(_this.$element[0], e.target)) {
return;
}
e.preventDefault();

@@ -181,3 +184,3 @@ _this._hideAll();

});
e.preventDefault();
return true;
}

@@ -192,11 +195,11 @@ },

});
e.preventDefault();
return true;
},
up: function () {
$prevElement.focus();
e.preventDefault();
return true;
},
down: function () {
$nextElement.focus();
e.preventDefault();
return true;
},

@@ -216,3 +219,2 @@ close: function () {

});
e.preventDefault();
} else if ($element.is(_this.$submenuAnchors)) {

@@ -223,6 +225,9 @@ _this._show($element.parent('li'));

});
}
return true;
},
handled: function (preventDefault) {
if (preventDefault) {
e.preventDefault();
}
},
handled: function () {
e.stopImmediatePropagation();

@@ -302,3 +307,6 @@ }

$elem.children('[data-submenu]').addClass('is-active');
/**
* Fires when the submenu has opened.
* @event Drilldown#open
*/
this.$element.trigger('open.zf.drilldown', [$elem]);

@@ -323,3 +331,3 @@ }

/**
* Fires when the submenu is has closed.
* Fires when the submenu has closed.
* @event Drilldown#hide

@@ -363,3 +371,6 @@ */

Foundation.Nest.Burn(this.$element, 'drilldown');
this.$element.unwrap().find('.js-drilldown-back, .is-submenu-parent-item').remove().end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu').end().find('[data-submenu]').removeAttr('aria-hidden tabindex role').off('.zf.drilldown').end().off('zf.drilldown');
this.$element.unwrap().find('.js-drilldown-back, .is-submenu-parent-item').remove().end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu').end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');
this.$submenuAnchors.each(function () {
$(this).off('.zf.drilldown');
});
this.$element.find('a').each(function () {

@@ -366,0 +377,0 @@ var $link = $(this);

@@ -88,3 +88,3 @@ 'use strict';

verticalPosition = verticalPosition ? verticalPosition[0] : '';
var horizontalPosition = /float-(.+)\s/.exec(this.$anchor[0].className);
var horizontalPosition = /float-(\S+)\s/.exec(this.$anchor[0].className);
horizontalPosition = horizontalPosition ? horizontalPosition[1] : '';

@@ -91,0 +91,0 @@ var position = horizontalPosition ? horizontalPosition + ' ' + verticalPosition : verticalPosition;

@@ -86,28 +86,31 @@ 'use strict';

if (this.options.clickOpen || hasTouch) {
this.$menuItems.on('click.zf.dropdownmenu touchstart.zf.dropdownmenu', function (e) {
var $elem = $(e.target).parentsUntil('ul', '.' + parClass),
hasSub = $elem.hasClass(parClass),
hasClicked = $elem.attr('data-is-click') === 'true',
$sub = $elem.children('.is-dropdown-submenu');
// used for onClick and in the keyboard handlers
var handleClickFn = function (e) {
var $elem = $(e.target).parentsUntil('ul', '.' + parClass),
hasSub = $elem.hasClass(parClass),
hasClicked = $elem.attr('data-is-click') === 'true',
$sub = $elem.children('.is-dropdown-submenu');
if (hasSub) {
if (hasClicked) {
if (!_this.options.closeOnClick || !_this.options.clickOpen && !hasTouch || _this.options.forceFollow && hasTouch) {
return;
} else {
e.stopImmediatePropagation();
e.preventDefault();
_this._hide($elem);
}
if (hasSub) {
if (hasClicked) {
if (!_this.options.closeOnClick || !_this.options.clickOpen && !hasTouch || _this.options.forceFollow && hasTouch) {
return;
} else {
e.stopImmediatePropagation();
e.preventDefault();
e.stopImmediatePropagation();
_this._show($elem.children('.is-dropdown-submenu'));
$elem.add($elem.parentsUntil(_this.$element, '.' + parClass)).attr('data-is-click', true);
_this._hide($elem);
}
} else {
return;
e.preventDefault();
e.stopImmediatePropagation();
_this._show($elem.children('.is-dropdown-submenu'));
$elem.add($elem.parentsUntil(_this.$element, '.' + parClass)).attr('data-is-click', true);
}
});
} else {
return;
}
};
if (this.options.clickOpen || hasTouch) {
this.$menuItems.on('click.zf.dropdownmenu touchstart.zf.dropdownmenu', handleClickFn);
}

@@ -117,3 +120,2 @@

this.$menuItems.on('mouseenter.zf.dropdownmenu', function (e) {
e.stopImmediatePropagation();
var $elem = $(this),

@@ -159,6 +161,10 @@ hasSub = $elem.hasClass(parClass);

var nextSibling = function () {
if (!$element.is(':last-child')) $nextElement.children('a:first').focus();
if (!$element.is(':last-child')) {
$nextElement.children('a:first').focus();
e.preventDefault();
}
},
prevSibling = function () {
$prevElement.children('a:first').focus();
e.preventDefault();
},

@@ -170,2 +176,3 @@ openSub = function () {

$element.find('li > a:first').focus();
e.preventDefault();
} else {

@@ -180,2 +187,3 @@ return;

_this._hide(close);
e.preventDefault();
//}

@@ -188,5 +196,5 @@ };

_this.$menuItems.find('a:first').focus(); // focus to first element
e.preventDefault();
},
handled: function () {
e.preventDefault();
e.stopImmediatePropagation();

@@ -197,3 +205,3 @@ }

if (isTab) {
if (_this.vertical) {
if (_this.$element.hasClass(_this.options.verticalClass)) {
// vertical menu

@@ -200,0 +208,0 @@ if (_this.options.alignment === 'left') {

@@ -52,2 +52,6 @@ 'use strict';

this.isOn = false;
this._bindHandler = {
onResizeMeBound: this._onResizeMe.bind(this),
onPostEqualizedBound: this._onPostEqualized.bind(this)
};

@@ -80,6 +84,33 @@ var imgs = this.$element.find('img');

this.isOn = false;
this.$element.off('.zf.equalizer resizeme.zf.trigger');
this.$element.off({
'.zf.equalizer': this._bindHandler.onPostEqualizedBound,
'resizeme.zf.trigger': this._bindHandler.onResizeMeBound
});
}
/**
* function to handle $elements resizeme.zf.trigger, with bound this on _bindHandler.onResizeMeBound
* @private
*/
}, {
key: '_onResizeMe',
value: function _onResizeMe(e) {
this._reflow();
}
/**
* function to handle $elements postequalized.zf.equalizer, with bound this on _bindHandler.onPostEqualizedBound
* @private
*/
}, {
key: '_onPostEqualized',
value: function _onPostEqualized(e) {
if (e.target !== this.$element[0]) {
this._reflow();
}
}
/**
* Initializes events for Equalizer.

@@ -95,9 +126,5 @@ * @private

if (this.hasNested) {
this.$element.on('postequalized.zf.equalizer', function (e) {
if (e.target !== _this.$element[0]) {
_this._reflow();
}
});
this.$element.on('postequalized.zf.equalizer', this._bindHandler.onPostEqualizedBound);
} else {
this.$element.on('resizeme.zf.trigger', this._reflow.bind(this));
this.$element.on('resizeme.zf.trigger', this._bindHandler.onResizeMeBound);
}

@@ -169,3 +196,3 @@ this.isOn = true;

value: function _isStacked() {
return this.$watched[0].offsetTop !== this.$watched[1].offsetTop;
return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;
}

@@ -172,0 +199,0 @@

@@ -79,6 +79,8 @@ 'use strict';

for (var i in this.rules) {
var rule = this.rules[i];
if (this.rules.hasOwnProperty(i)) {
var rule = this.rules[i];
if (window.matchMedia(rule.query).matches) {
match = rule;
if (window.matchMedia(rule.query).matches) {
match = rule;
}
}

@@ -102,4 +104,6 @@ }

for (var i in Foundation.MediaQuery.queries) {
var query = Foundation.MediaQuery.queries[i];
Interchange.SPECIAL_QUERIES[query.name] = query.value;
if (Foundation.MediaQuery.queries.hasOwnProperty(i)) {
var query = Foundation.MediaQuery.queries[i];
Interchange.SPECIAL_QUERIES[query.name] = query.value;
}
}

@@ -129,14 +133,16 @@ }

for (var i in rules) {
var rule = rules[i].slice(1, -1).split(', ');
var path = rule.slice(0, -1).join('');
var query = rule[rule.length - 1];
if (rules.hasOwnProperty(i)) {
var rule = rules[i].slice(1, -1).split(', ');
var path = rule.slice(0, -1).join('');
var query = rule[rule.length - 1];
if (Interchange.SPECIAL_QUERIES[query]) {
query = Interchange.SPECIAL_QUERIES[query];
if (Interchange.SPECIAL_QUERIES[query]) {
query = Interchange.SPECIAL_QUERIES[query];
}
rulesList.push({
path: path,
query: query
});
}
rulesList.push({
path: path,
query: query
});
}

@@ -143,0 +149,0 @@

@@ -164,3 +164,3 @@ 'use strict';

curVisible = this.points.filter(function (p, i) {
return isDown ? p <= winPos : p - _this.options.threshold <= winPos; //&& winPos >= _this.points[i -1] - _this.options.threshold;
return isDown ? p - _this.options.barOffset <= winPos : p - _this.options.barOffset - _this.options.threshold <= winPos;
});

@@ -167,0 +167,0 @@ curIdx = curVisible.length ? curVisible.length - 1 : 0;

@@ -32,2 +32,3 @@ 'use strict';

this.$lastTrigger = $();
this.$triggers = $();

@@ -55,3 +56,3 @@ this._init();

// Find triggers that affect this element and add aria-expanded to them
$(document).find('[data-open="' + id + '"], [data-close="' + id + '"], [data-toggle="' + id + '"]').attr('aria-expanded', 'false').attr('aria-controls', id);
this.$triggers = $(document).find('[data-open="' + id + '"], [data-close="' + id + '"], [data-toggle="' + id + '"]').attr('aria-expanded', 'false').attr('aria-controls', id);

@@ -206,2 +207,4 @@ // Add a close trigger over the body if necessary

});
this.$triggers.attr('aria-expanded', 'true');
this.$element.attr('aria-hidden', 'false').trigger('opened.zf.offcanvas');

@@ -214,3 +217,3 @@

if (trigger) {
this.$lastTrigger = trigger.attr('aria-expanded', 'true');
this.$lastTrigger = trigger;
}

@@ -312,3 +315,3 @@

this.$lastTrigger.attr('aria-expanded', 'false');
this.$triggers.attr('aria-expanded', 'false');
if (this.options.trapFocus) {

@@ -315,0 +318,0 @@ $('[data-off-canvas-content]').removeAttr('tabindex');

@@ -68,4 +68,6 @@ 'use strict';

$(window).on('changed.zf.mediaquery', this._update.bind(this));
this._updateMqHandler = this._update.bind(this);
$(window).on('changed.zf.mediaquery', this._updateMqHandler);
this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));

@@ -118,3 +120,8 @@ }

value: function destroy() {
//TODO this...
this.$element.off('.zf.responsiveToggle');
this.$toggler.off('.zf.responsiveToggle');
$(window).off('changed.zf.mediaquery', this._updateMqHandler);
Foundation.unregisterPlugin(this);
}

@@ -121,0 +128,0 @@ }]);

@@ -63,15 +63,8 @@ 'use strict';

this.$anchor = $('[data-open="' + this.id + '"]').length ? $('[data-open="' + this.id + '"]') : $('[data-toggle="' + this.id + '"]');
this.$anchor.attr({
'aria-controls': this.id,
'aria-haspopup': true,
'tabindex': 0
});
if (this.$anchor.length) {
var anchorId = this.$anchor[0].id || Foundation.GetYoDigits(6, 'reveal');
this.$anchor.attr({
'aria-controls': this.id,
'id': anchorId,
'aria-haspopup': true,
'tabindex': 0
});
this.$element.attr({ 'aria-labelledby': anchorId });
}
if (this.options.fullScreen || this.$element.hasClass('full')) {

@@ -112,3 +105,3 @@ this.options.fullScreen = true;

value: function _makeOverlay(id) {
var $overlay = $('<div></div>').addClass('reveal-overlay').attr({ 'tabindex': -1, 'aria-hidden': true }).appendTo('body');
var $overlay = $('<div></div>').addClass('reveal-overlay').appendTo('body');
return $overlay;

@@ -162,2 +155,4 @@ }

value: function _events() {
var _this2 = this;
var _this = this;

@@ -167,3 +162,8 @@

'open.zf.trigger': this.open.bind(this),
'close.zf.trigger': this.close.bind(this),
'close.zf.trigger': function (event, $element) {
if ($(event.target).parents('[data-closable]')[0] === $element) {
// only close reveal when it's explicitly called
return _this2.close.apply(_this2);
}
},
'toggle.zf.trigger': this.toggle.bind(this),

@@ -223,3 +223,3 @@ 'resizeme.zf.trigger': function () {

value: function open() {
var _this2 = this;
var _this3 = this;

@@ -250,2 +250,7 @@ if (this.options.deepLink) {

this.$overlay.css({ 'visibility': '' }).hide();
if (this.$element.hasClass('fast')) {
this.$overlay.addClass('fast');
} else if (this.$element.hasClass('slow')) {
this.$overlay.addClass('slow');
}
}

@@ -261,11 +266,25 @@

}
// Motion UI method of reveal
if (this.options.animationIn) {
if (this.options.overlay) {
Foundation.Motion.animateIn(this.$overlay, 'fade-in');
}
Foundation.Motion.animateIn(this.$element, this.options.animationIn, function () {
_this2.focusableElements = Foundation.Keyboard.findFocusable(_this2.$element);
});
var _this;
(function () {
var afterAnimationFocus = function () {
_this.$element.attr({
'aria-hidden': false,
'tabindex': -1
}).focus();
console.log('focus');
};
_this = _this3;
if (_this3.options.overlay) {
Foundation.Motion.animateIn(_this3.$overlay, 'fade-in');
}
Foundation.Motion.animateIn(_this3.$element, _this3.options.animationIn, function () {
_this3.focusableElements = Foundation.Keyboard.findFocusable(_this3.$element);
afterAnimationFocus();
});
})();
}

@@ -299,6 +318,6 @@ // jQuery method of reveal

$('body').addClass('is-reveal-open').attr('aria-hidden', this.options.overlay || this.options.fullScreen ? true : false);
$('body').addClass('is-reveal-open');
setTimeout(function () {
_this2._extraHandlers();
_this3._extraHandlers();
}, 0);

@@ -349,7 +368,7 @@ }

_this.focusableElements.eq(0).focus();
e.preventDefault();
return true;
}
if (_this.focusableElements.length === 0) {
// no focusable elements inside the modal at all, prevent tabbing in general
e.preventDefault();
return true;
}

@@ -361,7 +380,7 @@ },

_this.focusableElements.eq(-1).focus();
e.preventDefault();
return true;
}
if (_this.focusableElements.length === 0) {
// no focusable elements inside the modal at all, prevent tabbing in general
e.preventDefault();
return true;
}

@@ -385,2 +404,7 @@ },

}
},
handled: function (preventDefault) {
if (preventDefault) {
e.preventDefault();
}
}

@@ -444,7 +468,2 @@ });

$('body').attr({
'aria-hidden': false,
'tabindex': ''
});
_this.$element.attr('aria-hidden', true);

@@ -451,0 +470,0 @@

@@ -123,2 +123,6 @@ 'use strict';

value: function _setHandlePos($hndl, location, noInvert, cb) {
// don't move if the slider has been disabled since its initialization
if (this.$element.hasClass(this.options.disabledClass)) {
return;
}
//might need to alter that slightly for bars that will have odd number selections.

@@ -310,4 +314,7 @@ location = parseFloat(location); //on input change events, convert string to number...grumble.

barDim = this.$element[0].getBoundingClientRect()[param],
barOffset = this.$element.offset()[direction] - pageXY,
// touch events emulated by the touch util give position relative to screen, add window.scroll to event coordinates...
windowScroll = vertical ? $(window).scrollTop() : $(window).scrollLeft(),
barOffset = this.$element.offset()[direction] - (this.$element.offset()[direction] < pageXY ? pageXY : pageXY + windowScroll),
//if the cursor position is less than or greater than the elements bounding coordinates, set coordinates within those bounds

@@ -384,6 +391,2 @@ barXY = barOffset > 0 ? -halfOfHandle : barOffset - halfOfHandle < -barDim ? barDim : Math.abs(barOffset),

value: function _events($handle) {
if (this.options.disabled) {
return false;
}
var _this = this,

@@ -438,2 +441,6 @@ curHandle,

});
})
// prevent events triggered by touch
.on('selectstart.zf.slider touchmove.zf.slider', function (e) {
e.preventDefault();
});

@@ -440,0 +447,0 @@ }

@@ -82,25 +82,20 @@ 'use strict';

value: function _parsePoints() {
var top = this.options.topAnchor,
btm = this.options.btmAnchor,
var top = this.options.topAnchor == "" ? 1 : this.options.topAnchor,
btm = this.options.btmAnchor == "" ? document.documentElement.scrollHeight : this.options.btmAnchor,
pts = [top, btm],
breaks = {};
if (top && btm) {
for (var i = 0, len = pts.length; i < len && pts[i]; i++) {
var pt;
if (typeof pts[i] === 'number') {
pt = pts[i];
} else {
var place = pts[i].split(':'),
anchor = $('#' + place[0]);
for (var i = 0, len = pts.length; i < len && pts[i]; i++) {
var pt;
if (typeof pts[i] === 'number') {
pt = pts[i];
} else {
var place = pts[i].split(':'),
anchor = $('#' + place[0]);
pt = anchor.offset().top;
if (place[1] && place[1].toLowerCase() === 'bottom') {
pt += anchor[0].getBoundingClientRect().height;
}
pt = anchor.offset().top;
if (place[1] && place[1].toLowerCase() === 'bottom') {
pt += anchor[0].getBoundingClientRect().height;
}
breaks[i] = pt;
}
} else {
breaks = { 0: 1, 1: document.documentElement.scrollHeight };
breaks[i] = pt;
}

@@ -228,3 +223,4 @@

value: function _setSticky() {
var stickTo = this.options.stickTo,
var _this = this,
stickTo = this.options.stickTo,
mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom',

@@ -246,2 +242,5 @@ notStuckTo = stickTo === 'top' ? 'bottom' : 'top',

.trigger('sticky.zf.stuckto:' + stickTo);
this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function () {
_this._setSizes();
});
}

@@ -271,8 +270,7 @@

if (isTop && !stickToTop || stickToTop && !isTop) {
css[stickTo] = anchorPt;
css[notStuckTo] = 0;
css['bottom'] = 'auto';
if (isTop) {
css['top'] = 0;
} else {
css[stickTo] = 0;
css[notStuckTo] = anchorPt;
css['top'] = anchorPt;
}

@@ -321,2 +319,5 @@

var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight;
if (this.$element.css("display") == "none") {
newContainerHeight = 0;
}
this.containerHeight = newContainerHeight;

@@ -401,4 +402,5 @@ this.$container.css({

}).off('resizeme.zf.trigger');
this.$anchor.off('change.zf.sticky');
if (this.$anchor && this.$anchor.length) {
this.$anchor.off('change.zf.sticky');
}
$(window).off(this.scrollListener);

@@ -405,0 +407,0 @@

@@ -110,5 +110,8 @@ 'use strict';

this._addClickHandler();
this._setHeightMqHandler = null;
if (this.options.matchHeight) {
$(window).on('changed.zf.mediaquery', this._setHeight.bind(this));
this._setHeightMqHandler = this._setHeight.bind(this);
$(window).on('changed.zf.mediaquery', this._setHeightMqHandler);
}

@@ -151,4 +154,2 @@ }

if (e.which === 9) return;
e.stopPropagation();
e.preventDefault();

@@ -186,2 +187,6 @@ var $element = $(this),

_this._handleTabChange($nextElement);
},
handled: function () {
e.stopPropagation();
e.preventDefault();
}

@@ -291,3 +296,5 @@ });

if (this.options.matchHeight) {
$(window).off('changed.zf.mediaquery');
if (this._setHeightMqHandler != null) {
$(window).off('changed.zf.mediaquery', this._setHeightMqHandler);
}
}

@@ -294,0 +301,0 @@

@@ -49,3 +49,3 @@ 'use strict';

this.options.positionClass = this._getPositionClass(this.$element);
this.options.positionClass = this.options.positionClass || this._getPositionClass(this.$element);
this.options.tipText = this.options.tipText || this.$element.attr('title');

@@ -277,3 +277,3 @@ this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);

clearTimeout(_this.timeout);
if (!isFocus || !_this.isClick && _this.options.clickOpen) {
if (!isFocus || _this.isClick && !_this.options.clickOpen) {
_this.hide();

@@ -288,3 +288,3 @@ }

if (_this.isClick) {
_this.hide();
//_this.hide();
// _this.isClick = false;

@@ -298,2 +298,7 @@ } else {

});
} else {
this.$element.on('mousedown.zf.tooltip', function (e) {
e.stopImmediatePropagation();
_this.isClick = true;
});
}

@@ -315,7 +320,10 @@

isFocus = true;
// console.log(_this.isClick);
if (_this.isClick) {
// If we're not showing open on clicks, we need to pretend a click-launched focus isn't
// a real focus, otherwise on hover and come back we get bad behavior
if (!_this.options.clickOpen) {
isFocus = false;
}
return false;
} else {
// $(window)
_this.show();

@@ -322,0 +330,0 @@ }

@@ -34,3 +34,3 @@ 'use strict';

left = eleDims.offset.left >= parDims.offset.left;
right = eleDims.offset.left + eleDims.width <= parDims.width;
right = eleDims.offset.left + eleDims.width <= parDims.width + parDims.offset.left;
} else {

@@ -37,0 +37,0 @@ bottom = eleDims.offset.top + eleDims.height <= eleDims.windowDims.height + eleDims.windowDims.offset.top;

@@ -71,6 +71,6 @@ /*******************************************

// execute function if exists
fn.apply();
var returnValue = fn.apply();
if (functions.handled || typeof functions.handled === 'function') {
// execute function when event was handled
functions.handled.apply();
functions.handled(returnValue);
}

@@ -80,3 +80,3 @@ } else {

// execute function when event was not handled
functions.unhandled.apply();
functions.unhandled();
}

@@ -83,0 +83,0 @@ }

@@ -31,6 +31,8 @@ 'use strict';

for (var key in namedQueries) {
self.queries.push({
name: key,
value: 'only screen and (min-width: ' + namedQueries[key] + ')'
});
if (namedQueries.hasOwnProperty(key)) {
self.queries.push({
name: key,
value: 'only screen and (min-width: ' + namedQueries[key] + ')'
});
}
}

@@ -69,4 +71,6 @@

for (var i in this.queries) {
var query = this.queries[i];
if (size === query.name) return query.value;
if (this.queries.hasOwnProperty(i)) {
var query = this.queries[i];
if (size === query.name) return query.value;
}
}

@@ -112,10 +116,11 @@

$(window).on('resize.zf.mediaquery', function () {
var newSize = _this._getCurrentSize();
var newSize = _this._getCurrentSize(),
currentSize = _this.current;
if (newSize !== _this.current) {
// Broadcast the media query change on the window
$(window).trigger('changed.zf.mediaquery', [newSize, _this.current]);
if (newSize !== currentSize) {
// Change the current media query
_this.current = newSize;
// Broadcast the media query change on the window
$(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);
}

@@ -122,0 +127,0 @@ });

@@ -105,3 +105,3 @@ //**************************************************

if ('MouseEvent' in window && typeof window.MouseEvent === 'function') {
simulatedEvent = window.MouseEvent(type, {
simulatedEvent = new window.MouseEvent(type, {
'bubbles': true,

@@ -108,0 +108,0 @@ 'cancelable': true,

@@ -32,3 +32,3 @@ 'use strict';

_init() {
this.$inputs = this.$element.find('input, textarea, select').not('[data-abide-ignore]');
this.$inputs = this.$element.find('input, textarea, select');

@@ -87,2 +87,6 @@ this._events();

switch ($el[0].type) {
case 'checkbox':
isGood = $el[0].checked;
break;
case 'select':

@@ -243,2 +247,7 @@ case 'select-one':

// don't validate ignored inputs or hidden inputs
if ($el.is('[data-abide-ignore]') || $el.is('[type="hidden"]')) {
return true;
}
switch ($el[0].type) {

@@ -404,3 +413,5 @@ case 'radio':

$form.find('[data-abide-error]').css('display', 'none');
$(':input', $form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr('data-invalid');
$(':input', $form).not(':button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]').val('').removeAttr('data-invalid');
$(':input:radio', $form).not('[data-abide-ignore]').prop('checked',false).removeAttr('data-invalid');
$(':input:checkbox', $form).not('[data-abide-ignore]').prop('checked',false).removeAttr('data-invalid');
/**

@@ -407,0 +418,0 @@ * Fires when the form has been reset.

@@ -206,3 +206,3 @@ 'use strict';

destroy() {
this.$element.find('[data-tab-content]').slideUp(0).css('display', '');
this.$element.find('[data-tab-content]').stop(true).slideUp(0).css('display', '');
this.$element.find('a').off('.zf.accordion');

@@ -209,0 +209,0 @@

@@ -147,7 +147,7 @@ 'use strict';

$prevElement.attr('tabindex', -1).focus();
e.preventDefault();
return true;
},
down: function() {
$nextElement.attr('tabindex', -1).focus();
e.preventDefault();
return true;
},

@@ -162,3 +162,6 @@ toggle: function() {

},
handled: function() {
handled: function(preventDefault) {
if (preventDefault) {
e.preventDefault();
}
e.stopImmediatePropagation();

@@ -209,3 +212,3 @@ }

Foundation.Move(this.options.slideSpeed, $target, function() {
//Foundation.Move(this.options.slideSpeed, $target, function() {
$target.slideDown(_this.options.slideSpeed, function () {

@@ -218,3 +221,3 @@ /**

});
});
//});
}

@@ -229,3 +232,3 @@

var _this = this;
Foundation.Move(this.options.slideSpeed, $target, function(){
//Foundation.Move(this.options.slideSpeed, $target, function(){
$target.slideUp(_this.options.slideSpeed, function () {

@@ -238,3 +241,3 @@ /**

});
});
//});

@@ -241,0 +244,0 @@ var $menus = $target.find('[data-submenu]').slideUp(0).addBack().attr('aria-hidden', true);

@@ -5,3 +5,3 @@ !function($) {

var FOUNDATION_VERSION = '6.2.1';
var FOUNDATION_VERSION = '6.2.2-rc1';

@@ -48,3 +48,3 @@ // Global Foundation object

* Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls.
* Also fires the initialization event for each plugin, consolidating repeditive code.
* Also fires the initialization event for each plugin, consolidating repetitive code.
* @param {Object} plugin - an instance of a plugin, usually `this` in context.

@@ -74,3 +74,3 @@ * @param {String} name - the name of the plugin, passed as a camelCased string.

* Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.
* Also fires the destroyed event for the plugin, consolidating repeditive code.
* Also fires the destroyed event for the plugin, consolidating repetitive code.
* @param {Object} plugin - an instance of a plugin, usually `this` in context.

@@ -77,0 +77,0 @@ * @fires Plugin#destroyed

@@ -69,4 +69,4 @@ 'use strict';

this.$submenuAnchors.each(function(){
var $sub = $(this);
var $link = $sub.find('a:first');
var $link = $(this);
var $sub = $link.parent();
if(_this.options.parentLink){

@@ -76,3 +76,3 @@ $link.clone().prependTo($sub.children('[data-submenu]')).wrap('<li class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="menu-item"></li>');

$link.data('savedHref', $link.attr('href')).removeAttr('href');
$sub.children('[data-submenu]')
$link.children('[data-submenu]')
.attr({

@@ -83,3 +83,3 @@ 'aria-hidden': true,

});
_this._events($sub);
_this._events($link);
});

@@ -95,4 +95,4 @@ this.$submenus.each(function(){

if(!this.$element.parent().hasClass('is-drilldown')){
this.$wrapper = $(this.options.wrapper).addClass('is-drilldown').css(this._getMaxDims());
this.$element.wrap(this.$wrapper);
this.$wrapper = $(this.options.wrapper).addClass('is-drilldown');
this.$wrapper = this.$element.wrap(this.$wrapper).parent().css(this._getMaxDims());
}

@@ -123,4 +123,5 @@ }

if(_this.options.closeOnClick){
var $body = $('body').not(_this.$wrapper);
var $body = $('body');
$body.off('.zf.drilldown').on('click.zf.drilldown', function(e){
if (e.target === _this.$element[0] || $.contains(_this.$element[0], e.target)) { return; }
e.preventDefault();

@@ -140,5 +141,5 @@ _this._hideAll();

var _this = this;
this.$menuItems.add(this.$element.find('.js-drilldown-back > a')).on('keydown.zf.drilldown', function(e){
var $element = $(this),

@@ -164,3 +165,3 @@ $elements = $element.parent('li').parent('ul').children('li').children('a'),

});
e.preventDefault();
return true;
}

@@ -175,11 +176,11 @@ },

});
e.preventDefault();
return true;
},
up: function() {
$prevElement.focus();
e.preventDefault();
return true;
},
down: function() {
$nextElement.focus();
e.preventDefault();
return true;
},

@@ -197,4 +198,3 @@ close: function() {

}, 1);
});
e.preventDefault();
});
} else if ($element.is(_this.$submenuAnchors)) {

@@ -204,7 +204,10 @@ _this._show($element.parent('li'));

$element.parent('li').find('ul li a').filter(_this.$menuItems).first().focus();
});
});
}
return true;
},
handled: function(preventDefault) {
if (preventDefault) {
e.preventDefault();
}
},
handled: function() {
e.stopImmediatePropagation();

@@ -275,3 +278,6 @@ }

$elem.children('[data-submenu]').addClass('is-active');
/**
* Fires when the submenu has opened.
* @event Drilldown#open
*/
this.$element.trigger('open.zf.drilldown', [$elem]);

@@ -294,3 +300,3 @@ };

/**
* Fires when the submenu is has closed.
* Fires when the submenu has closed.
* @event Drilldown#hide

@@ -330,4 +336,6 @@ */

.end().find('.is-active, .is-closing, .is-drilldown-submenu').removeClass('is-active is-closing is-drilldown-submenu')
.end().find('[data-submenu]').removeAttr('aria-hidden tabindex role')
.off('.zf.drilldown').end().off('zf.drilldown');
.end().find('[data-submenu]').removeAttr('aria-hidden tabindex role');
this.$submenuAnchors.each(function() {
$(this).off('.zf.drilldown');
});
this.$element.find('a').each(function(){

@@ -374,2 +382,2 @@ var $link = $(this);

}(jQuery);
}(jQuery);

@@ -74,3 +74,3 @@ 'use strict';

verticalPosition = verticalPosition ? verticalPosition[0] : '';
var horizontalPosition = /float-(.+)\s/.exec(this.$anchor[0].className);
var horizontalPosition = /float-(\S+)\s/.exec(this.$anchor[0].className);
horizontalPosition = horizontalPosition ? horizontalPosition[1] : '';

@@ -77,0 +77,0 @@ var position = horizontalPosition ? horizontalPosition + ' ' + verticalPosition : verticalPosition;

@@ -72,25 +72,28 @@ 'use strict';

if (this.options.clickOpen || hasTouch) {
this.$menuItems.on('click.zf.dropdownmenu touchstart.zf.dropdownmenu', function(e) {
var $elem = $(e.target).parentsUntil('ul', `.${parClass}`),
hasSub = $elem.hasClass(parClass),
hasClicked = $elem.attr('data-is-click') === 'true',
$sub = $elem.children('.is-dropdown-submenu');
// used for onClick and in the keyboard handlers
var handleClickFn = function(e) {
var $elem = $(e.target).parentsUntil('ul', `.${parClass}`),
hasSub = $elem.hasClass(parClass),
hasClicked = $elem.attr('data-is-click') === 'true',
$sub = $elem.children('.is-dropdown-submenu');
if (hasSub) {
if (hasClicked) {
if (!_this.options.closeOnClick || (!_this.options.clickOpen && !hasTouch) || (_this.options.forceFollow && hasTouch)) { return; }
else {
e.stopImmediatePropagation();
e.preventDefault();
_this._hide($elem);
}
} else {
if (hasSub) {
if (hasClicked) {
if (!_this.options.closeOnClick || (!_this.options.clickOpen && !hasTouch) || (_this.options.forceFollow && hasTouch)) { return; }
else {
e.stopImmediatePropagation();
e.preventDefault();
e.stopImmediatePropagation();
_this._show($elem.children('.is-dropdown-submenu'));
$elem.add($elem.parentsUntil(_this.$element, `.${parClass}`)).attr('data-is-click', true);
_this._hide($elem);
}
} else { return; }
});
} else {
e.preventDefault();
e.stopImmediatePropagation();
_this._show($elem.children('.is-dropdown-submenu'));
$elem.add($elem.parentsUntil(_this.$element, `.${parClass}`)).attr('data-is-click', true);
}
} else { return; }
};
if (this.options.clickOpen || hasTouch) {
this.$menuItems.on('click.zf.dropdownmenu touchstart.zf.dropdownmenu', handleClickFn);
}

@@ -100,3 +103,2 @@

this.$menuItems.on('mouseenter.zf.dropdownmenu', function(e) {
e.stopImmediatePropagation();
var $elem = $(this),

@@ -140,5 +142,9 @@ hasSub = $elem.hasClass(parClass);

var nextSibling = function() {
if (!$element.is(':last-child')) $nextElement.children('a:first').focus();
if (!$element.is(':last-child')) {
$nextElement.children('a:first').focus();
e.preventDefault();
}
}, prevSibling = function() {
$prevElement.children('a:first').focus();
e.preventDefault();
}, openSub = function() {

@@ -149,2 +155,3 @@ var $sub = $element.children('ul.is-dropdown-submenu');

$element.find('li > a:first').focus();
e.preventDefault();
} else { return; }

@@ -154,4 +161,5 @@ }, closeSub = function() {

var close = $element.parent('ul').parent('li');
close.children('a:first').focus();
_this._hide(close);
close.children('a:first').focus();
_this._hide(close);
e.preventDefault();
//}

@@ -164,5 +172,5 @@ };

_this.$menuItems.find('a:first').focus(); // focus to first element
e.preventDefault();
},
handled: function() {
e.preventDefault();
e.stopImmediatePropagation();

@@ -173,3 +181,3 @@ }

if (isTab) {
if (_this.vertical) { // vertical menu
if (_this.$element.hasClass(_this.options.verticalClass)) { // vertical menu
if (_this.options.alignment === 'left') { // left aligned

@@ -176,0 +184,0 @@ $.extend(functions, {

@@ -41,2 +41,6 @@ 'use strict';

this.isOn = false;
this._bindHandler = {
onResizeMeBound: this._onResizeMe.bind(this),
onPostEqualizedBound: this._onPostEqualized.bind(this)
};

@@ -66,6 +70,25 @@ var imgs = this.$element.find('img');

this.isOn = false;
this.$element.off('.zf.equalizer resizeme.zf.trigger');
this.$element.off({
'.zf.equalizer': this._bindHandler.onPostEqualizedBound,
'resizeme.zf.trigger': this._bindHandler.onResizeMeBound
});
}
/**
* function to handle $elements resizeme.zf.trigger, with bound this on _bindHandler.onResizeMeBound
* @private
*/
_onResizeMe(e) {
this._reflow();
}
/**
* function to handle $elements postequalized.zf.equalizer, with bound this on _bindHandler.onPostEqualizedBound
* @private
*/
_onPostEqualized(e) {
if(e.target !== this.$element[0]){ this._reflow(); }
}
/**
* Initializes events for Equalizer.

@@ -78,7 +101,5 @@ * @private

if(this.hasNested){
this.$element.on('postequalized.zf.equalizer', function(e){
if(e.target !== _this.$element[0]){ _this._reflow(); }
});
this.$element.on('postequalized.zf.equalizer', this._bindHandler.onPostEqualizedBound);
}else{
this.$element.on('resizeme.zf.trigger', this._reflow.bind(this));
this.$element.on('resizeme.zf.trigger', this._bindHandler.onResizeMeBound);
}

@@ -138,3 +159,3 @@ this.isOn = true;

_isStacked() {
return this.$watched[0].offsetTop !== this.$watched[1].offsetTop;
return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;
}

@@ -141,0 +162,0 @@

@@ -62,6 +62,8 @@ 'use strict';

for (var i in this.rules) {
var rule = this.rules[i];
if(this.rules.hasOwnProperty(i)) {
var rule = this.rules[i];
if (window.matchMedia(rule.query).matches) {
match = rule;
if (window.matchMedia(rule.query).matches) {
match = rule;
}
}

@@ -82,4 +84,6 @@ }

for (var i in Foundation.MediaQuery.queries) {
var query = Foundation.MediaQuery.queries[i];
Interchange.SPECIAL_QUERIES[query.name] = query.value;
if (Foundation.MediaQuery.queries.hasOwnProperty(i)) {
var query = Foundation.MediaQuery.queries[i];
Interchange.SPECIAL_QUERIES[query.name] = query.value;
}
}

@@ -107,14 +111,16 @@ }

for (var i in rules) {
var rule = rules[i].slice(1, -1).split(', ');
var path = rule.slice(0, -1).join('');
var query = rule[rule.length - 1];
if(rules.hasOwnProperty(i)) {
var rule = rules[i].slice(1, -1).split(', ');
var path = rule.slice(0, -1).join('');
var query = rule[rule.length - 1];
if (Interchange.SPECIAL_QUERIES[query]) {
query = Interchange.SPECIAL_QUERIES[query];
if (Interchange.SPECIAL_QUERIES[query]) {
query = Interchange.SPECIAL_QUERIES[query];
}
rulesList.push({
path: path,
query: query
});
}
rulesList.push({
path: path,
query: query
});
}

@@ -121,0 +127,0 @@

@@ -136,3 +136,3 @@ 'use strict';

curVisible = this.points.filter(function(p, i){
return isDown ? p <= winPos : p - _this.options.threshold <= winPos;//&& winPos >= _this.points[i -1] - _this.options.threshold;
return isDown ? p - _this.options.barOffset <= winPos : p - _this.options.barOffset - _this.options.threshold <= winPos;
});

@@ -139,0 +139,0 @@ curIdx = curVisible.length ? curVisible.length - 1 : 0;

@@ -25,2 +25,3 @@ 'use strict';

this.$lastTrigger = $();
this.$triggers = $();

@@ -44,3 +45,3 @@ this._init();

// Find triggers that affect this element and add aria-expanded to them
$(document)
this.$triggers = $(document)
.find('[data-open="'+id+'"], [data-close="'+id+'"], [data-toggle="'+id+'"]')

@@ -183,2 +184,4 @@ .attr('aria-expanded', 'false')

});
this.$triggers.attr('aria-expanded', 'true');
this.$element.attr('aria-hidden', 'false')

@@ -192,3 +195,3 @@ .trigger('opened.zf.offcanvas');

if (trigger) {
this.$lastTrigger = trigger.attr('aria-expanded', 'true');
this.$lastTrigger = trigger;
}

@@ -282,3 +285,3 @@

this.$lastTrigger.attr('aria-expanded', 'false');
this.$triggers.attr('aria-expanded', 'false');
if (this.options.trapFocus) {

@@ -285,0 +288,0 @@ $('[data-off-canvas-content]').removeAttr('tabindex');

@@ -54,3 +54,5 @@ 'use strict';

$(window).on('changed.zf.mediaquery', this._update.bind(this));
this._updateMqHandler = this._update.bind(this);
$(window).on('changed.zf.mediaquery', this._updateMqHandler);

@@ -84,3 +86,3 @@ this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));

*/
toggleMenu() {
toggleMenu() {
if (!Foundation.MediaQuery.atLeast(this.options.hideFor)) {

@@ -98,3 +100,8 @@ this.$targetMenu.toggle(0);

destroy() {
//TODO this...
this.$element.off('.zf.responsiveToggle');
this.$toggler.off('.zf.responsiveToggle');
$(window).off('changed.zf.mediaquery', this._updateMqHandler);
Foundation.unregisterPlugin(this);
}

@@ -101,0 +108,0 @@ }

@@ -50,15 +50,8 @@ 'use strict';

this.$anchor = $(`[data-open="${this.id}"]`).length ? $(`[data-open="${this.id}"]`) : $(`[data-toggle="${this.id}"]`);
this.$anchor.attr({
'aria-controls': this.id,
'aria-haspopup': true,
'tabindex': 0
});
if (this.$anchor.length) {
var anchorId = this.$anchor[0].id || Foundation.GetYoDigits(6, 'reveal');
this.$anchor.attr({
'aria-controls': this.id,
'id': anchorId,
'aria-haspopup': true,
'tabindex': 0
});
this.$element.attr({'aria-labelledby': anchorId});
}
if (this.options.fullScreen || this.$element.hasClass('full')) {

@@ -98,3 +91,2 @@ this.options.fullScreen = true;

.addClass('reveal-overlay')
.attr({'tabindex': -1, 'aria-hidden': true})
.appendTo('body');

@@ -148,3 +140,7 @@ return $overlay;

'open.zf.trigger': this.open.bind(this),
'close.zf.trigger': this.close.bind(this),
'close.zf.trigger': (event, $element) => {
if ($(event.target).parents('[data-closable]')[0] === $element) { // only close reveal when it's explicitly called
return this.close.apply(this);
}
},
'toggle.zf.trigger': this.toggle.bind(this),

@@ -223,2 +219,7 @@ 'resizeme.zf.trigger': function() {

this.$overlay.css({'visibility': ''}).hide();
if(this.$element.hasClass('fast')) {
this.$overlay.addClass('fast');
} else if (this.$element.hasClass('slow')) {
this.$overlay.addClass('slow');
}
}

@@ -235,5 +236,14 @@

}
// Motion UI method of reveal
if (this.options.animationIn) {
var _this = this;
function afterAnimationFocus(){
_this.$element
.attr({
'aria-hidden': false,
'tabindex': -1
})
.focus();
console.log('focus');
}
if (this.options.overlay) {

@@ -244,2 +254,3 @@ Foundation.Motion.animateIn(this.$overlay, 'fade-in');

this.focusableElements = Foundation.Keyboard.findFocusable(this.$element);
afterAnimationFocus();
});

@@ -278,4 +289,3 @@ }

$('body')
.addClass('is-reveal-open')
.attr('aria-hidden', (this.options.overlay || this.options.fullScreen) ? true : false);
.addClass('is-reveal-open');

@@ -323,6 +333,6 @@ setTimeout(() => {

_this.focusableElements.eq(0).focus();
e.preventDefault();
return true;
}
if (_this.focusableElements.length === 0) { // no focusable elements inside the modal at all, prevent tabbing in general
e.preventDefault();
return true;
}

@@ -333,6 +343,6 @@ },

_this.focusableElements.eq(-1).focus();
e.preventDefault();
return true;
}
if (_this.focusableElements.length === 0) { // no focusable elements inside the modal at all, prevent tabbing in general
e.preventDefault();
return true;
}

@@ -354,2 +364,7 @@ },

}
},
handled: function(preventDefault) {
if (preventDefault) {
e.preventDefault();
}
}

@@ -413,7 +428,2 @@ });

$('body').attr({
'aria-hidden': false,
'tabindex': ''
});
_this.$element.attr('aria-hidden', true);

@@ -420,0 +430,0 @@

@@ -109,3 +109,7 @@ 'use strict';

_setHandlePos($hndl, location, noInvert, cb) {
//might need to alter that slightly for bars that will have odd number selections.
// don't move if the slider has been disabled since its initialization
if (this.$element.hasClass(this.options.disabledClass)) {
return;
}
//might need to alter that slightly for bars that will have odd number selections.
location = parseFloat(location);//on input change events, convert string to number...grumble.

@@ -275,3 +279,5 @@

barDim = this.$element[0].getBoundingClientRect()[param],
barOffset = (this.$element.offset()[direction] - pageXY),
// touch events emulated by the touch util give position relative to screen, add window.scroll to event coordinates...
windowScroll = vertical ? $(window).scrollTop() : $(window).scrollLeft(),
barOffset = this.$element.offset()[direction] - (this.$element.offset()[direction] < pageXY ? pageXY : (pageXY + windowScroll)),
//if the cursor position is less than or greater than the elements bounding coordinates, set coordinates within those bounds

@@ -338,4 +344,2 @@ barXY = barOffset > 0 ? -halfOfHandle : (barOffset - halfOfHandle) < -barDim ? barDim : Math.abs(barOffset),

_events($handle) {
if (this.options.disabled) { return false; }
var _this = this,

@@ -391,2 +395,6 @@ curHandle,

});
})
// prevent events triggered by touch
.on('selectstart.zf.slider touchmove.zf.slider', function(e) {
e.preventDefault();
});

@@ -393,0 +401,0 @@ }

@@ -69,27 +69,23 @@ 'use strict';

_parsePoints() {
var top = this.options.topAnchor,
btm = this.options.btmAnchor,
var top = this.options.topAnchor == "" ? 1 : this.options.topAnchor,
btm = this.options.btmAnchor== "" ? document.documentElement.scrollHeight : this.options.btmAnchor,
pts = [top, btm],
breaks = {};
if (top && btm) {
for (var i = 0, len = pts.length; i < len && pts[i]; i++) {
var pt;
if (typeof pts[i] === 'number') {
pt = pts[i];
} else {
var place = pts[i].split(':'),
anchor = $(`#${place[0]}`);
for (var i = 0, len = pts.length; i < len && pts[i]; i++) {
var pt;
if (typeof pts[i] === 'number') {
pt = pts[i];
} else {
var place = pts[i].split(':'),
anchor = $(`#${place[0]}`);
pt = anchor.offset().top;
if (place[1] && place[1].toLowerCase() === 'bottom') {
pt += anchor[0].getBoundingClientRect().height;
}
pt = anchor.offset().top;
if (place[1] && place[1].toLowerCase() === 'bottom') {
pt += anchor[0].getBoundingClientRect().height;
}
breaks[i] = pt;
}
} else {
breaks = {0: 1, 1: document.documentElement.scrollHeight};
breaks[i] = pt;
}
this.points = breaks;

@@ -199,3 +195,4 @@ return;

_setSticky() {
var stickTo = this.options.stickTo,
var _this = this,
stickTo = this.options.stickTo,
mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom',

@@ -219,2 +216,5 @@ notStuckTo = stickTo === 'top' ? 'bottom' : 'top',

.trigger(`sticky.zf.stuckto:${stickTo}`);
this.$element.on("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd", function() {
_this._setSizes();
});
}

@@ -241,8 +241,7 @@

if ((isTop && !stickToTop) || (stickToTop && !isTop)) {
css[stickTo] = anchorPt;
css[notStuckTo] = 0;
css['bottom'] = 'auto';
if(isTop) {
css['top'] = 0;
} else {
css[stickTo] = 0;
css[notStuckTo] = anchorPt;
css['top'] = anchorPt;
}

@@ -288,2 +287,5 @@

var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight;
if (this.$element.css("display") == "none") {
newContainerHeight = 0;
}
this.containerHeight = newContainerHeight;

@@ -356,4 +358,5 @@ this.$container.css({

.off('resizeme.zf.trigger');
this.$anchor.off('change.zf.sticky');
if (this.$anchor && this.$anchor.length) {
this.$anchor.off('change.zf.sticky');
}
$(window).off(this.scrollListener);

@@ -360,0 +363,0 @@

@@ -96,5 +96,8 @@ 'use strict';

this._addClickHandler();
this._setHeightMqHandler = null;
if (this.options.matchHeight) {
$(window).on('changed.zf.mediaquery', this._setHeight.bind(this));
this._setHeightMqHandler = this._setHeight.bind(this);
$(window).on('changed.zf.mediaquery', this._setHeightMqHandler);
}

@@ -133,4 +136,3 @@ }

if (e.which === 9) return;
e.stopPropagation();
e.preventDefault();

@@ -168,2 +170,6 @@ var $element = $(this),

_this._handleTabChange($nextElement);
},
handled: function() {
e.stopPropagation();
e.preventDefault();
}

@@ -277,3 +283,5 @@ });

if (this.options.matchHeight) {
$(window).off('changed.zf.mediaquery');
if (this._setHeightMqHandler != null) {
$(window).off('changed.zf.mediaquery', this._setHeightMqHandler);
}
}

@@ -280,0 +288,0 @@

@@ -38,3 +38,3 @@ 'use strict';

this.options.positionClass = this._getPositionClass(this.$element);
this.options.positionClass = this.options.positionClass || this._getPositionClass(this.$element);
this.options.tipText = this.options.tipText || this.$element.attr('title');

@@ -253,3 +253,3 @@ this.template = this.options.template ? $(this.options.template) : this._buildTemplate(elemId);

clearTimeout(_this.timeout);
if (!isFocus || (!_this.isClick && _this.options.clickOpen)) {
if (!isFocus || (_this.isClick && !_this.options.clickOpen)) {
_this.hide();

@@ -264,3 +264,3 @@ }

if (_this.isClick) {
_this.hide();
//_this.hide();
// _this.isClick = false;

@@ -274,2 +274,7 @@ } else {

});
} else {
this.$element.on('mousedown.zf.tooltip', function(e) {
e.stopImmediatePropagation();
_this.isClick = true;
});
}

@@ -293,7 +298,8 @@

isFocus = true;
// console.log(_this.isClick);
if (_this.isClick) {
// If we're not showing open on clicks, we need to pretend a click-launched focus isn't
// a real focus, otherwise on hover and come back we get bad behavior
if(!_this.options.clickOpen) { isFocus = false; }
return false;
} else {
// $(window)
_this.show();

@@ -443,2 +449,2 @@ }

}(jQuery);
}(jQuery);

@@ -31,3 +31,3 @@ 'use strict';

left = (eleDims.offset.left >= parDims.offset.left);
right = (eleDims.offset.left + eleDims.width <= parDims.width);
right = (eleDims.offset.left + eleDims.width <= parDims.width + parDims.offset.left);
}

@@ -34,0 +34,0 @@ else {

@@ -69,9 +69,9 @@ /*******************************************

if (fn && typeof fn === 'function') { // execute function if exists
fn.apply();
var returnValue = fn.apply();
if (functions.handled || typeof functions.handled === 'function') { // execute function when event was handled
functions.handled.apply();
functions.handled(returnValue);
}
} else {
if (functions.unhandled || typeof functions.unhandled === 'function') { // execute function when event was not handled
functions.unhandled.apply();
functions.unhandled();
}

@@ -78,0 +78,0 @@ }

@@ -36,6 +36,8 @@ 'use strict';

for (var key in namedQueries) {
self.queries.push({
name: key,
value: `only screen and (min-width: ${namedQueries[key]})`
});
if(namedQueries.hasOwnProperty(key)) {
self.queries.push({
name: key,
value: `only screen and (min-width: ${namedQueries[key]})`
});
}
}

@@ -72,4 +74,6 @@

for (var i in this.queries) {
var query = this.queries[i];
if (size === query.name) return query.value;
if(this.queries.hasOwnProperty(i)) {
var query = this.queries[i];
if (size === query.name) return query.value;
}
}

@@ -111,10 +115,10 @@

$(window).on('resize.zf.mediaquery', () => {
var newSize = this._getCurrentSize();
var newSize = this._getCurrentSize(), currentSize = this.current;
if (newSize !== this.current) {
// Broadcast the media query change on the window
$(window).trigger('changed.zf.mediaquery', [newSize, this.current]);
if (newSize !== currentSize) {
// Change the current media query
this.current = newSize;
// Broadcast the media query change on the window
$(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);
}

@@ -121,0 +125,0 @@ });

@@ -104,3 +104,3 @@ //**************************************************

if('MouseEvent' in window && typeof window.MouseEvent === 'function') {
simulatedEvent = window.MouseEvent(type, {
simulatedEvent = new window.MouseEvent(type, {
'bubbles': true,

@@ -107,0 +107,0 @@ 'cancelable': true,

{
"name": "foundation-sites",
"version": "6.2.1",
"version": "6.2.2-rc1",
"main": "dist/foundation.js",

@@ -15,2 +15,3 @@ "description": "The most advanced responsive front-end framework in the world.",

"deploy": "gulp deploy",
"deploy:prep": "gulp deploy:prep",
"deploy:docs": "gulp deploy:docs"

@@ -17,0 +18,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc