biofriction-wp-theme/node_modules/foundation-sites/dist/js/plugins/foundation.dropdown.js.map

1 line
58 KiB
Plaintext

{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core.plugin\",\"commonjs\":\"./foundation.core.plugin\",\"commonjs2\":\"./foundation.core.plugin\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core.utils\",\"commonjs\":\"./foundation.core.utils\",\"commonjs2\":\"./foundation.core.utils\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.box\"],\"amd\":\"./foundation.util.box\",\"commonjs\":\"./foundation.util.box\",\"commonjs2\":\"./foundation.util.box\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.keyboard\"],\"amd\":\"./foundation.util.keyboard\",\"commonjs\":\"./foundation.util.keyboard\",\"commonjs2\":\"./foundation.util.keyboard\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.motion\"],\"amd\":\"./foundation.util.motion\",\"commonjs\":\"./foundation.util.motion\",\"commonjs2\":\"./foundation.util.motion\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.dropdown.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.dropdown.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.positionable.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.util.triggers.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Foundation","plugin","Dropdown","element","options","$element","$","extend","defaults","data","className","Triggers","init","_init","Keyboard","register","$id","attr","$anchors","length","_setCurrentAnchor","first","parentClass","$parent","parents","$currentAnchor","GetYoDigits","_events","position","match","horizontalPosition","exec","removeClass","alignment","addClass","el","_this","on","open","bind","close","toggle","_setPosition","off","hover","bodyData","whatinput","clearTimeout","timeout","setTimeout","hoverDelay","ignoreMousedisappear","hoverPane","add","e","$target","visibleFocusableElements","findFocusable","handleKey","is","focus","preventDefault","$body","document","body","not","target","find","trigger","autoFocus","$focusable","eq","closeOnClick","_addBodyHandler","trapFocus","hasClass","releaseFocus","hide","Positionable","vOffset","hOffset","allowOverlap","allowBottomOverlap","POSITIONS","VERTICAL_ALIGNMENTS","HORIZONTAL_ALIGNMENTS","ALIGNMENTS","nextItem","item","array","currentIdx","indexOf","triedPositions","_getDefaultPosition","_getDefaultAlignment","originalPosition","originalAlignment","Rtl","_alignmentsExhausted","_realign","_addTriedPosition","push","isExhausted","i","$anchor","$eleDims","Box","GetDimensions","$anchorDims","offset","GetExplicitOffsets","_getVOffset","_getHOffset","overlaps","minOverlap","minCoordinates","_positionsExhausted","overlap","OverlapArea","_reposition","Plugin","MutationObserver","prefixes","window","triggers","type","split","forEach","id","Listeners","Basic","Global","Initializers","openListener","closeListener","toggleListener","closeableListener","stopPropagation","animation","Motion","animateOut","fadeOut","toggleFocusListener","triggerHandler","addOpenListener","$elem","addCloseListener","addToggleListener","addCloseableListener","addToggleFocusListener","resizeListener","$nodes","each","scrollListener","closeMeListener","pluginId","namespace","plugins","addClosemeListener","pluginName","yetiBoxes","plugNames","concat","console","error","listeners","map","name","join","debounceGlobalListener","debounce","listener","timer","args","Array","prototype","slice","call","arguments","apply","addResizeListener","addScrollListener","addMutationEventsListener","listeningElementsMutation","mutationRecordsList","attributeName","pageYOffset","closest","elementObserver","observe","attributes","childList","characterData","subtree","attributeFilter","addSimpleListeners","$document","addGlobalListeners","onLoad","triggersInitialized","IHearYou"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;AClFA,8D;;;;;;;;;;;ACAA,qE;;;;;;;;;;;ACAA,oE;;;;;;;;;;;ACAA,kE;;;;;;;;;;;ACAA,uE;;;;;;;;;;;ACAA,qE;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACAA,2DAAU,CAACC,MAAX,CAAkBC,6DAAlB,EAA4B,UAA5B;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;;;;;;;;;;;;;;;;;;;;;;;;AAEb;AACA;AACA;AACA;AAEA;AAGA;;;;;;;;IAOMA,Q;;;;;;;;;;;;;;AACJ;;;;;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yB;AACvCsM,uEAAM,CAAChM,CAAC,CAACqH,MAAD,CAAF,EAAY,YAAY;AAC5B,QAAIrH,CAAC,CAACiM,mBAAF,KAA0B,IAA9B,EAAoC;AAClC5L,cAAQ,CAACyH,YAAT,CAAsB+D,kBAAtB;AACAxL,cAAQ,CAACyH,YAAT,CAAsBiE,kBAAtB;AACA/L,OAAC,CAACiM,mBAAF,GAAwB,IAAxB;AACD;AACF,GANK,CAAN;;AAQA,MAAGvM,UAAH,EAAe;AACbA,cAAU,CAACW,QAAX,GAAsBA,QAAtB,CADa,CAEb;;AACAX,cAAU,CAACwM,QAAX,GAAsB7L,QAAQ,CAACyH,YAAT,CAAsBiE,kBAA5C;AACD;AACF,CAdD;;;;;;;;;;;;;;;;;;;;;;;;;ACnPA,oD","file":"foundation.dropdown.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core.utils\"), require(\"./foundation.core\"), require(\"jquery\"), require(\"./foundation.util.keyboard\"), require(\"./foundation.util.box\"), require(\"./foundation.core.plugin\"), require(\"./foundation.util.motion\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core.utils\", \"./foundation.core\", \"jquery\", \"./foundation.util.keyboard\", \"./foundation.util.box\", \"./foundation.core.plugin\", \"./foundation.util.motion\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.dropdown\"] = factory(require(\"./foundation.core.utils\"), require(\"./foundation.core\"), require(\"jquery\"), require(\"./foundation.util.keyboard\"), require(\"./foundation.util.box\"), require(\"./foundation.core.plugin\"), require(\"./foundation.util.motion\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.dropdown\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.keyboard\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.box\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.motion\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core_utils__, __WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE__foundation_util_box__, __WEBPACK_EXTERNAL_MODULE__foundation_core_plugin__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core_plugin__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_box__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;","import { Foundation } from './foundation.core';\n\nimport { Dropdown } from '../../foundation.dropdown';\nFoundation.plugin(Dropdown, 'Dropdown');\n\nexport { Foundation, Dropdown };\n","'use strict';\n\nimport $ from 'jquery';\nimport { Keyboard } from './foundation.util.keyboard';\nimport { GetYoDigits, ignoreMousedisappear } from './foundation.core.utils';\nimport { Positionable } from './foundation.positionable';\n\nimport { Triggers } from './foundation.util.triggers';\n\n\n/**\n * Dropdown module.\n * @module foundation.dropdown\n * @requires foundation.util.keyboard\n * @requires foundation.util.box\n * @requires foundation.util.triggers\n */\nclass Dropdown extends Positionable {\n /**\n * Creates a new instance of a dropdown.\n * @class\n * @name Dropdown\n * @param {jQuery} element - jQuery object to make into a dropdown.\n * Object should be of the dropdown panel, rather than its anchor.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Dropdown.defaults, this.$element.data(), options);\n this.className = 'Dropdown'; // ie9 back compat\n\n // Triggers init is idempotent, just need to make sure it is initialized\n Triggers.init($);\n\n this._init();\n\n Keyboard.register('Dropdown', {\n 'ENTER': 'toggle',\n 'SPACE': 'toggle',\n 'ESCAPE': 'close'\n });\n }\n\n /**\n * Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor.\n * @function\n * @private\n */\n _init() {\n var $id = this.$element.attr('id');\n\n this.$anchors = $(`[data-toggle=\"${$id}\"]`).length ? $(`[data-toggle=\"${$id}\"]`) : $(`[data-open=\"${$id}\"]`);\n this.$anchors.attr({\n 'aria-controls': $id,\n 'data-is-focus': false,\n 'data-yeti-box': $id,\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n\n this._setCurrentAnchor(this.$anchors.first());\n\n if(this.options.parentClass){\n this.$parent = this.$element.parents('.' + this.options.parentClass);\n }else{\n this.$parent = null;\n }\n\n // Set [aria-labelledby] on the Dropdown if it is not set\n if (typeof this.$element.attr('aria-labelledby') === 'undefined') {\n // Get the anchor ID or create one\n if (typeof this.$currentAnchor.attr('id') === 'undefined') {\n this.$currentAnchor.attr('id', GetYoDigits(6, 'dd-anchor'));\n };\n\n this.$element.attr('aria-labelledby', this.$currentAnchor.attr('id'));\n }\n\n this.$element.attr({\n 'aria-hidden': 'true',\n 'data-yeti-box': $id,\n 'data-resize': $id,\n });\n\n super._init();\n this._events();\n }\n\n _getDefaultPosition() {\n // handle legacy classnames\n var position = this.$element[0].className.match(/(top|left|right|bottom)/g);\n if(position) {\n return position[0];\n } else {\n return 'bottom'\n }\n }\n\n _getDefaultAlignment() {\n // handle legacy float approach\n var horizontalPosition = /float-(\\S+)/.exec(this.$currentAnchor.attr('class'));\n if(horizontalPosition) {\n return horizontalPosition[1];\n }\n\n return super._getDefaultAlignment();\n }\n\n\n\n /**\n * Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true.\n * Recursively calls itself if a collision is detected, with a new position class.\n * @function\n * @private\n */\n _setPosition() {\n this.$element.removeClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n super._setPosition(this.$currentAnchor, this.$element, this.$parent);\n this.$element.addClass(`has-position-${this.position} has-alignment-${this.alignment}`);\n }\n\n /**\n * Make it a current anchor.\n * Current anchor as the reference for the position of Dropdown panes.\n * @param {HTML} el - DOM element of the anchor.\n * @function\n * @private\n */\n _setCurrentAnchor(el) {\n this.$currentAnchor = $(el);\n }\n\n /**\n * Adds event listeners to the element utilizing the triggers utility library.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n this.$element.on({\n 'open.zf.trigger': this.open.bind(this),\n 'close.zf.trigger': this.close.bind(this),\n 'toggle.zf.trigger': this.toggle.bind(this),\n 'resizeme.zf.trigger': this._setPosition.bind(this)\n });\n\n this.$anchors.off('click.zf.trigger')\n .on('click.zf.trigger', function() { _this._setCurrentAnchor(this); });\n\n if(this.options.hover){\n this.$anchors.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n _this._setCurrentAnchor(this);\n\n var bodyData = $('body').data();\n if(typeof(bodyData.whatinput) === 'undefined' || bodyData.whatinput === 'mouse') {\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.open();\n _this.$anchors.data('hover', true);\n }, _this.options.hoverDelay);\n }\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n if(this.options.hoverPane){\n this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown')\n .on('mouseenter.zf.dropdown', function(){\n clearTimeout(_this.timeout);\n }).on('mouseleave.zf.dropdown', ignoreMousedisappear(function(){\n clearTimeout(_this.timeout);\n _this.timeout = setTimeout(function(){\n _this.close();\n _this.$anchors.data('hover', false);\n }, _this.options.hoverDelay);\n }));\n }\n }\n this.$anchors.add(this.$element).on('keydown.zf.dropdown', function(e) {\n\n var $target = $(this),\n visibleFocusableElements = Keyboard.findFocusable(_this.$element);\n\n Keyboard.handleKey(e, 'Dropdown', {\n open: function() {\n if ($target.is(_this.$anchors) && !$target.is('input, textarea')) {\n _this.open();\n _this.$element.attr('tabindex', -1).focus();\n e.preventDefault();\n }\n },\n close: function() {\n _this.close();\n _this.$anchors.focus();\n }\n });\n });\n }\n\n /**\n * Adds an event handler to the body to close any dropdowns on a click.\n * @function\n * @private\n */\n _addBodyHandler() {\n var $body = $(document.body).not(this.$element),\n _this = this;\n $body.off('click.zf.dropdown')\n .on('click.zf.dropdown', function(e){\n if(_this.$anchors.is(e.target) || _this.$anchors.find(e.target).length) {\n return;\n }\n if(_this.$element.is(e.target) || _this.$element.find(e.target).length) {\n return;\n }\n _this.close();\n $body.off('click.zf.dropdown');\n });\n }\n\n /**\n * Opens the dropdown pane, and fires a bubbling event to close other dropdowns.\n * @function\n * @fires Dropdown#closeme\n * @fires Dropdown#show\n */\n open() {\n // var _this = this;\n /**\n * Fires to close other open dropdowns, typically when dropdown is opening\n * @event Dropdown#closeme\n */\n this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));\n this.$anchors.addClass('hover')\n .attr({'aria-expanded': true});\n // this.$element/*.show()*/;\n\n this.$element.addClass('is-opening');\n this._setPosition();\n this.$element.removeClass('is-opening').addClass('is-open')\n .attr({'aria-hidden': false});\n\n if(this.options.autoFocus){\n var $focusable = Keyboard.findFocusable(this.$element);\n if($focusable.length){\n $focusable.eq(0).focus();\n }\n }\n\n if(this.options.closeOnClick){ this._addBodyHandler(); }\n\n if (this.options.trapFocus) {\n Keyboard.trapFocus(this.$element);\n }\n\n /**\n * Fires once the dropdown is visible.\n * @event Dropdown#show\n */\n this.$element.trigger('show.zf.dropdown', [this.$element]);\n }\n\n /**\n * Closes the open dropdown pane.\n * @function\n * @fires Dropdown#hide\n */\n close() {\n if(!this.$element.hasClass('is-open')){\n return false;\n }\n this.$element.removeClass('is-open')\n .attr({'aria-hidden': true});\n\n this.$anchors.removeClass('hover')\n .attr('aria-expanded', false);\n\n /**\n * Fires once the dropdown is no longer visible.\n * @event Dropdown#hide\n */\n this.$element.trigger('hide.zf.dropdown', [this.$element]);\n\n if (this.options.trapFocus) {\n Keyboard.releaseFocus(this.$element);\n }\n }\n\n /**\n * Toggles the dropdown pane's visibility.\n * @function\n */\n toggle() {\n if(this.$element.hasClass('is-open')){\n if(this.$anchors.data('hover')) return;\n this.close();\n }else{\n this.open();\n }\n }\n\n /**\n * Destroys the dropdown.\n * @function\n */\n _destroy() {\n this.$element.off('.zf.trigger').hide();\n this.$anchors.off('.zf.dropdown');\n $(document.body).off('click.zf.dropdown');\n\n }\n}\n\nDropdown.defaults = {\n /**\n * Class that designates bounding container of Dropdown (default: window)\n * @option\n * @type {?string}\n * @default null\n */\n parentClass: null,\n /**\n * Amount of time to delay opening a submenu on hover event.\n * @option\n * @type {number}\n * @default 250\n */\n hoverDelay: 250,\n /**\n * Allow submenus to open on hover events\n * @option\n * @type {boolean}\n * @default false\n */\n hover: false,\n /**\n * Don't close dropdown when hovering over dropdown pane\n * @option\n * @type {boolean}\n * @default false\n */\n hoverPane: false,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels between the dropdown pane and the triggering element on open.\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n /**\n * Position of dropdown. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * 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.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands.\n * @option\n * @type {boolean}\n * @default false\n */\n trapFocus: false,\n /**\n * Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening.\n * @option\n * @type {boolean}\n * @default false\n */\n autoFocus: false,\n /**\n * Allows a click on the body to close the dropdown.\n * @option\n * @type {boolean}\n * @default false\n */\n closeOnClick: false\n};\n\nexport {Dropdown};\n","'use strict';\n\nimport { Box } from './foundation.util.box';\nimport { Plugin } from './foundation.core.plugin';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst POSITIONS = ['left', 'right', 'top', 'bottom'];\nconst VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center'];\nconst HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center'];\n\nconst ALIGNMENTS = {\n 'left': VERTICAL_ALIGNMENTS,\n 'right': VERTICAL_ALIGNMENTS,\n 'top': HORIZONTAL_ALIGNMENTS,\n 'bottom': HORIZONTAL_ALIGNMENTS\n}\n\nfunction nextItem(item, array) {\n var currentIdx = array.indexOf(item);\n if(currentIdx === array.length - 1) {\n return array[0];\n } else {\n return array[currentIdx + 1];\n }\n}\n\n\nclass Positionable extends Plugin {\n /**\n * Abstract class encapsulating the tether-like explicit positioning logic\n * including repositioning based on overlap.\n * Expects classes to define defaults for vOffset, hOffset, position,\n * alignment, allowOverlap, and allowBottomOverlap. They can do this by\n * extending the defaults, or (for now recommended due to the way docs are\n * generated) by explicitly declaring them.\n *\n **/\n\n _init() {\n this.triedPositions = {};\n this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position;\n this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment;\n this.originalPosition = this.position;\n this.originalAlignment = this.alignment;\n }\n\n _getDefaultPosition () {\n return 'bottom';\n }\n\n _getDefaultAlignment() {\n switch(this.position) {\n case 'bottom':\n case 'top':\n return Rtl() ? 'right' : 'left';\n case 'left':\n case 'right':\n return 'bottom';\n }\n }\n\n /**\n * Adjusts the positionable possible positions by iterating through alignments\n * and positions.\n * @function\n * @private\n */\n _reposition() {\n if(this._alignmentsExhausted(this.position)) {\n this.position = nextItem(this.position, POSITIONS);\n this.alignment = ALIGNMENTS[this.position][0];\n } else {\n this._realign();\n }\n }\n\n /**\n * Adjusts the dropdown pane possible positions by iterating through alignments\n * on the current position.\n * @function\n * @private\n */\n _realign() {\n this._addTriedPosition(this.position, this.alignment)\n this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position])\n }\n\n _addTriedPosition(position, alignment) {\n this.triedPositions[position] = this.triedPositions[position] || []\n this.triedPositions[position].push(alignment);\n }\n\n _positionsExhausted() {\n var isExhausted = true;\n for(var i = 0; i < POSITIONS.length; i++) {\n isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]);\n }\n return isExhausted;\n }\n\n _alignmentsExhausted(position) {\n return this.triedPositions[position] && this.triedPositions[position].length == ALIGNMENTS[position].length;\n }\n\n\n // When we're trying to center, we don't want to apply offset that's going to\n // take us just off center, so wrap around to return 0 for the appropriate\n // offset in those alignments. TODO: Figure out if we want to make this\n // configurable behavior... it feels more intuitive, especially for tooltips, but\n // it's possible someone might actually want to start from center and then nudge\n // slightly off.\n _getVOffset() {\n return this.options.vOffset;\n }\n\n _getHOffset() {\n return this.options.hOffset;\n }\n\n\n _setPosition($anchor, $element, $parent) {\n if($anchor.attr('aria-expanded') === 'false'){ return false; }\n var $eleDims = Box.GetDimensions($element),\n $anchorDims = Box.GetDimensions($anchor);\n\n\n if (!this.options.allowOverlap) {\n // restore original position & alignment before checking overlap\n this.position = this.originalPosition;\n this.alignment = this.originalAlignment;\n }\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n\n if(!this.options.allowOverlap) {\n var overlaps = {};\n var minOverlap = 100000000;\n // default coordinates to how we start, in case we can't figure out better\n var minCoordinates = {position: this.position, alignment: this.alignment};\n while(!this._positionsExhausted()) {\n let overlap = Box.OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap);\n if(overlap === 0) {\n return;\n }\n\n if(overlap < minOverlap) {\n minOverlap = overlap;\n minCoordinates = {position: this.position, alignment: this.alignment};\n }\n\n this._reposition();\n\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n // If we get through the entire loop, there was no non-overlapping\n // position available. Pick the version with least overlap.\n this.position = minCoordinates.position;\n this.alignment = minCoordinates.alignment;\n $element.offset(Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));\n }\n }\n\n}\n\nPositionable.defaults = {\n /**\n * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n position: 'auto',\n /**\n * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto.\n * @option\n * @type {string}\n * @default 'auto'\n */\n alignment: 'auto',\n /**\n * Allow overlap of container/window. If false, dropdown positionable first\n * try to position as defined by data-position and data-alignment, but\n * reposition if it would cause an overflow.\n * @option\n * @type {boolean}\n * @default false\n */\n allowOverlap: false,\n /**\n * Allow overlap of only the bottom of the container. This is the most common\n * behavior for dropdowns, allowing the dropdown to extend the bottom of the\n * screen but not otherwise influence or break out of the container.\n * @option\n * @type {boolean}\n * @default true\n */\n allowBottomOverlap: true,\n /**\n * Number of pixels the positionable should be separated vertically from anchor\n * @option\n * @type {number}\n * @default 0\n */\n vOffset: 0,\n /**\n * Number of pixels the positionable should be separated horizontally from anchor\n * @option\n * @type {number}\n * @default 0\n */\n hOffset: 0,\n}\n\nexport {Positionable};\n","'use strict';\n\nimport $ from 'jquery';\nimport { onLoad } from './foundation.core.utils';\nimport { Motion } from './foundation.util.motion';\n\nconst MutationObserver = (function () {\n var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];\n for (var i=0; i < prefixes.length; i++) {\n if (`${prefixes[i]}MutationObserver` in window) {\n return window[`${prefixes[i]}MutationObserver`];\n }\n }\n return false;\n}());\n\nconst triggers = (el, type) => {\n el.data(type).split(' ').forEach(id => {\n $(`#${id}`)[ type === 'close' ? 'trigger' : 'triggerHandler'](`${type}.zf.trigger`, [el]);\n });\n};\n\nvar Triggers = {\n Listeners: {\n Basic: {},\n Global: {}\n },\n Initializers: {}\n}\n\nTriggers.Listeners.Basic = {\n openListener: function() {\n triggers($(this), 'open');\n },\n closeListener: function() {\n let id = $(this).data('close');\n if (id) {\n triggers($(this), 'close');\n }\n else {\n $(this).trigger('close.zf.trigger');\n }\n },\n toggleListener: function() {\n let id = $(this).data('toggle');\n if (id) {\n triggers($(this), 'toggle');\n } else {\n $(this).trigger('toggle.zf.trigger');\n }\n },\n closeableListener: function(e) {\n e.stopPropagation();\n let animation = $(this).data('closable');\n\n if(animation !== ''){\n Motion.animateOut($(this), animation, function() {\n $(this).trigger('closed.zf');\n });\n }else{\n $(this).fadeOut().trigger('closed.zf');\n }\n },\n toggleFocusListener: function() {\n let id = $(this).data('toggle-focus');\n $(`#${id}`).triggerHandler('toggle.zf.trigger', [$(this)]);\n }\n};\n\n// Elements with [data-open] will reveal a plugin that supports it when clicked.\nTriggers.Initializers.addOpenListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);\n $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);\n}\n\n// Elements with [data-close] will close a plugin that supports it when clicked.\n// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.\nTriggers.Initializers.addCloseListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);\n $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);\n}\n\n// Elements with [data-toggle] will toggle a plugin that supports it when clicked.\nTriggers.Initializers.addToggleListener = ($elem) => {\n $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);\n $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);\n}\n\n// Elements with [data-closable] will respond to close.zf.trigger events.\nTriggers.Initializers.addCloseableListener = ($elem) => {\n $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);\n $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);\n}\n\n// Elements with [data-toggle-focus] will respond to coming in and out of focus\nTriggers.Initializers.addToggleFocusListener = ($elem) => {\n $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);\n $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);\n}\n\n\n\n// More Global/complex listeners and triggers\nTriggers.Listeners.Global = {\n resizeListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('resizeme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a resize event\n $nodes.attr('data-events', \"resize\");\n },\n scrollListener: function($nodes) {\n if(!MutationObserver){//fallback for IE 9\n $nodes.each(function(){\n $(this).triggerHandler('scrollme.zf.trigger');\n });\n }\n //trigger all listening elements and signal a scroll event\n $nodes.attr('data-events', \"scroll\");\n },\n closeMeListener: function(e, pluginId){\n let plugin = e.namespace.split('.')[0];\n let plugins = $(`[data-${plugin}]`).not(`[data-yeti-box=\"${pluginId}\"]`);\n\n plugins.each(function(){\n let _this = $(this);\n _this.triggerHandler('close.zf.trigger', [_this]);\n });\n }\n}\n\n// Global, parses whole document.\nTriggers.Initializers.addClosemeListener = function(pluginName) {\n var yetiBoxes = $('[data-yeti-box]'),\n plugNames = ['dropdown', 'tooltip', 'reveal'];\n\n if(pluginName){\n if(typeof pluginName === 'string'){\n plugNames.push(pluginName);\n }else if(typeof pluginName === 'object' && typeof pluginName[0] === 'string'){\n plugNames.concat(pluginName);\n }else{\n console.error('Plugin names must be strings');\n }\n }\n if(yetiBoxes.length){\n let listeners = plugNames.map((name) => {\n return `closeme.zf.${name}`;\n }).join(' ');\n\n $(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);\n }\n}\n\nfunction debounceGlobalListener(debounce, trigger, listener) {\n let timer, args = Array.prototype.slice.call(arguments, 3);\n $(window).off(trigger).on(trigger, function(e) {\n if (timer) { clearTimeout(timer); }\n timer = setTimeout(function(){\n listener.apply(null, args);\n }, debounce || 10);//default time to emit scroll event\n });\n}\n\nTriggers.Initializers.addResizeListener = function(debounce){\n let $nodes = $('[data-resize]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);\n }\n}\n\nTriggers.Initializers.addScrollListener = function(debounce){\n let $nodes = $('[data-scroll]');\n if($nodes.length){\n debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);\n }\n}\n\nTriggers.Initializers.addMutationEventsListener = function($elem) {\n if(!MutationObserver){ return false; }\n let $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');\n\n //element callback\n var listeningElementsMutation = function (mutationRecordsList) {\n var $target = $(mutationRecordsList[0].target);\n\n //trigger the event handler for the element depending on type\n switch (mutationRecordsList[0].type) {\n case \"attributes\":\n if ($target.attr(\"data-events\") === \"scroll\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);\n }\n if ($target.attr(\"data-events\") === \"resize\" && mutationRecordsList[0].attributeName === \"data-events\") {\n $target.triggerHandler('resizeme.zf.trigger', [$target]);\n }\n if (mutationRecordsList[0].attributeName === \"style\") {\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n }\n break;\n\n case \"childList\":\n $target.closest(\"[data-mutate]\").attr(\"data-events\",\"mutate\");\n $target.closest(\"[data-mutate]\").triggerHandler('mutateme.zf.trigger', [$target.closest(\"[data-mutate]\")]);\n break;\n\n default:\n return false;\n //nothing\n }\n };\n\n if ($nodes.length) {\n //for each element that needs to listen for resizing, scrolling, or mutation add a single observer\n for (var i = 0; i <= $nodes.length - 1; i++) {\n var elementObserver = new MutationObserver(listeningElementsMutation);\n elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: [\"data-events\", \"style\"] });\n }\n }\n}\n\nTriggers.Initializers.addSimpleListeners = function() {\n let $document = $(document);\n\n Triggers.Initializers.addOpenListener($document);\n Triggers.Initializers.addCloseListener($document);\n Triggers.Initializers.addToggleListener($document);\n Triggers.Initializers.addCloseableListener($document);\n Triggers.Initializers.addToggleFocusListener($document);\n\n}\n\nTriggers.Initializers.addGlobalListeners = function() {\n let $document = $(document);\n Triggers.Initializers.addMutationEventsListener($document);\n Triggers.Initializers.addResizeListener();\n Triggers.Initializers.addScrollListener();\n Triggers.Initializers.addClosemeListener();\n}\n\n\nTriggers.init = function ($, Foundation) {\n onLoad($(window), function () {\n if ($.triggersInitialized !== true) {\n Triggers.Initializers.addSimpleListeners();\n Triggers.Initializers.addGlobalListeners();\n $.triggersInitialized = true;\n }\n });\n\n if(Foundation) {\n Foundation.Triggers = Triggers;\n // Legacy included to be backwards compatible for now.\n Foundation.IHearYou = Triggers.Initializers.addGlobalListeners\n }\n}\n\nexport {Triggers};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""}