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
@@ -1,272 +1,136 @@
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
-
module.exports = factory(require("
|
3
|
+
module.exports = factory(require("jquery"), require("./foundation.core"));
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
5
|
-
define(["./foundation.core"
|
5
|
+
define(["jquery", "./foundation.core"], factory);
|
6
6
|
else if(typeof exports === 'object')
|
7
|
-
exports["
|
7
|
+
exports["__FOUNDATION_EXTERNAL__"] = factory(require("jquery"), require("./foundation.core"));
|
8
8
|
else
|
9
|
-
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"]
|
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 = 28);
|
95
|
-
/******/ })
|
96
|
-
/************************************************************************/
|
97
|
-
/******/ ({
|
98
|
-
|
99
|
-
/***/ "./foundation.core":
|
100
|
-
/*!****************************************************************************************************************************************************************!*\
|
101
|
-
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
|
102
|
-
\****************************************************************************************************************************************************************/
|
103
|
-
/*! no static exports found */
|
104
|
-
/***/ (function(module, exports) {
|
105
|
-
|
106
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
107
|
-
|
108
|
-
/***/ }),
|
109
|
-
|
110
|
-
/***/ "./js/entries/plugins/foundation.util.touch.js":
|
111
|
-
/*!*****************************************************!*\
|
112
|
-
!*** ./js/entries/plugins/foundation.util.touch.js ***!
|
113
|
-
\*****************************************************/
|
114
|
-
/*! exports provided: Foundation, Touch */
|
115
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
116
|
-
|
117
|
-
"use strict";
|
118
|
-
__webpack_require__.r(__webpack_exports__);
|
119
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
120
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
121
|
-
/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.touch */ "./js/foundation.util.touch.js");
|
122
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Touch", function() { return _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"]; });
|
123
|
-
|
124
|
-
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
125
|
-
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_2__);
|
126
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_2__["Foundation"]; });
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
_foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
131
|
-
window.Foundation.Touch = _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"];
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
/***/ }),
|
9
|
+
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"] = factory(root["jQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.core"]);
|
10
|
+
})(self, function(__WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_core__) {
|
11
|
+
return /******/ (function() { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
136
14
|
|
137
15
|
/***/ "./js/foundation.util.touch.js":
|
138
16
|
/*!*************************************!*\
|
139
17
|
!*** ./js/foundation.util.touch.js ***!
|
140
18
|
\*************************************/
|
141
|
-
|
142
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
19
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
143
20
|
|
144
|
-
"use strict";
|
145
21
|
__webpack_require__.r(__webpack_exports__);
|
146
|
-
/* harmony export
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
23
|
+
/* harmony export */ Touch: function() { return /* binding */ Touch; }
|
24
|
+
/* harmony export */ });
|
147
25
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
148
26
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
149
|
-
function
|
150
|
-
|
151
|
-
function _defineProperties(
|
152
|
-
|
153
|
-
function
|
154
|
-
|
27
|
+
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); }
|
28
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
29
|
+
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); } }
|
30
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
31
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
32
|
+
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); }
|
155
33
|
//**************************************************
|
156
34
|
//**Work inspired by multiple jquery swipe plugins**
|
157
35
|
//**Done by Yohai Ararat ***************************
|
158
36
|
//**************************************************
|
159
37
|
|
38
|
+
|
160
39
|
var Touch = {};
|
161
40
|
var startPosX,
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
didMoved = false;
|
168
|
-
|
41
|
+
startTime,
|
42
|
+
elapsedTime,
|
43
|
+
startEvent,
|
44
|
+
isMoving = false,
|
45
|
+
didMoved = false;
|
169
46
|
function onTouchEnd(e) {
|
170
47
|
this.removeEventListener('touchmove', onTouchMove);
|
171
|
-
this.removeEventListener('touchend', onTouchEnd);
|
48
|
+
this.removeEventListener('touchend', onTouchEnd);
|
172
49
|
|
50
|
+
// If the touch did not move, consider it as a "tap"
|
173
51
|
if (!didMoved) {
|
174
|
-
var tapEvent = jquery__WEBPACK_IMPORTED_MODULE_0___default.
|
52
|
+
var tapEvent = jquery__WEBPACK_IMPORTED_MODULE_0___default().Event('tap', startEvent || e);
|
175
53
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(tapEvent);
|
176
54
|
}
|
177
|
-
|
178
55
|
startEvent = null;
|
179
56
|
isMoving = false;
|
180
57
|
didMoved = false;
|
181
58
|
}
|
182
|
-
|
183
59
|
function onTouchMove(e) {
|
184
|
-
if (jquery__WEBPACK_IMPORTED_MODULE_0___default.
|
60
|
+
if (true === (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).preventDefault) {
|
185
61
|
e.preventDefault();
|
186
62
|
}
|
187
|
-
|
188
63
|
if (isMoving) {
|
189
64
|
var x = e.touches[0].pageX;
|
190
|
-
var y = e.touches[0].pageY;
|
65
|
+
// var y = e.touches[0].pageY;
|
191
66
|
var dx = startPosX - x;
|
192
|
-
var dy = startPosY - y;
|
67
|
+
// var dy = startPosY - y;
|
193
68
|
var dir;
|
194
69
|
didMoved = true;
|
195
70
|
elapsedTime = new Date().getTime() - startTime;
|
196
|
-
|
197
|
-
if (Math.abs(dx) >= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.moveThreshold && elapsedTime <= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.timeThreshold) {
|
71
|
+
if (Math.abs(dx) >= (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).moveThreshold && elapsedTime <= (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).timeThreshold) {
|
198
72
|
dir = dx > 0 ? 'left' : 'right';
|
199
|
-
}
|
73
|
+
}
|
74
|
+
// else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {
|
200
75
|
// dir = dy > 0 ? 'down' : 'up';
|
201
76
|
// }
|
202
|
-
|
203
|
-
|
204
77
|
if (dir) {
|
205
78
|
e.preventDefault();
|
206
79
|
onTouchEnd.apply(this, arguments);
|
207
|
-
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default.
|
80
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default().Event('swipe', Object.assign({}, e)), dir).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default().Event("swipe".concat(dir), Object.assign({}, e)));
|
208
81
|
}
|
209
82
|
}
|
210
83
|
}
|
211
|
-
|
212
84
|
function onTouchStart(e) {
|
213
|
-
if (e.touches.length
|
85
|
+
if (e.touches.length === 1) {
|
214
86
|
startPosX = e.touches[0].pageX;
|
215
|
-
startPosY = e.touches[0].pageY;
|
216
87
|
startEvent = e;
|
217
88
|
isMoving = true;
|
218
89
|
didMoved = false;
|
219
90
|
startTime = new Date().getTime();
|
220
|
-
this.addEventListener('touchmove', onTouchMove,
|
91
|
+
this.addEventListener('touchmove', onTouchMove, {
|
92
|
+
passive: true === (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe).preventDefault
|
93
|
+
});
|
221
94
|
this.addEventListener('touchend', onTouchEnd, false);
|
222
95
|
}
|
223
96
|
}
|
224
|
-
|
225
97
|
function init() {
|
226
|
-
this.addEventListener && this.addEventListener('touchstart', onTouchStart,
|
227
|
-
|
228
|
-
|
229
|
-
function teardown() {
|
230
|
-
this.removeEventListener('touchstart', onTouchStart);
|
98
|
+
this.addEventListener && this.addEventListener('touchstart', onTouchStart, {
|
99
|
+
passive: true
|
100
|
+
});
|
231
101
|
}
|
232
102
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
103
|
+
// function teardown() {
|
104
|
+
// this.removeEventListener('touchstart', onTouchStart);
|
105
|
+
// }
|
106
|
+
var SpotSwipe = /*#__PURE__*/function () {
|
107
|
+
function SpotSwipe() {
|
237
108
|
_classCallCheck(this, SpotSwipe);
|
238
|
-
|
239
109
|
this.version = '1.0.0';
|
240
110
|
this.enabled = 'ontouchstart' in document.documentElement;
|
241
111
|
this.preventDefault = false;
|
242
112
|
this.moveThreshold = 75;
|
243
113
|
this.timeThreshold = 200;
|
244
|
-
this.$ = $;
|
245
|
-
|
246
114
|
this._init();
|
247
115
|
}
|
248
|
-
|
249
|
-
_createClass(SpotSwipe, [{
|
116
|
+
return _createClass(SpotSwipe, [{
|
250
117
|
key: "_init",
|
251
118
|
value: function _init() {
|
252
|
-
|
253
|
-
$.event.special.swipe = {
|
119
|
+
(jquery__WEBPACK_IMPORTED_MODULE_0___default().event).special.swipe = {
|
254
120
|
setup: init
|
255
121
|
};
|
256
|
-
|
122
|
+
(jquery__WEBPACK_IMPORTED_MODULE_0___default().event).special.tap = {
|
257
123
|
setup: init
|
258
124
|
};
|
259
|
-
|
260
|
-
|
125
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default().each(['left', 'up', 'down', 'right'], function () {
|
126
|
+
(jquery__WEBPACK_IMPORTED_MODULE_0___default().event).special["swipe".concat(this)] = {
|
261
127
|
setup: function setup() {
|
262
|
-
|
128
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).on('swipe', (jquery__WEBPACK_IMPORTED_MODULE_0___default().noop));
|
263
129
|
}
|
264
130
|
};
|
265
131
|
});
|
266
132
|
}
|
267
133
|
}]);
|
268
|
-
|
269
|
-
return SpotSwipe;
|
270
134
|
}();
|
271
135
|
/****************************************************
|
272
136
|
* As far as I can tell, both setupSpotSwipe and *
|
@@ -274,37 +138,32 @@ function () {
|
|
274
138
|
* because they directly replace functions & *
|
275
139
|
* values, and do not add event handlers directly. *
|
276
140
|
****************************************************/
|
277
|
-
|
278
|
-
|
279
|
-
Touch.setupSpotSwipe = function ($) {
|
280
|
-
$.spotSwipe = new SpotSwipe($);
|
141
|
+
Touch.setupSpotSwipe = function () {
|
142
|
+
(jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe) = new SpotSwipe((jquery__WEBPACK_IMPORTED_MODULE_0___default()));
|
281
143
|
};
|
144
|
+
|
282
145
|
/****************************************************
|
283
146
|
* Method for adding pseudo drag events to elements *
|
284
147
|
***************************************************/
|
285
|
-
|
286
|
-
|
287
|
-
Touch.setupTouchHandler = function ($) {
|
288
|
-
$.fn.addTouch = function () {
|
148
|
+
Touch.setupTouchHandler = function () {
|
149
|
+
(jquery__WEBPACK_IMPORTED_MODULE_0___default().fn).addTouch = function () {
|
289
150
|
this.each(function (i, el) {
|
290
|
-
|
151
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(el).bind('touchstart touchmove touchend touchcancel', function (event) {
|
291
152
|
//we pass the original event object because the jQuery event
|
292
153
|
//object is normalized to w3c specs and does not provide the TouchList
|
293
154
|
handleTouch(event);
|
294
155
|
});
|
295
156
|
});
|
296
|
-
|
297
157
|
var handleTouch = function handleTouch(event) {
|
298
158
|
var touches = event.changedTouches,
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
159
|
+
first = touches[0],
|
160
|
+
eventTypes = {
|
161
|
+
touchstart: 'mousedown',
|
162
|
+
touchmove: 'mousemove',
|
163
|
+
touchend: 'mouseup'
|
164
|
+
},
|
165
|
+
type = eventTypes[event.type],
|
166
|
+
simulatedEvent;
|
308
167
|
if ('MouseEvent' in window && typeof window.MouseEvent === 'function') {
|
309
168
|
simulatedEvent = new window.MouseEvent(type, {
|
310
169
|
'bubbles': true,
|
@@ -316,36 +175,29 @@ Touch.setupTouchHandler = function ($) {
|
|
316
175
|
});
|
317
176
|
} else {
|
318
177
|
simulatedEvent = document.createEvent('MouseEvent');
|
319
|
-
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0
|
320
|
-
/*left*/
|
321
|
-
, null);
|
178
|
+
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 /*left*/, null);
|
322
179
|
}
|
323
|
-
|
324
180
|
first.target.dispatchEvent(simulatedEvent);
|
325
181
|
};
|
326
182
|
};
|
327
183
|
};
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
Touch.
|
332
|
-
Touch.setupTouchHandler($);
|
184
|
+
Touch.init = function () {
|
185
|
+
if (typeof (jquery__WEBPACK_IMPORTED_MODULE_0___default().spotSwipe) === 'undefined') {
|
186
|
+
Touch.setupSpotSwipe((jquery__WEBPACK_IMPORTED_MODULE_0___default()));
|
187
|
+
Touch.setupTouchHandler((jquery__WEBPACK_IMPORTED_MODULE_0___default()));
|
333
188
|
}
|
334
189
|
};
|
335
190
|
|
336
191
|
|
337
|
-
|
338
192
|
/***/ }),
|
339
193
|
|
340
|
-
/***/
|
341
|
-
|
342
|
-
!***
|
343
|
-
|
344
|
-
|
345
|
-
/***/ (function(module, exports, __webpack_require__) {
|
346
|
-
|
347
|
-
module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/foundation-sites/js/entries/plugins/foundation.util.touch.js */"./js/entries/plugins/foundation.util.touch.js");
|
194
|
+
/***/ "./foundation.core":
|
195
|
+
/*!****************************************************************************************************************************************************************!*\
|
196
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
|
197
|
+
\****************************************************************************************************************************************************************/
|
198
|
+
/***/ (function(module) {
|
348
199
|
|
200
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
349
201
|
|
350
202
|
/***/ }),
|
351
203
|
|
@@ -353,13 +205,105 @@ module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/fo
|
|
353
205
|
/*!********************************************************************************************!*\
|
354
206
|
!*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
|
355
207
|
\********************************************************************************************/
|
356
|
-
|
357
|
-
/***/ (function(module, exports) {
|
208
|
+
/***/ (function(module) {
|
358
209
|
|
359
210
|
module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
360
211
|
|
361
212
|
/***/ })
|
362
213
|
|
363
|
-
/******/
|
214
|
+
/******/ });
|
215
|
+
/************************************************************************/
|
216
|
+
/******/ // The module cache
|
217
|
+
/******/ var __webpack_module_cache__ = {};
|
218
|
+
/******/
|
219
|
+
/******/ // The require function
|
220
|
+
/******/ function __webpack_require__(moduleId) {
|
221
|
+
/******/ // Check if module is in cache
|
222
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
223
|
+
/******/ if (cachedModule !== undefined) {
|
224
|
+
/******/ return cachedModule.exports;
|
225
|
+
/******/ }
|
226
|
+
/******/ // Create a new module (and put it into the cache)
|
227
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
228
|
+
/******/ // no module.id needed
|
229
|
+
/******/ // no module.loaded needed
|
230
|
+
/******/ exports: {}
|
231
|
+
/******/ };
|
232
|
+
/******/
|
233
|
+
/******/ // Execute the module function
|
234
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
235
|
+
/******/
|
236
|
+
/******/ // Return the exports of the module
|
237
|
+
/******/ return module.exports;
|
238
|
+
/******/ }
|
239
|
+
/******/
|
240
|
+
/************************************************************************/
|
241
|
+
/******/ /* webpack/runtime/compat get default export */
|
242
|
+
/******/ !function() {
|
243
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
244
|
+
/******/ __webpack_require__.n = function(module) {
|
245
|
+
/******/ var getter = module && module.__esModule ?
|
246
|
+
/******/ function() { return module['default']; } :
|
247
|
+
/******/ function() { return module; };
|
248
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
249
|
+
/******/ return getter;
|
250
|
+
/******/ };
|
251
|
+
/******/ }();
|
252
|
+
/******/
|
253
|
+
/******/ /* webpack/runtime/define property getters */
|
254
|
+
/******/ !function() {
|
255
|
+
/******/ // define getter functions for harmony exports
|
256
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
257
|
+
/******/ for(var key in definition) {
|
258
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
259
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
260
|
+
/******/ }
|
261
|
+
/******/ }
|
262
|
+
/******/ };
|
263
|
+
/******/ }();
|
264
|
+
/******/
|
265
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
266
|
+
/******/ !function() {
|
267
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
268
|
+
/******/ }();
|
269
|
+
/******/
|
270
|
+
/******/ /* webpack/runtime/make namespace object */
|
271
|
+
/******/ !function() {
|
272
|
+
/******/ // define __esModule on exports
|
273
|
+
/******/ __webpack_require__.r = function(exports) {
|
274
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
275
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
276
|
+
/******/ }
|
277
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
278
|
+
/******/ };
|
279
|
+
/******/ }();
|
280
|
+
/******/
|
281
|
+
/************************************************************************/
|
282
|
+
var __webpack_exports__ = {};
|
283
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
284
|
+
!function() {
|
285
|
+
/*!*****************************************************!*\
|
286
|
+
!*** ./js/entries/plugins/foundation.util.touch.js ***!
|
287
|
+
\*****************************************************/
|
288
|
+
__webpack_require__.r(__webpack_exports__);
|
289
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
290
|
+
/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_2__.Foundation; },
|
291
|
+
/* harmony export */ Touch: function() { return /* reexport safe */ _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__.Touch; }
|
292
|
+
/* harmony export */ });
|
293
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
294
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
295
|
+
/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.touch */ "./js/foundation.util.touch.js");
|
296
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
297
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_2__);
|
298
|
+
|
299
|
+
|
300
|
+
_foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__.Touch.init((jquery__WEBPACK_IMPORTED_MODULE_0___default()));
|
301
|
+
window.Foundation.Touch = _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__.Touch;
|
302
|
+
|
303
|
+
|
304
|
+
}();
|
305
|
+
/******/ return __webpack_exports__;
|
306
|
+
/******/ })()
|
307
|
+
;
|
364
308
|
});
|
365
309
|
//# sourceMappingURL=foundation.util.touch.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.util.touch.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.util.touch.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Touch","init","$","window","Foundation","startPosX","startPosY","startTime","elapsedTime","startEvent","isMoving","didMoved","onTouchEnd","e","removeEventListener","onTouchMove","tapEvent","Event","trigger","spotSwipe","preventDefault","x","touches","pageX","y","pageY","dx","dy","dir","Date","getTime","Math","abs","moveThreshold","timeThreshold","apply","arguments","Object","assign","onTouchStart","length","addEventListener","teardown","SpotSwipe","version","enabled","document","documentElement","_init","event","special","swipe","setup","tap","each","on","noop","setupSpotSwipe","setupTouchHandler","fn","addTouch","i","el","bind","handleTouch","changedTouches","first","eventTypes","touchstart","touchmove","touchend","type","simulatedEvent","MouseEvent","screenX","screenY","clientX","clientY","createEvent","initMouseEvent","target","dispatchEvent"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B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AACLL,sBAAc,GAAG1B,QAAQ,CAACgC,WAAT,CAAqB,YAArB,CAAjB;AACAN,sBAAc,CAACO,cAAf,CAA8BR,IAA9B,EAAoC,IAApC,EAA0C,IAA1C,EAAgDpE,MAAhD,EAAwD,CAAxD,EAA2D+D,KAAK,CAACQ,OAAjE,EAA0ER,KAAK,CAACS,OAAhF,EAAyFT,KAAK,CAACU,OAA/F,EAAwGV,KAAK,CAACW,OAA9G,EAAuH,KAAvH,EAA8H,KAA9H,EAAqI,KAArI,EAA4I,KAA5I,EAAmJ;AAAC;AAApJ,UAA8J,IAA9J;AACD;;AACDX,WAAK,CAACc,MAAN,CAAaC,aAAb,CAA2BT,cAA3B;AACD,KA1BD;AA2BD,GApCD;AAqCD,CAtCD;;AAwCAxE,KAAK,CAACC,IAAN,GAAa,UAAUC,CAAV,EAAa;AAExB,MAAG,OAAOA,CAAC,CAACiB,SAAT,KAAwB,WAA3B,EAAwC;AACtCnB,SAAK,CAACyD,cAAN,CAAqBvD,CAArB;AACAF,SAAK,CAAC0D,iBAAN,CAAwBxD,CAAxB;AACD;AACF,CAND;;;;;;;;;;;;;;;;;;;;;;;;;AChKA,oD","file":"foundation.util.touch.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.util.touch\"] = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.touch\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 28);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","import $ from 'jquery';\n\nimport { Touch } from '../../foundation.util.touch';\n\nTouch.init($);\n\nwindow.Foundation.Touch = Touch;\n\nexport { Foundation } from './foundation.core';\nexport { Touch };\n","//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\nimport $ from 'jquery';\n\nvar Touch = {};\n\nvar startPosX,\n startPosY,\n startTime,\n elapsedTime,\n startEvent,\n isMoving = false,\n didMoved = false;\n\nfunction onTouchEnd(e) {\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n\n // If the touch did not move, consider it as a \"tap\"\n if (!didMoved) {\n var tapEvent = $.Event('tap', startEvent || e);\n $(this).trigger(tapEvent);\n }\n\n startEvent = null;\n isMoving = false;\n didMoved = false;\n}\n\nfunction onTouchMove(e) {\n if ($.spotSwipe.preventDefault) { e.preventDefault(); }\n\n if(isMoving) {\n var x = e.touches[0].pageX;\n var y = e.touches[0].pageY;\n var dx = startPosX - x;\n var dy = startPosY - y;\n var dir;\n didMoved = true;\n elapsedTime = new Date().getTime() - startTime;\n if(Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if(dir) {\n e.preventDefault();\n onTouchEnd.apply(this, arguments);\n $(this)\n .trigger($.Event('swipe', Object.assign({}, e)), dir)\n .trigger($.Event(`swipe${dir}`, Object.assign({}, e)));\n }\n }\n\n}\n\nfunction onTouchStart(e) {\n\n if (e.touches.length == 1) {\n startPosX = e.touches[0].pageX;\n startPosY = e.touches[0].pageY;\n startEvent = e;\n isMoving = true;\n didMoved = false;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, false);\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, false);\n}\n\nfunction teardown() {\n this.removeEventListener('touchstart', onTouchStart);\n}\n\nclass SpotSwipe {\n constructor($) {\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this.$ = $;\n this._init();\n }\n\n _init() {\n var $ = this.$;\n $.event.special.swipe = { setup: init };\n $.event.special.tap = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special[`swipe${this}`] = { setup: function(){\n $(this).on('swipe', $.noop);\n } };\n });\n }\n}\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function($) {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function($) {\n $.fn.addTouch = function(){\n this.each(function(i,el){\n $(el).bind('touchstart touchmove touchend touchcancel', function(event) {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function(event){\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent\n ;\n\n if('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function ($) {\n\n if(typeof($.spotSwipe) === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\nexport {Touch};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"foundation.util.touch.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;;AAEuB;AAEvB,IAAIC,KAAK,GAAG,CAAC,CAAC;AAEd,IAAIC,SAAS;EACTC,SAAS;EACTC,WAAW;EACXC,UAAU;EACVC,QAAQ,GAAG,KAAK;EAChBC,QAAQ,GAAG,KAAK;AAEpB,SAASC,UAAUA,CAACC,CAAC,EAAE;EACrB,IAAI,CAACC,mBAAmB,CAAC,WAAW,EAAEC,WAAW,CAAC;EAClD,IAAI,CAACD,mBAAmB,CAAC,UAAU,EAAEF,UAAU,CAAC;;EAEhD;EACA,IAAI,CAACD,QAAQ,EAAE;IACb,IAAIK,QAAQ,GAAGZ,mDAAO,CAAC,KAAK,EAAEK,UAAU,IAAII,CAAC,CAAC;IAC9CT,6CAAC,CAAC,IAAI,CAAC,CAACc,OAAO,CAACF,QAA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gD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;ACNuB;AAE6B;AAEpDC,yDAAK,CAACoC,IAAI,CAACrC,+CAAC,CAAC;AAEbwE,MAAM,CAACU,UAAU,CAACjF,KAAK,GAAGA,yDAAK;AAEgB","sources":["webpack://__FOUNDATION_EXTERNAL__/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__/./js/foundation.util.touch.js","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}","webpack://__FOUNDATION_EXTERNAL__/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/compat get default export","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/define property getters","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/hasOwnProperty shorthand","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/make namespace object","webpack://__FOUNDATION_EXTERNAL__/./js/entries/plugins/foundation.util.touch.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jquery\"), require(\"./foundation.core\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"jquery\", \"./foundation.core\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"__FOUNDATION_EXTERNAL__\"] = factory(require(\"jquery\"), require(\"./foundation.core\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.touch\"] = factory(root[\"jQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"]);\n})(self, function(__WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_core__) {\nreturn ","//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\nimport $ from 'jquery';\n\nvar Touch = {};\n\nvar startPosX,\n startTime,\n elapsedTime,\n startEvent,\n isMoving = false,\n didMoved = false;\n\nfunction onTouchEnd(e) {\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n\n // If the touch did not move, consider it as a \"tap\"\n if (!didMoved) {\n var tapEvent = $.Event('tap', startEvent || e);\n $(this).trigger(tapEvent);\n }\n\n startEvent = null;\n isMoving = false;\n didMoved = false;\n}\n\nfunction onTouchMove(e) {\n if (true === $.spotSwipe.preventDefault) { e.preventDefault(); }\n\n if(isMoving) {\n var x = e.touches[0].pageX;\n // var y = e.touches[0].pageY;\n var dx = startPosX - x;\n // var dy = startPosY - y;\n var dir;\n didMoved = true;\n elapsedTime = new Date().getTime() - startTime;\n if(Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if(dir) {\n e.preventDefault();\n onTouchEnd.apply(this, arguments);\n $(this)\n .trigger($.Event('swipe', Object.assign({}, e)), dir)\n .trigger($.Event(`swipe${dir}`, Object.assign({}, e)));\n }\n }\n\n}\n\nfunction onTouchStart(e) {\n\n if (e.touches.length === 1) {\n startPosX = e.touches[0].pageX;\n startEvent = e;\n isMoving = true;\n didMoved = false;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, { passive : true === $.spotSwipe.preventDefault });\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, { passive : true });\n}\n\n// function teardown() {\n// this.removeEventListener('touchstart', onTouchStart);\n// }\n\nclass SpotSwipe {\n constructor() {\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this._init();\n }\n\n _init() {\n $.event.special.swipe = { setup: init };\n $.event.special.tap = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special[`swipe${this}`] = { setup: function(){\n $(this).on('swipe', $.noop);\n } };\n });\n }\n}\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function() {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function() {\n $.fn.addTouch = function(){\n this.each(function(i, el){\n $(el).bind('touchstart touchmove touchend touchcancel', function(event) {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function(event) {\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent\n ;\n\n if('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function () {\n if(typeof($.spotSwipe) === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\nexport {Touch};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import $ from 'jquery';\n\nimport { Touch } from '../../foundation.util.touch';\n\nTouch.init($);\n\nwindow.Foundation.Touch = Touch;\n\nexport { Foundation } from './foundation.core';\nexport { Touch };\n"],"names":["$","Touch","startPosX","startTime","elapsedTime","startEvent","isMoving","didMoved","onTouchEnd","e","removeEventListener","onTouchMove","tapEvent","Event","trigger","spotSwipe","preventDefault","x","touches","pageX","dx","dir","Date","getTime","Math","abs","moveThreshold","timeThreshold","apply","arguments","Object","assign","concat","onTouchStart","length","addEventListener","passive","init","SpotSwipe","_classCallCheck","version","enabled","document","documentElement","_init","_createClass","key","value","event","special","swipe","setup","tap","each","on","noop","setupSpotSwipe","setupTouchHandler","fn","addTouch","i","el","bind","handleTouch","changedTouches","first","eventTypes","touchstart","touchmove","touchend","type","simulatedEvent","window","MouseEvent","screenX","screenY","clientX","clientY","createEvent","initMouseEvent","target","dispatchEvent","Foundation"],"sourceRoot":""}
|