foundation-rails 6.4.3.0 → 6.5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.ruby-version +1 -1
- data/.travis.yml +14 -3
- data/Appraisals +19 -0
- data/Gemfile +5 -2
- data/Gemfile.lock +193 -0
- data/README.md +53 -24
- data/Rakefile +11 -12
- data/bower.json +3 -3
- data/foundation-rails.gemspec +5 -5
- data/gemfiles/rails_4.1.gemfile +10 -0
- data/gemfiles/rails_4.1.gemfile.lock +178 -0
- data/gemfiles/rails_4.2.gemfile +10 -0
- data/gemfiles/rails_4.2.gemfile.lock +178 -0
- data/gemfiles/rails_5.0.gemfile +10 -0
- data/gemfiles/rails_5.0.gemfile.lock +193 -0
- data/gemfiles/rails_5.1.gemfile +10 -0
- data/gemfiles/rails_5.1.gemfile.lock +193 -0
- data/gemfiles/rails_5.2.gemfile +10 -0
- data/gemfiles/rails_5.2.gemfile.lock +193 -0
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/install_generator.rb +1 -1
- data/lib/generators/foundation/templates/_settings.scss +5 -5
- data/spec/support/helpers.rb +1 -1
- data/vendor/assets/js/foundation.cjs.js +11795 -0
- data/vendor/assets/js/foundation.cjs.js.map +1 -0
- data/vendor/assets/js/foundation.es6.js +10361 -0
- data/vendor/assets/js/foundation.es6.js.map +1 -0
- data/vendor/assets/js/foundation.esm.js +11756 -0
- data/vendor/assets/js/foundation.esm.js.map +1 -0
- data/vendor/assets/js/foundation.js +13214 -31
- data/vendor/assets/js/foundation.js.map +1 -0
- data/vendor/assets/js/foundation.min.js +2 -0
- data/vendor/assets/js/foundation.min.js.map +1 -0
- data/vendor/assets/js/foundation.sprockets.js +38 -0
- data/vendor/assets/js/{foundation.abide.js → plugins/foundation.abide.js} +317 -138
- data/vendor/assets/js/plugins/foundation.abide.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.abide.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordion.js +676 -0
- data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordion.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.js +637 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.core.js +1072 -0
- data/vendor/assets/js/plugins/foundation.core.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.core.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.drilldown.js +982 -0
- data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.drilldown.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdown.js +1324 -0
- data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdown.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js +792 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.equalizer.js +638 -0
- data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.equalizer.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.interchange.js +471 -0
- data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.interchange.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.magellan.js +551 -0
- data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.magellan.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.js +1164 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.orbit.js +883 -0
- data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.orbit.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +546 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js +437 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js +405 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.reveal.js +1278 -0
- data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.reveal.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -0
- data/vendor/assets/js/{foundation.slider.js → plugins/foundation.slider.js} +405 -271
- data/vendor/assets/js/plugins/foundation.slider.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.slider.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.js +382 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -0
- data/vendor/assets/js/{foundation.sticky.js → plugins/foundation.sticky.js} +325 -203
- data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.sticky.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tabs.js +813 -0
- data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tabs.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.toggler.js +713 -0
- data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.toggler.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tooltip.js +1346 -0
- data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tooltip.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -0
- data/vendor/assets/js/{foundation.util.box.js → plugins/foundation.util.box.js} +136 -54
- data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.box.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js +218 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.js +351 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +405 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.motion.js +282 -0
- data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.motion.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.nest.js +240 -0
- data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.nest.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.timer.js +226 -0
- data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.timer.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.touch.js +365 -0
- data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.touch.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.js +480 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -0
- data/vendor/assets/scss/_global.scss +10 -15
- data/vendor/assets/scss/components/_accordion-menu.scss +6 -3
- data/vendor/assets/scss/components/_accordion.scss +1 -0
- data/vendor/assets/scss/components/_breadcrumbs.scss +8 -6
- data/vendor/assets/scss/components/_button-group.scss +27 -8
- data/vendor/assets/scss/components/_button.scss +36 -8
- data/vendor/assets/scss/components/_card.scss +2 -2
- data/vendor/assets/scss/components/_drilldown.scss +5 -6
- data/vendor/assets/scss/components/_dropdown-menu.scss +15 -10
- data/vendor/assets/scss/components/_dropdown.scss +7 -4
- data/vendor/assets/scss/components/_flex.scss +6 -4
- data/vendor/assets/scss/components/_media-object.scss +33 -33
- data/vendor/assets/scss/components/_menu.scss +0 -4
- data/vendor/assets/scss/components/_off-canvas.scss +4 -4
- data/vendor/assets/scss/components/_orbit.scss +1 -0
- data/vendor/assets/scss/components/_responsive-embed.scss +0 -13
- data/vendor/assets/scss/components/_reveal.scss +19 -14
- data/vendor/assets/scss/components/_table.scss +3 -6
- data/vendor/assets/scss/components/_tabs.scss +1 -4
- data/vendor/assets/scss/components/_thumbnail.scss +1 -1
- data/vendor/assets/scss/components/_visibility.scss +5 -2
- data/vendor/assets/scss/forms/_error.scss +1 -0
- data/vendor/assets/scss/forms/_input-group.scss +10 -10
- data/vendor/assets/scss/forms/_meter.scss +5 -5
- data/vendor/assets/scss/forms/_progress.scss +6 -6
- data/vendor/assets/scss/forms/_range.scss +5 -5
- data/vendor/assets/scss/forms/_text.scss +7 -7
- data/vendor/assets/scss/foundation.scss +74 -57
- data/vendor/assets/scss/grid/_column.scss +2 -6
- data/vendor/assets/scss/grid/_flex-grid.scss +1 -0
- data/vendor/assets/scss/grid/_gutter.scss +0 -15
- data/vendor/assets/scss/grid/_position.scss +28 -4
- data/vendor/assets/scss/motion-ui/_settings.scss +1 -0
- data/vendor/assets/scss/motion-ui/effects/_fade.scss +1 -4
- data/vendor/assets/scss/motion-ui/effects/_hinge.scss +4 -3
- data/vendor/assets/scss/motion-ui/effects/_shake.scss +1 -1
- data/vendor/assets/scss/motion-ui/effects/_slide.scss +4 -3
- data/vendor/assets/scss/motion-ui/effects/_spin.scss +4 -3
- data/vendor/assets/scss/motion-ui/effects/_wiggle.scss +1 -1
- data/vendor/assets/scss/motion-ui/effects/_zoom.scss +2 -2
- data/vendor/assets/scss/motion-ui/motion-ui.scss +2 -0
- data/vendor/assets/scss/motion-ui/transitions/_fade.scss +6 -4
- data/vendor/assets/scss/motion-ui/transitions/_hinge.scss +3 -2
- data/vendor/assets/scss/motion-ui/transitions/_slide.scss +3 -2
- data/vendor/assets/scss/motion-ui/transitions/_spin.scss +2 -1
- data/vendor/assets/scss/motion-ui/transitions/_zoom.scss +6 -4
- data/vendor/assets/scss/motion-ui/util/_animation.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_args.scss +2 -2
- data/vendor/assets/scss/motion-ui/util/_function.scss +94 -0
- data/vendor/assets/scss/motion-ui/util/_keyframe.scss +5 -5
- data/vendor/assets/scss/motion-ui/util/_series.scss +20 -17
- data/vendor/assets/scss/motion-ui/util/_string.scss +36 -0
- data/vendor/assets/scss/prototype/_relation.scss +1 -1
- data/vendor/assets/scss/prototype/_rounded.scss +3 -0
- data/vendor/assets/scss/prototype/_spacing.scss +94 -121
- data/vendor/assets/scss/settings/_settings.scss +5 -5
- data/vendor/assets/scss/typography/_base.scss +2 -2
- data/vendor/assets/scss/typography/_helpers.scss +1 -1
- data/vendor/assets/scss/typography/_print.scss +4 -0
- data/vendor/assets/scss/util/_breakpoint.scss +22 -10
- data/vendor/assets/scss/util/_color.scss +11 -1
- data/vendor/assets/scss/util/_direction.scss +1 -1
- data/vendor/assets/scss/util/_flex.scss +12 -7
- data/vendor/assets/scss/util/_mixins.scss +7 -3
- data/vendor/assets/scss/util/_unit.scss +3 -3
- data/vendor/assets/scss/vendor/normalize.scss +281 -0
- data/vendor/assets/scss/xy-grid/_cell.scss +33 -17
- data/vendor/assets/scss/xy-grid/_classes.scss +31 -11
- data/vendor/assets/scss/xy-grid/_collapse.scss +2 -1
- data/vendor/assets/scss/xy-grid/_frame.scss +2 -1
- data/vendor/assets/scss/xy-grid/_grid.scss +1 -0
- data/vendor/assets/scss/xy-grid/_gutters.scss +1 -1
- data/vendor/assets/scss/xy-grid/_layout.scss +2 -1
- data/vendor/assets/scss/xy-grid/_position.scss +5 -1
- metadata +172 -80
- data/vendor/assets/_vendor/normalize-scss/sass/_normalize.scss +0 -3
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_import-now.scss +0 -11
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +0 -676
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_variables.scss +0 -36
- data/vendor/assets/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +0 -61
- data/vendor/assets/js/foundation.accordion.js +0 -511
- data/vendor/assets/js/foundation.accordionMenu.js +0 -527
- data/vendor/assets/js/foundation.core.js +0 -860
- data/vendor/assets/js/foundation.drilldown.js +0 -759
- data/vendor/assets/js/foundation.dropdown.js +0 -1151
- data/vendor/assets/js/foundation.dropdownMenu.js +0 -677
- data/vendor/assets/js/foundation.equalizer.js +0 -542
- data/vendor/assets/js/foundation.interchange.js +0 -399
- data/vendor/assets/js/foundation.magellan.js +0 -449
- data/vendor/assets/js/foundation.offcanvas.js +0 -1054
- data/vendor/assets/js/foundation.orbit.js +0 -767
- data/vendor/assets/js/foundation.responsiveAccordionTabs.js +0 -440
- data/vendor/assets/js/foundation.responsiveMenu.js +0 -362
- data/vendor/assets/js/foundation.responsiveToggle.js +0 -336
- data/vendor/assets/js/foundation.reveal.js +0 -1065
- data/vendor/assets/js/foundation.smoothScroll.js +0 -303
- data/vendor/assets/js/foundation.tabs.js +0 -678
- data/vendor/assets/js/foundation.toggler.js +0 -601
- data/vendor/assets/js/foundation.tooltip.js +0 -1194
- data/vendor/assets/js/foundation.util.imageLoader.js +0 -163
- data/vendor/assets/js/foundation.util.keyboard.js +0 -298
- data/vendor/assets/js/foundation.util.mediaQuery.js +0 -354
- data/vendor/assets/js/foundation.util.motion.js +0 -231
- data/vendor/assets/js/foundation.util.nest.js +0 -181
- data/vendor/assets/js/foundation.util.timer.js +0 -170
- data/vendor/assets/js/foundation.util.touch.js +0 -275
- data/vendor/assets/js/foundation.util.triggers.js +0 -398
- data/vendor/assets/scss/prototype/_typescale.scss +0 -20
@@ -1,399 +0,0 @@
|
|
1
|
-
/******/ (function(modules) { // webpackBootstrap
|
2
|
-
/******/ // The module cache
|
3
|
-
/******/ var installedModules = {};
|
4
|
-
/******/
|
5
|
-
/******/ // The require function
|
6
|
-
/******/ function __webpack_require__(moduleId) {
|
7
|
-
/******/
|
8
|
-
/******/ // Check if module is in cache
|
9
|
-
/******/ if(installedModules[moduleId]) {
|
10
|
-
/******/ return installedModules[moduleId].exports;
|
11
|
-
/******/ }
|
12
|
-
/******/ // Create a new module (and put it into the cache)
|
13
|
-
/******/ var module = installedModules[moduleId] = {
|
14
|
-
/******/ i: moduleId,
|
15
|
-
/******/ l: false,
|
16
|
-
/******/ exports: {}
|
17
|
-
/******/ };
|
18
|
-
/******/
|
19
|
-
/******/ // Execute the module function
|
20
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21
|
-
/******/
|
22
|
-
/******/ // Flag the module as loaded
|
23
|
-
/******/ module.l = true;
|
24
|
-
/******/
|
25
|
-
/******/ // Return the exports of the module
|
26
|
-
/******/ return module.exports;
|
27
|
-
/******/ }
|
28
|
-
/******/
|
29
|
-
/******/
|
30
|
-
/******/ // expose the modules object (__webpack_modules__)
|
31
|
-
/******/ __webpack_require__.m = modules;
|
32
|
-
/******/
|
33
|
-
/******/ // expose the module cache
|
34
|
-
/******/ __webpack_require__.c = installedModules;
|
35
|
-
/******/
|
36
|
-
/******/ // identity function for calling harmony imports with the correct context
|
37
|
-
/******/ __webpack_require__.i = function(value) { return value; };
|
38
|
-
/******/
|
39
|
-
/******/ // define getter function for harmony exports
|
40
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
41
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
42
|
-
/******/ Object.defineProperty(exports, name, {
|
43
|
-
/******/ configurable: false,
|
44
|
-
/******/ enumerable: true,
|
45
|
-
/******/ get: getter
|
46
|
-
/******/ });
|
47
|
-
/******/ }
|
48
|
-
/******/ };
|
49
|
-
/******/
|
50
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
51
|
-
/******/ __webpack_require__.n = function(module) {
|
52
|
-
/******/ var getter = module && module.__esModule ?
|
53
|
-
/******/ function getDefault() { return module['default']; } :
|
54
|
-
/******/ function getModuleExports() { return module; };
|
55
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
56
|
-
/******/ return getter;
|
57
|
-
/******/ };
|
58
|
-
/******/
|
59
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
60
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
61
|
-
/******/
|
62
|
-
/******/ // __webpack_public_path__
|
63
|
-
/******/ __webpack_require__.p = "";
|
64
|
-
/******/
|
65
|
-
/******/ // Load entry module and return exports
|
66
|
-
/******/ return __webpack_require__(__webpack_require__.s = 86);
|
67
|
-
/******/ })
|
68
|
-
/************************************************************************/
|
69
|
-
/******/ ({
|
70
|
-
|
71
|
-
/***/ 0:
|
72
|
-
/***/ (function(module, exports) {
|
73
|
-
|
74
|
-
module.exports = jQuery;
|
75
|
-
|
76
|
-
/***/ }),
|
77
|
-
|
78
|
-
/***/ 1:
|
79
|
-
/***/ (function(module, exports) {
|
80
|
-
|
81
|
-
module.exports = {Foundation: window.Foundation};
|
82
|
-
|
83
|
-
/***/ }),
|
84
|
-
|
85
|
-
/***/ 2:
|
86
|
-
/***/ (function(module, exports) {
|
87
|
-
|
88
|
-
module.exports = {Plugin: window.Foundation.Plugin};
|
89
|
-
|
90
|
-
/***/ }),
|
91
|
-
|
92
|
-
/***/ 20:
|
93
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
94
|
-
|
95
|
-
"use strict";
|
96
|
-
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
97
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
|
98
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
|
99
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_interchange__ = __webpack_require__(50);
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
__WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_interchange__["a" /* Interchange */], 'Interchange');
|
104
|
-
|
105
|
-
/***/ }),
|
106
|
-
|
107
|
-
/***/ 3:
|
108
|
-
/***/ (function(module, exports) {
|
109
|
-
|
110
|
-
module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
|
111
|
-
|
112
|
-
/***/ }),
|
113
|
-
|
114
|
-
/***/ 50:
|
115
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
116
|
-
|
117
|
-
"use strict";
|
118
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Interchange; });
|
119
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
120
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
121
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__ = __webpack_require__(6);
|
122
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__);
|
123
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_plugin__ = __webpack_require__(2);
|
124
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_plugin__);
|
125
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_core__ = __webpack_require__(3);
|
126
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__);
|
127
|
-
|
128
|
-
|
129
|
-
var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
130
|
-
|
131
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
132
|
-
|
133
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
134
|
-
|
135
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
/**
|
143
|
-
* Interchange module.
|
144
|
-
* @module foundation.interchange
|
145
|
-
* @requires foundation.util.mediaQuery
|
146
|
-
*/
|
147
|
-
|
148
|
-
var Interchange = function (_Plugin) {
|
149
|
-
_inherits(Interchange, _Plugin);
|
150
|
-
|
151
|
-
function Interchange() {
|
152
|
-
_classCallCheck(this, Interchange);
|
153
|
-
|
154
|
-
return _possibleConstructorReturn(this, (Interchange.__proto__ || Object.getPrototypeOf(Interchange)).apply(this, arguments));
|
155
|
-
}
|
156
|
-
|
157
|
-
_createClass(Interchange, [{
|
158
|
-
key: '_setup',
|
159
|
-
|
160
|
-
/**
|
161
|
-
* Creates a new instance of Interchange.
|
162
|
-
* @class
|
163
|
-
* @name Interchange
|
164
|
-
* @fires Interchange#init
|
165
|
-
* @param {Object} element - jQuery object to add the trigger to.
|
166
|
-
* @param {Object} options - Overrides to the default plugin settings.
|
167
|
-
*/
|
168
|
-
value: function _setup(element, options) {
|
169
|
-
this.$element = element;
|
170
|
-
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Interchange.defaults, options);
|
171
|
-
this.rules = [];
|
172
|
-
this.currentPath = '';
|
173
|
-
this.className = 'Interchange'; // ie9 back compat
|
174
|
-
|
175
|
-
this._init();
|
176
|
-
this._events();
|
177
|
-
}
|
178
|
-
|
179
|
-
/**
|
180
|
-
* Initializes the Interchange plugin and calls functions to get interchange functioning on load.
|
181
|
-
* @function
|
182
|
-
* @private
|
183
|
-
*/
|
184
|
-
|
185
|
-
}, {
|
186
|
-
key: '_init',
|
187
|
-
value: function _init() {
|
188
|
-
__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"]._init();
|
189
|
-
|
190
|
-
var id = this.$element[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__["GetYoDigits"])(6, 'interchange');
|
191
|
-
this.$element.attr({
|
192
|
-
'data-resize': id,
|
193
|
-
'id': id
|
194
|
-
});
|
195
|
-
|
196
|
-
this._addBreakpoints();
|
197
|
-
this._generateRules();
|
198
|
-
this._reflow();
|
199
|
-
}
|
200
|
-
|
201
|
-
/**
|
202
|
-
* Initializes events for Interchange.
|
203
|
-
* @function
|
204
|
-
* @private
|
205
|
-
*/
|
206
|
-
|
207
|
-
}, {
|
208
|
-
key: '_events',
|
209
|
-
value: function _events() {
|
210
|
-
var _this3 = this;
|
211
|
-
|
212
|
-
this.$element.off('resizeme.zf.trigger').on('resizeme.zf.trigger', function () {
|
213
|
-
return _this3._reflow();
|
214
|
-
});
|
215
|
-
}
|
216
|
-
|
217
|
-
/**
|
218
|
-
* Calls necessary functions to update Interchange upon DOM change
|
219
|
-
* @function
|
220
|
-
* @private
|
221
|
-
*/
|
222
|
-
|
223
|
-
}, {
|
224
|
-
key: '_reflow',
|
225
|
-
value: function _reflow() {
|
226
|
-
var match;
|
227
|
-
|
228
|
-
// Iterate through each rule, but only save the last match
|
229
|
-
for (var i in this.rules) {
|
230
|
-
if (this.rules.hasOwnProperty(i)) {
|
231
|
-
var rule = this.rules[i];
|
232
|
-
if (window.matchMedia(rule.query).matches) {
|
233
|
-
match = rule;
|
234
|
-
}
|
235
|
-
}
|
236
|
-
}
|
237
|
-
|
238
|
-
if (match) {
|
239
|
-
this.replace(match.path);
|
240
|
-
}
|
241
|
-
}
|
242
|
-
|
243
|
-
/**
|
244
|
-
* Gets the Foundation breakpoints and adds them to the Interchange.SPECIAL_QUERIES object.
|
245
|
-
* @function
|
246
|
-
* @private
|
247
|
-
*/
|
248
|
-
|
249
|
-
}, {
|
250
|
-
key: '_addBreakpoints',
|
251
|
-
value: function _addBreakpoints() {
|
252
|
-
for (var i in __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"].queries) {
|
253
|
-
if (__WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"].queries.hasOwnProperty(i)) {
|
254
|
-
var query = __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["MediaQuery"].queries[i];
|
255
|
-
Interchange.SPECIAL_QUERIES[query.name] = query.value;
|
256
|
-
}
|
257
|
-
}
|
258
|
-
}
|
259
|
-
|
260
|
-
/**
|
261
|
-
* Checks the Interchange element for the provided media query + content pairings
|
262
|
-
* @function
|
263
|
-
* @private
|
264
|
-
* @param {Object} element - jQuery object that is an Interchange instance
|
265
|
-
* @returns {Array} scenarios - Array of objects that have 'mq' and 'path' keys with corresponding keys
|
266
|
-
*/
|
267
|
-
|
268
|
-
}, {
|
269
|
-
key: '_generateRules',
|
270
|
-
value: function _generateRules(element) {
|
271
|
-
var rulesList = [];
|
272
|
-
var rules;
|
273
|
-
|
274
|
-
if (this.options.rules) {
|
275
|
-
rules = this.options.rules;
|
276
|
-
} else {
|
277
|
-
rules = this.$element.data('interchange');
|
278
|
-
}
|
279
|
-
|
280
|
-
rules = typeof rules === 'string' ? rules.match(/\[.*?\]/g) : rules;
|
281
|
-
|
282
|
-
for (var i in rules) {
|
283
|
-
if (rules.hasOwnProperty(i)) {
|
284
|
-
var rule = rules[i].slice(1, -1).split(', ');
|
285
|
-
var path = rule.slice(0, -1).join('');
|
286
|
-
var query = rule[rule.length - 1];
|
287
|
-
|
288
|
-
if (Interchange.SPECIAL_QUERIES[query]) {
|
289
|
-
query = Interchange.SPECIAL_QUERIES[query];
|
290
|
-
}
|
291
|
-
|
292
|
-
rulesList.push({
|
293
|
-
path: path,
|
294
|
-
query: query
|
295
|
-
});
|
296
|
-
}
|
297
|
-
}
|
298
|
-
|
299
|
-
this.rules = rulesList;
|
300
|
-
}
|
301
|
-
|
302
|
-
/**
|
303
|
-
* Update the `src` property of an image, or change the HTML of a container, to the specified path.
|
304
|
-
* @function
|
305
|
-
* @param {String} path - Path to the image or HTML partial.
|
306
|
-
* @fires Interchange#replaced
|
307
|
-
*/
|
308
|
-
|
309
|
-
}, {
|
310
|
-
key: 'replace',
|
311
|
-
value: function replace(path) {
|
312
|
-
if (this.currentPath === path) return;
|
313
|
-
|
314
|
-
var _this = this,
|
315
|
-
trigger = 'replaced.zf.interchange';
|
316
|
-
|
317
|
-
// Replacing images
|
318
|
-
if (this.$element[0].nodeName === 'IMG') {
|
319
|
-
this.$element.attr('src', path).on('load', function () {
|
320
|
-
_this.currentPath = path;
|
321
|
-
}).trigger(trigger);
|
322
|
-
}
|
323
|
-
// Replacing background images
|
324
|
-
else if (path.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i)) {
|
325
|
-
path = path.replace(/\(/g, '%28').replace(/\)/g, '%29');
|
326
|
-
this.$element.css({ 'background-image': 'url(' + path + ')' }).trigger(trigger);
|
327
|
-
}
|
328
|
-
// Replacing HTML
|
329
|
-
else {
|
330
|
-
__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.get(path, function (response) {
|
331
|
-
_this.$element.html(response).trigger(trigger);
|
332
|
-
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(response).foundation();
|
333
|
-
_this.currentPath = path;
|
334
|
-
});
|
335
|
-
}
|
336
|
-
|
337
|
-
/**
|
338
|
-
* Fires when content in an Interchange element is done being loaded.
|
339
|
-
* @event Interchange#replaced
|
340
|
-
*/
|
341
|
-
// this.$element.trigger('replaced.zf.interchange');
|
342
|
-
}
|
343
|
-
|
344
|
-
/**
|
345
|
-
* Destroys an instance of interchange.
|
346
|
-
* @function
|
347
|
-
*/
|
348
|
-
|
349
|
-
}, {
|
350
|
-
key: '_destroy',
|
351
|
-
value: function _destroy() {
|
352
|
-
this.$element.off('resizeme.zf.trigger');
|
353
|
-
}
|
354
|
-
}]);
|
355
|
-
|
356
|
-
return Interchange;
|
357
|
-
}(__WEBPACK_IMPORTED_MODULE_2__foundation_plugin__["Plugin"]);
|
358
|
-
|
359
|
-
/**
|
360
|
-
* Default settings for plugin
|
361
|
-
*/
|
362
|
-
|
363
|
-
|
364
|
-
Interchange.defaults = {
|
365
|
-
/**
|
366
|
-
* Rules to be applied to Interchange elements. Set with the `data-interchange` array notation.
|
367
|
-
* @option
|
368
|
-
* @type {?array}
|
369
|
-
* @default null
|
370
|
-
*/
|
371
|
-
rules: null
|
372
|
-
};
|
373
|
-
|
374
|
-
Interchange.SPECIAL_QUERIES = {
|
375
|
-
'landscape': 'screen and (orientation: landscape)',
|
376
|
-
'portrait': 'screen and (orientation: portrait)',
|
377
|
-
'retina': 'only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)'
|
378
|
-
};
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
/***/ }),
|
383
|
-
|
384
|
-
/***/ 6:
|
385
|
-
/***/ (function(module, exports) {
|
386
|
-
|
387
|
-
module.exports = {MediaQuery: window.Foundation.MediaQuery};
|
388
|
-
|
389
|
-
/***/ }),
|
390
|
-
|
391
|
-
/***/ 86:
|
392
|
-
/***/ (function(module, exports, __webpack_require__) {
|
393
|
-
|
394
|
-
module.exports = __webpack_require__(20);
|
395
|
-
|
396
|
-
|
397
|
-
/***/ })
|
398
|
-
|
399
|
-
/******/ });
|
@@ -1,449 +0,0 @@
|
|
1
|
-
/******/ (function(modules) { // webpackBootstrap
|
2
|
-
/******/ // The module cache
|
3
|
-
/******/ var installedModules = {};
|
4
|
-
/******/
|
5
|
-
/******/ // The require function
|
6
|
-
/******/ function __webpack_require__(moduleId) {
|
7
|
-
/******/
|
8
|
-
/******/ // Check if module is in cache
|
9
|
-
/******/ if(installedModules[moduleId]) {
|
10
|
-
/******/ return installedModules[moduleId].exports;
|
11
|
-
/******/ }
|
12
|
-
/******/ // Create a new module (and put it into the cache)
|
13
|
-
/******/ var module = installedModules[moduleId] = {
|
14
|
-
/******/ i: moduleId,
|
15
|
-
/******/ l: false,
|
16
|
-
/******/ exports: {}
|
17
|
-
/******/ };
|
18
|
-
/******/
|
19
|
-
/******/ // Execute the module function
|
20
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21
|
-
/******/
|
22
|
-
/******/ // Flag the module as loaded
|
23
|
-
/******/ module.l = true;
|
24
|
-
/******/
|
25
|
-
/******/ // Return the exports of the module
|
26
|
-
/******/ return module.exports;
|
27
|
-
/******/ }
|
28
|
-
/******/
|
29
|
-
/******/
|
30
|
-
/******/ // expose the modules object (__webpack_modules__)
|
31
|
-
/******/ __webpack_require__.m = modules;
|
32
|
-
/******/
|
33
|
-
/******/ // expose the module cache
|
34
|
-
/******/ __webpack_require__.c = installedModules;
|
35
|
-
/******/
|
36
|
-
/******/ // identity function for calling harmony imports with the correct context
|
37
|
-
/******/ __webpack_require__.i = function(value) { return value; };
|
38
|
-
/******/
|
39
|
-
/******/ // define getter function for harmony exports
|
40
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
41
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
42
|
-
/******/ Object.defineProperty(exports, name, {
|
43
|
-
/******/ configurable: false,
|
44
|
-
/******/ enumerable: true,
|
45
|
-
/******/ get: getter
|
46
|
-
/******/ });
|
47
|
-
/******/ }
|
48
|
-
/******/ };
|
49
|
-
/******/
|
50
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
51
|
-
/******/ __webpack_require__.n = function(module) {
|
52
|
-
/******/ var getter = module && module.__esModule ?
|
53
|
-
/******/ function getDefault() { return module['default']; } :
|
54
|
-
/******/ function getModuleExports() { return module; };
|
55
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
56
|
-
/******/ return getter;
|
57
|
-
/******/ };
|
58
|
-
/******/
|
59
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
60
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
61
|
-
/******/
|
62
|
-
/******/ // __webpack_public_path__
|
63
|
-
/******/ __webpack_require__.p = "";
|
64
|
-
/******/
|
65
|
-
/******/ // Load entry module and return exports
|
66
|
-
/******/ return __webpack_require__(__webpack_require__.s = 87);
|
67
|
-
/******/ })
|
68
|
-
/************************************************************************/
|
69
|
-
/******/ ({
|
70
|
-
|
71
|
-
/***/ 0:
|
72
|
-
/***/ (function(module, exports) {
|
73
|
-
|
74
|
-
module.exports = jQuery;
|
75
|
-
|
76
|
-
/***/ }),
|
77
|
-
|
78
|
-
/***/ 1:
|
79
|
-
/***/ (function(module, exports) {
|
80
|
-
|
81
|
-
module.exports = {Foundation: window.Foundation};
|
82
|
-
|
83
|
-
/***/ }),
|
84
|
-
|
85
|
-
/***/ 2:
|
86
|
-
/***/ (function(module, exports) {
|
87
|
-
|
88
|
-
module.exports = {Plugin: window.Foundation.Plugin};
|
89
|
-
|
90
|
-
/***/ }),
|
91
|
-
|
92
|
-
/***/ 21:
|
93
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
94
|
-
|
95
|
-
"use strict";
|
96
|
-
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
97
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
|
98
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
|
99
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_magellan__ = __webpack_require__(51);
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
__WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_magellan__["a" /* Magellan */], 'Magellan');
|
104
|
-
|
105
|
-
/***/ }),
|
106
|
-
|
107
|
-
/***/ 3:
|
108
|
-
/***/ (function(module, exports) {
|
109
|
-
|
110
|
-
module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
|
111
|
-
|
112
|
-
/***/ }),
|
113
|
-
|
114
|
-
/***/ 51:
|
115
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
116
|
-
|
117
|
-
"use strict";
|
118
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Magellan; });
|
119
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
120
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
121
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(3);
|
122
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__);
|
123
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_plugin__ = __webpack_require__(2);
|
124
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_plugin__);
|
125
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_smoothScroll__ = __webpack_require__(76);
|
126
|
-
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_smoothScroll___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_smoothScroll__);
|
127
|
-
|
128
|
-
|
129
|
-
var _createClass = 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
130
|
-
|
131
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
132
|
-
|
133
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
134
|
-
|
135
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
/**
|
143
|
-
* Magellan module.
|
144
|
-
* @module foundation.magellan
|
145
|
-
* @requires foundation.smoothScroll
|
146
|
-
*/
|
147
|
-
|
148
|
-
var Magellan = function (_Plugin) {
|
149
|
-
_inherits(Magellan, _Plugin);
|
150
|
-
|
151
|
-
function Magellan() {
|
152
|
-
_classCallCheck(this, Magellan);
|
153
|
-
|
154
|
-
return _possibleConstructorReturn(this, (Magellan.__proto__ || Object.getPrototypeOf(Magellan)).apply(this, arguments));
|
155
|
-
}
|
156
|
-
|
157
|
-
_createClass(Magellan, [{
|
158
|
-
key: '_setup',
|
159
|
-
|
160
|
-
/**
|
161
|
-
* Creates a new instance of Magellan.
|
162
|
-
* @class
|
163
|
-
* @name Magellan
|
164
|
-
* @fires Magellan#init
|
165
|
-
* @param {Object} element - jQuery object to add the trigger to.
|
166
|
-
* @param {Object} options - Overrides to the default plugin settings.
|
167
|
-
*/
|
168
|
-
value: function _setup(element, options) {
|
169
|
-
this.$element = element;
|
170
|
-
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Magellan.defaults, this.$element.data(), options);
|
171
|
-
this.className = 'Magellan'; // ie9 back compat
|
172
|
-
|
173
|
-
this._init();
|
174
|
-
this.calcPoints();
|
175
|
-
}
|
176
|
-
|
177
|
-
/**
|
178
|
-
* Initializes the Magellan plugin and calls functions to get equalizer functioning on load.
|
179
|
-
* @private
|
180
|
-
*/
|
181
|
-
|
182
|
-
}, {
|
183
|
-
key: '_init',
|
184
|
-
value: function _init() {
|
185
|
-
var id = this.$element[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__["GetYoDigits"])(6, 'magellan');
|
186
|
-
var _this = this;
|
187
|
-
this.$targets = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-magellan-target]');
|
188
|
-
this.$links = this.$element.find('a');
|
189
|
-
this.$element.attr({
|
190
|
-
'data-resize': id,
|
191
|
-
'data-scroll': id,
|
192
|
-
'id': id
|
193
|
-
});
|
194
|
-
this.$active = __WEBPACK_IMPORTED_MODULE_0_jquery___default()();
|
195
|
-
this.scrollPos = parseInt(window.pageYOffset, 10);
|
196
|
-
|
197
|
-
this._events();
|
198
|
-
}
|
199
|
-
|
200
|
-
/**
|
201
|
-
* Calculates an array of pixel values that are the demarcation lines between locations on the page.
|
202
|
-
* Can be invoked if new elements are added or the size of a location changes.
|
203
|
-
* @function
|
204
|
-
*/
|
205
|
-
|
206
|
-
}, {
|
207
|
-
key: 'calcPoints',
|
208
|
-
value: function calcPoints() {
|
209
|
-
var _this = this,
|
210
|
-
body = document.body,
|
211
|
-
html = document.documentElement;
|
212
|
-
|
213
|
-
this.points = [];
|
214
|
-
this.winHeight = Math.round(Math.max(window.innerHeight, html.clientHeight));
|
215
|
-
this.docHeight = Math.round(Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight));
|
216
|
-
|
217
|
-
this.$targets.each(function () {
|
218
|
-
var $tar = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
|
219
|
-
pt = Math.round($tar.offset().top - _this.options.threshold);
|
220
|
-
$tar.targetPoint = pt;
|
221
|
-
_this.points.push(pt);
|
222
|
-
});
|
223
|
-
}
|
224
|
-
|
225
|
-
/**
|
226
|
-
* Initializes events for Magellan.
|
227
|
-
* @private
|
228
|
-
*/
|
229
|
-
|
230
|
-
}, {
|
231
|
-
key: '_events',
|
232
|
-
value: function _events() {
|
233
|
-
var _this = this,
|
234
|
-
$body = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html, body'),
|
235
|
-
opts = {
|
236
|
-
duration: _this.options.animationDuration,
|
237
|
-
easing: _this.options.animationEasing
|
238
|
-
};
|
239
|
-
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).one('load', function () {
|
240
|
-
if (_this.options.deepLinking) {
|
241
|
-
if (location.hash) {
|
242
|
-
_this.scrollToLoc(location.hash);
|
243
|
-
}
|
244
|
-
}
|
245
|
-
_this.calcPoints();
|
246
|
-
_this._updateActive();
|
247
|
-
});
|
248
|
-
|
249
|
-
this.$element.on({
|
250
|
-
'resizeme.zf.trigger': this.reflow.bind(this),
|
251
|
-
'scrollme.zf.trigger': this._updateActive.bind(this)
|
252
|
-
}).on('click.zf.magellan', 'a[href^="#"]', function (e) {
|
253
|
-
e.preventDefault();
|
254
|
-
var arrival = this.getAttribute('href');
|
255
|
-
_this.scrollToLoc(arrival);
|
256
|
-
});
|
257
|
-
|
258
|
-
this._deepLinkScroll = function (e) {
|
259
|
-
if (_this.options.deepLinking) {
|
260
|
-
_this.scrollToLoc(window.location.hash);
|
261
|
-
}
|
262
|
-
};
|
263
|
-
|
264
|
-
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).on('popstate', this._deepLinkScroll);
|
265
|
-
}
|
266
|
-
|
267
|
-
/**
|
268
|
-
* Function to scroll to a given location on the page.
|
269
|
-
* @param {String} loc - a properly formatted jQuery id selector. Example: '#foo'
|
270
|
-
* @function
|
271
|
-
*/
|
272
|
-
|
273
|
-
}, {
|
274
|
-
key: 'scrollToLoc',
|
275
|
-
value: function scrollToLoc(loc) {
|
276
|
-
this._inTransition = true;
|
277
|
-
var _this = this;
|
278
|
-
|
279
|
-
var options = {
|
280
|
-
animationEasing: this.options.animationEasing,
|
281
|
-
animationDuration: this.options.animationDuration,
|
282
|
-
threshold: this.options.threshold,
|
283
|
-
offset: this.options.offset
|
284
|
-
};
|
285
|
-
|
286
|
-
__WEBPACK_IMPORTED_MODULE_3__foundation_smoothScroll__["SmoothScroll"].scrollToLoc(loc, options, function () {
|
287
|
-
_this._inTransition = false;
|
288
|
-
_this._updateActive();
|
289
|
-
});
|
290
|
-
}
|
291
|
-
|
292
|
-
/**
|
293
|
-
* Calls necessary functions to update Magellan upon DOM change
|
294
|
-
* @function
|
295
|
-
*/
|
296
|
-
|
297
|
-
}, {
|
298
|
-
key: 'reflow',
|
299
|
-
value: function reflow() {
|
300
|
-
this.calcPoints();
|
301
|
-
this._updateActive();
|
302
|
-
}
|
303
|
-
|
304
|
-
/**
|
305
|
-
* Updates the visibility of an active location link, and updates the url hash for the page, if deepLinking enabled.
|
306
|
-
* @private
|
307
|
-
* @function
|
308
|
-
* @fires Magellan#update
|
309
|
-
*/
|
310
|
-
|
311
|
-
}, {
|
312
|
-
key: '_updateActive',
|
313
|
-
value: function _updateActive() /*evt, elem, scrollPos*/{
|
314
|
-
if (this._inTransition) {
|
315
|
-
return;
|
316
|
-
}
|
317
|
-
var winPos = /*scrollPos ||*/parseInt(window.pageYOffset, 10),
|
318
|
-
curIdx;
|
319
|
-
|
320
|
-
if (winPos + this.winHeight === this.docHeight) {
|
321
|
-
curIdx = this.points.length - 1;
|
322
|
-
} else if (winPos < this.points[0]) {
|
323
|
-
curIdx = undefined;
|
324
|
-
} else {
|
325
|
-
var isDown = this.scrollPos < winPos,
|
326
|
-
_this = this,
|
327
|
-
curVisible = this.points.filter(function (p, i) {
|
328
|
-
return isDown ? p - _this.options.offset <= winPos : p - _this.options.offset - _this.options.threshold <= winPos;
|
329
|
-
});
|
330
|
-
curIdx = curVisible.length ? curVisible.length - 1 : 0;
|
331
|
-
}
|
332
|
-
|
333
|
-
this.$active.removeClass(this.options.activeClass);
|
334
|
-
this.$active = this.$links.filter('[href="#' + this.$targets.eq(curIdx).data('magellan-target') + '"]').addClass(this.options.activeClass);
|
335
|
-
|
336
|
-
if (this.options.deepLinking) {
|
337
|
-
var hash = "";
|
338
|
-
if (curIdx != undefined) {
|
339
|
-
hash = this.$active[0].getAttribute('href');
|
340
|
-
}
|
341
|
-
if (hash !== window.location.hash) {
|
342
|
-
if (window.history.pushState) {
|
343
|
-
window.history.pushState(null, null, hash);
|
344
|
-
} else {
|
345
|
-
window.location.hash = hash;
|
346
|
-
}
|
347
|
-
}
|
348
|
-
}
|
349
|
-
|
350
|
-
this.scrollPos = winPos;
|
351
|
-
/**
|
352
|
-
* Fires when magellan is finished updating to the new active element.
|
353
|
-
* @event Magellan#update
|
354
|
-
*/
|
355
|
-
this.$element.trigger('update.zf.magellan', [this.$active]);
|
356
|
-
}
|
357
|
-
|
358
|
-
/**
|
359
|
-
* Destroys an instance of Magellan and resets the url of the window.
|
360
|
-
* @function
|
361
|
-
*/
|
362
|
-
|
363
|
-
}, {
|
364
|
-
key: '_destroy',
|
365
|
-
value: function _destroy() {
|
366
|
-
this.$element.off('.zf.trigger .zf.magellan').find('.' + this.options.activeClass).removeClass(this.options.activeClass);
|
367
|
-
|
368
|
-
if (this.options.deepLinking) {
|
369
|
-
var hash = this.$active[0].getAttribute('href');
|
370
|
-
window.location.hash.replace(hash, '');
|
371
|
-
}
|
372
|
-
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('popstate', this._deepLinkScroll);
|
373
|
-
}
|
374
|
-
}]);
|
375
|
-
|
376
|
-
return Magellan;
|
377
|
-
}(__WEBPACK_IMPORTED_MODULE_2__foundation_plugin__["Plugin"]);
|
378
|
-
|
379
|
-
/**
|
380
|
-
* Default settings for plugin
|
381
|
-
*/
|
382
|
-
|
383
|
-
|
384
|
-
Magellan.defaults = {
|
385
|
-
/**
|
386
|
-
* Amount of time, in ms, the animated scrolling should take between locations.
|
387
|
-
* @option
|
388
|
-
* @type {number}
|
389
|
-
* @default 500
|
390
|
-
*/
|
391
|
-
animationDuration: 500,
|
392
|
-
/**
|
393
|
-
* Animation style to use when scrolling between locations. Can be `'swing'` or `'linear'`.
|
394
|
-
* @option
|
395
|
-
* @type {string}
|
396
|
-
* @default 'linear'
|
397
|
-
* @see {@link https://api.jquery.com/animate|Jquery animate}
|
398
|
-
*/
|
399
|
-
animationEasing: 'linear',
|
400
|
-
/**
|
401
|
-
* Number of pixels to use as a marker for location changes.
|
402
|
-
* @option
|
403
|
-
* @type {number}
|
404
|
-
* @default 50
|
405
|
-
*/
|
406
|
-
threshold: 50,
|
407
|
-
/**
|
408
|
-
* Class applied to the active locations link on the magellan container.
|
409
|
-
* @option
|
410
|
-
* @type {string}
|
411
|
-
* @default 'is-active'
|
412
|
-
*/
|
413
|
-
activeClass: 'is-active',
|
414
|
-
/**
|
415
|
-
* Allows the script to manipulate the url of the current page, and if supported, alter the history.
|
416
|
-
* @option
|
417
|
-
* @type {boolean}
|
418
|
-
* @default false
|
419
|
-
*/
|
420
|
-
deepLinking: false,
|
421
|
-
/**
|
422
|
-
* Number of pixels to offset the scroll of the page on item click if using a sticky nav bar.
|
423
|
-
* @option
|
424
|
-
* @type {number}
|
425
|
-
* @default 0
|
426
|
-
*/
|
427
|
-
offset: 0
|
428
|
-
};
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
/***/ }),
|
433
|
-
|
434
|
-
/***/ 76:
|
435
|
-
/***/ (function(module, exports) {
|
436
|
-
|
437
|
-
module.exports = {SmoothScroll: window.Foundation.SmoothScroll};
|
438
|
-
|
439
|
-
/***/ }),
|
440
|
-
|
441
|
-
/***/ 87:
|
442
|
-
/***/ (function(module, exports, __webpack_require__) {
|
443
|
-
|
444
|
-
module.exports = __webpack_require__(21);
|
445
|
-
|
446
|
-
|
447
|
-
/***/ })
|
448
|
-
|
449
|
-
/******/ });
|