Socket
Socket
Sign inDemoInstall

foundation-sites

Package Overview
Dependencies
3
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.1.1 to 6.1.2

.travis.yml

4

js/foundation.abide.js

@@ -193,3 +193,3 @@ !function(Foundation, $) {

Abide.prototype.findFormError = function($el){
var $error = $el.siblings(this.options.formErrorSelector)
var $error = $el.siblings(this.options.formErrorSelector);
if(!$error.length){

@@ -295,3 +295,3 @@ $error = $el.parent().find(this.options.formErrorSelector);

*/
$el.trigger(message, $el[0]);
$el.trigger(message, [$el]);

@@ -298,0 +298,0 @@ return goodToGo;

@@ -15,2 +15,3 @@ /**

* @param {jQuery} element - jQuery object to make into an accordion.
* @param {Object} options - a plain object with settings to override the default options.
*/

@@ -60,3 +61,3 @@ function Accordion(element, options){

this.$tabs = this.$element.children('li');
if (this.$tabs.length == 0) {
if (this.$tabs.length === 0) {
this.$tabs = this.$element.children('[data-accordion-item]');

@@ -167,3 +168,9 @@ }

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

@@ -178,7 +185,2 @@

});
/**
* Fires when the tab is done opening.
* @event Accordion#down
*/
this.$element.trigger('down.zf.accordion', [$target]);
};

@@ -202,3 +204,9 @@

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

@@ -213,8 +221,2 @@

});
/**
* Fires when the tab is done collapsing up.
* @event Accordion#up
*/
this.$element.trigger('up.zf.accordion', [$target]);
};

@@ -221,0 +223,0 @@

@@ -66,3 +66,3 @@ /**

this.$menuLinks = this.$element.find('.has-submenu');
this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');
this.$menuLinks.each(function(){

@@ -77,3 +77,2 @@ var linkId = this.id || Foundation.GetYoDigits(6, 'acc-menu-link'),

'aria-expanded': isActive,
'aria-selected': false,
'role': 'tab',

@@ -110,3 +109,3 @@ 'id': linkId

if ($submenu.length) {
$(this).children('a').off('click.zf.accordionmenu').on('click.zf.accordionmenu', function(e) {
$(this).children('a').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function(e) {
e.preventDefault();

@@ -215,12 +214,13 @@

$target.addClass('is-active').attr({'aria-hidden': false})
.parent('.has-submenu').attr({'aria-expanded': true, 'aria-selected': true});
.parent('.is-accordion-submenu-parent').attr({'aria-expanded': true});
Foundation.Move(this.options.slideSpeed, $target, function(){
$target.slideDown(_this.options.slideSpeed);
$target.slideDown(_this.options.slideSpeed, function () {
/**
* Fires when the menu is done opening.
* @event AccordionMenu#down
*/
_this.$element.trigger('down.zf.accordionMenu', [$target]);
});
});
/**
* Fires when the menu is done collapsing up.
* @event AccordionMenu#down
*/
this.$element.trigger('down.zf.accordionMenu', [$target]);
};

@@ -236,17 +236,14 @@

Foundation.Move(this.options.slideSpeed, $target, function(){
$target.slideUp(_this.options.slideSpeed);
$target.slideUp(_this.options.slideSpeed, function () {
/**
* Fires when the menu is done collapsing up.
* @event AccordionMenu#up
*/
_this.$element.trigger('up.zf.accordionMenu', [$target]);
});
});
$target.attr('aria-hidden', true)
.find('[data-submenu]').slideUp(0).attr('aria-hidden', true).end()
.parent('.has-submenu')
.attr({'aria-expanded': false, 'aria-selected': false});
// $target.slideUp(this.options.slideSpeed, function() {
// $target.find('[data-submenu]').slideUp(0).attr('aria-hidden', true);
// }).attr('aria-hidden', true).parent('.has-submenu').attr({'aria-expanded': false, 'aria-selected': false});
/**
* Fires when the menu is done collapsing up.
* @event AccordionMenu#up
*/
this.$element.trigger('up.zf.accordionMenu', [$target]);
var $menus = $target.find('[data-submenu]').slideUp(0).addBack().attr('aria-hidden', true);
$menus.parent('.is-accordion-submenu-parent').attr('aria-expanded', false);
};

@@ -253,0 +250,0 @@

!function($) {
"use strict";
var FOUNDATION_VERSION = '6.1.1';
var FOUNDATION_VERSION = '6.1.2';

@@ -20,6 +20,2 @@ // Global Foundation object

_uuids: [],
/**
* Stores currently active plugins.
*/
_activePlugins: {},

@@ -49,6 +45,7 @@ /**

* @function
* Creates a pointer to an instance of a Plugin within the Foundation._activePlugins object.
* Sets the `[data-pluginName="uniqueIdHere"]`, allowing easy access to any plugin's internal methods.
* Populates the _uuids array with pointers to each individual plugin instance.
* 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.
* @param {Object} plugin - an instance of a plugin, usually `this` in context.
* @param {String} name - the name of the plugin, passed as a camelCased string.
* @fires Plugin#init

@@ -74,3 +71,4 @@ */

* @function
* Removes the pointer for an instance of a Plugin from the Foundation._activePlugins obj.
* Removes the plugins uuid from the _uuids array.
* Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.
* Also fires the destroyed event for the plugin, consolidating repeditive code.

@@ -77,0 +75,0 @@ * @param {Object} plugin - an instance of a plugin, usually `this` in context.

@@ -64,3 +64,3 @@ /**

Drilldown.prototype._init = function(){
this.$submenuAnchors = this.$element.find('li.has-submenu');
this.$submenuAnchors = this.$element.find('li.is-drilldown-submenu-parent');
this.$submenus = this.$submenuAnchors.children('[data-submenu]');

@@ -211,3 +211,3 @@ this.$menuItems = this.$element.find('li').not('.js-drilldown-back').attr('role', 'menuitem');

Drilldown.prototype._hideAll = function(){
var $elem = this.$element.find('.is-drilldown-sub.is-active').addClass('is-closing');
var $elem = this.$element.find('.is-drilldown-submenu.is-active').addClass('is-closing');
$elem.one(Foundation.transitionend($elem), function(e){

@@ -245,3 +245,3 @@ $elem.removeClass('is-active is-closing');

var _this = this;
this.$menuItems.not('.has-submenu')
this.$menuItems.not('.is-drilldown-submenu-parent')
.off('click.zf.drilldown')

@@ -312,3 +312,3 @@ .on('click.zf.drilldown', function(e){

.find('.js-drilldown-back').remove()
.end().find('.is-active, .is-closing, .is-drilldown-sub').removeClass('is-active is-closing is-drilldown-sub')
.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')

@@ -315,0 +315,0 @@ .off('.zf.drilldown').end().off('zf.drilldown');

@@ -6,2 +6,3 @@ /**

* @requires foundation.util.box
* @requires foundation.util.triggers
*/

@@ -13,3 +14,4 @@ !function($, Foundation){

* @class
* @param {jQuery} element - jQuery object to make into an accordion menu.
* @param {jQuery} element - jQuery object to make into a dropdown.
* Object should be of the dropdown panel, rather than its anchor.
* @param {Object} options - Overrides to the default plugin settings.

@@ -84,3 +86,3 @@ */

* @option
* @example true
* @example false
*/

@@ -124,3 +126,3 @@ closeOnClick: false

Dropdown.prototype.getPositionClass = function(){
var position = this.$element[0].className.match(/(top|left|right)/g);
var position = this.$element[0].className.match(/\b(top|left|right)\b/g);
position = position ? position[0] : '';

@@ -127,0 +129,0 @@ return position;

@@ -117,3 +117,3 @@ /**

if(this.$element.hasClass(this.options.rightClass) || this.options.alignment === 'right'){
if(this.$element.hasClass(this.options.rightClass) || this.options.alignment === 'right' || Foundation.rtl()){
this.options.alignment = 'right';

@@ -139,4 +139,3 @@ subs.addClass('is-left-arrow opens-left');

hasTouch = 'ontouchstart' in window || (typeof window.ontouchstart !== 'undefined'),
parClass = 'is-dropdown-submenu-parent',
delay;
parClass = 'is-dropdown-submenu-parent';

@@ -175,4 +174,4 @@ if(this.options.clickOpen || hasTouch){

if(hasSub){
clearTimeout(delay);
delay = setTimeout(function(){
clearTimeout(_this.delay);
_this.delay = setTimeout(function(){
_this._show($elem.children('.is-dropdown-submenu'));

@@ -187,4 +186,4 @@ }, _this.options.hoverDelay);

// clearTimeout(delay);
delay = setTimeout(function(){
clearTimeout(_this.delay);
_this.delay = setTimeout(function(){
_this._hide($elem);

@@ -317,3 +316,3 @@ }, _this.options.closingTime);

.parent('li.is-dropdown-submenu-parent').addClass('is-active')
.attr({'aria-selected': true, 'aria-expanded': true});
.attr({'aria-expanded': true});
var clear = Foundation.Box.ImNotTouchingYou($sub, null, true);

@@ -361,3 +360,2 @@ if(!clear){

$toClose.find('li.is-active').add($toClose).attr({
'aria-selected': false,
'aria-expanded': false,

@@ -392,2 +390,3 @@ 'data-is-click': false

.removeClass('is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner');
$(document.body).off('.zf.dropdownmenu');
Foundation.Nest.Burn(this.$element, 'dropdown');

@@ -394,0 +393,0 @@ Foundation.unregisterPlugin(this);

@@ -117,3 +117,3 @@ !function(Foundation, $) {

return tooSmall;
}
};
/**

@@ -182,10 +182,10 @@ * A noop version for the plugin

lastElTopOffset=elOffsetTop;
};
}
groups[group].push([this.$watched[i],this.$watched[i].offsetHeight]);
}
for (var i = 0, len = groups.length; i < len; i++) {
var heights = $(groups[i]).map(function () { return this[1]}).get();
for (var j = 0, ln = groups.length; j < ln; j++) {
var heights = $(groups[j]).map(function(){ return this[1]; }).get();
var max = Math.max.apply(null, heights);
groups[i].push(max);
groups[j].push(max);
}

@@ -235,3 +235,3 @@ cb(groups);

continue;
};
}
/**

@@ -238,0 +238,0 @@ * Fires before the heights per row are applied

@@ -145,3 +145,4 @@ /**

var _this = this;
var _this = this,
trigger = 'replaced.zf.interchange';

@@ -152,7 +153,9 @@ // Replacing images

_this.currentPath = path;
});
})
.trigger(trigger);
}
// Replacing background images
else if (path.match(/\.(gif|jpg|jpeg|tiff|png)([?#].*)?/i)) {
this.$element.css({ 'background-image': 'url('+path+')' });
this.$element.css({ 'background-image': 'url('+path+')' })
.trigger(trigger);
}

@@ -162,3 +165,4 @@ // Replacing HTML

$.get(path, function(response) {
_this.$element.html(response);
_this.$element.html(response)
.trigger(trigger);
$(response).foundation();

@@ -168,3 +172,8 @@ _this.currentPath = path;

}
this.$element.trigger('replaced.zf.interchange');
/**
* Fires when content in an Interchange element is done being loaded.
* @event Interchange#replaced
*/
// this.$element.trigger('replaced.zf.interchange');
};

@@ -171,0 +180,0 @@ /**

@@ -117,4 +117,8 @@ /**

};
$(window).one('load', function(){
if(_this.options.deepLinking){
if(location.hash){
_this.scrollToLoc(location.hash);
}
}
_this.calcPoints();

@@ -129,12 +133,22 @@ _this._updateActive();

e.preventDefault();
var arrival = this.getAttribute('href'),
scrollPos = $(arrival).offset().top - _this.options.threshold / 2 - _this.options.barOffset;
var arrival = this.getAttribute('href');
_this.scrollToLoc(arrival);
});
};
/**
* Function to scroll to a given location on the page.
* @param {String} loc - a properly formatted jQuery id selector.
* @example '#foo'
* @function
*/
Magellan.prototype.scrollToLoc = function(loc){
var scrollPos = $(loc).offset().top - this.options.threshold / 2 - this.options.barOffset;
// requestAnimationFrame is disabled for this plugin currently
// Foundation.Move(_this.options.animationDuration, $body, function(){
$body.stop(true).animate({
scrollTop: scrollPos
}, opts);
});
// });
$(document.body).stop(true).animate({
scrollTop: scrollPos
},
{
duration: this.options.animationDuration,
easiing: this.options.animationEasing
});
};

@@ -141,0 +155,0 @@ /**

/**
* OffCanvas module.
* @module foundation.offcanvas
* @requires foundation.util.mediaQuery
* @requires foundation.util.triggers

@@ -58,3 +59,3 @@ * @requires foundation.util.motion

/**
* Allow the offcanvas to remain open for certain breakpoints. Can be used with `isSticky`.
* Allow the offcanvas to remain open for certain breakpoints.
* @option

@@ -144,4 +145,3 @@ * @example false

if (this.$exiter.length) {
var _this = this;
if (this.options.closeOnClick && this.$exiter.length) {
this.$exiter.on({'click.zf.offcanvas': this.close.bind(this)});

@@ -240,3 +240,5 @@ }

if(this.options.closeOnClick){
this.$exiter.addClass('is-visible');
}
if(trigger){

@@ -324,2 +326,5 @@ this.$lastTrigger = trigger.attr('aria-expanded', 'true');

// }
if(this.options.closeOnClick){
this.$exiter.removeClass('is-visible');
}

@@ -326,0 +331,0 @@ this.$lastTrigger.attr('aria-expanded', 'false');

/**
* Orbit module.
* @module foundation.orbit
* @requires foundation.util.keyboard
* @requires foundation.util.motion
* @requires foundation.util.timerAndImageLoader
* @requires foundation.util.touch
*/
* Orbit module.
* @module foundation.orbit
* @requires foundation.util.keyboard
* @requires foundation.util.motion
* @requires foundation.util.timerAndImageLoader
* @requires foundation.util.touch
*/
!function($, Foundation){
'use strict';
/**
* Creates a new instance of an orbit carousel.
* @class
* @param {jQuery} element - jQuery object to make into an Orbit Carousel.
* @param {Object} options - Overrides to the default plugin settings.
*/
* Creates a new instance of an orbit carousel.
* @class
* @param {jQuery} element - jQuery object to make into an Orbit Carousel.
* @param {Object} options - Overrides to the default plugin settings.
*/
function Orbit(element, options){

@@ -25,10 +25,10 @@ this.$element = element;

Foundation.Keyboard.register('Orbit', {
'ltr': {
'ARROW_RIGHT': 'next',
'ARROW_LEFT': 'previous'
},
'rtl': {
'ARROW_LEFT': 'next',
'ARROW_RIGHT': 'previous'
}
'ltr': {
'ARROW_RIGHT': 'next',
'ARROW_LEFT': 'previous'
},
'rtl': {
'ARROW_LEFT': 'next',
'ARROW_RIGHT': 'previous'
}
});

@@ -38,116 +38,116 @@ }

/**
* Tells the JS to loadBullets.
* @option
* @example true
*/
* Tells the JS to loadBullets.
* @option
* @example true
*/
bullets: true,
/**
* Tells the JS to apply event listeners to nav buttons
* @option
* @example true
*/
* Tells the JS to apply event listeners to nav buttons
* @option
* @example true
*/
navButtons: true,
/**
* motion-ui animation class to apply
* @option
* @example 'slide-in-right'
*/
* motion-ui animation class to apply
* @option
* @example 'slide-in-right'
*/
animInFromRight: 'slide-in-right',
/**
* motion-ui animation class to apply
* @option
* @example 'slide-out-right'
*/
* motion-ui animation class to apply
* @option
* @example 'slide-out-right'
*/
animOutToRight: 'slide-out-right',
/**
* motion-ui animation class to apply
* @option
* @example 'slide-in-left'
*
*/
* motion-ui animation class to apply
* @option
* @example 'slide-in-left'
*
*/
animInFromLeft: 'slide-in-left',
/**
* motion-ui animation class to apply
* @option
* @example 'slide-out-left'
*/
* motion-ui animation class to apply
* @option
* @example 'slide-out-left'
*/
animOutToLeft: 'slide-out-left',
/**
* Allows Orbit to automatically animate on page load.
* @option
* @example true
*/
* Allows Orbit to automatically animate on page load.
* @option
* @example true
*/
autoPlay: true,
/**
* Amount of time, in ms, between slide transitions
* @option
* @example 5000
*/
* Amount of time, in ms, between slide transitions
* @option
* @example 5000
*/
timerDelay: 5000,
/**
* Allows Orbit to infinitely loop through the slides
* @option
* @example true
*/
* Allows Orbit to infinitely loop through the slides
* @option
* @example true
*/
infiniteWrap: true,
/**
* Allows the Orbit slides to bind to swipe events for mobile, requires an additional util library
* @option
* @example true
*/
* Allows the Orbit slides to bind to swipe events for mobile, requires an additional util library
* @option
* @example true
*/
swipe: true,
/**
* Allows the timing function to pause animation on hover.
* @option
* @example true
*/
* Allows the timing function to pause animation on hover.
* @option
* @example true
*/
pauseOnHover: true,
/**
* Allows Orbit to bind keyboard events to the slider, to animate frames with arrow keys
* @option
* @example true
*/
* Allows Orbit to bind keyboard events to the slider, to animate frames with arrow keys
* @option
* @example true
*/
accessible: true,
/**
* Class applied to the container of Orbit
* @option
* @example 'orbit-container'
*/
* Class applied to the container of Orbit
* @option
* @example 'orbit-container'
*/
containerClass: 'orbit-container',
/**
* Class applied to individual slides.
* @option
* @example 'orbit-slide'
*/
* Class applied to individual slides.
* @option
* @example 'orbit-slide'
*/
slideClass: 'orbit-slide',
/**
* Class applied to the bullet container. You're welcome.
* @option
* @example 'orbit-bullets'
*/
* Class applied to the bullet container. You're welcome.
* @option
* @example 'orbit-bullets'
*/
boxOfBullets: 'orbit-bullets',
/**
* Class applied to the `next` navigation button.
* @option
* @example 'orbit-next'
*/
* Class applied to the `next` navigation button.
* @option
* @example 'orbit-next'
*/
nextClass: 'orbit-next',
/**
* Class applied to the `previous` navigation button.
* @option
* @example 'orbit-previous'
*/
* Class applied to the `previous` navigation button.
* @option
* @example 'orbit-previous'
*/
prevClass: 'orbit-previous',
/**
* Boolean to flag the js to use motion ui classes or not. Default to true for backwards compatability.
* @option
* @example true
*/
* Boolean to flag the js to use motion ui classes or not. Default to true for backwards compatability.
* @option
* @example true
*/
useMUI: true
};
/**
* Initializes the plugin by creating jQuery collections, setting attributes, and starting the animation.
* @function
* @private
*/
* Initializes the plugin by creating jQuery collections, setting attributes, and starting the animation.
* @function
* @private
*/
Orbit.prototype._init = function(){

@@ -157,3 +157,3 @@ this.$wrapper = this.$element.find('.' + this.options.containerClass);

var $images = this.$element.find('img'),
initActive = this.$slides.filter('.is-active');
initActive = this.$slides.filter('.is-active');

@@ -178,3 +178,3 @@ if(!initActive.length){

if(this.options.autoPlay){
if(this.options.autoPlay && this.$slides.length > 1){
this.geoSync();

@@ -187,6 +187,6 @@ }

/**
* Creates a jQuery collection of bullets, if they are being used.
* @function
* @private
*/
* Creates a jQuery collection of bullets, if they are being used.
* @function
* @private
*/
Orbit.prototype._loadBullets = function(){

@@ -196,153 +196,156 @@ this.$bullets = this.$element.find('.' + this.options.boxOfBullets).find('button');

/**
* Sets a `timer` object on the orbit, and starts the counter for the next slide.
* @function
*/
* Sets a `timer` object on the orbit, and starts the counter for the next slide.
* @function
*/
Orbit.prototype.geoSync = function(){
var _this = this;
this.timer = new Foundation.Timer(
this.$element,
{duration: this.options.timerDelay,
infinite: false},
function(){
_this.changeSlide(true);
});
this.timer.start();
};
/**
* Sets wrapper and slide heights for the orbit.
* @function
* @private
*/
Orbit.prototype._prepareForOrbit = function(){
var _this = this;
this._setWrapperHeight(function(max){
_this._setSlideHeight(max);
});
};
/**
* Calulates the height of each slide in the collection, and uses the tallest one for the wrapper height.
* @function
* @private
* @param {Function} cb - a callback function to fire when complete.
*/
Orbit.prototype._setWrapperHeight = function(cb){//rewrite this to `for` loop
var max = 0, temp, counter = 0;
this.$element,
{duration: this.options.timerDelay,
infinite: false},
function(){
_this.changeSlide(true);
});
this.timer.start();
};
/**
* Sets wrapper and slide heights for the orbit.
* @function
* @private
*/
Orbit.prototype._prepareForOrbit = function(){
var _this = this;
this._setWrapperHeight(function(max){
_this._setSlideHeight(max);
});
};
/**
* Calulates the height of each slide in the collection, and uses the tallest one for the wrapper height.
* @function
* @private
* @param {Function} cb - a callback function to fire when complete.
*/
Orbit.prototype._setWrapperHeight = function(cb){//rewrite this to `for` loop
var max = 0, temp, counter = 0;
this.$slides.each(function(){
temp = this.getBoundingClientRect().height;
$(this).attr('data-slide', counter);
this.$slides.each(function(){
temp = this.getBoundingClientRect().height;
$(this).attr('data-slide', counter);
if(counter){//if not the first slide, set css position and display property
$(this).css({'position': 'relative', 'display': 'none'});
}
max = temp > max ? temp : max;
counter++;
});
if(counter){//if not the first slide, set css position and display property
$(this).css({'position': 'relative', 'display': 'none'});
}
max = temp > max ? temp : max;
counter++;
});
if(counter === this.$slides.length){
this.$wrapper.css({'height': max});//only change the wrapper height property once.
cb(max);//fire callback with max height dimension.
}
};
/**
* Sets the max-height of each slide.
* @function
* @private
*/
Orbit.prototype._setSlideHeight = function(height){
this.$slides.each(function(){
$(this).css('max-height', height);
});
};
/**
* Adds event listeners to basically everything within the element.
* @function
* @private
*/
Orbit.prototype._events = function(){
var _this = this;
if(counter === this.$slides.length){
this.$wrapper.css({'height': max});//only change the wrapper height property once.
cb(max);//fire callback with max height dimension.
}
};
/**
* Sets the max-height of each slide.
* @function
* @private
*/
Orbit.prototype._setSlideHeight = function(height){
this.$slides.each(function(){
$(this).css('max-height', height);
});
};
/**
* Adds event listeners to basically everything within the element.
* @function
* @private
*/
Orbit.prototype._events = function(){
var _this = this;
//***************************************
//**Now using custom event - thanks to:**
//** Yohai Ararat of Toronto **
//***************************************
if(this.options.swipe){
this.$slides.off('swipeleft.zf.orbit swiperight.zf.orbit')
.on('swipeleft.zf.orbit', function(e){
e.preventDefault();
_this.changeSlide(true);
}).on('swiperight.zf.orbit', function(e){
e.preventDefault();
_this.changeSlide(false);
});
}
//***************************************
//***************************************
//**Now using custom event - thanks to:**
//** Yohai Ararat of Toronto **
//***************************************
if(this.$slides.length > 1){
if(this.options.autoPlay){
this.$slides.on('click.zf.orbit', function(){
_this.$element.data('clickedOn', _this.$element.data('clickedOn') ? false : true);
_this.timer[_this.$element.data('clickedOn') ? 'pause' : 'start']();
});
if(this.options.pauseOnHover){
this.$element.on('mouseenter.zf.orbit', function(){
_this.timer.pause();
}).on('mouseleave.zf.orbit', function(){
if(!_this.$element.data('clickedOn')){
_this.timer.start();
if(this.options.swipe){
this.$slides.off('swipeleft.zf.orbit swiperight.zf.orbit')
.on('swipeleft.zf.orbit', function(e){
e.preventDefault();
_this.changeSlide(true);
}).on('swiperight.zf.orbit', function(e){
e.preventDefault();
_this.changeSlide(false);
});
}
});
}
}
//***************************************
if(this.options.navButtons){
var $controls = this.$element.find('.' + this.options.nextClass + ', .' + this.options.prevClass);
$controls.attr('tabindex', 0)
//also need to handle enter/return and spacebar key presses
.on('click.zf.orbit touchend.zf.orbit', function(){
_this.changeSlide($(this).hasClass(_this.options.nextClass));
});
}
if(this.options.autoPlay){
this.$slides.on('click.zf.orbit', function(){
_this.$element.data('clickedOn', _this.$element.data('clickedOn') ? false : true);
_this.timer[_this.$element.data('clickedOn') ? 'pause' : 'start']();
});
if(this.options.pauseOnHover){
this.$element.on('mouseenter.zf.orbit', function(){
_this.timer.pause();
}).on('mouseleave.zf.orbit', function(){
if(!_this.$element.data('clickedOn')){
_this.timer.start();
}
});
}
}
if(this.options.bullets){
this.$bullets.on('click.zf.orbit touchend.zf.orbit', function(){
if(/is-active/g.test(this.className)){ return false; }//if this is active, kick out of function.
var idx = $(this).data('slide'),
ltr = idx > _this.$slides.filter('.is-active').data('slide'),
$slide = _this.$slides.eq(idx);
if(this.options.navButtons){
var $controls = this.$element.find('.' + this.options.nextClass + ', .' + this.options.prevClass);
$controls.attr('tabindex', 0)
//also need to handle enter/return and spacebar key presses
.on('click.zf.orbit touchend.zf.orbit', function(){
_this.changeSlide($(this).hasClass(_this.options.nextClass));
});
}
_this.changeSlide(ltr, $slide, idx);
});
}
if(this.options.bullets){
this.$bullets.on('click.zf.orbit touchend.zf.orbit', function(){
if(/is-active/g.test(this.className)){ return false; }//if this is active, kick out of function.
var idx = $(this).data('slide'),
ltr = idx > _this.$slides.filter('.is-active').data('slide'),
$slide = _this.$slides.eq(idx);
this.$wrapper.add(this.$bullets).on('keydown.zf.orbit', function(e){
// handle keyboard event with keyboard util
Foundation.Keyboard.handleKey(e, 'Orbit', {
next: function() {
_this.changeSlide(true);
},
previous: function() {
_this.changeSlide(false);
},
handled: function() { // if bullet is focused, make sure focus moves
if ($(e.target).is(_this.$bullets)) {
_this.$bullets.filter('.is-active').focus();
_this.changeSlide(ltr, $slide, idx);
});
}
this.$wrapper.add(this.$bullets).on('keydown.zf.orbit', function(e){
// handle keyboard event with keyboard util
Foundation.Keyboard.handleKey(e, 'Orbit', {
next: function() {
_this.changeSlide(true);
},
previous: function() {
_this.changeSlide(false);
},
handled: function() { // if bullet is focused, make sure focus moves
if ($(e.target).is(_this.$bullets)) {
_this.$bullets.filter('.is-active').focus();
}
}
});
});
}
});
});
};
/**
* Changes the current slide to a new one.
* @function
* @param {Boolean} isLTR - flag if the slide should move left to right.
* @param {jQuery} chosenSlide - the jQuery element of the slide to show next, if one is selected.
* @param {Number} idx - the index of the new slide in its collection, if one chosen.
* @fires Orbit#slidechange
*/
Orbit.prototype.changeSlide = function(isLTR, chosenSlide, idx){
var $curSlide = this.$slides.filter('.is-active').eq(0);
};
/**
* Changes the current slide to a new one.
* @function
* @param {Boolean} isLTR - flag if the slide should move left to right.
* @param {jQuery} chosenSlide - the jQuery element of the slide to show next, if one is selected.
* @param {Number} idx - the index of the new slide in its collection, if one chosen.
* @fires Orbit#slidechange
*/
Orbit.prototype.changeSlide = function(isLTR, chosenSlide, idx){
var $curSlide = this.$slides.filter('.is-active').eq(0);
if(/mui/g.test($curSlide[0].className)){ return false; }//if the slide is currently animating, kick out of the function
if(/mui/g.test($curSlide[0].className)){ return false; }//if the slide is currently animating, kick out of the function
var $firstSlide = this.$slides.first(),
var $firstSlide = this.$slides.first(),
$lastSlide = this.$slides.last(),

@@ -354,73 +357,72 @@ dirIn = isLTR ? 'Right' : 'Left',

if(!chosenSlide){//most of the time, this will be auto played or clicked from the navButtons.
$newSlide = isLTR ? //if wrapping enabled, check to see if there is a `next` or `prev` sibling, if not, select the first or last slide to fill in. if wrapping not enabled, attempt to select `next` or `prev`, if there's nothing there, the function will kick out on next step. CRAZY NESTED TERNARIES!!!!!
(this.options.infiniteWrap ? $curSlide.next('.' + this.options.slideClass).length ? $curSlide.next('.' + this.options.slideClass) : $firstSlide : $curSlide.next('.' + this.options.slideClass))//pick next slide if moving left to right
:
(this.options.infiniteWrap ? $curSlide.prev('.' + this.options.slideClass).length ? $curSlide.prev('.' + this.options.slideClass) : $lastSlide : $curSlide.prev('.' + this.options.slideClass));//pick prev slide if moving right to left
}else{
$newSlide = chosenSlide;
}
if($newSlide.length){
if(this.options.bullets){
idx = idx || this.$slides.index($newSlide);//grab index to update bullets
this._updateBullets(idx);
}
if(this.options.useMUI){
if(!chosenSlide){//most of the time, this will be auto played or clicked from the navButtons.
$newSlide = isLTR ? //if wrapping enabled, check to see if there is a `next` or `prev` sibling, if not, select the first or last slide to fill in. if wrapping not enabled, attempt to select `next` or `prev`, if there's nothing there, the function will kick out on next step. CRAZY NESTED TERNARIES!!!!!
(this.options.infiniteWrap ? $curSlide.next('.' + this.options.slideClass).length ? $curSlide.next('.' + this.options.slideClass) : $firstSlide : $curSlide.next('.' + this.options.slideClass))//pick next slide if moving left to right
:
(this.options.infiniteWrap ? $curSlide.prev('.' + this.options.slideClass).length ? $curSlide.prev('.' + this.options.slideClass) : $lastSlide : $curSlide.prev('.' + this.options.slideClass));//pick prev slide if moving right to left
}else{
$newSlide = chosenSlide;
}
if($newSlide.length){
if(this.options.bullets){
idx = idx || this.$slides.index($newSlide);//grab index to update bullets
this._updateBullets(idx);
}
if(this.options.useMUI){
Foundation.Motion.animateIn(
$newSlide.addClass('is-active').css({'position': 'absolute', 'top': 0}),
this.options['animInFrom' + dirIn],
function(){
$newSlide.css({'position': 'relative', 'display': 'block'})
.attr('aria-live', 'polite');
});
Foundation.Motion.animateIn(
$newSlide.addClass('is-active').css({'position': 'absolute', 'top': 0}),
this.options['animInFrom' + dirIn],
function(){
$newSlide.css({'position': 'relative', 'display': 'block'})
.attr('aria-live', 'polite');
});
Foundation.Motion.animateOut(
$curSlide.removeClass('is-active'),
this.options['animOutTo' + dirOut],
function(){
$curSlide.removeAttr('aria-live');
if(_this.options.autoPlay){
_this.timer.restart();
Foundation.Motion.animateOut(
$curSlide.removeClass('is-active'),
this.options['animOutTo' + dirOut],
function(){
$curSlide.removeAttr('aria-live');
if(_this.options.autoPlay && !_this.timer.isPaused){
_this.timer.restart();
}
//do stuff?
});
}else{
$curSlide.removeClass('is-active is-in').removeAttr('aria-live').hide();
$newSlide.addClass('is-active is-in').attr('aria-live', 'polite').show();
if(this.options.autoPlay && !this.timer.isPaused){
this.timer.restart();
}
}
/**
* Triggers when the slide has finished animating in.
* @event Orbit#slidechange
*/
this.$element.trigger('slidechange.zf.orbit', [$newSlide]);
}
//do stuff?
});
}else{
$curSlide.removeClass('is-active is-in').removeAttr('aria-live').hide();
$newSlide.addClass('is-active is-in').attr('aria-live', 'polite').show();
if(this.options.autoPlay){
this.timer.restart();
}
}
/**
* Triggers when the slide has finished animating in.
* @event Orbit#slidechange
*/
this.$element.trigger('slidechange.zf.orbit', [$newSlide]);
}
};
/**
* Updates the active state of the bullets, if displayed.
* @function
* @private
* @param {Number} idx - the index of the current slide.
*/
Orbit.prototype._updateBullets = function(idx){
var $oldBullet = this.$element.find('.' + this.options.boxOfBullets)
.find('.is-active').removeClass('is-active').blur(),
span = $oldBullet.find('span:last').detach(),
$newBullet = this.$bullets.eq(idx).addClass('is-active').append(span);
};
/**
* Destroys the carousel and hides the element.
* @function
*/
Orbit.prototype.destroy = function(){
delete this.timer;
this.$element.off('.zf.orbit').find('*').off('.zf.orbit').end().hide();
Foundation.unregisterPlugin(this);
};
};
/**
* Updates the active state of the bullets, if displayed.
* @function
* @private
* @param {Number} idx - the index of the current slide.
*/
Orbit.prototype._updateBullets = function(idx){
var $oldBullet = this.$element.find('.' + this.options.boxOfBullets)
.find('.is-active').removeClass('is-active').blur(),
span = $oldBullet.find('span:last').detach(),
$newBullet = this.$bullets.eq(idx).addClass('is-active').append(span);
};
/**
* Destroys the carousel and hides the element.
* @function
*/
Orbit.prototype.destroy = function(){
this.$element.off('.zf.orbit').find('*').off('.zf.orbit').end().hide();
Foundation.unregisterPlugin(this);
};
Foundation.plugin(Orbit, 'Orbit');
Foundation.plugin(Orbit, 'Orbit');
}(jQuery, window.Foundation);
}(jQuery, window.Foundation);

@@ -29,8 +29,2 @@ /**

// [PH] Media queries
var phMedia = {
small: '(min-width: 0px)',
medium: '(min-width: 640px)'
};
/**

@@ -37,0 +31,0 @@ * Creates a new instance of a responsive menu.

@@ -109,7 +109,13 @@ /**

/**
* Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api.
* Allows the modal to remove and reinject markup on close. Should be true if using video elements w/o using provider's api, otherwise, videos will continue to play in the background.
* @option
* @example false
*/
resetOnClose: false
resetOnClose: false,
/**
* Allows the modal to alter the url on open/close, and allows the use of the `back` button to close modals. ALSO, allows a modal to auto-maniacally open on page load IF the hash === the modal's user-set id.
* @option
* @example false
*/
deepLink: false
};

@@ -156,2 +162,5 @@

this._events();
if(this.options.deepLink && window.location.hash === ( '#' + this.id)){
$(window).one('load.zf.reveal', this.open.bind(this));
}
};

@@ -208,4 +217,15 @@

}
if(this.options.deepLink){
$(window).on('popstate.zf.reveal:' + this.id, this._handleState.bind(this));
}
};
/**
* Handles modal methods on back/forward button clicks or any other event that triggers popstate.
* @private
*/
Reveal.prototype._handleState = function(e){
if(window.location.hash === ( '#' + this.id) && !this.isActive){ this.open(); }
else{ this.close(); }
};
/**
* Sets the position of the modal before opening

@@ -256,2 +276,12 @@ * @param {Function} cb - a callback function to execute when positioning is complete.

Reveal.prototype.open = function(){
if(this.options.deepLink){
var hash = '#' + this.id;
if(window.history.pushState){
window.history.pushState(null, null, hash);
}else{
window.location.hash = hash;
}
}
var _this = this;

@@ -314,3 +344,2 @@ this.isActive = true;

_this._extraHandlers();
// Foundation.reflow();
}, 0);

@@ -329,4 +358,4 @@ };

$('body').on('click.zf.reveal', function(e){
// if()
_this.close();
if(e.target === _this.$element[0] || $.contains(_this.$element[0], e.target)){ return; }
_this.close();
});

@@ -401,5 +430,4 @@ }

if(_this.options.overlay){
Foundation.Motion.animateOut(_this.$overlay, 'fade-out', function(){
});
}
Foundation.Motion.animateOut(_this.$overlay, 'fade-out', finishUp);
}else{ finishUp(); }
});

@@ -409,5 +437,4 @@ }else{

if(_this.options.overlay){
_this.$overlay.hide(0, function(){
});
}
_this.$overlay.hide(0, finishUp);
}else{ finishUp(); }
});

@@ -423,12 +450,19 @@ }

this.$element.off('keydown.zf.reveal');
//if the modal changed size, reset it
if(this.changedSize){
this.$element.css({
'height': '',
'width': ''
});
function finishUp(){
//if the modal changed size, reset it
if(_this.changedSize){
_this.$element.css({
'height': '',
'width': ''
});
}
$('body').removeClass('is-reveal-open').attr({'aria-hidden': false, 'tabindex': ''});
_this.$element.attr({'aria-hidden': true})
/**
* Fires when the modal is done closing.
* @event Reveal#closed
*/
.trigger('closed.zf.reveal');
}
$('body').removeClass('is-reveal-open').attr({'aria-hidden': false, 'tabindex': ''});

@@ -444,8 +478,9 @@ /**

this.isActive = false;
this.$element.attr({'aria-hidden': true})
/**
* Fires when the modal is done closing.
* @event Reveal#closed
*/
.trigger('closed.zf.reveal');
if(_this.options.deepLink){
if(window.history.replaceState){
window.history.replaceState("", document.title, window.location.pathname);
}else{
window.location.hash = '';
}
}
};

@@ -472,4 +507,5 @@ /**

}
this.$element.hide();
this.$anchor.off();
this.$element.hide().off();
this.$anchor.off('.zf');
$(window).off('.zf.reveal:' + this.id);

@@ -476,0 +512,0 @@ Foundation.unregisterPlugin(this);

@@ -136,3 +136,4 @@ /**

*/
disabledClass: 'disabled'
disabledClass: 'disabled',
invertVertical: false
};

@@ -177,3 +178,3 @@ /**

_this._setHandlePos(_this.$handle2, _this.options.initialEnd);
_this._setHandlePos(_this.$handle2, _this.options.initialEnd, true);
});

@@ -201,10 +202,10 @@ // this.$handle.triggerHandler('click.zf.slider');

location = parseFloat(location);//on input change events, convert string to number...grumble.
// prevent slider from running out of bounds
// prevent slider from running out of bounds, if value exceeds the limits set through options, override the value to min/max
if(location < this.options.start){ location = this.options.start; }
else if(location > this.options.end){ location = this.options.end; }
var isDbl = this.options.doubleSided,
callback = cb || null;
var isDbl = this.options.doubleSided;
if(isDbl){
if(isDbl){ //this block is to prevent 2 handles from crossing eachother. Could/should be improved.
if(this.handles.index($hndl) === 0){

@@ -219,5 +220,8 @@ var h2Val = parseFloat(this.$handle2.attr('aria-valuenow'));

//this is for single-handled vertical sliders, it adjusts the value to account for the slider being "upside-down"
//for click and drag events, it's weird due to the scale(-1, 1) css property
if(this.options.vertical && !noInvert){
location = this.options.end - location;
}
var _this = this,

@@ -227,31 +231,45 @@ vert = this.options.vertical,

lOrT = vert ? 'top' : 'left',
halfOfHandle = $hndl[0].getBoundingClientRect()[hOrW] / 2,
handleDim = $hndl[0].getBoundingClientRect()[hOrW],
elemDim = this.$element[0].getBoundingClientRect()[hOrW],
//percentage of bar min/max value based on click or drag point
pctOfBar = percent(location, this.options.end).toFixed(2),
pxToMove = (elemDim - halfOfHandle) * pctOfBar,
//number of actual pixels to shift the handle, based on the percentage obtained above
pxToMove = (elemDim - handleDim) * pctOfBar,
//percentage of bar to shift the handle
movement = (percent(pxToMove, elemDim) * 100).toFixed(this.options.decimal),
location = location > 0 ? parseFloat(location.toFixed(this.options.decimal)) : 0,
anim, prog, start = null, css = {};
//fixing the decimal value for the location number, is passed to other methods as a fixed floating-point value
location = parseFloat(location.toFixed(this.options.decimal)),
// declare empty object for css adjustments, only used with 2 handled-sliders
css = {};
this._setValues($hndl, location);
if(this.options.doubleSided){//update to calculate based on values set to respective inputs??
// TODO update to calculate based on values set to respective inputs??
if(isDbl){
var isLeftHndl = this.handles.index($hndl) === 0,
//empty variable, will be used for min-height/width for fill bar
dim,
idx = this.handles.index($hndl);
//percentage w/h of the handle compared to the slider bar
handlePct = ~~(percent(handleDim, elemDim) * 100);
//if left handle, the math is slightly different than if it's the right handle, and the left/top property needs to be changed for the fill bar
if(isLeftHndl){
css[lOrT] = (pctOfBar > 0 ? pctOfBar * 100 : 0) + '%';//
dim = /*Math.abs*/((percent(this.$handle2.position()[lOrT] + halfOfHandle, elemDim) - parseFloat(pctOfBar)) * 100).toFixed(this.options.decimal) + '%';
css['min-' + hOrW] = dim;
if(cb && typeof cb === 'function'){ cb(); }
//left or top percentage value to apply to the fill bar.
css[lOrT] = movement + '%';
//calculate the new min-height/width for the fill bar.
dim = parseFloat(this.$handle2[0].style[lOrT]) - movement + handlePct;
//this callback is necessary to prevent errors and allow the proper placement and initialization of a 2-handled slider
//plus, it means we don't care if 'dim' isNaN on init, it won't be in the future.
if(cb && typeof cb === 'function'){ cb(); }//this is only needed for the initialization of 2 handled sliders
}else{
var handleLeft = parseFloat(this.$handle[0].style.left);
location = (location < 100 ? location : 100) - (!isNaN(handleLeft) ? handleLeft : this.options.end - location);
css['min-' + hOrW] = location + '%';
//just caching the value of the left/bottom handle's left/top property
var handlePos = parseFloat(this.$handle[0].style[lOrT]);
//calculate the new min-height/width for the fill bar. Use isNaN to prevent false positives for numbers <= 0
//based on the percentage of movement of the handle being manipulated, less the opposing handle's left/top position, plus the percentage w/h of the handle itself
dim = movement - (isNaN(handlePos) ? this.options.initialStart : handlePos) + handlePct;
}
// assign the min-height/width to our css object
css['min-' + hOrW] = dim + '%';
}
this.$element.one('finished.zf.animate', function(){
_this.animComplete = true;
/**

@@ -263,12 +281,19 @@ * Fires when the handle is done moving.

});
var moveTime = _this.$element.data('dragging') ? 1000/60 : _this.options.moveTime;
/*var move = new */Foundation.Move(moveTime, $hndl, function(){
//because we don't know exactly how the handle will be moved, check the amount of time it should take to move.
var moveTime = this.$element.data('dragging') ? 1000/60 : this.options.moveTime;
Foundation.Move(moveTime, $hndl, function(){
//adjusting the left/top property of the handle, based on the percentage calculated above
$hndl.css(lOrT, movement + '%');
if(!_this.options.doubleSided){
//if single-handled, a simple method to expand the fill bar
_this.$fill.css(hOrW, pctOfBar * 100 + '%');
}else{
//otherwise, use the css object we created above
_this.$fill.css(css);
}
});
// move.do();
};

@@ -320,2 +345,3 @@ /**

* @param {Number} val - floating point number for the new value of the slider.
* TODO clean this up, there's a lot of repeated code between this and the _setHandlePos fn.
*/

@@ -334,6 +360,9 @@ Slider.prototype._handleEvent = function(e, $handle, val){

barOffset = (this.$element.offset()[direction] - pageXY),
barXY = barOffset > 0 ? -halfOfHandle : (barOffset - halfOfHandle) < -barDim ? barDim : Math.abs(barOffset),//if the cursor position is less than or greater than the elements bounding coordinates, set coordinates within those bounds
// eleDim = this.$element[0].getBoundingClientRect()[param],
//if the cursor position is less than or greater than the elements bounding coordinates, set coordinates within those bounds
barXY = barOffset > 0 ? -halfOfHandle : (barOffset - halfOfHandle) < -barDim ? barDim : Math.abs(barOffset),
offsetPct = percent(barXY, barDim);
value = (this.options.end - this.options.start) * offsetPct;
// turn everything around for RTL, yay math!
if (Foundation.rtl() && !this.options.vertical) {value = this.options.end - value;}
//boolean flag for the setHandlePos fn, specifically for vertical sliders
hasVal = false;

@@ -375,3 +404,3 @@

if(_this.$element.data('dragging')){ return false; }
_this.animComplete = false;
if(_this.options.doubleSided){

@@ -387,4 +416,3 @@ _this._handleEvent(e);

this.handles.addTouch();
// var curHandle,
// timer,
var $body = $('body');

@@ -397,3 +425,3 @@ $handle

_this.$element.data('dragging', true);
_this.animComplete = false;
curHandle = $(e.currentTarget);

@@ -404,13 +432,11 @@

// timer = setTimeout(function(){
_this._handleEvent(e, curHandle);
// }, _this.options.dragDelay);
}).on('mouseup.zf.slider', function(e){
// clearTimeout(timer);
_this.animComplete = true;
_this._handleEvent(e, curHandle);
$handle.removeClass('is-dragging');
_this.$fill.removeClass('is-dragging');
_this.$element.data('dragging', false);
// Foundation.reflow(_this.$element, 'slider');
$body.off('mousemove.zf.slider mouseup.zf.slider');

@@ -421,7 +447,7 @@ });

$handle.off('keydown.zf.slider').on('keydown.zf.slider', function(e){
var idx = _this.options.doubleSided ? _this.handles.index($(this)) : 0,
oldValue = parseFloat(_this.inputs.eq(idx).val()),
newValue;
var _$handle = $(this),
idx = _this.options.doubleSided ? _this.handles.index(_$handle) : 0,
oldValue = parseFloat(_this.inputs.eq(idx).val()),
newValue;
var _$handle = $(this);

@@ -428,0 +454,0 @@ // handle keyboard event with keyboard util

@@ -91,5 +91,5 @@ /**

isActive = $elem.hasClass('is-active'),
hash = $link.attr('href').slice(1),
linkId = hash + '-label',
$tabContent = $(hash);
hash = $link[0].hash.slice(1),
linkId = $link[0].id ? $link[0].id : hash + '-label',
$tabContent = $('#' + hash);

@@ -213,10 +213,9 @@ $elem.attr({'role': 'presentation'});

var $tabLink = $target.find('[role="tab"]'),
hash = $tabLink.attr('href'),
hash = $tabLink[0].hash,
$targetContent = $(hash),
$oldTab = this.$element.find('.' + this.options.linkClass + '.is-active')
.removeClass('is-active').find('[role="tab"]')
.attr({'aria-selected': 'false'}).attr('href');
.attr({'aria-selected': 'false'}).attr('aria-controls');
$($oldTab).removeClass('is-active').attr({'aria-hidden': 'true'});
$('#'+$oldTab).removeClass('is-active').attr({'aria-hidden': 'true'});

@@ -223,0 +222,0 @@ $target.addClass('is-active');

@@ -155,3 +155,3 @@ /**

// var position = element.attr('class').match(/top|left|right/g);
var position = element[0].className.match(/(top|left|right)/g);
var position = element[0].className.match(/\b(top|left|right)\b/g);
position = position ? position[0] : '';

@@ -165,3 +165,3 @@ return position;

Tooltip.prototype._buildTemplate = function(id){
var templateClasses = (this.options.tooltipClass + ' ' + this.options.positionClass).trim();
var templateClasses = (this.options.tooltipClass + ' ' + this.options.positionClass + ' ' + this.options.templateClasses).trim();
var $template = $('<div></div>').addClass(templateClasses).attr({

@@ -251,3 +251,3 @@ 'role': 'tooltip',

* reveals the tooltip, and fires an event to close any other open tooltips on the page
* @fires Closeme#tooltip
* @fires Tooltip#closeme
* @fires Tooltip#show

@@ -254,0 +254,0 @@ * @function

@@ -16,6 +16,5 @@ !function($, Foundation){

if($sub.length){
$item.addClass('has-submenu ' + hasSubClass)
$item.addClass(hasSubClass)
.attr({
'aria-haspopup': true,
'aria-selected': false,
'aria-expanded': false,

@@ -46,3 +45,3 @@ 'aria-label': $item.children('a:first').text()

// menu.find('.' + subMenuClass + ', .' + subItemClass + ', .is-active, .has-submenu, .is-submenu-item, .submenu, [data-submenu]')
.removeClass(subMenuClass + ' ' + subItemClass + ' ' + hasSubClass + ' has-submenu is-submenu-item submenu is-active')
.removeClass(subMenuClass + ' ' + subItemClass + ' ' + hasSubClass + ' is-submenu-item submenu is-active')
.removeAttr('data-submenu').css('display', '');

@@ -49,0 +48,0 @@

@@ -11,2 +11,4 @@ !function($, Foundation){

this.isPaused = false;
this.restart = function(){

@@ -19,2 +21,3 @@ remain = -1;

this.start = function(){
this.isPaused = false
// if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.

@@ -35,2 +38,3 @@ clearTimeout(timer);

this.pause = function(){
this.isPaused = true;
//if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.

@@ -37,0 +41,0 @@ clearTimeout(timer);

@@ -99,6 +99,19 @@ //**************************************************

},
type = eventTypes[event.type];
type = eventTypes[event.type],
simulatedEvent
;
var simulatedEvent = document.createEvent('MouseEvent');
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);
if('MouseEvent' in window && typeof window.MouseEvent === 'function') {
simulatedEvent = window.MouseEvent(type, {
'bubbles': true,
'cancelable': true,
'screenX': first.screenX,
'screenY': first.screenY,
'clientX': first.clientX,
'clientY': first.clientY
});
} else {
simulatedEvent = document.createEvent('MouseEvent');
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);
}
first.target.dispatchEvent(simulatedEvent);

@@ -105,0 +118,0 @@ };

@@ -28,5 +28,7 @@ !function(Foundation, $) {

// Elements with [data-closable] will respond to close.zf.trigger events.
$(document).on('close.zf.trigger', '[data-closable]', function() {
var animation = $(this).data('closable') || 'fade-out';
if(Foundation.Motion){
$(document).on('close.zf.trigger', '[data-closable]', function(e){
e.stopPropagation();
var animation = $(this).data('closable');
if(animation !== ''){
Foundation.Motion.animateOut($(this), animation, function() {

@@ -33,0 +35,0 @@ $(this).trigger('closed.zf');

{
"name": "foundation-sites",
"version": "6.1.1",
"version": "6.1.2",
"main": "dist/foundation.js",

@@ -14,20 +14,21 @@ "description": "The most advanced responsive front-end framework in the world.",

"dependencies": {
"jquery": "^2.1.0",
"what-input": "^1.1.2"
"jquery": "~2.1.0",
"what-input": "~1.1.2"
},
"license": "MIT",
"devDependencies": {
"bootcamp": "^1.1.7",
"browser-sync": "^2.8.2",
"browser-sync": "^2.11.1",
"clipboard": "^1.5.5",
"corejs-typeahead": "corejavascript/typeahead.js",
"foundation-docs": "zurb/foundation-docs",
"gitty": "^3.3.0",
"gitty": "^3.3.3",
"gulp": "^3.8.10",
"gulp-autoprefixer": "^2.3.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-cache-bust": "^1.0.2",
"gulp-concat": "^2.4.3",
"gulp-filter": "^2.0.2",
"gulp-jshint": "^1.9.2",
"gulp-load-plugins": "^0.8.0",
"gulp-minify-css": "^1.2.1",
"gulp-cssnano": "^2.1.0",
"gulp-filter": "^3.0.1",
"gulp-jshint": "^2.0.0",
"gulp-load-plugins": "^1.2.0",
"gulp-mocha": "^2.2.0",
"gulp-newer": "^1.1.0",

@@ -39,12 +40,12 @@ "gulp-plumber": "^1.0.1",

"gulp-rsync": "0.0.5",
"gulp-ruby-sass": "1.0.0-alpha.3",
"gulp-ruby-sass": "^2.0.6",
"gulp-sass": "^2.1.0",
"gulp-scss-lint": "^0.2.2",
"gulp-scss-lint": "^0.3.9",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.1.0",
"inquirer": "^0.11.0",
"inquirer": "^0.11.2",
"jshint": "^2.9.1",
"mocha": "^2.3.3",
"motion-ui": "^1.1.0",
"octophant": "^1.0.0",
"open": "0.0.5",
"opener": "^1.4.1",

@@ -58,4 +59,4 @@ "panini": "^1.1.1",

"run-sequence": "^1.1.4",
"supercollider": "^1.2.0",
"typeahead.js": "^0.11.1"
"sass-true": "^2.0.3",
"supercollider": "^1.2.0"
},

@@ -62,0 +63,0 @@ "repository": {

# [Foundation for Sites](http://foundation.zurb.com) (v6.1)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zurb/foundation-sites?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![npm version](https://badge.fury.io/js/foundation-sites.svg)](https://badge.fury.io/js/foundation-sites) [![Bower version](https://badge.fury.io/bo/foundation-sites.svg)](https://badge.fury.io/bo/foundation-sites) [![Gem Version](https://badge.fury.io/rb/foundation-rails.svg)](https://badge.fury.io/rb/foundation-rails) [![devDependency Status](https://david-dm.org/zurb/foundation-sites/dev-status.svg)](https://david-dm.org/zurb/foundation-sites#info=devDependencies) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zurb/foundation-sites?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

@@ -9,3 +9,3 @@ Foundation is the most advanced responsive front-end framework in the world. Quickly go from prototype to production, building sites or apps that work on any kind of device with Foundation. Includes layout constructs, like a fully customizable, responsive grid, commonly used JavaScript plugins, and full A11Y support.

Requires NodeJS to be installed on your machine. Works with 0.10, 0.12, and 4.1! **Note that parts of our build process will break with NPM 3, due to the changes in how packages are installed.**
Requires NodeJS to be installed on your machine. Works with version 0.12 and higher!

@@ -52,2 +52,2 @@ The Sass is compiled using libsass, which requires the GCC to be installed on your machine. Windows users can install it through [MinGW](http://www.mingw.org/), and Mac users can install it through the [Xcode Command-line Tools](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/).

Copyright (c) 2015 ZURB, inc.
Copyright (c) 2016 ZURB, inc.

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

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

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