123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("./foundation.accordion"), require("./foundation.core"), require("./foundation.tabs"), require("./foundation.util.mediaQuery"), require("jquery"));
- else if(typeof define === 'function' && define.amd)
- define(["./foundation.accordion", "./foundation.core", "./foundation.tabs", "./foundation.util.mediaQuery", "jquery"], factory);
- else if(typeof exports === 'object')
- exports["foundation.responsiveAccordionTabs"] = factory(require("./foundation.accordion"), require("./foundation.core"), require("./foundation.tabs"), require("./foundation.util.mediaQuery"), require("jquery"));
- else
- root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.responsiveAccordionTabs"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.accordion"], root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.tabs"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["jQuery"]);
- })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_accordion__, __WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_tabs__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
- return /******/ (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;
- /******/
- /******/ // define getter function for harmony exports
- /******/ __webpack_require__.d = function(exports, name, getter) {
- /******/ if(!__webpack_require__.o(exports, name)) {
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
- /******/ }
- /******/ };
- /******/
- /******/ // define __esModule on exports
- /******/ __webpack_require__.r = function(exports) {
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- /******/ }
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
- /******/ };
- /******/
- /******/ // create a fake namespace object
- /******/ // mode & 1: value is a module id, require it
- /******/ // mode & 2: merge all properties of value into the ns
- /******/ // mode & 4: return value when already ns object
- /******/ // mode & 8|1: behave like require
- /******/ __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;
- /******/ };
- /******/
- /******/ // 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 = 11);
- /******/ })
- /************************************************************************/
- /******/ ({
- /***/ "./foundation.accordion":
- /*!************************************************************************************************************************************************************************************!*\
- !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.accordion"],"amd":"./foundation.accordion","commonjs":"./foundation.accordion","commonjs2":"./foundation.accordion"} ***!
- \************************************************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_accordion__;
- /***/ }),
- /***/ "./foundation.core":
- /*!****************************************************************************************************************************************************************!*\
- !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
- \****************************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
- /***/ }),
- /***/ "./foundation.tabs":
- /*!****************************************************************************************************************************************************************!*\
- !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.tabs"],"amd":"./foundation.tabs","commonjs":"./foundation.tabs","commonjs2":"./foundation.tabs"} ***!
- \****************************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_tabs__;
- /***/ }),
- /***/ "./foundation.util.mediaQuery":
- /*!************************************************************************************************************************************************************************************************************!*\
- !*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***!
- \************************************************************************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;
- /***/ }),
- /***/ "./js/entries/plugins/foundation.responsiveAccordionTabs.js":
- /*!******************************************************************!*\
- !*** ./js/entries/plugins/foundation.responsiveAccordionTabs.js ***!
- \******************************************************************/
- /*! exports provided: Foundation, ResponsiveAccordionTabs */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
- /* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
- /* harmony import */ var _foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.responsiveAccordionTabs */ "./js/foundation.responsiveAccordionTabs.js");
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResponsiveAccordionTabs", function() { return _foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_1__["ResponsiveAccordionTabs"]; });
- _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_responsiveAccordionTabs__WEBPACK_IMPORTED_MODULE_1__["ResponsiveAccordionTabs"], 'ResponsiveAccordionTabs');
- /***/ }),
- /***/ "./js/foundation.responsiveAccordionTabs.js":
- /*!**************************************************!*\
- !*** ./js/foundation.responsiveAccordionTabs.js ***!
- \**************************************************/
- /*! exports provided: ResponsiveAccordionTabs */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsiveAccordionTabs", function() { return ResponsiveAccordionTabs; });
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./foundation.util.mediaQuery");
- /* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core");
- /* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var _foundation_accordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.accordion */ "./foundation.accordion");
- /* harmony import */ var _foundation_accordion__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_foundation_accordion__WEBPACK_IMPORTED_MODULE_3__);
- /* harmony import */ var _foundation_tabs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.tabs */ "./foundation.tabs");
- /* harmony import */ var _foundation_tabs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_foundation_tabs__WEBPACK_IMPORTED_MODULE_4__);
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
- // The plugin matches the plugin classes with these plugin instances.
- var MenuPlugins = {
- tabs: {
- cssClass: 'tabs',
- plugin: _foundation_tabs__WEBPACK_IMPORTED_MODULE_4__["Tabs"],
- open: function open(plugin, target) {
- return plugin.selectTab(target);
- },
- close: null
- /* not supported */
- ,
- toggle: null
- /* not supported */
- },
- accordion: {
- cssClass: 'accordion',
- plugin: _foundation_accordion__WEBPACK_IMPORTED_MODULE_3__["Accordion"],
- open: function open(plugin, target) {
- return plugin.down(jquery__WEBPACK_IMPORTED_MODULE_0___default()(target));
- },
- close: function close(plugin, target) {
- return plugin.up(jquery__WEBPACK_IMPORTED_MODULE_0___default()(target));
- },
- toggle: function toggle(plugin, target) {
- return plugin.toggle(jquery__WEBPACK_IMPORTED_MODULE_0___default()(target));
- }
- }
- };
- /**
- * ResponsiveAccordionTabs module.
- * @module foundation.responsiveAccordionTabs
- * @requires foundation.util.motion
- * @requires foundation.accordion
- * @requires foundation.tabs
- */
- var ResponsiveAccordionTabs =
- /*#__PURE__*/
- function (_Plugin) {
- _inherits(ResponsiveAccordionTabs, _Plugin);
- function ResponsiveAccordionTabs(element, options) {
- var _this2;
- _classCallCheck(this, ResponsiveAccordionTabs);
- _this2 = _possibleConstructorReturn(this, _getPrototypeOf(ResponsiveAccordionTabs).call(this, element, options));
- return _possibleConstructorReturn(_this2, _this2.options.reflow && _this2.storezfData || _assertThisInitialized(_this2));
- }
- /**
- * Creates a new instance of a responsive accordion tabs.
- * @class
- * @name ResponsiveAccordionTabs
- * @fires ResponsiveAccordionTabs#init
- * @param {jQuery} element - jQuery object to make into Responsive Accordion Tabs.
- * @param {Object} options - Overrides to the default plugin settings.
- */
- _createClass(ResponsiveAccordionTabs, [{
- key: "_setup",
- value: function _setup(element, options) {
- this.$element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element);
- this.$element.data('zfPluginBase', this);
- this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, ResponsiveAccordionTabs.defaults, this.$element.data(), options);
- this.rules = this.$element.data('responsive-accordion-tabs');
- this.currentMq = null;
- this.currentRule = null;
- this.currentPlugin = null;
- this.className = 'ResponsiveAccordionTabs'; // ie9 back compat
- if (!this.$element.attr('id')) {
- this.$element.attr('id', Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'responsiveaccordiontabs'));
- }
- this._init();
- this._events();
- }
- /**
- * Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element.
- * @function
- * @private
- */
- }, {
- key: "_init",
- value: function _init() {
- _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init(); // The first time an Interchange plugin is initialized, this.rules is converted from a string of "classes" to an object of rules
- if (typeof this.rules === 'string') {
- var rulesTree = {}; // Parse rules from "classes" pulled from data attribute
- var rules = this.rules.split(' '); // Iterate through every rule found
- for (var i = 0; i < rules.length; i++) {
- var rule = rules[i].split('-');
- var ruleSize = rule.length > 1 ? rule[0] : 'small';
- var rulePlugin = rule.length > 1 ? rule[1] : rule[0];
- if (MenuPlugins[rulePlugin] !== null) {
- rulesTree[ruleSize] = MenuPlugins[rulePlugin];
- }
- }
- this.rules = rulesTree;
- }
- this._getAllOptions();
- if (!jquery__WEBPACK_IMPORTED_MODULE_0___default.a.isEmptyObject(this.rules)) {
- this._checkMediaQueries();
- }
- }
- }, {
- key: "_getAllOptions",
- value: function _getAllOptions() {
- //get all defaults and options
- var _this = this;
- _this.allOptions = {};
- for (var key in MenuPlugins) {
- if (MenuPlugins.hasOwnProperty(key)) {
- var obj = MenuPlugins[key];
- try {
- var dummyPlugin = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<ul></ul>');
- var tmpPlugin = new obj.plugin(dummyPlugin, _this.options);
- for (var keyKey in tmpPlugin.options) {
- if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') {
- var objObj = tmpPlugin.options[keyKey];
- _this.allOptions[keyKey] = objObj;
- }
- }
- tmpPlugin.destroy();
- } catch (e) {}
- }
- }
- }
- /**
- * Initializes events for the Menu.
- * @function
- * @private
- */
- }, {
- key: "_events",
- value: function _events() {
- this._changedZfMediaQueryHandler = this._checkMediaQueries.bind(this);
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', this._changedZfMediaQueryHandler);
- }
- /**
- * Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.
- * @function
- * @private
- */
- }, {
- key: "_checkMediaQueries",
- value: function _checkMediaQueries() {
- var matchedMq,
- _this = this; // Iterate through each rule and find the last matching rule
- jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(this.rules, function (key) {
- if (_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(key)) {
- matchedMq = key;
- }
- }); // No match? No dice
- if (!matchedMq) return; // Plugin already initialized? We good
- if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return; // Remove existing plugin-specific CSS classes
- jquery__WEBPACK_IMPORTED_MODULE_0___default.a.each(MenuPlugins, function (key, value) {
- _this.$element.removeClass(value.cssClass);
- }); // Add the CSS class for the new plugin
- this.$element.addClass(this.rules[matchedMq].cssClass); // Create an instance of the new plugin
- if (this.currentPlugin) {
- //don't know why but on nested elements data zfPlugin get's lost
- if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin', this.storezfData);
- this.currentPlugin.destroy();
- }
- this._handleMarkup(this.rules[matchedMq].cssClass);
- this.currentRule = this.rules[matchedMq];
- this.currentPlugin = new this.currentRule.plugin(this.$element, this.options);
- this.storezfData = this.currentPlugin.$element.data('zfPlugin');
- }
- }, {
- key: "_handleMarkup",
- value: function _handleMarkup(toSet) {
- var _this = this,
- fromString = 'accordion';
- var $panels = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + this.$element.attr('id') + ']');
- if ($panels.length) fromString = 'tabs';
- if (fromString === toSet) {
- return;
- }
- var tabsTitle = _this.allOptions.linkClass ? _this.allOptions.linkClass : 'tabs-title';
- var tabsPanel = _this.allOptions.panelClass ? _this.allOptions.panelClass : 'tabs-panel';
- this.$element.removeAttr('role');
- var $liHeads = this.$element.children('.' + tabsTitle + ',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item');
- var $liHeadsA = $liHeads.children('a').removeClass('accordion-title');
- if (fromString === 'tabs') {
- $panels = $panels.children('.' + tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby');
- $panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected');
- } else {
- $panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');
- }
- $panels.css({
- display: '',
- visibility: ''
- });
- $liHeads.css({
- display: '',
- visibility: ''
- });
- if (toSet === 'accordion') {
- $panels.each(function (key, value) {
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content', '').removeClass('is-active').css({
- height: ''
- });
- jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + _this.$element.attr('id') + ']').after('<div id="tabs-placeholder-' + _this.$element.attr('id') + '"></div>').detach();
- $liHeads.addClass('accordion-item').attr('data-accordion-item', '');
- $liHeadsA.addClass('accordion-title');
- });
- } else if (toSet === 'tabs') {
- var $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-tabs-content=' + _this.$element.attr('id') + ']');
- var $placeholder = jquery__WEBPACK_IMPORTED_MODULE_0___default()('#tabs-placeholder-' + _this.$element.attr('id'));
- if ($placeholder.length) {
- $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div class="tabs-content"></div>').insertAfter($placeholder).attr('data-tabs-content', _this.$element.attr('id'));
- $placeholder.remove();
- } else {
- $tabsContent = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<div class="tabs-content"></div>').insertAfter(_this.$element).attr('data-tabs-content', _this.$element.attr('id'));
- }
- $panels.each(function (key, value) {
- var tempValue = jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).appendTo($tabsContent).addClass(tabsPanel);
- var hash = $liHeadsA.get(key).hash.slice(1);
- var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id') || Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__["GetYoDigits"])(6, 'accordion');
- if (hash !== id) {
- if (hash !== '') {
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id', hash);
- } else {
- hash = id;
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(value).attr('id', hash);
- jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeadsA.get(key)).attr('href', jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeadsA.get(key)).attr('href').replace('#', '') + '#' + hash);
- }
- }
- var isActive = jquery__WEBPACK_IMPORTED_MODULE_0___default()($liHeads.get(key)).hasClass('is-active');
- if (isActive) {
- tempValue.addClass('is-active');
- }
- });
- $liHeads.addClass(tabsTitle);
- }
- ;
- }
- /**
- * Opens the plugin pane defined by `target`.
- * @param {jQuery | String} target - jQuery object or string of the id of the pane to open.
- * @see Accordion.down
- * @see Tabs.selectTab
- * @function
- */
- }, {
- key: "open",
- value: function open(_target) {
- if (this.currentRule && typeof this.currentRule.open === 'function') {
- var _this$currentRule;
- return (_this$currentRule = this.currentRule).open.apply(_this$currentRule, [this.currentPlugin].concat(Array.prototype.slice.call(arguments)));
- }
- }
- /**
- * Closes the plugin pane defined by `target`. Not availaible for Tabs.
- * @param {jQuery | String} target - jQuery object or string of the id of the pane to close.
- * @see Accordion.up
- * @function
- */
- }, {
- key: "close",
- value: function close(_target) {
- if (this.currentRule && typeof this.currentRule.close === 'function') {
- var _this$currentRule2;
- return (_this$currentRule2 = this.currentRule).close.apply(_this$currentRule2, [this.currentPlugin].concat(Array.prototype.slice.call(arguments)));
- }
- }
- /**
- * Toggles the plugin pane defined by `target`. Not availaible for Tabs.
- * @param {jQuery | String} target - jQuery object or string of the id of the pane to toggle.
- * @see Accordion.toggle
- * @function
- */
- }, {
- key: "toggle",
- value: function toggle(_target) {
- if (this.currentRule && typeof this.currentRule.toggle === 'function') {
- var _this$currentRule3;
- return (_this$currentRule3 = this.currentRule).toggle.apply(_this$currentRule3, [this.currentPlugin].concat(Array.prototype.slice.call(arguments)));
- }
- }
- /**
- * Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.
- * @function
- */
- }, {
- key: "_destroy",
- value: function _destroy() {
- if (this.currentPlugin) this.currentPlugin.destroy();
- jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('changed.zf.mediaquery', this._changedZfMediaQueryHandler);
- }
- }]);
- return ResponsiveAccordionTabs;
- }(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__["Plugin"]);
- ResponsiveAccordionTabs.defaults = {};
- /***/ }),
- /***/ 11:
- /*!************************************************************************!*\
- !*** multi ./js/entries/plugins/foundation.responsiveAccordionTabs.js ***!
- \************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.responsiveAccordionTabs.js */"./js/entries/plugins/foundation.responsiveAccordionTabs.js");
- /***/ }),
- /***/ "jquery":
- /*!********************************************************************************************!*\
- !*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
- \********************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
- /***/ })
- /******/ });
- });
- //# sourceMappingURL=foundation.responsiveAccordionTabs.js.map
|