foundation-rails 6.6.1.0 → 6.9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +2 -0
- data/Appraisals +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +199 -146
- data/bower.json +3 -3
- data/foundation-rails.gemspec +4 -4
- data/gemfiles/rails_7.1.gemfile +10 -0
- data/gemfiles/rails_7.1.gemfile.lock +261 -0
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/templates/_settings.scss +32 -28
- data/vendor/assets/js/foundation.cjs.js +2101 -3230
- data/vendor/assets/js/foundation.cjs.js.map +1 -1
- data/vendor/assets/js/foundation.es6.js +505 -379
- data/vendor/assets/js/foundation.es6.js.map +1 -1
- data/vendor/assets/js/foundation.esm.js +1779 -2911
- data/vendor/assets/js/foundation.esm.js.map +1 -1
- data/vendor/assets/js/foundation.js +2544 -3970
- data/vendor/assets/js/foundation.js.map +1 -1
- data/vendor/assets/js/foundation.min.js +1 -1
- data/vendor/assets/js/foundation.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.js +277 -367
- data/vendor/assets/js/plugins/foundation.abide.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.js +205 -277
- data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.js +174 -262
- data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.js +314 -457
- data/vendor/assets/js/plugins/foundation.core.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.js +259 -359
- data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.js +291 -462
- data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js +251 -349
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.js +178 -261
- data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.js +455 -240
- data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.js +226 -342
- data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.js +326 -471
- data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.js +244 -347
- data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +203 -288
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js +205 -255
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js +170 -226
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.js +285 -445
- data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.js +321 -486
- data/vendor/assets/js/plugins/foundation.slider.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.js +138 -188
- data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.js +253 -395
- data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.js +228 -317
- data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.js +207 -294
- data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.js +276 -437
- data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.js +176 -234
- data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js +110 -150
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.js +157 -172
- data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +167 -233
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.js +127 -161
- data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.js +126 -160
- data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.js +116 -171
- data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.js +172 -228
- data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.js +158 -222
- data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -1
- data/vendor/assets/scss/_global.scss +20 -7
- data/vendor/assets/scss/components/_accordion-menu.scss +2 -2
- data/vendor/assets/scss/components/_accordion.scss +2 -2
- data/vendor/assets/scss/components/_badge.scss +3 -3
- data/vendor/assets/scss/components/_breadcrumbs.scss +4 -3
- data/vendor/assets/scss/components/_button-group.scss +23 -13
- data/vendor/assets/scss/components/_button.scss +15 -15
- data/vendor/assets/scss/components/_callout.scss +4 -4
- data/vendor/assets/scss/components/_card.scss +2 -2
- data/vendor/assets/scss/components/_close-button.scss +7 -6
- data/vendor/assets/scss/components/_drilldown.scss +2 -2
- data/vendor/assets/scss/components/_dropdown-menu.scss +3 -3
- data/vendor/assets/scss/components/_dropdown.scss +2 -2
- data/vendor/assets/scss/components/_flex.scss +2 -2
- data/vendor/assets/scss/components/_float.scss +2 -2
- data/vendor/assets/scss/components/_label.scss +3 -3
- data/vendor/assets/scss/components/_media-object.scss +2 -2
- data/vendor/assets/scss/components/_menu.scss +56 -21
- data/vendor/assets/scss/components/_off-canvas.scss +20 -18
- data/vendor/assets/scss/components/_orbit.scss +5 -5
- data/vendor/assets/scss/components/_pagination.scss +3 -3
- data/vendor/assets/scss/components/_progress-bar.scss +3 -3
- data/vendor/assets/scss/components/_responsive-embed.scss +3 -3
- data/vendor/assets/scss/components/_reveal.scss +10 -5
- data/vendor/assets/scss/components/_slider.scss +7 -4
- data/vendor/assets/scss/components/_sticky.scss +2 -2
- data/vendor/assets/scss/components/_switch.scss +27 -4
- data/vendor/assets/scss/components/_table.scss +10 -9
- data/vendor/assets/scss/components/_tabs.scss +4 -4
- data/vendor/assets/scss/components/_thumbnail.scss +2 -2
- data/vendor/assets/scss/components/_title-bar.scss +2 -2
- data/vendor/assets/scss/components/_tooltip.scss +2 -2
- data/vendor/assets/scss/components/_top-bar.scss +9 -7
- data/vendor/assets/scss/components/_visibility.scss +48 -5
- data/vendor/assets/scss/forms/_checkbox.scss +2 -2
- data/vendor/assets/scss/forms/_error.scss +2 -2
- data/vendor/assets/scss/forms/_fieldset.scss +2 -2
- data/vendor/assets/scss/forms/_forms.scss +2 -2
- data/vendor/assets/scss/forms/_help-text.scss +2 -2
- data/vendor/assets/scss/forms/_input-group.scss +2 -2
- data/vendor/assets/scss/forms/_label.scss +4 -3
- data/vendor/assets/scss/forms/_meter.scss +2 -2
- data/vendor/assets/scss/forms/_progress.scss +3 -3
- data/vendor/assets/scss/forms/_range.scss +3 -3
- data/vendor/assets/scss/forms/_select.scss +7 -6
- data/vendor/assets/scss/forms/_text.scss +4 -4
- data/vendor/assets/scss/foundation.scss +3 -3
- data/vendor/assets/scss/grid/_classes.scss +3 -3
- data/vendor/assets/scss/grid/_column.scss +5 -4
- data/vendor/assets/scss/grid/_flex-grid.scss +9 -8
- data/vendor/assets/scss/grid/_grid.scss +2 -2
- data/vendor/assets/scss/grid/_gutter.scss +3 -3
- data/vendor/assets/scss/grid/_layout.scss +7 -7
- data/vendor/assets/scss/grid/_position.scss +6 -6
- data/vendor/assets/scss/grid/_row.scss +3 -3
- data/vendor/assets/scss/grid/_size.scss +2 -2
- data/vendor/assets/scss/motion-ui/util/_animation.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_series.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_unit.scss +54 -1
- data/vendor/assets/scss/prototype/_arrow.scss +2 -2
- data/vendor/assets/scss/prototype/_border-box.scss +2 -2
- data/vendor/assets/scss/prototype/_border-none.scss +3 -3
- data/vendor/assets/scss/prototype/_bordered.scss +2 -2
- data/vendor/assets/scss/prototype/_box.scss +2 -2
- data/vendor/assets/scss/prototype/_display.scss +2 -2
- data/vendor/assets/scss/prototype/_font-styling.scss +4 -4
- data/vendor/assets/scss/prototype/_list-style-type.scss +2 -2
- data/vendor/assets/scss/prototype/_overflow.scss +11 -2
- data/vendor/assets/scss/prototype/_position.scss +2 -2
- data/vendor/assets/scss/prototype/_prototype.scss +2 -2
- data/vendor/assets/scss/prototype/_rotate.scss +9 -7
- data/vendor/assets/scss/prototype/_rounded.scss +2 -2
- data/vendor/assets/scss/prototype/_separator.scss +7 -7
- data/vendor/assets/scss/prototype/_shadow.scss +3 -4
- data/vendor/assets/scss/prototype/_sizing.scss +2 -2
- data/vendor/assets/scss/prototype/_spacing.scss +35 -35
- data/vendor/assets/scss/prototype/_text-decoration.scss +2 -2
- data/vendor/assets/scss/prototype/_text-transformation.scss +5 -5
- data/vendor/assets/scss/prototype/_text-utilities.scss +2 -2
- data/vendor/assets/scss/settings/_settings.scss +32 -28
- data/vendor/assets/scss/typography/_alignment.scss +2 -2
- data/vendor/assets/scss/typography/_base.scss +8 -8
- data/vendor/assets/scss/typography/_helpers.scss +12 -4
- data/vendor/assets/scss/typography/_print.scss +4 -4
- data/vendor/assets/scss/typography/_typography.scss +2 -2
- data/vendor/assets/scss/util/_breakpoint.scss +24 -21
- data/vendor/assets/scss/util/_color.scss +22 -10
- data/vendor/assets/scss/util/_direction.scss +3 -3
- data/vendor/assets/scss/util/_flex.scss +1 -1
- data/vendor/assets/scss/util/_math.scss +63 -11
- data/vendor/assets/scss/util/_mixins.scss +20 -16
- data/vendor/assets/scss/util/_selector.scss +3 -17
- data/vendor/assets/scss/util/_typography.scss +8 -8
- data/vendor/assets/scss/util/_unit.scss +16 -10
- data/vendor/assets/scss/util/_util.scss +2 -2
- data/vendor/assets/scss/util/_value.scss +5 -20
- data/vendor/assets/scss/vendor/normalize.scss +19 -2
- data/vendor/assets/scss/xy-grid/_cell.scss +18 -7
- data/vendor/assets/scss/xy-grid/_classes.scss +16 -16
- data/vendor/assets/scss/xy-grid/_collapse.scss +2 -2
- data/vendor/assets/scss/xy-grid/_frame.scss +12 -0
- data/vendor/assets/scss/xy-grid/_grid.scss +4 -4
- data/vendor/assets/scss/xy-grid/_gutters.scss +4 -4
- data/vendor/assets/scss/xy-grid/_layout.scss +3 -3
- data/vendor/assets/scss/xy-grid/_position.scss +14 -9
- data/vendor/assets/scss/xy-grid/_xy-grid.scss +4 -4
- metadata +21 -19
@@ -4,194 +4,46 @@
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
5
5
|
define(["jquery"], factory);
|
6
6
|
else if(typeof exports === 'object')
|
7
|
-
exports["
|
7
|
+
exports["__FOUNDATION_EXTERNAL__"] = factory(require("jquery"));
|
8
8
|
else
|
9
9
|
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.core"] = factory(root["jQuery"]);
|
10
|
-
})(
|
11
|
-
return /******/ (function(
|
12
|
-
/******/
|
13
|
-
/******/ var
|
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 = 0);
|
95
|
-
/******/ })
|
96
|
-
/************************************************************************/
|
97
|
-
/******/ ({
|
98
|
-
|
99
|
-
/***/ "./js/entries/plugins/foundation.core.js":
|
100
|
-
/*!***********************************************!*\
|
101
|
-
!*** ./js/entries/plugins/foundation.core.js ***!
|
102
|
-
\***********************************************/
|
103
|
-
/*! exports provided: Foundation, Plugin, rtl, GetYoDigits, RegExpEscape, transitionend, onLoad, ignoreMousedisappear */
|
104
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
105
|
-
|
106
|
-
"use strict";
|
107
|
-
__webpack_require__.r(__webpack_exports__);
|
108
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
109
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
110
|
-
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.core */ "./js/foundation.core.js");
|
111
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]; });
|
112
|
-
|
113
|
-
/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../foundation.core.plugin */ "./js/foundation.core.plugin.js");
|
114
|
-
/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../foundation.core.utils */ "./js/foundation.core.utils.js");
|
115
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Plugin", function() { return _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]; });
|
116
|
-
|
117
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rtl", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"]; });
|
118
|
-
|
119
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GetYoDigits", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"]; });
|
120
|
-
|
121
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RegExpEscape", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"]; });
|
122
|
-
|
123
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transitionend", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"]; });
|
124
|
-
|
125
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"]; });
|
126
|
-
|
127
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreMousedisappear", function() { return _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["ignoreMousedisappear"]; });
|
128
|
-
|
129
|
-
// --- Foundation Core API ---
|
130
|
-
// Initialize Foundation and add some utilities to its public API for backward compatibility.
|
131
|
-
// Please note that every utility do not have to be added to the core API.
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].addToJquery(jquery__WEBPACK_IMPORTED_MODULE_0___default.a); // Every plugin depends on plugin now, we can include that on the core for the
|
137
|
-
// script inclusion path.
|
138
|
-
|
139
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].Plugin = _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__["Plugin"]; // These are now separated out, but historically were a part of this module,
|
140
|
-
// and since this is here for backwards compatibility we include them in
|
141
|
-
// this entry.
|
142
|
-
|
143
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].rtl = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["rtl"];
|
144
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].GetYoDigits = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["GetYoDigits"];
|
145
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].transitionend = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["transitionend"];
|
146
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].RegExpEscape = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["RegExpEscape"];
|
147
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"].onLoad = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__["onLoad"];
|
148
|
-
window.Foundation = _foundation_core__WEBPACK_IMPORTED_MODULE_1__["Foundation"]; // --- Foundation Core exports ---
|
149
|
-
// Export "Plugin" and all core utilities, since the `foundation.core` entry plays the role of
|
150
|
-
// all core source files.
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
/***/ }),
|
10
|
+
})(self, function(__WEBPACK_EXTERNAL_MODULE_jquery__) {
|
11
|
+
return /******/ (function() { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
157
14
|
|
158
15
|
/***/ "./js/foundation.core.js":
|
159
16
|
/*!*******************************!*\
|
160
17
|
!*** ./js/foundation.core.js ***!
|
161
18
|
\*******************************/
|
162
|
-
|
163
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
19
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
164
20
|
|
165
|
-
"use strict";
|
166
21
|
__webpack_require__.r(__webpack_exports__);
|
167
|
-
/* harmony export
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
23
|
+
/* harmony export */ Foundation: function() { return /* binding */ Foundation; }
|
24
|
+
/* harmony export */ });
|
168
25
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
169
26
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
170
27
|
/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./js/foundation.core.utils.js");
|
171
28
|
/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./js/foundation.util.mediaQuery.js");
|
172
|
-
|
173
|
-
|
174
|
-
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); }
|
29
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
175
30
|
|
176
31
|
|
177
32
|
|
33
|
+
var FOUNDATION_VERSION = '6.9.0';
|
178
34
|
|
179
|
-
|
35
|
+
// Global Foundation object
|
180
36
|
// This is attached to the window, or used as a module for AMD/Browserify
|
181
|
-
|
182
37
|
var Foundation = {
|
183
38
|
version: FOUNDATION_VERSION,
|
184
|
-
|
185
39
|
/**
|
186
40
|
* Stores initialized plugins.
|
187
41
|
*/
|
188
42
|
_plugins: {},
|
189
|
-
|
190
43
|
/**
|
191
44
|
* Stores generated unique ids for plugin instances
|
192
45
|
*/
|
193
46
|
_uuids: [],
|
194
|
-
|
195
47
|
/**
|
196
48
|
* Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing.
|
197
49
|
* @param {Object} plugin - The constructor of the plugin.
|
@@ -199,14 +51,14 @@ var Foundation = {
|
|
199
51
|
plugin: function plugin(_plugin, name) {
|
200
52
|
// Object key to use when adding to global Foundation object
|
201
53
|
// Examples: Foundation.Reveal, Foundation.OffCanvas
|
202
|
-
var className = name || functionName(_plugin);
|
54
|
+
var className = name || functionName(_plugin);
|
55
|
+
// Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin
|
203
56
|
// Examples: data-reveal, data-off-canvas
|
57
|
+
var attrName = hyphenate(className);
|
204
58
|
|
205
|
-
|
206
|
-
|
59
|
+
// Add to the Foundation object and the plugins list (for reflowing)
|
207
60
|
this._plugins[attrName] = this[className] = _plugin;
|
208
61
|
},
|
209
|
-
|
210
62
|
/**
|
211
63
|
* @function
|
212
64
|
* Populates the _uuids array with pointers to each individual plugin instance.
|
@@ -218,12 +70,10 @@ var Foundation = {
|
|
218
70
|
*/
|
219
71
|
registerPlugin: function registerPlugin(plugin, name) {
|
220
72
|
var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase();
|
221
|
-
plugin.uuid =
|
222
|
-
|
73
|
+
plugin.uuid = (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.GetYoDigits)(6, pluginName);
|
223
74
|
if (!plugin.$element.attr("data-".concat(pluginName))) {
|
224
75
|
plugin.$element.attr("data-".concat(pluginName), plugin.uuid);
|
225
76
|
}
|
226
|
-
|
227
77
|
if (!plugin.$element.data('zfPlugin')) {
|
228
78
|
plugin.$element.data('zfPlugin', plugin);
|
229
79
|
}
|
@@ -231,15 +81,10 @@ var Foundation = {
|
|
231
81
|
* Fires when the plugin has initialized.
|
232
82
|
* @event Plugin#init
|
233
83
|
*/
|
234
|
-
|
235
|
-
|
236
84
|
plugin.$element.trigger("init.zf.".concat(pluginName));
|
237
|
-
|
238
85
|
this._uuids.push(plugin.uuid);
|
239
|
-
|
240
86
|
return;
|
241
87
|
},
|
242
|
-
|
243
88
|
/**
|
244
89
|
* @function
|
245
90
|
* Removes the plugins uuid from the _uuids array.
|
@@ -250,23 +95,19 @@ var Foundation = {
|
|
250
95
|
*/
|
251
96
|
unregisterPlugin: function unregisterPlugin(plugin) {
|
252
97
|
var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor));
|
253
|
-
|
254
98
|
this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1);
|
255
|
-
|
256
99
|
plugin.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin')
|
257
100
|
/**
|
258
101
|
* Fires when the plugin has been destroyed.
|
259
102
|
* @event Plugin#destroyed
|
260
|
-
|
261
|
-
.trigger("destroyed.zf.".concat(pluginName));
|
262
|
-
|
103
|
+
*/.trigger("destroyed.zf.".concat(pluginName));
|
263
104
|
for (var prop in plugin) {
|
264
|
-
plugin[prop]
|
105
|
+
if (typeof plugin[prop] === 'function') {
|
106
|
+
plugin[prop] = null; //clean up script to prep for garbage collection.
|
107
|
+
}
|
265
108
|
}
|
266
|
-
|
267
109
|
return;
|
268
110
|
},
|
269
|
-
|
270
111
|
/**
|
271
112
|
* @function
|
272
113
|
* Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc.
|
@@ -274,8 +115,7 @@ var Foundation = {
|
|
274
115
|
* @default If no argument is passed, reflow all currently active plugins.
|
275
116
|
*/
|
276
117
|
reInit: function reInit(plugins) {
|
277
|
-
var isJQ = plugins instanceof jquery__WEBPACK_IMPORTED_MODULE_0___default
|
278
|
-
|
118
|
+
var isJQ = plugins instanceof (jquery__WEBPACK_IMPORTED_MODULE_0___default());
|
279
119
|
try {
|
280
120
|
if (isJQ) {
|
281
121
|
plugins.each(function () {
|
@@ -283,23 +123,22 @@ var Foundation = {
|
|
283
123
|
});
|
284
124
|
} else {
|
285
125
|
var type = _typeof(plugins),
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
126
|
+
_this = this,
|
127
|
+
fns = {
|
128
|
+
'object': function object(plgs) {
|
129
|
+
plgs.forEach(function (p) {
|
130
|
+
p = hyphenate(p);
|
131
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + p + ']').foundation('_init');
|
132
|
+
});
|
133
|
+
},
|
134
|
+
'string': function string() {
|
135
|
+
plugins = hyphenate(plugins);
|
136
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-' + plugins + ']').foundation('_init');
|
137
|
+
},
|
138
|
+
'undefined': function undefined() {
|
139
|
+
this.object(Object.keys(_this._plugins));
|
140
|
+
}
|
141
|
+
};
|
303
142
|
fns[type](plugins);
|
304
143
|
}
|
305
144
|
} catch (err) {
|
@@ -308,7 +147,6 @@ var Foundation = {
|
|
308
147
|
return plugins;
|
309
148
|
}
|
310
149
|
},
|
311
|
-
|
312
150
|
/**
|
313
151
|
* Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized.
|
314
152
|
* @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object.
|
@@ -318,37 +156,37 @@ var Foundation = {
|
|
318
156
|
// If plugins is undefined, just grab everything
|
319
157
|
if (typeof plugins === 'undefined') {
|
320
158
|
plugins = Object.keys(this._plugins);
|
321
|
-
}
|
159
|
+
}
|
160
|
+
// If plugins is a string, convert it to an array with one item
|
322
161
|
else if (typeof plugins === 'string') {
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
var _this = this; // Iterate through each plugin
|
327
|
-
|
162
|
+
plugins = [plugins];
|
163
|
+
}
|
164
|
+
var _this = this;
|
328
165
|
|
329
|
-
|
166
|
+
// Iterate through each plugin
|
167
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default().each(plugins, function (i, name) {
|
330
168
|
// Get the current plugin
|
331
|
-
var plugin = _this._plugins[name];
|
169
|
+
var plugin = _this._plugins[name];
|
332
170
|
|
171
|
+
// Localize the search to all elements inside elem, as well as elem itself, unless elem === document
|
333
172
|
var $elem = jquery__WEBPACK_IMPORTED_MODULE_0___default()(elem).find('[data-' + name + ']').addBack('[data-' + name + ']').filter(function () {
|
334
173
|
return typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data("zfPlugin") === 'undefined';
|
335
|
-
});
|
174
|
+
});
|
336
175
|
|
176
|
+
// For each plugin found, initialize it
|
337
177
|
$elem.each(function () {
|
338
178
|
var $el = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this),
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
179
|
+
opts = {
|
180
|
+
reflow: true
|
181
|
+
};
|
343
182
|
if ($el.attr('data-options')) {
|
344
|
-
|
345
|
-
var opt =
|
183
|
+
$el.attr('data-options').split(';').forEach(function (option) {
|
184
|
+
var opt = option.split(':').map(function (el) {
|
346
185
|
return el.trim();
|
347
186
|
});
|
348
187
|
if (opt[0]) opts[opt[0]] = parseValue(opt[1]);
|
349
188
|
});
|
350
189
|
}
|
351
|
-
|
352
190
|
try {
|
353
191
|
$el.data('zfPlugin', new plugin(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), opts));
|
354
192
|
} catch (er) {
|
@@ -360,31 +198,26 @@ var Foundation = {
|
|
360
198
|
});
|
361
199
|
},
|
362
200
|
getFnName: functionName,
|
363
|
-
addToJquery: function addToJquery(
|
201
|
+
addToJquery: function addToJquery() {
|
364
202
|
// TODO: consider not making this a jQuery function
|
365
203
|
// TODO: need way to reflow vs. re-initialize
|
366
|
-
|
367
204
|
/**
|
368
205
|
* The Foundation jQuery method.
|
369
206
|
* @param {String|Array} method - An action to perform on the current jQuery object.
|
370
207
|
*/
|
371
208
|
var foundation = function foundation(method) {
|
372
209
|
var type = _typeof(method),
|
373
|
-
|
374
|
-
|
210
|
+
$noJS = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.no-js');
|
375
211
|
if ($noJS.length) {
|
376
212
|
$noJS.removeClass('no-js');
|
377
213
|
}
|
378
|
-
|
379
214
|
if (type === 'undefined') {
|
380
215
|
//needs to initialize the Foundation object, or an individual plugin.
|
381
|
-
_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__
|
382
|
-
|
216
|
+
_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_2__.MediaQuery._init();
|
383
217
|
Foundation.reflow(this);
|
384
218
|
} else if (type === 'string') {
|
385
219
|
//an individual method to invoke on a plugin or group of plugins
|
386
220
|
var args = Array.prototype.slice.call(arguments, 1); //collect all the arguments, if necessary
|
387
|
-
|
388
221
|
var plugClass = this.data('zfPlugin'); //determine the class of plugin
|
389
222
|
|
390
223
|
if (typeof plugClass !== 'undefined' && typeof plugClass[method] !== 'undefined') {
|
@@ -395,7 +228,7 @@ var Foundation = {
|
|
395
228
|
} else {
|
396
229
|
this.each(function (i, el) {
|
397
230
|
//otherwise loop through the jQuery collection and invoke the method on each
|
398
|
-
plugClass[method].apply(
|
231
|
+
plugClass[method].apply(jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).data('zfPlugin'), args);
|
399
232
|
});
|
400
233
|
}
|
401
234
|
} else {
|
@@ -406,12 +239,10 @@ var Foundation = {
|
|
406
239
|
//error for invalid argument type
|
407
240
|
throw new TypeError("We're sorry, ".concat(type, " is not a valid parameter. You must use a string representing the method you wish to invoke."));
|
408
241
|
}
|
409
|
-
|
410
242
|
return this;
|
411
243
|
};
|
412
|
-
|
413
|
-
|
414
|
-
return $;
|
244
|
+
(jquery__WEBPACK_IMPORTED_MODULE_0___default().fn).foundation = foundation;
|
245
|
+
return (jquery__WEBPACK_IMPORTED_MODULE_0___default());
|
415
246
|
}
|
416
247
|
};
|
417
248
|
Foundation.util = {
|
@@ -426,8 +257,7 @@ Foundation.util = {
|
|
426
257
|
var timer = null;
|
427
258
|
return function () {
|
428
259
|
var context = this,
|
429
|
-
|
430
|
-
|
260
|
+
args = arguments;
|
431
261
|
if (timer === null) {
|
432
262
|
timer = setTimeout(function () {
|
433
263
|
func.apply(context, args);
|
@@ -437,23 +267,21 @@ Foundation.util = {
|
|
437
267
|
};
|
438
268
|
}
|
439
269
|
};
|
440
|
-
window.Foundation = Foundation;
|
270
|
+
window.Foundation = Foundation;
|
441
271
|
|
272
|
+
// Polyfill for requestAnimationFrame
|
442
273
|
(function () {
|
443
274
|
if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () {
|
444
275
|
return new Date().getTime();
|
445
276
|
};
|
446
277
|
var vendors = ['webkit', 'moz'];
|
447
|
-
|
448
278
|
for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
|
449
279
|
var vp = vendors[i];
|
450
280
|
window.requestAnimationFrame = window[vp + 'RequestAnimationFrame'];
|
451
281
|
window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame'];
|
452
282
|
}
|
453
|
-
|
454
283
|
if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
|
455
284
|
var lastTime = 0;
|
456
|
-
|
457
285
|
window.requestAnimationFrame = function (callback) {
|
458
286
|
var now = Date.now();
|
459
287
|
var nextTime = Math.max(lastTime + 16, now);
|
@@ -461,14 +289,11 @@ window.Foundation = Foundation; // Polyfill for requestAnimationFrame
|
|
461
289
|
callback(lastTime = nextTime);
|
462
290
|
}, nextTime - now);
|
463
291
|
};
|
464
|
-
|
465
292
|
window.cancelAnimationFrame = clearTimeout;
|
466
293
|
}
|
467
294
|
/**
|
468
295
|
* Polyfill for performance.now, required by rAF
|
469
296
|
*/
|
470
|
-
|
471
|
-
|
472
297
|
if (!window.performance || !window.performance.now) {
|
473
298
|
window.performance = {
|
474
299
|
start: Date.now(),
|
@@ -478,33 +303,29 @@ window.Foundation = Foundation; // Polyfill for requestAnimationFrame
|
|
478
303
|
};
|
479
304
|
}
|
480
305
|
})();
|
481
|
-
|
482
306
|
if (!Function.prototype.bind) {
|
307
|
+
/* eslint-disable no-extend-native */
|
483
308
|
Function.prototype.bind = function (oThis) {
|
484
309
|
if (typeof this !== 'function') {
|
485
310
|
// closest thing possible to the ECMAScript 5
|
486
311
|
// internal IsCallable function
|
487
312
|
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
|
488
313
|
}
|
489
|
-
|
490
314
|
var aArgs = Array.prototype.slice.call(arguments, 1),
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
315
|
+
fToBind = this,
|
316
|
+
fNOP = function fNOP() {},
|
317
|
+
fBound = function fBound() {
|
318
|
+
return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
|
319
|
+
};
|
497
320
|
if (this.prototype) {
|
498
321
|
// native functions don't have a prototype
|
499
322
|
fNOP.prototype = this.prototype;
|
500
323
|
}
|
501
|
-
|
502
324
|
fBound.prototype = new fNOP();
|
503
325
|
return fBound;
|
504
326
|
};
|
505
|
-
}
|
506
|
-
|
507
|
-
|
327
|
+
}
|
328
|
+
// Polyfill to get the name of a function in IE9
|
508
329
|
function functionName(fn) {
|
509
330
|
if (typeof Function.prototype.name === 'undefined') {
|
510
331
|
var funcNameRegex = /function\s([^(]{1,})\(/;
|
@@ -516,63 +337,50 @@ function functionName(fn) {
|
|
516
337
|
return fn.prototype.constructor.name;
|
517
338
|
}
|
518
339
|
}
|
519
|
-
|
520
340
|
function parseValue(str) {
|
521
341
|
if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str);
|
522
342
|
return str;
|
523
|
-
}
|
343
|
+
}
|
344
|
+
// Convert PascalCase to kebab-case
|
524
345
|
// Thank you: http://stackoverflow.com/a/8955580
|
525
|
-
|
526
|
-
|
527
346
|
function hyphenate(str) {
|
528
347
|
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
529
348
|
}
|
530
349
|
|
531
350
|
|
532
|
-
|
533
351
|
/***/ }),
|
534
352
|
|
535
353
|
/***/ "./js/foundation.core.plugin.js":
|
536
354
|
/*!**************************************!*\
|
537
355
|
!*** ./js/foundation.core.plugin.js ***!
|
538
356
|
\**************************************/
|
539
|
-
|
540
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
357
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
541
358
|
|
542
|
-
"use strict";
|
543
359
|
__webpack_require__.r(__webpack_exports__);
|
544
|
-
/* harmony export
|
545
|
-
/* harmony
|
546
|
-
/* harmony
|
547
|
-
/* harmony import */ var
|
548
|
-
|
549
|
-
|
550
|
-
function
|
551
|
-
|
552
|
-
function
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
// Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST
|
360
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
361
|
+
/* harmony export */ Plugin: function() { return /* binding */ Plugin; }
|
362
|
+
/* harmony export */ });
|
363
|
+
/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core.utils */ "./js/foundation.core.utils.js");
|
364
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
365
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
366
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
367
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
368
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
369
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
370
|
+
|
371
|
+
|
372
|
+
// Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST
|
558
373
|
// {function} _setup (replaces previous constructor),
|
559
374
|
// {function} _destroy (replaces previous destroy)
|
560
|
-
|
561
|
-
var Plugin =
|
562
|
-
/*#__PURE__*/
|
563
|
-
function () {
|
375
|
+
var Plugin = /*#__PURE__*/function () {
|
564
376
|
function Plugin(element, options) {
|
565
377
|
_classCallCheck(this, Plugin);
|
566
|
-
|
567
378
|
this._setup(element, options);
|
568
|
-
|
569
379
|
var pluginName = getPluginName(this);
|
570
|
-
this.uuid =
|
571
|
-
|
380
|
+
this.uuid = (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_0__.GetYoDigits)(6, pluginName);
|
572
381
|
if (!this.$element.attr("data-".concat(pluginName))) {
|
573
382
|
this.$element.attr("data-".concat(pluginName), this.uuid);
|
574
383
|
}
|
575
|
-
|
576
384
|
if (!this.$element.data('zfPlugin')) {
|
577
385
|
this.$element.data('zfPlugin', this);
|
578
386
|
}
|
@@ -580,79 +388,65 @@ function () {
|
|
580
388
|
* Fires when the plugin has initialized.
|
581
389
|
* @event Plugin#init
|
582
390
|
*/
|
583
|
-
|
584
|
-
|
585
391
|
this.$element.trigger("init.zf.".concat(pluginName));
|
586
392
|
}
|
587
|
-
|
588
|
-
_createClass(Plugin, [{
|
393
|
+
return _createClass(Plugin, [{
|
589
394
|
key: "destroy",
|
590
395
|
value: function destroy() {
|
591
396
|
this._destroy();
|
592
|
-
|
593
397
|
var pluginName = getPluginName(this);
|
594
398
|
this.$element.removeAttr("data-".concat(pluginName)).removeData('zfPlugin')
|
595
399
|
/**
|
596
400
|
* Fires when the plugin has been destroyed.
|
597
401
|
* @event Plugin#destroyed
|
598
|
-
|
599
|
-
.trigger("destroyed.zf.".concat(pluginName));
|
600
|
-
|
402
|
+
*/.trigger("destroyed.zf.".concat(pluginName));
|
601
403
|
for (var prop in this) {
|
602
|
-
this
|
404
|
+
if (this.hasOwnProperty(prop)) {
|
405
|
+
this[prop] = null; //clean up script to prep for garbage collection.
|
406
|
+
}
|
603
407
|
}
|
604
408
|
}
|
605
409
|
}]);
|
606
|
-
|
607
|
-
return Plugin;
|
608
410
|
}(); // Convert PascalCase to kebab-case
|
609
411
|
// Thank you: http://stackoverflow.com/a/8955580
|
610
|
-
|
611
|
-
|
612
412
|
function hyphenate(str) {
|
613
413
|
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
614
414
|
}
|
615
|
-
|
616
415
|
function getPluginName(obj) {
|
617
|
-
|
618
|
-
return hyphenate(obj.constructor.name);
|
619
|
-
} else {
|
620
|
-
return hyphenate(obj.className);
|
621
|
-
}
|
416
|
+
return hyphenate(obj.className);
|
622
417
|
}
|
623
418
|
|
624
419
|
|
625
|
-
|
626
420
|
/***/ }),
|
627
421
|
|
628
422
|
/***/ "./js/foundation.core.utils.js":
|
629
423
|
/*!*************************************!*\
|
630
424
|
!*** ./js/foundation.core.utils.js ***!
|
631
425
|
\*************************************/
|
632
|
-
|
633
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
426
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
634
427
|
|
635
|
-
"use strict";
|
636
428
|
__webpack_require__.r(__webpack_exports__);
|
637
|
-
/* harmony export
|
638
|
-
/* harmony export
|
639
|
-
/* harmony export
|
640
|
-
/* harmony export
|
641
|
-
/* harmony export
|
642
|
-
/* harmony export
|
429
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
430
|
+
/* harmony export */ GetYoDigits: function() { return /* binding */ GetYoDigits; },
|
431
|
+
/* harmony export */ RegExpEscape: function() { return /* binding */ RegExpEscape; },
|
432
|
+
/* harmony export */ ignoreMousedisappear: function() { return /* binding */ ignoreMousedisappear; },
|
433
|
+
/* harmony export */ onLoad: function() { return /* binding */ onLoad; },
|
434
|
+
/* harmony export */ rtl: function() { return /* binding */ rtl; },
|
435
|
+
/* harmony export */ transitionend: function() { return /* binding */ transitionend; }
|
436
|
+
/* harmony export */ });
|
643
437
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
644
438
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
645
439
|
|
646
440
|
|
647
|
-
|
441
|
+
// Core Foundation Utilities, utilized in a number of places.
|
648
442
|
|
649
443
|
/**
|
650
444
|
* Returns a boolean for RTL support
|
651
445
|
*/
|
652
|
-
|
653
446
|
function rtl() {
|
654
447
|
return jquery__WEBPACK_IMPORTED_MODULE_0___default()('html').attr('dir') === 'rtl';
|
655
448
|
}
|
449
|
+
|
656
450
|
/**
|
657
451
|
* returns a random base-36 uid with namespacing
|
658
452
|
* @function
|
@@ -661,21 +455,18 @@ function rtl() {
|
|
661
455
|
* @default {String} '' - if no plugin name is provided, nothing is appended to the uid.
|
662
456
|
* @returns {String} - unique id
|
663
457
|
*/
|
664
|
-
|
665
|
-
|
666
458
|
function GetYoDigits() {
|
667
459
|
var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6;
|
668
460
|
var namespace = arguments.length > 1 ? arguments[1] : undefined;
|
669
461
|
var str = '';
|
670
462
|
var chars = '0123456789abcdefghijklmnopqrstuvwxyz';
|
671
463
|
var charsLength = chars.length;
|
672
|
-
|
673
464
|
for (var i = 0; i < length; i++) {
|
674
465
|
str += chars[Math.floor(Math.random() * charsLength)];
|
675
466
|
}
|
676
|
-
|
677
467
|
return namespace ? "".concat(str, "-").concat(namespace) : str;
|
678
468
|
}
|
469
|
+
|
679
470
|
/**
|
680
471
|
* Escape a string so it can be used as a regexp pattern
|
681
472
|
* @function
|
@@ -684,12 +475,9 @@ function GetYoDigits() {
|
|
684
475
|
* @param {String} str - string to escape.
|
685
476
|
* @returns {String} - escaped string
|
686
477
|
*/
|
687
|
-
|
688
|
-
|
689
478
|
function RegExpEscape(str) {
|
690
479
|
return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
691
480
|
}
|
692
|
-
|
693
481
|
function transitionend($elem) {
|
694
482
|
var transitions = {
|
695
483
|
'transition': 'transitionend',
|
@@ -698,23 +486,22 @@ function transitionend($elem) {
|
|
698
486
|
'OTransition': 'otransitionend'
|
699
487
|
};
|
700
488
|
var elem = document.createElement('div'),
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
end = transitions[t];
|
489
|
+
end;
|
490
|
+
for (var transition in transitions) {
|
491
|
+
if (typeof elem.style[transition] !== 'undefined') {
|
492
|
+
end = transitions[transition];
|
706
493
|
}
|
707
494
|
}
|
708
|
-
|
709
495
|
if (end) {
|
710
496
|
return end;
|
711
497
|
} else {
|
712
|
-
|
498
|
+
setTimeout(function () {
|
713
499
|
$elem.triggerHandler('transitionend', [$elem]);
|
714
500
|
}, 1);
|
715
501
|
return 'transitionend';
|
716
502
|
}
|
717
503
|
}
|
504
|
+
|
718
505
|
/**
|
719
506
|
* Return an event type to listen for window load.
|
720
507
|
*
|
@@ -727,23 +514,19 @@ function transitionend($elem) {
|
|
727
514
|
* @param {Function} [] handler - function to attach to the event.
|
728
515
|
* @returns {String} - event type that should or will be triggered.
|
729
516
|
*/
|
730
|
-
|
731
|
-
|
732
517
|
function onLoad($elem, handler) {
|
733
518
|
var didLoad = document.readyState === 'complete';
|
734
519
|
var eventType = (didLoad ? '_didLoad' : 'load') + '.zf.util.onLoad';
|
735
|
-
|
736
520
|
var cb = function cb() {
|
737
521
|
return $elem.triggerHandler(eventType);
|
738
522
|
};
|
739
|
-
|
740
523
|
if ($elem) {
|
741
524
|
if (handler) $elem.one(eventType, handler);
|
742
525
|
if (didLoad) setTimeout(cb);else jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).one('load', cb);
|
743
526
|
}
|
744
|
-
|
745
527
|
return eventType;
|
746
528
|
}
|
529
|
+
|
747
530
|
/**
|
748
531
|
* Retuns an handler for the `mouseleave` that ignore disappeared mouses.
|
749
532
|
*
|
@@ -762,35 +545,32 @@ function onLoad($elem, handler) {
|
|
762
545
|
* - {Boolean} [false] ignoreReappear - also ignore when the mouse reappeared outside of the element it left.
|
763
546
|
* @returns {Function} - filtered handler to use to listen on the `mouseleave` event.
|
764
547
|
*/
|
765
|
-
|
766
|
-
|
767
548
|
function ignoreMousedisappear(handler) {
|
768
549
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
550
|
+
_ref$ignoreLeaveWindo = _ref.ignoreLeaveWindow,
|
551
|
+
ignoreLeaveWindow = _ref$ignoreLeaveWindo === void 0 ? false : _ref$ignoreLeaveWindo,
|
552
|
+
_ref$ignoreReappear = _ref.ignoreReappear,
|
553
|
+
ignoreReappear = _ref$ignoreReappear === void 0 ? false : _ref$ignoreReappear;
|
774
554
|
return function leaveEventHandler(eLeave) {
|
775
555
|
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
776
556
|
rest[_key - 1] = arguments[_key];
|
777
557
|
}
|
558
|
+
var callback = handler.bind.apply(handler, [this, eLeave].concat(rest));
|
778
559
|
|
779
|
-
|
780
|
-
|
560
|
+
// The mouse left: call the given callback if the mouse entered elsewhere
|
781
561
|
if (eLeave.relatedTarget !== null) {
|
782
562
|
return callback();
|
783
|
-
}
|
563
|
+
}
|
564
|
+
|
565
|
+
// Otherwise, check if the mouse actually left the window.
|
784
566
|
// In firefox if the user switched between windows, the window sill have the focus by the time
|
785
567
|
// the event is triggered. We have to debounce the event to test this case.
|
786
|
-
|
787
|
-
|
788
568
|
setTimeout(function leaveEventDebouncer() {
|
789
569
|
if (!ignoreLeaveWindow && document.hasFocus && !document.hasFocus()) {
|
790
570
|
return callback();
|
791
|
-
}
|
792
|
-
|
571
|
+
}
|
793
572
|
|
573
|
+
// Otherwise, wait for the mouse to reeapear outside of the element,
|
794
574
|
if (!ignoreReappear) {
|
795
575
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).one('mouseenter', function reenterEventHandler(eReenter) {
|
796
576
|
if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(eLeave.currentTarget).has(eReenter.target).length) {
|
@@ -805,81 +585,82 @@ function ignoreMousedisappear(handler) {
|
|
805
585
|
}
|
806
586
|
|
807
587
|
|
808
|
-
|
809
588
|
/***/ }),
|
810
589
|
|
811
590
|
/***/ "./js/foundation.util.mediaQuery.js":
|
812
591
|
/*!******************************************!*\
|
813
592
|
!*** ./js/foundation.util.mediaQuery.js ***!
|
814
593
|
\******************************************/
|
815
|
-
|
816
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
594
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
817
595
|
|
818
|
-
"use strict";
|
819
596
|
__webpack_require__.r(__webpack_exports__);
|
820
|
-
/* harmony export
|
597
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
598
|
+
/* harmony export */ MediaQuery: function() { return /* binding */ MediaQuery; }
|
599
|
+
/* harmony export */ });
|
821
600
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
822
601
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
823
|
-
|
824
|
-
|
825
|
-
function
|
826
|
-
|
827
|
-
function
|
828
|
-
|
829
|
-
function
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
602
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
603
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
604
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
605
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
606
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
607
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
608
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
609
|
+
|
610
|
+
|
611
|
+
// Default set of media queries
|
612
|
+
// const defaultQueries = {
|
613
|
+
// 'default' : 'only screen',
|
614
|
+
// landscape : 'only screen and (orientation: landscape)',
|
615
|
+
// portrait : 'only screen and (orientation: portrait)',
|
616
|
+
// retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
|
617
|
+
// 'only screen and (min--moz-device-pixel-ratio: 2),' +
|
618
|
+
// 'only screen and (-o-min-device-pixel-ratio: 2/1),' +
|
619
|
+
// 'only screen and (min-device-pixel-ratio: 2),' +
|
620
|
+
// 'only screen and (min-resolution: 192dpi),' +
|
621
|
+
// 'only screen and (min-resolution: 2dppx)'
|
622
|
+
// };
|
623
|
+
|
624
|
+
// matchMedia() polyfill - Test a CSS media type/query in JS.
|
843
625
|
// Authors & copyright © 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. MIT license
|
844
|
-
|
845
626
|
/* eslint-disable */
|
846
|
-
|
847
627
|
window.matchMedia || (window.matchMedia = function () {
|
848
|
-
"use strict";
|
628
|
+
"use strict";
|
849
629
|
|
850
|
-
|
630
|
+
// For browsers that support matchMedium api such as IE 9 and webkit
|
631
|
+
var styleMedia = window.styleMedia || window.media;
|
851
632
|
|
633
|
+
// For those that don't support matchMedium
|
852
634
|
if (!styleMedia) {
|
853
635
|
var style = document.createElement('style'),
|
854
|
-
|
855
|
-
|
636
|
+
script = document.getElementsByTagName('script')[0],
|
637
|
+
info = null;
|
856
638
|
style.type = 'text/css';
|
857
639
|
style.id = 'matchmediajs-test';
|
858
|
-
|
859
640
|
if (!script) {
|
860
641
|
document.head.appendChild(style);
|
861
642
|
} else {
|
862
643
|
script.parentNode.insertBefore(style, script);
|
863
|
-
}
|
864
|
-
|
644
|
+
}
|
865
645
|
|
646
|
+
// 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
|
866
647
|
info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle;
|
867
648
|
styleMedia = {
|
868
649
|
matchMedium: function matchMedium(media) {
|
869
|
-
var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
|
650
|
+
var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
|
870
651
|
|
652
|
+
// 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
|
871
653
|
if (style.styleSheet) {
|
872
654
|
style.styleSheet.cssText = text;
|
873
655
|
} else {
|
874
656
|
style.textContent = text;
|
875
|
-
}
|
876
|
-
|
657
|
+
}
|
877
658
|
|
659
|
+
// Test if media query is true or false
|
878
660
|
return info.width === '1px';
|
879
661
|
}
|
880
662
|
};
|
881
663
|
}
|
882
|
-
|
883
664
|
return function (media) {
|
884
665
|
return {
|
885
666
|
matches: styleMedia.matchMedium(media || 'all'),
|
@@ -892,7 +673,6 @@ window.matchMedia || (window.matchMedia = function () {
|
|
892
673
|
var MediaQuery = {
|
893
674
|
queries: [],
|
894
675
|
current: '',
|
895
|
-
|
896
676
|
/**
|
897
677
|
* Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.
|
898
678
|
* @function
|
@@ -901,18 +681,15 @@ var MediaQuery = {
|
|
901
681
|
_init: function _init() {
|
902
682
|
// make sure the initialization is only done once when calling _init() several times
|
903
683
|
if (this.isInitialized === true) {
|
904
|
-
return;
|
684
|
+
return this;
|
905
685
|
} else {
|
906
686
|
this.isInitialized = true;
|
907
687
|
}
|
908
|
-
|
909
688
|
var self = this;
|
910
689
|
var $meta = jquery__WEBPACK_IMPORTED_MODULE_0___default()('meta.foundation-mq');
|
911
|
-
|
912
690
|
if (!$meta.length) {
|
913
|
-
jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq">').appendTo(document.head);
|
691
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()('<meta class="foundation-mq" name="foundation-mq" content>').appendTo(document.head);
|
914
692
|
}
|
915
|
-
|
916
693
|
var extractedStyles = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.foundation-mq').css('font-family');
|
917
694
|
var namedQueries;
|
918
695
|
namedQueries = parseStyleToObject(extractedStyles);
|
@@ -926,12 +703,9 @@ var MediaQuery = {
|
|
926
703
|
});
|
927
704
|
}
|
928
705
|
}
|
929
|
-
|
930
706
|
this.current = this._getCurrentSize();
|
931
|
-
|
932
707
|
this._watcher();
|
933
708
|
},
|
934
|
-
|
935
709
|
/**
|
936
710
|
* Reinitializes the media query helper.
|
937
711
|
* Useful if your CSS breakpoint configuration has just been loaded or has changed since the initialization.
|
@@ -940,10 +714,8 @@ var MediaQuery = {
|
|
940
714
|
*/
|
941
715
|
_reInit: function _reInit() {
|
942
716
|
this.isInitialized = false;
|
943
|
-
|
944
717
|
this._init();
|
945
718
|
},
|
946
|
-
|
947
719
|
/**
|
948
720
|
* Checks if the screen is at least as wide as a breakpoint.
|
949
721
|
* @function
|
@@ -952,14 +724,11 @@ var MediaQuery = {
|
|
952
724
|
*/
|
953
725
|
atLeast: function atLeast(size) {
|
954
726
|
var query = this.get(size);
|
955
|
-
|
956
727
|
if (query) {
|
957
728
|
return window.matchMedia(query).matches;
|
958
729
|
}
|
959
|
-
|
960
730
|
return false;
|
961
731
|
},
|
962
|
-
|
963
732
|
/**
|
964
733
|
* Checks if the screen is within the given breakpoint.
|
965
734
|
* If smaller than the breakpoint of larger than its upper limit it returns false.
|
@@ -970,7 +739,6 @@ var MediaQuery = {
|
|
970
739
|
only: function only(size) {
|
971
740
|
return size === this._getCurrentSize();
|
972
741
|
},
|
973
|
-
|
974
742
|
/**
|
975
743
|
* Checks if the screen is within a breakpoint or smaller.
|
976
744
|
* @function
|
@@ -978,18 +746,18 @@ var MediaQuery = {
|
|
978
746
|
* @returns {Boolean} `true` if the breakpoint matches, `false` if it's larger.
|
979
747
|
*/
|
980
748
|
upTo: function upTo(size) {
|
981
|
-
var nextSize = this.next(size);
|
982
|
-
// the upper limit of this breakpoint.
|
749
|
+
var nextSize = this.next(size);
|
983
750
|
|
751
|
+
// If the next breakpoint does not match, the screen is smaller than
|
752
|
+
// the upper limit of this breakpoint.
|
984
753
|
if (nextSize) {
|
985
754
|
return !this.atLeast(nextSize);
|
986
|
-
}
|
987
|
-
// an upper limit and the screen will always be within it or smaller.
|
988
|
-
|
755
|
+
}
|
989
756
|
|
757
|
+
// If there is no next breakpoint, the "size" breakpoint does not have
|
758
|
+
// an upper limit and the screen will always be within it or smaller.
|
990
759
|
return true;
|
991
760
|
},
|
992
|
-
|
993
761
|
/**
|
994
762
|
* Checks if the screen matches to a breakpoint.
|
995
763
|
* @function
|
@@ -1000,30 +768,25 @@ var MediaQuery = {
|
|
1000
768
|
var parts = size.trim().split(' ').filter(function (p) {
|
1001
769
|
return !!p.length;
|
1002
770
|
});
|
1003
|
-
|
1004
771
|
var _parts = _slicedToArray(parts, 2),
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
772
|
+
bpSize = _parts[0],
|
773
|
+
_parts$ = _parts[1],
|
774
|
+
bpModifier = _parts$ === void 0 ? '' : _parts$;
|
1009
775
|
|
776
|
+
// Only the breakpont
|
1010
777
|
if (bpModifier === 'only') {
|
1011
778
|
return this.only(bpSize);
|
1012
|
-
}
|
1013
|
-
|
1014
|
-
|
779
|
+
}
|
780
|
+
// At least the breakpoint (included)
|
1015
781
|
if (!bpModifier || bpModifier === 'up') {
|
1016
782
|
return this.atLeast(bpSize);
|
1017
|
-
}
|
1018
|
-
|
1019
|
-
|
783
|
+
}
|
784
|
+
// Up to the breakpoint (included)
|
1020
785
|
if (bpModifier === 'down') {
|
1021
786
|
return this.upTo(bpSize);
|
1022
787
|
}
|
1023
|
-
|
1024
788
|
throw new Error("\n Invalid breakpoint passed to MediaQuery.is().\n Expected a breakpoint name formatted like \"<size> <modifier>\", got \"".concat(size, "\".\n "));
|
1025
789
|
},
|
1026
|
-
|
1027
790
|
/**
|
1028
791
|
* Gets the media query of a breakpoint.
|
1029
792
|
* @function
|
@@ -1037,10 +800,8 @@ var MediaQuery = {
|
|
1037
800
|
if (size === query.name) return query.value;
|
1038
801
|
}
|
1039
802
|
}
|
1040
|
-
|
1041
803
|
return null;
|
1042
804
|
},
|
1043
|
-
|
1044
805
|
/**
|
1045
806
|
* Get the breakpoint following the given breakpoint.
|
1046
807
|
* @function
|
@@ -1049,19 +810,15 @@ var MediaQuery = {
|
|
1049
810
|
*/
|
1050
811
|
next: function next(size) {
|
1051
812
|
var _this = this;
|
1052
|
-
|
1053
813
|
var queryIndex = this.queries.findIndex(function (q) {
|
1054
814
|
return _this._getQueryName(q) === size;
|
1055
815
|
});
|
1056
|
-
|
1057
816
|
if (queryIndex === -1) {
|
1058
817
|
throw new Error("\n Unknown breakpoint \"".concat(size, "\" passed to MediaQuery.next().\n Ensure it is present in your Sass \"$breakpoints\" setting.\n "));
|
1059
818
|
}
|
1060
|
-
|
1061
819
|
var nextQuery = this.queries[queryIndex + 1];
|
1062
820
|
return nextQuery ? nextQuery.name : null;
|
1063
821
|
},
|
1064
|
-
|
1065
822
|
/**
|
1066
823
|
* Returns the name of the breakpoint related to the given value.
|
1067
824
|
* @function
|
@@ -1074,7 +831,6 @@ var MediaQuery = {
|
|
1074
831
|
if (_typeof(value) === 'object') return value.name;
|
1075
832
|
throw new TypeError("\n Invalid value passed to MediaQuery._getQueryName().\n Expected a breakpoint name (String) or a breakpoint query (Object), got \"".concat(value, "\" (").concat(_typeof(value), ")\n "));
|
1076
833
|
},
|
1077
|
-
|
1078
834
|
/**
|
1079
835
|
* Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).
|
1080
836
|
* @function
|
@@ -1083,18 +839,14 @@ var MediaQuery = {
|
|
1083
839
|
*/
|
1084
840
|
_getCurrentSize: function _getCurrentSize() {
|
1085
841
|
var matched;
|
1086
|
-
|
1087
842
|
for (var i = 0; i < this.queries.length; i++) {
|
1088
843
|
var query = this.queries[i];
|
1089
|
-
|
1090
844
|
if (window.matchMedia(query.value).matches) {
|
1091
845
|
matched = query;
|
1092
846
|
}
|
1093
847
|
}
|
1094
|
-
|
1095
848
|
return matched && this._getQueryName(matched);
|
1096
849
|
},
|
1097
|
-
|
1098
850
|
/**
|
1099
851
|
* Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.
|
1100
852
|
* @function
|
@@ -1102,43 +854,40 @@ var MediaQuery = {
|
|
1102
854
|
*/
|
1103
855
|
_watcher: function _watcher() {
|
1104
856
|
var _this2 = this;
|
1105
|
-
|
1106
|
-
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () {
|
857
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('resize.zf.trigger', function () {
|
1107
858
|
var newSize = _this2._getCurrentSize(),
|
1108
|
-
|
1109
|
-
|
859
|
+
currentSize = _this2.current;
|
1110
860
|
if (newSize !== currentSize) {
|
1111
861
|
// Change the current media query
|
1112
|
-
_this2.current = newSize;
|
862
|
+
_this2.current = newSize;
|
1113
863
|
|
864
|
+
// Broadcast the media query change on the window
|
1114
865
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);
|
1115
866
|
}
|
1116
867
|
});
|
1117
868
|
}
|
1118
|
-
};
|
869
|
+
};
|
1119
870
|
|
871
|
+
// Thank you: https://github.com/sindresorhus/query-string
|
1120
872
|
function parseStyleToObject(str) {
|
1121
873
|
var styleObject = {};
|
1122
|
-
|
1123
874
|
if (typeof str !== 'string') {
|
1124
875
|
return styleObject;
|
1125
876
|
}
|
1126
|
-
|
1127
877
|
str = str.trim().slice(1, -1); // browsers re-quote string style values
|
1128
878
|
|
1129
879
|
if (!str) {
|
1130
880
|
return styleObject;
|
1131
881
|
}
|
1132
|
-
|
1133
882
|
styleObject = str.split('&').reduce(function (ret, param) {
|
1134
883
|
var parts = param.replace(/\+/g, ' ').split('=');
|
1135
884
|
var key = parts[0];
|
1136
885
|
var val = parts[1];
|
1137
|
-
key = decodeURIComponent(key);
|
1138
|
-
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
|
886
|
+
key = decodeURIComponent(key);
|
1139
887
|
|
888
|
+
// missing `=` should be `null`:
|
889
|
+
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
|
1140
890
|
val = typeof val === 'undefined' ? null : decodeURIComponent(val);
|
1141
|
-
|
1142
891
|
if (!ret.hasOwnProperty(key)) {
|
1143
892
|
ret[key] = val;
|
1144
893
|
} else if (Array.isArray(ret[key])) {
|
@@ -1146,39 +895,147 @@ function parseStyleToObject(str) {
|
|
1146
895
|
} else {
|
1147
896
|
ret[key] = [ret[key], val];
|
1148
897
|
}
|
1149
|
-
|
1150
898
|
return ret;
|
1151
899
|
}, {});
|
1152
900
|
return styleObject;
|
1153
901
|
}
|
1154
902
|
|
1155
903
|
|
1156
|
-
|
1157
|
-
/***/ }),
|
1158
|
-
|
1159
|
-
/***/ 0:
|
1160
|
-
/*!*****************************************************!*\
|
1161
|
-
!*** multi ./js/entries/plugins/foundation.core.js ***!
|
1162
|
-
\*****************************************************/
|
1163
|
-
/*! no static exports found */
|
1164
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1165
|
-
|
1166
|
-
module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/foundation-sites/js/entries/plugins/foundation.core.js */"./js/entries/plugins/foundation.core.js");
|
1167
|
-
|
1168
|
-
|
1169
904
|
/***/ }),
|
1170
905
|
|
1171
906
|
/***/ "jquery":
|
1172
907
|
/*!********************************************************************************************!*\
|
1173
908
|
!*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
|
1174
909
|
\********************************************************************************************/
|
1175
|
-
|
1176
|
-
/***/ (function(module, exports) {
|
910
|
+
/***/ (function(module) {
|
1177
911
|
|
1178
912
|
module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
1179
913
|
|
1180
914
|
/***/ })
|
1181
915
|
|
1182
|
-
/******/
|
916
|
+
/******/ });
|
917
|
+
/************************************************************************/
|
918
|
+
/******/ // The module cache
|
919
|
+
/******/ var __webpack_module_cache__ = {};
|
920
|
+
/******/
|
921
|
+
/******/ // The require function
|
922
|
+
/******/ function __webpack_require__(moduleId) {
|
923
|
+
/******/ // Check if module is in cache
|
924
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
925
|
+
/******/ if (cachedModule !== undefined) {
|
926
|
+
/******/ return cachedModule.exports;
|
927
|
+
/******/ }
|
928
|
+
/******/ // Create a new module (and put it into the cache)
|
929
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
930
|
+
/******/ // no module.id needed
|
931
|
+
/******/ // no module.loaded needed
|
932
|
+
/******/ exports: {}
|
933
|
+
/******/ };
|
934
|
+
/******/
|
935
|
+
/******/ // Execute the module function
|
936
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
937
|
+
/******/
|
938
|
+
/******/ // Return the exports of the module
|
939
|
+
/******/ return module.exports;
|
940
|
+
/******/ }
|
941
|
+
/******/
|
942
|
+
/************************************************************************/
|
943
|
+
/******/ /* webpack/runtime/compat get default export */
|
944
|
+
/******/ !function() {
|
945
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
946
|
+
/******/ __webpack_require__.n = function(module) {
|
947
|
+
/******/ var getter = module && module.__esModule ?
|
948
|
+
/******/ function() { return module['default']; } :
|
949
|
+
/******/ function() { return module; };
|
950
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
951
|
+
/******/ return getter;
|
952
|
+
/******/ };
|
953
|
+
/******/ }();
|
954
|
+
/******/
|
955
|
+
/******/ /* webpack/runtime/define property getters */
|
956
|
+
/******/ !function() {
|
957
|
+
/******/ // define getter functions for harmony exports
|
958
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
959
|
+
/******/ for(var key in definition) {
|
960
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
961
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
962
|
+
/******/ }
|
963
|
+
/******/ }
|
964
|
+
/******/ };
|
965
|
+
/******/ }();
|
966
|
+
/******/
|
967
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
968
|
+
/******/ !function() {
|
969
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
970
|
+
/******/ }();
|
971
|
+
/******/
|
972
|
+
/******/ /* webpack/runtime/make namespace object */
|
973
|
+
/******/ !function() {
|
974
|
+
/******/ // define __esModule on exports
|
975
|
+
/******/ __webpack_require__.r = function(exports) {
|
976
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
977
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
978
|
+
/******/ }
|
979
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
980
|
+
/******/ };
|
981
|
+
/******/ }();
|
982
|
+
/******/
|
983
|
+
/************************************************************************/
|
984
|
+
var __webpack_exports__ = {};
|
985
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
986
|
+
!function() {
|
987
|
+
/*!***********************************************!*\
|
988
|
+
!*** ./js/entries/plugins/foundation.core.js ***!
|
989
|
+
\***********************************************/
|
990
|
+
__webpack_require__.r(__webpack_exports__);
|
991
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
992
|
+
/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation; },
|
993
|
+
/* harmony export */ GetYoDigits: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.GetYoDigits; },
|
994
|
+
/* harmony export */ Plugin: function() { return /* reexport safe */ _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__.Plugin; },
|
995
|
+
/* harmony export */ RegExpEscape: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.RegExpEscape; },
|
996
|
+
/* harmony export */ ignoreMousedisappear: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.ignoreMousedisappear; },
|
997
|
+
/* harmony export */ onLoad: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.onLoad; },
|
998
|
+
/* harmony export */ rtl: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.rtl; },
|
999
|
+
/* harmony export */ transitionend: function() { return /* reexport safe */ _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.transitionend; }
|
1000
|
+
/* harmony export */ });
|
1001
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
1002
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
1003
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.core */ "./js/foundation.core.js");
|
1004
|
+
/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../foundation.core.plugin */ "./js/foundation.core.plugin.js");
|
1005
|
+
/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../foundation.core.utils */ "./js/foundation.core.utils.js");
|
1006
|
+
// --- Foundation Core API ---
|
1007
|
+
// Initialize Foundation and add some utilities to its public API for backward compatibility.
|
1008
|
+
// Please note that every utility do not have to be added to the core API.
|
1009
|
+
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.addToJquery((jquery__WEBPACK_IMPORTED_MODULE_0___default()));
|
1014
|
+
|
1015
|
+
// Every plugin depends on plugin now, we can include that on the core for the
|
1016
|
+
// script inclusion path.
|
1017
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.Plugin = _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_2__.Plugin;
|
1018
|
+
|
1019
|
+
// These are now separated out, but historically were a part of this module,
|
1020
|
+
// and since this is here for backwards compatibility we include them in
|
1021
|
+
// this entry.
|
1022
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.rtl = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.rtl;
|
1023
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.GetYoDigits = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.GetYoDigits;
|
1024
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.transitionend = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.transitionend;
|
1025
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.RegExpEscape = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.RegExpEscape;
|
1026
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation.onLoad = _foundation_core_utils__WEBPACK_IMPORTED_MODULE_3__.onLoad;
|
1027
|
+
window.Foundation = _foundation_core__WEBPACK_IMPORTED_MODULE_1__.Foundation;
|
1028
|
+
|
1029
|
+
// --- Foundation Core exports ---
|
1030
|
+
// Export "Plugin" and all core utilities, since the `foundation.core` entry plays the role of
|
1031
|
+
// all core source files.
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
}();
|
1037
|
+
/******/ return __webpack_exports__;
|
1038
|
+
/******/ })()
|
1039
|
+
;
|
1183
1040
|
});
|
1184
1041
|
//# sourceMappingURL=foundation.core.js.map
|