/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 83); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, exports) { module.exports = jQuery; /***/ }), /***/ 1: /***/ (function(module, exports) { module.exports = {Foundation: window.Foundation}; /***/ }), /***/ 11: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Positionable; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_util_box___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_plugin__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_plugin__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var POSITIONS = ['left', 'right', 'top', 'bottom']; var VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center']; var HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center']; var ALIGNMENTS = { 'left': VERTICAL_ALIGNMENTS, 'right': VERTICAL_ALIGNMENTS, 'top': HORIZONTAL_ALIGNMENTS, 'bottom': HORIZONTAL_ALIGNMENTS }; function nextItem(item, array) { var currentIdx = array.indexOf(item); if (currentIdx === array.length - 1) { return array[0]; } else { return array[currentIdx + 1]; } } var Positionable = function (_Plugin) { _inherits(Positionable, _Plugin); function Positionable() { _classCallCheck(this, Positionable); return _possibleConstructorReturn(this, (Positionable.__proto__ || Object.getPrototypeOf(Positionable)).apply(this, arguments)); } _createClass(Positionable, [{ key: '_init', /** * Abstract class encapsulating the tether-like explicit positioning logic * including repositioning based on overlap. * Expects classes to define defaults for vOffset, hOffset, position, * alignment, allowOverlap, and allowBottomOverlap. They can do this by * extending the defaults, or (for now recommended due to the way docs are * generated) by explicitly declaring them. * **/ value: function _init() { this.triedPositions = {}; this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position; this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment; } }, { key: '_getDefaultPosition', value: function _getDefaultPosition() { return 'bottom'; } }, { key: '_getDefaultAlignment', value: function _getDefaultAlignment() { switch (this.position) { case 'bottom': case 'top': return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["rtl"])() ? 'right' : 'left'; case 'left': case 'right': return 'bottom'; } } /** * Adjusts the positionable possible positions by iterating through alignments * and positions. * @function * @private */ }, { key: '_reposition', value: function _reposition() { if (this._alignmentsExhausted(this.position)) { this.position = nextItem(this.position, POSITIONS); this.alignment = ALIGNMENTS[this.position][0]; } else { this._realign(); } } /** * Adjusts the dropdown pane possible positions by iterating through alignments * on the current position. * @function * @private */ }, { key: '_realign', value: function _realign() { this._addTriedPosition(this.position, this.alignment); this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position]); } }, { key: '_addTriedPosition', value: function _addTriedPosition(position, alignment) { this.triedPositions[position] = this.triedPositions[position] || []; this.triedPositions[position].push(alignment); } }, { key: '_positionsExhausted', value: function _positionsExhausted() { var isExhausted = true; for (var i = 0; i < POSITIONS.length; i++) { isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]); } return isExhausted; } }, { key: '_alignmentsExhausted', value: function _alignmentsExhausted(position) { return this.triedPositions[position] && this.triedPositions[position].length == ALIGNMENTS[position].length; } // When we're trying to center, we don't want to apply offset that's going to // take us just off center, so wrap around to return 0 for the appropriate // offset in those alignments. TODO: Figure out if we want to make this // configurable behavior... it feels more intuitive, especially for tooltips, but // it's possible someone might actually want to start from center and then nudge // slightly off. }, { key: '_getVOffset', value: function _getVOffset() { return this.options.vOffset; } }, { key: '_getHOffset', value: function _getHOffset() { return this.options.hOffset; } }, { key: '_setPosition', value: function _setPosition($anchor, $element, $parent) { if ($anchor.attr('aria-expanded') === 'false') { return false; } var $eleDims = __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetDimensions($element), $anchorDims = __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetDimensions($anchor); $element.offset(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); if (!this.options.allowOverlap) { var overlaps = {}; var minOverlap = 100000000; // default coordinates to how we start, in case we can't figure out better var minCoordinates = { position: this.position, alignment: this.alignment }; while (!this._positionsExhausted()) { var overlap = __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap); if (overlap === 0) { return; } if (overlap < minOverlap) { minOverlap = overlap; minCoordinates = { position: this.position, alignment: this.alignment }; } this._reposition(); $element.offset(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); } // If we get through the entire loop, there was no non-overlapping // position available. Pick the version with least overlap. this.position = minCoordinates.position; this.alignment = minCoordinates.alignment; $element.offset(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset())); } } }]); return Positionable; }(__WEBPACK_IMPORTED_MODULE_1__foundation_plugin__["Plugin"]); Positionable.defaults = { /** * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto. * @option * @type {string} * @default 'auto' */ position: 'auto', /** * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto. * @option * @type {string} * @default 'auto' */ alignment: 'auto', /** * Allow overlap of container/window. If false, dropdown positionable first * try to position as defined by data-position and data-alignment, but * reposition if it would cause an overflow. * @option * @type {boolean} * @default false */ allowOverlap: false, /** * Allow overlap of only the bottom of the container. This is the most common * behavior for dropdowns, allowing the dropdown to extend the bottom of the * screen but not otherwise influence or break out of the container. * @option * @type {boolean} * @default true */ allowBottomOverlap: true, /** * Number of pixels the positionable should be separated vertically from anchor * @option * @type {number} * @default 0 */ vOffset: 0, /** * Number of pixels the positionable should be separated horizontally from anchor * @option * @type {number} * @default 0 */ hOffset: 0 }; /***/ }), /***/ 17: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_dropdown__ = __webpack_require__(47); __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_dropdown__["a" /* Dropdown */], 'Dropdown'); /***/ }), /***/ 2: /***/ (function(module, exports) { module.exports = {Plugin: window.Foundation.Plugin}; /***/ }), /***/ 3: /***/ (function(module, exports) { module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend}; /***/ }), /***/ 4: /***/ (function(module, exports) { module.exports = {Motion: window.Foundation.Motion, Move: window.Foundation.Move}; /***/ }), /***/ 47: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Dropdown; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_positionable__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_util_triggers__ = __webpack_require__(7); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Dropdown module. * @module foundation.dropdown * @requires foundation.util.keyboard * @requires foundation.util.box * @requires foundation.util.triggers */ var Dropdown = function (_Positionable) { _inherits(Dropdown, _Positionable); function Dropdown() { _classCallCheck(this, Dropdown); return _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).apply(this, arguments)); } _createClass(Dropdown, [{ key: '_setup', /** * Creates a new instance of a dropdown. * @class * @name Dropdown * @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. */ value: function _setup(element, options) { this.$element = element; this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Dropdown.defaults, this.$element.data(), options); this.className = 'Dropdown'; // ie9 back compat // Triggers init is idempotent, just need to make sure it is initialized __WEBPACK_IMPORTED_MODULE_4__foundation_util_triggers__["a" /* Triggers */].init(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a); this._init(); __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('Dropdown', { 'ENTER': 'open', 'SPACE': 'open', 'ESCAPE': 'close' }); } /** * Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor. * @function * @private */ }, { key: '_init', 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({ 'aria-controls': $id, 'data-is-focus': false, 'data-yeti-box': $id, 'aria-haspopup': true, 'aria-expanded': false }); if (this.options.parentClass) { this.$parent = this.$element.parents('.' + this.options.parentClass); } else { this.$parent = null; } this.$element.attr({ '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') }); _get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_init', this).call(this); this._events(); } }, { key: '_getDefaultPosition', value: function _getDefaultPosition() { // handle legacy classnames var position = this.$element[0].className.match(/(top|left|right|bottom)/g); if (position) { return position[0]; } else { return 'bottom'; } } }, { key: '_getDefaultAlignment', value: function _getDefaultAlignment() { // handle legacy float approach var horizontalPosition = /float-(\S+)/.exec(this.$anchor[0].className); if (horizontalPosition) { return horizontalPosition[1]; } return _get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_getDefaultAlignment', this).call(this); } /** * Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true. * Recursively calls itself if a collision is detected, with a new position class. * @function * @private */ }, { key: '_setPosition', value: function _setPosition() { _get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_setPosition', this).call(this, this.$anchor, this.$element, this.$parent); } /** * Adds event listeners to the element utilizing the triggers utility library. * @function * @private */ }, { key: '_events', value: function _events() { var _this = this; this.$element.on({ 'open.zf.trigger': this.open.bind(this), 'close.zf.trigger': this.close.bind(this), 'toggle.zf.trigger': this.toggle.bind(this), 'resizeme.zf.trigger': this._setPosition.bind(this) }); if (this.options.hover) { this.$anchor.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () { 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.options.hoverDelay); } }).on('mouseleave.zf.dropdown', function () { clearTimeout(_this.timeout); _this.timeout = setTimeout(function () { _this.close(); _this.$anchor.data('hover', false); }, _this.options.hoverDelay); }); if (this.options.hoverPane) { this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () { clearTimeout(_this.timeout); }).on('mouseleave.zf.dropdown', function () { clearTimeout(_this.timeout); _this.timeout = setTimeout(function () { _this.close(); _this.$anchor.data('hover', false); }, _this.options.hoverDelay); }); } } this.$anchor.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)) { _this.open(); _this.$element.attr('tabindex', -1).focus(); e.preventDefault(); } }, close: function () { _this.close(); _this.$anchor.focus(); } }); }); } /** * Adds an event handler to the body to close any dropdowns on a click. * @function * @private */ }, { key: '_addBodyHandler', value: function _addBodyHandler() { 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) { return; } if (_this.$element.find(e.target).length) { return; } _this.close(); $body.off('click.zf.dropdown'); }); } /** * Opens the dropdown pane, and fires a bubbling event to close other dropdowns. * @function * @fires Dropdown#closeme * @fires Dropdown#show */ }, { key: 'open', value: function open() { // var _this = this; /** * Fires to close other open dropdowns, typically when dropdown is opening * @event Dropdown#closeme */ this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id')); this.$anchor.addClass('hover').attr({ 'aria-expanded': true }); // this.$element/*.show()*/; this.$element.addClass('is-opening'); this._setPosition(); this.$element.removeClass('is-opening').addClass('is-open').attr({ 'aria-hidden': false }); if (this.options.autoFocus) { var $focusable = __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].findFocusable(this.$element); if ($focusable.length) { $focusable.eq(0).focus(); } } if (this.options.closeOnClick) { this._addBodyHandler(); } if (this.options.trapFocus) { __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].trapFocus(this.$element); } /** * Fires once the dropdown is visible. * @event Dropdown#show */ this.$element.trigger('show.zf.dropdown', [this.$element]); } /** * Closes the open dropdown pane. * @function * @fires Dropdown#hide */ }, { key: 'close', value: function close() { if (!this.$element.hasClass('is-open')) { return false; } this.$element.removeClass('is-open').attr({ 'aria-hidden': true }); this.$anchor.removeClass('hover').attr('aria-expanded', false); /** * Fires once the dropdown is no longer visible. * @event Dropdown#hide */ this.$element.trigger('hide.zf.dropdown', [this.$element]); if (this.options.trapFocus) { __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].releaseFocus(this.$element); } } /** * Toggles the dropdown pane's visibility. * @function */ }, { key: 'toggle', value: function toggle() { if (this.$element.hasClass('is-open')) { if (this.$anchor.data('hover')) return; this.close(); } else { this.open(); } } /** * Destroys the dropdown. * @function */ }, { key: '_destroy', value: function _destroy() { this.$element.off('.zf.trigger').hide(); this.$anchor.off('.zf.dropdown'); __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document.body).off('click.zf.dropdown'); } }]); return Dropdown; }(__WEBPACK_IMPORTED_MODULE_3__foundation_positionable__["a" /* Positionable */]); Dropdown.defaults = { /** * Class that designates bounding container of Dropdown (default: window) * @option * @type {?string} * @default null */ parentClass: null, /** * Amount of time to delay opening a submenu on hover event. * @option * @type {number} * @default 250 */ hoverDelay: 250, /** * Allow submenus to open on hover events * @option * @type {boolean} * @default false */ hover: false, /** * Don't close dropdown when hovering over dropdown pane * @option * @type {boolean} * @default false */ hoverPane: false, /** * Number of pixels between the dropdown pane and the triggering element on open. * @option * @type {number} * @default 0 */ vOffset: 0, /** * Number of pixels between the dropdown pane and the triggering element on open. * @option * @type {number} * @default 0 */ hOffset: 0, /** * DEPRECATED: Class applied to adjust open position. * @option * @type {string} * @default '' */ positionClass: '', /** * Position of dropdown. Can be left, right, bottom, top, or auto. * @option * @type {string} * @default 'auto' */ position: 'auto', /** * Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto. * @option * @type {string} * @default 'auto' */ alignment: 'auto', /** * Allow overlap of container/window. If false, dropdown will first try to position as defined by data-position and data-alignment, but reposition if it would cause an overflow. * @option * @type {boolean} * @default false */ allowOverlap: false, /** * Allow overlap of only the bottom of the container. This is the most common * behavior for dropdowns, allowing the dropdown to extend the bottom of the * screen but not otherwise influence or break out of the container. * @option * @type {boolean} * @default true */ allowBottomOverlap: true, /** * Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands. * @option * @type {boolean} * @default false */ trapFocus: false, /** * Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening. * @option * @type {boolean} * @default false */ autoFocus: false, /** * Allows a click on the body to close the dropdown. * @option * @type {boolean} * @default false */ closeOnClick: false }; /***/ }), /***/ 5: /***/ (function(module, exports) { module.exports = {Keyboard: window.Foundation.Keyboard}; /***/ }), /***/ 7: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Triggers; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__); var MutationObserver = function () { var prefixes = ['WebKit', 'Moz', 'O', 'Ms', '']; for (var i = 0; i < prefixes.length; i++) { if (prefixes[i] + 'MutationObserver' in window) { return window[prefixes[i] + 'MutationObserver']; } } return false; }(); var triggers = function (el, type) { el.data(type).split(' ').forEach(function (id) { __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]); }); }; var Triggers = { Listeners: { Basic: {}, Global: {} }, Initializers: {} }; Triggers.Listeners.Basic = { openListener: function () { triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'open'); }, closeListener: function () { var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('close'); if (id) { triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'close'); } else { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('close.zf.trigger'); } }, toggleListener: function () { var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle'); if (id) { triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'toggle'); } else { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('toggle.zf.trigger'); } }, closeableListener: function (e) { e.stopPropagation(); var animation = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('closable'); if (animation !== '') { __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__["Motion"].animateOut(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), animation, function () { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('closed.zf'); }); } else { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).fadeOut().trigger('closed.zf'); } }, toggleFocusListener: function () { var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle-focus'); __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id).triggerHandler('toggle.zf.trigger', [__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this)]); } }; // Elements with [data-open] will reveal a plugin that supports it when clicked. Triggers.Initializers.addOpenListener = function ($elem) { $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener); $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener); }; // Elements with [data-close] will close a plugin that supports it when clicked. // If used without a value on [data-close], the event will bubble, allowing it to close a parent component. Triggers.Initializers.addCloseListener = function ($elem) { $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener); $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener); }; // Elements with [data-toggle] will toggle a plugin that supports it when clicked. Triggers.Initializers.addToggleListener = function ($elem) { $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener); $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener); }; // Elements with [data-closable] will respond to close.zf.trigger events. Triggers.Initializers.addCloseableListener = function ($elem) { $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener); $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener); }; // Elements with [data-toggle-focus] will respond to coming in and out of focus Triggers.Initializers.addToggleFocusListener = function ($elem) { $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener); $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener); }; // More Global/complex listeners and triggers Triggers.Listeners.Global = { resizeListener: function ($nodes) { if (!MutationObserver) { //fallback for IE 9 $nodes.each(function () { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('resizeme.zf.trigger'); }); } //trigger all listening elements and signal a resize event $nodes.attr('data-events', "resize"); }, scrollListener: function ($nodes) { if (!MutationObserver) { //fallback for IE 9 $nodes.each(function () { __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('scrollme.zf.trigger'); }); } //trigger all listening elements and signal a scroll event $nodes.attr('data-events', "scroll"); }, closeMeListener: function (e, pluginId) { var plugin = e.namespace.split('.')[0]; var plugins = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + plugin + ']').not('[data-yeti-box="' + pluginId + '"]'); plugins.each(function () { var _this = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this); _this.triggerHandler('close.zf.trigger', [_this]); }); } }; // Global, parses whole document. Triggers.Initializers.addClosemeListener = function (pluginName) { var yetiBoxes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-yeti-box]'), plugNames = ['dropdown', 'tooltip', 'reveal']; if (pluginName) { if (typeof pluginName === 'string') { plugNames.push(pluginName); } else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') { plugNames.concat(pluginName); } else { console.error('Plugin names must be strings'); } } if (yetiBoxes.length) { var listeners = plugNames.map(function (name) { return 'closeme.zf.' + name; }).join(' '); __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener); } }; function debounceGlobalListener(debounce, trigger, listener) { var timer = void 0, args = Array.prototype.slice.call(arguments, 3); __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(trigger).on(trigger, function (e) { if (timer) { clearTimeout(timer); } timer = setTimeout(function () { listener.apply(null, args); }, debounce || 10); //default time to emit scroll event }); } Triggers.Initializers.addResizeListener = function (debounce) { var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-resize]'); if ($nodes.length) { debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes); } }; Triggers.Initializers.addScrollListener = function (debounce) { var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-scroll]'); if ($nodes.length) { debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes); } }; Triggers.Initializers.addMutationEventsListener = function ($elem) { if (!MutationObserver) { return false; } var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]'); //element callback var listeningElementsMutation = function (mutationRecordsList) { var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(mutationRecordsList[0].target); //trigger the event handler for the element depending on type switch (mutationRecordsList[0].type) { case "attributes": if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") { $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]); } if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") { $target.triggerHandler('resizeme.zf.trigger', [$target]); } if (mutationRecordsList[0].attributeName === "style") { $target.closest("[data-mutate]").attr("data-events", "mutate"); $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); } break; case "childList": $target.closest("[data-mutate]").attr("data-events", "mutate"); $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]); break; default: return false; //nothing } }; if ($nodes.length) { //for each element that needs to listen for resizing, scrolling, or mutation add a single observer for (var i = 0; i <= $nodes.length - 1; i++) { var elementObserver = new MutationObserver(listeningElementsMutation); elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: ["data-events", "style"] }); } } }; Triggers.Initializers.addSimpleListeners = function () { var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document); Triggers.Initializers.addOpenListener($document); Triggers.Initializers.addCloseListener($document); Triggers.Initializers.addToggleListener($document); Triggers.Initializers.addCloseableListener($document); Triggers.Initializers.addToggleFocusListener($document); }; Triggers.Initializers.addGlobalListeners = function () { var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document); Triggers.Initializers.addMutationEventsListener($document); Triggers.Initializers.addResizeListener(); Triggers.Initializers.addScrollListener(); Triggers.Initializers.addClosemeListener(); }; Triggers.init = function ($, Foundation) { if (typeof $.triggersInitialized === 'undefined') { var $document = $(document); if (document.readyState === "complete") { Triggers.Initializers.addSimpleListeners(); Triggers.Initializers.addGlobalListeners(); } else { $(window).on('load', function () { Triggers.Initializers.addSimpleListeners(); Triggers.Initializers.addGlobalListeners(); }); } $.triggersInitialized = true; } if (Foundation) { Foundation.Triggers = Triggers; // Legacy included to be backwards compatible for now. Foundation.IHearYou = Triggers.Initializers.addGlobalListeners; } }; /***/ }), /***/ 8: /***/ (function(module, exports) { module.exports = {Box: window.Foundation.Box}; /***/ }), /***/ 83: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(17); /***/ }) /******/ });