Socket
Socket
Sign inDemoInstall

foundation-sites

Package Overview
Dependencies
244
Maintainers
3
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.2.0-rc.1 to 6.2.0

_debug.json

1

foundation-docs/index.js
module.exports = {
buildSearch: require('./lib/buildSearch'),
handlebars: require('./lib/handlebars'),

@@ -4,0 +3,0 @@ marked: require('./lib/marked'),

@@ -24,10 +24,17 @@ {

"dependencies": {
"escape-html": "^1.0.3",
"handlebars": "^3.0.1",
"highlight.js": "^9.0.0",
"inky": "^1.0.0-rc.1",
"kebab-case": "^1.0.0",
"marked": "^0.3.5",
"multiline": "^1.0.2",
"querystring": "^0.2.0",
"require-dir": "^0.3.0",
"string-template": "^0.2.1"
},
"devDependencies": {
"chai": "^3.5.0",
"mocha": "^2.4.5",
"supercollider": "^1.2.0"
}
}

@@ -19,16 +19,2 @@ # Foundation Docs

### foundationDocs.buildSearch
Generates a JSON file for use with the docs search function. Best used with the component tree generated by [Supercollider](https://github.com/gakimball/supercollider).
**Parameters:**
- `tree` (Object): tree of components to build pages from.
- `cb` (Function): callback to run once the finished JSON file has been written to disk.
```js
var foundationDocs = require('foundation-docs');
foundationDocs.buildSearch(supercollider.tree, cb);
```
### foundationDocs.handlebars

@@ -35,0 +21,0 @@

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

var FOUNDATION_VERSION = '6.2.0-rc.1';
var FOUNDATION_VERSION = '6.2.0';

@@ -8,0 +8,0 @@ // Global Foundation object

@@ -71,2 +71,5 @@ 'use strict';

var $link = $sub.find('a:first');
if(_this.options.parentLink){
$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');

@@ -264,2 +267,3 @@ $sub.children('[data-submenu]')

$elem.removeClass('is-active is-closing');
$elem.blur();
});

@@ -286,4 +290,4 @@ /**

result.height = `${max * this.$menuItems[0].getBoundingClientRect().height}px`;
result.width = `${this.$element[0].getBoundingClientRect().width}px`;
result['min-height'] = `${max * this.$menuItems[0].getBoundingClientRect().height}px`;
result['max-width'] = `${this.$element[0].getBoundingClientRect().width}px`;

@@ -301,3 +305,3 @@ return result;

this.$element.unwrap()
.find('.js-drilldown-back').remove()
.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')

@@ -330,2 +334,8 @@ .end().find('[data-submenu]').removeAttr('aria-hidden tabindex role')

/**
* Adds the parent link to the submenu.
* @option
* @example false
*/
parentLink: false,
/**
* Allow the menu to return to root list on body click.

@@ -332,0 +342,0 @@ * @option

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

this.$tabs = this.$element.children('[role="menuitem"]');
this.isVert = this.$element.hasClass(this.options.verticalClass);
this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);

@@ -57,10 +56,6 @@

this.options.alignment = 'right';
subs.addClass('is-left-arrow opens-left');
subs.addClass('opens-left');
} else {
subs.addClass('is-right-arrow opens-right');
subs.addClass('opens-right');
}
if (!this.isVert) {
this.$tabs.filter('.is-dropdown-submenu-parent').removeClass('is-right-arrow is-left-arrow opens-right opens-left')
.addClass('is-down-arrow');
}
this.changed = false;

@@ -67,0 +62,0 @@ this._events();

@@ -78,2 +78,8 @@ 'use strict';

if(this.$overlay) {
this.$element.detach().appendTo(this.$overlay);
} else {
this.$element.detach().appendTo($('body'));
this.$element.addClass('without-overlay');
}
this._events();

@@ -94,7 +100,2 @@ if (this.options.deepLink && window.location.hash === ( `#${this.id}`)) {

.appendTo('body');
if (this.options.closeOnClick) {
$overlay.attr({
'data-close': id
});
}
return $overlay;

@@ -104,2 +105,27 @@ }

/**
* Updates position of modal
* TODO: Figure out if we actually need to cache these values or if it doesn't matter
* @private
*/
_updatePosition() {
var width = this.$element.outerWidth();
var outerWidth = $(window).width();
var height = this.$element.outerHeight();
var outerHeight = $(window).height();
var left = parseInt((outerWidth - width) / 2, 10);
var top;
if (height > outerHeight) {
top = parseInt(Math.min(100, outerHeight / 10), 10);
} else {
top = parseInt((outerHeight - height) / 4, 10);
}
this.$element.css({top: top + 'px'});
// only worry about left if we don't have an overlay, otherwise we're perfectly in the middle
if(!this.$overlay) {
this.$element.css({left: left + 'px'});
}
}
/**
* Adds event handlers for the modal.

@@ -116,6 +142,3 @@ * @private

'resizeme.zf.trigger': function() {
_this.updateVals = true;
if (_this.isActive) {
_this._setPosition();
}
_this._updatePosition();
}

@@ -135,3 +158,6 @@ });

if (this.options.closeOnClick && this.options.overlay) {
this.$overlay.off('.zf.reveal').on('click.zf.reveal', this.close.bind(this));
this.$overlay.off('.zf.reveal').on('click.zf.reveal', function(e) {
if (e.target === _this.$element[0] || $.contains(_this.$element[0], e.target)) { return; }
_this.close();
});
}

@@ -152,42 +178,4 @@ if (this.options.deepLink) {

_cacheValues() {
if(this.cached.mq !== Foundation.MediaQuery.current || this.$offsetParent === undefined){
this.$offsetParent = this.$element.offsetParent();
this.cached.mq = Foundation.MediaQuery.current;
}
this.cached.parentOffset = this.$offsetParent.offset();
this.cached.modalDims = this.$element[0].getBoundingClientRect();
this.cached.winWidth = window.innerWidth;
this.cached.vertOffset = window.innerHeight > this.cached.modalDims.height ? this.options.vOffset : 0;
this.updateVals = false;
return;
}
/**
* Sets the position of the modal before opening
* @param {Function} cb - a callback function to execute when positioning is complete.
* @private
*/
_setPosition(cb) {
if(!this.cached.winWidth || this.updateVals){ this._cacheValues(); }
var x = Math.round((this.cached.winWidth - this.cached.modalDims.width) / 2 - (this.cached.parentOffset.left > 0 ? this.cached.parentOffset.left : 0)),
y = Math.round(window.pageYOffset - (this.cached.parentOffset.top > 0 ? this.cached.parentOffset.top : 0) + this.cached.vertOffset);
this.$element.css(this._applyCss(x, y));
if(cb) cb();
}
_applyCss(x, y) {
var _this = this;
return (_this.options.animationIn ?
{top: y + 'px', left: x + 'px'}
: {transform: 'translate(' + x + 'px, ' + y + 'px)'}
);
}
/**
* Opens the modal controlled by `this.$anchor`, and closes all others by default.

@@ -209,48 +197,58 @@ * @function

var _this = this;
this.isActive = true;
//make element invisible, but remove display: none so we can get size and positioning
// Make elements invisible, but remove display: none so we can get size and positioning
this.$element
.css({'visibility': 'hidden'})
.css({ 'visibility': 'hidden' })
.show()
.scrollTop(0);
if (this.options.overlay) {
this.$overlay.css({'visibility': 'hidden'}).show();
}
this._setPosition(function() {
_this.$element.hide()
.css({'visibility': ''});
if (!_this.options.multipleOpened) {
/**
* Fires immediately before the modal opens.
* Closes any other modals that are currently open
* @event Reveal#closeme
*/
_this.$element.trigger('closeme.zf.reveal', _this.id);
this._updatePosition();
this.$element
.hide()
.css({ 'visibility': '' });
if(this.$overlay) {
this.$overlay.css({'visibility': ''}).hide();
}
if (!this.options.multipleOpened) {
/**
* Fires immediately before the modal opens.
* Closes any other modals that are currently open
* @event Reveal#closeme
*/
this.$element.trigger('closeme.zf.reveal', this.id);
}
// Motion UI method of reveal
if (this.options.animationIn) {
if (this.options.overlay) {
Foundation.Motion.animateIn(this.$overlay, 'fade-in');
}
if (_this.options.animationIn) {
if (_this.options.overlay) {
Foundation.Motion.animateIn(_this.$overlay, 'fade-in', function() {
Foundation.Motion.animateIn(_this.$element, _this.options.animationIn, function() {
_this.focusableElements = Foundation.Keyboard.findFocusable(_this.$element);
});
});
} else {
Foundation.Motion.animateIn(_this.$element, _this.options.animationIn, function() {
_this.focusableElements = Foundation.Keyboard.findFocusable(_this.$element);
});
}
} else {
if (_this.options.overlay) {
_this.$overlay.show(0, function() {
_this.$element.show(_this.options.showDelay, function() {
});
});
} else {
_this.$element.show(_this.options.showDelay, function() {
});
}
Foundation.Motion.animateIn(this.$element, this.options.animationIn, function() {
this.focusableElements = Foundation.Keyboard.findFocusable(this.$element);
});
}
// jQuery method of reveal
else {
if (this.options.overlay) {
this.$overlay.show(0);
}
});
this.$element.show(this.options.showDelay);
}
// handle accessibility
this.$element.attr({'aria-hidden': false}).attr('tabindex', -1).focus()
this.$element
.attr({
'aria-hidden': false,
'tabindex': -1
})
.focus();
/**

@@ -260,14 +258,18 @@ * Fires when the modal has successfully opened.

*/
.trigger('open.zf.reveal');
if(this.isiOS){
this.$element.trigger('open.zf.reveal');
if (this.isiOS) {
var scrollPos = window.pageYOffset;
$('html, body').addClass('is-reveal-open').scrollTop(scrollPos);
}else{
}
else {
$('body').addClass('is-reveal-open');
}
$('body').addClass('is-reveal-open')
.attr({'aria-hidden': (this.options.overlay || this.options.fullScreen) ? true : false});
setTimeout(function() {
_this._extraHandlers();
$('body')
.addClass('is-reveal-open')
.attr('aria-hidden', (this.options.overlay || this.options.fullScreen) ? true : false);
setTimeout(() => {
this._extraHandlers();
}, 0);

@@ -354,16 +356,26 @@ }

// Motion UI method of hiding
if (this.options.animationOut) {
Foundation.Motion.animateOut(this.$element, this.options.animationOut, function() {
if (_this.options.overlay) {
Foundation.Motion.animateOut(_this.$overlay, 'fade-out', finishUp);
} else { finishUp(); }
});
} else {
this.$element.hide(_this.options.hideDelay, function() {
if (_this.options.overlay) {
_this.$overlay.hide(0, finishUp);
} else { finishUp(); }
});
if (this.options.overlay) {
Foundation.Motion.animateOut(this.$overlay, 'fade-out', finishUp);
}
else {
finishUp();
}
Foundation.Motion.animateOut(this.$element, this.options.animationOut);
}
//conditionals to remove extra event listeners added on open
// jQuery method of hiding
else {
if (this.options.overlay) {
this.$overlay.hide(0, finishUp);
}
else {
finishUp();
}
this.$element.hide(this.options.hideDelay);
}
// Conditionals to remove extra event listeners added on open
if (this.options.closeOnEsc) {

@@ -379,12 +391,17 @@ $(window).off('keydown.zf.reveal');

function finishUp(){
if(_this.isiOS){
function finishUp() {
if (_this.isiOS) {
$('html, body').removeClass('is-reveal-open');
}else{
}
else {
$('body').removeClass('is-reveal-open');
}
$('body').attr({'aria-hidden': false, 'tabindex': ''});
_this.$element.attr({'aria-hidden': true})
$('body').attr({
'aria-hidden': false,
'tabindex': ''
});
_this.$element.attr('aria-hidden', true);
/**

@@ -394,3 +411,3 @@ * Fires when the modal is done closing.

*/
.trigger('closed.zf.reveal');
_this.$element.trigger('closed.zf.reveal');
}

@@ -397,0 +414,0 @@

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

} else {//change event on input
value = this._adjustValue($handle);
value = this._adjustValue(null, val);
hasVal = true;

@@ -440,4 +440,5 @@ }

/**
* Minimum value change per change event. Not Currently Implemented!
* Minimum value change per change event.
* @option
* @example 1
*/

@@ -444,0 +445,0 @@ step: 1,

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

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

@@ -11,0 +12,0 @@

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

return {
left: $anchorDims.offset.left,
left: (Foundation.rtl() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width : $anchorDims.offset.left),
top: $anchorDims.offset.top - ($eleDims.height + vOffset)

@@ -178,3 +178,3 @@ }

return {
left: $anchorDims.offset.left,
left: (Foundation.rtl() ? $anchorDims.offset.left - $eleDims.width + $anchorDims.width : $anchorDims.offset.left),
top: $anchorDims.offset.top + $anchorDims.height + vOffset

@@ -181,0 +181,0 @@ }

{
"name": "foundation-sites",
"version": "6.2.0-rc.1",
"version": "6.2.0",
"main": "dist/foundation.js",

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

"babel-core": "^6.3.26",
"babel-eslint": "^5.0.0",
"babel-plugin-transform-es2015-arrow-functions": "^6.3.13",

@@ -26,4 +27,2 @@ "babel-plugin-transform-es2015-block-scoped-functions": "^6.3.13",

"babel-plugin-transform-es2015-destructuring": "^6.3.15",
"babel-plugin-transform-es2015-modules-commonjs": "^6.4.5",
"babel-plugin-transform-es2015-modules-umd": "^6.4.3",
"babel-plugin-transform-es2015-parameters": "^6.3.26",

@@ -33,3 +32,2 @@ "babel-plugin-transform-es2015-shorthand-properties": "^6.5.0",

"babel-plugin-transform-es2015-template-literals": "^6.3.13",
"bootcamp": "^1.1.7",
"browser-sync": "^2.8.2",

@@ -40,3 +38,2 @@ "chalk": "^1.1.1",

"foundation-docs": "zurb/foundation-docs",
"gitty": "^3.3.3",
"gulp": "^3.8.10",

@@ -48,4 +45,4 @@ "gulp-autoprefixer": "^2.3.1",

"gulp-cssnano": "^2.1.0",
"gulp-eslint": "^2.0.0",
"gulp-filter": "^3.0.1",
"gulp-jshint": "^2.0.0",
"gulp-load-plugins": "^1.2.0",

@@ -65,3 +62,2 @@ "gulp-mocha": "^2.2.0",

"inquirer": "^0.11.2",
"jshint": "^2.9.1",
"mocha": "^2.3.3",

@@ -73,3 +69,2 @@ "motion-ui": "^1.1.0",

"parker": "0.0.9",
"pretty-print": "^1.0.0",
"prettyjson": "^1.1.3",

@@ -80,3 +75,3 @@ "require-dir": "^0.3.0",

"sass-true": "^2.0.3",
"supercollider": "^1.2.0"
"supercollider": "^1.4.0"
},

@@ -99,3 +94,11 @@ "repository": {

"needs": "^0.8.0"
},
"jspm": {
"format": "global",
"shim": {
"dist/foundation": {
"deps": ["jquery"]
}
}
}
}

@@ -32,4 +32,4 @@ # [Foundation for Sites](http://foundation.zurb.com)

Check out our [contributing guide](http://foundation.zurb.com/develop/contribute.html) to learn how you can contribute to Foundation. You can also browse the [https://github.com/zurb/foundation-sites/labels/help%20wanted](Help Wanted) tag in our issue tracker to find things to do.
Check out our [contributing guide](http://foundation.zurb.com/develop/contribute.html) to learn how you can contribute to Foundation. You can also browse the [Help Wanted](https://github.com/zurb/foundation-sites/labels/help%20wanted) tag in our issue tracker to find things to do.
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 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

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