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,189 +1,27 @@
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
-
module.exports = factory(require("./foundation.
|
3
|
+
module.exports = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.keyboard"), require("./foundation.util.box"), require("./foundation.util.motion"), require("./foundation.util.touch"));
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
5
|
-
define(["./foundation.
|
5
|
+
define(["./foundation.core", "jquery", "./foundation.util.keyboard", "./foundation.util.box", "./foundation.util.motion", "./foundation.util.touch"], factory);
|
6
6
|
else if(typeof exports === 'object')
|
7
|
-
exports["
|
7
|
+
exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery"), require("./foundation.util.keyboard"), require("./foundation.util.box"), require("./foundation.util.motion"), require("./foundation.util.touch"));
|
8
8
|
else
|
9
|
-
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.dropdown"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.
|
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 = 4);
|
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
|
-
/***/ "./foundation.util.box":
|
111
|
-
/*!********************************************************************************************************************************************************************************!*\
|
112
|
-
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.box"],"amd":"./foundation.util.box","commonjs":"./foundation.util.box","commonjs2":"./foundation.util.box"} ***!
|
113
|
-
\********************************************************************************************************************************************************************************/
|
114
|
-
/*! no static exports found */
|
115
|
-
/***/ (function(module, exports) {
|
116
|
-
|
117
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_box__;
|
118
|
-
|
119
|
-
/***/ }),
|
120
|
-
|
121
|
-
/***/ "./foundation.util.keyboard":
|
122
|
-
/*!****************************************************************************************************************************************************************************************************!*\
|
123
|
-
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.keyboard"],"amd":"./foundation.util.keyboard","commonjs":"./foundation.util.keyboard","commonjs2":"./foundation.util.keyboard"} ***!
|
124
|
-
\****************************************************************************************************************************************************************************************************/
|
125
|
-
/*! no static exports found */
|
126
|
-
/***/ (function(module, exports) {
|
127
|
-
|
128
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__;
|
129
|
-
|
130
|
-
/***/ }),
|
131
|
-
|
132
|
-
/***/ "./foundation.util.motion":
|
133
|
-
/*!********************************************************************************************************************************************************************************************!*\
|
134
|
-
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***!
|
135
|
-
\********************************************************************************************************************************************************************************************/
|
136
|
-
/*! no static exports found */
|
137
|
-
/***/ (function(module, exports) {
|
138
|
-
|
139
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;
|
140
|
-
|
141
|
-
/***/ }),
|
142
|
-
|
143
|
-
/***/ "./foundation.util.touch":
|
144
|
-
/*!****************************************************************************************************************************************************************************************!*\
|
145
|
-
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.touch"],"amd":"./foundation.util.touch","commonjs":"./foundation.util.touch","commonjs2":"./foundation.util.touch"} ***!
|
146
|
-
\****************************************************************************************************************************************************************************************/
|
147
|
-
/*! no static exports found */
|
148
|
-
/***/ (function(module, exports) {
|
149
|
-
|
150
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__;
|
151
|
-
|
152
|
-
/***/ }),
|
153
|
-
|
154
|
-
/***/ "./js/entries/plugins/foundation.dropdown.js":
|
155
|
-
/*!***************************************************!*\
|
156
|
-
!*** ./js/entries/plugins/foundation.dropdown.js ***!
|
157
|
-
\***************************************************/
|
158
|
-
/*! exports provided: Foundation, Dropdown */
|
159
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
160
|
-
|
161
|
-
"use strict";
|
162
|
-
__webpack_require__.r(__webpack_exports__);
|
163
|
-
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
164
|
-
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
|
165
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
|
166
|
-
|
167
|
-
/* harmony import */ var _foundation_dropdown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.dropdown */ "./js/foundation.dropdown.js");
|
168
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Dropdown", function() { return _foundation_dropdown__WEBPACK_IMPORTED_MODULE_1__["Dropdown"]; });
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_dropdown__WEBPACK_IMPORTED_MODULE_1__["Dropdown"], 'Dropdown');
|
173
|
-
|
174
|
-
|
175
|
-
/***/ }),
|
9
|
+
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.dropdown"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.box"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"]);
|
10
|
+
})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__, __WEBPACK_EXTERNAL_MODULE__foundation_util_box__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__) {
|
11
|
+
return /******/ (function() { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
176
14
|
|
177
15
|
/***/ "./js/foundation.dropdown.js":
|
178
16
|
/*!***********************************!*\
|
179
17
|
!*** ./js/foundation.dropdown.js ***!
|
180
18
|
\***********************************/
|
181
|
-
|
182
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
19
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
183
20
|
|
184
|
-
"use strict";
|
185
21
|
__webpack_require__.r(__webpack_exports__);
|
186
|
-
/* harmony export
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
23
|
+
/* harmony export */ Dropdown: function() { return /* binding */ Dropdown; }
|
24
|
+
/* harmony export */ });
|
187
25
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
188
26
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
189
27
|
/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.keyboard */ "./foundation.util.keyboard");
|
@@ -194,29 +32,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
194
32
|
/* harmony import */ var _foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./foundation.util.triggers */ "./js/foundation.util.triggers.js");
|
195
33
|
/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./foundation.util.touch */ "./foundation.util.touch");
|
196
34
|
/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_touch__WEBPACK_IMPORTED_MODULE_5__);
|
197
|
-
|
198
|
-
|
199
|
-
function
|
200
|
-
|
201
|
-
function
|
202
|
-
|
203
|
-
function
|
204
|
-
|
205
|
-
function
|
206
|
-
|
207
|
-
function
|
208
|
-
|
209
|
-
function
|
210
|
-
|
211
|
-
function
|
212
|
-
|
213
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
214
|
-
|
215
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
216
|
-
|
217
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
218
|
-
|
219
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
35
|
+
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); }
|
36
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
37
|
+
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); } }
|
38
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
39
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
40
|
+
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); }
|
41
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
42
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
43
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
44
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
45
|
+
function _superPropGet(t, e, o, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), e, o); return 2 & r && "function" == typeof p ? function (t) { return p.apply(o, t); } : p; }
|
46
|
+
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
47
|
+
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
48
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
49
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
50
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
220
51
|
|
221
52
|
|
222
53
|
|
@@ -232,21 +63,15 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
|
|
232
63
|
* @requires foundation.util.touch
|
233
64
|
* @requires foundation.util.triggers
|
234
65
|
*/
|
235
|
-
|
236
|
-
var Dropdown =
|
237
|
-
/*#__PURE__*/
|
238
|
-
function (_Positionable) {
|
239
|
-
_inherits(Dropdown, _Positionable);
|
240
|
-
|
66
|
+
var Dropdown = /*#__PURE__*/function (_Positionable) {
|
241
67
|
function Dropdown() {
|
242
68
|
_classCallCheck(this, Dropdown);
|
243
|
-
|
244
|
-
return _possibleConstructorReturn(this, _getPrototypeOf(Dropdown).apply(this, arguments));
|
69
|
+
return _callSuper(this, Dropdown, arguments);
|
245
70
|
}
|
246
|
-
|
247
|
-
_createClass(Dropdown, [{
|
71
|
+
_inherits(Dropdown, _Positionable);
|
72
|
+
return _createClass(Dropdown, [{
|
248
73
|
key: "_setup",
|
249
|
-
|
74
|
+
value:
|
250
75
|
/**
|
251
76
|
* Creates a new instance of a dropdown.
|
252
77
|
* @class
|
@@ -255,29 +80,27 @@ function (_Positionable) {
|
|
255
80
|
* Object should be of the dropdown panel, rather than its anchor.
|
256
81
|
* @param {Object} options - Overrides to the default plugin settings.
|
257
82
|
*/
|
258
|
-
|
83
|
+
function _setup(element, options) {
|
259
84
|
this.$element = element;
|
260
|
-
this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.
|
85
|
+
this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, Dropdown.defaults, this.$element.data(), options);
|
261
86
|
this.className = 'Dropdown'; // ie9 back compat
|
262
|
-
// Touch and Triggers init are idempotent, just need to make sure they are initialized
|
263
|
-
|
264
|
-
_foundation_util_touch__WEBPACK_IMPORTED_MODULE_5__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
265
|
-
_foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__["Triggers"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
266
87
|
|
88
|
+
// Touch and Triggers init are idempotent, just need to make sure they are initialized
|
89
|
+
_foundation_util_touch__WEBPACK_IMPORTED_MODULE_5__.Touch.init((jquery__WEBPACK_IMPORTED_MODULE_0___default()));
|
90
|
+
_foundation_util_triggers__WEBPACK_IMPORTED_MODULE_4__.Triggers.init((jquery__WEBPACK_IMPORTED_MODULE_0___default()));
|
267
91
|
this._init();
|
268
|
-
|
269
|
-
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].register('Dropdown', {
|
92
|
+
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard.register('Dropdown', {
|
270
93
|
'ENTER': 'toggle',
|
271
94
|
'SPACE': 'toggle',
|
272
95
|
'ESCAPE': 'close'
|
273
96
|
});
|
274
97
|
}
|
98
|
+
|
275
99
|
/**
|
276
100
|
* Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor.
|
277
101
|
* @function
|
278
102
|
* @private
|
279
103
|
*/
|
280
|
-
|
281
104
|
}, {
|
282
105
|
key: "_init",
|
283
106
|
value: function _init() {
|
@@ -290,34 +113,27 @@ function (_Positionable) {
|
|
290
113
|
'aria-haspopup': true,
|
291
114
|
'aria-expanded': false
|
292
115
|
});
|
293
|
-
|
294
116
|
this._setCurrentAnchor(this.$anchors.first());
|
295
|
-
|
296
117
|
if (this.options.parentClass) {
|
297
118
|
this.$parent = this.$element.parents('.' + this.options.parentClass);
|
298
119
|
} else {
|
299
120
|
this.$parent = null;
|
300
|
-
}
|
301
|
-
|
121
|
+
}
|
302
122
|
|
123
|
+
// Set [aria-labelledby] on the Dropdown if it is not set
|
303
124
|
if (typeof this.$element.attr('aria-labelledby') === 'undefined') {
|
304
125
|
// Get the anchor ID or create one
|
305
126
|
if (typeof this.$currentAnchor.attr('id') === 'undefined') {
|
306
|
-
this.$currentAnchor.attr('id',
|
127
|
+
this.$currentAnchor.attr('id', (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__.GetYoDigits)(6, 'dd-anchor'));
|
307
128
|
}
|
308
|
-
|
309
|
-
;
|
310
129
|
this.$element.attr('aria-labelledby', this.$currentAnchor.attr('id'));
|
311
130
|
}
|
312
|
-
|
313
131
|
this.$element.attr({
|
314
132
|
'aria-hidden': 'true',
|
315
133
|
'data-yeti-box': $id,
|
316
134
|
'data-resize': $id
|
317
135
|
});
|
318
|
-
|
319
|
-
_get(_getPrototypeOf(Dropdown.prototype), "_init", this).call(this);
|
320
|
-
|
136
|
+
_superPropGet(Dropdown, "_init", this, 3)([]);
|
321
137
|
this._events();
|
322
138
|
}
|
323
139
|
}, {
|
@@ -325,7 +141,6 @@ function (_Positionable) {
|
|
325
141
|
value: function _getDefaultPosition() {
|
326
142
|
// handle legacy classnames
|
327
143
|
var position = this.$element[0].className.match(/(top|left|right|bottom)/g);
|
328
|
-
|
329
144
|
if (position) {
|
330
145
|
return position[0];
|
331
146
|
} else {
|
@@ -337,29 +152,26 @@ function (_Positionable) {
|
|
337
152
|
value: function _getDefaultAlignment() {
|
338
153
|
// handle legacy float approach
|
339
154
|
var horizontalPosition = /float-(\S+)/.exec(this.$currentAnchor.attr('class'));
|
340
|
-
|
341
155
|
if (horizontalPosition) {
|
342
156
|
return horizontalPosition[1];
|
343
157
|
}
|
344
|
-
|
345
|
-
return _get(_getPrototypeOf(Dropdown.prototype), "_getDefaultAlignment", this).call(this);
|
158
|
+
return _superPropGet(Dropdown, "_getDefaultAlignment", this, 3)([]);
|
346
159
|
}
|
160
|
+
|
347
161
|
/**
|
348
162
|
* Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true.
|
349
163
|
* Recursively calls itself if a collision is detected, with a new position class.
|
350
164
|
* @function
|
351
165
|
* @private
|
352
166
|
*/
|
353
|
-
|
354
167
|
}, {
|
355
168
|
key: "_setPosition",
|
356
169
|
value: function _setPosition() {
|
357
170
|
this.$element.removeClass("has-position-".concat(this.position, " has-alignment-").concat(this.alignment));
|
358
|
-
|
359
|
-
_get(_getPrototypeOf(Dropdown.prototype), "_setPosition", this).call(this, this.$currentAnchor, this.$element, this.$parent);
|
360
|
-
|
171
|
+
_superPropGet(Dropdown, "_setPosition", this, 3)([this.$currentAnchor, this.$element, this.$parent]);
|
361
172
|
this.$element.addClass("has-position-".concat(this.position, " has-alignment-").concat(this.alignment));
|
362
173
|
}
|
174
|
+
|
363
175
|
/**
|
364
176
|
* Make it a current anchor.
|
365
177
|
* Current anchor as the reference for the position of Dropdown panes.
|
@@ -367,24 +179,22 @@ function (_Positionable) {
|
|
367
179
|
* @function
|
368
180
|
* @private
|
369
181
|
*/
|
370
|
-
|
371
182
|
}, {
|
372
183
|
key: "_setCurrentAnchor",
|
373
184
|
value: function _setCurrentAnchor(el) {
|
374
185
|
this.$currentAnchor = jquery__WEBPACK_IMPORTED_MODULE_0___default()(el);
|
375
186
|
}
|
187
|
+
|
376
188
|
/**
|
377
189
|
* Adds event listeners to the element utilizing the triggers utility library.
|
378
190
|
* @function
|
379
191
|
* @private
|
380
192
|
*/
|
381
|
-
|
382
193
|
}, {
|
383
194
|
key: "_events",
|
384
195
|
value: function _events() {
|
385
196
|
var _this = this,
|
386
|
-
|
387
|
-
|
197
|
+
hasTouch = 'ontouchstart' in window || typeof window.ontouchstart !== 'undefined';
|
388
198
|
this.$element.on({
|
389
199
|
'open.zf.trigger': this.open.bind(this),
|
390
200
|
'close.zf.trigger': this.close.bind(this),
|
@@ -393,113 +203,95 @@ function (_Positionable) {
|
|
393
203
|
});
|
394
204
|
this.$anchors.off('click.zf.trigger').on('click.zf.trigger', function (e) {
|
395
205
|
_this._setCurrentAnchor(this);
|
396
|
-
|
397
|
-
if
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
// on 2nd click (dropown opened) the default action (e.g. follow a href) gets executed
|
206
|
+
if (
|
207
|
+
// if forceFollow false, always prevent default action
|
208
|
+
_this.options.forceFollow === false ||
|
209
|
+
// if forceFollow true and hover option true, only prevent default action on 1st click
|
210
|
+
// on 2nd click (dropown opened) the default action (e.g. follow a href) gets executed
|
211
|
+
hasTouch && _this.options.hover && _this.$element.hasClass('is-open') === false) {
|
403
212
|
e.preventDefault();
|
404
213
|
}
|
405
214
|
});
|
406
|
-
|
407
215
|
if (this.options.hover) {
|
408
216
|
this.$anchors.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () {
|
409
217
|
_this._setCurrentAnchor(this);
|
410
|
-
|
411
218
|
var bodyData = jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').data();
|
412
|
-
|
413
219
|
if (typeof bodyData.whatinput === 'undefined' || bodyData.whatinput === 'mouse') {
|
414
220
|
clearTimeout(_this.timeout);
|
415
221
|
_this.timeout = setTimeout(function () {
|
416
222
|
_this.open();
|
417
|
-
|
418
223
|
_this.$anchors.data('hover', true);
|
419
224
|
}, _this.options.hoverDelay);
|
420
225
|
}
|
421
|
-
}).on('mouseleave.zf.dropdown',
|
226
|
+
}).on('mouseleave.zf.dropdown', (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__.ignoreMousedisappear)(function () {
|
422
227
|
clearTimeout(_this.timeout);
|
423
228
|
_this.timeout = setTimeout(function () {
|
424
229
|
_this.close();
|
425
|
-
|
426
230
|
_this.$anchors.data('hover', false);
|
427
231
|
}, _this.options.hoverDelay);
|
428
232
|
}));
|
429
|
-
|
430
233
|
if (this.options.hoverPane) {
|
431
234
|
this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () {
|
432
235
|
clearTimeout(_this.timeout);
|
433
|
-
}).on('mouseleave.zf.dropdown',
|
236
|
+
}).on('mouseleave.zf.dropdown', (0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_2__.ignoreMousedisappear)(function () {
|
434
237
|
clearTimeout(_this.timeout);
|
435
238
|
_this.timeout = setTimeout(function () {
|
436
239
|
_this.close();
|
437
|
-
|
438
240
|
_this.$anchors.data('hover', false);
|
439
241
|
}, _this.options.hoverDelay);
|
440
242
|
}));
|
441
243
|
}
|
442
244
|
}
|
443
|
-
|
444
245
|
this.$anchors.add(this.$element).on('keydown.zf.dropdown', function (e) {
|
445
|
-
var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)
|
446
|
-
|
447
|
-
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"].handleKey(e, 'Dropdown', {
|
246
|
+
var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this);
|
247
|
+
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard.handleKey(e, 'Dropdown', {
|
448
248
|
open: function open() {
|
449
249
|
if ($target.is(_this.$anchors) && !$target.is('input, textarea')) {
|
450
250
|
_this.open();
|
451
|
-
|
452
251
|
_this.$element.attr('tabindex', -1).focus();
|
453
|
-
|
454
252
|
e.preventDefault();
|
455
253
|
}
|
456
254
|
},
|
457
255
|
close: function close() {
|
458
256
|
_this.close();
|
459
|
-
|
460
257
|
_this.$anchors.focus();
|
461
258
|
}
|
462
259
|
});
|
463
260
|
});
|
464
261
|
}
|
262
|
+
|
465
263
|
/**
|
466
264
|
* Adds an event handler to the body to close any dropdowns on a click.
|
467
265
|
* @function
|
468
266
|
* @private
|
469
267
|
*/
|
470
|
-
|
471
268
|
}, {
|
472
269
|
key: "_addBodyHandler",
|
473
270
|
value: function _addBodyHandler() {
|
474
271
|
var $body = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.body).not(this.$element),
|
475
|
-
|
476
|
-
|
272
|
+
_this = this;
|
477
273
|
$body.off('click.zf.dropdown tap.zf.dropdown').on('click.zf.dropdown tap.zf.dropdown', function (e) {
|
478
274
|
if (_this.$anchors.is(e.target) || _this.$anchors.find(e.target).length) {
|
479
275
|
return;
|
480
276
|
}
|
481
|
-
|
482
277
|
if (_this.$element.is(e.target) || _this.$element.find(e.target).length) {
|
483
278
|
return;
|
484
279
|
}
|
485
|
-
|
486
280
|
_this.close();
|
487
|
-
|
488
281
|
$body.off('click.zf.dropdown tap.zf.dropdown');
|
489
282
|
});
|
490
283
|
}
|
284
|
+
|
491
285
|
/**
|
492
286
|
* Opens the dropdown pane, and fires a bubbling event to close other dropdowns.
|
493
287
|
* @function
|
494
288
|
* @fires Dropdown#closeme
|
495
289
|
* @fires Dropdown#show
|
496
290
|
*/
|
497
|
-
|
498
291
|
}, {
|
499
292
|
key: "open",
|
500
293
|
value: function open() {
|
501
294
|
// var _this = this;
|
502
|
-
|
503
295
|
/**
|
504
296
|
* Fires to close other open dropdowns, typically when dropdown is opening
|
505
297
|
* @event Dropdown#closeme
|
@@ -507,72 +299,64 @@ function (_Positionable) {
|
|
507
299
|
this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));
|
508
300
|
this.$anchors.addClass('hover').attr({
|
509
301
|
'aria-expanded': true
|
510
|
-
});
|
302
|
+
});
|
303
|
+
// this.$element/*.show()*/;
|
511
304
|
|
512
305
|
this.$element.addClass('is-opening');
|
513
|
-
|
514
306
|
this._setPosition();
|
515
|
-
|
516
307
|
this.$element.removeClass('is-opening').addClass('is-open').attr({
|
517
308
|
'aria-hidden': false
|
518
309
|
});
|
519
|
-
|
520
310
|
if (this.options.autoFocus) {
|
521
|
-
var $focusable = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__
|
522
|
-
|
311
|
+
var $focusable = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard.findFocusable(this.$element);
|
523
312
|
if ($focusable.length) {
|
524
313
|
$focusable.eq(0).focus();
|
525
314
|
}
|
526
315
|
}
|
527
|
-
|
528
316
|
if (this.options.closeOnClick) {
|
529
317
|
this._addBodyHandler();
|
530
318
|
}
|
531
|
-
|
532
319
|
if (this.options.trapFocus) {
|
533
|
-
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__
|
320
|
+
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard.trapFocus(this.$element);
|
534
321
|
}
|
322
|
+
|
535
323
|
/**
|
536
324
|
* Fires once the dropdown is visible.
|
537
325
|
* @event Dropdown#show
|
538
326
|
*/
|
539
|
-
|
540
|
-
|
541
327
|
this.$element.trigger('show.zf.dropdown', [this.$element]);
|
542
328
|
}
|
329
|
+
|
543
330
|
/**
|
544
331
|
* Closes the open dropdown pane.
|
545
332
|
* @function
|
546
333
|
* @fires Dropdown#hide
|
547
334
|
*/
|
548
|
-
|
549
335
|
}, {
|
550
336
|
key: "close",
|
551
337
|
value: function close() {
|
552
338
|
if (!this.$element.hasClass('is-open')) {
|
553
339
|
return false;
|
554
340
|
}
|
555
|
-
|
556
341
|
this.$element.removeClass('is-open').attr({
|
557
342
|
'aria-hidden': true
|
558
343
|
});
|
559
344
|
this.$anchors.removeClass('hover').attr('aria-expanded', false);
|
345
|
+
|
560
346
|
/**
|
561
347
|
* Fires once the dropdown is no longer visible.
|
562
348
|
* @event Dropdown#hide
|
563
349
|
*/
|
564
|
-
|
565
350
|
this.$element.trigger('hide.zf.dropdown', [this.$element]);
|
566
|
-
|
567
351
|
if (this.options.trapFocus) {
|
568
|
-
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__
|
352
|
+
_foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard.releaseFocus(this.$element);
|
569
353
|
}
|
570
354
|
}
|
355
|
+
|
571
356
|
/**
|
572
357
|
* Toggles the dropdown pane's visibility.
|
573
358
|
* @function
|
574
359
|
*/
|
575
|
-
|
576
360
|
}, {
|
577
361
|
key: "toggle",
|
578
362
|
value: function toggle() {
|
@@ -583,11 +367,11 @@ function (_Positionable) {
|
|
583
367
|
this.open();
|
584
368
|
}
|
585
369
|
}
|
370
|
+
|
586
371
|
/**
|
587
372
|
* Destroys the dropdown.
|
588
373
|
* @function
|
589
374
|
*/
|
590
|
-
|
591
375
|
}, {
|
592
376
|
key: "_destroy",
|
593
377
|
value: function _destroy() {
|
@@ -596,10 +380,7 @@ function (_Positionable) {
|
|
596
380
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(document.body).off('click.zf.dropdown tap.zf.dropdown');
|
597
381
|
}
|
598
382
|
}]);
|
599
|
-
|
600
|
-
return Dropdown;
|
601
|
-
}(_foundation_positionable__WEBPACK_IMPORTED_MODULE_3__["Positionable"]);
|
602
|
-
|
383
|
+
}(_foundation_positionable__WEBPACK_IMPORTED_MODULE_3__.Positionable);
|
603
384
|
Dropdown.defaults = {
|
604
385
|
/**
|
605
386
|
* Class that designates bounding container of Dropdown (default: window)
|
@@ -608,7 +389,6 @@ Dropdown.defaults = {
|
|
608
389
|
* @default null
|
609
390
|
*/
|
610
391
|
parentClass: null,
|
611
|
-
|
612
392
|
/**
|
613
393
|
* Amount of time to delay opening a submenu on hover event.
|
614
394
|
* @option
|
@@ -616,7 +396,6 @@ Dropdown.defaults = {
|
|
616
396
|
* @default 250
|
617
397
|
*/
|
618
398
|
hoverDelay: 250,
|
619
|
-
|
620
399
|
/**
|
621
400
|
* Allow submenus to open on hover events
|
622
401
|
* @option
|
@@ -624,7 +403,6 @@ Dropdown.defaults = {
|
|
624
403
|
* @default false
|
625
404
|
*/
|
626
405
|
hover: false,
|
627
|
-
|
628
406
|
/**
|
629
407
|
* Don't close dropdown when hovering over dropdown pane
|
630
408
|
* @option
|
@@ -632,7 +410,6 @@ Dropdown.defaults = {
|
|
632
410
|
* @default false
|
633
411
|
*/
|
634
412
|
hoverPane: false,
|
635
|
-
|
636
413
|
/**
|
637
414
|
* Number of pixels between the dropdown pane and the triggering element on open.
|
638
415
|
* @option
|
@@ -640,7 +417,6 @@ Dropdown.defaults = {
|
|
640
417
|
* @default 0
|
641
418
|
*/
|
642
419
|
vOffset: 0,
|
643
|
-
|
644
420
|
/**
|
645
421
|
* Number of pixels between the dropdown pane and the triggering element on open.
|
646
422
|
* @option
|
@@ -648,7 +424,6 @@ Dropdown.defaults = {
|
|
648
424
|
* @default 0
|
649
425
|
*/
|
650
426
|
hOffset: 0,
|
651
|
-
|
652
427
|
/**
|
653
428
|
* Position of dropdown. Can be left, right, bottom, top, or auto.
|
654
429
|
* @option
|
@@ -656,7 +431,6 @@ Dropdown.defaults = {
|
|
656
431
|
* @default 'auto'
|
657
432
|
*/
|
658
433
|
position: 'auto',
|
659
|
-
|
660
434
|
/**
|
661
435
|
* Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto.
|
662
436
|
* @option
|
@@ -664,7 +438,6 @@ Dropdown.defaults = {
|
|
664
438
|
* @default 'auto'
|
665
439
|
*/
|
666
440
|
alignment: 'auto',
|
667
|
-
|
668
441
|
/**
|
669
442
|
* Allow overlap of container/window. If false, dropdown will first try to position as defined by data-position and data-alignment, but reposition if it would cause an overflow.
|
670
443
|
* @option
|
@@ -672,7 +445,6 @@ Dropdown.defaults = {
|
|
672
445
|
* @default false
|
673
446
|
*/
|
674
447
|
allowOverlap: false,
|
675
|
-
|
676
448
|
/**
|
677
449
|
* Allow overlap of only the bottom of the container. This is the most common
|
678
450
|
* behavior for dropdowns, allowing the dropdown to extend the bottom of the
|
@@ -682,7 +454,6 @@ Dropdown.defaults = {
|
|
682
454
|
* @default true
|
683
455
|
*/
|
684
456
|
allowBottomOverlap: true,
|
685
|
-
|
686
457
|
/**
|
687
458
|
* Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands.
|
688
459
|
* @option
|
@@ -690,7 +461,6 @@ Dropdown.defaults = {
|
|
690
461
|
* @default false
|
691
462
|
*/
|
692
463
|
trapFocus: false,
|
693
|
-
|
694
464
|
/**
|
695
465
|
* Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening.
|
696
466
|
* @option
|
@@ -698,7 +468,6 @@ Dropdown.defaults = {
|
|
698
468
|
* @default false
|
699
469
|
*/
|
700
470
|
autoFocus: false,
|
701
|
-
|
702
471
|
/**
|
703
472
|
* Allows a click on the body to close the dropdown.
|
704
473
|
* @option
|
@@ -706,7 +475,6 @@ Dropdown.defaults = {
|
|
706
475
|
* @default false
|
707
476
|
*/
|
708
477
|
closeOnClick: false,
|
709
|
-
|
710
478
|
/**
|
711
479
|
* If true the default action of the toggle (e.g. follow a link with href) gets executed on click. If hover option is also true the default action gets prevented on first click for mobile / touch devices and executed on second click.
|
712
480
|
* @option
|
@@ -723,36 +491,29 @@ Dropdown.defaults = {
|
|
723
491
|
/*!***************************************!*\
|
724
492
|
!*** ./js/foundation.positionable.js ***!
|
725
493
|
\***************************************/
|
726
|
-
|
727
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
494
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
728
495
|
|
729
|
-
"use strict";
|
730
496
|
__webpack_require__.r(__webpack_exports__);
|
731
|
-
/* harmony export
|
497
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
498
|
+
/* harmony export */ Positionable: function() { return /* binding */ Positionable; }
|
499
|
+
/* harmony export */ });
|
732
500
|
/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.util.box */ "./foundation.util.box");
|
733
501
|
/* harmony import */ var _foundation_util_box__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__);
|
734
|
-
/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.
|
502
|
+
/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core");
|
735
503
|
/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__);
|
736
|
-
|
737
|
-
|
738
|
-
function
|
739
|
-
|
740
|
-
function
|
741
|
-
|
742
|
-
function
|
743
|
-
|
744
|
-
function
|
745
|
-
|
746
|
-
function
|
747
|
-
|
748
|
-
function
|
749
|
-
|
750
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
751
|
-
|
752
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
753
|
-
|
754
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
755
|
-
|
504
|
+
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); }
|
505
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
506
|
+
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); } }
|
507
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
508
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
509
|
+
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); }
|
510
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
511
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
512
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
513
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
514
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
515
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
516
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
756
517
|
|
757
518
|
|
758
519
|
|
@@ -765,31 +526,23 @@ var ALIGNMENTS = {
|
|
765
526
|
'top': HORIZONTAL_ALIGNMENTS,
|
766
527
|
'bottom': HORIZONTAL_ALIGNMENTS
|
767
528
|
};
|
768
|
-
|
769
529
|
function nextItem(item, array) {
|
770
530
|
var currentIdx = array.indexOf(item);
|
771
|
-
|
772
531
|
if (currentIdx === array.length - 1) {
|
773
532
|
return array[0];
|
774
533
|
} else {
|
775
534
|
return array[currentIdx + 1];
|
776
535
|
}
|
777
536
|
}
|
778
|
-
|
779
|
-
var Positionable =
|
780
|
-
/*#__PURE__*/
|
781
|
-
function (_Plugin) {
|
782
|
-
_inherits(Positionable, _Plugin);
|
783
|
-
|
537
|
+
var Positionable = /*#__PURE__*/function (_Plugin) {
|
784
538
|
function Positionable() {
|
785
539
|
_classCallCheck(this, Positionable);
|
786
|
-
|
787
|
-
return _possibleConstructorReturn(this, _getPrototypeOf(Positionable).apply(this, arguments));
|
540
|
+
return _callSuper(this, Positionable, arguments);
|
788
541
|
}
|
789
|
-
|
790
|
-
_createClass(Positionable, [{
|
542
|
+
_inherits(Positionable, _Plugin);
|
543
|
+
return _createClass(Positionable, [{
|
791
544
|
key: "_init",
|
792
|
-
|
545
|
+
value:
|
793
546
|
/**
|
794
547
|
* Abstract class encapsulating the tether-like explicit positioning logic
|
795
548
|
* including repositioning based on overlap.
|
@@ -799,7 +552,8 @@ function (_Plugin) {
|
|
799
552
|
* generated) by explicitly declaring them.
|
800
553
|
*
|
801
554
|
**/
|
802
|
-
|
555
|
+
|
556
|
+
function _init() {
|
803
557
|
this.triedPositions = {};
|
804
558
|
this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position;
|
805
559
|
this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment;
|
@@ -817,20 +571,19 @@ function (_Plugin) {
|
|
817
571
|
switch (this.position) {
|
818
572
|
case 'bottom':
|
819
573
|
case 'top':
|
820
|
-
return
|
821
|
-
|
574
|
+
return (0,_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.rtl)() ? 'right' : 'left';
|
822
575
|
case 'left':
|
823
576
|
case 'right':
|
824
577
|
return 'bottom';
|
825
578
|
}
|
826
579
|
}
|
580
|
+
|
827
581
|
/**
|
828
582
|
* Adjusts the positionable possible positions by iterating through alignments
|
829
583
|
* and positions.
|
830
584
|
* @function
|
831
585
|
* @private
|
832
586
|
*/
|
833
|
-
|
834
587
|
}, {
|
835
588
|
key: "_reposition",
|
836
589
|
value: function _reposition() {
|
@@ -841,18 +594,17 @@ function (_Plugin) {
|
|
841
594
|
this._realign();
|
842
595
|
}
|
843
596
|
}
|
597
|
+
|
844
598
|
/**
|
845
599
|
* Adjusts the dropdown pane possible positions by iterating through alignments
|
846
600
|
* on the current position.
|
847
601
|
* @function
|
848
602
|
* @private
|
849
603
|
*/
|
850
|
-
|
851
604
|
}, {
|
852
605
|
key: "_realign",
|
853
606
|
value: function _realign() {
|
854
607
|
this._addTriedPosition(this.position, this.alignment);
|
855
|
-
|
856
608
|
this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position]);
|
857
609
|
}
|
858
610
|
}, {
|
@@ -865,24 +617,23 @@ function (_Plugin) {
|
|
865
617
|
key: "_positionsExhausted",
|
866
618
|
value: function _positionsExhausted() {
|
867
619
|
var isExhausted = true;
|
868
|
-
|
869
620
|
for (var i = 0; i < POSITIONS.length; i++) {
|
870
621
|
isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]);
|
871
622
|
}
|
872
|
-
|
873
623
|
return isExhausted;
|
874
624
|
}
|
875
625
|
}, {
|
876
626
|
key: "_alignmentsExhausted",
|
877
627
|
value: function _alignmentsExhausted(position) {
|
878
|
-
return this.triedPositions[position] && this.triedPositions[position].length
|
879
|
-
}
|
628
|
+
return this.triedPositions[position] && this.triedPositions[position].length === ALIGNMENTS[position].length;
|
629
|
+
}
|
630
|
+
|
631
|
+
// When we're trying to center, we don't want to apply offset that's going to
|
880
632
|
// take us just off center, so wrap around to return 0 for the appropriate
|
881
633
|
// offset in those alignments. TODO: Figure out if we want to make this
|
882
634
|
// configurable behavior... it feels more intuitive, especially for tooltips, but
|
883
635
|
// it's possible someone might actually want to start from center and then nudge
|
884
636
|
// slightly off.
|
885
|
-
|
886
637
|
}, {
|
887
638
|
key: "_getVOffset",
|
888
639
|
value: function _getVOffset() {
|
@@ -899,30 +650,24 @@ function (_Plugin) {
|
|
899
650
|
if ($anchor.attr('aria-expanded') === 'false') {
|
900
651
|
return false;
|
901
652
|
}
|
902
|
-
|
903
653
|
if (!this.options.allowOverlap) {
|
904
654
|
// restore original position & alignment before checking overlap
|
905
655
|
this.position = this.originalPosition;
|
906
656
|
this.alignment = this.originalAlignment;
|
907
657
|
}
|
908
|
-
|
909
|
-
$element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));
|
910
|
-
|
658
|
+
$element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));
|
911
659
|
if (!this.options.allowOverlap) {
|
912
|
-
var minOverlap = 100000000;
|
913
|
-
|
660
|
+
var minOverlap = 100000000;
|
661
|
+
// default coordinates to how we start, in case we can't figure out better
|
914
662
|
var minCoordinates = {
|
915
663
|
position: this.position,
|
916
664
|
alignment: this.alignment
|
917
665
|
};
|
918
|
-
|
919
666
|
while (!this._positionsExhausted()) {
|
920
|
-
var overlap = _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__
|
921
|
-
|
667
|
+
var overlap = _foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap);
|
922
668
|
if (overlap === 0) {
|
923
669
|
return;
|
924
670
|
}
|
925
|
-
|
926
671
|
if (overlap < minOverlap) {
|
927
672
|
minOverlap = overlap;
|
928
673
|
minCoordinates = {
|
@@ -930,24 +675,18 @@ function (_Plugin) {
|
|
930
675
|
alignment: this.alignment
|
931
676
|
};
|
932
677
|
}
|
933
|
-
|
934
678
|
this._reposition();
|
935
|
-
|
936
|
-
|
937
|
-
|
679
|
+
$element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));
|
680
|
+
}
|
681
|
+
// If we get through the entire loop, there was no non-overlapping
|
938
682
|
// position available. Pick the version with least overlap.
|
939
|
-
|
940
|
-
|
941
683
|
this.position = minCoordinates.position;
|
942
684
|
this.alignment = minCoordinates.alignment;
|
943
|
-
$element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__
|
685
|
+
$element.offset(_foundation_util_box__WEBPACK_IMPORTED_MODULE_0__.Box.GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));
|
944
686
|
}
|
945
687
|
}
|
946
688
|
}]);
|
947
|
-
|
948
|
-
return Positionable;
|
949
|
-
}(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__["Plugin"]);
|
950
|
-
|
689
|
+
}(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_1__.Plugin);
|
951
690
|
Positionable.defaults = {
|
952
691
|
/**
|
953
692
|
* Position of positionable relative to anchor. Can be left, right, bottom, top, or auto.
|
@@ -956,7 +695,6 @@ Positionable.defaults = {
|
|
956
695
|
* @default 'auto'
|
957
696
|
*/
|
958
697
|
position: 'auto',
|
959
|
-
|
960
698
|
/**
|
961
699
|
* Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto.
|
962
700
|
* @option
|
@@ -964,7 +702,6 @@ Positionable.defaults = {
|
|
964
702
|
* @default 'auto'
|
965
703
|
*/
|
966
704
|
alignment: 'auto',
|
967
|
-
|
968
705
|
/**
|
969
706
|
* Allow overlap of container/window. If false, dropdown positionable first
|
970
707
|
* try to position as defined by data-position and data-alignment, but
|
@@ -974,7 +711,6 @@ Positionable.defaults = {
|
|
974
711
|
* @default false
|
975
712
|
*/
|
976
713
|
allowOverlap: false,
|
977
|
-
|
978
714
|
/**
|
979
715
|
* Allow overlap of only the bottom of the container. This is the most common
|
980
716
|
* behavior for dropdowns, allowing the dropdown to extend the bottom of the
|
@@ -984,7 +720,6 @@ Positionable.defaults = {
|
|
984
720
|
* @default true
|
985
721
|
*/
|
986
722
|
allowBottomOverlap: true,
|
987
|
-
|
988
723
|
/**
|
989
724
|
* Number of pixels the positionable should be separated vertically from anchor
|
990
725
|
* @option
|
@@ -992,7 +727,6 @@ Positionable.defaults = {
|
|
992
727
|
* @default 0
|
993
728
|
*/
|
994
729
|
vOffset: 0,
|
995
|
-
|
996
730
|
/**
|
997
731
|
* Number of pixels the positionable should be separated horizontally from anchor
|
998
732
|
* @option
|
@@ -1009,44 +743,36 @@ Positionable.defaults = {
|
|
1009
743
|
/*!****************************************!*\
|
1010
744
|
!*** ./js/foundation.util.triggers.js ***!
|
1011
745
|
\****************************************/
|
1012
|
-
|
1013
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
746
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
1014
747
|
|
1015
|
-
"use strict";
|
1016
748
|
__webpack_require__.r(__webpack_exports__);
|
1017
|
-
/* harmony export
|
749
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
750
|
+
/* harmony export */ Triggers: function() { return /* binding */ Triggers; }
|
751
|
+
/* harmony export */ });
|
1018
752
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
1019
753
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
1020
754
|
/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core");
|
1021
755
|
/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__);
|
1022
756
|
/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./foundation.util.motion");
|
1023
757
|
/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__);
|
1024
|
-
|
1025
|
-
|
1026
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
1027
|
-
|
1028
|
-
|
758
|
+
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); }
|
1029
759
|
|
1030
760
|
|
1031
761
|
|
1032
762
|
var MutationObserver = function () {
|
1033
763
|
var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
|
1034
|
-
|
1035
764
|
for (var i = 0; i < prefixes.length; i++) {
|
1036
765
|
if ("".concat(prefixes[i], "MutationObserver") in window) {
|
1037
766
|
return window["".concat(prefixes[i], "MutationObserver")];
|
1038
767
|
}
|
1039
768
|
}
|
1040
|
-
|
1041
769
|
return false;
|
1042
770
|
}();
|
1043
|
-
|
1044
771
|
var triggers = function triggers(el, type) {
|
1045
772
|
el.data(type).split(' ').forEach(function (id) {
|
1046
773
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id))[type === 'close' ? 'trigger' : 'triggerHandler']("".concat(type, ".zf.trigger"), [el]);
|
1047
774
|
});
|
1048
775
|
};
|
1049
|
-
|
1050
776
|
var Triggers = {
|
1051
777
|
Listeners: {
|
1052
778
|
Basic: {},
|
@@ -1060,7 +786,6 @@ Triggers.Listeners.Basic = {
|
|
1060
786
|
},
|
1061
787
|
closeListener: function closeListener() {
|
1062
788
|
var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('close');
|
1063
|
-
|
1064
789
|
if (id) {
|
1065
790
|
triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'close');
|
1066
791
|
} else {
|
@@ -1069,7 +794,6 @@ Triggers.Listeners.Basic = {
|
|
1069
794
|
},
|
1070
795
|
toggleListener: function toggleListener() {
|
1071
796
|
var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle');
|
1072
|
-
|
1073
797
|
if (id) {
|
1074
798
|
triggers(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), 'toggle');
|
1075
799
|
} else {
|
@@ -1077,12 +801,12 @@ Triggers.Listeners.Basic = {
|
|
1077
801
|
}
|
1078
802
|
},
|
1079
803
|
closeableListener: function closeableListener(e) {
|
1080
|
-
var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable');
|
804
|
+
var animation = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('closable');
|
1081
805
|
|
806
|
+
// Only close the first closable element. See https://git.io/zf-7833
|
1082
807
|
e.stopPropagation();
|
1083
|
-
|
1084
808
|
if (animation !== '') {
|
1085
|
-
_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__
|
809
|
+
_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__.Motion.animateOut(jquery__WEBPACK_IMPORTED_MODULE_0___default()(this), animation, function () {
|
1086
810
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger('closed.zf');
|
1087
811
|
});
|
1088
812
|
} else {
|
@@ -1093,39 +817,40 @@ Triggers.Listeners.Basic = {
|
|
1093
817
|
var id = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle-focus');
|
1094
818
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(id)).triggerHandler('toggle.zf.trigger', [jquery__WEBPACK_IMPORTED_MODULE_0___default()(this)]);
|
1095
819
|
}
|
1096
|
-
};
|
820
|
+
};
|
1097
821
|
|
822
|
+
// Elements with [data-open] will reveal a plugin that supports it when clicked.
|
1098
823
|
Triggers.Initializers.addOpenListener = function ($elem) {
|
1099
824
|
$elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);
|
1100
825
|
$elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);
|
1101
|
-
};
|
1102
|
-
// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.
|
1103
|
-
|
826
|
+
};
|
1104
827
|
|
828
|
+
// Elements with [data-close] will close a plugin that supports it when clicked.
|
829
|
+
// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.
|
1105
830
|
Triggers.Initializers.addCloseListener = function ($elem) {
|
1106
831
|
$elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);
|
1107
832
|
$elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);
|
1108
|
-
};
|
1109
|
-
|
833
|
+
};
|
1110
834
|
|
835
|
+
// Elements with [data-toggle] will toggle a plugin that supports it when clicked.
|
1111
836
|
Triggers.Initializers.addToggleListener = function ($elem) {
|
1112
837
|
$elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);
|
1113
838
|
$elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);
|
1114
|
-
};
|
1115
|
-
|
839
|
+
};
|
1116
840
|
|
841
|
+
// Elements with [data-closable] will respond to close.zf.trigger events.
|
1117
842
|
Triggers.Initializers.addCloseableListener = function ($elem) {
|
1118
843
|
$elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);
|
1119
844
|
$elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);
|
1120
|
-
};
|
1121
|
-
|
845
|
+
};
|
1122
846
|
|
847
|
+
// Elements with [data-toggle-focus] will respond to coming in and out of focus
|
1123
848
|
Triggers.Initializers.addToggleFocusListener = function ($elem) {
|
1124
849
|
$elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);
|
1125
850
|
$elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);
|
1126
|
-
};
|
1127
|
-
|
851
|
+
};
|
1128
852
|
|
853
|
+
// More Global/complex listeners and triggers
|
1129
854
|
Triggers.Listeners.Global = {
|
1130
855
|
resizeListener: function resizeListener($nodes) {
|
1131
856
|
if (!MutationObserver) {
|
@@ -1133,9 +858,8 @@ Triggers.Listeners.Global = {
|
|
1133
858
|
$nodes.each(function () {
|
1134
859
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('resizeme.zf.trigger');
|
1135
860
|
});
|
1136
|
-
}
|
1137
|
-
|
1138
|
-
|
861
|
+
}
|
862
|
+
//trigger all listening elements and signal a resize event
|
1139
863
|
$nodes.attr('data-events', "resize");
|
1140
864
|
},
|
1141
865
|
scrollListener: function scrollListener($nodes) {
|
@@ -1144,9 +868,8 @@ Triggers.Listeners.Global = {
|
|
1144
868
|
$nodes.each(function () {
|
1145
869
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).triggerHandler('scrollme.zf.trigger');
|
1146
870
|
});
|
1147
|
-
}
|
1148
|
-
|
1149
|
-
|
871
|
+
}
|
872
|
+
//trigger all listening elements and signal a scroll event
|
1150
873
|
$nodes.attr('data-events', "scroll");
|
1151
874
|
},
|
1152
875
|
closeMeListener: function closeMeListener(e, pluginId) {
|
@@ -1154,17 +877,15 @@ Triggers.Listeners.Global = {
|
|
1154
877
|
var plugins = jquery__WEBPACK_IMPORTED_MODULE_0___default()("[data-".concat(plugin, "]")).not("[data-yeti-box=\"".concat(pluginId, "\"]"));
|
1155
878
|
plugins.each(function () {
|
1156
879
|
var _this = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this);
|
1157
|
-
|
1158
880
|
_this.triggerHandler('close.zf.trigger', [_this]);
|
1159
881
|
});
|
1160
|
-
}
|
1161
|
-
|
882
|
+
}
|
1162
883
|
};
|
1163
884
|
|
885
|
+
// Global, parses whole document.
|
1164
886
|
Triggers.Initializers.addClosemeListener = function (pluginName) {
|
1165
887
|
var yetiBoxes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-yeti-box]'),
|
1166
|
-
|
1167
|
-
|
888
|
+
plugNames = ['dropdown', 'tooltip', 'reveal'];
|
1168
889
|
if (pluginName) {
|
1169
890
|
if (typeof pluginName === 'string') {
|
1170
891
|
plugNames.push(pluginName);
|
@@ -1174,7 +895,6 @@ Triggers.Initializers.addClosemeListener = function (pluginName) {
|
|
1174
895
|
console.error('Plugin names must be strings');
|
1175
896
|
}
|
1176
897
|
}
|
1177
|
-
|
1178
898
|
if (yetiBoxes.length) {
|
1179
899
|
var listeners = plugNames.map(function (name) {
|
1180
900
|
return "closeme.zf.".concat(name);
|
@@ -1182,75 +902,63 @@ Triggers.Initializers.addClosemeListener = function (pluginName) {
|
|
1182
902
|
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);
|
1183
903
|
}
|
1184
904
|
};
|
1185
|
-
|
1186
905
|
function debounceGlobalListener(debounce, trigger, listener) {
|
1187
906
|
var timer,
|
1188
|
-
|
1189
|
-
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).
|
907
|
+
args = Array.prototype.slice.call(arguments, 3);
|
908
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on(trigger, function () {
|
1190
909
|
if (timer) {
|
1191
910
|
clearTimeout(timer);
|
1192
911
|
}
|
1193
|
-
|
1194
912
|
timer = setTimeout(function () {
|
1195
913
|
listener.apply(null, args);
|
1196
914
|
}, debounce || 10); //default time to emit scroll event
|
1197
915
|
});
|
1198
916
|
}
|
1199
|
-
|
1200
917
|
Triggers.Initializers.addResizeListener = function (debounce) {
|
1201
918
|
var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-resize]');
|
1202
|
-
|
1203
919
|
if ($nodes.length) {
|
1204
920
|
debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);
|
1205
921
|
}
|
1206
922
|
};
|
1207
|
-
|
1208
923
|
Triggers.Initializers.addScrollListener = function (debounce) {
|
1209
924
|
var $nodes = jquery__WEBPACK_IMPORTED_MODULE_0___default()('[data-scroll]');
|
1210
|
-
|
1211
925
|
if ($nodes.length) {
|
1212
926
|
debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);
|
1213
927
|
}
|
1214
928
|
};
|
1215
|
-
|
1216
929
|
Triggers.Initializers.addMutationEventsListener = function ($elem) {
|
1217
930
|
if (!MutationObserver) {
|
1218
931
|
return false;
|
1219
932
|
}
|
933
|
+
var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');
|
1220
934
|
|
1221
|
-
|
1222
|
-
|
935
|
+
//element callback
|
1223
936
|
var listeningElementsMutation = function listeningElementsMutation(mutationRecordsList) {
|
1224
|
-
var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target);
|
937
|
+
var $target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(mutationRecordsList[0].target);
|
1225
938
|
|
939
|
+
//trigger the event handler for the element depending on type
|
1226
940
|
switch (mutationRecordsList[0].type) {
|
1227
941
|
case "attributes":
|
1228
942
|
if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") {
|
1229
943
|
$target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);
|
1230
944
|
}
|
1231
|
-
|
1232
945
|
if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") {
|
1233
946
|
$target.triggerHandler('resizeme.zf.trigger', [$target]);
|
1234
947
|
}
|
1235
|
-
|
1236
948
|
if (mutationRecordsList[0].attributeName === "style") {
|
1237
949
|
$target.closest("[data-mutate]").attr("data-events", "mutate");
|
1238
950
|
$target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
1239
951
|
}
|
1240
|
-
|
1241
952
|
break;
|
1242
|
-
|
1243
953
|
case "childList":
|
1244
954
|
$target.closest("[data-mutate]").attr("data-events", "mutate");
|
1245
955
|
$target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
1246
956
|
break;
|
1247
|
-
|
1248
957
|
default:
|
1249
958
|
return false;
|
1250
959
|
//nothing
|
1251
960
|
}
|
1252
961
|
};
|
1253
|
-
|
1254
962
|
if ($nodes.length) {
|
1255
963
|
//for each element that needs to listen for resizing, scrolling, or mutation add a single observer
|
1256
964
|
for (var i = 0; i <= $nodes.length - 1; i++) {
|
@@ -1265,7 +973,6 @@ Triggers.Initializers.addMutationEventsListener = function ($elem) {
|
|
1265
973
|
}
|
1266
974
|
}
|
1267
975
|
};
|
1268
|
-
|
1269
976
|
Triggers.Initializers.addSimpleListeners = function () {
|
1270
977
|
var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document);
|
1271
978
|
Triggers.Initializers.addOpenListener($document);
|
@@ -1274,44 +981,78 @@ Triggers.Initializers.addSimpleListeners = function () {
|
|
1274
981
|
Triggers.Initializers.addCloseableListener($document);
|
1275
982
|
Triggers.Initializers.addToggleFocusListener($document);
|
1276
983
|
};
|
1277
|
-
|
1278
984
|
Triggers.Initializers.addGlobalListeners = function () {
|
1279
985
|
var $document = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document);
|
1280
986
|
Triggers.Initializers.addMutationEventsListener($document);
|
1281
|
-
Triggers.Initializers.addResizeListener();
|
987
|
+
Triggers.Initializers.addResizeListener(250);
|
1282
988
|
Triggers.Initializers.addScrollListener();
|
1283
989
|
Triggers.Initializers.addClosemeListener();
|
1284
990
|
};
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
if ($.triggersInitialized !== true) {
|
991
|
+
Triggers.init = function (__, Foundation) {
|
992
|
+
(0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.onLoad)(jquery__WEBPACK_IMPORTED_MODULE_0___default()(window), function () {
|
993
|
+
if ((jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) !== true) {
|
1289
994
|
Triggers.Initializers.addSimpleListeners();
|
1290
995
|
Triggers.Initializers.addGlobalListeners();
|
1291
|
-
|
996
|
+
(jquery__WEBPACK_IMPORTED_MODULE_0___default().triggersInitialized) = true;
|
1292
997
|
}
|
1293
998
|
});
|
1294
|
-
|
1295
999
|
if (Foundation) {
|
1296
|
-
Foundation.Triggers = Triggers;
|
1297
|
-
|
1000
|
+
Foundation.Triggers = Triggers;
|
1001
|
+
// Legacy included to be backwards compatible for now.
|
1298
1002
|
Foundation.IHearYou = Triggers.Initializers.addGlobalListeners;
|
1299
1003
|
}
|
1300
1004
|
};
|
1301
1005
|
|
1302
1006
|
|
1007
|
+
/***/ }),
|
1008
|
+
|
1009
|
+
/***/ "./foundation.core":
|
1010
|
+
/*!****************************************************************************************************************************************************************!*\
|
1011
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
|
1012
|
+
\****************************************************************************************************************************************************************/
|
1013
|
+
/***/ (function(module) {
|
1014
|
+
|
1015
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
1016
|
+
|
1017
|
+
/***/ }),
|
1018
|
+
|
1019
|
+
/***/ "./foundation.util.box":
|
1020
|
+
/*!********************************************************************************************************************************************************************************!*\
|
1021
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.box"],"amd":"./foundation.util.box","commonjs":"./foundation.util.box","commonjs2":"./foundation.util.box"} ***!
|
1022
|
+
\********************************************************************************************************************************************************************************/
|
1023
|
+
/***/ (function(module) {
|
1024
|
+
|
1025
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_box__;
|
1026
|
+
|
1027
|
+
/***/ }),
|
1028
|
+
|
1029
|
+
/***/ "./foundation.util.keyboard":
|
1030
|
+
/*!****************************************************************************************************************************************************************************************************!*\
|
1031
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.keyboard"],"amd":"./foundation.util.keyboard","commonjs":"./foundation.util.keyboard","commonjs2":"./foundation.util.keyboard"} ***!
|
1032
|
+
\****************************************************************************************************************************************************************************************************/
|
1033
|
+
/***/ (function(module) {
|
1034
|
+
|
1035
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_keyboard__;
|
1303
1036
|
|
1304
1037
|
/***/ }),
|
1305
1038
|
|
1306
|
-
/***/
|
1307
|
-
|
1308
|
-
!***
|
1309
|
-
|
1310
|
-
|
1311
|
-
/***/ (function(module, exports, __webpack_require__) {
|
1039
|
+
/***/ "./foundation.util.motion":
|
1040
|
+
/*!********************************************************************************************************************************************************************************************!*\
|
1041
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***!
|
1042
|
+
\********************************************************************************************************************************************************************************************/
|
1043
|
+
/***/ (function(module) {
|
1312
1044
|
|
1313
|
-
module.exports =
|
1045
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;
|
1046
|
+
|
1047
|
+
/***/ }),
|
1048
|
+
|
1049
|
+
/***/ "./foundation.util.touch":
|
1050
|
+
/*!****************************************************************************************************************************************************************************************!*\
|
1051
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.touch"],"amd":"./foundation.util.touch","commonjs":"./foundation.util.touch","commonjs2":"./foundation.util.touch"} ***!
|
1052
|
+
\****************************************************************************************************************************************************************************************/
|
1053
|
+
/***/ (function(module) {
|
1314
1054
|
|
1055
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_touch__;
|
1315
1056
|
|
1316
1057
|
/***/ }),
|
1317
1058
|
|
@@ -1319,13 +1060,101 @@ module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/fo
|
|
1319
1060
|
/*!********************************************************************************************!*\
|
1320
1061
|
!*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
|
1321
1062
|
\********************************************************************************************/
|
1322
|
-
|
1323
|
-
/***/ (function(module, exports) {
|
1063
|
+
/***/ (function(module) {
|
1324
1064
|
|
1325
1065
|
module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
1326
1066
|
|
1327
1067
|
/***/ })
|
1328
1068
|
|
1329
|
-
/******/
|
1069
|
+
/******/ });
|
1070
|
+
/************************************************************************/
|
1071
|
+
/******/ // The module cache
|
1072
|
+
/******/ var __webpack_module_cache__ = {};
|
1073
|
+
/******/
|
1074
|
+
/******/ // The require function
|
1075
|
+
/******/ function __webpack_require__(moduleId) {
|
1076
|
+
/******/ // Check if module is in cache
|
1077
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
1078
|
+
/******/ if (cachedModule !== undefined) {
|
1079
|
+
/******/ return cachedModule.exports;
|
1080
|
+
/******/ }
|
1081
|
+
/******/ // Create a new module (and put it into the cache)
|
1082
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
1083
|
+
/******/ // no module.id needed
|
1084
|
+
/******/ // no module.loaded needed
|
1085
|
+
/******/ exports: {}
|
1086
|
+
/******/ };
|
1087
|
+
/******/
|
1088
|
+
/******/ // Execute the module function
|
1089
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
1090
|
+
/******/
|
1091
|
+
/******/ // Return the exports of the module
|
1092
|
+
/******/ return module.exports;
|
1093
|
+
/******/ }
|
1094
|
+
/******/
|
1095
|
+
/************************************************************************/
|
1096
|
+
/******/ /* webpack/runtime/compat get default export */
|
1097
|
+
/******/ !function() {
|
1098
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
1099
|
+
/******/ __webpack_require__.n = function(module) {
|
1100
|
+
/******/ var getter = module && module.__esModule ?
|
1101
|
+
/******/ function() { return module['default']; } :
|
1102
|
+
/******/ function() { return module; };
|
1103
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
1104
|
+
/******/ return getter;
|
1105
|
+
/******/ };
|
1106
|
+
/******/ }();
|
1107
|
+
/******/
|
1108
|
+
/******/ /* webpack/runtime/define property getters */
|
1109
|
+
/******/ !function() {
|
1110
|
+
/******/ // define getter functions for harmony exports
|
1111
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
1112
|
+
/******/ for(var key in definition) {
|
1113
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
1114
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
1115
|
+
/******/ }
|
1116
|
+
/******/ }
|
1117
|
+
/******/ };
|
1118
|
+
/******/ }();
|
1119
|
+
/******/
|
1120
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
1121
|
+
/******/ !function() {
|
1122
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
1123
|
+
/******/ }();
|
1124
|
+
/******/
|
1125
|
+
/******/ /* webpack/runtime/make namespace object */
|
1126
|
+
/******/ !function() {
|
1127
|
+
/******/ // define __esModule on exports
|
1128
|
+
/******/ __webpack_require__.r = function(exports) {
|
1129
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
1130
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
1131
|
+
/******/ }
|
1132
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
1133
|
+
/******/ };
|
1134
|
+
/******/ }();
|
1135
|
+
/******/
|
1136
|
+
/************************************************************************/
|
1137
|
+
var __webpack_exports__ = {};
|
1138
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
1139
|
+
!function() {
|
1140
|
+
/*!***************************************************!*\
|
1141
|
+
!*** ./js/entries/plugins/foundation.dropdown.js ***!
|
1142
|
+
\***************************************************/
|
1143
|
+
__webpack_require__.r(__webpack_exports__);
|
1144
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
1145
|
+
/* harmony export */ Dropdown: function() { return /* reexport safe */ _foundation_dropdown__WEBPACK_IMPORTED_MODULE_1__.Dropdown; },
|
1146
|
+
/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; }
|
1147
|
+
/* harmony export */ });
|
1148
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
1149
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
|
1150
|
+
/* harmony import */ var _foundation_dropdown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.dropdown */ "./js/foundation.dropdown.js");
|
1151
|
+
|
1152
|
+
|
1153
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.plugin(_foundation_dropdown__WEBPACK_IMPORTED_MODULE_1__.Dropdown, 'Dropdown');
|
1154
|
+
|
1155
|
+
}();
|
1156
|
+
/******/ return __webpack_exports__;
|
1157
|
+
/******/ })()
|
1158
|
+
;
|
1330
1159
|
});
|
1331
1160
|
//# sourceMappingURL=foundation.dropdown.js.map
|