Subversion Repositories wimsdev

Rev

Rev 14197 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. (function webpackUniversalModuleDefinition(root, factory) {
  2.   if(typeof exports === 'object' && typeof module === 'object')
  3.     module.exports = factory(require("./foundation.core"), require("jquery"));
  4.   else if(typeof define === 'function' && define.amd)
  5.     define(["./foundation.core", "jquery"], factory);
  6.   else if(typeof exports === 'object')
  7.     exports["foundation.util.nest"] = factory(require("./foundation.core"), require("jquery"));
  8.   else
  9.     root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.nest"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]);
  10. })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
  11. return /******/ (function(modules) { // webpackBootstrap
  12. /******/   // The module cache
  13. /******/   var installedModules = {};
  14. /******/
  15. /******/   // The require function
  16. /******/   function __webpack_require__(moduleId) {
  17. /******/
  18. /******/     // Check if module is in cache
  19. /******/     if(installedModules[moduleId]) {
  20. /******/       return installedModules[moduleId].exports;
  21. /******/     }
  22. /******/     // Create a new module (and put it into the cache)
  23. /******/     var module = installedModules[moduleId] = {
  24. /******/       i: moduleId,
  25. /******/       l: false,
  26. /******/       exports: {}
  27. /******/     };
  28. /******/
  29. /******/     // Execute the module function
  30. /******/     modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  31. /******/
  32. /******/     // Flag the module as loaded
  33. /******/     module.l = true;
  34. /******/
  35. /******/     // Return the exports of the module
  36. /******/     return module.exports;
  37. /******/   }
  38. /******/
  39. /******/
  40. /******/   // expose the modules object (__webpack_modules__)
  41. /******/   __webpack_require__.m = modules;
  42. /******/
  43. /******/   // expose the module cache
  44. /******/   __webpack_require__.c = installedModules;
  45. /******/
  46. /******/   // define getter function for harmony exports
  47. /******/   __webpack_require__.d = function(exports, name, getter) {
  48. /******/     if(!__webpack_require__.o(exports, name)) {
  49. /******/       Object.defineProperty(exports, name, { enumerable: true, get: getter });
  50. /******/     }
  51. /******/   };
  52. /******/
  53. /******/   // define __esModule on exports
  54. /******/   __webpack_require__.r = function(exports) {
  55. /******/     if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  56. /******/       Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  57. /******/     }
  58. /******/     Object.defineProperty(exports, '__esModule', { value: true });
  59. /******/   };
  60. /******/
  61. /******/   // create a fake namespace object
  62. /******/   // mode & 1: value is a module id, require it
  63. /******/   // mode & 2: merge all properties of value into the ns
  64. /******/   // mode & 4: return value when already ns object
  65. /******/   // mode & 8|1: behave like require
  66. /******/   __webpack_require__.t = function(value, mode) {
  67. /******/     if(mode & 1) value = __webpack_require__(value);
  68. /******/     if(mode & 8) return value;
  69. /******/     if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  70. /******/     var ns = Object.create(null);
  71. /******/     __webpack_require__.r(ns);
  72. /******/     Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  73. /******/     if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  74. /******/     return ns;
  75. /******/   };
  76. /******/
  77. /******/   // getDefaultExport function for compatibility with non-harmony modules
  78. /******/   __webpack_require__.n = function(module) {
  79. /******/     var getter = module && module.__esModule ?
  80. /******/       function getDefault() { return module['default']; } :
  81. /******/       function getModuleExports() { return module; };
  82. /******/     __webpack_require__.d(getter, 'a', getter);
  83. /******/     return getter;
  84. /******/   };
  85. /******/
  86. /******/   // Object.prototype.hasOwnProperty.call
  87. /******/   __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  88. /******/
  89. /******/   // __webpack_public_path__
  90. /******/   __webpack_require__.p = "";
  91. /******/
  92. /******/
  93. /******/   // Load entry module and return exports
  94. /******/   return __webpack_require__(__webpack_require__.s = 26);
  95. /******/ })
  96. /************************************************************************/
  97. /******/ ({
  98.  
  99. /***/ "./foundation.core":
  100. /*!****************************************************************************************************************************************************************!*\
  101.   !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
  102.   \****************************************************************************************************************************************************************/
  103. /*! no static exports found */
  104. /***/ (function(module, exports) {
  105.  
  106. module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
  107.  
  108. /***/ }),
  109.  
  110. /***/ "./js/entries/plugins/foundation.util.nest.js":
  111. /*!****************************************************!*\
  112.   !*** ./js/entries/plugins/foundation.util.nest.js ***!
  113.   \****************************************************/
  114. /*! exports provided: Foundation, Nest */
  115. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  116.  
  117. "use strict";
  118. __webpack_require__.r(__webpack_exports__);
  119. /* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
  120. /* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
  121. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
  122.  
  123. /* harmony import */ var _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.nest */ "./js/foundation.util.nest.js");
  124. /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Nest", function() { return _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__["Nest"]; });
  125.  
  126.  
  127.  
  128. _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Nest = _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__["Nest"];
  129.  
  130.  
  131. /***/ }),
  132.  
  133. /***/ "./js/foundation.util.nest.js":
  134. /*!************************************!*\
  135.   !*** ./js/foundation.util.nest.js ***!
  136.   \************************************/
  137. /*! exports provided: Nest */
  138. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  139.  
  140. "use strict";
  141. __webpack_require__.r(__webpack_exports__);
  142. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nest", function() { return Nest; });
  143. /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
  144. /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
  145.  
  146.  
  147.  
  148. var Nest = {
  149.   Feather: function Feather(menu) {
  150.     var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zf';
  151.     menu.attr('role', 'menubar');
  152.     var items = menu.find('li').attr({
  153.       'role': 'menuitem'
  154.     }),
  155.         subMenuClass = "is-".concat(type, "-submenu"),
  156.         subItemClass = "".concat(subMenuClass, "-item"),
  157.         hasSubClass = "is-".concat(type, "-submenu-parent"),
  158.         applyAria = type !== 'accordion'; // Accordions handle their own ARIA attriutes.
  159.  
  160.     items.each(function () {
  161.       var $item = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this),
  162.           $sub = $item.children('ul');
  163.  
  164.       if ($sub.length) {
  165.         $item.addClass(hasSubClass);
  166.  
  167.         if (applyAria) {
  168.           $item.attr({
  169.             'aria-haspopup': true,
  170.             'aria-label': $item.children('a:first').text()
  171.           }); // Note:  Drilldowns behave differently in how they hide, and so need
  172.           // additional attributes.  We should look if this possibly over-generalized
  173.           // utility (Nest) is appropriate when we rework menus in 6.4
  174.  
  175.           if (type === 'drilldown') {
  176.             $item.attr({
  177.               'aria-expanded': false
  178.             });
  179.           }
  180.         }
  181.  
  182.         $sub.addClass("submenu ".concat(subMenuClass)).attr({
  183.           'data-submenu': '',
  184.           'role': 'menubar'
  185.         });
  186.  
  187.         if (type === 'drilldown') {
  188.           $sub.attr({
  189.             'aria-hidden': true
  190.           });
  191.         }
  192.       }
  193.  
  194.       if ($item.parent('[data-submenu]').length) {
  195.         $item.addClass("is-submenu-item ".concat(subItemClass));
  196.       }
  197.     });
  198.     return;
  199.   },
  200.   Burn: function Burn(menu, type) {
  201.     var //items = menu.find('li'),
  202.     subMenuClass = "is-".concat(type, "-submenu"),
  203.         subItemClass = "".concat(subMenuClass, "-item"),
  204.         hasSubClass = "is-".concat(type, "-submenu-parent");
  205.     menu.find('>li, > li > ul, .menu, .menu > li, [data-submenu] > li').removeClass("".concat(subMenuClass, " ").concat(subItemClass, " ").concat(hasSubClass, " is-submenu-item submenu is-active")).removeAttr('data-submenu').css('display', '');
  206.   }
  207. };
  208.  
  209.  
  210. /***/ }),
  211.  
  212. /***/ 26:
  213. /*!**********************************************************!*\
  214.   !*** multi ./js/entries/plugins/foundation.util.nest.js ***!
  215.   \**********************************************************/
  216. /*! no static exports found */
  217. /***/ (function(module, exports, __webpack_require__) {
  218.  
  219. module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/foundation-sites/js/entries/plugins/foundation.util.nest.js */"./js/entries/plugins/foundation.util.nest.js");
  220.  
  221.  
  222. /***/ }),
  223.  
  224. /***/ "jquery":
  225. /*!********************************************************************************************!*\
  226.   !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
  227.   \********************************************************************************************/
  228. /*! no static exports found */
  229. /***/ (function(module, exports) {
  230.  
  231. module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
  232.  
  233. /***/ })
  234.  
  235. /******/ });
  236. });
  237. //# sourceMappingURL=foundation.util.nest.js.map