123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("./foundation.core"), require("jquery"));
- else if(typeof define === 'function' && define.amd)
- define(["./foundation.core", "jquery"], factory);
- else if(typeof exports === 'object')
- exports["foundation.util.nest"] = factory(require("./foundation.core"), require("jquery"));
- else
- root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.nest"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]);
- })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
- return (function(modules) {
-
- var installedModules = {};
-
- function __webpack_require__(moduleId) {
-
- if(installedModules[moduleId]) {
- return installedModules[moduleId].exports;
- }
-
- var module = installedModules[moduleId] = {
- i: moduleId,
- l: false,
- exports: {}
- };
-
- modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
- module.l = true;
-
- return module.exports;
- }
-
- __webpack_require__.m = modules;
-
- __webpack_require__.c = installedModules;
-
- __webpack_require__.d = function(exports, name, getter) {
- if(!__webpack_require__.o(exports, name)) {
- Object.defineProperty(exports, name, { enumerable: true, get: getter });
- }
- };
-
- __webpack_require__.r = function(exports) {
- if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- }
- Object.defineProperty(exports, '__esModule', { value: true });
- };
-
-
-
-
-
- __webpack_require__.t = function(value, mode) {
- if(mode & 1) value = __webpack_require__(value);
- if(mode & 8) return value;
- if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- var ns = Object.create(null);
- __webpack_require__.r(ns);
- Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- return ns;
- };
-
- __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;
- };
-
- __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-
- __webpack_require__.p = "";
-
- return __webpack_require__(__webpack_require__.s = 26);
- })
- ({
- "./foundation.core":
- (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
- }),
- "./js/entries/plugins/foundation.util.nest.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./foundation.core");
- var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
- __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
- var _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.util.nest.js");
- __webpack_require__.d(__webpack_exports__, "Nest", function() { return _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__["Nest"]; });
- _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Nest = _foundation_util_nest__WEBPACK_IMPORTED_MODULE_1__["Nest"];
- }),
- "./js/foundation.util.nest.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- __webpack_require__.d(__webpack_exports__, "Nest", function() { return Nest; });
- var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
- var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
- var Nest = {
- Feather: function Feather(menu) {
- var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'zf';
- menu.attr('role', 'menubar');
- menu.find('a').attr({
- 'role': 'menuitem'
- });
- var items = menu.find('li').attr({
- 'role': 'none'
- }),
- subMenuClass = "is-".concat(type, "-submenu"),
- subItemClass = "".concat(subMenuClass, "-item"),
- hasSubClass = "is-".concat(type, "-submenu-parent"),
- applyAria = type !== 'accordion';
- items.each(function () {
- var $item = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this),
- $sub = $item.children('ul');
- if ($sub.length) {
- $item.addClass(hasSubClass);
- if (applyAria) {
- $item.attr({
- 'aria-haspopup': true,
- 'aria-label': $item.children('a:first').text()
- });
-
-
- if (type === 'drilldown') {
- $item.attr({
- 'aria-expanded': false
- });
- }
- }
- $sub.addClass("submenu ".concat(subMenuClass)).attr({
- 'data-submenu': '',
- 'role': 'menubar'
- });
- if (type === 'drilldown') {
- $sub.attr({
- 'aria-hidden': true
- });
- }
- }
- if ($item.parent('[data-submenu]').length) {
- $item.addClass("is-submenu-item ".concat(subItemClass));
- }
- });
- return;
- },
- Burn: function Burn(menu, type) {
- var
- subMenuClass = "is-".concat(type, "-submenu"),
- subItemClass = "".concat(subMenuClass, "-item"),
- hasSubClass = "is-".concat(type, "-submenu-parent");
- 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', '');
- }
- };
- }),
- 26:
- (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("./js/entries/plugins/foundation.util.nest.js");
- }),
- "jquery":
- (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
- })
- });
- });
|