Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 6.4.3 #254

Merged
merged 4 commits into from
Mar 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions app/views/foundation/rails/styleguide/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
</ul>


<div class="row">
<div class="large-4 columns">
<div class="grid-x grid-padding-x">
<div class="cell large-4">
<ul class="pricing-table">
<li class="title">Freelancer</li>
<li class="price">$99.99</li>
Expand All @@ -57,7 +57,7 @@
<li class="cta-button"><a class="button" href="#">Buy Now</a></li>
</ul>
</div>
<div class="large-4 columns">
<div class="cell large-4">
<ul class="pricing-table">
<li class="title">Startup</li>
<li class="price">$199.99</li>
Expand All @@ -68,7 +68,7 @@
<li class="cta-button"><a class="button" href="#">Buy Now</a></li>
</ul>
</div>
<div class="large-4 columns">
<div class="cell large-4">
<ul class="pricing-table">
<li class="title">Enterprise</li>
<li class="price">$999.99</li>
Expand All @@ -83,14 +83,14 @@

<hr>

<div class="row">
<div class="large-12 columns">
<div class="grid-x grid-padding-x">
<div class="cell large-12">
<h3 class="subheader">Find out more!</h3>
</div>
</div>

<div class="row">
<div class="large-12 columns">
<div class="grid-x grid-padding-x">
<div class="cell large-12">
<dl class="tabs" data-tab>
<dd class="active"><a href="#panel2-1">Overview</a></dd>
<dd><a href="#panel2-2">Features</a></dd>
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "foundation-rails",
"version": "6.4.1.0",
"version": "6.4.3.0",
"dependencies": {
"foundation-sites": "6.4.1",
"foundation-sites": "6.4.3",
"motion-ui": "1.2.3"
}
}
2 changes: 1 addition & 1 deletion lib/foundation/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Foundation
module Rails
VERSION = "6.4.1.3"
VERSION = "6.4.3"
end
end
12 changes: 9 additions & 3 deletions lib/generators/foundation/templates/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ $global-menu-nested-margin: 1rem;
$global-text-direction: ltr;
$global-flexbox: true;
$global-prototype-breakpoints: false;
$global-button-cursor: auto;
$global-color-pick-contrast-tolerance: 0;
$print-transparent-backgrounds: true;

Expand Down Expand Up @@ -477,6 +478,7 @@ $menu-icon-spacing: 0.25rem;
$menu-item-background-hover: $light-gray;
$menu-state-back-compat: true;
$menu-centered-back-compat: true;
$menu-icons-back-compat: true;

// 24. Meter
// ---------
Expand All @@ -491,8 +493,12 @@ $meter-fill-bad: $alert-color;
// 25. Off-canvas
// --------------

$offcanvas-size: 250px;
$offcanvas-vertical-size: 250px;
$offcanvas-sizes: (
small: 250px,
);
$offcanvas-vertical-sizes: (
small: 250px,
);
$offcanvas-background: $light-gray;
$offcanvas-shadow: 0 0 10px rgba($black, 0.7);
$offcanvas-inner-shadow-size: 20px;
Expand Down Expand Up @@ -859,5 +865,5 @@ $grid-margin-gutters: (
$grid-padding-gutters: $grid-margin-gutters;
$grid-container-padding: $grid-padding-gutters;
$grid-container-max: $global-width;
$block-grid-max: 8;
$xy-block-grid-max: 8;

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
///
/// Returns whether `$list` contains `$value`.
///
/// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-contain
///
/// @param {List} $list - list to check
/// @param {*} $value - value to look for
///
/// @example
/// sl-contain(a b c, a)
/// // true
///
/// @example
/// sl-contain(a b c, z)
/// // false
///
/// @return {Bool}
///

@function sl-contain($list, $value) {
@return not not index($list, $value);
}

///
/// @requires sl-contain
/// @alias sl-contain
///

@function sl-include($list, $value) {
@return sl-contain($list, $value);
}
2 changes: 1 addition & 1 deletion vendor/assets/js/foundation.abide.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ var Abide = function (_Plugin) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

this.$element = element;
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Abide.defaults, this.$element.data(), options);
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend(true, {}, Abide.defaults, this.$element.data(), options);

this.className = 'Abide'; // ie9 back compat
this._init();
Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/js/foundation.accordionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ var AccordionMenu = function (_Plugin) {
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, AccordionMenu.defaults, this.$element.data(), options);
this.className = 'AccordionMenu'; // ie9 back compat

__WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Feather(this.$element, 'accordion');

this._init();

__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('AccordionMenu', {
Expand All @@ -197,6 +195,8 @@ var AccordionMenu = function (_Plugin) {
}, {
key: '_init',
value: function _init() {
__WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Feather(this.$element, 'accordion');

var _this = this;

this.$element.find('[data-submenu]').not('.is-active').slideUp(0); //.find('a').css('padding-left', '1rem');
Expand Down
2 changes: 1 addition & 1 deletion vendor/assets/js/foundation.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ window.Foundation = __WEBPACK_IMPORTED_MODULE_1__foundation_core__["a" /* Founda



var FOUNDATION_VERSION = '6.4.1';
var FOUNDATION_VERSION = '6.4.3';

// Global Foundation object
// This is attached to the window, or used as a module for AMD/Browserify
Expand Down
6 changes: 3 additions & 3 deletions vendor/assets/js/foundation.drilldown.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ var Drilldown = function (_Plugin) {
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Drilldown.defaults, this.$element.data(), options);
this.className = 'Drilldown'; // ie9 back compat

__WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Feather(this.$element, 'drilldown');

this._init();

__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('Drilldown', {
Expand All @@ -202,6 +200,8 @@ var Drilldown = function (_Plugin) {
}, {
key: '_init',
value: function _init() {
__WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Feather(this.$element, 'drilldown');

if (this.options.autoApplyClass) {
this.$element.addClass('drilldown');
}
Expand Down Expand Up @@ -240,7 +240,7 @@ var Drilldown = function (_Plugin) {
var $link = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);
var $sub = $link.parent();
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.clone().prependTo($sub.children('[data-submenu]')).wrap('<li class="is-submenu-parent-item is-submenu-item is-drilldown-submenu-item" role="menuitem"></li>');
}
$link.data('savedHref', $link.attr('href')).removeAttr('href').attr('tabindex', 0);
$link.children('[data-submenu]').attr({
Expand Down
62 changes: 41 additions & 21 deletions vendor/assets/js/foundation.dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,16 +461,17 @@ var Dropdown = function (_Positionable) {
value: function _init() {
var $id = this.$element.attr('id');

this.$anchor = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-toggle="' + $id + '"]').length ? __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-toggle="' + $id + '"]') : __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-open="' + $id + '"]');
this.$anchor.attr({
this.$anchors = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-toggle="' + $id + '"]').length ? __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-toggle="' + $id + '"]') : __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-open="' + $id + '"]');
this.$anchors.attr({
'aria-controls': $id,
'data-is-focus': false,
'data-yeti-box': $id,
'aria-haspopup': true,
'aria-expanded': false

});

this._setCurrentAnchor(this.$anchors.first());

if (this.options.parentClass) {
this.$parent = this.$element.parents('.' + this.options.parentClass);
} else {
Expand All @@ -481,7 +482,7 @@ var Dropdown = function (_Positionable) {
'aria-hidden': 'true',
'data-yeti-box': $id,
'data-resize': $id,
'aria-labelledby': this.$anchor[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["GetYoDigits"])(6, 'dd-anchor')
'aria-labelledby': this.$currentAnchor.id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["GetYoDigits"])(6, 'dd-anchor')
});
_get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_init', this).call(this);
this._events();
Expand All @@ -501,7 +502,7 @@ var Dropdown = function (_Positionable) {
key: '_getDefaultAlignment',
value: function _getDefaultAlignment() {
// handle legacy float approach
var horizontalPosition = /float-(\S+)/.exec(this.$anchor[0].className);
var horizontalPosition = /float-(\S+)/.exec(this.$currentAnchor.className);
if (horizontalPosition) {
return horizontalPosition[1];
}
Expand All @@ -519,7 +520,21 @@ var Dropdown = function (_Positionable) {
}, {
key: '_setPosition',
value: function _setPosition() {
_get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_setPosition', this).call(this, this.$anchor, this.$element, this.$parent);
_get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_setPosition', this).call(this, this.$currentAnchor, this.$element, this.$parent);
}

/**
* Make it a current anchor.
* Current anchor as the reference for the position of Dropdown panes.
* @param {HTML} el - DOM element of the anchor.
* @function
* @private
*/

}, {
key: '_setCurrentAnchor',
value: function _setCurrentAnchor(el) {
this.$currentAnchor = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(el);
}

/**
Expand All @@ -539,21 +554,27 @@ var Dropdown = function (_Positionable) {
'resizeme.zf.trigger': this._setPosition.bind(this)
});

this.$anchors.off('click.zf.trigger').on('click.zf.trigger', function () {
_this._setCurrentAnchor(this);
});

if (this.options.hover) {
this.$anchor.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () {
this.$anchors.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () {
_this._setCurrentAnchor(this);

var bodyData = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('body').data();
if (typeof bodyData.whatinput === 'undefined' || bodyData.whatinput === 'mouse') {
clearTimeout(_this.timeout);
_this.timeout = setTimeout(function () {
_this.open();
_this.$anchor.data('hover', true);
_this.$anchors.data('hover', true);
}, _this.options.hoverDelay);
}
}).on('mouseleave.zf.dropdown', function () {
clearTimeout(_this.timeout);
_this.timeout = setTimeout(function () {
_this.close();
_this.$anchor.data('hover', false);
_this.$anchors.data('hover', false);
}, _this.options.hoverDelay);
});
if (this.options.hoverPane) {
Expand All @@ -563,27 +584,27 @@ var Dropdown = function (_Positionable) {
clearTimeout(_this.timeout);
_this.timeout = setTimeout(function () {
_this.close();
_this.$anchor.data('hover', false);
_this.$anchors.data('hover', false);
}, _this.options.hoverDelay);
});
}
}
this.$anchor.add(this.$element).on('keydown.zf.dropdown', function (e) {
this.$anchors.add(this.$element).on('keydown.zf.dropdown', function (e) {

var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
visibleFocusableElements = __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].findFocusable(_this.$element);

__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].handleKey(e, 'Dropdown', {
open: function () {
if ($target.is(_this.$anchor)) {
if ($target.is(_this.$anchors)) {
_this.open();
_this.$element.attr('tabindex', -1).focus();
e.preventDefault();
}
},
close: function () {
_this.close();
_this.$anchor.focus();
_this.$anchors.focus();
}
});
});
Expand All @@ -601,7 +622,7 @@ var Dropdown = function (_Positionable) {
var $body = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document.body).not(this.$element),
_this = this;
$body.off('click.zf.dropdown').on('click.zf.dropdown', function (e) {
if (_this.$anchor.is(e.target) || _this.$anchor.find(e.target).length) {
if (_this.$anchors.is(e.target) || _this.$anchors.find(e.target).length) {
return;
}
if (_this.$element.find(e.target).length) {
Expand All @@ -628,7 +649,7 @@ var Dropdown = function (_Positionable) {
* @event Dropdown#closeme
*/
this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));
this.$anchor.addClass('hover').attr({ 'aria-expanded': true });
this.$anchors.addClass('hover').attr({ 'aria-expanded': true });
// this.$element/*.show()*/;

this.$element.addClass('is-opening');
Expand Down Expand Up @@ -671,7 +692,7 @@ var Dropdown = function (_Positionable) {
}
this.$element.removeClass('is-open').attr({ 'aria-hidden': true });

this.$anchor.removeClass('hover').attr('aria-expanded', false);
this.$anchors.removeClass('hover').attr('aria-expanded', false);

/**
* Fires once the dropdown is no longer visible.
Expand All @@ -693,7 +714,7 @@ var Dropdown = function (_Positionable) {
key: 'toggle',
value: function toggle() {
if (this.$element.hasClass('is-open')) {
if (this.$anchor.data('hover')) return;
if (this.$anchors.data('hover')) return;
this.close();
} else {
this.open();
Expand All @@ -709,7 +730,7 @@ var Dropdown = function (_Positionable) {
key: '_destroy',
value: function _destroy() {
this.$element.off('.zf.trigger').hide();
this.$anchor.off('.zf.dropdown');
this.$anchors.off('.zf.dropdown');
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(document.body).off('click.zf.dropdown');
}
}]);
Expand Down Expand Up @@ -970,10 +991,9 @@ Triggers.Listeners.Global = {
_this.triggerHandler('close.zf.trigger', [_this]);
});
}
};

// Global, parses whole document.
Triggers.Initializers.addClosemeListener = function (pluginName) {
// Global, parses whole document.
};Triggers.Initializers.addClosemeListener = function (pluginName) {
var yetiBoxes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-yeti-box]'),
plugNames = ['dropdown', 'tooltip', 'reveal'];

Expand Down
Loading