1 line
54 KiB
Plaintext
1 line
54 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.mediaQuery\"],\"amd\":\"./foundation.util.mediaQuery\",\"commonjs\":\"./foundation.util.mediaQuery\",\"commonjs2\":\"./foundation.util.mediaQuery\"}","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.sticky.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.sticky.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","Sticky","element","options","$element","$","extend","defaults","data","className","Triggers","init","_init","MediaQuery","$parent","parent","id","GetYoDigits","_this","length","$container","wasWrapped","wrap","container","addClass","containerClass","stickyClass","attr","anchor","scrollCount","checkEvery","isStuck","onLoadListener","onLoad","window","containerHeight","css","getBoundingClientRect","height","elemHeight","$anchor","_parsePoints","_setSizes","scroll","pageYOffset","_calc","_removeSticky","topPoint","_events","split","reverse","join","top","topAnchor","btm","btmAnchor","document","documentElement","scrollHeight","pts","breaks","i","len","pt","place","offset","toLowerCase","points","scrollListener","isOn","canStick","off","on","e","el","_eventsHandler","_pauseListeners","trigger","checkSizes","bottomPoint","_setSticky","stickTo","mrgn","notStuckTo","removeClass","isTop","stickToTop","anchorPt","anchorHeight","topOrBottom","cb","is","stickyOn","newElemWidth","width","comp","getComputedStyle","pdngl","parseInt","pdngr","newContainerHeight","hasClass","_setBreakPoints","mTop","emCalc","marginTop","mBtm","marginBottom","winHeight","innerHeight","bottom","unwrap","Plugin","em","body","fontSize","MutationObserver","prefixes","triggers","type","forEach","Listeners","Basic","Global","Initializers","openListener","closeListener","toggleListener","closeableListener","stopPropagation","animation","Motion","animateOut","fadeOut","toggleFocusListener","triggerHandler","addOpenListener","$elem","addCloseListener","addToggleListener","addCloseableListener","addToggleFocusListener","resizeListener","$nodes","each","closeMeListener","pluginId","namespace","plugins","not","addClosemeListener","pluginName","yetiBoxes","plugNames","push","concat","console","error","listeners","map","name","debounceGlobalListener","debounce","listener","timer","args","Array","prototype","slice","call","arguments","clearTimeout","setTimeout","apply","addResizeListener","addScrollListener","addMutationEventsListener","find","listeningElementsMutation","mutationRecordsList","$target","target","attributeName","closest","elementObserver","observe","attributes","childList","characterData","subtree","attributeFilter","addSimpleListeners","$document","addGlobalListeners","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;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ACvCkC,uEAAM,CAAC5B,CAAC,CAAC6B,MAAD,CAAF,EAAY,YAAY;AAC5B,QAAI7B,CAAC,CAAC6L,mBAAF,KAA0B,IAA9B,EAAoC;AAClCxL,cAAQ,CAACkH,YAAT,CAAsBmE,kBAAtB;AACArL,cAAQ,CAACkH,YAAT,CAAsBqE,kBAAtB;AACA5L,OAAC,CAAC6L,mBAAF,GAAwB,IAAxB;AACD;AACF,GANK,CAAN;;AAQA,MAAGnM,UAAH,EAAe;AACbA,cAAU,CAACW,QAAX,GAAsBA,QAAtB,CADa,CAEb;;AACAX,cAAU,CAACoM,QAAX,GAAsBzL,QAAQ,CAACkH,YAAT,CAAsBqE,kBAA5C;AACD;AACF,CAdD;;;;;;;;;;;;;;;;;;;;;;;;;ACnPA,oD","file":"foundation.sticky.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"./foundation.core.plugin\"), require(\"./foundation.core.utils\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"./foundation.core.plugin\", \"./foundation.core.utils\", \"./foundation.util.mediaQuery\", \"./foundation.util.motion\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.sticky\"] = factory(require(\"./foundation.core\"), require(\"./foundation.core.plugin\"), require(\"./foundation.core.utils\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.sticky\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.motion\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_core_plugin__, __WEBPACK_EXTERNAL_MODULE__foundation_core_utils__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\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 = 17);\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_mediaQuery__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;","import { Foundation } from './foundation.core';\n\nimport { Sticky } from '../../foundation.sticky';\nFoundation.plugin(Sticky, 'Sticky');\n\nexport { Foundation, Sticky };\n","'use strict';\n\nimport $ from 'jquery';\nimport { onLoad, GetYoDigits } from './foundation.core.utils';\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Plugin } from './foundation.core.plugin';\nimport { Triggers } from './foundation.util.triggers';\n\n/**\n * Sticky module.\n * @module foundation.sticky\n * @requires foundation.util.triggers\n * @requires foundation.util.mediaQuery\n */\n\nclass Sticky extends Plugin {\n /**\n * Creates a new instance of a sticky thing.\n * @class\n * @name Sticky\n * @param {jQuery} element - jQuery object to make sticky.\n * @param {Object} options - options object passed when creating the element programmatically.\n */\n _setup(element, options) {\n this.$element = element;\n this.options = $.extend({}, Sticky.defaults, this.$element.data(), options);\n this.className = 'Sticky'; // 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\n /**\n * Initializes the sticky element by adding classes, getting/setting dimensions, breakpoints and attributes\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n\n var $parent = this.$element.parent('[data-sticky-container]'),\n id = this.$element[0].id || GetYoDigits(6, 'sticky'),\n _this = this;\n\n if($parent.length){\n this.$container = $parent;\n } else {\n this.wasWrapped = true;\n this.$element.wrap(this.options.container);\n this.$container = this.$element.parent();\n }\n this.$container.addClass(this.options.containerClass);\n\n this.$element.addClass(this.options.stickyClass).attr({ 'data-resize': id, 'data-mutate': id });\n if (this.options.anchor !== '') {\n $('#' + _this.options.anchor).attr({ 'data-mutate': id });\n }\n\n this.scrollCount = this.options.checkEvery;\n this.isStuck = false;\n this.onLoadListener = onLoad($(window), function () {\n //We calculate the container height to have correct values for anchor points offset calculation.\n _this.containerHeight = _this.$element.css(\"display\") == \"none\" ? 0 : _this.$element[0].getBoundingClientRect().height;\n _this.$container.css('height', _this.containerHeight);\n _this.elemHeight = _this.containerHeight;\n if (_this.options.anchor !== '') {\n _this.$anchor = $('#' + _this.options.anchor);\n } else {\n _this._parsePoints();\n }\n\n _this._setSizes(function () {\n var scroll = window.pageYOffset;\n _this._calc(false, scroll);\n //Unstick the element will ensure that proper classes are set.\n if (!_this.isStuck) {\n _this._removeSticky((scroll >= _this.topPoint) ? false : true);\n }\n });\n _this._events(id.split('-').reverse().join('-'));\n });\n }\n\n /**\n * If using multiple elements as anchors, calculates the top and bottom pixel values the sticky thing should stick and unstick on.\n * @function\n * @private\n */\n _parsePoints() {\n var top = this.options.topAnchor == \"\" ? 1 : this.options.topAnchor,\n btm = this.options.btmAnchor== \"\" ? document.documentElement.scrollHeight : this.options.btmAnchor,\n pts = [top, btm],\n breaks = {};\n for (var i = 0, len = pts.length; i < len && pts[i]; i++) {\n var pt;\n if (typeof pts[i] === 'number') {\n pt = pts[i];\n } else {\n var place = pts[i].split(':'),\n anchor = $(`#${place[0]}`);\n\n pt = anchor.offset().top;\n if (place[1] && place[1].toLowerCase() === 'bottom') {\n pt += anchor[0].getBoundingClientRect().height;\n }\n }\n breaks[i] = pt;\n }\n\n\n this.points = breaks;\n return;\n }\n\n /**\n * Adds event handlers for the scrolling element.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _events(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n if (this.isOn) { return; }\n if (this.canStick) {\n this.isOn = true;\n $(window).off(scrollListener)\n .on(scrollListener, function(e) {\n if (_this.scrollCount === 0) {\n _this.scrollCount = _this.options.checkEvery;\n _this._setSizes(function() {\n _this._calc(false, window.pageYOffset);\n });\n } else {\n _this.scrollCount--;\n _this._calc(false, window.pageYOffset);\n }\n });\n }\n\n this.$element.off('resizeme.zf.trigger')\n .on('resizeme.zf.trigger', function(e, el) {\n _this._eventsHandler(id);\n });\n\n this.$element.on('mutateme.zf.trigger', function (e, el) {\n _this._eventsHandler(id);\n });\n\n if(this.$anchor) {\n this.$anchor.on('mutateme.zf.trigger', function (e, el) {\n _this._eventsHandler(id);\n });\n }\n }\n\n /**\n * Handler for events.\n * @private\n * @param {String} id - pseudo-random id for unique scroll event listener.\n */\n _eventsHandler(id) {\n var _this = this,\n scrollListener = this.scrollListener = `scroll.zf.${id}`;\n\n _this._setSizes(function() {\n _this._calc(false);\n if (_this.canStick) {\n if (!_this.isOn) {\n _this._events(id);\n }\n } else if (_this.isOn) {\n _this._pauseListeners(scrollListener);\n }\n });\n }\n\n /**\n * Removes event handlers for scroll and change events on anchor.\n * @fires Sticky#pause\n * @param {String} scrollListener - unique, namespaced scroll listener attached to `window`\n */\n _pauseListeners(scrollListener) {\n this.isOn = false;\n $(window).off(scrollListener);\n\n /**\n * Fires when the plugin is paused due to resize event shrinking the view.\n * @event Sticky#pause\n * @private\n */\n this.$element.trigger('pause.zf.sticky');\n }\n\n /**\n * Called on every `scroll` event and on `_init`\n * fires functions based on booleans and cached values\n * @param {Boolean} checkSizes - true if plugin should recalculate sizes and breakpoints.\n * @param {Number} scroll - current scroll position passed from scroll event cb function. If not passed, defaults to `window.pageYOffset`.\n */\n _calc(checkSizes, scroll) {\n if (checkSizes) { this._setSizes(); }\n\n if (!this.canStick) {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n return false;\n }\n\n if (!scroll) { scroll = window.pageYOffset; }\n\n if (scroll >= this.topPoint) {\n if (scroll <= this.bottomPoint) {\n if (!this.isStuck) {\n this._setSticky();\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(false);\n }\n }\n } else {\n if (this.isStuck) {\n this._removeSticky(true);\n }\n }\n }\n\n /**\n * Causes the $element to become stuck.\n * Adds `position: fixed;`, and helper classes.\n * @fires Sticky#stuckto\n * @function\n * @private\n */\n _setSticky() {\n var _this = this,\n stickTo = this.options.stickTo,\n mrgn = stickTo === 'top' ? 'marginTop' : 'marginBottom',\n notStuckTo = stickTo === 'top' ? 'bottom' : 'top',\n css = {};\n\n css[mrgn] = `${this.options[mrgn]}em`;\n css[stickTo] = 0;\n css[notStuckTo] = 'auto';\n this.isStuck = true;\n this.$element.removeClass(`is-anchored is-at-${notStuckTo}`)\n .addClass(`is-stuck is-at-${stickTo}`)\n .css(css)\n /**\n * Fires when the $element has become `position: fixed;`\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.stuckto:top`\n * @event Sticky#stuckto\n */\n .trigger(`sticky.zf.stuckto:${stickTo}`);\n this.$element.on(\"transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd\", function() {\n _this._setSizes();\n });\n }\n\n /**\n * Causes the $element to become unstuck.\n * Removes `position: fixed;`, and helper classes.\n * Adds other helper classes.\n * @param {Boolean} isTop - tells the function if the $element should anchor to the top or bottom of its $anchor element.\n * @fires Sticky#unstuckfrom\n * @private\n */\n _removeSticky(isTop) {\n var stickTo = this.options.stickTo,\n stickToTop = stickTo === 'top',\n css = {},\n anchorPt = (this.points ? this.points[1] - this.points[0] : this.anchorHeight) - this.elemHeight,\n mrgn = stickToTop ? 'marginTop' : 'marginBottom',\n notStuckTo = stickToTop ? 'bottom' : 'top',\n topOrBottom = isTop ? 'top' : 'bottom';\n\n css[mrgn] = 0;\n\n css['bottom'] = 'auto';\n if(isTop) {\n css['top'] = 0;\n } else {\n css['top'] = anchorPt;\n }\n\n this.isStuck = false;\n this.$element.removeClass(`is-stuck is-at-${stickTo}`)\n .addClass(`is-anchored is-at-${topOrBottom}`)\n .css(css)\n /**\n * Fires when the $element has become anchored.\n * Namespaced to `top` or `bottom`, e.g. `sticky.zf.unstuckfrom:bottom`\n * @event Sticky#unstuckfrom\n */\n .trigger(`sticky.zf.unstuckfrom:${topOrBottom}`);\n }\n\n /**\n * Sets the $element and $container sizes for plugin.\n * Calls `_setBreakPoints`.\n * @param {Function} cb - optional callback function to fire on completion of `_setBreakPoints`.\n * @private\n */\n _setSizes(cb) {\n this.canStick = MediaQuery.is(this.options.stickyOn);\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n }\n var _this = this,\n newElemWidth = this.$container[0].getBoundingClientRect().width,\n comp = window.getComputedStyle(this.$container[0]),\n pdngl = parseInt(comp['padding-left'], 10),\n pdngr = parseInt(comp['padding-right'], 10);\n\n if (this.$anchor && this.$anchor.length) {\n this.anchorHeight = this.$anchor[0].getBoundingClientRect().height;\n } else {\n this._parsePoints();\n }\n\n this.$element.css({\n 'max-width': `${newElemWidth - pdngl - pdngr}px`\n });\n\n var newContainerHeight = this.$element[0].getBoundingClientRect().height || this.containerHeight;\n if (this.$element.css(\"display\") == \"none\") {\n newContainerHeight = 0;\n }\n this.containerHeight = newContainerHeight;\n this.$container.css({\n height: newContainerHeight\n });\n this.elemHeight = newContainerHeight;\n\n if (!this.isStuck) {\n if (this.$element.hasClass('is-at-bottom')) {\n var anchorPt = (this.points ? this.points[1] - this.$container.offset().top : this.anchorHeight) - this.elemHeight;\n this.$element.css('top', anchorPt);\n }\n }\n\n this._setBreakPoints(newContainerHeight, function() {\n if (cb && typeof cb === 'function') { cb(); }\n });\n }\n\n /**\n * Sets the upper and lower breakpoints for the element to become sticky/unsticky.\n * @param {Number} elemHeight - px value for sticky.$element height, calculated by `_setSizes`.\n * @param {Function} cb - optional callback function to be called on completion.\n * @private\n */\n _setBreakPoints(elemHeight, cb) {\n if (!this.canStick) {\n if (cb && typeof cb === 'function') { cb(); }\n else { return false; }\n }\n var mTop = emCalc(this.options.marginTop),\n mBtm = emCalc(this.options.marginBottom),\n topPoint = this.points ? this.points[0] : this.$anchor.offset().top,\n bottomPoint = this.points ? this.points[1] : topPoint + this.anchorHeight,\n // topPoint = this.$anchor.offset().top || this.points[0],\n // bottomPoint = topPoint + this.anchorHeight || this.points[1],\n winHeight = window.innerHeight;\n\n if (this.options.stickTo === 'top') {\n topPoint -= mTop;\n bottomPoint -= (elemHeight + mTop);\n } else if (this.options.stickTo === 'bottom') {\n topPoint -= (winHeight - (elemHeight + mBtm));\n bottomPoint -= (winHeight - mBtm);\n } else {\n //this would be the stickTo: both option... tricky\n }\n\n this.topPoint = topPoint;\n this.bottomPoint = bottomPoint;\n\n if (cb && typeof cb === 'function') { cb(); }\n }\n\n /**\n * Destroys the current sticky element.\n * Resets the element to the top position first.\n * Removes event listeners, JS-added css properties and classes, and unwraps the $element if the JS added the $container.\n * @function\n */\n _destroy() {\n this._removeSticky(true);\n\n this.$element.removeClass(`${this.options.stickyClass} is-anchored is-at-top`)\n .css({\n height: '',\n top: '',\n bottom: '',\n 'max-width': ''\n })\n .off('resizeme.zf.trigger')\n .off('mutateme.zf.trigger');\n if (this.$anchor && this.$anchor.length) {\n this.$anchor.off('change.zf.sticky');\n }\n if (this.scrollListener) $(window).off(this.scrollListener)\n if (this.onLoadListener) $(window).off(this.onLoadListener)\n\n if (this.wasWrapped) {\n this.$element.unwrap();\n } else {\n this.$container.removeClass(this.options.containerClass)\n .css({\n height: ''\n });\n }\n }\n}\n\nSticky.defaults = {\n /**\n * Customizable container template. Add your own classes for styling and sizing.\n * @option\n * @type {string}\n * @default '<div data-sticky-container></div>'\n */\n container: '<div data-sticky-container></div>',\n /**\n * Location in the view the element sticks to. Can be `'top'` or `'bottom'`.\n * @option\n * @type {string}\n * @default 'top'\n */\n stickTo: 'top',\n /**\n * If anchored to a single element, the id of that element.\n * @option\n * @type {string}\n * @default ''\n */\n anchor: '',\n /**\n * If using more than one element as anchor points, the id of the top anchor.\n * @option\n * @type {string}\n * @default ''\n */\n topAnchor: '',\n /**\n * If using more than one element as anchor points, the id of the bottom anchor.\n * @option\n * @type {string}\n * @default ''\n */\n btmAnchor: '',\n /**\n * Margin, in `em`'s to apply to the top of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginTop: 1,\n /**\n * Margin, in `em`'s to apply to the bottom of the element when it becomes sticky.\n * @option\n * @type {number}\n * @default 1\n */\n marginBottom: 1,\n /**\n * Breakpoint string that is the minimum screen size an element should become sticky.\n * @option\n * @type {string}\n * @default 'medium'\n */\n stickyOn: 'medium',\n /**\n * Class applied to sticky element, and removed on destruction. Foundation defaults to `sticky`.\n * @option\n * @type {string}\n * @default 'sticky'\n */\n stickyClass: 'sticky',\n /**\n * Class applied to sticky container. Foundation defaults to `sticky-container`.\n * @option\n * @type {string}\n * @default 'sticky-container'\n */\n containerClass: 'sticky-container',\n /**\n * Number of scroll events between the plugin's recalculating sticky points. Setting it to `0` will cause it to recalc every scroll event, setting it to `-1` will prevent recalc on scroll.\n * @option\n * @type {number}\n * @default -1\n */\n checkEvery: -1\n};\n\n/**\n * Helper function to calculate em values\n * @param Number {em} - number of em's to calculate into pixels\n */\nfunction emCalc(em) {\n return parseInt(window.getComputedStyle(document.body, null).fontSize, 10) * em;\n}\n\nexport {Sticky};\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":""} |